require a2a pack write prefix support
All checks were successful
build / build (push) Successful in 20s

This commit is contained in:
robert
2026-05-26 20:34:08 -03:00
parent 1ce66340bd
commit cd15dc3aaa
9 changed files with 64 additions and 30 deletions

View File

@@ -23,6 +23,7 @@ class BuilderPromptTests(unittest.TestCase):
agent_source,
)
self.assertIn("stream=True", agent_source)
self.assertIn('grant_write_prefixes=("agents/{name}/",)', agent_source)
def test_outer_builder_accepts_user_creds_or_platform_llm_grants(self) -> None:
agent_source = Path(__file__).resolve().parents[1].joinpath("agent.py").read_text()
@@ -93,18 +94,20 @@ class BuilderPromptTests(unittest.TestCase):
self.assertIn("deepagent-agent-design", SYSTEM_PROMPT)
self.assertIn("write_agent_skill", SYSTEM_PROMPT)
self.assertIn("workspace_access = WorkspaceAccess.dynamic", SYSTEM_PROMPT)
self.assertIn("ensure_read/ensure_write", SYSTEM_PROMPT)
files = _builder_skill_files()
self.assertTrue(
{path.split("/", 1)[0] for path in files}.issuperset(expected)
)
self.assertIn("skills=[RUNTIME_SKILLS_ROOT]", files["deepagent-agent-design/SKILL.md"])
self.assertIn("skills=skill_sources or None", files["deepagent-agent-design/SKILL.md"])
self.assertIn("from a2a_pack import", files["a2apack-agent-authoring/SKILL.md"])
self.assertIn("ctx.workspace_shell", files["a2apack-agent-authoring/SKILL.md"])
self.assertIn("create_deep_agent", files["deepagents-implementation-patterns/SKILL.md"])
self.assertIn('config={"recursion_limit": 500}', files["deepagents-implementation-patterns/SKILL.md"])
self.assertIn("ctx.write_artifact", files["workspace-artifact-safety/SKILL.md"])
self.assertIn("ctx.workspace_shell", files["workspace-artifact-safety/SKILL.md"])
self.assertIn("write_prefixes", files["workspace-artifact-safety/SKILL.md"])
self.assertIn("outputs/rootfs-captures/...", files["workspace-artifact-safety/SKILL.md"])
self.assertIn("live_skills[].input_schema", files["agent-quality-review/SKILL.md"])
self.assertIn("ctx.workspace_python", files["agent-quality-review/SKILL.md"])