@open-mercato/cezar 0.9.1 → 0.9.2-pr780.1061
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +29 -11
- package/dist/agent-config/account-identity.d.ts +44 -0
- package/dist/agent-config/account-identity.js +128 -0
- package/dist/agent-config/account-identity.js.map +1 -0
- package/dist/agent-config/catalog.d.ts +9 -1
- package/dist/agent-config/catalog.js +18 -0
- package/dist/agent-config/catalog.js.map +1 -1
- package/dist/agent-config/files.d.ts +1 -1
- package/dist/agent-config/model-settings/claude.d.ts +2 -0
- package/dist/agent-config/model-settings/claude.js +11 -0
- package/dist/agent-config/model-settings/claude.js.map +1 -0
- package/dist/agent-config/model-settings/codex.d.ts +2 -0
- package/dist/agent-config/model-settings/codex.js +16 -0
- package/dist/agent-config/model-settings/codex.js.map +1 -0
- package/dist/agent-config/model-settings/opencode.d.ts +2 -0
- package/dist/agent-config/model-settings/opencode.js +8 -0
- package/dist/agent-config/model-settings/opencode.js.map +1 -0
- package/dist/agent-config/model-settings/shared.d.ts +9 -0
- package/dist/agent-config/model-settings/shared.js +93 -0
- package/dist/agent-config/model-settings/shared.js.map +1 -0
- package/dist/agent-config/model-settings/types.d.ts +9 -0
- package/dist/agent-config/model-settings/types.js +2 -0
- package/dist/agent-config/model-settings/types.js.map +1 -0
- package/dist/agent-config/models.d.ts +9 -0
- package/dist/agent-config/models.js +30 -0
- package/dist/agent-config/models.js.map +1 -0
- package/dist/agent-config/service.d.ts +1 -1
- package/dist/agent-config/service.js +4 -4
- package/dist/agent-config/service.js.map +1 -1
- package/dist/agent-config/validate.d.ts +1 -1
- package/dist/automations/coordinator.d.ts +26 -0
- package/dist/automations/coordinator.js +66 -0
- package/dist/automations/coordinator.js.map +1 -0
- package/dist/automations/github-poller.d.ts +74 -0
- package/dist/automations/github-poller.js +234 -0
- package/dist/automations/github-poller.js.map +1 -0
- package/dist/automations/scheduler.d.ts +42 -0
- package/dist/automations/scheduler.js +192 -0
- package/dist/automations/scheduler.js.map +1 -0
- package/dist/automations/store.d.ts +65 -0
- package/dist/automations/store.js +298 -0
- package/dist/automations/store.js.map +1 -0
- package/dist/automations/task-template.d.ts +18 -0
- package/dist/automations/task-template.js +95 -0
- package/dist/automations/task-template.js.map +1 -0
- package/dist/automations/types.d.ts +251 -0
- package/dist/automations/types.js +158 -0
- package/dist/automations/types.js.map +1 -0
- package/dist/config.d.ts +17 -112
- package/dist/config.js +45 -4
- package/dist/config.js.map +1 -1
- package/dist/contract/agent-config.d.ts +151 -0
- package/dist/contract/agent-profiles.d.ts +332 -0
- package/dist/contract/automations.d.ts +919 -0
- package/dist/contract/events.d.ts +45 -0
- package/dist/contract/github.d.ts +467 -0
- package/dist/contract/health.d.ts +96 -0
- package/dist/contract/index.d.ts +16 -0
- package/dist/contract/index.js +1593 -0
- package/dist/contract/projects.d.ts +185 -0
- package/dist/contract/repo.d.ts +234 -0
- package/dist/contract/runs.d.ts +1239 -0
- package/dist/contract/skills.d.ts +227 -0
- package/dist/contract/workflows.d.ts +212 -0
- package/dist/contract/workspace.d.ts +470 -0
- package/dist/core/agent-env.d.ts +1 -1
- package/dist/core/agent-model-policy.d.ts +10 -0
- package/dist/core/agent-model-policy.js +36 -0
- package/dist/core/agent-model-policy.js.map +1 -0
- package/dist/core/agent-profiles.d.ts +59 -0
- package/dist/core/agent-profiles.js +83 -0
- package/dist/core/agent-profiles.js.map +1 -0
- package/dist/core/agent-runner.d.ts +12 -1
- package/dist/core/agent-runner.js +13 -0
- package/dist/core/agent-runner.js.map +1 -1
- package/dist/core/ask.d.ts +45 -124
- package/dist/core/ask.js +103 -13
- package/dist/core/ask.js.map +1 -1
- package/dist/core/backend-detect.js +7 -2
- package/dist/core/backend-detect.js.map +1 -1
- package/dist/core/claude-cli-runner.d.ts +2 -2
- package/dist/core/claude-cli-runner.js +52 -9
- package/dist/core/claude-cli-runner.js.map +1 -1
- package/dist/core/claude-ui-mapper.d.ts +1 -1
- package/dist/core/codex-app-server-runner.d.ts +1 -1
- package/dist/core/codex-app-server-runner.js +60 -3
- package/dist/core/codex-app-server-runner.js.map +1 -1
- package/dist/core/codex-app-server-transport.d.ts +6 -1
- package/dist/core/codex-app-server-transport.js +12 -3
- package/dist/core/codex-app-server-transport.js.map +1 -1
- package/dist/core/codex-model-catalog.d.ts +1 -1
- package/dist/core/codex-ui-mapper.d.ts +5 -1
- package/dist/core/codex-ui-mapper.js +74 -17
- package/dist/core/codex-ui-mapper.js.map +1 -1
- package/dist/core/model-identity.d.ts +13 -6
- package/dist/core/model-identity.js +32 -17
- package/dist/core/model-identity.js.map +1 -1
- package/dist/core/model-presets.d.ts +2 -2
- package/dist/core/model-presets.js +1 -1
- package/dist/core/opencode-server-runner.d.ts +2 -2
- package/dist/core/opencode-ui-mapper.d.ts +4 -1
- package/dist/core/opencode-ui-mapper.js +45 -7
- package/dist/core/opencode-ui-mapper.js.map +1 -1
- package/dist/core/provider-auth.d.ts +154 -0
- package/dist/core/provider-auth.js +488 -0
- package/dist/core/provider-auth.js.map +1 -0
- package/dist/core/provider-availability.d.ts +3 -0
- package/dist/core/provider-availability.js +14 -0
- package/dist/core/provider-availability.js.map +1 -0
- package/dist/core/runner-factory.d.ts +1 -1
- package/dist/core/runner-model-catalog.d.ts +1 -1
- package/dist/core/shell-env.d.ts +28 -0
- package/dist/core/shell-env.js +56 -0
- package/dist/core/shell-env.js.map +1 -0
- package/dist/core/tool-display.d.ts +1 -1
- package/dist/core/ui-events.d.ts +1 -1
- package/dist/core/ui-events.js +1 -1
- package/dist/git-diff-base.d.ts +60 -0
- package/dist/git-diff-base.js +54 -0
- package/dist/git-diff-base.js.map +1 -0
- package/dist/git-worktree.d.ts +37 -6
- package/dist/git-worktree.js +39 -9
- package/dist/git-worktree.js.map +1 -1
- package/dist/handoff.d.ts +2 -2
- package/dist/handoff.js +1 -1
- package/dist/index.js +65 -8
- package/dist/index.js.map +1 -1
- package/dist/paths.d.ts +69 -6
- package/dist/paths.js +86 -9
- package/dist/paths.js.map +1 -1
- package/dist/planner.d.ts +2 -2
- package/dist/planner.js +7 -1
- package/dist/planner.js.map +1 -1
- package/dist/release/manifests.d.ts +81 -0
- package/dist/release/manifests.js +74 -0
- package/dist/release/manifests.js.map +1 -0
- package/dist/release/snapshot.d.ts +9 -23
- package/dist/release/snapshot.js +9 -22
- package/dist/release/snapshot.js.map +1 -1
- package/dist/release/stable.d.ts +15 -29
- package/dist/release/stable.js +14 -27
- package/dist/release/stable.js.map +1 -1
- package/dist/runs/auto-name.d.ts +1 -1
- package/dist/runs/auto-name.js +6 -1
- package/dist/runs/auto-name.js.map +1 -1
- package/dist/runs/retention.d.ts +1 -1
- package/dist/runs/store.d.ts +147 -336
- package/dist/runs/store.js +148 -9
- package/dist/runs/store.js.map +1 -1
- package/dist/runs/ui-event-sink.d.ts +1 -1
- package/dist/server/app-type.d.ts +21 -0
- package/dist/server/app-type.js +2 -0
- package/dist/server/app-type.js.map +1 -0
- package/dist/server/capabilities.d.ts +6 -5
- package/dist/server/capabilities.js +11 -0
- package/dist/server/capabilities.js.map +1 -1
- package/dist/server/forge/github.d.ts +58 -151
- package/dist/server/forge/github.js +530 -6
- package/dist/server/forge/github.js.map +1 -1
- package/dist/server/forge/index.d.ts +10 -3
- package/dist/server/forge/index.js +14 -1
- package/dist/server/forge/index.js.map +1 -1
- package/dist/server/forge/types.d.ts +86 -1
- package/dist/server/git-changes.d.ts +8 -8
- package/dist/server/git-changes.js +14 -17
- package/dist/server/git-changes.js.map +1 -1
- package/dist/server/git.d.ts +2 -0
- package/dist/server/git.js +9 -0
- package/dist/server/git.js.map +1 -1
- package/dist/server/github.d.ts +3 -3
- package/dist/server/github.js +1 -1
- package/dist/server/github.js.map +1 -1
- package/dist/server/open-in-terminal.d.ts +8 -1
- package/dist/server/open-in-terminal.js +16 -8
- package/dist/server/open-in-terminal.js.map +1 -1
- package/dist/server/pr.d.ts +2 -2
- package/dist/server/project-context.d.ts +20 -3
- package/dist/server/project-context.js +30 -1
- package/dist/server/project-context.js.map +1 -1
- package/dist/server/provider-action-gate.d.ts +8 -0
- package/dist/server/provider-action-gate.js +54 -0
- package/dist/server/provider-action-gate.js.map +1 -0
- package/dist/server/provider-auth-runtime.d.ts +21 -0
- package/dist/server/provider-auth-runtime.js +66 -0
- package/dist/server/provider-auth-runtime.js.map +1 -0
- package/dist/server/server.d.ts +11958 -47
- package/dist/server/server.js +2612 -923
- package/dist/server/server.js.map +1 -1
- package/dist/server/validators.d.ts +97 -0
- package/dist/server/validators.js +86 -0
- package/dist/server/validators.js.map +1 -0
- package/dist/server/ws.d.ts +2 -2
- package/dist/server/ws.js +2 -2
- package/dist/server/ws.js.map +1 -1
- package/dist/server-install/engine.d.ts +1 -1
- package/dist/server-install/platforms/macosx-ngrok.d.ts +1 -1
- package/dist/server-install/platforms/ubuntu-vps.d.ts +16 -1
- package/dist/server-install/platforms/ubuntu-vps.js +83 -1
- package/dist/server-install/platforms/ubuntu-vps.js.map +1 -1
- package/dist/server-install/state.d.ts +1 -1
- package/dist/server-install/steps.d.ts +2 -2
- package/dist/server-install/strategies.d.ts +1 -1
- package/dist/server-install/types.d.ts +38 -424
- package/dist/server-install/ui.d.ts +1 -1
- package/dist/skills-banner.d.ts +7 -6
- package/dist/skills-banner.js +7 -6
- package/dist/skills-banner.js.map +1 -1
- package/dist/skills-remote.d.ts +2 -2
- package/dist/skills-update.d.ts +88 -0
- package/dist/skills-update.js +392 -0
- package/dist/skills-update.js.map +1 -0
- package/dist/skills.d.ts +2 -0
- package/dist/skills.js +7 -2
- package/dist/skills.js.map +1 -1
- package/dist/todos.d.ts +2 -28
- package/dist/todos.js +1 -1
- package/dist/ui-state.d.ts +16 -2
- package/dist/ui-state.js +14 -1
- package/dist/ui-state.js.map +1 -1
- package/dist/workflows/load.d.ts +1 -1
- package/dist/workflows/run.d.ts +76 -12
- package/dist/workflows/run.js +528 -71
- package/dist/workflows/run.js.map +1 -1
- package/dist/workflows/types.d.ts +59 -224
- package/dist/workflows/types.js +14 -0
- package/dist/workflows/types.js.map +1 -1
- package/dist/workspace/agent-accounts.d.ts +149 -0
- package/dist/workspace/agent-accounts.js +303 -0
- package/dist/workspace/agent-accounts.js.map +1 -0
- package/dist/workspace/agent-profiles.d.ts +78 -0
- package/dist/workspace/agent-profiles.js +115 -0
- package/dist/workspace/agent-profiles.js.map +1 -0
- package/dist/workspace/config.d.ts +81 -206
- package/dist/workspace/config.js +175 -14
- package/dist/workspace/config.js.map +1 -1
- package/dist/workspace/migrations.d.ts +1 -1
- package/dist/workspace/migrations.js +19 -4
- package/dist/workspace/migrations.js.map +1 -1
- package/dist/workspace/projects.d.ts +8 -2
- package/dist/workspace/projects.js +9 -3
- package/dist/workspace/projects.js.map +1 -1
- package/dist/workspace/semaphore.d.ts +6 -0
- package/dist/workspace/semaphore.js +14 -1
- package/dist/workspace/semaphore.js.map +1 -1
- package/dist/workspace/ui-state.d.ts +13 -3
- package/dist/workspace/ui-state.js +15 -5
- package/dist/workspace/ui-state.js.map +1 -1
- package/package.json +17 -39
- package/scripts/inline-contract.mjs +112 -0
- package/scripts/mock-claude.mjs +39 -1
- package/scripts/sync-readme.mjs +20 -0
- package/web/dist/assets/alert-dialog-CCX7vbLv.js +1 -0
- package/web/dist/assets/arrow-down-DXSvIdBy.js +1 -0
- package/web/dist/assets/arrow-left-CH1QDJ9J.js +1 -0
- package/web/dist/assets/bundle-mjs-BT31bpU6.js +1 -0
- package/web/dist/assets/centered-state-CXI997hI.js +43 -0
- package/web/dist/assets/chevron-right-Djmw1pir.js +1 -0
- package/web/dist/assets/{chunk-BO2N2NFS-DtrdTCWa.js → chunk-BO2N2NFS-DE6qKn3r.js} +8 -8
- package/web/dist/assets/circle-check-DJRWwnU0.js +1 -0
- package/web/dist/assets/circle-x-aJMtmDfr.js +1 -0
- package/web/dist/assets/collapsible-Btoo8CMa.js +1 -0
- package/web/dist/assets/commit-list-Cj3KHeTw.js +1 -0
- package/web/dist/assets/compare-variants-twOpd5eU.js +1 -0
- package/web/dist/assets/{core-DePtBHcl.js → core-BCsw8oQw.js} +1 -1
- package/web/dist/assets/diff-DEY8e-KQ.js +3 -0
- package/web/dist/assets/diff-stat-Coewcn_A.js +1 -0
- package/web/dist/assets/{diff-view-DCeSegKk.js → diff-view-DmqZuw0o.js} +4 -4
- package/web/dist/assets/dropdown-menu-C4IVZ4Cy.js +1 -0
- package/web/dist/assets/editable-title-B5Nz9Ifq.js +1 -0
- package/web/dist/assets/{ellipsis-vertical-CNnSLn5a.js → ellipsis-vertical-CFm090OY.js} +1 -1
- package/web/dist/assets/{file-D4GBh1ao.js → file-ChFcXCdF.js} +1 -1
- package/web/dist/assets/folder-JGQS95UK.js +1 -0
- package/web/dist/assets/{git-pull-request-DnR8Xh4_.js → git-pull-request-5QyNQHb4.js} +1 -1
- package/web/dist/assets/git-toolbar-BSAiDPXd.js +1 -0
- package/web/dist/assets/github-DnS2irZI.js +1 -0
- package/web/dist/assets/highlighted-body-OFNGDK62-BL-MfFgl.js +1 -0
- package/web/dist/assets/highlighter-CdHqIwFr.js +3 -0
- package/web/dist/assets/image-preview-DmcNMtBK.js +1 -0
- package/web/dist/assets/index-B84F80Q8.css +2 -0
- package/web/dist/assets/index-BohAT06J.js +6 -0
- package/web/dist/assets/lib-BQXq3kEf.js +1 -0
- package/web/dist/assets/lib-BxQXEXDF.js +1 -0
- package/web/dist/assets/markdown-DFnhId9R.js +2 -0
- package/web/dist/assets/mermaid-GHXKKRXX-C4jxqUUb.js +1 -0
- package/web/dist/assets/new-task-form-Dem8-EfF.js +1 -0
- package/web/dist/assets/pill-Bughljxv.js +1 -0
- package/web/dist/assets/project-router-DBpBMLHW.js +1 -0
- package/web/dist/assets/prompt-templates-Cj7wWXn2.js +15 -0
- package/web/dist/assets/react-runtime-CCIEwYL0.js +9 -0
- package/web/dist/assets/{refresh-cw-BT8E96Tm.js → refresh-cw-BWZQNIR7.js} +1 -1
- package/web/dist/assets/repo-git-Dhm-EROZ.js +1 -0
- package/web/dist/assets/rolldown-runtime-QTnfLwEv.js +1 -0
- package/web/dist/assets/run-diff-CXcSp_gT.js +3 -0
- package/web/dist/assets/run-header-CRr16SfL.js +1 -0
- package/web/dist/assets/{search-x-BDjaMrzG.js → search-x-BIhOTY_E.js} +1 -1
- package/web/dist/assets/skill-empty-hint-BN_ePNxo.js +1 -0
- package/web/dist/assets/skills-BiWfHmCR.js +1 -0
- package/web/dist/assets/skills-Cxj8xuN8.js +1 -0
- package/web/dist/assets/sparkles-CZEWgaOW.js +1 -0
- package/web/dist/assets/{square-terminal-Ckjjn0vb.js → square-terminal-B4KCKyUb.js} +1 -1
- package/web/dist/assets/tab-link-CYoA7evO.js +1 -0
- package/web/dist/assets/task-changes-BRkjXilr.js +1 -0
- package/web/dist/assets/task-commits-Bs8tVHdp.js +1 -0
- package/web/dist/assets/task-files-B83mmDc7.js +2 -0
- package/web/dist/assets/task-thread-B8SnpMda.js +9 -0
- package/web/dist/assets/textarea-GBSG043_.js +1 -0
- package/web/dist/assets/thread-loading-D-W1aDRr.js +1 -0
- package/web/dist/assets/{trash-2-DAyZ0VSi.js → trash-2-DscaMdyt.js} +1 -1
- package/web/dist/assets/{triangle-alert-Uy8rokUh.js → triangle-alert-DG4Zrdw_.js} +1 -1
- package/web/dist/assets/{upload-CDdyPPo_.js → upload-V_HWlzmF.js} +1 -1
- package/web/dist/assets/use-desktop-BeTfs42t.js +1 -0
- package/web/dist/assets/use-submit-shortcut-ceAGZrbH.js +1 -0
- package/web/dist/assets/utils-Dh89nMsg.js +64 -0
- package/web/dist/assets/workflows-LuXn4DOU.js +11 -0
- package/web/dist/assets/zoomable-image-DBPkskS9.js +1 -0
- package/web/dist/index.html +33 -13
- package/scripts/dev.mjs +0 -74
- package/scripts/release-snapshot.mjs +0 -130
- package/scripts/release.mjs +0 -119
- package/web/dist/assets/arrow-left-CnSdp92h.js +0 -1
- package/web/dist/assets/bundle-mjs-BegPhL5c.js +0 -1
- package/web/dist/assets/centered-state-DOsTcJZF.js +0 -43
- package/web/dist/assets/commit-list-BrxBEzRK.js +0 -1
- package/web/dist/assets/compare-variants-Bv2c9ORF.js +0 -1
- package/web/dist/assets/dist-B6XQOhgM.js +0 -1
- package/web/dist/assets/git-toolbar-pIC1ubPM.js +0 -1
- package/web/dist/assets/github-DTTSG0ht.js +0 -1
- package/web/dist/assets/highlighted-body-OFNGDK62-BuFJwunK.js +0 -1
- package/web/dist/assets/image-preview-DEhW0TFz.js +0 -1
- package/web/dist/assets/index-Cijmlz7q.js +0 -30
- package/web/dist/assets/index-DzroxqBG.css +0 -2
- package/web/dist/assets/lib-DPEZDBUN.js +0 -1
- package/web/dist/assets/lib-uHpeUPzK.js +0 -1
- package/web/dist/assets/mermaid-GHXKKRXX-CN2zQue0.js +0 -1
- package/web/dist/assets/open-mercato-toBr6SOa.svg +0 -11
- package/web/dist/assets/project-router-BMx4e8m-.js +0 -1
- package/web/dist/assets/repo-git-BusYfa3t.js +0 -1
- package/web/dist/assets/run-diff-wOJ3odA-.js +0 -3
- package/web/dist/assets/run-header-Cg5incil.js +0 -1
- package/web/dist/assets/skill-empty-hint-DTUSp6Vl.js +0 -1
- package/web/dist/assets/skills-PpP2owbM.js +0 -1
- package/web/dist/assets/tab-link-F3uQrdm2.js +0 -1
- package/web/dist/assets/task-changes-iD9kS79I.js +0 -1
- package/web/dist/assets/task-commits-COkLaUri.js +0 -1
- package/web/dist/assets/task-files-Ckttz7XH.js +0 -2
- package/web/dist/assets/task-thread-CQD91VPt.js +0 -9
- package/web/dist/assets/textarea-Bj_LCreg.js +0 -1
- package/web/dist/assets/use-desktop-DUh0STzq.js +0 -3
- package/web/dist/assets/utils-B8s5qIcK.js +0 -1
- package/web/dist/assets/workflows-BFk8C0co.js +0 -11
- package/web/dist/assets/zoomable-image-PEDOqyLQ.js +0 -1
- /package/web/{open-mercato.svg → dist/open-mercato.svg} +0 -0
package/dist/todos.js
CHANGED
|
@@ -121,7 +121,7 @@ export async function removeTodo(dataDir, id) {
|
|
|
121
121
|
/** The task text "▶ Run" turns an entry into: the suggested prompt (or the summary when the
|
|
122
122
|
* entry carries none), plus the suggested args as a trailing line. The single server-side
|
|
123
123
|
* source for `POST /api/todos/:id/start`; the cockpit's prefill copy
|
|
124
|
-
* (`web/
|
|
124
|
+
* (`packages/web/src/routes/inbox.tsx`, #374) lives in another process and cannot import this, so
|
|
125
125
|
* the two are pinned to the shared cases in `test/fixtures/todo-task-text.json`. */
|
|
126
126
|
export function todoTaskText(todo) {
|
|
127
127
|
let task = (todo.suggestedPrompt ?? todo.summary).trim() || todo.summary;
|
package/dist/ui-state.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { UiState } from './contract/index.js';
|
|
1
2
|
/**
|
|
2
3
|
* `.ai/cezar/ui-state.json` — small GUI preferences the cockpit persists (files, not a DB).
|
|
3
4
|
* The server owns the schema and the writes (`PUT /api/ui-state` in `src/server/server.ts`);
|
|
@@ -8,5 +9,18 @@
|
|
|
8
9
|
* `{}` — an absent preference, never a throw, never a blocked startup.
|
|
9
10
|
*/
|
|
10
11
|
export declare function uiStatePath(repoRoot: string): string;
|
|
11
|
-
/**
|
|
12
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Read `ui-state.json` on demand — never cached, never throws.
|
|
14
|
+
*
|
|
15
|
+
* Typed by the CONTRACT (`UiState`), not by a loose record: `GET /api/v1/ui-state` answers this
|
|
16
|
+
* value verbatim, so a `Record<string, unknown>` here made the route name no key at all and the
|
|
17
|
+
* per-route parity guard vacuous — the same defect `healthSnapshot` had. `UiState` is a
|
|
18
|
+
* `z.looseObject`, so the index signature (and with it the round-trip promise of
|
|
19
|
+
* BACKWARD_COMPATIBILITY.md §3) survives; what it adds is the NAMES of the keys the server knows.
|
|
20
|
+
*
|
|
21
|
+
* The cast is unchanged in kind — the file is user-editable JSON and is deliberately NOT parsed
|
|
22
|
+
* through the schema, because a single malformed pref must not discard the whole bag (§3). What
|
|
23
|
+
* the type asserts is the wire shape the route promises; the write side (`PUT /ui-state`, validated
|
|
24
|
+
* by `uiStateBody`) is what actually enforces it.
|
|
25
|
+
*/
|
|
26
|
+
export declare function readUiState(repoRoot: string): Promise<UiState>;
|
package/dist/ui-state.js
CHANGED
|
@@ -12,7 +12,20 @@ import { join } from 'node:path';
|
|
|
12
12
|
export function uiStatePath(repoRoot) {
|
|
13
13
|
return join(repoRoot, '.ai/cezar', 'ui-state.json');
|
|
14
14
|
}
|
|
15
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* Read `ui-state.json` on demand — never cached, never throws.
|
|
17
|
+
*
|
|
18
|
+
* Typed by the CONTRACT (`UiState`), not by a loose record: `GET /api/v1/ui-state` answers this
|
|
19
|
+
* value verbatim, so a `Record<string, unknown>` here made the route name no key at all and the
|
|
20
|
+
* per-route parity guard vacuous — the same defect `healthSnapshot` had. `UiState` is a
|
|
21
|
+
* `z.looseObject`, so the index signature (and with it the round-trip promise of
|
|
22
|
+
* BACKWARD_COMPATIBILITY.md §3) survives; what it adds is the NAMES of the keys the server knows.
|
|
23
|
+
*
|
|
24
|
+
* The cast is unchanged in kind — the file is user-editable JSON and is deliberately NOT parsed
|
|
25
|
+
* through the schema, because a single malformed pref must not discard the whole bag (§3). What
|
|
26
|
+
* the type asserts is the wire shape the route promises; the write side (`PUT /ui-state`, validated
|
|
27
|
+
* by `uiStateBody`) is what actually enforces it.
|
|
28
|
+
*/
|
|
16
29
|
export async function readUiState(repoRoot) {
|
|
17
30
|
try {
|
|
18
31
|
const parsed = JSON.parse(await readFile(uiStatePath(repoRoot), 'utf8'));
|
package/dist/ui-state.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui-state.js","sourceRoot":"","sources":["../src/ui-state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"ui-state.js","sourceRoot":"","sources":["../src/ui-state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGjC;;;;;;;;GAQG;AACH,MAAM,UAAU,WAAW,CAAC,QAAgB;IAC1C,OAAO,IAAI,CAAC,QAAQ,EAAE,WAAW,EAAE,eAAe,CAAC,CAAC;AACtD,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,QAAgB;IAChD,IAAI,CAAC;QACH,MAAM,MAAM,GAAY,IAAI,CAAC,KAAK,CAAC,MAAM,QAAQ,CAAC,WAAW,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;QAClF,OAAO,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAE,MAAkB,CAAC,CAAC,CAAC,EAAE,CAAC;IACzE,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC"}
|
package/dist/workflows/load.d.ts
CHANGED
package/dist/workflows/run.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { RunnerId } from '../core/agent-runner.
|
|
2
|
-
import type { ContentBlock } from '../core/agent-runner.
|
|
3
|
-
import { type Skill } from '../skills.
|
|
4
|
-
import type { QueuedMessage, RunRecord, RunStore } from '../runs/store.
|
|
5
|
-
import { WorkspaceSemaphore } from '../workspace/semaphore.
|
|
6
|
-
import { type WorkflowDef } from './types.
|
|
1
|
+
import type { RunnerId } from '../core/agent-runner.ts';
|
|
2
|
+
import type { ContentBlock } from '../core/agent-runner.ts';
|
|
3
|
+
import { type Skill } from '../skills.ts';
|
|
4
|
+
import type { QueuedMessage, RunRecord, RunStore } from '../runs/store.ts';
|
|
5
|
+
import { WorkspaceSemaphore } from '../workspace/semaphore.ts';
|
|
6
|
+
import { type WorkflowDef } from './types.ts';
|
|
7
7
|
/** An interactive session that hears nothing from the user closes itself. */
|
|
8
8
|
export declare const IDLE_TIMEOUT_MS: number;
|
|
9
9
|
/**
|
|
@@ -25,6 +25,10 @@ export interface StartRunInput {
|
|
|
25
25
|
model?: string;
|
|
26
26
|
/** Agent backend chosen for this task (GUI). Unset = the config default. */
|
|
27
27
|
runner?: RunnerId;
|
|
28
|
+
/** Agent account for this task (spec 2026-07-29-agent-profiles), applying to steps that run
|
|
29
|
+
* on `runner`. Unset = the project's own selection. Persisted on the record so the choice
|
|
30
|
+
* survives into resume and Continue, and so the thread can say which account did the work. */
|
|
31
|
+
agentProfile?: string;
|
|
28
32
|
/** Screenshots pasted into the new-task form — persisted when the run is
|
|
29
33
|
* created and delivered once, with the first agent step's opening message. */
|
|
30
34
|
images?: ContentBlock[];
|
|
@@ -33,9 +37,8 @@ export interface StartRunInput {
|
|
|
33
37
|
* `resolveExtraSystemPrompt` for the precedence contract. */
|
|
34
38
|
systemPrompt?: string;
|
|
35
39
|
/** Composer opt-out (#worktree-toggle): `false` runs the task in the repo
|
|
36
|
-
* working tree instead of an isolated worktree
|
|
37
|
-
*
|
|
38
|
-
* Ignored for variants (they always isolate). */
|
|
40
|
+
* working tree instead of an isolated worktree. Undefined/`true` keeps the
|
|
41
|
+
* default per-task worktree. Ignored for variants (they always isolate). */
|
|
39
42
|
worktree?: boolean;
|
|
40
43
|
/** Autonomous mode (#autonomous): the run never parks at `waiting` for the
|
|
41
44
|
* user — turn-ends auto-continue until the agent signals done or the safety
|
|
@@ -123,7 +126,13 @@ export declare class RunManager {
|
|
|
123
126
|
private readonly queue;
|
|
124
127
|
private readonly starting;
|
|
125
128
|
private readonly waiting;
|
|
129
|
+
/** Durable monitoring subset. Only the configured number receives the waiting-slot exemption. */
|
|
130
|
+
private readonly monitoring;
|
|
126
131
|
private readonly pendingJobs;
|
|
132
|
+
/** Interrupted agent turns recovered after a process restart. Unlike an
|
|
133
|
+
* explicit user Continue, these are bulk scheduler work and must re-enter
|
|
134
|
+
* through `pump()` so both workspace and per-project caps are honored. */
|
|
135
|
+
private readonly pendingContinuations;
|
|
127
136
|
/** Per-run image counter behind `pasted-<n>` / `screenshot-<n>` (#472). Lives on
|
|
128
137
|
* the manager rather than the `ActiveRun` so a *queued* run — which has no
|
|
129
138
|
* `ActiveRun` at all — can persist attachments. Seeded lazily from disk. */
|
|
@@ -188,6 +197,25 @@ export declare class RunManager {
|
|
|
188
197
|
* write follow-ups into the parent's inbox despite the opt-out. Empty is the
|
|
189
198
|
* established "absent" spelling — consumers guard with `if (todosFile)`. */
|
|
190
199
|
private agentEnv;
|
|
200
|
+
/**
|
|
201
|
+
* `agentEnv` plus the agent-account variable for the profile this STEP runs under (spec
|
|
202
|
+
* 2026-07-29-agent-profiles), and the id it resolved to so the caller can record it.
|
|
203
|
+
*
|
|
204
|
+
* Resolved per step, not per run, because a workflow can mix backends: an override naming a
|
|
205
|
+
* Claude account says nothing about which Codex account a codex step should use. Resolution
|
|
206
|
+
* order, most specific first:
|
|
207
|
+
*
|
|
208
|
+
* 1. the step's ALREADY-RECORDED `profileId` — a resume or Continue must reattach to the
|
|
209
|
+
* account that created the session, whatever the project has since been switched to;
|
|
210
|
+
* 2. the run's composer override, but only for steps on the run's own runner;
|
|
211
|
+
* 3. the project's stored selection, and failing that the discovered default.
|
|
212
|
+
*
|
|
213
|
+
* Read fresh every time. `~/.cezar/config.json` is shared by every cezar process on this
|
|
214
|
+
* machine, so a cached snapshot is a staleness bug, and one small JSON read is free next to
|
|
215
|
+
* spawning a CLI. Never throws: an unreadable home degrades to the default profile, which is
|
|
216
|
+
* exactly the behaviour that predates profiles.
|
|
217
|
+
*/
|
|
218
|
+
private agentEnvForStep;
|
|
191
219
|
startRun(workflow: WorkflowDef, input: StartRunInput, group?: {
|
|
192
220
|
groupId: string;
|
|
193
221
|
variant: string;
|
|
@@ -295,12 +323,18 @@ export declare class RunManager {
|
|
|
295
323
|
* bound — asserted directly by a test.
|
|
296
324
|
*/
|
|
297
325
|
private hydrateQueuedInput;
|
|
326
|
+
/** Apply edits and messages made while a restart continuation waits for
|
|
327
|
+
* capacity. The durable record remains the source of truth, just as it is for
|
|
328
|
+
* an ordinary queued workflow (#472), so a second restart reconstructs and
|
|
329
|
+
* hydrates the same amendments instead of dropping them. */
|
|
330
|
+
private hydrateQueuedContinuation;
|
|
331
|
+
private readPersistedImages;
|
|
298
332
|
/**
|
|
299
333
|
* Still waiting for a slot? Checked against the engine's own queue rather than
|
|
300
334
|
* the record's `status` (#472): the record is written by `execute()` a tick
|
|
301
335
|
* after `pump()` dequeues, so a status read can see `queued` for a run that has
|
|
302
|
-
* already started.
|
|
303
|
-
* the authoritative answer for "can this prompt still be amended".
|
|
336
|
+
* already started. The pending maps are deleted synchronously at dequeue, so
|
|
337
|
+
* they are the authoritative answer for "can this prompt still be amended".
|
|
304
338
|
*/
|
|
305
339
|
private isQueued;
|
|
306
340
|
/** Split `ContentBlock[]` into the persisted shape a stacked message holds. */
|
|
@@ -351,6 +385,9 @@ export declare class RunManager {
|
|
|
351
385
|
* then offers "Continue" instead.
|
|
352
386
|
*/
|
|
353
387
|
sendMessage(runId: string, content: ContentBlock[]): boolean;
|
|
388
|
+
/** Shared live-session delivery. Synthetic scheduler prompts reuse lifecycle
|
|
389
|
+
* bookkeeping without masquerading as user-authored transcript messages. */
|
|
390
|
+
private deliverMessage;
|
|
354
391
|
/** Close the open session gracefully — the run then completes as `done`
|
|
355
392
|
* (or rests at `review` when the worktree holds changes, spec 009).
|
|
356
393
|
* On a run already resting at `review` (no session — the engine loop is
|
|
@@ -368,7 +405,10 @@ export declare class RunManager {
|
|
|
368
405
|
images?: ContentBlock[];
|
|
369
406
|
runner?: RunnerId;
|
|
370
407
|
model?: string;
|
|
371
|
-
}
|
|
408
|
+
},
|
|
409
|
+
/** Restart recovery may discover several interrupted tasks at once. Those
|
|
410
|
+
* continuations are queued; an explicit user Continue remains immediate. */
|
|
411
|
+
deferForCapacity?: boolean): {
|
|
372
412
|
ok: boolean;
|
|
373
413
|
error?: string;
|
|
374
414
|
};
|
|
@@ -389,6 +429,17 @@ export declare class RunManager {
|
|
|
389
429
|
/** Native backend asks arrive before turn-end. Persist and park immediately
|
|
390
430
|
* so the cockpit shows attention and the run releases its workspace slot. */
|
|
391
431
|
private handleRunnerUiEvent;
|
|
432
|
+
/** Persist the invocation checkpoint before launching a runner. A throw or
|
|
433
|
+
* process exit before `turn.started` therefore leaves a durable mismatch. */
|
|
434
|
+
private beginUsageInvocation;
|
|
435
|
+
/** Fold backend-neutral completed-turn usage into the current step exactly
|
|
436
|
+
* once. Invocation/turn counters are written before the event reaches the
|
|
437
|
+
* NDJSON sink so crashes cannot preserve a falsely complete subtotal. */
|
|
438
|
+
private recordUsageUiEvent;
|
|
439
|
+
/** Usage completeness is a crash boundary, unlike high-frequency token
|
|
440
|
+
* snapshots: the checkpoint must reach `runs.json` before the runner starts
|
|
441
|
+
* or the matching UI event is persisted and forwarded. */
|
|
442
|
+
private persistUsageCheckpoint;
|
|
392
443
|
/**
|
|
393
444
|
* Turn-end bookkeeping (#389), shared by `runAgentStep` and
|
|
394
445
|
* `runContinuation` — called (fire-and-forget) from every `turn-end` event:
|
|
@@ -464,6 +515,9 @@ export declare class RunManager {
|
|
|
464
515
|
private persistImage;
|
|
465
516
|
private armIdleTimer;
|
|
466
517
|
private clearIdleTimer;
|
|
518
|
+
private reconcileMonitoringWakeTimers;
|
|
519
|
+
private armMonitoringWakeTimer;
|
|
520
|
+
private clearMonitoringWakeTimer;
|
|
467
521
|
/** Autosave-commit the worktree every 90 s while the run lives (spec 006).
|
|
468
522
|
* Opt-in via CEZ_AUTOSAVE=1 (#471) — see periodicAutosaveEnabled. */
|
|
469
523
|
private armAutosave;
|
|
@@ -492,3 +546,13 @@ export declare function makeRunTitle(task: string, workflow: WorkflowDef): strin
|
|
|
492
546
|
* they are materialized into the worktree separately (see the call site).
|
|
493
547
|
*/
|
|
494
548
|
export declare function skillSystemPrompt(skill: Pick<Skill, 'name' | 'description' | 'body'> & Partial<Pick<Skill, 'path' | 'source'>>): string;
|
|
549
|
+
/**
|
|
550
|
+
* Expand a registry-backed slash skill in a live chat message before it reaches
|
|
551
|
+
* a backend. Claude otherwise intercepts an unknown leading slash command, and
|
|
552
|
+
* Codex/OpenCode have no native slash-skill lookup at all (#676).
|
|
553
|
+
*
|
|
554
|
+
* Only the first text block is eligible, only at character zero, and unknown
|
|
555
|
+
* commands pass through byte-for-byte. The caller persists the original user
|
|
556
|
+
* content before applying this delivery-only rewrite.
|
|
557
|
+
*/
|
|
558
|
+
export declare function expandRegistrySlashSkill(content: ContentBlock[], skills: readonly Skill[]): ContentBlock[];
|