@wjarka/cezarion 0.17.0 → 0.18.0-dev.5799
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/bin.js +2 -0
- package/cez.js +2 -0
- package/cezarion.js +2 -0
- package/dist/cez.js +2 -0
- package/dist/cezarion.js +2 -0
- package/dist/hsq.js +2 -0
- package/dist/index.js +1 -835
- package/dist/server/app-type.d.ts +1 -6
- package/dist/server/app-type.js +1 -2
- package/hsq.js +2 -0
- package/package.json +20 -59
- package/web/dist/assets/activity-motion-0wHCeUs7.css +1 -0
- package/web/dist/assets/activity-motion-2nE59DAT.js +2 -0
- package/web/dist/assets/activity-route-R9lPc2jy.js +1 -0
- package/web/dist/assets/agent-accounts-f1cxwgfz.js +18 -0
- package/web/dist/assets/alert-dialog-Dj464rjk.js +1 -0
- package/web/dist/assets/arrow-right-Dh_Lx3um.js +1 -0
- package/web/dist/assets/button-CHUAMTHK.js +3 -0
- package/web/dist/assets/centered-state-DGyy0SuA.js +1 -0
- package/web/dist/assets/cez-idle-EVoUsgU3.js +1 -0
- package/web/dist/assets/commit-diff-panel-BJyNYmCY.js +1 -0
- package/web/dist/assets/control-locations-C9II3kPz.js +1 -0
- package/web/dist/assets/design-icons-DmYTv2r1.js +1 -0
- package/web/dist/assets/diff-D_9MtICR.js +3 -0
- package/web/dist/assets/diff-controls-BR2uqhwG.js +1 -0
- package/web/dist/assets/diff-view-xRPxXHXl.js +11 -0
- package/web/dist/assets/dropdown-menu-DhrBcVgr.js +1 -0
- package/web/dist/assets/es2015-D345RR4o.js +41 -0
- package/web/dist/assets/file-preview-D08Kq15E.js +2 -0
- package/web/dist/assets/git-toolbar-D9taioU5.js +1 -0
- package/web/dist/assets/github-bv_pBGc5.js +1 -0
- package/web/dist/assets/github-sidebar-model-B0Ufci5S.js +1 -0
- package/web/dist/assets/global-activity-route-QxTPDyx-.js +1 -0
- package/web/dist/assets/hourglass-B0lPAJvT.js +1 -0
- package/web/dist/assets/{image-preview-C_t9q45f.js → image-preview-Cq1vDiEo.js} +1 -1
- package/web/dist/assets/index-B18AqW0Z.css +1 -0
- package/web/dist/assets/index-DgU3yYUl.js +14 -0
- package/web/dist/assets/index.global-D3Ga_D3Y.js +1 -0
- package/web/dist/assets/live-protocol-BVn0UA_g.js +64 -0
- package/web/dist/assets/live-refetch-BdnmTJ_8.js +1 -0
- package/web/dist/assets/{live-worker-BizfZSoh.ts → live-worker-BWdeGzQX.ts} +2 -1
- package/web/dist/assets/loader-circle-CZkGEdoI.js +1 -0
- package/web/dist/assets/markdown-D7DUNWcJ.js +6 -0
- package/web/dist/assets/mermaid.min-3O9YjB2l.js +1 -0
- package/web/dist/assets/message-square-B-MD-8rD.js +1 -0
- package/web/dist/assets/{nav-row-styles-AoIhhIwf.js → nav-row-styles-BZUUavOF.js} +1 -1
- package/web/dist/assets/popover-DRcRI46x.js +1 -0
- package/web/dist/assets/preview-pane-connected-cD-MTiVN.js +3 -0
- package/web/dist/assets/project-router-MMOk9VbW.js +1 -0
- package/web/dist/assets/project-scope-context-B3M-u8R0.js +4 -0
- package/web/dist/assets/queries-DORTKwyN.js +1 -0
- package/web/dist/assets/repo-git-E_4Ighvg.js +1 -0
- package/web/dist/assets/report-reader-XVNQsXB4.js +1 -0
- package/web/dist/assets/report-title-D4Mbu2Er.js +1 -0
- package/web/dist/assets/reports-B7QAzibP.css +1 -0
- package/web/dist/assets/reports-B_PVTBzP.js +1 -0
- package/web/dist/assets/run-header-wm0gSs6X.js +2 -0
- package/web/dist/assets/skill-empty-hint-YDmkqgo-.js +1 -0
- package/web/dist/assets/skills-D2RLxUIc.js +1 -0
- package/web/dist/assets/skills-DFBiAuJG.js +1 -0
- package/web/dist/assets/skills-workflows-C21NystW.css +1 -0
- package/web/dist/assets/sortable.esm-zp_qkYGV.js +5 -0
- package/web/dist/assets/tab-link-BvoGfK8S.js +1 -0
- package/web/dist/assets/task-changes-DNtkfFzQ.js +1 -0
- package/web/dist/assets/task-commits-CivO-OrN.js +1 -0
- package/web/dist/assets/task-files-dczkxV_G.js +1 -0
- package/web/dist/assets/task-github-item-DKV4yrcf.js +1 -0
- package/web/dist/assets/task-thread-DIaTTGEF.js +9 -0
- package/web/dist/assets/textarea-DlVUfdWG.js +1 -0
- package/web/dist/assets/thread-state-DIozHuHb.js +4 -0
- package/web/dist/assets/toaster-B1MyeHiE.js +1 -0
- package/web/dist/assets/use-hand-to-agent-state-D58ayxI4.js +1 -0
- package/web/dist/assets/useInfiniteQuery-BbYMWe23.js +1 -0
- package/web/dist/assets/useQuery-CqqnAJvu.js +1 -0
- package/web/dist/assets/workflows-YMEsGXeB.js +7 -0
- package/web/dist/assets/ws-BtSVmivO.js +1 -0
- package/web/dist/assets/zoomable-image-5pOUaPEg.js +1 -0
- package/web/dist/index.html +31 -15
- package/web/dist/live-worker.js +2 -2
- package/LICENSE +0 -22
- package/README.md +0 -1725
- package/dist/agent-config/account-identity.d.ts +0 -28
- package/dist/agent-config/account-identity.js +0 -131
- package/dist/agent-config/account-identity.js.map +0 -1
- package/dist/agent-config/catalog.d.ts +0 -70
- package/dist/agent-config/catalog.js +0 -383
- package/dist/agent-config/catalog.js.map +0 -1
- package/dist/agent-config/files.d.ts +0 -42
- package/dist/agent-config/files.js +0 -115
- package/dist/agent-config/files.js.map +0 -1
- package/dist/agent-config/model-settings/claude.d.ts +0 -2
- package/dist/agent-config/model-settings/claude.js +0 -11
- package/dist/agent-config/model-settings/claude.js.map +0 -1
- package/dist/agent-config/model-settings/codex.d.ts +0 -2
- package/dist/agent-config/model-settings/codex.js +0 -16
- package/dist/agent-config/model-settings/codex.js.map +0 -1
- package/dist/agent-config/model-settings/opencode.d.ts +0 -2
- package/dist/agent-config/model-settings/opencode.js +0 -8
- package/dist/agent-config/model-settings/opencode.js.map +0 -1
- package/dist/agent-config/model-settings/pi.d.ts +0 -2
- package/dist/agent-config/model-settings/pi.js +0 -38
- package/dist/agent-config/model-settings/pi.js.map +0 -1
- package/dist/agent-config/model-settings/shared.d.ts +0 -12
- package/dist/agent-config/model-settings/shared.js +0 -100
- package/dist/agent-config/model-settings/shared.js.map +0 -1
- package/dist/agent-config/model-settings/types.d.ts +0 -9
- package/dist/agent-config/model-settings/types.js +0 -2
- package/dist/agent-config/model-settings/types.js.map +0 -1
- package/dist/agent-config/models.d.ts +0 -9
- package/dist/agent-config/models.js +0 -40
- package/dist/agent-config/models.js.map +0 -1
- package/dist/agent-config/seed.d.ts +0 -15
- package/dist/agent-config/seed.js +0 -94
- package/dist/agent-config/seed.js.map +0 -1
- package/dist/agent-config/service.d.ts +0 -44
- package/dist/agent-config/service.js +0 -72
- package/dist/agent-config/service.js.map +0 -1
- package/dist/agent-config/validate.d.ts +0 -18
- package/dist/agent-config/validate.js +0 -82
- package/dist/agent-config/validate.js.map +0 -1
- package/dist/application-update/bin-recovery.d.ts +0 -5
- package/dist/application-update/bin-recovery.js +0 -96
- package/dist/application-update/bin-recovery.js.map +0 -1
- package/dist/application-update/discovery.d.ts +0 -22
- package/dist/application-update/discovery.js +0 -91
- package/dist/application-update/discovery.js.map +0 -1
- package/dist/application-update/helper.d.ts +0 -57
- package/dist/application-update/helper.js +0 -369
- package/dist/application-update/helper.js.map +0 -1
- package/dist/application-update/launcher.d.ts +0 -12
- package/dist/application-update/launcher.js +0 -59
- package/dist/application-update/launcher.js.map +0 -1
- package/dist/application-update/lock.d.ts +0 -4
- package/dist/application-update/lock.js +0 -70
- package/dist/application-update/lock.js.map +0 -1
- package/dist/application-update/npm-process.d.ts +0 -17
- package/dist/application-update/npm-process.js +0 -133
- package/dist/application-update/npm-process.js.map +0 -1
- package/dist/application-update/service.d.ts +0 -69
- package/dist/application-update/service.js +0 -456
- package/dist/application-update/service.js.map +0 -1
- package/dist/archive-on-merge-setting.d.ts +0 -15
- package/dist/archive-on-merge-setting.js +0 -14
- package/dist/archive-on-merge-setting.js.map +0 -1
- package/dist/artifacts/cli.d.ts +0 -9
- package/dist/artifacts/cli.js +0 -59
- package/dist/artifacts/cli.js.map +0 -1
- package/dist/artifacts/lifecycle.d.ts +0 -4
- package/dist/artifacts/lifecycle.js +0 -42
- package/dist/artifacts/lifecycle.js.map +0 -1
- package/dist/artifacts/resolve.d.ts +0 -18
- package/dist/artifacts/resolve.js +0 -103
- package/dist/artifacts/resolve.js.map +0 -1
- package/dist/artifacts/store.d.ts +0 -8
- package/dist/artifacts/store.js +0 -323
- package/dist/artifacts/store.js.map +0 -1
- package/dist/automations/automation-cli.d.ts +0 -59
- package/dist/automations/automation-cli.js +0 -509
- package/dist/automations/automation-cli.js.map +0 -1
- package/dist/automations/builtin-skill.d.ts +0 -7
- package/dist/automations/builtin-skill.js +0 -14
- package/dist/automations/builtin-skill.js.map +0 -1
- package/dist/automations/coordinator.d.ts +0 -33
- package/dist/automations/coordinator.js +0 -86
- package/dist/automations/coordinator.js.map +0 -1
- package/dist/automations/github-baseline.d.ts +0 -3
- package/dist/automations/github-baseline.js +0 -17
- package/dist/automations/github-baseline.js.map +0 -1
- package/dist/automations/github-poller.d.ts +0 -93
- package/dist/automations/github-poller.js +0 -303
- package/dist/automations/github-poller.js.map +0 -1
- package/dist/automations/prompts.d.ts +0 -12
- package/dist/automations/prompts.js +0 -160
- package/dist/automations/prompts.js.map +0 -1
- package/dist/automations/schedule-runner.d.ts +0 -149
- package/dist/automations/schedule-runner.js +0 -513
- package/dist/automations/schedule-runner.js.map +0 -1
- package/dist/automations/scheduler.d.ts +0 -87
- package/dist/automations/scheduler.js +0 -434
- package/dist/automations/scheduler.js.map +0 -1
- package/dist/automations/service.d.ts +0 -777
- package/dist/automations/service.js +0 -444
- package/dist/automations/service.js.map +0 -1
- package/dist/automations/store.d.ts +0 -160
- package/dist/automations/store.js +0 -738
- package/dist/automations/store.js.map +0 -1
- package/dist/automations/task-template.d.ts +0 -59
- package/dist/automations/task-template.js +0 -273
- package/dist/automations/task-template.js.map +0 -1
- package/dist/automations/tool-adapter.d.ts +0 -6
- package/dist/automations/tool-adapter.js +0 -108
- package/dist/automations/tool-adapter.js.map +0 -1
- package/dist/automations/types.d.ts +0 -1
- package/dist/automations/types.js +0 -2
- package/dist/automations/types.js.map +0 -1
- package/dist/autosave-cleanup.d.ts +0 -26
- package/dist/autosave-cleanup.js +0 -87
- package/dist/autosave-cleanup.js.map +0 -1
- package/dist/autosave-git.d.ts +0 -21
- package/dist/autosave-git.js +0 -204
- package/dist/autosave-git.js.map +0 -1
- package/dist/autosave-group.d.ts +0 -8
- package/dist/autosave-group.js +0 -61
- package/dist/autosave-group.js.map +0 -1
- package/dist/autosave-holders.d.ts +0 -34
- package/dist/autosave-holders.js +0 -204
- package/dist/autosave-holders.js.map +0 -1
- package/dist/autosave-windows.d.ts +0 -25
- package/dist/autosave-windows.js +0 -156
- package/dist/autosave-windows.js.map +0 -1
- package/dist/ci-wait/client.d.ts +0 -28
- package/dist/ci-wait/client.js +0 -105
- package/dist/ci-wait/client.js.map +0 -1
- package/dist/ci-wait/controller.d.ts +0 -756
- package/dist/ci-wait/controller.js +0 -334
- package/dist/ci-wait/controller.js.map +0 -1
- package/dist/ci-wait/errors.d.ts +0 -27
- package/dist/ci-wait/errors.js +0 -252
- package/dist/ci-wait/errors.js.map +0 -1
- package/dist/ci-wait/github.d.ts +0 -87
- package/dist/ci-wait/github.js +0 -278
- package/dist/ci-wait/github.js.map +0 -1
- package/dist/ci-wait/injection.d.ts +0 -3
- package/dist/ci-wait/injection.js +0 -26
- package/dist/ci-wait/injection.js.map +0 -1
- package/dist/ci-wait/mcp.d.ts +0 -3
- package/dist/ci-wait/mcp.js +0 -30
- package/dist/ci-wait/mcp.js.map +0 -1
- package/dist/ci-wait/resources.d.ts +0 -7
- package/dist/ci-wait/resources.js +0 -32
- package/dist/ci-wait/resources.js.map +0 -1
- package/dist/ci-wait/supervisor.d.ts +0 -29
- package/dist/ci-wait/supervisor.js +0 -260
- package/dist/ci-wait/supervisor.js.map +0 -1
- package/dist/ci-wait/tools.d.ts +0 -827
- package/dist/ci-wait/tools.js +0 -208
- package/dist/ci-wait/tools.js.map +0 -1
- package/dist/config.d.ts +0 -68
- package/dist/config.js +0 -209
- package/dist/config.js.map +0 -1
- package/dist/contract/active-provider.d.ts +0 -12
- package/dist/contract/agent-config.d.ts +0 -160
- package/dist/contract/agent-profiles.d.ts +0 -369
- package/dist/contract/application-update.d.ts +0 -32
- package/dist/contract/artifacts.d.ts +0 -83
- package/dist/contract/ask-schema.d.ts +0 -50
- package/dist/contract/ask.d.ts +0 -9
- package/dist/contract/attachments.d.ts +0 -35
- package/dist/contract/attention.d.ts +0 -90
- package/dist/contract/automation-requests.d.ts +0 -308
- package/dist/contract/automation-schedule.d.ts +0 -89
- package/dist/contract/automation-storage.d.ts +0 -512
- package/dist/contract/automations.d.ts +0 -1542
- package/dist/contract/ci-wait.d.ts +0 -222
- package/dist/contract/config-requests.d.ts +0 -36
- package/dist/contract/conversations.d.ts +0 -351
- package/dist/contract/defined.d.ts +0 -8
- package/dist/contract/delegation.d.ts +0 -1882
- package/dist/contract/discovery.d.ts +0 -141
- package/dist/contract/effort.d.ts +0 -18
- package/dist/contract/events.d.ts +0 -292
- package/dist/contract/github-requests.d.ts +0 -26
- package/dist/contract/github.d.ts +0 -732
- package/dist/contract/handoff.d.ts +0 -43
- package/dist/contract/health.d.ts +0 -124
- package/dist/contract/image-path.d.ts +0 -6
- package/dist/contract/index.d.ts +0 -59
- package/dist/contract/index.js +0 -5887
- package/dist/contract/live-coordination.d.ts +0 -158
- package/dist/contract/live-limits.d.ts +0 -8
- package/dist/contract/live.d.ts +0 -123
- package/dist/contract/pending-ask.d.ts +0 -58
- package/dist/contract/permissions.d.ts +0 -54
- package/dist/contract/preview.d.ts +0 -541
- package/dist/contract/project-limits.d.ts +0 -33
- package/dist/contract/projects.d.ts +0 -716
- package/dist/contract/provider-requests.d.ts +0 -77
- package/dist/contract/query-requests.d.ts +0 -52
- package/dist/contract/repo-requests.d.ts +0 -12
- package/dist/contract/repo.d.ts +0 -496
- package/dist/contract/run-labels.d.ts +0 -8
- package/dist/contract/run-limits.d.ts +0 -8
- package/dist/contract/run-predicates.d.ts +0 -32
- package/dist/contract/run-requests.d.ts +0 -33
- package/dist/contract/run-search.d.ts +0 -193
- package/dist/contract/runs.d.ts +0 -5340
- package/dist/contract/scheduled-tasks.d.ts +0 -187
- package/dist/contract/skills.d.ts +0 -56
- package/dist/contract/team-skill-ref.d.ts +0 -10
- package/dist/contract/tool-display.d.ts +0 -25
- package/dist/contract/ui-state-requests.d.ts +0 -60
- package/dist/contract/version.d.ts +0 -3
- package/dist/contract/voice.d.ts +0 -213
- package/dist/contract/waits.d.ts +0 -1204
- package/dist/contract/workflow-file.d.ts +0 -37
- package/dist/contract/workflow-requests.d.ts +0 -7
- package/dist/contract/workflows.d.ts +0 -250
- package/dist/contract/workspace.d.ts +0 -631
- package/dist/contract/zoned-time.d.ts +0 -26
- package/dist/core/agent-env.d.ts +0 -30
- package/dist/core/agent-env.js +0 -400
- package/dist/core/agent-env.js.map +0 -1
- package/dist/core/agent-model-policy.d.ts +0 -10
- package/dist/core/agent-model-policy.js +0 -36
- package/dist/core/agent-model-policy.js.map +0 -1
- package/dist/core/agent-profiles.d.ts +0 -50
- package/dist/core/agent-profiles.js +0 -105
- package/dist/core/agent-profiles.js.map +0 -1
- package/dist/core/agent-runner.d.ts +0 -394
- package/dist/core/agent-runner.js +0 -96
- package/dist/core/agent-runner.js.map +0 -1
- package/dist/core/ask.d.ts +0 -79
- package/dist/core/ask.js +0 -232
- package/dist/core/ask.js.map +0 -1
- package/dist/core/backend-detect.d.ts +0 -17
- package/dist/core/backend-detect.js +0 -209
- package/dist/core/backend-detect.js.map +0 -1
- package/dist/core/claude-cli-runner.d.ts +0 -72
- package/dist/core/claude-cli-runner.js +0 -910
- package/dist/core/claude-cli-runner.js.map +0 -1
- package/dist/core/claude-model-catalog.d.ts +0 -16
- package/dist/core/claude-model-catalog.js +0 -198
- package/dist/core/claude-model-catalog.js.map +0 -1
- package/dist/core/claude-ui-mapper.d.ts +0 -80
- package/dist/core/claude-ui-mapper.js +0 -696
- package/dist/core/claude-ui-mapper.js.map +0 -1
- package/dist/core/codex-app-server-runner.d.ts +0 -61
- package/dist/core/codex-app-server-runner.js +0 -1278
- package/dist/core/codex-app-server-runner.js.map +0 -1
- package/dist/core/codex-app-server-transport.d.ts +0 -52
- package/dist/core/codex-app-server-transport.js +0 -199
- package/dist/core/codex-app-server-transport.js.map +0 -1
- package/dist/core/codex-approvals.d.ts +0 -12
- package/dist/core/codex-approvals.js +0 -161
- package/dist/core/codex-approvals.js.map +0 -1
- package/dist/core/codex-model-catalog.d.ts +0 -10
- package/dist/core/codex-model-catalog.js +0 -110
- package/dist/core/codex-model-catalog.js.map +0 -1
- package/dist/core/codex-permissions.d.ts +0 -6
- package/dist/core/codex-permissions.js +0 -27
- package/dist/core/codex-permissions.js.map +0 -1
- package/dist/core/codex-stream-error.d.ts +0 -2
- package/dist/core/codex-stream-error.js +0 -12
- package/dist/core/codex-stream-error.js.map +0 -1
- package/dist/core/codex-turn-outcome.d.ts +0 -8
- package/dist/core/codex-turn-outcome.js +0 -30
- package/dist/core/codex-turn-outcome.js.map +0 -1
- package/dist/core/codex-ui-mapper.d.ts +0 -112
- package/dist/core/codex-ui-mapper.js +0 -808
- package/dist/core/codex-ui-mapper.js.map +0 -1
- package/dist/core/cursor-acp-runner.d.ts +0 -34
- package/dist/core/cursor-acp-runner.js +0 -777
- package/dist/core/cursor-acp-runner.js.map +0 -1
- package/dist/core/cursor-cli-flags.d.ts +0 -19
- package/dist/core/cursor-cli-flags.js +0 -47
- package/dist/core/cursor-cli-flags.js.map +0 -1
- package/dist/core/cursor-config-options.d.ts +0 -18
- package/dist/core/cursor-config-options.js +0 -31
- package/dist/core/cursor-config-options.js.map +0 -1
- package/dist/core/cursor-model-catalog.d.ts +0 -45
- package/dist/core/cursor-model-catalog.js +0 -300
- package/dist/core/cursor-model-catalog.js.map +0 -1
- package/dist/core/cursor-print-capabilities.d.ts +0 -16
- package/dist/core/cursor-print-capabilities.js +0 -141
- package/dist/core/cursor-print-capabilities.js.map +0 -1
- package/dist/core/cursor-print-process.d.ts +0 -31
- package/dist/core/cursor-print-process.js +0 -117
- package/dist/core/cursor-print-process.js.map +0 -1
- package/dist/core/cursor-print-runner.d.ts +0 -31
- package/dist/core/cursor-print-runner.js +0 -555
- package/dist/core/cursor-print-runner.js.map +0 -1
- package/dist/core/cursor-print-tool-catalog.d.ts +0 -10
- package/dist/core/cursor-print-tool-catalog.js +0 -91
- package/dist/core/cursor-print-tool-catalog.js.map +0 -1
- package/dist/core/cursor-print-ui-mapper.d.ts +0 -47
- package/dist/core/cursor-print-ui-mapper.js +0 -553
- package/dist/core/cursor-print-ui-mapper.js.map +0 -1
- package/dist/core/cursor-provider-error.d.ts +0 -33
- package/dist/core/cursor-provider-error.js +0 -68
- package/dist/core/cursor-provider-error.js.map +0 -1
- package/dist/core/cursor-runner.d.ts +0 -24
- package/dist/core/cursor-runner.js +0 -149
- package/dist/core/cursor-runner.js.map +0 -1
- package/dist/core/cursor-ui-mapper.d.ts +0 -29
- package/dist/core/cursor-ui-mapper.js +0 -275
- package/dist/core/cursor-ui-mapper.js.map +0 -1
- package/dist/core/defined.d.ts +0 -1
- package/dist/core/defined.js +0 -2
- package/dist/core/defined.js.map +0 -1
- package/dist/core/hook-items.d.ts +0 -14
- package/dist/core/hook-items.js +0 -13
- package/dist/core/hook-items.js.map +0 -1
- package/dist/core/host-model-catalog.d.ts +0 -7
- package/dist/core/host-model-catalog.js +0 -21
- package/dist/core/host-model-catalog.js.map +0 -1
- package/dist/core/input-submissions.d.ts +0 -14
- package/dist/core/input-submissions.js +0 -26
- package/dist/core/input-submissions.js.map +0 -1
- package/dist/core/managed-session.d.ts +0 -6
- package/dist/core/managed-session.js +0 -116
- package/dist/core/managed-session.js.map +0 -1
- package/dist/core/model-identity.d.ts +0 -108
- package/dist/core/model-identity.js +0 -137
- package/dist/core/model-identity.js.map +0 -1
- package/dist/core/model-presets.d.ts +0 -10
- package/dist/core/model-presets.js +0 -77
- package/dist/core/model-presets.js.map +0 -1
- package/dist/core/ndjson.d.ts +0 -6
- package/dist/core/ndjson.js +0 -23
- package/dist/core/ndjson.js.map +0 -1
- package/dist/core/omp-model-catalog.d.ts +0 -43
- package/dist/core/omp-model-catalog.js +0 -205
- package/dist/core/omp-model-catalog.js.map +0 -1
- package/dist/core/omp-runner.d.ts +0 -72
- package/dist/core/omp-runner.js +0 -1049
- package/dist/core/omp-runner.js.map +0 -1
- package/dist/core/omp-ui-mapper.d.ts +0 -106
- package/dist/core/omp-ui-mapper.js +0 -882
- package/dist/core/omp-ui-mapper.js.map +0 -1
- package/dist/core/opencode-model-catalog.d.ts +0 -32
- package/dist/core/opencode-model-catalog.js +0 -215
- package/dist/core/opencode-model-catalog.js.map +0 -1
- package/dist/core/opencode-permissions.d.ts +0 -52
- package/dist/core/opencode-permissions.js +0 -101
- package/dist/core/opencode-permissions.js.map +0 -1
- package/dist/core/opencode-server-runner.d.ts +0 -61
- package/dist/core/opencode-server-runner.js +0 -1692
- package/dist/core/opencode-server-runner.js.map +0 -1
- package/dist/core/opencode-session-error.d.ts +0 -19
- package/dist/core/opencode-session-error.js +0 -42
- package/dist/core/opencode-session-error.js.map +0 -1
- package/dist/core/opencode-ui-mapper.d.ts +0 -137
- package/dist/core/opencode-ui-mapper.js +0 -768
- package/dist/core/opencode-ui-mapper.js.map +0 -1
- package/dist/core/pi-model-catalog.d.ts +0 -38
- package/dist/core/pi-model-catalog.js +0 -249
- package/dist/core/pi-model-catalog.js.map +0 -1
- package/dist/core/pi-runner.d.ts +0 -43
- package/dist/core/pi-runner.js +0 -827
- package/dist/core/pi-runner.js.map +0 -1
- package/dist/core/pi-ui-mapper.d.ts +0 -52
- package/dist/core/pi-ui-mapper.js +0 -395
- package/dist/core/pi-ui-mapper.js.map +0 -1
- package/dist/core/process-usage.d.ts +0 -74
- package/dist/core/process-usage.js +0 -218
- package/dist/core/process-usage.js.map +0 -1
- package/dist/core/provider-auth.d.ts +0 -168
- package/dist/core/provider-auth.js +0 -660
- package/dist/core/provider-auth.js.map +0 -1
- package/dist/core/provider-availability.d.ts +0 -3
- package/dist/core/provider-availability.js +0 -14
- package/dist/core/provider-availability.js.map +0 -1
- package/dist/core/runner-factory.d.ts +0 -11
- package/dist/core/runner-factory.js +0 -31
- package/dist/core/runner-factory.js.map +0 -1
- package/dist/core/runner-model-catalog.d.ts +0 -34
- package/dist/core/runner-model-catalog.js +0 -109
- package/dist/core/runner-model-catalog.js.map +0 -1
- package/dist/core/runner-runtime.d.ts +0 -40
- package/dist/core/runner-runtime.js +0 -88
- package/dist/core/runner-runtime.js.map +0 -1
- package/dist/core/runner-stderr.d.ts +0 -2
- package/dist/core/runner-stderr.js +0 -20
- package/dist/core/runner-stderr.js.map +0 -1
- package/dist/core/runner-tool-grants.d.ts +0 -21
- package/dist/core/runner-tool-grants.js +0 -64
- package/dist/core/runner-tool-grants.js.map +0 -1
- package/dist/core/secret-redaction.d.ts +0 -20
- package/dist/core/secret-redaction.js +0 -98
- package/dist/core/secret-redaction.js.map +0 -1
- package/dist/core/session-process.d.ts +0 -42
- package/dist/core/session-process.js +0 -360
- package/dist/core/session-process.js.map +0 -1
- package/dist/core/shell-env.d.ts +0 -17
- package/dist/core/shell-env.js +0 -51
- package/dist/core/shell-env.js.map +0 -1
- package/dist/core/ui-events.d.ts +0 -348
- package/dist/core/ui-events.js +0 -2
- package/dist/core/ui-events.js.map +0 -1
- package/dist/core/usage-limit.d.ts +0 -42
- package/dist/core/usage-limit.js +0 -152
- package/dist/core/usage-limit.js.map +0 -1
- package/dist/core/usage.d.ts +0 -11
- package/dist/core/usage.js +0 -15
- package/dist/core/usage.js.map +0 -1
- package/dist/core/v1-text-coalescer.d.ts +0 -36
- package/dist/core/v1-text-coalescer.js +0 -72
- package/dist/core/v1-text-coalescer.js.map +0 -1
- package/dist/data-gitignore.d.ts +0 -6
- package/dist/data-gitignore.js +0 -59
- package/dist/data-gitignore.js.map +0 -1
- package/dist/delegation/capacity.d.ts +0 -15
- package/dist/delegation/capacity.js +0 -30
- package/dist/delegation/capacity.js.map +0 -1
- package/dist/delegation/cli.d.ts +0 -4
- package/dist/delegation/cli.js +0 -481
- package/dist/delegation/cli.js.map +0 -1
- package/dist/delegation/context.d.ts +0 -40
- package/dist/delegation/context.js +0 -378
- package/dist/delegation/context.js.map +0 -1
- package/dist/delegation/conversations.d.ts +0 -9
- package/dist/delegation/conversations.js +0 -66
- package/dist/delegation/conversations.js.map +0 -1
- package/dist/delegation/credentials.d.ts +0 -21
- package/dist/delegation/credentials.js +0 -66
- package/dist/delegation/credentials.js.map +0 -1
- package/dist/delegation/destroy-observation.d.ts +0 -42
- package/dist/delegation/destroy-observation.js +0 -115
- package/dist/delegation/destroy-observation.js.map +0 -1
- package/dist/delegation/effort.d.ts +0 -1
- package/dist/delegation/effort.js +0 -11
- package/dist/delegation/effort.js.map +0 -1
- package/dist/delegation/execution-identity.d.ts +0 -180
- package/dist/delegation/execution-identity.js +0 -154
- package/dist/delegation/execution-identity.js.map +0 -1
- package/dist/delegation/idle-test-app.d.ts +0 -4
- package/dist/delegation/idle-test-app.js +0 -174
- package/dist/delegation/idle-test-app.js.map +0 -1
- package/dist/delegation/input.d.ts +0 -12
- package/dist/delegation/input.js +0 -50
- package/dist/delegation/input.js.map +0 -1
- package/dist/delegation/park-notice.d.ts +0 -42
- package/dist/delegation/park-notice.js +0 -71
- package/dist/delegation/park-notice.js.map +0 -1
- package/dist/delegation/policy.d.ts +0 -22
- package/dist/delegation/policy.js +0 -95
- package/dist/delegation/policy.js.map +0 -1
- package/dist/delegation/process-liveness.d.ts +0 -98
- package/dist/delegation/process-liveness.js +0 -213
- package/dist/delegation/process-liveness.js.map +0 -1
- package/dist/delegation/provision.d.ts +0 -32
- package/dist/delegation/provision.js +0 -177
- package/dist/delegation/provision.js.map +0 -1
- package/dist/delegation/questions.d.ts +0 -21
- package/dist/delegation/questions.js +0 -50
- package/dist/delegation/questions.js.map +0 -1
- package/dist/delegation/readiness.d.ts +0 -13
- package/dist/delegation/readiness.js +0 -19
- package/dist/delegation/readiness.js.map +0 -1
- package/dist/delegation/results.d.ts +0 -13
- package/dist/delegation/results.js +0 -154
- package/dist/delegation/results.js.map +0 -1
- package/dist/delegation/retry-backoff.d.ts +0 -31
- package/dist/delegation/retry-backoff.js +0 -26
- package/dist/delegation/retry-backoff.js.map +0 -1
- package/dist/delegation/routes.d.ts +0 -953
- package/dist/delegation/routes.js +0 -74
- package/dist/delegation/routes.js.map +0 -1
- package/dist/delegation/scratch-cleanup.d.ts +0 -28
- package/dist/delegation/scratch-cleanup.js +0 -145
- package/dist/delegation/scratch-cleanup.js.map +0 -1
- package/dist/delegation/service.d.ts +0 -211
- package/dist/delegation/service.js +0 -946
- package/dist/delegation/service.js.map +0 -1
- package/dist/delegation/transport.d.ts +0 -931
- package/dist/delegation/transport.js +0 -22
- package/dist/delegation/transport.js.map +0 -1
- package/dist/delegation/wait.d.ts +0 -14
- package/dist/delegation/wait.js +0 -72
- package/dist/delegation/wait.js.map +0 -1
- package/dist/delegation/windows-test-app.d.ts +0 -5
- package/dist/delegation/windows-test-app.js +0 -63
- package/dist/delegation/windows-test-app.js.map +0 -1
- package/dist/delegation/windows-workspace-identity.d.ts +0 -3
- package/dist/delegation/windows-workspace-identity.js +0 -22
- package/dist/delegation/windows-workspace-identity.js.map +0 -1
- package/dist/delegation/workspace.d.ts +0 -33
- package/dist/delegation/workspace.js +0 -556
- package/dist/delegation/workspace.js.map +0 -1
- package/dist/detached-process.d.ts +0 -103
- package/dist/detached-process.js +0 -301
- package/dist/detached-process.js.map +0 -1
- package/dist/discovery/catalog.d.ts +0 -15
- package/dist/discovery/catalog.js +0 -31
- package/dist/discovery/catalog.js.map +0 -1
- package/dist/discovery/cli.d.ts +0 -8
- package/dist/discovery/cli.js +0 -106
- package/dist/discovery/cli.js.map +0 -1
- package/dist/git-diff-base.d.ts +0 -41
- package/dist/git-diff-base.js +0 -116
- package/dist/git-diff-base.js.map +0 -1
- package/dist/git-index-copy.d.ts +0 -4
- package/dist/git-index-copy.js +0 -10
- package/dist/git-index-copy.js.map +0 -1
- package/dist/git-refs.d.ts +0 -11
- package/dist/git-refs.js +0 -14
- package/dist/git-refs.js.map +0 -1
- package/dist/git-worktree-lock-helper.d.ts +0 -7
- package/dist/git-worktree-lock-helper.js +0 -158
- package/dist/git-worktree-lock-helper.js.map +0 -1
- package/dist/git-worktree-lock.d.ts +0 -17
- package/dist/git-worktree-lock.js +0 -90
- package/dist/git-worktree-lock.js.map +0 -1
- package/dist/git-worktree-release.d.ts +0 -20
- package/dist/git-worktree-release.js +0 -27
- package/dist/git-worktree-release.js.map +0 -1
- package/dist/git-worktree.d.ts +0 -154
- package/dist/git-worktree.js +0 -858
- package/dist/git-worktree.js.map +0 -1
- package/dist/handoff.d.ts +0 -72
- package/dist/handoff.js +0 -206
- package/dist/handoff.js.map +0 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.js.map +0 -1
- package/dist/install-as-command.d.ts +0 -40
- package/dist/install-as-command.js +0 -52
- package/dist/install-as-command.js.map +0 -1
- package/dist/merge-observations.d.ts +0 -13
- package/dist/merge-observations.js +0 -55
- package/dist/merge-observations.js.map +0 -1
- package/dist/open-url.d.ts +0 -2
- package/dist/open-url.js +0 -10
- package/dist/open-url.js.map +0 -1
- package/dist/pack-check.d.ts +0 -17
- package/dist/pack-check.js +0 -27
- package/dist/pack-check.js.map +0 -1
- package/dist/paths.d.ts +0 -138
- package/dist/paths.js +0 -220
- package/dist/paths.js.map +0 -1
- package/dist/planner.d.ts +0 -28
- package/dist/planner.js +0 -271
- package/dist/planner.js.map +0 -1
- package/dist/preview/agent-address.d.ts +0 -34
- package/dist/preview/agent-address.js +0 -51
- package/dist/preview/agent-address.js.map +0 -1
- package/dist/preview/agent-marker.d.ts +0 -17
- package/dist/preview/agent-marker.js +0 -71
- package/dist/preview/agent-marker.js.map +0 -1
- package/dist/preview/cdp-proxy.d.ts +0 -54
- package/dist/preview/cdp-proxy.js +0 -151
- package/dist/preview/cdp-proxy.js.map +0 -1
- package/dist/preview/cdp.d.ts +0 -49
- package/dist/preview/cdp.js +0 -167
- package/dist/preview/cdp.js.map +0 -1
- package/dist/preview/chromium.d.ts +0 -87
- package/dist/preview/chromium.js +0 -481
- package/dist/preview/chromium.js.map +0 -1
- package/dist/preview/dev-server.d.ts +0 -68
- package/dist/preview/dev-server.js +0 -317
- package/dist/preview/dev-server.js.map +0 -1
- package/dist/preview/host.d.ts +0 -221
- package/dist/preview/host.js +0 -967
- package/dist/preview/host.js.map +0 -1
- package/dist/preview/registration.d.ts +0 -68
- package/dist/preview/registration.js +0 -111
- package/dist/preview/registration.js.map +0 -1
- package/dist/preview/session.d.ts +0 -75
- package/dist/preview/session.js +0 -357
- package/dist/preview/session.js.map +0 -1
- package/dist/preview/url.d.ts +0 -6
- package/dist/preview/url.js +0 -17
- package/dist/preview/url.js.map +0 -1
- package/dist/process-wait/exit-file.d.ts +0 -29
- package/dist/process-wait/exit-file.js +0 -67
- package/dist/process-wait/exit-file.js.map +0 -1
- package/dist/process-wait/supervisor.d.ts +0 -30
- package/dist/process-wait/supervisor.js +0 -71
- package/dist/process-wait/supervisor.js.map +0 -1
- package/dist/release/manifests.d.ts +0 -103
- package/dist/release/manifests.js +0 -90
- package/dist/release/manifests.js.map +0 -1
- package/dist/release/snapshot.d.ts +0 -67
- package/dist/release/snapshot.js +0 -97
- package/dist/release/snapshot.js.map +0 -1
- package/dist/release/stable.d.ts +0 -38
- package/dist/release/stable.js +0 -55
- package/dist/release/stable.js.map +0 -1
- package/dist/runs/agent-tmpdir-removal.d.ts +0 -15
- package/dist/runs/agent-tmpdir-removal.js +0 -60
- package/dist/runs/agent-tmpdir-removal.js.map +0 -1
- package/dist/runs/agent-tmpdir.d.ts +0 -119
- package/dist/runs/agent-tmpdir.js +0 -829
- package/dist/runs/agent-tmpdir.js.map +0 -1
- package/dist/runs/arm-repo-handle.d.ts +0 -9
- package/dist/runs/arm-repo-handle.js +0 -45
- package/dist/runs/arm-repo-handle.js.map +0 -1
- package/dist/runs/auto-name.d.ts +0 -75
- package/dist/runs/auto-name.js +0 -179
- package/dist/runs/auto-name.js.map +0 -1
- package/dist/runs/client-request.d.ts +0 -11
- package/dist/runs/client-request.js +0 -26
- package/dist/runs/client-request.js.map +0 -1
- package/dist/runs/delegation-state.d.ts +0 -400
- package/dist/runs/delegation-state.js +0 -22
- package/dist/runs/delegation-state.js.map +0 -1
- package/dist/runs/event-history-agent-context.d.ts +0 -14
- package/dist/runs/event-history-agent-context.js +0 -105
- package/dist/runs/event-history-agent-context.js.map +0 -1
- package/dist/runs/event-history-context.d.ts +0 -15
- package/dist/runs/event-history-context.js +0 -109
- package/dist/runs/event-history-context.js.map +0 -1
- package/dist/runs/event-history.d.ts +0 -53
- package/dist/runs/event-history.js +0 -535
- package/dist/runs/event-history.js.map +0 -1
- package/dist/runs/history-compressor.d.ts +0 -29
- package/dist/runs/history-compressor.js +0 -116
- package/dist/runs/history-compressor.js.map +0 -1
- package/dist/runs/history-file.d.ts +0 -36
- package/dist/runs/history-file.js +0 -463
- package/dist/runs/history-file.js.map +0 -1
- package/dist/runs/history-stream.d.ts +0 -2
- package/dist/runs/history-stream.js +0 -62
- package/dist/runs/history-stream.js.map +0 -1
- package/dist/runs/legacy-index.d.ts +0 -49
- package/dist/runs/legacy-index.js +0 -155
- package/dist/runs/legacy-index.js.map +0 -1
- package/dist/runs/live-item-snapshots.d.ts +0 -13
- package/dist/runs/live-item-snapshots.js +0 -79
- package/dist/runs/live-item-snapshots.js.map +0 -1
- package/dist/runs/loaded-run-healing.d.ts +0 -3
- package/dist/runs/loaded-run-healing.js +0 -17
- package/dist/runs/loaded-run-healing.js.map +0 -1
- package/dist/runs/outcome-commit.d.ts +0 -98
- package/dist/runs/outcome-commit.js +0 -132
- package/dist/runs/outcome-commit.js.map +0 -1
- package/dist/runs/pull-requests.d.ts +0 -14
- package/dist/runs/pull-requests.js +0 -96
- package/dist/runs/pull-requests.js.map +0 -1
- package/dist/runs/raw-record.d.ts +0 -40
- package/dist/runs/raw-record.js +0 -133
- package/dist/runs/raw-record.js.map +0 -1
- package/dist/runs/retention.d.ts +0 -91
- package/dist/runs/retention.js +0 -182
- package/dist/runs/retention.js.map +0 -1
- package/dist/runs/review-gate.d.ts +0 -18
- package/dist/runs/review-gate.js +0 -21
- package/dist/runs/review-gate.js.map +0 -1
- package/dist/runs/run-claims.d.ts +0 -16
- package/dist/runs/run-claims.js +0 -24
- package/dist/runs/run-claims.js.map +0 -1
- package/dist/runs/run-database.d.ts +0 -380
- package/dist/runs/run-database.js +0 -1008
- package/dist/runs/run-database.js.map +0 -1
- package/dist/runs/run-index.d.ts +0 -26
- package/dist/runs/run-index.js +0 -212
- package/dist/runs/run-index.js.map +0 -1
- package/dist/runs/run-row.d.ts +0 -15
- package/dist/runs/run-row.js +0 -59
- package/dist/runs/run-row.js.map +0 -1
- package/dist/runs/store-open-error.d.ts +0 -24
- package/dist/runs/store-open-error.js +0 -61
- package/dist/runs/store-open-error.js.map +0 -1
- package/dist/runs/store.d.ts +0 -3090
- package/dist/runs/store.js +0 -4693
- package/dist/runs/store.js.map +0 -1
- package/dist/runs/task-markers.d.ts +0 -29
- package/dist/runs/task-markers.js +0 -78
- package/dist/runs/task-markers.js.map +0 -1
- package/dist/runs/task-refs.d.ts +0 -25
- package/dist/runs/task-refs.js +0 -74
- package/dist/runs/task-refs.js.map +0 -1
- package/dist/runs/transcript-facts-fold.d.ts +0 -64
- package/dist/runs/transcript-facts-fold.js +0 -109
- package/dist/runs/transcript-facts-fold.js.map +0 -1
- package/dist/runs/transcript-facts-load.d.ts +0 -11
- package/dist/runs/transcript-facts-load.js +0 -66
- package/dist/runs/transcript-facts-load.js.map +0 -1
- package/dist/runs/transcript-facts-queue.d.ts +0 -30
- package/dist/runs/transcript-facts-queue.js +0 -227
- package/dist/runs/transcript-facts-queue.js.map +0 -1
- package/dist/runs/transcript-facts-worker.d.ts +0 -15
- package/dist/runs/transcript-facts-worker.js +0 -26
- package/dist/runs/transcript-facts-worker.js.map +0 -1
- package/dist/runs/transcript-facts.d.ts +0 -39
- package/dist/runs/transcript-facts.js +0 -186
- package/dist/runs/transcript-facts.js.map +0 -1
- package/dist/runs/ui-event-sink.d.ts +0 -56
- package/dist/runs/ui-event-sink.js +0 -188
- package/dist/runs/ui-event-sink.js.map +0 -1
- package/dist/runs/webhook.d.ts +0 -191
- package/dist/runs/webhook.js +0 -360
- package/dist/runs/webhook.js.map +0 -1
- package/dist/runs/worker-execution.d.ts +0 -22
- package/dist/runs/worker-execution.js +0 -30
- package/dist/runs/worker-execution.js.map +0 -1
- package/dist/server/app-type.js.map +0 -1
- package/dist/server/archive-on-merge.d.ts +0 -35
- package/dist/server/archive-on-merge.js +0 -202
- package/dist/server/archive-on-merge.js.map +0 -1
- package/dist/server/capabilities.d.ts +0 -59
- package/dist/server/capabilities.js +0 -141
- package/dist/server/capabilities.js.map +0 -1
- package/dist/server/checkout-progress.d.ts +0 -10
- package/dist/server/checkout-progress.js +0 -27
- package/dist/server/checkout-progress.js.map +0 -1
- package/dist/server/checkout.d.ts +0 -129
- package/dist/server/checkout.js +0 -304
- package/dist/server/checkout.js.map +0 -1
- package/dist/server/cockpit-ownership.d.ts +0 -31
- package/dist/server/cockpit-ownership.js +0 -191
- package/dist/server/cockpit-ownership.js.map +0 -1
- package/dist/server/cold-repo-handles.d.ts +0 -14
- package/dist/server/cold-repo-handles.js +0 -78
- package/dist/server/cold-repo-handles.js.map +0 -1
- package/dist/server/completion-actions.d.ts +0 -30
- package/dist/server/completion-actions.js +0 -204
- package/dist/server/completion-actions.js.map +0 -1
- package/dist/server/create-project.d.ts +0 -71
- package/dist/server/create-project.js +0 -448
- package/dist/server/create-project.js.map +0 -1
- package/dist/server/forge/github-filters.d.ts +0 -22
- package/dist/server/forge/github-filters.js +0 -127
- package/dist/server/forge/github-filters.js.map +0 -1
- package/dist/server/forge/github-merge-requirements.d.ts +0 -18
- package/dist/server/forge/github-merge-requirements.js +0 -137
- package/dist/server/forge/github-merge-requirements.js.map +0 -1
- package/dist/server/forge/github.d.ts +0 -535
- package/dist/server/forge/github.js +0 -3200
- package/dist/server/forge/github.js.map +0 -1
- package/dist/server/forge/index.d.ts +0 -40
- package/dist/server/forge/index.js +0 -72
- package/dist/server/forge/index.js.map +0 -1
- package/dist/server/forge/types.d.ts +0 -244
- package/dist/server/forge/types.js +0 -2
- package/dist/server/forge/types.js.map +0 -1
- package/dist/server/fs-browse.d.ts +0 -80
- package/dist/server/fs-browse.js +0 -182
- package/dist/server/fs-browse.js.map +0 -1
- package/dist/server/git-changes.d.ts +0 -203
- package/dist/server/git-changes.js +0 -508
- package/dist/server/git-changes.js.map +0 -1
- package/dist/server/git.d.ts +0 -52
- package/dist/server/git.js +0 -170
- package/dist/server/git.js.map +0 -1
- package/dist/server/github.d.ts +0 -9
- package/dist/server/github.js +0 -8
- package/dist/server/github.js.map +0 -1
- package/dist/server/launch-key.d.ts +0 -5
- package/dist/server/launch-key.js +0 -31
- package/dist/server/launch-key.js.map +0 -1
- package/dist/server/live-routes.d.ts +0 -68
- package/dist/server/live-routes.js +0 -147
- package/dist/server/live-routes.js.map +0 -1
- package/dist/server/open-in-app.d.ts +0 -57
- package/dist/server/open-in-app.js +0 -177
- package/dist/server/open-in-app.js.map +0 -1
- package/dist/server/open-in-targets.d.ts +0 -42
- package/dist/server/open-in-targets.js +0 -110
- package/dist/server/open-in-targets.js.map +0 -1
- package/dist/server/open-in-terminal.d.ts +0 -73
- package/dist/server/open-in-terminal.js +0 -159
- package/dist/server/open-in-terminal.js.map +0 -1
- package/dist/server/pr.d.ts +0 -7
- package/dist/server/pr.js +0 -7
- package/dist/server/pr.js.map +0 -1
- package/dist/server/preview-cdp-socket.d.ts +0 -21
- package/dist/server/preview-cdp-socket.js +0 -112
- package/dist/server/preview-cdp-socket.js.map +0 -1
- package/dist/server/preview-socket.d.ts +0 -36
- package/dist/server/preview-socket.js +0 -126
- package/dist/server/preview-socket.js.map +0 -1
- package/dist/server/preview-sockets.d.ts +0 -14
- package/dist/server/preview-sockets.js +0 -18
- package/dist/server/preview-sockets.js.map +0 -1
- package/dist/server/project-context.d.ts +0 -192
- package/dist/server/project-context.js +0 -444
- package/dist/server/project-context.js.map +0 -1
- package/dist/server/provider-action-gate.d.ts +0 -5
- package/dist/server/provider-action-gate.js +0 -27
- package/dist/server/provider-action-gate.js.map +0 -1
- package/dist/server/provider-auth-runtime.d.ts +0 -32
- package/dist/server/provider-auth-runtime.js +0 -116
- package/dist/server/provider-auth-runtime.js.map +0 -1
- package/dist/server/repo-branches.d.ts +0 -99
- package/dist/server/repo-branches.js +0 -620
- package/dist/server/repo-branches.js.map +0 -1
- package/dist/server/repo-pull.d.ts +0 -18
- package/dist/server/repo-pull.js +0 -96
- package/dist/server/repo-pull.js.map +0 -1
- package/dist/server/run-event-feed.d.ts +0 -20
- package/dist/server/run-event-feed.js +0 -190
- package/dist/server/run-event-feed.js.map +0 -1
- package/dist/server/server-deps.d.ts +0 -37
- package/dist/server/server-deps.js +0 -114
- package/dist/server/server-deps.js.map +0 -1
- package/dist/server/server.d.ts +0 -28587
- package/dist/server/server.js +0 -5466
- package/dist/server/server.js.map +0 -1
- package/dist/server/start-run-options.d.ts +0 -82
- package/dist/server/start-run-options.js +0 -111
- package/dist/server/start-run-options.js.map +0 -1
- package/dist/server/static-ui.d.ts +0 -49
- package/dist/server/static-ui.js +0 -98
- package/dist/server/static-ui.js.map +0 -1
- package/dist/server/upgrade-router.d.ts +0 -23
- package/dist/server/upgrade-router.js +0 -53
- package/dist/server/upgrade-router.js.map +0 -1
- package/dist/server/validators.d.ts +0 -80
- package/dist/server/validators.js +0 -85
- package/dist/server/validators.js.map +0 -1
- package/dist/server/ws.d.ts +0 -65
- package/dist/server/ws.js +0 -200
- package/dist/server/ws.js.map +0 -1
- package/dist/server/wsl.d.ts +0 -25
- package/dist/server/wsl.js +0 -92
- package/dist/server/wsl.js.map +0 -1
- package/dist/server-install/engine.d.ts +0 -47
- package/dist/server-install/engine.js +0 -317
- package/dist/server-install/engine.js.map +0 -1
- package/dist/server-install/npx-cache.d.ts +0 -36
- package/dist/server-install/npx-cache.js +0 -104
- package/dist/server-install/npx-cache.js.map +0 -1
- package/dist/server-install/platforms/macosx-ngrok.d.ts +0 -6
- package/dist/server-install/platforms/macosx-ngrok.js +0 -371
- package/dist/server-install/platforms/macosx-ngrok.js.map +0 -1
- package/dist/server-install/platforms/ubuntu-vps.d.ts +0 -54
- package/dist/server-install/platforms/ubuntu-vps.js +0 -1066
- package/dist/server-install/platforms/ubuntu-vps.js.map +0 -1
- package/dist/server-install/state.d.ts +0 -50
- package/dist/server-install/state.js +0 -180
- package/dist/server-install/state.js.map +0 -1
- package/dist/server-install/steps.d.ts +0 -108
- package/dist/server-install/steps.js +0 -332
- package/dist/server-install/steps.js.map +0 -1
- package/dist/server-install/strategies.d.ts +0 -4
- package/dist/server-install/strategies.js +0 -20
- package/dist/server-install/strategies.js.map +0 -1
- package/dist/server-install/types.d.ts +0 -284
- package/dist/server-install/types.js +0 -118
- package/dist/server-install/types.js.map +0 -1
- package/dist/server-install/ui.d.ts +0 -36
- package/dist/server-install/ui.js +0 -130
- package/dist/server-install/ui.js.map +0 -1
- package/dist/session-context.d.ts +0 -64
- package/dist/session-context.js +0 -264
- package/dist/session-context.js.map +0 -1
- package/dist/skills-provision.d.ts +0 -62
- package/dist/skills-provision.js +0 -325
- package/dist/skills-provision.js.map +0 -1
- package/dist/skills-remote.d.ts +0 -129
- package/dist/skills-remote.js +0 -782
- package/dist/skills-remote.js.map +0 -1
- package/dist/skills.d.ts +0 -71
- package/dist/skills.js +0 -249
- package/dist/skills.js.map +0 -1
- package/dist/subcommands.d.ts +0 -11
- package/dist/subcommands.js +0 -24
- package/dist/subcommands.js.map +0 -1
- package/dist/task-cli/cli.d.ts +0 -38
- package/dist/task-cli/cli.js +0 -710
- package/dist/task-cli/cli.js.map +0 -1
- package/dist/task-cli/discovery.d.ts +0 -25
- package/dist/task-cli/discovery.js +0 -98
- package/dist/task-cli/discovery.js.map +0 -1
- package/dist/task-cli/hint.d.ts +0 -20
- package/dist/task-cli/hint.js +0 -14
- package/dist/task-cli/hint.js.map +0 -1
- package/dist/task-cli/http.d.ts +0 -49
- package/dist/task-cli/http.js +0 -109
- package/dist/task-cli/http.js.map +0 -1
- package/dist/task-cli/projections.d.ts +0 -68
- package/dist/task-cli/projections.js +0 -76
- package/dist/task-cli/projections.js.map +0 -1
- package/dist/task-cli/watch.d.ts +0 -119
- package/dist/task-cli/watch.js +0 -475
- package/dist/task-cli/watch.js.map +0 -1
- package/dist/ui-state.d.ts +0 -41
- package/dist/ui-state.js +0 -90
- package/dist/ui-state.js.map +0 -1
- package/dist/update-check.d.ts +0 -2
- package/dist/update-check.js +0 -26
- package/dist/update-check.js.map +0 -1
- package/dist/voice/decide.d.ts +0 -32
- package/dist/voice/decide.js +0 -297
- package/dist/voice/decide.js.map +0 -1
- package/dist/voice/decision-log.d.ts +0 -52
- package/dist/voice/decision-log.js +0 -107
- package/dist/voice/decision-log.js.map +0 -1
- package/dist/voice/engine.d.ts +0 -119
- package/dist/voice/engine.js +0 -60
- package/dist/voice/engine.js.map +0 -1
- package/dist/voice/fake-engine.d.ts +0 -10
- package/dist/voice/fake-engine.js +0 -192
- package/dist/voice/fake-engine.js.map +0 -1
- package/dist/voice/jev-engine.d.ts +0 -17
- package/dist/voice/jev-engine.js +0 -110
- package/dist/voice/jev-engine.js.map +0 -1
- package/dist/voice/pending-ask.d.ts +0 -17
- package/dist/voice/pending-ask.js +0 -50
- package/dist/voice/pending-ask.js.map +0 -1
- package/dist/voice/routes.d.ts +0 -115
- package/dist/voice/routes.js +0 -91
- package/dist/voice/routes.js.map +0 -1
- package/dist/voice/sentence.d.ts +0 -21
- package/dist/voice/sentence.js +0 -61
- package/dist/voice/sentence.js.map +0 -1
- package/dist/voice/thresholds.d.ts +0 -28
- package/dist/voice/thresholds.js +0 -29
- package/dist/voice/thresholds.js.map +0 -1
- package/dist/webhooks/cli.d.ts +0 -18
- package/dist/webhooks/cli.js +0 -145
- package/dist/webhooks/cli.js.map +0 -1
- package/dist/webhooks/prompt.d.ts +0 -5
- package/dist/webhooks/prompt.js +0 -26
- package/dist/webhooks/prompt.js.map +0 -1
- package/dist/workflows/active-run.d.ts +0 -167
- package/dist/workflows/active-run.js +0 -21
- package/dist/workflows/active-run.js.map +0 -1
- package/dist/workflows/attachment-path.d.ts +0 -6
- package/dist/workflows/attachment-path.js +0 -40
- package/dist/workflows/attachment-path.js.map +0 -1
- package/dist/workflows/continuation-admission.d.ts +0 -913
- package/dist/workflows/continuation-admission.js +0 -265
- package/dist/workflows/continuation-admission.js.map +0 -1
- package/dist/workflows/execution-account.d.ts +0 -13
- package/dist/workflows/execution-account.js +0 -18
- package/dist/workflows/execution-account.js.map +0 -1
- package/dist/workflows/grouped-command.d.ts +0 -31
- package/dist/workflows/grouped-command.js +0 -143
- package/dist/workflows/grouped-command.js.map +0 -1
- package/dist/workflows/input-acknowledgement.d.ts +0 -152
- package/dist/workflows/input-acknowledgement.js +0 -38
- package/dist/workflows/input-acknowledgement.js.map +0 -1
- package/dist/workflows/line-order.d.ts +0 -5
- package/dist/workflows/line-order.js +0 -25
- package/dist/workflows/line-order.js.map +0 -1
- package/dist/workflows/load.d.ts +0 -17
- package/dist/workflows/load.js +0 -61
- package/dist/workflows/load.js.map +0 -1
- package/dist/workflows/outcome-batches.d.ts +0 -20
- package/dist/workflows/outcome-batches.js +0 -25
- package/dist/workflows/outcome-batches.js.map +0 -1
- package/dist/workflows/question-routing.d.ts +0 -8
- package/dist/workflows/question-routing.js +0 -18
- package/dist/workflows/question-routing.js.map +0 -1
- package/dist/workflows/run-scheduling.d.ts +0 -35
- package/dist/workflows/run-scheduling.js +0 -61
- package/dist/workflows/run-scheduling.js.map +0 -1
- package/dist/workflows/run-states.d.ts +0 -190
- package/dist/workflows/run-states.js +0 -295
- package/dist/workflows/run-states.js.map +0 -1
- package/dist/workflows/run.d.ts +0 -2405
- package/dist/workflows/run.js +0 -10745
- package/dist/workflows/run.js.map +0 -1
- package/dist/workflows/turn-end.d.ts +0 -116
- package/dist/workflows/turn-end.js +0 -68
- package/dist/workflows/turn-end.js.map +0 -1
- package/dist/workflows/types.d.ts +0 -83
- package/dist/workflows/types.js +0 -192
- package/dist/workflows/types.js.map +0 -1
- package/dist/workflows/waits.d.ts +0 -74
- package/dist/workflows/waits.js +0 -197
- package/dist/workflows/waits.js.map +0 -1
- package/dist/workspace/agent-accounts.d.ts +0 -128
- package/dist/workspace/agent-accounts.js +0 -280
- package/dist/workspace/agent-accounts.js.map +0 -1
- package/dist/workspace/agent-profiles.d.ts +0 -124
- package/dist/workspace/agent-profiles.js +0 -190
- package/dist/workspace/agent-profiles.js.map +0 -1
- package/dist/workspace/config.d.ts +0 -181
- package/dist/workspace/config.js +0 -389
- package/dist/workspace/config.js.map +0 -1
- package/dist/workspace/migrations.d.ts +0 -35
- package/dist/workspace/migrations.js +0 -147
- package/dist/workspace/migrations.js.map +0 -1
- package/dist/workspace/projects-cli.d.ts +0 -25
- package/dist/workspace/projects-cli.js +0 -172
- package/dist/workspace/projects-cli.js.map +0 -1
- package/dist/workspace/projects.d.ts +0 -129
- package/dist/workspace/projects.js +0 -267
- package/dist/workspace/projects.js.map +0 -1
- package/dist/workspace/semaphore.d.ts +0 -145
- package/dist/workspace/semaphore.js +0 -196
- package/dist/workspace/semaphore.js.map +0 -1
- package/dist/workspace/ui-state.d.ts +0 -36
- package/dist/workspace/ui-state.js +0 -55
- package/dist/workspace/ui-state.js.map +0 -1
- package/dist/workspace/webhooks.d.ts +0 -40
- package/dist/workspace/webhooks.js +0 -146
- package/dist/workspace/webhooks.js.map +0 -1
- package/dist/worktree-manifest.d.ts +0 -165
- package/dist/worktree-manifest.js +0 -530
- package/dist/worktree-manifest.js.map +0 -1
- package/dist/worktree-setup.d.ts +0 -85
- package/dist/worktree-setup.js +0 -164
- package/dist/worktree-setup.js.map +0 -1
- package/scripts/benchmark-run-store-fixture.ts +0 -432
- package/scripts/benchmark-run-store.ts +0 -743
- package/scripts/benchmark-stuck-destroys.ts +0 -143
- package/scripts/check-pack.mjs +0 -48
- package/scripts/inline-contract.mjs +0 -165
- package/scripts/install-as-command.mjs +0 -122
- package/scripts/measure-transcript-facts-health.mjs +0 -87
- package/scripts/measure-transcript-facts-lag.mjs +0 -68
- package/scripts/mock-autonomous.mjs +0 -11
- package/scripts/mock-ci-tool.mjs +0 -111
- package/scripts/mock-claude-model-refusal.mjs +0 -42
- package/scripts/mock-claude.mjs +0 -1065
- package/scripts/mock-codex-app-server.mjs +0 -905
- package/scripts/mock-codex-coalesce-steer.mjs +0 -59
- package/scripts/mock-codex-reverse-steer.mjs +0 -130
- package/scripts/mock-cursor-acp.mjs +0 -423
- package/scripts/mock-cursor-hang-stdin-late.mjs +0 -35
- package/scripts/mock-cursor-hang-stdin.mjs +0 -30
- package/scripts/mock-cursor-print.mjs +0 -256
- package/scripts/mock-deferred-turn-start.mjs +0 -16
- package/scripts/mock-delivery-control.d.mts +0 -23
- package/scripts/mock-delivery-control.mjs +0 -80
- package/scripts/mock-env-record.mjs +0 -11
- package/scripts/mock-failure-control.d.mts +0 -13
- package/scripts/mock-failure-control.mjs +0 -68
- package/scripts/mock-multi-pr.mjs +0 -7
- package/scripts/mock-nudge.mjs +0 -45
- package/scripts/mock-omp-rpc.mjs +0 -779
- package/scripts/mock-opencode-serve.mjs +0 -1230
- package/scripts/mock-pi-rpc.mjs +0 -698
- package/scripts/mock-runner-crash.mjs +0 -58
- package/scripts/mock-session-context.d.mts +0 -5
- package/scripts/mock-session-context.mjs +0 -56
- package/scripts/mock-silent-tail.mjs +0 -85
- package/scripts/mock-turn-messages.mjs +0 -5
- package/scripts/omp-ci-wait.mjs +0 -29
- package/scripts/omp-restrict-delegation.yml +0 -4
- package/scripts/pi-ci-wait.mjs +0 -17
- package/scripts/pi-default-tools.mjs +0 -22
- package/scripts/pi-project-skills.mjs +0 -59
- package/scripts/pi-retry-degraded-service.mjs +0 -16
- package/scripts/probe-cursor-print.mjs +0 -627
- package/scripts/seed-archive-profile.ts +0 -53
- package/scripts/sync-readme.mjs +0 -20
- package/scripts/test-process-usage.mjs +0 -47
- package/scripts/transcript-facts-fixture.mjs +0 -53
- package/scripts/voice-replay.ts +0 -50
- package/scripts/windows-workspace-identity.cs +0 -208
- package/scripts/windows-workspace-identity.ps1 +0 -10
- package/web/dist/assets/alert-dialog-DfctKUMw.js +0 -1
- package/web/dist/assets/button-CeupvoKG.js +0 -41
- package/web/dist/assets/centered-state-hDsyXrnH.js +0 -1
- package/web/dist/assets/cez-idle-D3aj_9lp.js +0 -1
- package/web/dist/assets/diff-BnIXZK3i2.js +0 -3
- package/web/dist/assets/diff-controls-GewpW9aF.js +0 -1
- package/web/dist/assets/diff-view-Byo7gpvW.js +0 -11
- package/web/dist/assets/dropdown-menu-COj_J5wd.js +0 -6
- package/web/dist/assets/git-toolbar-DY0z0n4S.js +0 -1
- package/web/dist/assets/github-DwU6ALRK.js +0 -1
- package/web/dist/assets/index-BOfE8pyD.js +0 -34
- package/web/dist/assets/index-D9HpsmdW.css +0 -1
- package/web/dist/assets/lib-BQXq3kEf.js +0 -1
- package/web/dist/assets/live-protocol-Uce2NwEX.js +0 -64
- package/web/dist/assets/play-CmVAj_fu.js +0 -1
- package/web/dist/assets/popover-D56fhiXj.js +0 -1
- package/web/dist/assets/preview-pane-connected-BmVqfSU5.js +0 -3
- package/web/dist/assets/reference-chip-gQNk-4jc.js +0 -1
- package/web/dist/assets/repo-git-B5ECDUuv.js +0 -1
- package/web/dist/assets/run-header-C0Y1NvEM.js +0 -2
- package/web/dist/assets/skill-empty-hint-oOtzR3v0.js +0 -1
- package/web/dist/assets/skills-DUeTkZ9z.js +0 -1
- package/web/dist/assets/status-dot-1PR0i69P.js +0 -1
- package/web/dist/assets/tab-link-DmWk4l5O.js +0 -1
- package/web/dist/assets/task-changes-DKZXuW89.js +0 -1
- package/web/dist/assets/task-commits-BZ6KxWdF.js +0 -1
- package/web/dist/assets/task-files-DlF7Apcn.js +0 -2
- package/web/dist/assets/task-github-item-CVPo3geZ.js +0 -1
- package/web/dist/assets/task-thread-mm4-ECyo.js +0 -9
- package/web/dist/assets/thread-state-CIw2BlhT.js +0 -4
- package/web/dist/assets/use-hand-to-agent-state-BCDjzHnG.js +0 -1
- package/web/dist/assets/workflows-D8vYD-ql.js +0 -7
- package/web/dist/assets/zoomable-image-CxQSsfcn.js +0 -1
package/dist/task-cli/cli.js
DELETED
|
@@ -1,710 +0,0 @@
|
|
|
1
|
-
import { randomUUID } from 'node:crypto';
|
|
2
|
-
import { open as openFile } from 'node:fs/promises';
|
|
3
|
-
import { resolve } from 'node:path';
|
|
4
|
-
import { parseArgs } from 'node:util';
|
|
5
|
-
import { apiRunSchema, archiveFinishedResponseSchema, cancelResponseSchema, finishResponseSchema, messageResponseSchema, runRecordSchema, runStatusSchema, } from '../contract/index.js';
|
|
6
|
-
import { changesPayloadSchema } from '../contract/index.js';
|
|
7
|
-
import { pendingAskOf } from '../contract/index.js';
|
|
8
|
-
import { asksQuestion } from '../contract/index.js';
|
|
9
|
-
import { runHistoryContextSchema } from '../contract/index.js';
|
|
10
|
-
import { skillSchema } from '../contract/index.js';
|
|
11
|
-
import { openUrl } from '../open-url.js';
|
|
12
|
-
import { RUNNER_IDS } from '../core/agent-runner.js';
|
|
13
|
-
import { runnerFlag, skillFlagIssue, skillTaskSteps } from '../workflows/types.js';
|
|
14
|
-
import { discoverCockpit } from './discovery.js';
|
|
15
|
-
import { handoffUrl, invalidResponse, refuse, request, TaskCliError, threadUrl } from './http.js';
|
|
16
|
-
import { projectListRow, projectStatus } from './projections.js';
|
|
17
|
-
import { DEFAULT_WAIT_UNTIL, readLog, requestRunSummaries, waitForRuns } from './watch.js';
|
|
18
|
-
/**
|
|
19
|
-
* `cez task` — start, watch and steer cockpit tasks from a terminal or a bot (#504, spec
|
|
20
|
-
* 2026-09-24-cez-task-cli). A thin JSON client over the cockpit's own run routes: one JSON
|
|
21
|
-
* object per invocation, and an exit code a caller can branch on without parsing a status.
|
|
22
|
-
*/
|
|
23
|
-
export const EXIT = { ok: 0, failed: 1, refused: 2, timeout: 3, usage: 64 };
|
|
24
|
-
const COMMON = {
|
|
25
|
-
url: { type: 'string', help: '<origin> Cockpit to use instead of discovery (also CEZ_URL).' },
|
|
26
|
-
repo: { type: 'string', help: '<dir> Checkout whose cockpit to find (default: cwd).' },
|
|
27
|
-
help: { type: 'boolean', help: ' Show help; needs no cockpit.' },
|
|
28
|
-
};
|
|
29
|
-
const STATUS_VALUES = runStatusSchema.options.join(', ');
|
|
30
|
-
const TASK_TEXT_MAX_CHARS = 100_000;
|
|
31
|
-
const DEFAULT_TIMEOUT_SECONDS = 600;
|
|
32
|
-
const MAX_TIMEOUT_SECONDS = 1_800;
|
|
33
|
-
const TIMEOUT_FLAG = { type: 'string', help: `<1-${MAX_TIMEOUT_SECONDS}> Give up after this many seconds (default ${DEFAULT_TIMEOUT_SECONDS}).` };
|
|
34
|
-
/** Shared by `wait`, `start --wait` (#553) and `log --follow` (#931): attention is the default, settled the opt-in. */
|
|
35
|
-
const UNTIL_FLAG = { type: 'string', help: '<attention|settled> attention (default): stop when the task needs you or ends; settled: terminal status only.' };
|
|
36
|
-
export const OPERATIONS = {
|
|
37
|
-
start: {
|
|
38
|
-
args: "--task-file <path|-> | '<task>'",
|
|
39
|
-
description: 'Start a task in the cockpit serving this checkout.',
|
|
40
|
-
positionals: [0, 1],
|
|
41
|
-
flags: {
|
|
42
|
-
'task-file': { type: 'string', help: '<path|-> Read the task from a file, or stdin with -.' },
|
|
43
|
-
'request-id': { type: 'string', help: '<UUID> Retry-safe id; reuse it when retrying this start.' },
|
|
44
|
-
workflow: { type: 'string', help: '<name> Workflow (default quick-task).' },
|
|
45
|
-
skill: { type: 'string', help: '<name> Run one discovered skill instead of a workflow.' },
|
|
46
|
-
runner: { type: 'string', help: `<id> ${RUNNER_IDS.join(' | ')}.` },
|
|
47
|
-
backend: { type: 'string', help: '<id> Alias of --runner.' },
|
|
48
|
-
model: { type: 'string', help: '<model> Model override.' },
|
|
49
|
-
effort: { type: 'string', help: '<level> Reasoning effort.' },
|
|
50
|
-
autonomous: { type: 'boolean', help: ' Never park for input; run to completion.' },
|
|
51
|
-
'archive-when-done': { type: 'boolean', help: ' Archive after Done (default off); with --auto-merge-pr, merge first.' },
|
|
52
|
-
'auto-merge-pr': { type: 'boolean', help: ' Merge the task PR after Done when current-head CI and GitHub rules pass (default off); may mark a draft ready.' },
|
|
53
|
-
'no-worktree': { type: 'boolean', help: ' Run in the repo working tree, not a worktree.' },
|
|
54
|
-
wait: { type: 'boolean', help: ' Then wait until the task needs you or ends (see wait).' },
|
|
55
|
-
until: UNTIL_FLAG,
|
|
56
|
-
'timeout-seconds': TIMEOUT_FLAG,
|
|
57
|
-
notify: { type: 'boolean', help: ' POST status changes to the project webhook (default when it has one).' },
|
|
58
|
-
'no-notify': { type: 'boolean', help: ' Do not notify the project webhook.' },
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
list: {
|
|
62
|
-
args: '',
|
|
63
|
-
description: 'List tasks, newest first: currentStepId when running, pullRequestUrl when done/review, error when failed (first line, 200 characters including … when cut). Workers are left out; address one by id.',
|
|
64
|
-
positionals: [0, 0],
|
|
65
|
-
flags: {
|
|
66
|
-
status: { type: 'string', help: `<s>[,<s>…] Only these statuses: ${STATUS_VALUES}.` },
|
|
67
|
-
limit: { type: 'string', help: '<n> At most n rows (default 20).' },
|
|
68
|
-
all: { type: 'boolean', help: ' Include archived tasks.' },
|
|
69
|
-
full: { type: 'boolean', help: ' Print contract ApiRun rows.' },
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
status: {
|
|
73
|
-
args: '<id>',
|
|
74
|
-
description: 'Show one task, including handoffUrl (the handoff endpoint) and the full error when set.',
|
|
75
|
-
positionals: [1, 1],
|
|
76
|
-
flags: { full: { type: 'boolean', help: ' Print the contract ApiRun.' } },
|
|
77
|
-
},
|
|
78
|
-
log: {
|
|
79
|
-
args: '<id>',
|
|
80
|
-
description: "Print a task's recent transcript as JSON lines, oldest first.",
|
|
81
|
-
positionals: [1, 1],
|
|
82
|
-
flags: {
|
|
83
|
-
since: { type: 'string', help: '<seq> Only events after this seq.' },
|
|
84
|
-
'max-chars': { type: 'string', help: '<n> Keep the newest lines within n characters (default 8000).' },
|
|
85
|
-
follow: { type: 'boolean', help: ' Keep streaming until the task needs you or ends (see wait), or the timeout.' },
|
|
86
|
-
until: UNTIL_FLAG,
|
|
87
|
-
'timeout-seconds': TIMEOUT_FLAG,
|
|
88
|
-
},
|
|
89
|
-
},
|
|
90
|
-
wait: {
|
|
91
|
-
args: '<id>...',
|
|
92
|
-
description: 'Block until the tasks need you (default) or settle; exit 0 done/review/attention, 1 failed/cancelled, 3 timeout.',
|
|
93
|
-
positionals: [1, 32],
|
|
94
|
-
flags: {
|
|
95
|
-
mode: { type: 'string', help: '<any|all> Return on the first task or on all of them (default all).' },
|
|
96
|
-
until: UNTIL_FLAG,
|
|
97
|
-
'timeout-seconds': TIMEOUT_FLAG,
|
|
98
|
-
},
|
|
99
|
-
},
|
|
100
|
-
send: {
|
|
101
|
-
args: "<id> '<text>' | <id> --text-file <path|->",
|
|
102
|
-
description: 'Steer or answer a task: delivered to a live session, queued before it starts, resumed from a closed session with --resume (examples below).',
|
|
103
|
-
positionals: [1, 2],
|
|
104
|
-
flags: {
|
|
105
|
-
'text-file': { type: 'string', help: '<path|-> Read the text from a file, or stdin with -.' },
|
|
106
|
-
resume: { type: 'boolean', help: ' Reopen a closed session with this text.' },
|
|
107
|
-
notify: { type: 'boolean', help: ' Also turn the project webhook on for this task.' },
|
|
108
|
-
},
|
|
109
|
-
},
|
|
110
|
-
notify: {
|
|
111
|
-
args: "<id> [--message '<note>' | --message-file <path|->]",
|
|
112
|
-
description: 'Hand a task to the project webhook (on), or stop notifying it (--off). A worker is refused: notify its parent.',
|
|
113
|
-
positionals: [1, 1],
|
|
114
|
-
flags: {
|
|
115
|
-
off: { type: 'boolean', help: ' Stop notifying the webhook about this task.' },
|
|
116
|
-
message: { type: 'string', help: "'<note>' Note for the webhook's task.subscribed delivery." },
|
|
117
|
-
'message-file': { type: 'string', help: '<path|-> Read the note from a file, or stdin with -.' },
|
|
118
|
-
},
|
|
119
|
-
},
|
|
120
|
-
stop: { args: '<id>', description: 'Cancel a task.', positionals: [1, 1], flags: {} },
|
|
121
|
-
finish: { args: '<id>', description: 'Close a waiting session as done.', positionals: [1, 1], flags: {} },
|
|
122
|
-
archive: { args: '<id>', description: 'Archive a task.', positionals: [1, 1], flags: {} },
|
|
123
|
-
unarchive: { args: '<id>', description: 'Restore an archived task.', positionals: [1, 1], flags: {} },
|
|
124
|
-
'archive-finished': { args: '', description: 'Archive finished tasks (scheduled runs and owned workers excluded).', positionals: [0, 0], flags: {} },
|
|
125
|
-
diff: {
|
|
126
|
-
args: '<id>',
|
|
127
|
-
description: "Show a task's changes.",
|
|
128
|
-
positionals: [1, 1],
|
|
129
|
-
flags: { stat: { type: 'boolean', help: ' Per-file counts instead of the patch.' } },
|
|
130
|
-
},
|
|
131
|
-
open: {
|
|
132
|
-
args: '<id>',
|
|
133
|
-
description: "Print (and open) a task's thread URL.",
|
|
134
|
-
positionals: [1, 1],
|
|
135
|
-
flags: { 'no-open': { type: 'boolean', help: ' Print the URL only.' } },
|
|
136
|
-
},
|
|
137
|
-
};
|
|
138
|
-
/**
|
|
139
|
-
* The clear contract (#553, #609), printed on every command a bot reads a run's state from.
|
|
140
|
-
* `attention` and `attentionLabel` come from the cockpit's own attention function (the
|
|
141
|
-
* contract's `deriveAttention`), so what the CLI says a run needs is what Needs You shows.
|
|
142
|
-
*/
|
|
143
|
-
const ATTENTION_HELP_OPERATIONS = new Set(['start', 'wait', 'status', 'list', 'log']);
|
|
144
|
-
const ATTENTION_HELP = [
|
|
145
|
-
'Attention — when a task needs you:',
|
|
146
|
-
' status, list, wait and log --follow carry `attention` (the cockpit bucket) and',
|
|
147
|
-
' `attentionLabel` (its phrase), derived by the same function as the cockpit\'s Needs You.',
|
|
148
|
-
' Read those, not the raw status:',
|
|
149
|
-
' - `waiting` is attention even when no question is pending (a finished turn parks the task);',
|
|
150
|
-
' a pending question also shows as `question` on status, its context as `questionContext`.',
|
|
151
|
-
' - `waiting` on its own open PR or timer wait (attentionLabel "waiting for CI", "waiting for merge" or "monitoring")',
|
|
152
|
-
' is neither settled nor attention: the agent is still watching what it registered. attention: running.',
|
|
153
|
-
' - a task parked on its own workers ("waiting on 2 workers") is attention: none; keep waiting.',
|
|
154
|
-
' - a task held by a provider usage limit ("usage limit, resumes <ISO time>") is attention: none;',
|
|
155
|
-
' it resumes itself at that time.',
|
|
156
|
-
' - attention: waiting | error | permission ends a wait or a follow; attentionLabel says why',
|
|
157
|
-
' ("needs you", "needs review", "failed").',
|
|
158
|
-
' --until attention (default) stops when the task needs you or ends. --until settled is the',
|
|
159
|
-
' opt-in for autonomous runs and bots that want terminal state only (done/review/failed/cancelled).',
|
|
160
|
-
' cez task wait <id> # default: stops when the task needs you',
|
|
161
|
-
' cez task wait <id> --until settled # terminal status only',
|
|
162
|
-
" cez task start '…' --wait # returns as soon as the agent parks for follow-up",
|
|
163
|
-
" cez task start '…' --wait --autonomous --until settled # runs to completion, then returns",
|
|
164
|
-
' cez task log <id> --follow # default: stops when the task needs you',
|
|
165
|
-
' cez task log <id> --follow --until settled # streams until a terminal status',
|
|
166
|
-
'',
|
|
167
|
-
];
|
|
168
|
-
function usage() {
|
|
169
|
-
return { operations: Object.entries(OPERATIONS).map(([name, op]) => ({ name, synopsis: `cez task ${name} ${op.args}`.trim() })) };
|
|
170
|
-
}
|
|
171
|
-
function usageError(error, detail = {}) {
|
|
172
|
-
throw new TaskCliError(EXIT.usage, { code: 'invalid_input', error, ...detail, usage: usage() });
|
|
173
|
-
}
|
|
174
|
-
export function taskHelp(operation) {
|
|
175
|
-
const names = operation ? [operation] : Object.keys(OPERATIONS);
|
|
176
|
-
const flags = new Map();
|
|
177
|
-
for (const name of names)
|
|
178
|
-
for (const [flag, spec] of Object.entries(OPERATIONS[name].flags))
|
|
179
|
-
flags.set(flag, spec);
|
|
180
|
-
for (const [flag, spec] of Object.entries(COMMON))
|
|
181
|
-
flags.set(flag, spec);
|
|
182
|
-
return [
|
|
183
|
-
'cezar task — start, watch and steer cockpit tasks from the terminal', '', 'Usage:',
|
|
184
|
-
' cez task [--url <origin> | --repo <dir>] <operation> …',
|
|
185
|
-
...names.flatMap((name) => {
|
|
186
|
-
const op = OPERATIONS[name];
|
|
187
|
-
return [` cez task ${name} ${op.args}`.trimEnd(), ` ${op.description}`];
|
|
188
|
-
}), '', 'Options:',
|
|
189
|
-
...[...flags].map(([flag, spec]) => ` --${flag} ${spec.help}`), '',
|
|
190
|
-
...(names.some((name) => ATTENTION_HELP_OPERATIONS.has(name)) ? ATTENTION_HELP : []),
|
|
191
|
-
...(names.includes('start') ? [
|
|
192
|
-
'Safe task input (file or stdin):',
|
|
193
|
-
' cez task start --task-file task.md',
|
|
194
|
-
" cez task start --task-file - <<'EOF'",
|
|
195
|
-
'Fix the `cez task` docs; keep $(example) literal.',
|
|
196
|
-
'EOF', '',
|
|
197
|
-
'POSIX shells expand backticks and $() in double-quoted arguments',
|
|
198
|
-
'before the CLI receives the text. Do not put raw backticks in double-quoted task arguments.',
|
|
199
|
-
'Use --task-file PATH or --task-file - with a quoted heredoc delimiter as above.',
|
|
200
|
-
"For short tasks, a single-quoted positional argument still works: cez task start 'Fix the typo'.", '',
|
|
201
|
-
] : []),
|
|
202
|
-
...(names.includes('send') ? [
|
|
203
|
-
'Send — steer, answer or reopen:',
|
|
204
|
-
' delivery: delivered means the live session accepted the text; queued means it is saved',
|
|
205
|
-
' for a task that has not started; resumed means --resume reopened a closed session.',
|
|
206
|
-
' Steer while running:',
|
|
207
|
-
" cez task send <id> 'Use the retry helper instead'",
|
|
208
|
-
' Answer a pending question after wait ends with attention: waiting, or status shows question:',
|
|
209
|
-
" cez task send <id> 'Use option A'",
|
|
210
|
-
' Reopen a settled session:',
|
|
211
|
-
" cez task send <id> --resume '…'",
|
|
212
|
-
' Without --resume a closed session returns delivery: not-delivered and a next command.',
|
|
213
|
-
' Use --text-file <path|-> for multi-line or shell-sensitive text; --text-file - reads stdin.',
|
|
214
|
-
' See the safe task input / quoting note in cez task start --help; the same shell rules apply.',
|
|
215
|
-
'',
|
|
216
|
-
] : []),
|
|
217
|
-
'Commands find the running cockpit that serves this checkout (ports 4321-4370) and print JSON.',
|
|
218
|
-
'notify: with a task webhook set in Settings → General, start notifies it unless --no-notify;',
|
|
219
|
-
'the webhook gets task.status, task.question and task.subscribed POSTs.',
|
|
220
|
-
'Exit codes: 0 ok (wait/start --wait: done, review, or stopped for attention) · 1 task failed/cancelled',
|
|
221
|
-
'or message not delivered · 2 no cockpit or refused · 3 timed out · 64 usage error.',
|
|
222
|
-
].join('\n');
|
|
223
|
-
}
|
|
224
|
-
async function readStdin() {
|
|
225
|
-
const chunks = [];
|
|
226
|
-
let size = 0;
|
|
227
|
-
for await (const chunk of process.stdin) {
|
|
228
|
-
const buffer = Buffer.isBuffer(chunk) ? chunk : Buffer.from(String(chunk));
|
|
229
|
-
size += buffer.length;
|
|
230
|
-
if (size > TASK_TEXT_MAX_CHARS * 4)
|
|
231
|
-
usageError('stdin is larger than the 100000-character limit');
|
|
232
|
-
chunks.push(buffer);
|
|
233
|
-
}
|
|
234
|
-
return Buffer.concat(chunks, size).toString('utf8');
|
|
235
|
-
}
|
|
236
|
-
async function readTextFile(path) {
|
|
237
|
-
let handle;
|
|
238
|
-
try {
|
|
239
|
-
handle = await openFile(path, 'r');
|
|
240
|
-
}
|
|
241
|
-
catch {
|
|
242
|
-
usageError(`cannot read ${path}`);
|
|
243
|
-
}
|
|
244
|
-
try {
|
|
245
|
-
const buffer = Buffer.alloc(TASK_TEXT_MAX_CHARS * 4 + 1);
|
|
246
|
-
const { bytesRead } = await handle.read(buffer, 0, buffer.length, 0);
|
|
247
|
-
if (bytesRead > TASK_TEXT_MAX_CHARS * 4)
|
|
248
|
-
usageError(`${path} is larger than the 100000-character limit`);
|
|
249
|
-
return buffer.subarray(0, bytesRead).toString('utf8');
|
|
250
|
-
}
|
|
251
|
-
finally {
|
|
252
|
-
await handle.close();
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
/** A positional, or `--*-file <path|->`; never both, never empty. */
|
|
256
|
-
async function textArgument(io, operation, positional, file, what) {
|
|
257
|
-
if (positional !== undefined && file !== undefined)
|
|
258
|
-
usageError(`${operation} takes the ${what} as an argument or a file, not both`);
|
|
259
|
-
const text = file === undefined ? positional : file === '-' ? await (io.stdin ?? readStdin)() : await readTextFile(file);
|
|
260
|
-
if (text === undefined || !text.trim())
|
|
261
|
-
usageError(`${operation} is missing the ${what}`);
|
|
262
|
-
if (text.length > TASK_TEXT_MAX_CHARS)
|
|
263
|
-
usageError(`${what} is longer than ${TASK_TEXT_MAX_CHARS} characters`);
|
|
264
|
-
return text;
|
|
265
|
-
}
|
|
266
|
-
function parseOperation(argv) {
|
|
267
|
-
// Only COMMON belongs before the operation. Keep the operation's existing strict
|
|
268
|
-
// parseArgs path below, including its handling of positionals and repeated flags.
|
|
269
|
-
const leading = {};
|
|
270
|
-
let index = 0;
|
|
271
|
-
while (argv[index]?.startsWith('-')) {
|
|
272
|
-
const token = argv[index];
|
|
273
|
-
const equals = token.indexOf('=');
|
|
274
|
-
const option = equals === -1 ? token : token.slice(0, equals);
|
|
275
|
-
const flag = option === '-h' ? 'help' : option.startsWith('--') ? option.slice(2) : option;
|
|
276
|
-
if (!Object.hasOwn(COMMON, flag)) {
|
|
277
|
-
usageError(`unknown option '${option}' before the operation; only --url, --repo and --help go there`);
|
|
278
|
-
}
|
|
279
|
-
if (leading[flag] !== undefined)
|
|
280
|
-
usageError(`duplicate option '--${flag}'`);
|
|
281
|
-
if (COMMON[flag].type === 'boolean') {
|
|
282
|
-
if (equals !== -1)
|
|
283
|
-
usageError(`option '${option}' does not take a value`);
|
|
284
|
-
leading[flag] = true;
|
|
285
|
-
}
|
|
286
|
-
else {
|
|
287
|
-
const value = equals === -1 ? argv[++index] : token.slice(equals + 1);
|
|
288
|
-
if (value === undefined || value === '' || value.startsWith('--'))
|
|
289
|
-
usageError(`option '${option}' requires a value`);
|
|
290
|
-
leading[flag] = value;
|
|
291
|
-
}
|
|
292
|
-
index += 1;
|
|
293
|
-
}
|
|
294
|
-
const name = argv[index];
|
|
295
|
-
if (name === undefined)
|
|
296
|
-
usageError('missing operation');
|
|
297
|
-
const operation = OPERATIONS[name];
|
|
298
|
-
if (!operation)
|
|
299
|
-
usageError(`unknown operation '${name}'`);
|
|
300
|
-
const options = Object.fromEntries(Object.entries({ ...operation.flags, ...COMMON }).map(([flag, spec]) => [flag, { type: spec.type, ...(spec.multiple ? { multiple: true } : {}) }]));
|
|
301
|
-
let parsed;
|
|
302
|
-
try {
|
|
303
|
-
parsed = parseArgs({ args: argv.slice(index + 1), options, allowPositionals: true, strict: true });
|
|
304
|
-
}
|
|
305
|
-
catch (error) {
|
|
306
|
-
usageError(`${name}: ${error instanceof Error ? error.message : 'invalid arguments'}`);
|
|
307
|
-
}
|
|
308
|
-
const values = parsed.values;
|
|
309
|
-
for (const [flag, value] of Object.entries(leading)) {
|
|
310
|
-
if (values[flag] !== undefined)
|
|
311
|
-
usageError(`duplicate option '--${flag}'`);
|
|
312
|
-
values[flag] = value;
|
|
313
|
-
}
|
|
314
|
-
if (!values.help) {
|
|
315
|
-
const [min, max] = operation.positionals;
|
|
316
|
-
if (parsed.positionals.length < min)
|
|
317
|
-
usageError(`${name} is missing a positional`);
|
|
318
|
-
if (parsed.positionals.length > max)
|
|
319
|
-
usageError(`${name} has an extra argument`);
|
|
320
|
-
}
|
|
321
|
-
return { name, values, positionals: parsed.positionals };
|
|
322
|
-
}
|
|
323
|
-
function positiveInt(value, flag, max) {
|
|
324
|
-
if (value === undefined)
|
|
325
|
-
return undefined;
|
|
326
|
-
if (typeof value !== 'string' || !/^\d+$/.test(value) || Number(value) < 1 || Number(value) > max) {
|
|
327
|
-
usageError(`--${flag} must be an integer from 1 to ${max}`);
|
|
328
|
-
}
|
|
329
|
-
return Number(value);
|
|
330
|
-
}
|
|
331
|
-
function nonNegativeInt(value, flag) {
|
|
332
|
-
if (value === undefined)
|
|
333
|
-
return undefined;
|
|
334
|
-
if (typeof value !== 'string' || !/^\d+$/.test(value))
|
|
335
|
-
usageError(`--${flag} must be a non-negative integer`);
|
|
336
|
-
return Number(value);
|
|
337
|
-
}
|
|
338
|
-
function timeoutMs(values) {
|
|
339
|
-
return (positiveInt(values['timeout-seconds'], 'timeout-seconds', MAX_TIMEOUT_SECONDS) ?? DEFAULT_TIMEOUT_SECONDS) * 1_000;
|
|
340
|
-
}
|
|
341
|
-
function oneOf(value, flag, allowed, fallback) {
|
|
342
|
-
if (value === undefined)
|
|
343
|
-
return fallback;
|
|
344
|
-
if (typeof value !== 'string' || !allowed.includes(value))
|
|
345
|
-
usageError(`--${flag} must be one of ${allowed.join(', ')}`);
|
|
346
|
-
return value;
|
|
347
|
-
}
|
|
348
|
-
function waitUntil(values) {
|
|
349
|
-
return oneOf(values.until, 'until', ['settled', 'attention'], DEFAULT_WAIT_UNTIL);
|
|
350
|
-
}
|
|
351
|
-
function statuses(value) {
|
|
352
|
-
if (typeof value !== 'string')
|
|
353
|
-
return undefined;
|
|
354
|
-
const list = value.split(',').map((entry) => entry.trim()).filter(Boolean);
|
|
355
|
-
const invalid = list.find((entry) => !runStatusSchema.safeParse(entry).success);
|
|
356
|
-
if (invalid)
|
|
357
|
-
usageError(`unknown status '${invalid}'; one of ${STATUS_VALUES}`);
|
|
358
|
-
return new Set(list);
|
|
359
|
-
}
|
|
360
|
-
/** Every flag check `execute` makes, run up front so a bad flag never waits on discovery. */
|
|
361
|
-
function validateFlags(name, values) {
|
|
362
|
-
if (name === 'start') {
|
|
363
|
-
const issue = skillFlagIssue({
|
|
364
|
-
skill: values.skill,
|
|
365
|
-
workflow: values.workflow,
|
|
366
|
-
});
|
|
367
|
-
if (issue)
|
|
368
|
-
usageError(issue);
|
|
369
|
-
const runner = runnerFlag({ runner: values.runner, backend: values.backend });
|
|
370
|
-
if (runner.issue)
|
|
371
|
-
usageError(runner.issue);
|
|
372
|
-
if (values.notify && values['no-notify'])
|
|
373
|
-
usageError('--notify and --no-notify cannot be used together');
|
|
374
|
-
if (values.until !== undefined && !values.wait)
|
|
375
|
-
usageError('--until needs --wait');
|
|
376
|
-
}
|
|
377
|
-
if (name === 'log' && values.until !== undefined && !values.follow)
|
|
378
|
-
usageError('--until needs --follow');
|
|
379
|
-
if (name === 'notify') {
|
|
380
|
-
if (values.message !== undefined && values['message-file'] !== undefined)
|
|
381
|
-
usageError('notify takes the note as --message or --message-file, not both');
|
|
382
|
-
if (values.off && (values.message !== undefined || values['message-file'] !== undefined))
|
|
383
|
-
usageError('--off takes no note');
|
|
384
|
-
}
|
|
385
|
-
if (name === 'list') {
|
|
386
|
-
statuses(values.status);
|
|
387
|
-
positiveInt(values.limit, 'limit', 1_000);
|
|
388
|
-
}
|
|
389
|
-
if (name === 'wait')
|
|
390
|
-
oneOf(values.mode, 'mode', ['any', 'all'], 'all');
|
|
391
|
-
if (name === 'wait' || name === 'start' || name === 'log')
|
|
392
|
-
waitUntil(values);
|
|
393
|
-
if (name === 'log') {
|
|
394
|
-
nonNegativeInt(values.since, 'since');
|
|
395
|
-
positiveInt(values['max-chars'], 'max-chars', 1_000_000);
|
|
396
|
-
}
|
|
397
|
-
if (name === 'wait' || name === 'log' || (name === 'start' && values.wait))
|
|
398
|
-
timeoutMs(values);
|
|
399
|
-
}
|
|
400
|
-
async function getRun(cockpit, id) {
|
|
401
|
-
const result = await request(cockpit, `/runs/${encodeURIComponent(id)}`);
|
|
402
|
-
if (result.status !== 200)
|
|
403
|
-
refuse(result);
|
|
404
|
-
const run = apiRunSchema.safeParse(result.data);
|
|
405
|
-
return run.success ? run.data : invalidResponse('run');
|
|
406
|
-
}
|
|
407
|
-
/** `list --full` prints contract `ApiRun` rows, so it alone still reads every full record. */
|
|
408
|
-
async function listRuns(cockpit) {
|
|
409
|
-
const result = await request(cockpit, '/runs');
|
|
410
|
-
if (result.status !== 200)
|
|
411
|
-
refuse(result);
|
|
412
|
-
const runs = apiRunSchema.array().safeParse(result.data);
|
|
413
|
-
return runs.success ? runs.data : invalidResponse('run list');
|
|
414
|
-
}
|
|
415
|
-
/**
|
|
416
|
-
* Workers are steer targets of their parent, not tasks ops follows (#635): the list leaves them
|
|
417
|
-
* out, and subscribing one to the webhook is refused with the parent to subscribe instead. Every
|
|
418
|
-
* other id-addressed operation still reaches a worker.
|
|
419
|
-
*/
|
|
420
|
-
function workerParent(run) {
|
|
421
|
-
return run.delegation?.role === 'worker' ? run.delegation.parentRunId : undefined;
|
|
422
|
-
}
|
|
423
|
-
async function refuseWorkerNotify(cockpit, id) {
|
|
424
|
-
const parentId = workerParent(await getRun(cockpit, id));
|
|
425
|
-
if (parentId !== undefined) {
|
|
426
|
-
usageError(`task ${id} is a worker of task ${parentId}; notify the parent instead: cez task notify ${parentId}`, { parentId });
|
|
427
|
-
}
|
|
428
|
-
}
|
|
429
|
-
/** The latest valid unanswered question, from the same derivation the cockpit renders. */
|
|
430
|
-
async function pendingQuestion(cockpit, id) {
|
|
431
|
-
const result = await request(cockpit, `/runs/${encodeURIComponent(id)}/history-context`);
|
|
432
|
-
const context = runHistoryContextSchema.safeParse(result.data);
|
|
433
|
-
return result.status === 200 && context.success ? pendingAskOf(context.data.contextEvents) : undefined;
|
|
434
|
-
}
|
|
435
|
-
async function start(cockpit, io, values, task, print) {
|
|
436
|
-
const waitMs = values.wait ? timeoutMs(values) : undefined;
|
|
437
|
-
const requestId = values['request-id'] ?? randomUUID();
|
|
438
|
-
const skill = values.skill;
|
|
439
|
-
const { runner } = runnerFlag({ runner: values.runner, backend: values.backend });
|
|
440
|
-
// `--notify` is an explicit opt-in the server may refuse (no webhook: 400 with a hint). The
|
|
441
|
-
// implicit default only opts in where the project has a webhook, so a bot on a fresh project
|
|
442
|
-
// is never blocked (#589).
|
|
443
|
-
const notify = values['no-notify'] ? false : values.notify ? true : cockpit.hasWebhook ? true : undefined;
|
|
444
|
-
let warning;
|
|
445
|
-
if (skill !== undefined) {
|
|
446
|
-
// Discovery is advisory: the catalog can change before a queued run executes. The server
|
|
447
|
-
// handles missing skills with a plain prompt, and idempotent retries still go to POST /runs.
|
|
448
|
-
const unverified = `could not check whether skill "${skill}" is available; the run may use the plain prompt`;
|
|
449
|
-
try {
|
|
450
|
-
const catalog = await request(cockpit, '/skills?wait=1');
|
|
451
|
-
if (catalog.status === 200) {
|
|
452
|
-
const skills = skillSchema.array().safeParse(catalog.data);
|
|
453
|
-
warning = skills.success
|
|
454
|
-
? skills.data.some((entry) => entry.name === skill)
|
|
455
|
-
? undefined
|
|
456
|
-
: `skill "${skill}" is not currently available; the run may use the plain prompt`
|
|
457
|
-
: unverified;
|
|
458
|
-
}
|
|
459
|
-
else {
|
|
460
|
-
warning = unverified;
|
|
461
|
-
}
|
|
462
|
-
}
|
|
463
|
-
catch {
|
|
464
|
-
warning = unverified;
|
|
465
|
-
}
|
|
466
|
-
}
|
|
467
|
-
const result = await request(cockpit, '/runs', {
|
|
468
|
-
body: {
|
|
469
|
-
task,
|
|
470
|
-
...(skill === undefined
|
|
471
|
-
? { workflow: values.workflow ?? 'quick-task' }
|
|
472
|
-
: { steps: skillTaskSteps(skill) }),
|
|
473
|
-
...(runner === undefined ? {} : { runner }),
|
|
474
|
-
...(values.model === undefined ? {} : { model: values.model }),
|
|
475
|
-
...(values.effort === undefined ? {} : { effort: values.effort }),
|
|
476
|
-
...(values.autonomous ? { autonomous: true } : {}),
|
|
477
|
-
...(values['archive-when-done'] ? { archiveWhenDone: true } : {}),
|
|
478
|
-
...(values['auto-merge-pr'] ? { autoMergePr: true } : {}),
|
|
479
|
-
...(values['no-worktree'] ? { worktree: false } : {}),
|
|
480
|
-
...(notify === undefined ? {} : { notify }),
|
|
481
|
-
clientRequestId: requestId,
|
|
482
|
-
},
|
|
483
|
-
});
|
|
484
|
-
if (result.status !== 200 && result.status !== 201)
|
|
485
|
-
refuse(result);
|
|
486
|
-
const run = runRecordSchema.safeParse(result.data);
|
|
487
|
-
if (!run.success)
|
|
488
|
-
invalidResponse('start');
|
|
489
|
-
const started = {
|
|
490
|
-
id: run.data.id,
|
|
491
|
-
url: threadUrl(cockpit, run.data.id),
|
|
492
|
-
status: run.data.status,
|
|
493
|
-
created: result.status === 201,
|
|
494
|
-
requestId,
|
|
495
|
-
notify: run.data.notify === true,
|
|
496
|
-
...(warning === undefined ? {} : { warning }),
|
|
497
|
-
...(run.data.branch === undefined ? {} : { branch: run.data.branch }),
|
|
498
|
-
};
|
|
499
|
-
if (waitMs === undefined) {
|
|
500
|
-
print(started);
|
|
501
|
-
return EXIT.ok;
|
|
502
|
-
}
|
|
503
|
-
const waited = await waitForRuns(cockpit, [run.data.id], { mode: 'all', until: waitUntil(values), timeoutMs: waitMs, pollMs: io.pollMs });
|
|
504
|
-
const final = waited.runs[0];
|
|
505
|
-
print({ ...started, ...final, until: waited.until, timedOut: waited.timedOut });
|
|
506
|
-
return waited.exitCode;
|
|
507
|
-
}
|
|
508
|
-
async function setNotify(cockpit, id, notify, message) {
|
|
509
|
-
const result = await request(cockpit, `/runs/${encodeURIComponent(id)}/notify`, {
|
|
510
|
-
body: { notify, ...(message === undefined ? {} : { message }) },
|
|
511
|
-
});
|
|
512
|
-
if (result.status !== 200)
|
|
513
|
-
refuse(result);
|
|
514
|
-
const run = runRecordSchema.safeParse(result.data);
|
|
515
|
-
return run.success ? run.data : invalidResponse('notify');
|
|
516
|
-
}
|
|
517
|
-
async function send(cockpit, values, id, text, print) {
|
|
518
|
-
const path = `/runs/${encodeURIComponent(id)}`;
|
|
519
|
-
if (values.notify)
|
|
520
|
-
await refuseWorkerNotify(cockpit, id);
|
|
521
|
-
// Before the message, so the status change it causes is already reported.
|
|
522
|
-
const notified = values.notify ? { notify: (await setNotify(cockpit, id, true, undefined)).notify === true } : {};
|
|
523
|
-
const delivered = await request(cockpit, `${path}/messages`, { body: { text } });
|
|
524
|
-
if (delivered.status === 200) {
|
|
525
|
-
const answer = messageResponseSchema.safeParse(delivered.data);
|
|
526
|
-
if (!answer.success)
|
|
527
|
-
invalidResponse('message');
|
|
528
|
-
const delivery = 'delivered' in answer.data ? 'delivered' : 'queued' in answer.data ? 'queued' : 'deferred';
|
|
529
|
-
print({ id, delivery, ...notified });
|
|
530
|
-
return EXIT.ok;
|
|
531
|
-
}
|
|
532
|
-
const closed = delivered.status === 409 && delivered.data?.error === 'session closed';
|
|
533
|
-
if (!closed)
|
|
534
|
-
refuse(delivered);
|
|
535
|
-
if (!values.resume) {
|
|
536
|
-
print({ id, delivery: 'not-delivered', reason: 'session closed', next: `cez task send ${id} '…' --resume`, ...notified });
|
|
537
|
-
return EXIT.failed;
|
|
538
|
-
}
|
|
539
|
-
const resumed = await request(cockpit, `${path}/continue`, { body: { text } });
|
|
540
|
-
if (resumed.status !== 200)
|
|
541
|
-
refuse(resumed);
|
|
542
|
-
print({ id, delivery: 'resumed', ...notified });
|
|
543
|
-
return EXIT.ok;
|
|
544
|
-
}
|
|
545
|
-
async function execute(name, cockpit, io, values, positionals, text, print) {
|
|
546
|
-
const id = positionals[0];
|
|
547
|
-
const path = `/runs/${encodeURIComponent(id)}`;
|
|
548
|
-
switch (name) {
|
|
549
|
-
case 'start':
|
|
550
|
-
return start(cockpit, io, values, text, print);
|
|
551
|
-
case 'send':
|
|
552
|
-
return send(cockpit, values, id, text, print);
|
|
553
|
-
case 'notify': {
|
|
554
|
-
// --off stays open so a subscription made before this guard can still be undone.
|
|
555
|
-
if (!values.off)
|
|
556
|
-
await refuseWorkerNotify(cockpit, id);
|
|
557
|
-
const run = await setNotify(cockpit, id, !values.off, text);
|
|
558
|
-
print({ id, notify: run.notify === true, ...(text === undefined ? {} : { message: true }) });
|
|
559
|
-
return EXIT.ok;
|
|
560
|
-
}
|
|
561
|
-
case 'wait': {
|
|
562
|
-
const mode = oneOf(values.mode, 'mode', ['any', 'all'], 'all');
|
|
563
|
-
const waited = await waitForRuns(cockpit, positionals, { mode, until: waitUntil(values), timeoutMs: timeoutMs(values), pollMs: io.pollMs });
|
|
564
|
-
print({ until: waited.until, runs: waited.runs, timedOut: waited.timedOut });
|
|
565
|
-
return waited.exitCode;
|
|
566
|
-
}
|
|
567
|
-
case 'log': {
|
|
568
|
-
const since = nonNegativeInt(values.since, 'since') ?? 0;
|
|
569
|
-
const maxChars = positiveInt(values['max-chars'], 'max-chars', 1_000_000) ?? 8_000;
|
|
570
|
-
// An unknown run is the history route's 404, passed through. Without --follow the replay
|
|
571
|
-
// ends at its boundary; the deadline is only a backstop there.
|
|
572
|
-
return readLog(cockpit, id, {
|
|
573
|
-
afterSeq: since, maxChars, follow: values.follow === true, until: waitUntil(values),
|
|
574
|
-
deadline: Date.now() + (values.follow ? timeoutMs(values) : 45_000),
|
|
575
|
-
print: (line) => io.stdout(line),
|
|
576
|
-
});
|
|
577
|
-
}
|
|
578
|
-
case 'status': {
|
|
579
|
-
const run = await getRun(cockpit, id);
|
|
580
|
-
if (values.full) {
|
|
581
|
-
print(run);
|
|
582
|
-
return EXIT.ok;
|
|
583
|
-
}
|
|
584
|
-
const question = asksQuestion(run) ? await pendingQuestion(cockpit, id) : undefined;
|
|
585
|
-
print({ ...projectStatus(run, threadUrl(cockpit, id), question), handoffUrl: handoffUrl(cockpit, id) });
|
|
586
|
-
return EXIT.ok;
|
|
587
|
-
}
|
|
588
|
-
case 'list': {
|
|
589
|
-
const wanted = statuses(values.status);
|
|
590
|
-
const limit = positiveInt(values.limit, 'limit', 1_000) ?? 20;
|
|
591
|
-
const listed = (runs) => runs
|
|
592
|
-
.filter((run) => workerParent(run) === undefined)
|
|
593
|
-
.filter((run) => values.all || !run.archived)
|
|
594
|
-
.filter((run) => !wanted || wanted.has(run.status))
|
|
595
|
-
.sort((a, b) => b.createdAt.localeCompare(a.createdAt));
|
|
596
|
-
// Without --all, archived runs are dropped above, so the windowed list (#864) has every row
|
|
597
|
-
// this prints; --all needs every archived run there is.
|
|
598
|
-
const summaries = () => requestRunSummaries(cockpit, undefined, values.all ? {} : { archived: 'recent' });
|
|
599
|
-
const runs = values.full ? listed(await listRuns(cockpit)) : listed(await summaries());
|
|
600
|
-
print({ runs: runs.slice(0, limit).map((run) => (values.full ? run : projectListRow(run))), total: runs.length });
|
|
601
|
-
return EXIT.ok;
|
|
602
|
-
}
|
|
603
|
-
case 'stop': {
|
|
604
|
-
const result = await request(cockpit, `${path}/cancel`, { body: {} });
|
|
605
|
-
const answer = cancelResponseSchema.safeParse(result.data);
|
|
606
|
-
if (result.status !== 200)
|
|
607
|
-
refuse(result);
|
|
608
|
-
if (!answer.success)
|
|
609
|
-
invalidResponse('cancel');
|
|
610
|
-
print({ id, cancelled: answer.data.cancelled });
|
|
611
|
-
return EXIT.ok;
|
|
612
|
-
}
|
|
613
|
-
case 'finish': {
|
|
614
|
-
const result = await request(cockpit, `${path}/finish`, { body: {} });
|
|
615
|
-
if (result.status !== 200)
|
|
616
|
-
refuse(result);
|
|
617
|
-
if (!finishResponseSchema.safeParse(result.data).success)
|
|
618
|
-
invalidResponse('finish');
|
|
619
|
-
print({ id, finished: true });
|
|
620
|
-
return EXIT.ok;
|
|
621
|
-
}
|
|
622
|
-
case 'archive':
|
|
623
|
-
case 'unarchive': {
|
|
624
|
-
const archived = name === 'archive';
|
|
625
|
-
const result = await request(cockpit, `${path}/archive`, { body: { archived } });
|
|
626
|
-
if (result.status !== 200)
|
|
627
|
-
refuse(result);
|
|
628
|
-
const run = runRecordSchema.safeParse(result.data);
|
|
629
|
-
if (!run.success)
|
|
630
|
-
invalidResponse('archive');
|
|
631
|
-
print({ id: run.data.id, archived: run.data.archived === true });
|
|
632
|
-
return EXIT.ok;
|
|
633
|
-
}
|
|
634
|
-
case 'archive-finished': {
|
|
635
|
-
const result = await request(cockpit, '/runs/archive-finished', { method: 'POST' });
|
|
636
|
-
if (result.status !== 200)
|
|
637
|
-
refuse(result);
|
|
638
|
-
const answer = archiveFinishedResponseSchema.safeParse(result.data);
|
|
639
|
-
if (!answer.success)
|
|
640
|
-
invalidResponse('archive-finished');
|
|
641
|
-
print(answer.data);
|
|
642
|
-
return EXIT.ok;
|
|
643
|
-
}
|
|
644
|
-
case 'diff': {
|
|
645
|
-
if (values.stat) {
|
|
646
|
-
const result = await request(cockpit, `${path}/changes`);
|
|
647
|
-
if (result.status !== 200)
|
|
648
|
-
refuse(result);
|
|
649
|
-
const changes = changesPayloadSchema.safeParse(result.data);
|
|
650
|
-
if (!changes.success)
|
|
651
|
-
invalidResponse('changes');
|
|
652
|
-
print({ id, stat: changes.data.stat, files: changes.data.files.map((file) => ({ path: file.path, status: file.status, adds: file.adds, dels: file.dels })) });
|
|
653
|
-
return EXIT.ok;
|
|
654
|
-
}
|
|
655
|
-
const result = await request(cockpit, `${path}/diff`);
|
|
656
|
-
if (result.status !== 200)
|
|
657
|
-
refuse(result);
|
|
658
|
-
print({ id, diff: typeof result.data === 'string' ? result.data : invalidResponse('diff') });
|
|
659
|
-
return EXIT.ok;
|
|
660
|
-
}
|
|
661
|
-
case 'open': {
|
|
662
|
-
const run = await getRun(cockpit, id);
|
|
663
|
-
const url = threadUrl(cockpit, run.id);
|
|
664
|
-
if (!values['no-open'])
|
|
665
|
-
(io.open ?? openUrl)(url);
|
|
666
|
-
print({ id: run.id, url, opened: !values['no-open'] });
|
|
667
|
-
return EXIT.ok;
|
|
668
|
-
}
|
|
669
|
-
default:
|
|
670
|
-
return usageError(`unknown operation '${name}'`);
|
|
671
|
-
}
|
|
672
|
-
}
|
|
673
|
-
export async function runTaskCommand(argv, env, io = { stdout: (line) => console.log(line) }) {
|
|
674
|
-
const print = (value) => io.stdout(JSON.stringify(value));
|
|
675
|
-
try {
|
|
676
|
-
if (argv.length === 1 && (argv[0] === '-h' || argv[0] === '--help')) {
|
|
677
|
-
io.stdout(taskHelp());
|
|
678
|
-
return EXIT.ok;
|
|
679
|
-
}
|
|
680
|
-
const { name, values, positionals } = parseOperation(argv);
|
|
681
|
-
if (values.help) {
|
|
682
|
-
io.stdout(taskHelp(name));
|
|
683
|
-
return EXIT.ok;
|
|
684
|
-
}
|
|
685
|
-
// Input is judged before any cockpit is looked for: a usage error is exit 64 whether or not
|
|
686
|
-
// a cockpit is running, and stdin is read once, here.
|
|
687
|
-
const text = name === 'start'
|
|
688
|
-
? await textArgument(io, 'start', positionals[0], values['task-file'], 'task')
|
|
689
|
-
: name === 'send'
|
|
690
|
-
? await textArgument(io, 'send', positionals[1], values['text-file'], 'text')
|
|
691
|
-
: name === 'notify' && (values.message !== undefined || values['message-file'] !== undefined)
|
|
692
|
-
? await textArgument(io, 'notify', values.message, values['message-file'], 'note')
|
|
693
|
-
: undefined;
|
|
694
|
-
validateFlags(name, values);
|
|
695
|
-
const cockpit = await (io.discover ?? discoverCockpit)({
|
|
696
|
-
url: values.url ?? (env.CEZ_URL?.trim() || undefined),
|
|
697
|
-
repoDir: resolve(values.repo ?? process.cwd()),
|
|
698
|
-
});
|
|
699
|
-
return await execute(name, cockpit, io, values, positionals, text, print);
|
|
700
|
-
}
|
|
701
|
-
catch (error) {
|
|
702
|
-
if (error instanceof TaskCliError) {
|
|
703
|
-
print(error.body);
|
|
704
|
-
return error.exitCode;
|
|
705
|
-
}
|
|
706
|
-
print({ code: 'internal', error: error instanceof Error ? error.message : String(error) });
|
|
707
|
-
return EXIT.refused;
|
|
708
|
-
}
|
|
709
|
-
}
|
|
710
|
-
//# sourceMappingURL=cli.js.map
|