Publish Content database intake capabilities - #2866
Conversation
This comment has been minimized.
This comment has been minimized.
|
Here's a visual recap of what changed: Open the full interactive recap |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…ed-intake # Conflicts: # templates/content/actions/add-database-item.ts
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Builder reviewed your changes — looks good ✅
Review Details
Code Review Summary
This incremental review covers the expanded Content database discovery flow: server-side pagination and continuation metadata, client-side complete-list fetching with consistency checks, and retryable error states in the database source pickers. The implementation is sound: ordinary discovery is bounded and paginated, exact resolution limits duplicate detection to two rows without weakening fail-closed behavior, source-chain exclusions are applied before paging, and the client rejects missing, inconsistent, repeated, or clipped pagination rather than presenting a plausible incomplete list.
The UI changes use the shared QueryErrorState with an explicit retry path, while the A2A surface remains limited to the intended authenticated reads and delegated writes. Four parallel balanced code reviews found no new actionable issues, and focused discovery, hook, and capability tests passed. Risk assessment: Standard.
🧪 Browser testing: Attempted after the UI changes, but skipped verification because Chrome MCP/browser automation tools were unavailable environment-wide. The dev server was reachable at http://127.0.0.1:8080/content; all 12 planned cases were reported as couldnt_verify due to the tooling environment, not an application failure.

Problem
Workspace agents can discover authenticated write capabilities from sibling apps, but Content did not publish enough information for a coordinating agent to find and delegate structured database intake reliably. Database discovery returned only titles, omitted the user-authored description that explains what a database is for, and did not expose a safe schema-read capability. Existing Content mutations were also absent from authenticated capability discovery.
That left Dispatch choosing between guesswork and app-specific routing knowledge. A request such as filing a design ask could be mistaken for visual Design work even when workspace instructions name an existing Content intake database.
Approach
Keep Actions as the single source of truth and make delegation the default. Content publishes a deliberately small authenticated surface:
The calling agent learns that Content can own the job, then sends the objective to the Content agent. Content still interprets its live schema, selects local Actions, validates values, and performs authorized writes. Dispatch remains generic; this PR adds no hardcoded database-to-app mapping, and genuine visual design requests still route to Design.
What changed
list-content-databasesto search live titles and user-authored descriptions and return stable database, document, and space IDs.totalItems,hasMore, andnextOffsetmetadata. Source-chain exclusions are resolved before the SQL limit, and the existing source picker exhausts every page through the same Action.describe-content-database, a schema-only read that returns live database metadata, views, context, and properties without returning database rows. The fullget-content-databaseAction remains app-local.Safety and operations
Direct reads reuse Content access checks. The schema reader first resolves through the same access-scoped, system-excluding discovery path. Direct writes remain impossible: every mutation is delegated to the receiving Content agent and continues through its existing validation and
assertAccessboundaries.There are no migrations, backfills, production data writes, credential changes, or permission changes. Rollback is a code revert. Deployment and the real Slack acceptance story remain outside this PR and will use the existing Dispatch canary after merge.
Verification
The deployed real-Slack story is intentionally pending. It requires Alice-authored messages through Computer Use in
test-content-app, followed by Content record and source-thread read-back after this PR is merged and deployed.Review focus
describe-content-databasestay safely narrower than the full app-local database reader?Follow-up
After merge and deployment, run the frozen Alice-authored Slack intake/correction acceptance story under the existing canary. That operational proof is required before the durable task closes; it is not implementation scope for this PR.