@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,882 +0,0 @@
|
|
|
1
|
-
import { toolDisplay } from '../contract/index.js';
|
|
2
|
-
/** Early `subagent_event` buffer bounds (spec § Sub-agents and the Agents drawer). */
|
|
3
|
-
const PENDING_SUBAGENT_EVENTS_PER_ID = 200;
|
|
4
|
-
const PENDING_SUBAGENT_IDS = 8;
|
|
5
|
-
const SUBAGENT_DROP_MESSAGE = 'omp: sub-agent events dropped before lifecycle';
|
|
6
|
-
/** A failure before admission never gets a `prompt_result`, so its id is never released: bound it. */
|
|
7
|
-
const FAILED_PROMPTS_KEPT = 32;
|
|
8
|
-
const EMPTY_LANE = {
|
|
9
|
-
textBlock: 0,
|
|
10
|
-
startedItems: new Set(),
|
|
11
|
-
endedItems: new Set(),
|
|
12
|
-
textByItem: new Map(),
|
|
13
|
-
};
|
|
14
|
-
export function createOmpUiState() {
|
|
15
|
-
return {
|
|
16
|
-
sessionStarted: false,
|
|
17
|
-
sessionId: null,
|
|
18
|
-
turnSeq: 0,
|
|
19
|
-
turnId: null,
|
|
20
|
-
turnPromptId: null,
|
|
21
|
-
turnPromptAdmitted: false,
|
|
22
|
-
stopReason: 'end_turn',
|
|
23
|
-
turnUsage: null,
|
|
24
|
-
turnCostUsd: null,
|
|
25
|
-
sessionUsage: null,
|
|
26
|
-
sessionCostUsd: null,
|
|
27
|
-
latchedProviderError: null,
|
|
28
|
-
...EMPTY_LANE,
|
|
29
|
-
tools: new Map(),
|
|
30
|
-
subagents: new Map(),
|
|
31
|
-
pendingSubagentEvents: new Map(),
|
|
32
|
-
batchCalls: new Set(),
|
|
33
|
-
childLanes: new Map(),
|
|
34
|
-
subagentDropReported: false,
|
|
35
|
-
failedPrompts: new Set(),
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Same as `pi-ui-mapper.ts` `piTurnStarted`, plus the id of the `prompt` that opens the turn
|
|
40
|
-
* (the runner's; omitted when OMP's own activity opened it).
|
|
41
|
-
*/
|
|
42
|
-
export function ompTurnStarted(state, promptId) {
|
|
43
|
-
const turnSeq = state.turnSeq + 1;
|
|
44
|
-
const turnId = `turn_${turnSeq}`;
|
|
45
|
-
return {
|
|
46
|
-
events: [{ type: 'turn.started', turnId }],
|
|
47
|
-
state: {
|
|
48
|
-
...state,
|
|
49
|
-
turnSeq,
|
|
50
|
-
turnId,
|
|
51
|
-
turnPromptId: promptId ?? null,
|
|
52
|
-
turnPromptAdmitted: false,
|
|
53
|
-
stopReason: 'end_turn',
|
|
54
|
-
textBlock: 0,
|
|
55
|
-
},
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
/** The frame answers the `prompt` that opened the turn in flight (ids are the runner's). */
|
|
59
|
-
function opensTurn(value, state) {
|
|
60
|
-
const id = string(value.id);
|
|
61
|
-
return state.turnId !== null && id !== undefined && id === state.turnPromptId;
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Which frame can end a turn (rpc.md § Yield vs settled): `session_settled` when the session
|
|
65
|
-
* went quiet, or a prompt OMP finished without invoking the agent — a `prompt_result` with
|
|
66
|
-
* `agentInvoked: false`, or the prompt's own success response carrying `data.agentInvoked:
|
|
67
|
-
* false` (no `prompt_result` follows that one). `agent_end` is never a boundary. A `local`
|
|
68
|
-
* boundary ends the turn only for the prompt that opened it: a steer answered locally, or
|
|
69
|
-
* failing after admission (`RpcPromptResults.fail`), leaves the running turn alone.
|
|
70
|
-
*/
|
|
71
|
-
export function ompTurnBoundary(value) {
|
|
72
|
-
if (!isRecord(value))
|
|
73
|
-
return null;
|
|
74
|
-
if (value.type === 'session_settled')
|
|
75
|
-
return 'settled';
|
|
76
|
-
if (value.type === 'prompt_result' && value.agentInvoked === false)
|
|
77
|
-
return 'local';
|
|
78
|
-
if (value.type === 'response' &&
|
|
79
|
-
value.command === 'prompt' &&
|
|
80
|
-
value.success === true &&
|
|
81
|
-
isRecord(value.data) &&
|
|
82
|
-
value.data.agentInvoked === false) {
|
|
83
|
-
return 'local';
|
|
84
|
-
}
|
|
85
|
-
return null;
|
|
86
|
-
}
|
|
87
|
-
/** Same rule as `pi-ui-mapper.ts` `mapActivity`: activity after the turn ended re-opens one. */
|
|
88
|
-
function mapActivity(value, state, map) {
|
|
89
|
-
if (state.turnId)
|
|
90
|
-
return map(value, state);
|
|
91
|
-
const started = ompTurnStarted(state);
|
|
92
|
-
const mapped = map(value, started.state);
|
|
93
|
-
if (mapped.events.length === 0)
|
|
94
|
-
return { events: [], state };
|
|
95
|
-
return { events: [...started.events, ...mapped.events], state: mapped.state };
|
|
96
|
-
}
|
|
97
|
-
function isMessageUpdateActivity(value) {
|
|
98
|
-
const update = isRecord(value.assistantMessageEvent) ? value.assistantMessageEvent : undefined;
|
|
99
|
-
const type = update ? string(update.type) : undefined;
|
|
100
|
-
return type?.startsWith('text_') === true || type?.startsWith('thinking_') === true;
|
|
101
|
-
}
|
|
102
|
-
function isAssistantMessageEnd(value) {
|
|
103
|
-
return isRecord(value.message) && string(value.message.role) === 'assistant';
|
|
104
|
-
}
|
|
105
|
-
function isToolStart(value) {
|
|
106
|
-
return Boolean(string(value.toolCallId) && string(value.toolName));
|
|
107
|
-
}
|
|
108
|
-
export function mapOmpRpcMessage(value, state) {
|
|
109
|
-
if (!isRecord(value) || typeof value.type !== 'string')
|
|
110
|
-
return { events: [], state };
|
|
111
|
-
if (value.type === 'response')
|
|
112
|
-
return mapResponse(value, state);
|
|
113
|
-
switch (value.type) {
|
|
114
|
-
case 'message_update':
|
|
115
|
-
return isMessageUpdateActivity(value)
|
|
116
|
-
? mapActivity(value, state, mapMessageUpdate)
|
|
117
|
-
: mapMessageUpdate(value, state);
|
|
118
|
-
case 'message_end':
|
|
119
|
-
return isAssistantMessageEnd(value)
|
|
120
|
-
? mapActivity(value, state, mapMessageEnd)
|
|
121
|
-
: mapMessageEnd(value, state);
|
|
122
|
-
case 'tool_execution_start':
|
|
123
|
-
return isToolStart(value) ? mapActivity(value, state, mapToolStart) : mapToolStart(value, state);
|
|
124
|
-
case 'tool_execution_update':
|
|
125
|
-
return mapActivity(value, state, mapToolUpdate);
|
|
126
|
-
case 'tool_execution_end':
|
|
127
|
-
return mapActivity(value, state, mapToolEnd);
|
|
128
|
-
case 'session_settled':
|
|
129
|
-
return completeTurn(state.stopReason, state);
|
|
130
|
-
case 'prompt_result':
|
|
131
|
-
return mapPromptResult(value, state);
|
|
132
|
-
case 'subagent_lifecycle':
|
|
133
|
-
return isRecord(value.payload) ? mapSubagentLifecycle(value.payload, state) : { events: [], state };
|
|
134
|
-
case 'subagent_event':
|
|
135
|
-
return isRecord(value.payload) ? mapSubagentEvent(value.payload, state) : { events: [], state };
|
|
136
|
-
case 'extension_error': {
|
|
137
|
-
const message = string(value.error) ?? string(value.message) ?? 'omp extension error';
|
|
138
|
-
return { events: [{ type: 'session.error', message, fatal: false }], state };
|
|
139
|
-
}
|
|
140
|
-
case 'notice': {
|
|
141
|
-
if (value.level !== 'error')
|
|
142
|
-
return { events: [], state };
|
|
143
|
-
const message = string(value.message) ?? 'omp error notice';
|
|
144
|
-
return { events: [{ type: 'session.error', message, fatal: false }], state };
|
|
145
|
-
}
|
|
146
|
-
// `agent_end` (any `yielded`), `ready`, `queue_update`, `auto_*`, `cache_warming_*`, and the
|
|
147
|
-
// unsolicited startup frames `extension_ui_request`, `advisor_cost_changed`,
|
|
148
|
-
// `available_commands_update` (recorded from the real v18.4.11 binary) carry nothing here.
|
|
149
|
-
default:
|
|
150
|
-
return { events: [], state };
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
function mapResponse(value, state) {
|
|
154
|
-
const command = string(value.command);
|
|
155
|
-
if (command === 'get_state' && value.success === true && isRecord(value.data)) {
|
|
156
|
-
const sessionId = string(value.data.sessionId);
|
|
157
|
-
if (sessionId && !state.sessionStarted) {
|
|
158
|
-
const model = isRecord(value.data.model) ? string(value.data.model.id) : undefined;
|
|
159
|
-
return {
|
|
160
|
-
events: [{ type: 'session.started', sessionId, backend: 'omp', ...(model ? { model } : {}) }],
|
|
161
|
-
state: { ...state, sessionStarted: true, sessionId },
|
|
162
|
-
};
|
|
163
|
-
}
|
|
164
|
-
return { events: [], state };
|
|
165
|
-
}
|
|
166
|
-
if (command === 'prompt') {
|
|
167
|
-
if (value.success === false) {
|
|
168
|
-
// rpc.md § Request/Response Correlation: a prompt that fails before admission gets only
|
|
169
|
-
// this error response — no `prompt_result` follows — so it is reported here. A failure
|
|
170
|
-
// after admission sends this response after the success ack, AND a `prompt_result`,
|
|
171
|
-
// whose error is then skipped. The opening prompt failing before its ack ends the turn
|
|
172
|
-
// (Ruling 10); a steer failing leaves it running.
|
|
173
|
-
const id = string(value.id);
|
|
174
|
-
let failedPrompts = state.failedPrompts;
|
|
175
|
-
if (id) {
|
|
176
|
-
const kept = [...failedPrompts, id].slice(-FAILED_PROMPTS_KEPT);
|
|
177
|
-
failedPrompts = new Set(kept);
|
|
178
|
-
}
|
|
179
|
-
const error = { type: 'session.error', message: `omp: prompt failed: ${rpcError(value)}`, fatal: false };
|
|
180
|
-
if (opensTurn(value, state) && !state.turnPromptAdmitted) {
|
|
181
|
-
const completed = completeTurn('error', state);
|
|
182
|
-
return { events: [error, ...completed.events], state: { ...completed.state, failedPrompts } };
|
|
183
|
-
}
|
|
184
|
-
return { events: [error], state: { ...state, failedPrompts } };
|
|
185
|
-
}
|
|
186
|
-
if (value.success !== true || !opensTurn(value, state))
|
|
187
|
-
return { events: [], state };
|
|
188
|
-
const admitted = { ...state, turnPromptAdmitted: true };
|
|
189
|
-
return ompTurnBoundary(value) === 'local' ? completeTurn(state.stopReason, admitted) : { events: [], state: admitted };
|
|
190
|
-
}
|
|
191
|
-
// `set_*` failures are configuration notes for the runner (v1), not session errors.
|
|
192
|
-
if (value.success === false && !command?.startsWith('set_')) {
|
|
193
|
-
return { events: [{ type: 'session.error', message: rpcError(value), fatal: false }], state };
|
|
194
|
-
}
|
|
195
|
-
return { events: [], state };
|
|
196
|
-
}
|
|
197
|
-
function mapPromptResult(value, state) {
|
|
198
|
-
// An agent-invoked prompt yields here, but the turn runs on until `session_settled`.
|
|
199
|
-
if (ompTurnBoundary(value) !== 'local')
|
|
200
|
-
return { events: [], state };
|
|
201
|
-
const status = string(value.status);
|
|
202
|
-
const id = string(value.id);
|
|
203
|
-
// Only the prompt that opened the turn ends it; a steer's local completion does not.
|
|
204
|
-
const ends = opensTurn(value, state);
|
|
205
|
-
const end = (reason, next) => ends ? completeTurn(reason, next) : { events: [], state: next };
|
|
206
|
-
if (status === 'error' && id && state.failedPrompts.has(id)) {
|
|
207
|
-
// Its failure response already reported the error; this frame only ends the turn.
|
|
208
|
-
const failedPrompts = new Set(state.failedPrompts);
|
|
209
|
-
failedPrompts.delete(id);
|
|
210
|
-
return end('error', { ...state, failedPrompts });
|
|
211
|
-
}
|
|
212
|
-
if (status === 'error') {
|
|
213
|
-
const error = isRecord(value.error) ? value.error : {};
|
|
214
|
-
const message = ompProviderErrorMessage({
|
|
215
|
-
provider: error.provider,
|
|
216
|
-
model: error.model,
|
|
217
|
-
errorMessage: error.message,
|
|
218
|
-
});
|
|
219
|
-
const completed = end('error', state);
|
|
220
|
-
return { events: [{ type: 'session.error', message, fatal: false }, ...completed.events], state: completed.state };
|
|
221
|
-
}
|
|
222
|
-
return end(status === 'aborted' ? 'cancelled' : state.stopReason, state);
|
|
223
|
-
}
|
|
224
|
-
/* ------------------------------------------------------------------ */
|
|
225
|
-
/* Text and reasoning — same wire as pi-ui-mapper.ts (rpc.md, v18.4.11) */
|
|
226
|
-
/* ------------------------------------------------------------------ */
|
|
227
|
-
/** Parent ids are `<turnId>_text_…`, child ids `<rowId>/text_…` (see `ItemScope`). */
|
|
228
|
-
const LANE_ITEM = /[_/](text|reasoning)_\d+_\d+$/;
|
|
229
|
-
function laneOf(state) {
|
|
230
|
-
return {
|
|
231
|
-
textBlock: state.textBlock,
|
|
232
|
-
startedItems: state.startedItems,
|
|
233
|
-
endedItems: state.endedItems,
|
|
234
|
-
textByItem: state.textByItem,
|
|
235
|
-
};
|
|
236
|
-
}
|
|
237
|
-
function withChildLane(state, rowId, lane) {
|
|
238
|
-
const childLanes = new Map(state.childLanes);
|
|
239
|
-
childLanes.set(rowId, lane);
|
|
240
|
-
return { ...state, childLanes };
|
|
241
|
-
}
|
|
242
|
-
/** Same wire as pi-ui-mapper.ts `mapMessageUpdate` (rpc.md, v18.4.11), for one lane. */
|
|
243
|
-
function laneTextUpdate(update, lane, scope) {
|
|
244
|
-
const updateType = string(update.type);
|
|
245
|
-
const contentIndex = number(update.contentIndex) ?? 0;
|
|
246
|
-
const field = updateType?.startsWith('thinking_') ? 'reasoning' : updateType?.startsWith('text_') ? 'text' : null;
|
|
247
|
-
if (!updateType || !field)
|
|
248
|
-
return { events: [], lane };
|
|
249
|
-
const itemId = `${scope.textPrefix}${field}_${contentIndex}_${lane.textBlock}`;
|
|
250
|
-
const events = [];
|
|
251
|
-
let { startedItems, textByItem, endedItems } = lane;
|
|
252
|
-
const makeItem = (text) => withParent(field === 'text' ? { kind: 'message', id: itemId, role: 'assistant', text } : { kind: 'reasoning', id: itemId, text }, scope);
|
|
253
|
-
const delta = string(update.delta);
|
|
254
|
-
if (!startedItems.has(itemId)) {
|
|
255
|
-
if (delta === undefined && !updateType.endsWith('_end'))
|
|
256
|
-
return { events: [], lane };
|
|
257
|
-
events.push({ type: 'item.started', item: makeItem('') });
|
|
258
|
-
startedItems = new Set(startedItems).add(itemId);
|
|
259
|
-
}
|
|
260
|
-
if (delta !== undefined) {
|
|
261
|
-
events.push({ type: 'item.delta', itemId, field, delta });
|
|
262
|
-
const next = new Map(textByItem);
|
|
263
|
-
next.set(itemId, `${next.get(itemId) ?? ''}${delta}`);
|
|
264
|
-
textByItem = next;
|
|
265
|
-
}
|
|
266
|
-
if (updateType.endsWith('_end')) {
|
|
267
|
-
const text = string(update.content) ?? textByItem.get(itemId) ?? '';
|
|
268
|
-
events.push({ type: 'item.completed', item: makeItem(text) });
|
|
269
|
-
endedItems = new Set(endedItems).add(itemId);
|
|
270
|
-
}
|
|
271
|
-
return { events, lane: { ...lane, startedItems, textByItem, endedItems } };
|
|
272
|
-
}
|
|
273
|
-
/** Same as pi-ui-mapper.ts `closeOpenPiText`, for one lane. */
|
|
274
|
-
function closeLaneText(lane, scope) {
|
|
275
|
-
const events = [];
|
|
276
|
-
let endedItems = lane.endedItems;
|
|
277
|
-
for (const id of lane.startedItems) {
|
|
278
|
-
if (endedItems.has(id))
|
|
279
|
-
continue;
|
|
280
|
-
const kind = LANE_ITEM.exec(id)?.[1];
|
|
281
|
-
if (!kind)
|
|
282
|
-
continue;
|
|
283
|
-
const text = lane.textByItem.get(id) ?? '';
|
|
284
|
-
events.push({
|
|
285
|
-
type: 'item.completed',
|
|
286
|
-
item: withParent(kind === 'text' ? { kind: 'message', id, role: 'assistant', text } : { kind: 'reasoning', id, text }, scope),
|
|
287
|
-
});
|
|
288
|
-
endedItems = new Set(endedItems).add(id);
|
|
289
|
-
}
|
|
290
|
-
return { events, lane: { ...lane, endedItems, textBlock: lane.textBlock + 1 } };
|
|
291
|
-
}
|
|
292
|
-
function parentScope(state) {
|
|
293
|
-
return { textPrefix: `${state.turnId ?? 'turn_0'}_`, toolPrefix: '' };
|
|
294
|
-
}
|
|
295
|
-
function childScope(rowId) {
|
|
296
|
-
return { textPrefix: `${rowId}/`, toolPrefix: `${rowId}/`, parentItemId: rowId };
|
|
297
|
-
}
|
|
298
|
-
function withParent(item, scope) {
|
|
299
|
-
return scope.parentItemId === undefined ? item : { ...item, parentItemId: scope.parentItemId };
|
|
300
|
-
}
|
|
301
|
-
function closeParentText(state) {
|
|
302
|
-
const closed = closeLaneText(laneOf(state), parentScope(state));
|
|
303
|
-
return { events: closed.events, state: { ...state, ...closed.lane } };
|
|
304
|
-
}
|
|
305
|
-
/** Same wire as pi-ui-mapper.ts `mapMessageUpdate` (rpc.md, v18.4.11). */
|
|
306
|
-
function mapMessageUpdate(value, state) {
|
|
307
|
-
const update = isRecord(value.assistantMessageEvent) ? value.assistantMessageEvent : undefined;
|
|
308
|
-
const updateType = update ? string(update.type) : undefined;
|
|
309
|
-
if (!update || !updateType || !state.turnId)
|
|
310
|
-
return { events: [], state };
|
|
311
|
-
if (updateType === 'done') {
|
|
312
|
-
return { events: [], state: { ...state, stopReason: mapOmpMessageStopReason(string(update.reason)) } };
|
|
313
|
-
}
|
|
314
|
-
if (updateType === 'error') {
|
|
315
|
-
const reason = string(update.reason) === 'aborted' ? 'cancelled' : 'error';
|
|
316
|
-
const error = isRecord(update.error) ? string(update.error.errorMessage) : undefined;
|
|
317
|
-
return {
|
|
318
|
-
events: [],
|
|
319
|
-
state: { ...state, stopReason: reason, latchedProviderError: error ?? `omp model ${reason}` },
|
|
320
|
-
};
|
|
321
|
-
}
|
|
322
|
-
const mapped = laneTextUpdate(update, laneOf(state), parentScope(state));
|
|
323
|
-
return { events: mapped.events, state: { ...state, ...mapped.lane } };
|
|
324
|
-
}
|
|
325
|
-
/** Same wire as pi-ui-mapper.ts `mapMessageEnd` (rpc.md, v18.4.11). */
|
|
326
|
-
function mapMessageEnd(value, state) {
|
|
327
|
-
const message = isRecord(value.message) ? value.message : undefined;
|
|
328
|
-
if (!message || string(message.role) !== 'assistant')
|
|
329
|
-
return { events: [], state };
|
|
330
|
-
const closed = closeParentText(state);
|
|
331
|
-
state = closed.state;
|
|
332
|
-
const events = [...closed.events];
|
|
333
|
-
const accounted = accountUsage(ompMessageUsage(value), state);
|
|
334
|
-
events.push(...accounted.events);
|
|
335
|
-
state = accounted.state;
|
|
336
|
-
// Latch the failed attempt, clear on a successful one (#316): `agent_end {yielded:false}`
|
|
337
|
-
// follows a failed attempt OMP is about to retry, and a recovered retry must stay silent.
|
|
338
|
-
if (string(message.stopReason) === 'error') {
|
|
339
|
-
state = { ...state, latchedProviderError: ompProviderErrorMessage(message) };
|
|
340
|
-
}
|
|
341
|
-
else {
|
|
342
|
-
state = { ...state, latchedProviderError: null };
|
|
343
|
-
}
|
|
344
|
-
state = { ...state, stopReason: mapOmpMessageStopReason(string(message.stopReason)) };
|
|
345
|
-
return { events, state };
|
|
346
|
-
}
|
|
347
|
-
/** Same as pi-ui-mapper.ts `mapPiMessageStopReason`. */
|
|
348
|
-
function mapOmpMessageStopReason(reason) {
|
|
349
|
-
if (reason === 'error')
|
|
350
|
-
return 'error';
|
|
351
|
-
if (reason === 'aborted')
|
|
352
|
-
return 'cancelled';
|
|
353
|
-
if (reason === 'length')
|
|
354
|
-
return 'max_tokens';
|
|
355
|
-
return 'end_turn';
|
|
356
|
-
}
|
|
357
|
-
/* ------------------------------------------------------------------ */
|
|
358
|
-
/* Tools */
|
|
359
|
-
/* ------------------------------------------------------------------ */
|
|
360
|
-
/** `toolDisplay` plus the OMP-only shapes: `todo` is the plan tool and a batch `task` is a plain card. */
|
|
361
|
-
function ompToolDisplay(name, args) {
|
|
362
|
-
if (name === 'todo')
|
|
363
|
-
return { toolKind: 'plan', title: 'Update plan' };
|
|
364
|
-
if (name === 'task' && isRecord(args) && Array.isArray(args.tasks)) {
|
|
365
|
-
// The drawer lists one synthetic row per sub-agent; the card itself must not be a row too.
|
|
366
|
-
return { toolKind: 'other', title: `Task batch · ${args.tasks.length} agent${args.tasks.length === 1 ? '' : 's'}` };
|
|
367
|
-
}
|
|
368
|
-
// The single form has no `description`; its `task` text is the row's label.
|
|
369
|
-
const display = name === 'task' && isRecord(args) && args.description === undefined
|
|
370
|
-
? toolDisplay(name, { description: args.task })
|
|
371
|
-
: toolDisplay(name, args);
|
|
372
|
-
return { toolKind: display.toolKind, title: display.title };
|
|
373
|
-
}
|
|
374
|
-
function mapToolStart(value, state) {
|
|
375
|
-
const callId = string(value.toolCallId);
|
|
376
|
-
const name = string(value.toolName);
|
|
377
|
-
if (!callId || !name)
|
|
378
|
-
return { events: [], state };
|
|
379
|
-
const closed = closeParentText(state);
|
|
380
|
-
state = closed.state;
|
|
381
|
-
const started = toolStarted(callId, name, value.args, parentScope(state), state);
|
|
382
|
-
let batchCalls = state.batchCalls;
|
|
383
|
-
if (name === 'task' && isRecord(value.args) && Array.isArray(value.args.tasks)) {
|
|
384
|
-
batchCalls = new Set(batchCalls).add(callId);
|
|
385
|
-
}
|
|
386
|
-
return { events: [...closed.events, ...started.events], state: { ...started.state, batchCalls } };
|
|
387
|
-
}
|
|
388
|
-
function toolStarted(callId, name, args, scope, state) {
|
|
389
|
-
const display = ompToolDisplay(name, args);
|
|
390
|
-
const item = withParent({
|
|
391
|
-
kind: 'tool',
|
|
392
|
-
id: `${scope.toolPrefix}${callId}`,
|
|
393
|
-
name,
|
|
394
|
-
toolKind: display.toolKind,
|
|
395
|
-
title: display.title,
|
|
396
|
-
status: 'running',
|
|
397
|
-
input: args,
|
|
398
|
-
}, scope);
|
|
399
|
-
const tools = new Map(state.tools);
|
|
400
|
-
tools.set(item.id, item);
|
|
401
|
-
return { events: [{ type: 'item.started', item }], state: { ...state, tools } };
|
|
402
|
-
}
|
|
403
|
-
function mapToolUpdate(value, state) {
|
|
404
|
-
return toolUpdated(value, '', state);
|
|
405
|
-
}
|
|
406
|
-
function toolUpdated(value, toolPrefix, state) {
|
|
407
|
-
const callId = string(value.toolCallId);
|
|
408
|
-
const id = callId ? `${toolPrefix}${callId}` : undefined;
|
|
409
|
-
const previous = id ? state.tools.get(id) : undefined;
|
|
410
|
-
if (!id || !previous)
|
|
411
|
-
return { events: [], state };
|
|
412
|
-
const output = contentText(isRecord(value.partialResult) ? value.partialResult.content : undefined);
|
|
413
|
-
if (output === undefined)
|
|
414
|
-
return { events: [], state };
|
|
415
|
-
const item = { ...previous, output };
|
|
416
|
-
const tools = new Map(state.tools);
|
|
417
|
-
tools.set(id, item);
|
|
418
|
-
return { events: [{ type: 'item.updated', item }], state: { ...state, tools } };
|
|
419
|
-
}
|
|
420
|
-
function mapToolEnd(value, state) {
|
|
421
|
-
return toolEnded(value, parentScope(state), state, true);
|
|
422
|
-
}
|
|
423
|
-
function toolEnded(value, scope, state, publishPlan) {
|
|
424
|
-
const callId = string(value.toolCallId);
|
|
425
|
-
const id = callId ? `${scope.toolPrefix}${callId}` : undefined;
|
|
426
|
-
const previous = id ? state.tools.get(id) : undefined;
|
|
427
|
-
if (!id || !previous)
|
|
428
|
-
return { events: [], state };
|
|
429
|
-
const result = isRecord(value.result) ? value.result : {};
|
|
430
|
-
const output = contentText(result.content);
|
|
431
|
-
const isError = value.isError === true || result.isError === true;
|
|
432
|
-
// A single-form `task` row is its sub-agent's: in RPC OMP runs `task` asynchronously by
|
|
433
|
-
// default, so the result can arrive while the agent still runs, and an aborted agent's result
|
|
434
|
-
// can still read as success. Its lifecycle status wins over a successful result.
|
|
435
|
-
const agent = scope.toolPrefix === '' ? singleFormSubagent(state, id) : undefined;
|
|
436
|
-
if (agent)
|
|
437
|
-
state = withSubagent(state, agent[0], { ...agent[1], ended: true });
|
|
438
|
-
const status = isError ? 'failed' : agent ? agent[1].status : 'completed';
|
|
439
|
-
const item = {
|
|
440
|
-
...previous,
|
|
441
|
-
status,
|
|
442
|
-
...(isError ? { error: output ?? 'omp tool failed' } : output !== undefined ? { output } : {}),
|
|
443
|
-
};
|
|
444
|
-
const diffs = isError ? undefined : ompToolDiffs(previous.name, previous.input, result);
|
|
445
|
-
if (diffs) {
|
|
446
|
-
item.diffs = diffs;
|
|
447
|
-
// Hashline edits carry the path only in `{input}` text; the result names it.
|
|
448
|
-
if (previous.name.toLowerCase() === 'edit' && !argsPath(previous.input)) {
|
|
449
|
-
item.title = diffs.length === 1 ? `Edit ${diffs[0].path}` : `Edit ${diffs.length} files`;
|
|
450
|
-
}
|
|
451
|
-
}
|
|
452
|
-
const tools = new Map(state.tools);
|
|
453
|
-
tools.set(id, item);
|
|
454
|
-
const events = [{ type: status === 'running' ? 'item.updated' : 'item.completed', item }];
|
|
455
|
-
// A sub-agent's todo list is its own; it never replaces the session's plan dock.
|
|
456
|
-
const plan = publishPlan && !isError ? ompToolPlan(previous.name, result) : undefined;
|
|
457
|
-
if (plan)
|
|
458
|
-
events.push({ type: 'plan.updated', entries: plan });
|
|
459
|
-
return { events, state: { ...state, tools } };
|
|
460
|
-
}
|
|
461
|
-
/**
|
|
462
|
-
* Diffs for an `edit`/`write` call. OMP's default `edit.mode` is `hashline` (args `{input}`), so
|
|
463
|
-
* the change lives in the result `details` (`path`/`oldText`/`newText`, or `perFileResults[]` for
|
|
464
|
-
* several files — `src/edit/index.ts` `aggregateDetails`, v18.4.11). Falls back to replace-mode
|
|
465
|
-
* args and `write` content, the same reading as pi-ui-mapper.ts `toolDiffs`.
|
|
466
|
-
*/
|
|
467
|
-
function ompToolDiffs(name, args, result) {
|
|
468
|
-
const key = name.toLowerCase();
|
|
469
|
-
if (key !== 'edit' && key !== 'write')
|
|
470
|
-
return undefined;
|
|
471
|
-
const details = isRecord(result.details) ? result.details : undefined;
|
|
472
|
-
if (details) {
|
|
473
|
-
const files = Array.isArray(details.perFileResults) ? details.perFileResults : [details];
|
|
474
|
-
const diffs = files.flatMap((file) => {
|
|
475
|
-
const diff = isRecord(file) ? detailDiff(file) : undefined;
|
|
476
|
-
return diff ? [diff] : [];
|
|
477
|
-
});
|
|
478
|
-
if (diffs.length > 0)
|
|
479
|
-
return diffs;
|
|
480
|
-
}
|
|
481
|
-
return argsDiffs(key, args);
|
|
482
|
-
}
|
|
483
|
-
function detailDiff(file) {
|
|
484
|
-
const path = string(file.path);
|
|
485
|
-
const oldText = string(file.oldText);
|
|
486
|
-
const newText = string(file.newText);
|
|
487
|
-
if (!path || (oldText === undefined && newText === undefined))
|
|
488
|
-
return undefined;
|
|
489
|
-
return { path, oldText: oldText ?? null, ...(newText !== undefined ? { newText } : {}) };
|
|
490
|
-
}
|
|
491
|
-
/** The path keys `toolDisplay` titles an edit from. */
|
|
492
|
-
function argsPath(input) {
|
|
493
|
-
if (!isRecord(input))
|
|
494
|
-
return undefined;
|
|
495
|
-
return string(input.path) ?? string(input.file_path) ?? string(input.filePath);
|
|
496
|
-
}
|
|
497
|
-
/** Same reading as pi-ui-mapper.ts `toolDiffs`. */
|
|
498
|
-
function argsDiffs(key, input) {
|
|
499
|
-
if (!isRecord(input))
|
|
500
|
-
return undefined;
|
|
501
|
-
const path = argsPath(input);
|
|
502
|
-
if (!path)
|
|
503
|
-
return undefined;
|
|
504
|
-
const oldText = string(input.oldText) ?? string(input.old_string) ?? (key === 'write' ? null : undefined);
|
|
505
|
-
const newText = string(input.newText) ?? string(input.new_string) ?? string(input.content);
|
|
506
|
-
if (oldText === undefined && newText === undefined)
|
|
507
|
-
return undefined;
|
|
508
|
-
return [{ path, oldText: oldText ?? null, ...(newText !== undefined ? { newText } : {}) }];
|
|
509
|
-
}
|
|
510
|
-
const TODO_STATUS = {
|
|
511
|
-
pending: 'pending',
|
|
512
|
-
in_progress: 'in_progress',
|
|
513
|
-
completed: 'completed',
|
|
514
|
-
abandoned: 'cancelled',
|
|
515
|
-
// A blocked task is still to do; the plan vocabulary has no "blocked".
|
|
516
|
-
blocked: 'pending',
|
|
517
|
-
};
|
|
518
|
-
/**
|
|
519
|
-
* The whole plan from a state-changing `todo` result: `details.phases[].tasks[]` holds the full
|
|
520
|
-
* list after the op (`src/tools/todo.ts` `committedTodoPhases`, v18.4.11). `view` is a read.
|
|
521
|
-
*/
|
|
522
|
-
function ompToolPlan(name, result) {
|
|
523
|
-
if (name !== 'todo' || !isRecord(result.details))
|
|
524
|
-
return undefined;
|
|
525
|
-
const { op, phases } = result.details;
|
|
526
|
-
if (op === 'view' || !Array.isArray(phases))
|
|
527
|
-
return undefined;
|
|
528
|
-
const entries = [];
|
|
529
|
-
for (const phase of phases) {
|
|
530
|
-
if (!isRecord(phase) || !Array.isArray(phase.tasks))
|
|
531
|
-
continue;
|
|
532
|
-
for (const task of phase.tasks) {
|
|
533
|
-
if (!isRecord(task))
|
|
534
|
-
continue;
|
|
535
|
-
const content = string(task.content);
|
|
536
|
-
const status = TODO_STATUS[string(task.status) ?? ''];
|
|
537
|
-
if (content && status)
|
|
538
|
-
entries.push({ content, status });
|
|
539
|
-
}
|
|
540
|
-
}
|
|
541
|
-
return entries;
|
|
542
|
-
}
|
|
543
|
-
/* ------------------------------------------------------------------ */
|
|
544
|
-
/* Sub-agents */
|
|
545
|
-
/* ------------------------------------------------------------------ */
|
|
546
|
-
function lifecycleStatus(status) {
|
|
547
|
-
if (status === 'completed')
|
|
548
|
-
return 'completed';
|
|
549
|
-
if (status === 'failed' || status === 'aborted')
|
|
550
|
-
return 'failed';
|
|
551
|
-
return 'running';
|
|
552
|
-
}
|
|
553
|
-
/** The batch entry this sub-agent runs: by `name` (OMP derives the id from it), else by index. */
|
|
554
|
-
function batchTask(parent, id, index) {
|
|
555
|
-
const tasks = isRecord(parent?.input) && Array.isArray(parent.input.tasks) ? parent.input.tasks : [];
|
|
556
|
-
const byName = tasks.find((task) => isRecord(task) && string(task.name) === id);
|
|
557
|
-
if (isRecord(byName))
|
|
558
|
-
return byName;
|
|
559
|
-
const byIndex = index !== undefined ? tasks[index] : undefined;
|
|
560
|
-
return isRecord(byIndex) ? byIndex : undefined;
|
|
561
|
-
}
|
|
562
|
-
function mapSubagentLifecycle(payload, state) {
|
|
563
|
-
const id = string(payload.id);
|
|
564
|
-
if (!id)
|
|
565
|
-
return { events: [], state };
|
|
566
|
-
const status = lifecycleStatus(string(payload.status));
|
|
567
|
-
const events = [];
|
|
568
|
-
const parentToolCallId = string(payload.parentToolCallId) ?? '';
|
|
569
|
-
let entry = state.subagents.get(id);
|
|
570
|
-
// v18.4.11 `AgentOutputManager.allocate` keeps ids unique within one session, but a
|
|
571
|
-
// `new_session` in the same process starts a fresh allocator. A `started` frame naming
|
|
572
|
-
// another parent call is a new agent: rebind the id so its events cannot reach the old row.
|
|
573
|
-
if (entry && string(payload.status) === 'started' && parentToolCallId && entry.parentToolCallId !== parentToolCallId) {
|
|
574
|
-
entry = undefined;
|
|
575
|
-
}
|
|
576
|
-
if (!entry) {
|
|
577
|
-
const parent = parentToolCallId ? state.tools.get(parentToolCallId) : undefined;
|
|
578
|
-
// A single-form call IS the sub-agent's row; a batch call (or an unknown parent) gets one
|
|
579
|
-
// synthetic `task` row per sub-agent so the drawer counts agents, not calls.
|
|
580
|
-
const single = parent !== undefined && !state.batchCalls.has(parentToolCallId);
|
|
581
|
-
const rowId = single ? parentToolCallId : `${parentToolCallId || 'omp-subagent'}#${id}`;
|
|
582
|
-
entry = { rowId, parentToolCallId, status, ended: false };
|
|
583
|
-
state = withSubagent(state, id, entry);
|
|
584
|
-
if (!single) {
|
|
585
|
-
const agent = string(payload.agent);
|
|
586
|
-
const task = batchTask(parent, id, number(payload.index));
|
|
587
|
-
const taskText = task ? string(task.task) : undefined;
|
|
588
|
-
const label = string(payload.description) ?? taskText ?? agent ?? id;
|
|
589
|
-
const item = {
|
|
590
|
-
kind: 'tool',
|
|
591
|
-
id: rowId,
|
|
592
|
-
name: 'task',
|
|
593
|
-
toolKind: 'task',
|
|
594
|
-
title: toolDisplay('task', { description: label }).title,
|
|
595
|
-
status: 'running',
|
|
596
|
-
input: { ...(agent ? { agent } : {}), ...(taskText ? { task: taskText } : {}) },
|
|
597
|
-
};
|
|
598
|
-
const tools = new Map(state.tools);
|
|
599
|
-
tools.set(rowId, item);
|
|
600
|
-
state = { ...state, tools };
|
|
601
|
-
events.push({ type: 'item.started', item });
|
|
602
|
-
}
|
|
603
|
-
}
|
|
604
|
-
// Replay what arrived before this frame named the parent, ahead of any terminal close.
|
|
605
|
-
const buffered = state.pendingSubagentEvents.get(id);
|
|
606
|
-
if (buffered) {
|
|
607
|
-
const pendingSubagentEvents = new Map(state.pendingSubagentEvents);
|
|
608
|
-
pendingSubagentEvents.delete(id);
|
|
609
|
-
state = { ...state, pendingSubagentEvents };
|
|
610
|
-
for (const event of buffered) {
|
|
611
|
-
const mapped = mapChildEvent(event, entry.rowId, state);
|
|
612
|
-
state = mapped.state;
|
|
613
|
-
events.push(...mapped.events);
|
|
614
|
-
}
|
|
615
|
-
}
|
|
616
|
-
if (status !== 'running') {
|
|
617
|
-
// An aborted agent leaves its last block open; it ends with the agent, not the turn.
|
|
618
|
-
const lane = state.childLanes.get(entry.rowId);
|
|
619
|
-
if (lane) {
|
|
620
|
-
const closed = closeLaneText(lane, childScope(entry.rowId));
|
|
621
|
-
events.push(...closed.events);
|
|
622
|
-
state = withChildLane(state, entry.rowId, closed.lane);
|
|
623
|
-
}
|
|
624
|
-
}
|
|
625
|
-
if (entry.status !== status) {
|
|
626
|
-
entry = { ...entry, status };
|
|
627
|
-
state = withSubagent(state, id, entry);
|
|
628
|
-
}
|
|
629
|
-
// A batch row is the agent's own; a single-form row is the `task` call, which follows the
|
|
630
|
-
// lifecycle only once its result has arrived (`toolEnded` reads `status` up to then).
|
|
631
|
-
const single = entry.rowId === entry.parentToolCallId;
|
|
632
|
-
const row = !single || (entry.ended && status !== 'running') ? state.tools.get(entry.rowId) : undefined;
|
|
633
|
-
if (row && row.status !== status && (!single || row.status === 'running')) {
|
|
634
|
-
const item = { ...row, status };
|
|
635
|
-
const tools = new Map(state.tools);
|
|
636
|
-
tools.set(row.id, item);
|
|
637
|
-
state = { ...state, tools };
|
|
638
|
-
events.push({ type: status === 'running' ? 'item.updated' : 'item.completed', item });
|
|
639
|
-
}
|
|
640
|
-
return { events, state };
|
|
641
|
-
}
|
|
642
|
-
/** The sub-agent whose single-form `task` call is row `rowId`, with its id. */
|
|
643
|
-
function singleFormSubagent(state, rowId) {
|
|
644
|
-
for (const [id, entry] of state.subagents) {
|
|
645
|
-
if (entry.rowId === rowId && entry.parentToolCallId === rowId)
|
|
646
|
-
return [id, entry];
|
|
647
|
-
}
|
|
648
|
-
return undefined;
|
|
649
|
-
}
|
|
650
|
-
function withSubagent(state, id, entry) {
|
|
651
|
-
const subagents = new Map(state.subagents);
|
|
652
|
-
subagents.set(id, entry);
|
|
653
|
-
return { ...state, subagents };
|
|
654
|
-
}
|
|
655
|
-
function mapSubagentEvent(payload, state) {
|
|
656
|
-
const id = string(payload.id);
|
|
657
|
-
if (!id || !isRecord(payload.event))
|
|
658
|
-
return { events: [], state };
|
|
659
|
-
// Account on receipt, before the presentation buffer. Replaying or dropping visual
|
|
660
|
-
// frames must neither duplicate nor discard spend (hearsay-tools/cezarion#833).
|
|
661
|
-
const accounted = accountUsage(ompMessageUsage({ type: 'subagent_event', payload }), state);
|
|
662
|
-
const mapped = mapSubagentVisualEvent(id, payload.event, accounted.state);
|
|
663
|
-
return { events: [...accounted.events, ...mapped.events], state: mapped.state };
|
|
664
|
-
}
|
|
665
|
-
function mapSubagentVisualEvent(id, event, state) {
|
|
666
|
-
const entry = state.subagents.get(id);
|
|
667
|
-
if (entry)
|
|
668
|
-
return mapChildEvent(event, entry.rowId, state);
|
|
669
|
-
// Only the lifecycle frame names the parent call: hold the event until it arrives.
|
|
670
|
-
const buffered = state.pendingSubagentEvents.get(id);
|
|
671
|
-
const full = buffered
|
|
672
|
-
? buffered.length >= PENDING_SUBAGENT_EVENTS_PER_ID
|
|
673
|
-
: state.pendingSubagentEvents.size >= PENDING_SUBAGENT_IDS;
|
|
674
|
-
if (full) {
|
|
675
|
-
if (state.subagentDropReported)
|
|
676
|
-
return { events: [], state };
|
|
677
|
-
return {
|
|
678
|
-
events: [{ type: 'session.error', message: SUBAGENT_DROP_MESSAGE, fatal: false }],
|
|
679
|
-
state: { ...state, subagentDropReported: true },
|
|
680
|
-
};
|
|
681
|
-
}
|
|
682
|
-
const pendingSubagentEvents = new Map(state.pendingSubagentEvents);
|
|
683
|
-
pendingSubagentEvents.set(id, [...(buffered ?? []), event]);
|
|
684
|
-
return { events: [], state: { ...state, pendingSubagentEvents } };
|
|
685
|
-
}
|
|
686
|
-
/**
|
|
687
|
-
* One sub-agent's `AgentSessionEvent`, nested under its row. It never ends the parent turn,
|
|
688
|
-
* never writes parent text or plan: a child `agent_end` only closes the child's own open
|
|
689
|
-
* text. Usage is accounted on receipt, outside this replayable presentation path.
|
|
690
|
-
*/
|
|
691
|
-
function mapChildEvent(event, rowId, state) {
|
|
692
|
-
if (!isRecord(event) || typeof event.type !== 'string')
|
|
693
|
-
return { events: [], state };
|
|
694
|
-
const scope = childScope(rowId);
|
|
695
|
-
const lane = state.childLanes.get(rowId) ?? EMPTY_LANE;
|
|
696
|
-
switch (event.type) {
|
|
697
|
-
case 'message_update': {
|
|
698
|
-
if (!isRecord(event.assistantMessageEvent))
|
|
699
|
-
return { events: [], state };
|
|
700
|
-
const mapped = laneTextUpdate(event.assistantMessageEvent, lane, scope);
|
|
701
|
-
return { events: mapped.events, state: withChildLane(state, rowId, mapped.lane) };
|
|
702
|
-
}
|
|
703
|
-
case 'message_end':
|
|
704
|
-
case 'agent_end': {
|
|
705
|
-
if (event.type === 'message_end' && !isAssistantMessageEnd(event))
|
|
706
|
-
return { events: [], state };
|
|
707
|
-
const closed = closeLaneText(lane, scope);
|
|
708
|
-
return { events: closed.events, state: withChildLane(state, rowId, closed.lane) };
|
|
709
|
-
}
|
|
710
|
-
case 'tool_execution_start': {
|
|
711
|
-
const callId = string(event.toolCallId);
|
|
712
|
-
const name = string(event.toolName);
|
|
713
|
-
if (!callId || !name)
|
|
714
|
-
return { events: [], state };
|
|
715
|
-
const closed = closeLaneText(lane, scope);
|
|
716
|
-
const started = toolStarted(callId, name, event.args, scope, withChildLane(state, rowId, closed.lane));
|
|
717
|
-
return { events: [...closed.events, ...started.events], state: started.state };
|
|
718
|
-
}
|
|
719
|
-
case 'tool_execution_update':
|
|
720
|
-
return toolUpdated(event, scope.toolPrefix, state);
|
|
721
|
-
case 'tool_execution_end':
|
|
722
|
-
return toolEnded(event, scope, state, false);
|
|
723
|
-
default:
|
|
724
|
-
return { events: [], state };
|
|
725
|
-
}
|
|
726
|
-
}
|
|
727
|
-
/* ------------------------------------------------------------------ */
|
|
728
|
-
/* Turn end, usage and errors */
|
|
729
|
-
/* ------------------------------------------------------------------ */
|
|
730
|
-
/** Same as pi-ui-mapper.ts `completeTurn`, also closing every sub-agent's open text. */
|
|
731
|
-
function completeTurn(reason, state) {
|
|
732
|
-
if (!state.turnId)
|
|
733
|
-
return { events: [], state };
|
|
734
|
-
const turnId = state.turnId;
|
|
735
|
-
const closed = closeParentText(state);
|
|
736
|
-
state = closed.state;
|
|
737
|
-
const events = [...closed.events];
|
|
738
|
-
for (const [rowId, lane] of state.childLanes) {
|
|
739
|
-
const child = closeLaneText(lane, childScope(rowId));
|
|
740
|
-
events.push(...child.events);
|
|
741
|
-
state = withChildLane(state, rowId, child.lane);
|
|
742
|
-
}
|
|
743
|
-
const flushed = ompFlushProviderError(state);
|
|
744
|
-
state = flushed.state;
|
|
745
|
-
const event = { type: 'turn.completed', turnId, stopReason: reason };
|
|
746
|
-
if (state.turnUsage)
|
|
747
|
-
event.usage = state.turnUsage;
|
|
748
|
-
if (state.turnCostUsd !== null)
|
|
749
|
-
event.costUsd = state.turnCostUsd;
|
|
750
|
-
return {
|
|
751
|
-
events: [...events, ...flushed.events, event],
|
|
752
|
-
state: { ...state, turnId: null, turnPromptId: null, turnPromptAdmitted: false, turnUsage: null, turnCostUsd: null },
|
|
753
|
-
};
|
|
754
|
-
}
|
|
755
|
-
/** Same as pi-ui-mapper.ts `piFlushProviderError`: release the latch as `session.error` (#256). */
|
|
756
|
-
export function ompFlushProviderError(state) {
|
|
757
|
-
if (!state.latchedProviderError)
|
|
758
|
-
return { events: [], state };
|
|
759
|
-
return {
|
|
760
|
-
events: [{ type: 'session.error', message: state.latchedProviderError, fatal: false }],
|
|
761
|
-
state: { ...state, latchedProviderError: null },
|
|
762
|
-
};
|
|
763
|
-
}
|
|
764
|
-
/** Same as pi-ui-mapper.ts `piProviderErrorMessage`, prefixed `omp:`. */
|
|
765
|
-
export function ompProviderErrorMessage(message) {
|
|
766
|
-
const detail = ompProviderErrorDetail(message);
|
|
767
|
-
const provider = string(message.provider);
|
|
768
|
-
const model = string(message.model);
|
|
769
|
-
const who = provider && model ? `${provider}/${model}` : (provider ?? model);
|
|
770
|
-
if (who && detail)
|
|
771
|
-
return `omp: ${who} request failed: ${detail}`;
|
|
772
|
-
if (who)
|
|
773
|
-
return `omp: ${who} request failed`;
|
|
774
|
-
if (detail)
|
|
775
|
-
return `omp: provider request failed: ${detail}`;
|
|
776
|
-
return 'omp: provider request failed';
|
|
777
|
-
}
|
|
778
|
-
/** Same as pi-ui-mapper.ts `piProviderErrorDetail`. */
|
|
779
|
-
function ompProviderErrorDetail(message) {
|
|
780
|
-
if (Array.isArray(message.diagnostics)) {
|
|
781
|
-
for (const diagnostic of message.diagnostics) {
|
|
782
|
-
if (!isRecord(diagnostic) || string(diagnostic.type) !== 'provider_transport_failure')
|
|
783
|
-
continue;
|
|
784
|
-
const error = isRecord(diagnostic.error) ? string(diagnostic.error.message) : undefined;
|
|
785
|
-
if (error)
|
|
786
|
-
return error;
|
|
787
|
-
}
|
|
788
|
-
}
|
|
789
|
-
return string(message.errorMessage);
|
|
790
|
-
}
|
|
791
|
-
/** Read the same native per-message report for both v1 and v2, including child envelopes. */
|
|
792
|
-
export function ompMessageUsage(value) {
|
|
793
|
-
if (!isRecord(value))
|
|
794
|
-
return undefined;
|
|
795
|
-
if (value.type === 'subagent_event') {
|
|
796
|
-
if (!isRecord(value.payload) || !string(value.payload.id) || !isRecord(value.payload.event))
|
|
797
|
-
return undefined;
|
|
798
|
-
value = value.payload.event;
|
|
799
|
-
}
|
|
800
|
-
if (!isRecord(value) || value.type !== 'message_end' || !isRecord(value.message) || value.message.role !== 'assistant')
|
|
801
|
-
return undefined;
|
|
802
|
-
return usageEvent(value.message.usage);
|
|
803
|
-
}
|
|
804
|
-
function sumUsage(previous, next) {
|
|
805
|
-
return {
|
|
806
|
-
input: (previous?.input ?? 0) + next.input,
|
|
807
|
-
output: (previous?.output ?? 0) + next.output,
|
|
808
|
-
total: (previous?.total ?? 0) + (next.total ?? 0),
|
|
809
|
-
...(previous?.cacheRead !== undefined || next.cacheRead !== undefined
|
|
810
|
-
? { cacheRead: (previous?.cacheRead ?? 0) + (next.cacheRead ?? 0) } : {}),
|
|
811
|
-
...(previous?.cacheWrite !== undefined || next.cacheWrite !== undefined
|
|
812
|
-
? { cacheWrite: (previous?.cacheWrite ?? 0) + (next.cacheWrite ?? 0) } : {}),
|
|
813
|
-
};
|
|
814
|
-
}
|
|
815
|
-
function accountUsage(report, state) {
|
|
816
|
-
if (!report)
|
|
817
|
-
return { events: [], state };
|
|
818
|
-
const sessionUsage = sumUsage(state.sessionUsage, report.usage);
|
|
819
|
-
const sessionCostUsd = report.costUsd === undefined ? state.sessionCostUsd : (state.sessionCostUsd ?? 0) + report.costUsd;
|
|
820
|
-
return {
|
|
821
|
-
events: [{ type: 'usage.updated', usage: sessionUsage, ...(sessionCostUsd !== null ? { costUsd: sessionCostUsd } : {}) }],
|
|
822
|
-
state: {
|
|
823
|
-
...state, sessionUsage, sessionCostUsd,
|
|
824
|
-
...(state.turnId ? {
|
|
825
|
-
turnUsage: sumUsage(state.turnUsage, report.usage),
|
|
826
|
-
turnCostUsd: report.costUsd === undefined ? state.turnCostUsd : (state.turnCostUsd ?? 0) + report.costUsd,
|
|
827
|
-
} : {}),
|
|
828
|
-
},
|
|
829
|
-
};
|
|
830
|
-
}
|
|
831
|
-
/** Native OMP message usage is an increment; the public usage.updated event is cumulative. */
|
|
832
|
-
function usageEvent(value) {
|
|
833
|
-
if (!isRecord(value))
|
|
834
|
-
return undefined;
|
|
835
|
-
const input = number(value.input) ?? 0;
|
|
836
|
-
const output = number(value.output) ?? 0;
|
|
837
|
-
const cacheRead = number(value.cacheRead);
|
|
838
|
-
const cacheWrite = number(value.cacheWrite);
|
|
839
|
-
const total = number(value.totalTokens) ?? input + output + (cacheRead ?? 0) + (cacheWrite ?? 0);
|
|
840
|
-
const cost = isRecord(value.cost) ? number(value.cost.total) : undefined;
|
|
841
|
-
if (total <= 0 && !(cost !== undefined && cost > 0))
|
|
842
|
-
return undefined;
|
|
843
|
-
return {
|
|
844
|
-
type: 'usage.updated',
|
|
845
|
-
usage: {
|
|
846
|
-
input,
|
|
847
|
-
output,
|
|
848
|
-
total,
|
|
849
|
-
...(cacheRead !== undefined ? { cacheRead } : {}),
|
|
850
|
-
...(cacheWrite !== undefined ? { cacheWrite } : {}),
|
|
851
|
-
},
|
|
852
|
-
...(cost !== undefined && cost >= 0 ? { costUsd: cost } : {}),
|
|
853
|
-
};
|
|
854
|
-
}
|
|
855
|
-
/** OMP's failure response carries `error` as a string (rpc.md § Responses). */
|
|
856
|
-
function rpcError(value) {
|
|
857
|
-
if (typeof value.error === 'string')
|
|
858
|
-
return value.error;
|
|
859
|
-
const error = isRecord(value.error) ? value.error : undefined;
|
|
860
|
-
return string(error?.message) ?? string(value.message) ?? `omp RPC command ${string(value.command) ?? 'unknown'} failed`;
|
|
861
|
-
}
|
|
862
|
-
/** Same as pi-ui-mapper.ts `contentText`. */
|
|
863
|
-
function contentText(value) {
|
|
864
|
-
if (typeof value === 'string')
|
|
865
|
-
return value;
|
|
866
|
-
if (!Array.isArray(value))
|
|
867
|
-
return undefined;
|
|
868
|
-
const parts = value
|
|
869
|
-
.map((part) => (isRecord(part) && part.type === 'text' ? string(part.text) : undefined))
|
|
870
|
-
.filter((part) => part !== undefined);
|
|
871
|
-
return parts.length > 0 ? parts.join('\n') : undefined;
|
|
872
|
-
}
|
|
873
|
-
function isRecord(value) {
|
|
874
|
-
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
875
|
-
}
|
|
876
|
-
function string(value) {
|
|
877
|
-
return typeof value === 'string' ? value : undefined;
|
|
878
|
-
}
|
|
879
|
-
function number(value) {
|
|
880
|
-
return typeof value === 'number' && Number.isFinite(value) ? value : undefined;
|
|
881
|
-
}
|
|
882
|
-
//# sourceMappingURL=omp-ui-mapper.js.map
|