feat(agent): redesign project_cli with module/method/input protocol
- Replace command/subcommand/args with module/method/input envelope - Calendar handler uses discriminated union (mode) for read operations - Strict Pydantic models with extra='forbid' for all calendar methods - Worker max_iters=7, router prompt simplified (removed project_cli_defaults) - Skill index cards + per-action files for progressive disclosure - Frontend/AG-UI aligned to module/method dispatch - Protocol docs updated to module/method/input contract WIP: action cards need envelope fix, 2 tests need update, memory handler needs Pydantic models.
This commit is contained in:
@@ -252,8 +252,8 @@ async def test_calendar_create_skill_creates_db_record() -> None:
|
||||
assert cli_result.get("status") == "success", f"Tool call failed: {cli_result}"
|
||||
|
||||
args = cli_result.get("tool_call_args", {})
|
||||
assert args.get("command") == "calendar"
|
||||
assert args.get("subcommand") == "create"
|
||||
assert args.get("module") == "calendar"
|
||||
assert args.get("method") == "create"
|
||||
|
||||
result_payload = cli_result.get("result")
|
||||
assert isinstance(result_payload, dict), f"Unexpected result payload: {cli_result}"
|
||||
@@ -317,8 +317,8 @@ async def test_calendar_read_skill_queries_db() -> None:
|
||||
assert cli_result.get("status") in {"success", "partial"}, f"Tool call failed: {cli_result}"
|
||||
|
||||
args = cli_result.get("tool_call_args", {})
|
||||
assert args.get("command") == "calendar"
|
||||
assert args.get("subcommand") == "read"
|
||||
assert args.get("module") == "calendar"
|
||||
assert args.get("method") in {"read"}
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
@@ -355,8 +355,8 @@ async def test_contacts_read_skill_queries_db() -> None:
|
||||
assert cli_result.get("status") in {"success", "partial"}, f"Tool call failed: {cli_result}"
|
||||
|
||||
args = cli_result.get("tool_call_args", {})
|
||||
assert args.get("command") == "contacts"
|
||||
assert args.get("subcommand") == "read"
|
||||
assert args.get("module") == "contacts"
|
||||
assert args.get("method") == "read"
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
@@ -398,8 +398,8 @@ async def test_memory_update_skill_via_automation() -> None:
|
||||
assert cli_result.get("status") in {"success", "partial"}, f"Tool call failed: {cli_result}"
|
||||
|
||||
args = cli_result.get("tool_call_args", {})
|
||||
assert args.get("command") == "memory"
|
||||
assert args.get("subcommand") == "update"
|
||||
assert args.get("module") == "memory"
|
||||
assert args.get("method") == "update"
|
||||
|
||||
if user_id:
|
||||
time.sleep(1)
|
||||
|
||||
Reference in New Issue
Block a user