3.6 KiB
3.6 KiB
id, title, status, wave, depends_on, plan, spec, adr
| id | title | status | wave | depends_on | plan | spec | adr |
|---|---|---|---|---|---|---|---|
| 01-manifest-sdk-contract | Manifest and SDK contract | done | 1 | plan.md | ../../specs/plugins/requirements/agent-tools.md | ../../decisions/2026-08-11-plugin-tools-through-kandev-mcp.md |
Task 01: Manifest and SDK contract
Acceptance
- The manifest and normalized runtime descriptor represent every field and limit in the spec, reject invalid schemas/surfaces/names, and derive bounded deterministic exposed names.
- The plugin protobuf and Go SDK support one context-respecting
InvokeAgentToolRPC with fallback text, optional structured content, andis_error; the optionalAgentToolPlugininterface leaves the basePlugininterface and existing implementations source-compatible. - Protobuf stubs are regenerated, not edited manually, and focused manifest and SDK round-trip tests pass.
Verification
make -C apps/backend proto && cd apps/backend && go test -race ./internal/plugins/manifest ./internal/mcp/plugintools ./pkg/pluginsdk
Files likely touched
apps/backend/internal/plugins/manifest/manifest.goapps/backend/internal/plugins/manifest/validate.goapps/backend/internal/plugins/manifest/manifest_test.goapps/backend/internal/mcp/plugintools/types.goapps/backend/internal/mcp/plugintools/types_test.goapps/backend/internal/mcp/toolschema/schema.goapps/backend/internal/mcp/toolschema/schema_test.goapps/backend/proto/kandev/plugin/v1/plugin.protoapps/backend/proto/kandev/plugin/v1/plugin.pb.goapps/backend/proto/kandev/plugin/v1/plugin_grpc.pb.goapps/backend/pkg/pluginsdk/plugin.goapps/backend/pkg/pluginsdk/types.goapps/backend/pkg/pluginsdk/serve.goapps/backend/pkg/pluginsdk/plugin_test.goapps/backend/pkg/pluginsdk/serve_test.go
Dependencies
None.
Parallelism
Sequential. This task establishes shared manifest, protobuf, generated, and SDK contracts consumed by every later task.
Inputs
- Spec sections
What,Manifest Contract, andPlugin SDK Contract - ADR decisions 1, 4, 8, and 9
- Existing
manifest.Validate, protobufservice Plugin, pluginsdk optional interface/adapter patterns, and MCP JSON Schema validation behavior
Risks
- A protobuf field or SDK signature mistake becomes a public compatibility burden. Keep request context backend-authored and result content bounded.
- JSON Schema must have one interpretation at install and invocation time.
Output contract
Report RED tests, exact public fields and defaults, generated files, commands and results, compatibility notes, and task/plan status updates.
Results
- RED:
TestParse_AgentToolDeclarationIsRetainedfailed because the existing manifest parser had noAgentToolsfield. - Added manifest declarations and validation for names, surfaces, schemas,
limits, and annotation consistency; added normalized readable provider-safe
names and catalog snapshots under
internal/mcp/plugintools. - Added shared JSON Schema compilation under
internal/mcp/toolschema. - Added optional
pluginsdk.AgentToolPluginand gRPC request/response conversion. The basePlugininterface remains unchanged for compatibility. - Added
InvokeAgentToolto the plugin protobuf and regenerated stubs withmake proto. - Verification:
make proto(pass);go test -race ./internal/plugins/manifest ./internal/mcp/toolschema ./internal/mcp/plugintools ./pkg/pluginsdk(pass); focused SDK round tripgo test -race -run 'TestServe_EndToEnd/InvokeAgentTool' ./pkg/pluginsdk(pass). - Remaining risk: backend catalog invocation and agentctl registry are not yet wired; task 02 begins that work.