Submatter/plans/Plan-workspace-communications/Epic-agent-participation/Task-agent-registry-api.md

2.6 KiB

kind slug title plan_slug epic_slug status priority tenant_id owner cursor_todo_id updated_at
task agent-registry-api Expose the shared agent catalog and private draft API workspace-communications agent-participation ready P1 global unassigned null 2026-10-22

Task summary

Add one workspace-authorized tRPC registry API for catalog/detail reads and member-owned private draft persistence.

Description

Consume the schema/contracts from Task-agent-registry-marketplace.md. This task owns list/detail/filter and private draft create/read/save/discard procedures; library/editor tasks consume them. AI Chat selectors, Agents builder/library, mention completion and jobs all reference the same immutable agent IDs and versions. Curated templates supply provenance, not a second installed-agent identity. Do not duplicate model routing, harness aliases, users or run records as an agent registry.

Subtasks

  • Add zod-validated, tenant-filtered catalog/detail queries for visible curated templates, installed/workspace agents and the caller's private drafts, with stable pagination.
  • Add private draft create/read/save/discard with optimistic base-revision checks, immutable versions and actor audit metadata; requested tools/context access remain inert.
  • Expose safe lifecycle/provenance/version/update metadata for library/selector clients without leaking another user's private drafts or restricted configuration.
  • Test cross-tenant ID guessing, same-workspace draft isolation including admins/owners, stale saves, retries and handle uniqueness conflicts.

Owner or assignee

unassigned

Status

ready for scheduling after registry schema/contracts; not currently running.

Estimation

M

Acceptance criteria

  • One registry API supports all AI and chat surfaces; clients cannot create competing agent identities.
  • Only the draft owner can mutate/read their private draft; workspace admin status alone grants no private-draft access.
  • Saves are concurrency-safe and never install, publish, activate, grant tools/context, or enqueue execution.
  • List/detail/mention projections reveal only authorized agents and safe fields.
  • pnpm lint && pnpm type-check && pnpm test pass.