feat(agent-config): add typed dashboard mutation API #26

Merged
vince merged 2 commits from codex/agent-config-tier into main 2026-06-19 12:25:31 +02:00
Owner

Summary

Adds an agent-safe dashboard configuration API backed by typed dashboard operations, preview diffs, persisted publish revisions, and rollback support.

Why

Issue #5 calls for a second tier where agents can manipulate the dashboard model through validated operations instead of editing hardcoded UI/component data.

Changes

  • Added reusable TypeBox/AJV operation and request schemas for create, add, connect, status, arrange, remove, preview, publish, and rollback flows.
  • Added /api/agent/dashboard POST handling with fail-closed bearer/shared-token auth, structured repairable errors, preview-only diffs, publish revisions, and rollback errors.
  • Exported model sub-schemas needed by future MCP/tool wrappers.
  • Added unit coverage for valid operations, invalid operations, target-specific failures, create-dashboard preview, publish no-commit failures, rollback, auth, and HTTP adapter behavior.

Testing

  • bun run test:qa

Notes

The MCP packaging from issue #12 is still separate; these schemas and handlers are intended to be reused there once the internal API stabilizes.

## Summary Adds an agent-safe dashboard configuration API backed by typed dashboard operations, preview diffs, persisted publish revisions, and rollback support. ## Why Issue #5 calls for a second tier where agents can manipulate the dashboard model through validated operations instead of editing hardcoded UI/component data. ## Changes - Added reusable TypeBox/AJV operation and request schemas for create, add, connect, status, arrange, remove, preview, publish, and rollback flows. - Added `/api/agent/dashboard` POST handling with fail-closed bearer/shared-token auth, structured repairable errors, preview-only diffs, publish revisions, and rollback errors. - Exported model sub-schemas needed by future MCP/tool wrappers. - Added unit coverage for valid operations, invalid operations, target-specific failures, create-dashboard preview, publish no-commit failures, rollback, auth, and HTTP adapter behavior. ## Testing - `bun run test:qa` ## Notes The MCP packaging from issue #12 is still separate; these schemas and handlers are intended to be reused there once the internal API stabilizes.
vince added 1 commit 2026-06-19 12:13:49 +02:00
vince added 1 commit 2026-06-19 12:21:28 +02:00
vince merged commit eeac37e58e into main 2026-06-19 12:25:31 +02:00
Sign in to join this conversation.
No description provided.