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:
@@ -32,7 +32,9 @@ def test_react_agent_sys_prompt_includes_registered_skill_prompt() -> None:
|
||||
assert "# Agent Skills" in prompt
|
||||
assert "## calendar" in prompt
|
||||
assert "## contacts" in prompt
|
||||
assert "SKILL.md" in prompt
|
||||
assert "view_skill_file" in prompt
|
||||
assert 'file_path="calendar/SKILL.md"' in prompt
|
||||
assert 'file_path="contacts/SKILL.md"' in prompt
|
||||
|
||||
|
||||
def test_view_skill_file_tool_reads_registered_skill_content() -> None:
|
||||
@@ -47,3 +49,18 @@ def test_view_skill_file_tool_reads_registered_skill_content() -> None:
|
||||
block = response.content[0]
|
||||
text = block["text"] if isinstance(block, dict) else block.text
|
||||
assert "Calendar Skill" in text or "name: calendar" in text
|
||||
|
||||
|
||||
def test_view_skill_file_tool_reads_calendar_action_card() -> None:
|
||||
toolkit = build_toolkit(enabled_skill_names={"calendar"})
|
||||
tool = toolkit.tools["view_skill_file"].original_func
|
||||
|
||||
response = asyncio.run(
|
||||
tool(file_path="calendar/actions/create_event.md", ranges=[1, 20]),
|
||||
)
|
||||
|
||||
assert response.content
|
||||
block = response.content[0]
|
||||
text = block["text"] if isinstance(block, dict) else block.text
|
||||
assert "create_event" in text
|
||||
assert "input.title" in text
|
||||
|
||||
Reference in New Issue
Block a user