3.6 KiB
3.6 KiB
id, title, status, wave, depends_on, plan, requirements, acceptance_criteria, system_design
| id | title | status | wave | depends_on | plan | requirements | acceptance_criteria | system_design | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 08-agent-canvas-authoring | Agent canvas authoring | done | 8 |
|
plan.md |
|
|
|
Task 08: Agent canvas authoring
Summary
Give task agents a scoped create, inspect, publish, skill-read, and state workflow. Transfer source through one bounded streaming contract for every executor type.
In scope
- Add gated canvas create, list, get, publish, skill-read, and state MCP tools.
- Derive canvas identity and scope from trusted task or edit-session context.
- Add a canvas-owned system-skill embed and materialization directory.
- Keep the canvas skill outside Office embeds, rows, and task workspaces.
- Add the allowlisted Canvas MCP skill reader.
- Add a canvas-specific source root and manifest scaffold.
- Add the authenticated agentctl tar stream for the assigned root.
- Enforce publish rate and one in-flight publish per canvas.
- Teach the skill about opaque-origin storage, HTTP routes, limits, and UI patterns.
- Add local, Docker, and remote source-transfer tests.
Out of scope
- Human promotion, release approval, rollback, Quick Chat launch, and host management pages.
Acceptance
- An agent creates and publishes only for its trusted task or edit target.
- Every executor reads the same current skill without workspace injection.
- A failed transfer, validation, rate, or storage check preserves the active release.
Verification
cd apps/backend && go test ./internal/mcp/server/... ./internal/canvas/... ./internal/agentctl/server/api/... ./internal/agent/runtime/...
Files likely touched
apps/backend/internal/mcp/server/canvas_tools.goapps/backend/internal/mcp/server/canvas_tools_test.go- canvas-owned embedded skill source and materializer
apps/backend/internal/canvas/authoring.goapps/backend/internal/canvas/publish.goapps/backend/internal/agentctl/server/api/**apps/backend/internal/agent/runtime/**apps/backend/config/prompts/**
Dependencies
- Task 06 provides canvas metadata, limits, and lifecycle services.
- Tasks 02 through 05 provide validation, state, grants, and runtime protocol.
Risks
- A source stream can escape the assigned root through a link or race.
- A shared skill directory can enter Office discovery.
- A session-supplied canvas ID can bypass the trusted edit target.
Parallelism
sequential
Inputs
- Agent lifecycle, authoring guidance, tool, source-transfer, limit, and publish sections.
- Current MCP task scoping and executor file-transfer patterns.
Results
Implemented scoped Canvas MCP authoring and state tools, the separate canvas-authoring skill inventory, bounded authenticated agentctl tar transfer, trusted executor source resolution, publish admission and validation, and failure-safe pending/active release ownership.
Verification:
go test ./internal/mcp/server/... ./internal/canvas/... ./internal/agentctl/server/api/... ./internal/agent/runtime/... -count=1— passed.make -C apps/backend lint— passed.