Summary
Add a harness apply-mode dropdown (Manual / Auto / Plan, default Manual = current behavior) and human-friendly status events whenever an artifact (route/custom block) is created, changed, or deleted.
1. Apply mode dropdown
- Manual (default, current behavior): agent produces artifacts, user reviews and clicks apply per artifact (
ApplyBar/RouteApplyBar).
- Auto: when the agent finishes a task, its resulting artifacts (route/canvas/custom block) are applied automatically — no manual apply click needed.
- Plan: agent only plans/describes intended changes without generating applyable artifacts (dry-run / review-only mode) — no resources are created.
Selector lives wherever the harness conversation is configured/started; persists per-conversation (or per-session, TBD during implementation).
Why
Manual apply-per-artifact is friction for users who trust the verifier agent's output and just want the build to land. Auto mode collapses "agent finished" -> "resources exist" into one step, using the same safe apply path already hardened for AI-harness-sourced duplicates (saveCanvas's mergeAiDuplicates, singleton remap in normalize.ts).
Scope
- Backend: thread apply-mode through the harness conversation/run so the orchestrator (or a hook after task completion) can call the existing apply-artifact path automatically when mode = Auto.
- Frontend: dropdown in the harness UI (
apps/portal) to pick Manual/Auto/Plan; Manual stays the default so nothing changes for existing users.
- Plan mode: agent output should skip creating applyable artifacts entirely (or mark them non-applyable) — needs its own scoping pass.
2. Human-friendly artifact status events
Whenever an artifact is created, changed, or deleted (manually applied, or auto-applied per #1), emit a status update to the frontend that is human-readable — not a raw id/type payload.
- For a route: include the route's name and path (e.g.
"Created route 'Get Order' (GET /orders/:id)").
- For a custom block: include the custom block's name (e.g.
"Updated custom block 'Send Email'").
- Cover all three lifecycle events: created / changed / deleted.
Why
Today the apply flow only reflects "applied" as a timestamp on the sub-artifact (ApplyBar's Applied). With Auto mode landing changes without a manual click, the user needs a live, readable trail of what just happened without having to open the route/canvas manually.
Scope
- Backend: wherever routes/custom blocks are created/updated/deleted via the AI harness path (
apps/server/src/modules/ops/route.ts, ops/customBlock.ts, canvas save path), emit a status message with the resolved name/path instead of (or alongside) raw ids.
- Frontend: surface these status events in the harness conversation UI (toast/log line/status list).
Notes
- Both items build on the recent duplicate-merge hardening in
saveCanvas (mergeAiDuplicates) and the normalize.ts singleton remap — Auto mode relies on that safety net already being in place.
- Manual mode must remain the exact current behavior; this is additive, not a replacement.
Summary
Add a harness apply-mode dropdown (Manual / Auto / Plan, default Manual = current behavior) and human-friendly status events whenever an artifact (route/custom block) is created, changed, or deleted.
1. Apply mode dropdown
ApplyBar/RouteApplyBar).Selector lives wherever the harness conversation is configured/started; persists per-conversation (or per-session, TBD during implementation).
Why
Manual apply-per-artifact is friction for users who trust the verifier agent's output and just want the build to land. Auto mode collapses "agent finished" -> "resources exist" into one step, using the same safe apply path already hardened for AI-harness-sourced duplicates (
saveCanvas'smergeAiDuplicates, singleton remap innormalize.ts).Scope
apps/portal) to pick Manual/Auto/Plan; Manual stays the default so nothing changes for existing users.2. Human-friendly artifact status events
Whenever an artifact is created, changed, or deleted (manually applied, or auto-applied per #1), emit a status update to the frontend that is human-readable — not a raw id/type payload.
"Created route 'Get Order' (GET /orders/:id)")."Updated custom block 'Send Email'").Why
Today the apply flow only reflects "applied" as a timestamp on the sub-artifact (
ApplyBar'sApplied). With Auto mode landing changes without a manual click, the user needs a live, readable trail of what just happened without having to open the route/canvas manually.Scope
apps/server/src/modules/ops/route.ts,ops/customBlock.ts, canvas save path), emit a status message with the resolved name/path instead of (or alongside) raw ids.Notes
saveCanvas(mergeAiDuplicates) and thenormalize.tssingleton remap — Auto mode relies on that safety net already being in place.