@open-mercato/cezar 0.9.1 → 0.9.2-pr772.1071
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 +36 -17
- 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 +1614 -0
- package/dist/contract/projects.d.ts +185 -0
- package/dist/contract/repo.d.ts +234 -0
- package/dist/contract/runs.d.ts +1261 -0
- package/dist/contract/skills.d.ts +229 -0
- package/dist/contract/workflows.d.ts +212 -0
- package/dist/contract/workspace.d.ts +490 -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/core/usage-limit.d.ts +42 -0
- package/dist/core/usage-limit.js +209 -0
- package/dist/core/usage-limit.js.map +1 -0
- 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 +149 -336
- package/dist/runs/store.js +187 -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 +12128 -47
- package/dist/server/server.js +2652 -917
- 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 +238 -12
- package/dist/workflows/run.js +1103 -115
- 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 +82 -206
- package/dist/workspace/config.js +183 -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 +45 -0
- package/dist/workspace/semaphore.js +45 -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 +59 -1
- package/scripts/sync-readme.mjs +20 -0
- package/web/dist/assets/alert-dialog-LMDsWZ8t.js +1 -0
- package/web/dist/assets/arrow-down-CDJD8f8N.js +1 -0
- package/web/dist/assets/arrow-left-DUirK4gC.js +1 -0
- package/web/dist/assets/bundle-mjs-BT31bpU6.js +1 -0
- package/web/dist/assets/centered-state-CX0EhxaQ.js +43 -0
- package/web/dist/assets/chevron-right-B70aoBYh.js +1 -0
- package/web/dist/assets/{chunk-BO2N2NFS-DtrdTCWa.js → chunk-BO2N2NFS-DE6qKn3r.js} +8 -8
- package/web/dist/assets/circle-check-C6IhUojk.js +1 -0
- package/web/dist/assets/circle-x-hV9f6Ypp.js +1 -0
- package/web/dist/assets/collapsible-D2igywSh.js +1 -0
- package/web/dist/assets/commit-list-ocsM8XZs.js +1 -0
- package/web/dist/assets/compare-variants-CYdYsQBv.js +1 -0
- package/web/dist/assets/{core-DePtBHcl.js → core-BCsw8oQw.js} +1 -1
- package/web/dist/assets/diff-3y-HnHEH.js +3 -0
- package/web/dist/assets/diff-stat-OeTa1MCD.js +1 -0
- package/web/dist/assets/{diff-view-DCeSegKk.js → diff-view-D8VBKGxl.js} +4 -4
- package/web/dist/assets/dropdown-menu-B9UHiJFv.js +1 -0
- package/web/dist/assets/editable-title-C9aK-GCt.js +1 -0
- package/web/dist/assets/{ellipsis-vertical-CNnSLn5a.js → ellipsis-vertical-BVp0AyW4.js} +1 -1
- package/web/dist/assets/{file-D4GBh1ao.js → file-D1v6Cb9Q.js} +1 -1
- package/web/dist/assets/folder-HNaOtP70.js +1 -0
- package/web/dist/assets/{git-pull-request-DnR8Xh4_.js → git-pull-request-C6KuSF45.js} +1 -1
- package/web/dist/assets/git-toolbar-DpRPWLaM.js +1 -0
- package/web/dist/assets/github-UumAmuAM.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-M1y8lBCU.js +1 -0
- package/web/dist/assets/index-BNgqhk51.js +6 -0
- package/web/dist/assets/index-De7KdVHL.css +2 -0
- package/web/dist/assets/lib-BQXq3kEf.js +1 -0
- package/web/dist/assets/lib-BxQXEXDF.js +1 -0
- package/web/dist/assets/markdown-DfljSy6W.js +2 -0
- package/web/dist/assets/mermaid-GHXKKRXX-C4jxqUUb.js +1 -0
- package/web/dist/assets/new-task-form-CkgsW8GC.js +1 -0
- package/web/dist/assets/pill-DWy7Dbv3.js +1 -0
- package/web/dist/assets/project-router-BJR_8pfk.js +1 -0
- package/web/dist/assets/prompt-templates-CKbMbly-.js +15 -0
- package/web/dist/assets/react-runtime-CCIEwYL0.js +9 -0
- package/web/dist/assets/{refresh-cw-BT8E96Tm.js → refresh-cw-Bs4wU0JM.js} +1 -1
- package/web/dist/assets/repo-git-CBbpvexr.js +1 -0
- package/web/dist/assets/rolldown-runtime-QTnfLwEv.js +1 -0
- package/web/dist/assets/run-diff-CzrO-R7P.js +3 -0
- package/web/dist/assets/run-header-BQDPFKUM.js +1 -0
- package/web/dist/assets/{search-x-BDjaMrzG.js → search-x-sxnYXz0H.js} +1 -1
- package/web/dist/assets/skill-empty-hint-CMfCEn9L.js +1 -0
- package/web/dist/assets/skills-BiWfHmCR.js +1 -0
- package/web/dist/assets/skills-DrG0KcAJ.js +1 -0
- package/web/dist/assets/sparkles-CL1cbhb_.js +1 -0
- package/web/dist/assets/{square-terminal-Ckjjn0vb.js → square-terminal-5JEPtGG-.js} +1 -1
- package/web/dist/assets/tab-link-DVT33Q2m.js +1 -0
- package/web/dist/assets/task-changes-BuuNjQ_C.js +1 -0
- package/web/dist/assets/task-commits-CVjZWXuP.js +1 -0
- package/web/dist/assets/task-files-f7USaQD1.js +2 -0
- package/web/dist/assets/task-thread-Cc7rMyer.js +9 -0
- package/web/dist/assets/textarea-BieGhkR-.js +1 -0
- package/web/dist/assets/thread-loading-CwfY_3r7.js +1 -0
- package/web/dist/assets/{trash-2-DAyZ0VSi.js → trash-2-Cmbuh3Q9.js} +1 -1
- package/web/dist/assets/{triangle-alert-Uy8rokUh.js → triangle-alert-dswtPk4F.js} +1 -1
- package/web/dist/assets/{upload-CDdyPPo_.js → upload-BY1qMAxW.js} +1 -1
- package/web/dist/assets/use-desktop-DrxT9b31.js +1 -0
- package/web/dist/assets/use-submit-shortcut-CULpfw9y.js +1 -0
- package/web/dist/assets/utils-C5bzdO9U.js +64 -0
- package/web/dist/assets/workflows-D6GsX0A9.js +11 -0
- package/web/dist/assets/zoomable-image-CEjRqsuW.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
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent profiles — a second (third, …) login of the SAME agent CLI.
|
|
3
|
+
*
|
|
4
|
+
* The binary never changes; only the environment does. `CLAUDE_CONFIG_DIR=~/.claude-klaudiusz claude`
|
|
5
|
+
* is the same Claude Code talking to a different account, because that one variable relocates the
|
|
6
|
+
* agent's ENTIRE per-user home: credentials, settings, projects and — the part that bites —
|
|
7
|
+
* `sessions/`, so a session id only means something inside the dir it was created in.
|
|
8
|
+
*
|
|
9
|
+
* This module is the single maintenance surface for that vendor knowledge, and it is deliberately
|
|
10
|
+
* the SIBLING of `src/agent-config/catalog.ts` rather than part of it: the catalog owns config
|
|
11
|
+
* *file* knowledge (paths, formats, verbatim precedence strings), this owns the *home-relocation*
|
|
12
|
+
* variable. Splitting them also keeps the layering honest — `agent-config/` may import `paths.ts`,
|
|
13
|
+
* while this is imported BY the runners, provider auth and the terminal handoff.
|
|
14
|
+
*
|
|
15
|
+
* Pure by construction: no filesystem, no `process.env`, nothing to stub. Resolution against the
|
|
16
|
+
* workspace config lives in `src/workspace/agent-profiles.ts`.
|
|
17
|
+
*
|
|
18
|
+
* Facts verified against the shipped CLIs on 2026-07-29.
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
21
|
+
* Which env var relocates each agent's whole per-user home.
|
|
22
|
+
*
|
|
23
|
+
* `null` means the agent has no such variable and therefore cannot carry profiles:
|
|
24
|
+
*
|
|
25
|
+
* - **claude** → `CLAUDE_CONFIG_DIR`. Documented; moves credentials, settings, projects, sessions.
|
|
26
|
+
* - **codex** → `CODEX_HOME`. Documented; `auth.json` lives inside it, so identity moves too.
|
|
27
|
+
* - **opencode** → nothing usable. `OPENCODE_CONFIG_DIR`/`OPENCODE_CONFIG` move CONFIG ONLY;
|
|
28
|
+
* credentials live in `~/.local/share/opencode/opencode.db`, behind a separate `OPENCODE_DB`.
|
|
29
|
+
* A config-dir-only profile would swap settings while still billing the other account — the UI
|
|
30
|
+
* would say "Work" and the run would not be — so OpenCode is unsupported until it documents a
|
|
31
|
+
* single home variable. `XDG_CONFIG_HOME` is rejected regardless: it is machine-wide and would
|
|
32
|
+
* relocate every other XDG-aware tool the agent's own Bash calls touch.
|
|
33
|
+
*/
|
|
34
|
+
export const PROFILE_ENV_VAR = {
|
|
35
|
+
claude: 'CLAUDE_CONFIG_DIR',
|
|
36
|
+
codex: 'CODEX_HOME',
|
|
37
|
+
opencode: null,
|
|
38
|
+
};
|
|
39
|
+
/** Providers that can carry more than one account — what the UI offers "Add account" for. */
|
|
40
|
+
export const PROFILE_CAPABLE_PROVIDERS = Object.keys(PROFILE_ENV_VAR).filter((provider) => PROFILE_ENV_VAR[provider] !== null);
|
|
41
|
+
export function supportsProfiles(provider) {
|
|
42
|
+
return PROFILE_ENV_VAR[provider] !== null;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* The env a spawned agent needs to run under `configDir`, or `{}` for the default profile.
|
|
46
|
+
*
|
|
47
|
+
* `{}` is load-bearing, not a convenience: `buildChildEnv` applies `extraEnv` AFTER its allowlist
|
|
48
|
+
* and so bypasses it entirely, which makes this function the only thing standing between a
|
|
49
|
+
* profile and the child environment. Returning nothing for the zero-config case means the
|
|
50
|
+
* overwhelmingly common path adds literally no variable — the same environment cezar has always
|
|
51
|
+
* spawned. It also means this can never emit one provider's variable for another provider's
|
|
52
|
+
* process: the name comes from `PROFILE_ENV_VAR[provider]` and nowhere else.
|
|
53
|
+
*/
|
|
54
|
+
export function profileEnv(provider, configDir) {
|
|
55
|
+
const name = PROFILE_ENV_VAR[provider];
|
|
56
|
+
const dir = configDir?.trim();
|
|
57
|
+
if (name === null || !dir)
|
|
58
|
+
return {};
|
|
59
|
+
return { [name]: dir };
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Does `entries` look like a config dir this provider actually wrote?
|
|
63
|
+
*
|
|
64
|
+
* ADVISORY, never a gate. The honest first-run flow for a second account is *add the profile →
|
|
65
|
+
* Connect → the CLI creates the dir on login*, so refusing an unrecognized directory would break
|
|
66
|
+
* the very case the feature exists for. The answer drives a warning line in the UI, nothing more.
|
|
67
|
+
*
|
|
68
|
+
* Takes the directory listing rather than a path so it stays pure; the caller reads the dir.
|
|
69
|
+
*/
|
|
70
|
+
export function looksLikeProfileDir(provider, entries) {
|
|
71
|
+
const present = new Set(entries);
|
|
72
|
+
const markers = PROFILE_DIR_MARKERS[provider];
|
|
73
|
+
return markers.some((marker) => present.has(marker));
|
|
74
|
+
}
|
|
75
|
+
/** What each agent drops into its home on first login. Any one is enough. */
|
|
76
|
+
const PROFILE_DIR_MARKERS = {
|
|
77
|
+
// `.claude.json` sits INSIDE the dir once it is overridden (see `claudeStateFilePath`), which
|
|
78
|
+
// is exactly the case being probed here.
|
|
79
|
+
claude: ['.claude.json', 'settings.json', 'projects', 'sessions'],
|
|
80
|
+
codex: ['auth.json', 'config.toml'],
|
|
81
|
+
opencode: [],
|
|
82
|
+
};
|
|
83
|
+
//# sourceMappingURL=agent-profiles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-profiles.js","sourceRoot":"","sources":["../../src/core/agent-profiles.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;GAkBG;AAEH;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,eAAe,GAAsC;IAChE,MAAM,EAAE,mBAAmB;IAC3B,KAAK,EAAE,YAAY;IACnB,QAAQ,EAAE,IAAI;CACf,CAAC;AAEF,6FAA6F;AAC7F,MAAM,CAAC,MAAM,yBAAyB,GACpC,MAAM,CAAC,IAAI,CAAC,eAAe,CAC5B,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,eAAe,CAAC,QAAQ,CAAC,KAAK,IAAI,CAAC,CAAC;AAE3D,MAAM,UAAU,gBAAgB,CAAC,QAAoB;IACnD,OAAO,eAAe,CAAC,QAAQ,CAAC,KAAK,IAAI,CAAC;AAC5C,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,UAAU,CAAC,QAAoB,EAAE,SAAoC;IACnF,MAAM,IAAI,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAC;IACvC,MAAM,GAAG,GAAG,SAAS,EAAE,IAAI,EAAE,CAAC;IAC9B,IAAI,IAAI,KAAK,IAAI,IAAI,CAAC,GAAG;QAAE,OAAO,EAAE,CAAC;IACrC,OAAO,EAAE,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;AACzB,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,mBAAmB,CAAC,QAAoB,EAAE,OAA0B;IAClF,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC;IACjC,MAAM,OAAO,GAAG,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IAC9C,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;AACvD,CAAC;AAED,6EAA6E;AAC7E,MAAM,mBAAmB,GAA0C;IACjE,8FAA8F;IAC9F,yCAAyC;IACzC,MAAM,EAAE,CAAC,cAAc,EAAE,eAAe,EAAE,UAAU,EAAE,UAAU,CAAC;IACjE,KAAK,EAAE,CAAC,WAAW,EAAE,aAAa,CAAC;IACnC,QAAQ,EAAE,EAAE;CACb,CAAC"}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* - `codex` — `codex app-server`, JSON-RPC 2.0 (JSONL) over stdin/stdout;
|
|
11
11
|
* - `opencode` — `opencode serve`, HTTP + SSE.
|
|
12
12
|
*/
|
|
13
|
-
import type { UiEvent } from './ui-events.
|
|
13
|
+
import type { UiEvent } from './ui-events.ts';
|
|
14
14
|
/** `claude-cli` is the legacy id kept so old run records still parse. */
|
|
15
15
|
export type AgentBackend = 'claude' | 'codex' | 'opencode' | 'claude-cli';
|
|
16
16
|
/** The user-selectable runners (what config/GUI expose). */
|
|
@@ -58,6 +58,17 @@ export interface AgentRunSpec {
|
|
|
58
58
|
* v2: claude = `--append-system-prompt`, codex/opencode = prepended here).
|
|
59
59
|
*/
|
|
60
60
|
export declare function prependSystemPrompt(systemPrompt: string | undefined, userPrompt: string): string;
|
|
61
|
+
/**
|
|
62
|
+
* True for the `128 + signal` exit codes an agent CLI reports when it handles
|
|
63
|
+
* a stop signal itself instead of dying from it (SIGINT/SIGKILL/SIGTERM).
|
|
64
|
+
*
|
|
65
|
+
* Every runner arms a SIGTERM→SIGKILL watchdog on `end()` and signals on
|
|
66
|
+
* `interrupt()` (#703): the CLIs install their own handlers, so a session the
|
|
67
|
+
* runner tore down on purpose comes back as a NON-ZERO exit. Paired with a
|
|
68
|
+
* "we sent the signal" flag, this predicate keeps that teardown out of the
|
|
69
|
+
* error path — an exit cezar caused is never an agent failure.
|
|
70
|
+
*/
|
|
71
|
+
export declare function isSignalTerminationExit(exitCode: number | null): boolean;
|
|
61
72
|
/** One content block of a user message — mirrors the Anthropic wire format
|
|
62
73
|
* so it can be written to the claude CLI's stdin verbatim. */
|
|
63
74
|
export type ContentBlock = {
|
|
@@ -20,4 +20,17 @@ export const RUNNER_IDS = ['claude', 'codex', 'opencode'];
|
|
|
20
20
|
export function prependSystemPrompt(systemPrompt, userPrompt) {
|
|
21
21
|
return systemPrompt ? `${systemPrompt}\n\n---\n\n${userPrompt}` : userPrompt;
|
|
22
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* True for the `128 + signal` exit codes an agent CLI reports when it handles
|
|
25
|
+
* a stop signal itself instead of dying from it (SIGINT/SIGKILL/SIGTERM).
|
|
26
|
+
*
|
|
27
|
+
* Every runner arms a SIGTERM→SIGKILL watchdog on `end()` and signals on
|
|
28
|
+
* `interrupt()` (#703): the CLIs install their own handlers, so a session the
|
|
29
|
+
* runner tore down on purpose comes back as a NON-ZERO exit. Paired with a
|
|
30
|
+
* "we sent the signal" flag, this predicate keeps that teardown out of the
|
|
31
|
+
* error path — an exit cezar caused is never an agent failure.
|
|
32
|
+
*/
|
|
33
|
+
export function isSignalTerminationExit(exitCode) {
|
|
34
|
+
return exitCode === 130 || exitCode === 137 || exitCode === 143;
|
|
35
|
+
}
|
|
23
36
|
//# sourceMappingURL=agent-runner.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-runner.js","sourceRoot":"","sources":["../../src/core/agent-runner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AASH,MAAM,CAAC,MAAM,UAAU,GAAwB,CAAC,QAAQ,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;AAsC/E;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CAAC,YAAgC,EAAE,UAAkB;IACtF,OAAO,YAAY,CAAC,CAAC,CAAC,GAAG,YAAY,cAAc,UAAU,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC;AAC/E,CAAC"}
|
|
1
|
+
{"version":3,"file":"agent-runner.js","sourceRoot":"","sources":["../../src/core/agent-runner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AASH,MAAM,CAAC,MAAM,UAAU,GAAwB,CAAC,QAAQ,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;AAsC/E;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CAAC,YAAgC,EAAE,UAAkB;IACtF,OAAO,YAAY,CAAC,CAAC,CAAC,GAAG,YAAY,cAAc,UAAU,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC;AAC/E,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,uBAAuB,CAAC,QAAuB;IAC7D,OAAO,QAAQ,KAAK,GAAG,IAAI,QAAQ,KAAK,GAAG,IAAI,QAAQ,KAAK,GAAG,CAAC;AAClE,CAAC"}
|
package/dist/core/ask.d.ts
CHANGED
|
@@ -17,142 +17,52 @@ import { z } from 'zod';
|
|
|
17
17
|
export declare const askOptionSchema: z.ZodObject<{
|
|
18
18
|
label: z.ZodString;
|
|
19
19
|
description: z.ZodOptional<z.ZodString>;
|
|
20
|
-
},
|
|
21
|
-
label: string;
|
|
22
|
-
description?: string | undefined;
|
|
23
|
-
}, {
|
|
24
|
-
label: string;
|
|
25
|
-
description?: string | undefined;
|
|
26
|
-
}>;
|
|
20
|
+
}, z.core.$strict>;
|
|
27
21
|
export declare const askQuestionSchema: z.ZodObject<{
|
|
28
|
-
/** Stable key for the answer; defaults to the array index when omitted. */
|
|
29
22
|
id: z.ZodOptional<z.ZodString>;
|
|
30
|
-
/** ≤12-char chip label (matches AskUserQuestion's `header`). */
|
|
31
23
|
header: z.ZodString;
|
|
32
24
|
question: z.ZodString;
|
|
33
|
-
options: z.
|
|
25
|
+
options: z.ZodArray<z.ZodObject<{
|
|
34
26
|
label: z.ZodString;
|
|
35
27
|
description: z.ZodOptional<z.ZodString>;
|
|
36
|
-
},
|
|
37
|
-
label: string;
|
|
38
|
-
description?: string | undefined;
|
|
39
|
-
}, {
|
|
40
|
-
label: string;
|
|
41
|
-
description?: string | undefined;
|
|
42
|
-
}>, "many">, {
|
|
43
|
-
label: string;
|
|
44
|
-
description?: string | undefined;
|
|
45
|
-
}[], {
|
|
46
|
-
label: string;
|
|
47
|
-
description?: string | undefined;
|
|
48
|
-
}[]>;
|
|
28
|
+
}, z.core.$strict>>;
|
|
49
29
|
multiSelect: z.ZodOptional<z.ZodBoolean>;
|
|
50
|
-
},
|
|
51
|
-
id?: string | undefined;
|
|
52
|
-
header: string;
|
|
53
|
-
question: string;
|
|
54
|
-
options: {
|
|
55
|
-
label: string;
|
|
56
|
-
description?: string | undefined;
|
|
57
|
-
}[];
|
|
58
|
-
multiSelect?: boolean | undefined;
|
|
59
|
-
}, {
|
|
60
|
-
id?: string | undefined;
|
|
61
|
-
header: string;
|
|
62
|
-
question: string;
|
|
63
|
-
options: {
|
|
64
|
-
label: string;
|
|
65
|
-
description?: string | undefined;
|
|
66
|
-
}[];
|
|
67
|
-
multiSelect?: boolean | undefined;
|
|
68
|
-
}>;
|
|
30
|
+
}, z.core.$strict>;
|
|
69
31
|
export declare const askRequestSchema: z.ZodObject<{
|
|
70
|
-
questions: z.
|
|
71
|
-
/** Stable key for the answer; defaults to the array index when omitted. */
|
|
32
|
+
questions: z.ZodArray<z.ZodObject<{
|
|
72
33
|
id: z.ZodOptional<z.ZodString>;
|
|
73
|
-
/** ≤12-char chip label (matches AskUserQuestion's `header`). */
|
|
74
34
|
header: z.ZodString;
|
|
75
35
|
question: z.ZodString;
|
|
76
|
-
options: z.
|
|
36
|
+
options: z.ZodArray<z.ZodObject<{
|
|
77
37
|
label: z.ZodString;
|
|
78
38
|
description: z.ZodOptional<z.ZodString>;
|
|
79
|
-
},
|
|
80
|
-
label: string;
|
|
81
|
-
description?: string | undefined;
|
|
82
|
-
}, {
|
|
83
|
-
label: string;
|
|
84
|
-
description?: string | undefined;
|
|
85
|
-
}>, "many">, {
|
|
86
|
-
label: string;
|
|
87
|
-
description?: string | undefined;
|
|
88
|
-
}[], {
|
|
89
|
-
label: string;
|
|
90
|
-
description?: string | undefined;
|
|
91
|
-
}[]>;
|
|
39
|
+
}, z.core.$strict>>;
|
|
92
40
|
multiSelect: z.ZodOptional<z.ZodBoolean>;
|
|
93
|
-
},
|
|
94
|
-
|
|
95
|
-
header: string;
|
|
96
|
-
question: string;
|
|
97
|
-
options: {
|
|
98
|
-
label: string;
|
|
99
|
-
description?: string | undefined;
|
|
100
|
-
}[];
|
|
101
|
-
multiSelect?: boolean | undefined;
|
|
102
|
-
}, {
|
|
103
|
-
id?: string | undefined;
|
|
104
|
-
header: string;
|
|
105
|
-
question: string;
|
|
106
|
-
options: {
|
|
107
|
-
label: string;
|
|
108
|
-
description?: string | undefined;
|
|
109
|
-
}[];
|
|
110
|
-
multiSelect?: boolean | undefined;
|
|
111
|
-
}>, "many">, {
|
|
112
|
-
id?: string | undefined;
|
|
113
|
-
header: string;
|
|
114
|
-
question: string;
|
|
115
|
-
options: {
|
|
116
|
-
label: string;
|
|
117
|
-
description?: string | undefined;
|
|
118
|
-
}[];
|
|
119
|
-
multiSelect?: boolean | undefined;
|
|
120
|
-
}[], {
|
|
121
|
-
id?: string | undefined;
|
|
122
|
-
header: string;
|
|
123
|
-
question: string;
|
|
124
|
-
options: {
|
|
125
|
-
label: string;
|
|
126
|
-
description?: string | undefined;
|
|
127
|
-
}[];
|
|
128
|
-
multiSelect?: boolean | undefined;
|
|
129
|
-
}[]>;
|
|
130
|
-
}, "strict", z.ZodTypeAny, {
|
|
131
|
-
questions: {
|
|
132
|
-
id?: string | undefined;
|
|
133
|
-
header: string;
|
|
134
|
-
question: string;
|
|
135
|
-
options: {
|
|
136
|
-
label: string;
|
|
137
|
-
description?: string | undefined;
|
|
138
|
-
}[];
|
|
139
|
-
multiSelect?: boolean | undefined;
|
|
140
|
-
}[];
|
|
141
|
-
}, {
|
|
142
|
-
questions: {
|
|
143
|
-
id?: string | undefined;
|
|
144
|
-
header: string;
|
|
145
|
-
question: string;
|
|
146
|
-
options: {
|
|
147
|
-
label: string;
|
|
148
|
-
description?: string | undefined;
|
|
149
|
-
}[];
|
|
150
|
-
multiSelect?: boolean | undefined;
|
|
151
|
-
}[];
|
|
152
|
-
}>;
|
|
41
|
+
}, z.core.$strict>>;
|
|
42
|
+
}, z.core.$strict>;
|
|
153
43
|
export type AskOption = z.infer<typeof askOptionSchema>;
|
|
154
44
|
export type AskQuestion = z.infer<typeof askQuestionSchema>;
|
|
155
45
|
export type AskRequest = z.infer<typeof askRequestSchema>;
|
|
46
|
+
export interface AskParseIssue {
|
|
47
|
+
code: string;
|
|
48
|
+
path: PropertyKey[];
|
|
49
|
+
message: string;
|
|
50
|
+
}
|
|
51
|
+
/** The diagnostic parse result used at turn-end. The compatibility wrapper
|
|
52
|
+
* below deliberately keeps returning `AskRequest | null`. */
|
|
53
|
+
export type AskMarkerParseResult = {
|
|
54
|
+
kind: 'none';
|
|
55
|
+
} | {
|
|
56
|
+
kind: 'invalid-json';
|
|
57
|
+
message: string;
|
|
58
|
+
} | {
|
|
59
|
+
kind: 'invalid-structure';
|
|
60
|
+
issues: AskParseIssue[];
|
|
61
|
+
} | {
|
|
62
|
+
kind: 'valid';
|
|
63
|
+
request: AskRequest;
|
|
64
|
+
normalized: boolean;
|
|
65
|
+
};
|
|
156
66
|
/**
|
|
157
67
|
* Parse a value into a validated `AskRequest`, or `null` when it does not match
|
|
158
68
|
* (bad counts, over-length header, non-unique labels/questions, extra keys).
|
|
@@ -168,17 +78,28 @@ export declare function parseAskRequest(value: unknown): AskRequest | null;
|
|
|
168
78
|
* to the last `}` at end-of-text.
|
|
169
79
|
*/
|
|
170
80
|
export declare const ASK_MARKER_RE: RegExp;
|
|
81
|
+
/**
|
|
82
|
+
* Parse a trailing marker with an actionable result for diagnostics. A
|
|
83
|
+
* parseable near-valid request gets one bounded normalization pass; structural
|
|
84
|
+
* violations remain rejected so the raw fallback stays readable.
|
|
85
|
+
*/
|
|
86
|
+
export declare function parseAskMarkerResult(turnText: string): AskMarkerParseResult;
|
|
171
87
|
/**
|
|
172
88
|
* Extract and validate a trailing `CEZ:ASK <json>` marker from assembled turn
|
|
173
|
-
* text. Returns
|
|
174
|
-
*
|
|
89
|
+
* text. Returns a strict or safely normalized `AskRequest`, or `null` when
|
|
90
|
+
* there is no marker or its payload remains invalid (caller degrades to plain
|
|
175
91
|
* text — the prose fallback is never made worse).
|
|
176
92
|
*/
|
|
177
93
|
export declare function parseAskMarker(turnText: string): AskRequest | null;
|
|
178
94
|
/**
|
|
179
95
|
* Strip a trailing `CEZ:ASK <json>` marker from one text event so transcripts
|
|
180
|
-
* stay free of protocol noise
|
|
181
|
-
*
|
|
182
|
-
*
|
|
96
|
+
* stay free of protocol noise — but ONLY when the payload actually validates.
|
|
97
|
+
* An invalid payload never becomes an ask card (`parseAskMarker` → `null`), so
|
|
98
|
+
* stripping it would delete the agent's question from the transcript with
|
|
99
|
+
* nothing to replace it; it stays visible as raw text instead — degraded but
|
|
100
|
+
* answerable (the prose fallback is never made worse). Delta backends may split
|
|
101
|
+
* the marker across events — then it stays visible; detection on the assembled
|
|
102
|
+
* turn text is unaffected (same best-effort caveat as the `CEZ:DONE` /
|
|
103
|
+
* `CEZ:MONITORING` strippers).
|
|
183
104
|
*/
|
|
184
105
|
export declare function stripAskMarker(text: string): string;
|
package/dist/core/ask.js
CHANGED
|
@@ -66,32 +66,122 @@ export function parseAskRequest(value) {
|
|
|
66
66
|
* to the last `}` at end-of-text.
|
|
67
67
|
*/
|
|
68
68
|
export const ASK_MARKER_RE = /CEZ:ASK[ \t]+(\{[\s\S]*\})\s*$/;
|
|
69
|
+
/** Looser than `ASK_MARKER_RE` so diagnostics can distinguish a malformed
|
|
70
|
+
* trailing marker from ordinary assistant prose. */
|
|
71
|
+
const ASK_MARKER_CANDIDATE_RE = /CEZ:ASK[ \t]+([\s\S]*)$/;
|
|
72
|
+
function isRecord(value) {
|
|
73
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
74
|
+
}
|
|
75
|
+
function hasOwn(record, key) {
|
|
76
|
+
return Object.prototype.hasOwnProperty.call(record, key);
|
|
77
|
+
}
|
|
69
78
|
/**
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
79
|
+
* Recover only presentation drift that cannot change the user's available
|
|
80
|
+
* choices. Unknown keys are discarded, and the display-only header and option
|
|
81
|
+
* description are clipped to their documented bounds. Counts, required text,
|
|
82
|
+
* types, and uniqueness remain schema-enforced; questions/options are never
|
|
83
|
+
* dropped to manufacture validity.
|
|
74
84
|
*/
|
|
75
|
-
|
|
76
|
-
|
|
85
|
+
function normalizeAskRequest(value) {
|
|
86
|
+
if (!isRecord(value))
|
|
87
|
+
return value;
|
|
88
|
+
const request = {};
|
|
89
|
+
if (!hasOwn(value, 'questions'))
|
|
90
|
+
return request;
|
|
91
|
+
request.questions = Array.isArray(value.questions)
|
|
92
|
+
? value.questions.map((question) => {
|
|
93
|
+
if (!isRecord(question))
|
|
94
|
+
return question;
|
|
95
|
+
const normalized = {};
|
|
96
|
+
for (const key of ['id', 'question', 'multiSelect']) {
|
|
97
|
+
if (hasOwn(question, key))
|
|
98
|
+
normalized[key] = question[key];
|
|
99
|
+
}
|
|
100
|
+
if (hasOwn(question, 'header')) {
|
|
101
|
+
normalized.header =
|
|
102
|
+
typeof question.header === 'string' ? question.header.slice(0, 12) : question.header;
|
|
103
|
+
}
|
|
104
|
+
if (hasOwn(question, 'options')) {
|
|
105
|
+
normalized.options = Array.isArray(question.options)
|
|
106
|
+
? question.options.map((option) => {
|
|
107
|
+
if (!isRecord(option))
|
|
108
|
+
return option;
|
|
109
|
+
const next = {};
|
|
110
|
+
if (hasOwn(option, 'label'))
|
|
111
|
+
next.label = option.label;
|
|
112
|
+
if (hasOwn(option, 'description')) {
|
|
113
|
+
next.description =
|
|
114
|
+
typeof option.description === 'string'
|
|
115
|
+
? option.description.slice(0, 280)
|
|
116
|
+
: option.description;
|
|
117
|
+
}
|
|
118
|
+
return next;
|
|
119
|
+
})
|
|
120
|
+
: question.options;
|
|
121
|
+
}
|
|
122
|
+
return normalized;
|
|
123
|
+
})
|
|
124
|
+
: value.questions;
|
|
125
|
+
return request;
|
|
126
|
+
}
|
|
127
|
+
function issuesOf(error) {
|
|
128
|
+
return error.issues.map((issue) => ({
|
|
129
|
+
code: issue.code,
|
|
130
|
+
path: issue.path,
|
|
131
|
+
message: issue.message,
|
|
132
|
+
}));
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Parse a trailing marker with an actionable result for diagnostics. A
|
|
136
|
+
* parseable near-valid request gets one bounded normalization pass; structural
|
|
137
|
+
* violations remain rejected so the raw fallback stays readable.
|
|
138
|
+
*/
|
|
139
|
+
export function parseAskMarkerResult(turnText) {
|
|
140
|
+
const match = ASK_MARKER_CANDIDATE_RE.exec(turnText.trimEnd());
|
|
77
141
|
if (!match || match[1] === undefined)
|
|
78
|
-
return
|
|
142
|
+
return { kind: 'none' };
|
|
79
143
|
let raw;
|
|
80
144
|
try {
|
|
81
145
|
raw = JSON.parse(match[1]);
|
|
82
146
|
}
|
|
83
|
-
catch {
|
|
84
|
-
return
|
|
147
|
+
catch (error) {
|
|
148
|
+
return {
|
|
149
|
+
kind: 'invalid-json',
|
|
150
|
+
message: error instanceof Error ? error.message : 'invalid JSON',
|
|
151
|
+
};
|
|
85
152
|
}
|
|
86
|
-
|
|
153
|
+
const strict = askRequestSchema.safeParse(raw);
|
|
154
|
+
if (strict.success)
|
|
155
|
+
return { kind: 'valid', request: strict.data, normalized: false };
|
|
156
|
+
const normalized = askRequestSchema.safeParse(normalizeAskRequest(raw));
|
|
157
|
+
if (normalized.success)
|
|
158
|
+
return { kind: 'valid', request: normalized.data, normalized: true };
|
|
159
|
+
return { kind: 'invalid-structure', issues: issuesOf(normalized.error) };
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Extract and validate a trailing `CEZ:ASK <json>` marker from assembled turn
|
|
163
|
+
* text. Returns a strict or safely normalized `AskRequest`, or `null` when
|
|
164
|
+
* there is no marker or its payload remains invalid (caller degrades to plain
|
|
165
|
+
* text — the prose fallback is never made worse).
|
|
166
|
+
*/
|
|
167
|
+
export function parseAskMarker(turnText) {
|
|
168
|
+
const parsed = parseAskMarkerResult(turnText);
|
|
169
|
+
return parsed.kind === 'valid' ? parsed.request : null;
|
|
87
170
|
}
|
|
88
171
|
/**
|
|
89
172
|
* Strip a trailing `CEZ:ASK <json>` marker from one text event so transcripts
|
|
90
|
-
* stay free of protocol noise
|
|
91
|
-
*
|
|
92
|
-
*
|
|
173
|
+
* stay free of protocol noise — but ONLY when the payload actually validates.
|
|
174
|
+
* An invalid payload never becomes an ask card (`parseAskMarker` → `null`), so
|
|
175
|
+
* stripping it would delete the agent's question from the transcript with
|
|
176
|
+
* nothing to replace it; it stays visible as raw text instead — degraded but
|
|
177
|
+
* answerable (the prose fallback is never made worse). Delta backends may split
|
|
178
|
+
* the marker across events — then it stays visible; detection on the assembled
|
|
179
|
+
* turn text is unaffected (same best-effort caveat as the `CEZ:DONE` /
|
|
180
|
+
* `CEZ:MONITORING` strippers).
|
|
93
181
|
*/
|
|
94
182
|
export function stripAskMarker(text) {
|
|
183
|
+
if (parseAskMarker(text) === null)
|
|
184
|
+
return text;
|
|
95
185
|
return text.replace(/\s*CEZ:ASK[ \t]+\{[\s\S]*\}\s*$/, '');
|
|
96
186
|
}
|
|
97
187
|
//# sourceMappingURL=ask.js.map
|
package/dist/core/ask.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ask.js","sourceRoot":"","sources":["../../src/core/ask.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC;KAC7B,MAAM,CAAC;IACN,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;IAChC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;CAC5C,CAAC;KACD,MAAM,EAAE,CAAC;AAEZ,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC;KAC/B,MAAM,CAAC;IACN,2EAA2E;IAC3E,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;IACxC,gEAAgE;IAChE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;IACjC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IACpC,OAAO,EAAE,CAAC;SACP,KAAK,CAAC,eAAe,CAAC;SACtB,GAAG,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AE,CAAC;IAEtF,MAAM,UAAU,GAAG,gBAAgB,CAAC,SAAS,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC,CAAC;IACxE,IAAI,UAAU,CAAC,OAAO;QAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC;IAC7F,OAAO,EAAE,IAAI,EAAE,mBAAmB,EAAE,MAAM,EAAE,QAAQ,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;AAC3E,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,QAAgB;IAC7C,MAAM,MAAM,GAAG,oBAAoB,CAAC,QAAQ,CAAC,CAAC;IAC9C,OAAO,MAAM,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC;AACzD,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,cAAc,CAAC,IAAY;IACzC,IAAI,cAAc,CAAC,IAAI,CAAC,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,iCAAiC,EAAE,EAAE,CAAC,CAAC;AAC7D,CAAC"}
|
|
@@ -15,8 +15,13 @@ async function probeClaude() {
|
|
|
15
15
|
if (process.env.CEZ_DRY_RUN === '1') {
|
|
16
16
|
return { name: 'claude', available: true, version: 'mock (CEZ_DRY_RUN=1)' };
|
|
17
17
|
}
|
|
18
|
+
// `CEZ_CLAUDE_BIN` like every other claude call site (the runner, provider-auth,
|
|
19
|
+
// open-in-app). Probing a bare `claude` reported "not installed" for a host whose
|
|
20
|
+
// only install is at a custom path — which drops claude from the composer and the
|
|
21
|
+
// installer's dependency step even though runs would have worked fine.
|
|
22
|
+
const bin = process.env.CEZ_CLAUDE_BIN ?? 'claude';
|
|
18
23
|
try {
|
|
19
|
-
const { stdout } = await exec(
|
|
24
|
+
const { stdout } = await exec(bin, ['--version'], { timeout: 10_000 });
|
|
20
25
|
const version = stdout.trim();
|
|
21
26
|
// A generic `claude` binary (a shell wrapper, an unrelated tool) can shadow
|
|
22
27
|
// the real CLI on $PATH — reject anything that doesn't match the banner.
|
|
@@ -24,7 +29,7 @@ async function probeClaude() {
|
|
|
24
29
|
return {
|
|
25
30
|
name: 'claude',
|
|
26
31
|
available: false,
|
|
27
|
-
hint:
|
|
32
|
+
hint: `\`${bin}\` resolves but doesn't look like Claude Code (got: ${version.slice(0, 80)})`,
|
|
28
33
|
};
|
|
29
34
|
}
|
|
30
35
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backend-detect.js","sourceRoot":"","sources":["../../src/core/backend-detect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,MAAM,IAAI,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;AASjC;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB;IACrC,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE,UAAU,EAAE,EAAE,aAAa,EAAE,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC;AAC5F,CAAC;AAED,KAAK,UAAU,WAAW;IACxB,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,KAAK,GAAG,EAAE,CAAC;QACpC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,sBAAsB,EAAE,CAAC;IAC9E,CAAC;IACD,IAAI,CAAC;QACH,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"backend-detect.js","sourceRoot":"","sources":["../../src/core/backend-detect.ts"],"names":[],"mappings":"AAAA,OAAO,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YAAE,OAAO,KAAK,CAAC;IAC1B,CAAC;IAAC,MAAM,CAAC;QACP,8BAA8B;IAChC,CAAC;IACD,OAAO,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,IAAI,EAAE,IAAI,IAAI,CAAC;AAClD,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { AgentEvent, AgentRunResult, AgentRunSpec, AgentRunner, AgentSession, SessionOptions } from './agent-runner.
|
|
2
|
-
export type { AgentSession, SessionOptions } from './agent-runner.
|
|
1
|
+
import type { AgentEvent, AgentRunResult, AgentRunSpec, AgentRunner, AgentSession, SessionOptions } from './agent-runner.ts';
|
|
2
|
+
export type { AgentSession, SessionOptions } from './agent-runner.ts';
|
|
3
3
|
/** Default wall-clock cap for a single run before SIGTERM → SIGKILL.
|
|
4
4
|
* Interactive sessions pass `timeoutMs: 0` to disable it entirely. */
|
|
5
5
|
export declare const DEFAULT_RUN_TIMEOUT_MS: number;
|