@wjarka/cezarion 0.17.0 → 0.18.0
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 +21 -59
- package/web/dist/assets/activity-motion-0wHCeUs7.css +1 -0
- package/web/dist/assets/activity-motion-hhx0e841.js +2 -0
- package/web/dist/assets/activity-route-De0BnSrc.js +1 -0
- package/web/dist/assets/agent-accounts-BCg-578Q.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-BT0U4GN_.js +1 -0
- package/web/dist/assets/commit-diff-panel-DYtYc_dH.js +1 -0
- package/web/dist/assets/control-locations-CA9TMupq.js +1 -0
- package/web/dist/assets/design-icons-DmYTv2r1.js +1 -0
- package/web/dist/assets/diff-controls-BR2uqhwG.js +1 -0
- package/web/dist/assets/diff-tVGVhYyc.js +3 -0
- package/web/dist/assets/diff-view-CNM3u77o.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-C1eTdJLJ.js +2 -0
- package/web/dist/assets/git-toolbar-Dwz8p8GW.js +1 -0
- package/web/dist/assets/github-BSezqH6f.js +1 -0
- package/web/dist/assets/github-sidebar-model-Ct0DltOv.js +1 -0
- package/web/dist/assets/global-activity-route-BZiYz-B0.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-D489J7QW.js +14 -0
- package/web/dist/assets/index.global-D3Ga_D3Y.js +1 -0
- package/web/dist/assets/live-protocol-BDY7JJpT.js +64 -0
- package/web/dist/assets/live-refetch-C0kQc3-z.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-DGkEs_L3.js +3 -0
- package/web/dist/assets/project-router-1m_VlC22.js +1 -0
- package/web/dist/assets/project-scope-context-CaUqlAd7.js +4 -0
- package/web/dist/assets/queries-DYfIpJ-d.js +1 -0
- package/web/dist/assets/repo-git-CU1S5P-y.js +1 -0
- package/web/dist/assets/report-reader-DlZol2Ux.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-DIGGjk7C.js +1 -0
- package/web/dist/assets/run-header-DPjiPKRe.js +2 -0
- package/web/dist/assets/skill-empty-hint-YDmkqgo-.js +1 -0
- package/web/dist/assets/skills-BMwanop_.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-DCUifQ46.js +1 -0
- package/web/dist/assets/task-changes-BZXWvQN3.js +1 -0
- package/web/dist/assets/task-commits-ByI9MSfc.js +1 -0
- package/web/dist/assets/task-files-LJbenpiH.js +1 -0
- package/web/dist/assets/task-github-item-B0CU9lGR.js +1 -0
- package/web/dist/assets/task-thread-CXCN__1a.js +9 -0
- package/web/dist/assets/textarea-DlVUfdWG.js +1 -0
- package/web/dist/assets/thread-state-BLaCzqeX.js +4 -0
- package/web/dist/assets/toaster-B1MyeHiE.js +1 -0
- package/web/dist/assets/use-hand-to-agent-state-BkmKad8x.js +1 -0
- package/web/dist/assets/useInfiniteQuery-qEY8OhKb.js +1 -0
- package/web/dist/assets/useQuery-DOJQOEBO.js +1 -0
- package/web/dist/assets/workflows-Dbxb-d-6.js +7 -0
- package/web/dist/assets/ws-DvGmrP4z.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
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import type { ArchivePullRequestIdentity, MergedPullRequest } from '../contract/index.js';
|
|
2
|
-
import type { RunStore } from '../runs/store.ts';
|
|
3
|
-
export interface ArchiveProject {
|
|
4
|
-
id: string;
|
|
5
|
-
root: string;
|
|
6
|
-
status?: string;
|
|
7
|
-
}
|
|
8
|
-
export interface ArchiveOnMergeDeps {
|
|
9
|
-
projects(): Promise<readonly ArchiveProject[]>;
|
|
10
|
-
enabled(project: ArchiveProject): Promise<boolean>;
|
|
11
|
-
repository(project: ArchiveProject): Promise<string | undefined>;
|
|
12
|
-
withStore<T>(project: ArchiveProject, work: (store: RunStore, isActive: (id: string) => boolean, current: () => boolean) => Promise<T>): Promise<T | undefined>;
|
|
13
|
-
lookup(root: string, identities: ArchivePullRequestIdentity[], signal: AbortSignal): Promise<MergedPullRequest[]>;
|
|
14
|
-
}
|
|
15
|
-
/** One browser-independent workspace poller. Never builds a manager or recovers a run. */
|
|
16
|
-
export declare class ArchiveOnMergeCoordinator {
|
|
17
|
-
private readonly deps;
|
|
18
|
-
private readonly interval;
|
|
19
|
-
private timer?;
|
|
20
|
-
private busy;
|
|
21
|
-
private stopped;
|
|
22
|
-
private generation;
|
|
23
|
-
private abort?;
|
|
24
|
-
private projectCursor;
|
|
25
|
-
private readonly cursors;
|
|
26
|
-
private readonly pending;
|
|
27
|
-
private readonly failures;
|
|
28
|
-
constructor(deps: ArchiveOnMergeDeps, interval?: number);
|
|
29
|
-
start(): void;
|
|
30
|
-
stop(): void;
|
|
31
|
-
/** A saved preference invalidates lookups already in flight, even if changed back quickly. */
|
|
32
|
-
invalidate(): void;
|
|
33
|
-
tick(): Promise<void>;
|
|
34
|
-
private tickProject;
|
|
35
|
-
}
|
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
import { pullRequestKey } from '../runs/pull-requests.js';
|
|
2
|
-
/** One browser-independent workspace poller. Never builds a manager or recovers a run. */
|
|
3
|
-
export class ArchiveOnMergeCoordinator {
|
|
4
|
-
deps;
|
|
5
|
-
interval;
|
|
6
|
-
timer;
|
|
7
|
-
busy = false;
|
|
8
|
-
stopped = false;
|
|
9
|
-
generation = 0;
|
|
10
|
-
abort;
|
|
11
|
-
projectCursor = 0;
|
|
12
|
-
cursors = new Map();
|
|
13
|
-
pending = new Map();
|
|
14
|
-
failures = new Map();
|
|
15
|
-
constructor(deps, interval = 60_000) {
|
|
16
|
-
this.deps = deps;
|
|
17
|
-
this.interval = interval;
|
|
18
|
-
}
|
|
19
|
-
start() {
|
|
20
|
-
if (this.timer || this.busy)
|
|
21
|
-
return;
|
|
22
|
-
this.stopped = false;
|
|
23
|
-
const poll = async () => {
|
|
24
|
-
await this.tick();
|
|
25
|
-
if (!this.stopped) {
|
|
26
|
-
this.timer = setTimeout(poll, this.interval);
|
|
27
|
-
this.timer.unref?.();
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
this.timer = setTimeout(poll, 0);
|
|
31
|
-
this.timer.unref?.();
|
|
32
|
-
}
|
|
33
|
-
stop() {
|
|
34
|
-
this.stopped = true;
|
|
35
|
-
this.invalidate();
|
|
36
|
-
if (this.timer)
|
|
37
|
-
clearTimeout(this.timer);
|
|
38
|
-
this.timer = undefined;
|
|
39
|
-
}
|
|
40
|
-
/** A saved preference invalidates lookups already in flight, even if changed back quickly. */
|
|
41
|
-
invalidate() { this.generation++; this.abort?.abort(); this.pending.clear(); }
|
|
42
|
-
async tick() {
|
|
43
|
-
if (this.busy || this.stopped)
|
|
44
|
-
return;
|
|
45
|
-
this.busy = true;
|
|
46
|
-
const generation = this.generation;
|
|
47
|
-
const abort = new AbortController();
|
|
48
|
-
this.abort = abort;
|
|
49
|
-
const timeout = setTimeout(() => abort.abort(), 30_000);
|
|
50
|
-
timeout.unref?.();
|
|
51
|
-
const current = () => !this.stopped && generation === this.generation && !abort.signal.aborted;
|
|
52
|
-
try {
|
|
53
|
-
const projects = (await this.deps.projects()).filter(project => project.status !== 'missing');
|
|
54
|
-
const ids = new Set(projects.map(project => project.id));
|
|
55
|
-
for (const id of this.cursors.keys())
|
|
56
|
-
if (!ids.has(id)) {
|
|
57
|
-
this.cursors.delete(id);
|
|
58
|
-
this.failures.delete(id);
|
|
59
|
-
}
|
|
60
|
-
for (const [key, state] of this.pending)
|
|
61
|
-
if (!ids.has(state.projectId))
|
|
62
|
-
this.pending.delete(key);
|
|
63
|
-
if (!projects.length || !current())
|
|
64
|
-
return;
|
|
65
|
-
// Four projects per tick avoids a minute per unopened project. Each project remains bounded.
|
|
66
|
-
for (let i = 0; i < Math.min(4, projects.length) && current(); i++) {
|
|
67
|
-
const project = projects[this.projectCursor++ % projects.length];
|
|
68
|
-
await this.tickProject(project, abort.signal, current);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
catch {
|
|
72
|
-
// A registry outage leaves tasks visible until the next bounded poll.
|
|
73
|
-
}
|
|
74
|
-
finally {
|
|
75
|
-
clearTimeout(timeout);
|
|
76
|
-
this.abort = undefined;
|
|
77
|
-
this.busy = false;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
async tickProject(project, signal, current) {
|
|
81
|
-
let roots = [];
|
|
82
|
-
try {
|
|
83
|
-
if ((this.failures.get(project.id)?.nextAt ?? 0) > Date.now() || !await this.deps.enabled(project) || !current())
|
|
84
|
-
return;
|
|
85
|
-
const repoBase = await this.deps.repository(project);
|
|
86
|
-
const snapshots = await this.deps.withStore(project, async (store, isActive, valid) => {
|
|
87
|
-
if (!current() || !valid())
|
|
88
|
-
return [];
|
|
89
|
-
const out = [];
|
|
90
|
-
// Finish admitted large sets before moving the page cursor. Revalidate even when
|
|
91
|
-
// a run stopped being a candidate so stale entries cannot hold capacity forever.
|
|
92
|
-
for (const [key, state] of this.pending) {
|
|
93
|
-
if (state.projectId !== project.id)
|
|
94
|
-
continue;
|
|
95
|
-
await store.prepareArchiveOnMerge(state.rootId);
|
|
96
|
-
if (!current() || !valid())
|
|
97
|
-
return [];
|
|
98
|
-
const snapshot = store.archiveOnMergeSnapshot(state.rootId, repoBase, isActive);
|
|
99
|
-
if (!snapshot)
|
|
100
|
-
this.pending.delete(key);
|
|
101
|
-
else
|
|
102
|
-
out.push(snapshot);
|
|
103
|
-
if (out.length === 4)
|
|
104
|
-
return out;
|
|
105
|
-
}
|
|
106
|
-
if (out.length)
|
|
107
|
-
return out;
|
|
108
|
-
const page = store.listArchiveOnMergeCandidates(this.cursors.get(project.id) ?? 0, 64);
|
|
109
|
-
this.cursors.set(project.id, page.length === 64 ? page.at(-1).seq : 0);
|
|
110
|
-
for (const candidate of page) {
|
|
111
|
-
if (!store.hasArchiveOnMergeAssociations(candidate.id))
|
|
112
|
-
continue;
|
|
113
|
-
await store.prepareArchiveOnMerge(candidate.id);
|
|
114
|
-
if (!current() || !valid())
|
|
115
|
-
break;
|
|
116
|
-
const snapshot = store.archiveOnMergeSnapshot(candidate.id, repoBase, isActive);
|
|
117
|
-
if (snapshot)
|
|
118
|
-
out.push(snapshot);
|
|
119
|
-
if (out.length === 4) {
|
|
120
|
-
this.cursors.set(project.id, candidate.seq);
|
|
121
|
-
break;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
return out;
|
|
125
|
-
});
|
|
126
|
-
if (!snapshots?.length || !current())
|
|
127
|
-
return;
|
|
128
|
-
roots = snapshots.map(snapshot => snapshot.rootId);
|
|
129
|
-
const requests = new Map();
|
|
130
|
-
for (const snapshot of snapshots) {
|
|
131
|
-
const key = `${project.id}:${snapshot.rootId}`;
|
|
132
|
-
let state = this.pending.get(key);
|
|
133
|
-
if (!state || state.token !== snapshot.token) {
|
|
134
|
-
if (!state && this.pending.size >= 32)
|
|
135
|
-
continue;
|
|
136
|
-
state = { projectId: project.id, rootId: snapshot.rootId, token: snapshot.token, offset: 0, merged: new Map() };
|
|
137
|
-
this.pending.set(key, state);
|
|
138
|
-
}
|
|
139
|
-
// Large merge sets progress across ticks; never truncate a set into archive authority.
|
|
140
|
-
for (const pr of snapshot.pullRequests.slice(state.offset, state.offset + 64))
|
|
141
|
-
requests.set(pullRequestKey(pr), pr);
|
|
142
|
-
}
|
|
143
|
-
if (!requests.size)
|
|
144
|
-
return;
|
|
145
|
-
const observed = await this.deps.lookup(project.root, [...requests.values()], signal);
|
|
146
|
-
if (!current())
|
|
147
|
-
return;
|
|
148
|
-
const observedByKey = new Map(observed.map(pr => [pullRequestKey(pr), pr]));
|
|
149
|
-
for (const snapshot of snapshots) {
|
|
150
|
-
const key = `${project.id}:${snapshot.rootId}`, state = this.pending.get(key);
|
|
151
|
-
if (!state)
|
|
152
|
-
continue;
|
|
153
|
-
for (const pr of snapshot.pullRequests.slice(state.offset, state.offset + 64)) {
|
|
154
|
-
const observation = observedByKey.get(pullRequestKey(pr));
|
|
155
|
-
if (observation)
|
|
156
|
-
state.merged.set(pullRequestKey(pr), observation);
|
|
157
|
-
}
|
|
158
|
-
state.offset += 64;
|
|
159
|
-
if (state.offset < snapshot.pullRequests.length)
|
|
160
|
-
continue;
|
|
161
|
-
state.offset = 0;
|
|
162
|
-
if (state.merged.size !== snapshot.pullRequests.length) {
|
|
163
|
-
const missing = snapshot.pullRequests.find(pr => !state.merged.has(pullRequestKey(pr)));
|
|
164
|
-
if (missing)
|
|
165
|
-
await this.deps.withStore(project, async (store, _active, valid) => {
|
|
166
|
-
if (current() && valid())
|
|
167
|
-
store.archiveMergeBlocker(snapshot, missing, repoBase);
|
|
168
|
-
});
|
|
169
|
-
this.pending.delete(key);
|
|
170
|
-
continue;
|
|
171
|
-
}
|
|
172
|
-
await this.deps.withStore(project, async (store, isActive, valid) => {
|
|
173
|
-
if (!await this.deps.enabled(project) || !current() || !valid())
|
|
174
|
-
return;
|
|
175
|
-
const registered = (await this.deps.projects()).some(p => p.id === project.id && p.root === project.root && p.status !== 'missing');
|
|
176
|
-
if (!registered || !current() || !valid())
|
|
177
|
-
return;
|
|
178
|
-
if (await this.deps.repository(project) !== repoBase || !current() || !valid())
|
|
179
|
-
return;
|
|
180
|
-
await store.prepareArchiveOnMerge(snapshot.rootId);
|
|
181
|
-
if (!current() || !valid())
|
|
182
|
-
return;
|
|
183
|
-
store.archiveAfterMerge(snapshot, [...state.merged.values()], repoBase, isActive);
|
|
184
|
-
});
|
|
185
|
-
this.pending.delete(key);
|
|
186
|
-
}
|
|
187
|
-
this.failures.delete(project.id);
|
|
188
|
-
}
|
|
189
|
-
catch {
|
|
190
|
-
if (current()) {
|
|
191
|
-
await this.deps.withStore(project, async (store, _active, valid) => {
|
|
192
|
-
if (current() && valid())
|
|
193
|
-
for (const id of roots)
|
|
194
|
-
store.setArchiveBlocker(id, { message: 'Could not confirm PR merge status. Check GitHub or archive manually.' });
|
|
195
|
-
}).catch(() => undefined);
|
|
196
|
-
const count = Math.min(5, (this.failures.get(project.id)?.count ?? 0) + 1);
|
|
197
|
-
this.failures.set(project.id, { count, nextAt: Date.now() + Math.min(900_000, this.interval * 2 ** (count - 1)) });
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
//# sourceMappingURL=archive-on-merge.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"archive-on-merge.js","sourceRoot":"","sources":["../../src/server/archive-on-merge.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAY1D,0FAA0F;AAC1F,MAAM,OAAO,yBAAyB;IAWP,IAAI;IAAuC,QAAQ;IAVxE,KAAK,CAA6C;IAClD,IAAI,GAAG,KAAK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AC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QACnC,CAAC;QAAC,MAAM,CAAC;YACP,IAAI,OAAO,EAAE,EAAE,CAAC;gBACd,MAAM,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE;oBACjE,IAAI,OAAO,EAAE,IAAI,KAAK,EAAE;wBAAE,KAAK,MAAM,EAAE,IAAI,KAAK;4BAAE,KAAK,CAAC,iBAAiB,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,sEAAsE,EAAE,CAAC,CAAC;gBACrK,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;gBAC1B,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,KAAK,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;gBAC3E,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;YACrH,CAAC;QACH,CAAC;IACH,CAAC;CAEF"}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Server capabilities reported by `/api/health` — the UI hides what the server
|
|
3
|
-
* says isn't there, and the matching endpoints refuse as defense in depth.
|
|
4
|
-
*
|
|
5
|
-
* `localHandoff` (cockpit-ui redesign spec §"Deployment modes — local vs
|
|
6
|
-
* hosted"): the default deployment is `npx cezarion` on localhost, where
|
|
7
|
-
* handing a session off to a local terminal/editor makes sense. On a VPS/remote
|
|
8
|
-
* box it doesn't: `CEZ_REMOTE=1` (or binding a non-loopback host) switches to
|
|
9
|
-
* hosted mode — the UI hides every local-machine affordance and the open-in-*
|
|
10
|
-
* endpoints 409.
|
|
11
|
-
*
|
|
12
|
-
* `singleProject` (spec 2026-07-21-cez-single-project): the workspace is
|
|
13
|
-
* deliberately constrained to the launch project when `CEZ_SINGLE_PROJECT=1`.
|
|
14
|
-
* Like the other opt-in capabilities, activation is strict: no other spelling
|
|
15
|
-
* enables it.
|
|
16
|
-
*
|
|
17
|
-
* `automations` (spec 2026-07-25-github-automations, #801): GitHub automations
|
|
18
|
-
* are **opt-in** via `CEZ_AUTOMATIONS=1` and off by default. Off, the
|
|
19
|
-
* `Automations` nav item is gone everywhere it is rendered, the
|
|
20
|
-
* `/automations*` endpoints refuse, and the workspace scheduler never polls
|
|
21
|
-
* GitHub — the flag removes the behavior, not only the UI. Activation is
|
|
22
|
-
* strict, like the capabilities above. Nothing on disk is touched:
|
|
23
|
-
* definitions, receipts and high-watermarks survive the flag being off, so
|
|
24
|
-
* unsetting it and restarting restores the feature wholesale.
|
|
25
|
-
*
|
|
26
|
-
* Usage presentation: token counts and monetary cost stay visible by default.
|
|
27
|
-
* `CEZ_HIDE_TOKEN_USAGE=1` and `CEZ_HIDE_COST=1` hide them independently;
|
|
28
|
-
* legacy `CEZ_HIDE_TOKEN_METRICS=1` remains the master hide-all switch. None
|
|
29
|
-
* changes collection, persistence, events, or API run records.
|
|
30
|
-
*/
|
|
31
|
-
import type { Capabilities } from '../contract/index.js';
|
|
32
|
-
/** Canonical hostname of an authority: port and IPv6 brackets removed, IPv6
|
|
33
|
-
* expanded, zone id and FQDN trailing dot dropped, lowercased.
|
|
34
|
-
* `[::1]:4321` → `0:0:0:0:0:0:0:1`, `localhost.:4321` → `localhost`.
|
|
35
|
-
*
|
|
36
|
-
* Strict by construction: an authority that does not parse as one of the three
|
|
37
|
-
* legal shapes returns `''`, which no allowlist matches. Being lax here is a
|
|
38
|
-
* security bug, not a convenience — a parser that merely *finds* a loopback
|
|
39
|
-
* name inside the header would accept `[::1]@evil.com` or `127.0.0.1:evil.com`. */
|
|
40
|
-
export declare function normalizeHostname(host: string): string;
|
|
41
|
-
/** True for bind hosts that only the local machine can reach. Undefined = the
|
|
42
|
-
* default bind (127.0.0.1), hence trusted — this is a *configuration* value we
|
|
43
|
-
* chose, not a request header. Do NOT use this on attacker-controlled input;
|
|
44
|
-
* use `isLoopbackHostHeader`, which fails closed on a missing host. */
|
|
45
|
-
export declare function isLoopbackHost(host: string | undefined): boolean;
|
|
46
|
-
/** True for a request's `Host`/`Origin` hostname when it names this machine.
|
|
47
|
-
* The untrusted-input twin of `isLoopbackHost`: a missing or unparseable host
|
|
48
|
-
* is **untrusted** (false), because absent is not the same as "we defaulted to
|
|
49
|
-
* loopback" once the value arrives over the wire (#426). */
|
|
50
|
-
export declare function isLoopbackHostHeader(host: string | null | undefined): boolean;
|
|
51
|
-
/** `CEZ_REMOTE=1` or a non-loopback bind host ⇒ hosted mode (no local handoff).
|
|
52
|
-
* `CEZ_AUTOMATIONS=1` ⇒ GitHub automations exist (#801).
|
|
53
|
-
* `CEZ_PREVIEW=1` ⇒ live preview exists (#781); same boot-time-flag caveat as `automations`.
|
|
54
|
-
* `CEZ_VOICE=1` plus `TYPESAFE_API_KEY` (or `CEZ_DRY_RUN=1`) ⇒ voice mode exists; same caveat.
|
|
55
|
-
*
|
|
56
|
-
* Read per request. The automations flag is a boot-time setting: the workspace scheduler is
|
|
57
|
-
* started once, on the server's `listening` event, so flipping the flag on afterwards gates
|
|
58
|
-
* the routes open without ever starting the poller. Boot-time flag, same wording. */
|
|
59
|
-
export declare function resolveCapabilities(env?: NodeJS.ProcessEnv, bindHost?: string): Capabilities;
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Server capabilities reported by `/api/health` — the UI hides what the server
|
|
3
|
-
* says isn't there, and the matching endpoints refuse as defense in depth.
|
|
4
|
-
*
|
|
5
|
-
* `localHandoff` (cockpit-ui redesign spec §"Deployment modes — local vs
|
|
6
|
-
* hosted"): the default deployment is `npx cezarion` on localhost, where
|
|
7
|
-
* handing a session off to a local terminal/editor makes sense. On a VPS/remote
|
|
8
|
-
* box it doesn't: `CEZ_REMOTE=1` (or binding a non-loopback host) switches to
|
|
9
|
-
* hosted mode — the UI hides every local-machine affordance and the open-in-*
|
|
10
|
-
* endpoints 409.
|
|
11
|
-
*
|
|
12
|
-
* `singleProject` (spec 2026-07-21-cez-single-project): the workspace is
|
|
13
|
-
* deliberately constrained to the launch project when `CEZ_SINGLE_PROJECT=1`.
|
|
14
|
-
* Like the other opt-in capabilities, activation is strict: no other spelling
|
|
15
|
-
* enables it.
|
|
16
|
-
*
|
|
17
|
-
* `automations` (spec 2026-07-25-github-automations, #801): GitHub automations
|
|
18
|
-
* are **opt-in** via `CEZ_AUTOMATIONS=1` and off by default. Off, the
|
|
19
|
-
* `Automations` nav item is gone everywhere it is rendered, the
|
|
20
|
-
* `/automations*` endpoints refuse, and the workspace scheduler never polls
|
|
21
|
-
* GitHub — the flag removes the behavior, not only the UI. Activation is
|
|
22
|
-
* strict, like the capabilities above. Nothing on disk is touched:
|
|
23
|
-
* definitions, receipts and high-watermarks survive the flag being off, so
|
|
24
|
-
* unsetting it and restarting restores the feature wholesale.
|
|
25
|
-
*
|
|
26
|
-
* Usage presentation: token counts and monetary cost stay visible by default.
|
|
27
|
-
* `CEZ_HIDE_TOKEN_USAGE=1` and `CEZ_HIDE_COST=1` hide them independently;
|
|
28
|
-
* legacy `CEZ_HIDE_TOKEN_METRICS=1` remains the master hide-all switch. None
|
|
29
|
-
* changes collection, persistence, events, or API run records.
|
|
30
|
-
*/
|
|
31
|
-
/** Every IPv4 address in 127.0.0.0/8, anchored. Anchoring is load-bearing: a
|
|
32
|
-
* `startsWith('127.')` test also matches attacker-controlled *hostnames* like
|
|
33
|
-
* `127.0.0.1.evil.com`, which is exactly the DNS-rebinding bypass #426 is
|
|
34
|
-
* about — see `isLoopbackHostHeader`. */
|
|
35
|
-
const LOOPBACK_V4 = /^127(?:\.(?:25[0-5]|2[0-4]\d|1?\d?\d)){3}$/;
|
|
36
|
-
/** The IPv6 loopback in the canonical form `expandIpv6` emits. */
|
|
37
|
-
const LOOPBACK_V6 = '0:0:0:0:0:0:0:1';
|
|
38
|
-
/** Expand an IPv6 literal to all 8 groups, lowercase and without leading zeros
|
|
39
|
-
* (`::1` → `0:0:0:0:0:0:0:1`), or `null` when it is not a valid literal.
|
|
40
|
-
*
|
|
41
|
-
* Canonicalizing rather than merely *recognizing* matters: `Host` carries
|
|
42
|
-
* whatever spelling the client sent, but `new URL().hostname` compresses
|
|
43
|
-
* (`[0:0:0:0:0:0:0:1]` → `[::1]`), so the two only compare equal on a common
|
|
44
|
-
* form. */
|
|
45
|
-
function expandIpv6(h) {
|
|
46
|
-
const halves = h.split('::');
|
|
47
|
-
if (halves.length > 2)
|
|
48
|
-
return null;
|
|
49
|
-
let groups;
|
|
50
|
-
if (halves.length === 2) {
|
|
51
|
-
const head = halves[0] ? halves[0].split(':') : [];
|
|
52
|
-
const tail = halves[1] ? halves[1].split(':') : [];
|
|
53
|
-
if (head.length + tail.length > 7)
|
|
54
|
-
return null;
|
|
55
|
-
groups = [...head, ...Array(8 - head.length - tail.length).fill('0'), ...tail];
|
|
56
|
-
}
|
|
57
|
-
else {
|
|
58
|
-
groups = h.split(':');
|
|
59
|
-
}
|
|
60
|
-
if (groups.length !== 8 || !groups.every((g) => /^[0-9a-f]{1,4}$/.test(g)))
|
|
61
|
-
return null;
|
|
62
|
-
return groups.map((g) => parseInt(g, 16).toString(16)).join(':');
|
|
63
|
-
}
|
|
64
|
-
/** Canonical hostname of an authority: port and IPv6 brackets removed, IPv6
|
|
65
|
-
* expanded, zone id and FQDN trailing dot dropped, lowercased.
|
|
66
|
-
* `[::1]:4321` → `0:0:0:0:0:0:0:1`, `localhost.:4321` → `localhost`.
|
|
67
|
-
*
|
|
68
|
-
* Strict by construction: an authority that does not parse as one of the three
|
|
69
|
-
* legal shapes returns `''`, which no allowlist matches. Being lax here is a
|
|
70
|
-
* security bug, not a convenience — a parser that merely *finds* a loopback
|
|
71
|
-
* name inside the header would accept `[::1]@evil.com` or `127.0.0.1:evil.com`. */
|
|
72
|
-
export function normalizeHostname(host) {
|
|
73
|
-
// 1. Bracketed IPv6, optionally with a port: `[::1]`, `[::1%25eth0]:4321`.
|
|
74
|
-
// The end anchor is load-bearing — without it `[::1]@evil.com` → `::1`.
|
|
75
|
-
const bracketed = host.match(/^\[([^\]]+)\](?::\d+)?$/);
|
|
76
|
-
if (bracketed)
|
|
77
|
-
return expandIpv6(stripZone(bracketed[1].toLowerCase())) ?? '';
|
|
78
|
-
// 2. A bare IPv6 literal cannot carry a port (no brackets ⇒ every colon
|
|
79
|
-
// belongs to the address), so anything with >1 colon is taken whole.
|
|
80
|
-
if (host.split(':').length > 2)
|
|
81
|
-
return expandIpv6(stripZone(host.toLowerCase())) ?? '';
|
|
82
|
-
// 3. `name` or `name:port`, where the port must actually be digits.
|
|
83
|
-
const plain = host.match(/^([^:[\]]*)(?::(\d+))?$/);
|
|
84
|
-
if (plain)
|
|
85
|
-
return plain[1].toLowerCase().replace(/\.$/, '');
|
|
86
|
-
return ''; // unparseable ⇒ matches no allowlist
|
|
87
|
-
}
|
|
88
|
-
/** Drop an IPv6 zone id (`fe80::1%eth0`), anchored to the end so a `%` inside a
|
|
89
|
-
* registrable hostname can never truncate it down to a loopback name. */
|
|
90
|
-
function stripZone(h) {
|
|
91
|
-
return h.replace(/%[a-z0-9._~-]+$/, '');
|
|
92
|
-
}
|
|
93
|
-
/** True when the hostname names this machine and nothing else. Expects the
|
|
94
|
-
* canonical output of `normalizeHostname`. */
|
|
95
|
-
function isLoopbackName(hostname) {
|
|
96
|
-
return hostname === 'localhost' || LOOPBACK_V4.test(hostname) || hostname === LOOPBACK_V6;
|
|
97
|
-
}
|
|
98
|
-
/** True for bind hosts that only the local machine can reach. Undefined = the
|
|
99
|
-
* default bind (127.0.0.1), hence trusted — this is a *configuration* value we
|
|
100
|
-
* chose, not a request header. Do NOT use this on attacker-controlled input;
|
|
101
|
-
* use `isLoopbackHostHeader`, which fails closed on a missing host. */
|
|
102
|
-
export function isLoopbackHost(host) {
|
|
103
|
-
if (!host)
|
|
104
|
-
return true;
|
|
105
|
-
return isLoopbackName(normalizeHostname(host));
|
|
106
|
-
}
|
|
107
|
-
/** True for a request's `Host`/`Origin` hostname when it names this machine.
|
|
108
|
-
* The untrusted-input twin of `isLoopbackHost`: a missing or unparseable host
|
|
109
|
-
* is **untrusted** (false), because absent is not the same as "we defaulted to
|
|
110
|
-
* loopback" once the value arrives over the wire (#426). */
|
|
111
|
-
export function isLoopbackHostHeader(host) {
|
|
112
|
-
if (!host)
|
|
113
|
-
return false;
|
|
114
|
-
return isLoopbackName(normalizeHostname(host));
|
|
115
|
-
}
|
|
116
|
-
/** `CEZ_REMOTE=1` or a non-loopback bind host ⇒ hosted mode (no local handoff).
|
|
117
|
-
* `CEZ_AUTOMATIONS=1` ⇒ GitHub automations exist (#801).
|
|
118
|
-
* `CEZ_PREVIEW=1` ⇒ live preview exists (#781); same boot-time-flag caveat as `automations`.
|
|
119
|
-
* `CEZ_VOICE=1` plus `TYPESAFE_API_KEY` (or `CEZ_DRY_RUN=1`) ⇒ voice mode exists; same caveat.
|
|
120
|
-
*
|
|
121
|
-
* Read per request. The automations flag is a boot-time setting: the workspace scheduler is
|
|
122
|
-
* started once, on the server's `listening` event, so flipping the flag on afterwards gates
|
|
123
|
-
* the routes open without ever starting the poller. Boot-time flag, same wording. */
|
|
124
|
-
export function resolveCapabilities(env = process.env, bindHost) {
|
|
125
|
-
const hideAllUsage = env.CEZ_HIDE_TOKEN_METRICS === '1';
|
|
126
|
-
const tokenUsageMetrics = !hideAllUsage && env.CEZ_HIDE_TOKEN_USAGE !== '1';
|
|
127
|
-
const costMetrics = !hideAllUsage && env.CEZ_HIDE_COST !== '1';
|
|
128
|
-
return {
|
|
129
|
-
localHandoff: env.CEZ_REMOTE !== '1' && isLoopbackHost(bindHost),
|
|
130
|
-
singleProject: env.CEZ_SINGLE_PROJECT === '1',
|
|
131
|
-
automations: env.CEZ_AUTOMATIONS === '1',
|
|
132
|
-
preview: env.CEZ_PREVIEW === '1',
|
|
133
|
-
// Boot-time flag, like `automations`. The key is read here only as present or absent; the
|
|
134
|
-
// fake engine under CEZ_DRY_RUN needs none.
|
|
135
|
-
voice: env.CEZ_VOICE === '1' && (!!env.TYPESAFE_API_KEY || env.CEZ_DRY_RUN === '1'),
|
|
136
|
-
tokenMetrics: tokenUsageMetrics && costMetrics,
|
|
137
|
-
tokenUsageMetrics,
|
|
138
|
-
costMetrics,
|
|
139
|
-
};
|
|
140
|
-
}
|
|
141
|
-
//# sourceMappingURL=capabilities.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities.js","sourceRoot":"","sources":["../../src/server/capabilities.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAIH;;;0CAG0C;AAC1C,MAAM,WAAW,GAAG,4CAA4C,CAAC;AAEjE,kEAAkE;AAClE,MAAM,WAAW,GAAG,iBAAiB,CAAC;AAEtC;;;;;;YAMY;AACZ,SAAS,UAAU,CAAC,CAAS;IAC3B,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC7B,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC;IACnC,IAAI,MAAgB,CAAC;IACrB,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxB,MAAM,IAAI,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACnD,MAAM,IAAI,GAAG,MAAM,C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GAAG,CAAC;IAC5E,MAAM,WAAW,GAAG,CAAC,YAAY,IAAI,GAAG,CAAC,aAAa,KAAK,GAAG,CAAC;IAC/D,OAAO;QACL,YAAY,EAAE,GAAG,CAAC,UAAU,KAAK,GAAG,IAAI,cAAc,CAAC,QAAQ,CAAC;QAChE,aAAa,EAAE,GAAG,CAAC,kBAAkB,KAAK,GAAG;QAC7C,WAAW,EAAE,GAAG,CAAC,eAAe,KAAK,GAAG;QACxC,OAAO,EAAE,GAAG,CAAC,WAAW,KAAK,GAAG;QAChC,0FAA0F;QAC1F,4CAA4C;QAC5C,KAAK,EAAE,GAAG,CAAC,SAAS,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,gBAAgB,IAAI,GAAG,CAAC,WAAW,KAAK,GAAG,CAAC;QACnF,YAAY,EAAE,iBAAiB,IAAI,WAAW;QAC9C,iBAAiB;QACjB,WAAW;KACZ,CAAC;AACJ,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { CheckoutProgressEvent } from '../contract/index.js';
|
|
2
|
-
/** Recovery cache for the clone and new-project dialogs, never an authority for the mutation's result. */
|
|
3
|
-
export declare class CheckoutProgressCache {
|
|
4
|
-
private readonly now;
|
|
5
|
-
private readonly values;
|
|
6
|
-
constructor(now?: () => number);
|
|
7
|
-
private prune;
|
|
8
|
-
record(progress: CheckoutProgressEvent): void;
|
|
9
|
-
get(id: string): CheckoutProgressEvent | null;
|
|
10
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/** Recovery cache for the clone and new-project dialogs, never an authority for the mutation's result. */
|
|
2
|
-
export class CheckoutProgressCache {
|
|
3
|
-
now;
|
|
4
|
-
values = new Map();
|
|
5
|
-
constructor(now = Date.now) {
|
|
6
|
-
this.now = now;
|
|
7
|
-
}
|
|
8
|
-
prune() {
|
|
9
|
-
for (const [key, value] of this.values)
|
|
10
|
-
if (this.now() - value.at >= 5 * 60_000)
|
|
11
|
-
this.values.delete(key);
|
|
12
|
-
}
|
|
13
|
-
record(progress) {
|
|
14
|
-
if (!progress.checkoutId)
|
|
15
|
-
return;
|
|
16
|
-
this.prune();
|
|
17
|
-
this.values.delete(progress.checkoutId);
|
|
18
|
-
this.values.set(progress.checkoutId, { at: this.now(), progress: { ...progress, ...(progress.line ? { line: progress.line.slice(-4096) } : {}), ...(progress.error ? { error: progress.error.slice(-4096) } : {}), ...(progress.warning ? { warning: progress.warning.slice(0, 4096) } : {}) } });
|
|
19
|
-
while (this.values.size > 128)
|
|
20
|
-
this.values.delete(this.values.keys().next().value);
|
|
21
|
-
}
|
|
22
|
-
get(id) {
|
|
23
|
-
this.prune();
|
|
24
|
-
return this.values.get(id)?.progress ?? null;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=checkout-progress.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"checkout-progress.js","sourceRoot":"","sources":["../../src/server/checkout-progress.ts"],"names":[],"mappings":"AAEA,0GAA0G;AAC1G,MAAM,OAAO,qBAAqB;IAEH,GAAG;IADf,MAAM,GAAG,IAAI,GAAG,EAA2D,CAAC;IAC7F,YAA6B,GAAG,GAAG,IAAI,CAAC,GAAG;mBAAd,GAAG;IAAc,CAAC;IACvC,KAAK;QACX,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,IAAI,CAAC,MAAM;YAAE,IAAI,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC,EAAE,IAAI,CAAC,GAAG,MAAM;gBAAE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IAC3G,CAAC;IACD,MAAM,CAAC,QAA+B;QACpC,IAAI,CAAC,QAAQ,CAAC,UAAU;YAAE,OAAO;QACjC,IAAI,CAAC,KAAK,EAAE,CAAC;QACb,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;QACxC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,UAAU,EAAE,EAAE,EAAE,EAAE,IAAI,CAAC,GAAG,EAAE,EAAE,QAAQ,EAAE,EAAE,GAAG,QAAQ,EAAE,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QAClS,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,GAAG,GAAG;YAAE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC,KAAM,CAAC,CAAC;IACtF,CAAC;IACD,GAAG,CAAC,EAAU;QACZ,IAAI,CAAC,KAAK,EAAE,CAAC;QACb,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,QAAQ,IAAI,IAAI,CAAC;IAC/C,CAAC;CACF"}
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
/** One `checkout-progress` SSE payload (workspace-level event, step 2.8's bus).
|
|
2
|
-
* `checkoutId` is echoed from the request so a cockpit only renders its own
|
|
3
|
-
* clone — two tabs cloning at once share the one workspace stream. */
|
|
4
|
-
export interface CheckoutProgressEvent {
|
|
5
|
-
checkoutId?: string;
|
|
6
|
-
/** The target folder name, so a payload is readable without the id too. */
|
|
7
|
-
name: string;
|
|
8
|
-
phase: 'cloning' | 'done' | 'error';
|
|
9
|
-
/** One line of `git clone` progress (present on `cloning`). */
|
|
10
|
-
line?: string;
|
|
11
|
-
/** Human-readable failure (present on `error`). */
|
|
12
|
-
error?: string;
|
|
13
|
-
/** New-project flow only: on `done`, what did not finish (see `create-project.ts`). */
|
|
14
|
-
warning?: string;
|
|
15
|
-
}
|
|
16
|
-
export type CheckoutFailure = {
|
|
17
|
-
ok: false;
|
|
18
|
-
status: 400 | 409 | 500;
|
|
19
|
-
error: string;
|
|
20
|
-
}
|
|
21
|
-
/** `gh` is missing or unauthenticated — the spec's `{ error, reason }`
|
|
22
|
-
* degradation, mirroring the GitHub pane's contract. */
|
|
23
|
-
| {
|
|
24
|
-
ok: false;
|
|
25
|
-
status: 503;
|
|
26
|
-
error: string;
|
|
27
|
-
reason: string;
|
|
28
|
-
};
|
|
29
|
-
export type CheckoutResult = {
|
|
30
|
-
ok: true;
|
|
31
|
-
target: string;
|
|
32
|
-
name: string;
|
|
33
|
-
} | CheckoutFailure;
|
|
34
|
-
/** A GitHub repo reference the clone flow accepts. */
|
|
35
|
-
export interface RepoRef {
|
|
36
|
-
owner: string;
|
|
37
|
-
repo: string;
|
|
38
|
-
/** Normalized identity used in messages and dry-run output. */
|
|
39
|
-
slug: string;
|
|
40
|
-
/** What `gh repo clone` is handed. Always reconstructed from validated
|
|
41
|
-
* segments rather than preserving user input. Forcing HTTPS is load-bearing:
|
|
42
|
-
* a machine configured with `gh config set git_protocol ssh` may have an
|
|
43
|
-
* OAuth token authorized for an organization's SAML policy while its SSH key
|
|
44
|
-
* is not. Passing only `owner/repo` silently selects that rejected key.
|
|
45
|
-
* The resulting HTTPS `origin` needs a credential path of its own after the
|
|
46
|
-
* clone — see `persistGhCredentialHelper`. */
|
|
47
|
-
cloneUrl: string;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Parse `owner/repo`, `https://github.com/owner/repo(.git)`, `git@github.com:owner/repo.git`
|
|
51
|
-
* or `github.com/owner/repo` into a normalized ref. `null` when it is not a
|
|
52
|
-
* GitHub repo reference — the route answers 400 rather than handing an
|
|
53
|
-
* arbitrary string to `gh`.
|
|
54
|
-
*
|
|
55
|
-
* Only github.com: `gh repo clone` would happily take an enterprise host, but
|
|
56
|
-
* this flow's contract (and its `gh`-availability degradation) is GitHub's, and
|
|
57
|
-
* silently accepting `evil.example/owner/repo` would make the "which host am I
|
|
58
|
-
* cloning from" question unanswerable from the dialog.
|
|
59
|
-
*/
|
|
60
|
-
export declare function parseRepoRef(input: string): RepoRef | null;
|
|
61
|
-
/**
|
|
62
|
-
* Validate the target folder name (the dialog lets the user edit it, and it
|
|
63
|
-
* defaults to the repo name).
|
|
64
|
-
*
|
|
65
|
-
* A name is one path segment and nothing else. `.` / `..` and anything with a
|
|
66
|
-
* separator are rejected outright rather than sanitized: a silently rewritten
|
|
67
|
-
* name would clone somewhere other than the path the dialog previewed, which
|
|
68
|
-
* is the one thing a checkout target must never do. A leading dot is refused
|
|
69
|
-
* too — a project named `.ssh` under the checkout root is not a project.
|
|
70
|
-
*/
|
|
71
|
-
export declare function isValidCheckoutName(name: string): boolean;
|
|
72
|
-
/**
|
|
73
|
-
* Remove only an attempt-owned real directory whose canonical parent is the checkout root.
|
|
74
|
-
* Refuse symlinks, the root itself and uncertain paths. Return false on any check or removal
|
|
75
|
-
* failure.
|
|
76
|
-
*/
|
|
77
|
-
export declare function cleanupCheckout(projectsDir: string, target: string): Promise<boolean>;
|
|
78
|
-
/** Injected so the tests can drive a fake clone without a network or a `gh`
|
|
79
|
-
* binary. `dir` already exists (we created it); the runner clones INTO it. */
|
|
80
|
-
export type CloneRunner = (ref: RepoRef, dir: string, onLine: (line: string) => void, signal: AbortSignal | undefined) => Promise<{
|
|
81
|
-
ok: true;
|
|
82
|
-
} | {
|
|
83
|
-
ok: false;
|
|
84
|
-
error: string;
|
|
85
|
-
notFound?: boolean;
|
|
86
|
-
}>;
|
|
87
|
-
/** Kept pure so the SAML-safe transport choice is pinned without spawning a
|
|
88
|
-
* real GitHub process in the unit suite. */
|
|
89
|
-
export declare function ghCloneArgs(ref: RepoRef, dir: string): string[];
|
|
90
|
-
/** PR #968: the `git config --local` argument lists that route github.com HTTPS
|
|
91
|
-
* credentials through `gh`. Reset inherited helpers first, as gh setup-git does.
|
|
92
|
-
* Shared with the new-project flow (`create-project.ts`). */
|
|
93
|
-
export declare const GH_CREDENTIAL_HELPER_CONFIG: readonly (readonly string[])[];
|
|
94
|
-
/**
|
|
95
|
-
* `gh repo clone <validated HTTPS URL> <dir> -- --progress`.
|
|
96
|
-
*
|
|
97
|
-
* `spawn`, not `execFile`, because the whole point of this route is that the
|
|
98
|
-
* dialog sees progress while it happens: `git clone --progress` writes its
|
|
99
|
-
* counters to stderr, and each line becomes a `checkout-progress` event.
|
|
100
|
-
* (`--progress` is needed explicitly — git suppresses it when stderr is not a
|
|
101
|
-
* TTY, which it never is here.)
|
|
102
|
-
*/
|
|
103
|
-
export declare const ghCloneRunner: CloneRunner;
|
|
104
|
-
/** `CEZ_DRY_RUN=1` — a fake clone so the dialog (and the tests) can exercise
|
|
105
|
-
* the whole flow offline: a few progress lines and a plausible repo on disk.
|
|
106
|
-
* It writes only INSIDE the directory the caller already created. */
|
|
107
|
-
export declare const dryRunCloneRunner: CloneRunner;
|
|
108
|
-
export interface CheckoutOptions {
|
|
109
|
-
/** Raw user input: `owner/repo` or a GitHub URL. */
|
|
110
|
-
url: string;
|
|
111
|
-
/** Target folder name; defaults to the repo name. */
|
|
112
|
-
name?: string | undefined;
|
|
113
|
-
/** The checkout root, ALREADY `~`-expanded by the caller. */
|
|
114
|
-
projectsDir: string;
|
|
115
|
-
onProgress: (event: CheckoutProgressEvent) => void;
|
|
116
|
-
checkoutId?: string | undefined;
|
|
117
|
-
signal?: AbortSignal | undefined;
|
|
118
|
-
/** Test seam; defaults to `gh` (or the dry-run fake under `CEZ_DRY_RUN=1`). */
|
|
119
|
-
run?: CloneRunner | undefined;
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* Clone a GitHub repo into `<projectsDir>/<name>`, streaming progress.
|
|
123
|
-
*
|
|
124
|
-
* Answers only when the clone has finished (the spec's "long-running: answers
|
|
125
|
-
* when the clone finishes"); the dialog's liveness comes from `onProgress`.
|
|
126
|
-
* On any failure the partially-written directory is removed and NOTHING is
|
|
127
|
-
* registered — registration is the caller's job, and only on `ok: true`.
|
|
128
|
-
*/
|
|
129
|
-
export declare function checkoutRepo(opts: CheckoutOptions): Promise<CheckoutResult>;
|