@open-mercato/cezar 0.17.0-pr976.3708 → 0.17.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/README.md +4 -0
- package/dist/agent-config/validate.d.ts +2 -1
- package/dist/agent-config/validate.js.map +1 -1
- package/dist/api-origin.d.ts +0 -4
- package/dist/api-origin.js +0 -22
- package/dist/api-origin.js.map +1 -1
- package/dist/cockpit-address.d.ts +5 -0
- package/dist/cockpit-address.js +7 -0
- package/dist/cockpit-address.js.map +1 -1
- package/dist/contract/health.d.ts +30 -0
- package/dist/contract/index.d.ts +1 -0
- package/dist/contract/index.js +2370 -2054
- package/dist/contract/projects.d.ts +1 -0
- package/dist/contract/runs.d.ts +178 -2
- package/dist/contract/skills.d.ts +23 -0
- package/dist/contract/webhooks.d.ts +1136 -0
- package/dist/contract/workspace.d.ts +2 -0
- package/dist/core/agent-errors.d.ts +6 -0
- package/dist/core/agent-errors.js +13 -0
- package/dist/core/agent-errors.js.map +1 -1
- package/dist/core/agent-failure-class.d.ts +24 -0
- package/dist/core/agent-failure-class.js +99 -0
- package/dist/core/agent-failure-class.js.map +1 -0
- package/dist/core/agent-runner.d.ts +1 -1
- package/dist/core/claude-cli-runner.d.ts +2 -2
- package/dist/core/claude-cli-runner.js +17 -21
- package/dist/core/claude-cli-runner.js.map +1 -1
- package/dist/core/codex-app-server-runner.d.ts +1 -1
- package/dist/core/codex-app-server-runner.js +20 -23
- package/dist/core/codex-app-server-runner.js.map +1 -1
- package/dist/core/copilot-acp-runner.d.ts +1 -1
- package/dist/core/copilot-acp-runner.js +10 -10
- package/dist/core/copilot-acp-runner.js.map +1 -1
- package/dist/core/cursor-agent-runner.js +18 -22
- package/dist/core/cursor-agent-runner.js.map +1 -1
- package/dist/core/inactivity-deadline.d.ts +21 -0
- package/dist/core/inactivity-deadline.js +49 -0
- package/dist/core/inactivity-deadline.js.map +1 -0
- package/dist/core/junie-runner.d.ts +1 -1
- package/dist/core/junie-runner.js +16 -20
- package/dist/core/junie-runner.js.map +1 -1
- package/dist/core/opencode-server-runner.d.ts +2 -2
- package/dist/core/opencode-server-runner.js +23 -15
- package/dist/core/opencode-server-runner.js.map +1 -1
- package/dist/core/pi-runner.d.ts +1 -1
- package/dist/core/pi-runner.js +8 -10
- package/dist/core/pi-runner.js.map +1 -1
- package/dist/core/provider-auth.js +18 -6
- package/dist/core/provider-auth.js.map +1 -1
- package/dist/core/runner-factory.d.ts +2 -0
- package/dist/core/runner-factory.js +39 -0
- package/dist/core/runner-factory.js.map +1 -1
- package/dist/core/secret-redaction.js +38 -6
- package/dist/core/secret-redaction.js.map +1 -1
- package/dist/data-gitignore.d.ts +1 -1
- package/dist/data-gitignore.js +1 -0
- package/dist/data-gitignore.js.map +1 -1
- package/dist/disk-space.d.ts +38 -0
- package/dist/disk-space.js +113 -0
- package/dist/disk-space.js.map +1 -0
- package/dist/dispatch/prompts.js +1 -1
- package/dist/git-worktree.d.ts +2 -0
- package/dist/git-worktree.js +16 -0
- package/dist/git-worktree.js.map +1 -1
- package/dist/handoff.d.ts +2 -2
- package/dist/handoff.js +1 -1
- package/dist/index.js +24 -3
- package/dist/index.js.map +1 -1
- package/dist/pack-check.d.ts +10 -0
- package/dist/pack-check.js +7 -0
- package/dist/pack-check.js.map +1 -1
- package/dist/release/backport.d.ts +34 -0
- package/dist/release/backport.js +33 -0
- package/dist/release/backport.js.map +1 -0
- package/dist/runs/agent-error-telemetry.d.ts +5 -1
- package/dist/runs/agent-error-telemetry.js +17 -10
- package/dist/runs/agent-error-telemetry.js.map +1 -1
- package/dist/runs/failure-kind.d.ts +1 -1
- package/dist/runs/failure-kind.js +5 -8
- package/dist/runs/failure-kind.js.map +1 -1
- package/dist/runs/lifecycle.d.ts +55 -0
- package/dist/runs/lifecycle.js +24 -0
- package/dist/runs/lifecycle.js.map +1 -0
- package/dist/runs/retention.js +36 -4
- package/dist/runs/retention.js.map +1 -1
- package/dist/runs/store.d.ts +31 -0
- package/dist/runs/store.js +59 -5
- package/dist/runs/store.js.map +1 -1
- package/dist/server/capabilities.js +3 -0
- package/dist/server/capabilities.js.map +1 -1
- package/dist/server/disk-health.d.ts +11 -0
- package/dist/server/disk-health.js +26 -0
- package/dist/server/disk-health.js.map +1 -0
- package/dist/server/forge/github.d.ts +9 -1
- package/dist/server/forge/github.js +42 -3
- package/dist/server/forge/github.js.map +1 -1
- package/dist/server/message-receipts.d.ts +27 -0
- package/dist/server/message-receipts.js +54 -0
- package/dist/server/message-receipts.js.map +1 -0
- package/dist/server/project-context.d.ts +5 -0
- package/dist/server/project-context.js +35 -1
- package/dist/server/project-context.js.map +1 -1
- package/dist/server/server.d.ts +2744 -866
- package/dist/server/server.js +191 -148
- package/dist/server/server.js.map +1 -1
- package/dist/server/webhooks.d.ts +817 -0
- package/dist/server/webhooks.js +91 -0
- package/dist/server/webhooks.js.map +1 -0
- package/dist/server/worktree-lifecycle.d.ts +88 -88
- package/dist/startup-port.d.ts +12 -0
- package/dist/startup-port.js +33 -0
- package/dist/startup-port.js.map +1 -0
- package/dist/telemetry-service.json +1 -0
- package/dist/webhooks/admission.d.ts +360 -0
- package/dist/webhooks/admission.js +294 -0
- package/dist/webhooks/admission.js.map +1 -0
- package/dist/webhooks/coordinator.d.ts +39 -0
- package/dist/webhooks/coordinator.js +215 -0
- package/dist/webhooks/coordinator.js.map +1 -0
- package/dist/webhooks/destination.d.ts +24 -0
- package/dist/webhooks/destination.js +111 -0
- package/dist/webhooks/destination.js.map +1 -0
- package/dist/webhooks/discord.d.ts +4 -0
- package/dist/webhooks/discord.js +102 -0
- package/dist/webhooks/discord.js.map +1 -0
- package/dist/webhooks/endpoints.d.ts +201 -0
- package/dist/webhooks/endpoints.js +345 -0
- package/dist/webhooks/endpoints.js.map +1 -0
- package/dist/webhooks/history.d.ts +42 -0
- package/dist/webhooks/history.js +222 -0
- package/dist/webhooks/history.js.map +1 -0
- package/dist/webhooks/lifecycle.d.ts +34 -0
- package/dist/webhooks/lifecycle.js +60 -0
- package/dist/webhooks/lifecycle.js.map +1 -0
- package/dist/webhooks/limits.d.ts +19 -0
- package/dist/webhooks/limits.js +101 -0
- package/dist/webhooks/limits.js.map +1 -0
- package/dist/webhooks/links.d.ts +12 -0
- package/dist/webhooks/links.js +40 -0
- package/dist/webhooks/links.js.map +1 -0
- package/dist/webhooks/operations.d.ts +24 -0
- package/dist/webhooks/operations.js +128 -0
- package/dist/webhooks/operations.js.map +1 -0
- package/dist/webhooks/outbox.d.ts +37 -0
- package/dist/webhooks/outbox.js +221 -0
- package/dist/webhooks/outbox.js.map +1 -0
- package/dist/webhooks/ownership.d.ts +17 -0
- package/dist/webhooks/ownership.js +254 -0
- package/dist/webhooks/ownership.js.map +1 -0
- package/dist/webhooks/payload.d.ts +6 -0
- package/dist/webhooks/payload.js +112 -0
- package/dist/webhooks/payload.js.map +1 -0
- package/dist/webhooks/platform.d.ts +9 -0
- package/dist/webhooks/platform.js +12 -0
- package/dist/webhooks/platform.js.map +1 -0
- package/dist/webhooks/privacy.d.ts +4 -0
- package/dist/webhooks/privacy.js +43 -0
- package/dist/webhooks/privacy.js.map +1 -0
- package/dist/webhooks/process-identity.d.ts +36 -0
- package/dist/webhooks/process-identity.js +240 -0
- package/dist/webhooks/process-identity.js.map +1 -0
- package/dist/webhooks/scheduler.d.ts +10 -0
- package/dist/webhooks/scheduler.js +43 -0
- package/dist/webhooks/scheduler.js.map +1 -0
- package/dist/webhooks/service.d.ts +313 -0
- package/dist/webhooks/service.js +1005 -0
- package/dist/webhooks/service.js.map +1 -0
- package/dist/webhooks/signing.d.ts +3 -0
- package/dist/webhooks/signing.js +36 -0
- package/dist/webhooks/signing.js.map +1 -0
- package/dist/webhooks/slack.d.ts +4 -0
- package/dist/webhooks/slack.js +56 -0
- package/dist/webhooks/slack.js.map +1 -0
- package/dist/webhooks/source.d.ts +178 -0
- package/dist/webhooks/source.js +23 -0
- package/dist/webhooks/source.js.map +1 -0
- package/dist/webhooks/storage.d.ts +21 -0
- package/dist/webhooks/storage.js +202 -0
- package/dist/webhooks/storage.js.map +1 -0
- package/dist/webhooks/transport.d.ts +30 -0
- package/dist/webhooks/transport.js +235 -0
- package/dist/webhooks/transport.js.map +1 -0
- package/dist/workflows/completion-reason.d.ts +4 -0
- package/dist/workflows/completion-reason.js +39 -0
- package/dist/workflows/completion-reason.js.map +1 -0
- package/dist/workflows/queued-bounds.d.ts +31 -0
- package/dist/workflows/queued-bounds.js +81 -0
- package/dist/workflows/queued-bounds.js.map +1 -0
- package/dist/workflows/run.d.ts +113 -20
- package/dist/workflows/run.js +726 -191
- package/dist/workflows/run.js.map +1 -1
- package/dist/workspace/config.d.ts +8 -0
- package/dist/workspace/config.js +62 -19
- package/dist/workspace/config.js.map +1 -1
- package/dist/workspace/ui-state.d.ts +4 -2
- package/dist/workspace/ui-state.js +13 -9
- package/dist/workspace/ui-state.js.map +1 -1
- package/package.json +4 -3
- package/scripts/check-pack.mjs +2 -4
- package/scripts/mock-claude.mjs +30 -5
- package/scripts/webhooks-schema.mjs +5 -0
- package/web/dist/assets/23I4SOAX-B4MCXPfc.js +2 -0
- package/web/dist/assets/26H2HVXD-DnN7AaEY.js +2 -0
- package/web/dist/assets/2IZ5MNOH-CgfSuFFL.js +1 -0
- package/web/dist/assets/2P3CZEXH-kInGrvHu.js +2 -0
- package/web/dist/assets/3E5HRNYT-DLbBxF6y.js +5 -0
- package/web/dist/assets/3JIRLDUO-B9tVJ8E_.js +1 -0
- package/web/dist/assets/5MJ3UKSG-nDfsJSF7.js +2 -0
- package/web/dist/assets/5THPTBWS-Ce_hS451.js +1 -0
- package/web/dist/assets/7OAKGN26-t-mlpHkx.js +25 -0
- package/web/dist/assets/7WLXJQOR-D6QVYUu9.js +1 -0
- package/web/dist/assets/A255FCTW-Bx0Z-P1v.js +1 -0
- package/web/dist/assets/AM43MQ64-C_UmP8Ka.js +2 -0
- package/web/dist/assets/AOZTNTMC-Di2iVwCo.js +5 -0
- package/web/dist/assets/AQNLM6KG-CcWg0kGq.js +4 -0
- package/web/dist/assets/BNU2RHQB-M1l5nkNs.js +2 -0
- package/web/dist/assets/C5HTQT3I-B50g1XeK.js +4 -0
- package/web/dist/assets/CPKRWH5G-DHdVktma.js +12 -0
- package/web/dist/assets/CUVCMPQX-75g4RQep.js +1 -0
- package/web/dist/assets/D4V2MWCI-Bm34L6wL.js +1 -0
- package/web/dist/assets/DHKBVIA3-Db-JqVOb.js +1 -0
- package/web/dist/assets/DKTLEL5E-DciMwFJ1.js +1 -0
- package/web/dist/assets/DUZNPW7S-4AKJemkg.js +2 -0
- package/web/dist/assets/E3FWOBN4-AT8jzYgb.js +4 -0
- package/web/dist/assets/E65FQMJL-eiWd8F8c.js +1 -0
- package/web/dist/assets/FTXIJQGB-CggtIYAM.js +1 -0
- package/web/dist/assets/G3MDBVQH-BZmnMkFw.js +1 -0
- package/web/dist/assets/G3OATVW2-D5zJu3ib.js +8 -0
- package/web/dist/assets/GUJTEFZK-DPEFMf5Q.js +1 -0
- package/web/dist/assets/IHVFDU4A-pP0Mb5Iu.js +10 -0
- package/web/dist/assets/IV52FOAS-jWHN2JLM.js +5 -0
- package/web/dist/assets/JTJEEBDN-DZeTEWqk.js +2 -0
- package/web/dist/assets/K7FUICZ3-C9JebvoP.js +2 -0
- package/web/dist/assets/LHH2HHRB-DZSZGD4x.js +2 -0
- package/web/dist/assets/MSPQPZZY-DOCBMJ70.js +4 -0
- package/web/dist/assets/OB6ZFVKF-D6V5f56z.js +2 -0
- package/web/dist/assets/PLTZDMI2-DltbYIQQ.js +1 -0
- package/web/dist/assets/R7EPXMMD-Dk_RDmvY.js +5 -0
- package/web/dist/assets/RVARI57O-CgA1WoRv.js +1 -0
- package/web/dist/assets/SPBWZ4VS-8FnOEPzw.js +1 -0
- package/web/dist/assets/SR7OOV3Q-3uZPNU1G.js +4 -0
- package/web/dist/assets/STAXBNH4-C4N6ZLTR.js +2 -0
- package/web/dist/assets/SXFARSFO-DHdVQB4G.js +1 -0
- package/web/dist/assets/TC77ISAL-BgUbI3Of.js +2 -0
- package/web/dist/assets/TYIQQHVC-S2gy0AUp.js +13 -0
- package/web/dist/assets/TZUXETIT-C6qyTEYa.js +2 -0
- package/web/dist/assets/U7N72BGE-8vTdAst9.js +6 -0
- package/web/dist/assets/UFPIB6EZ-BVjLTP07.js +3 -0
- package/web/dist/assets/UO52YEYL-EHYBNpY5.js +3 -0
- package/web/dist/assets/VIK3ONSK-Cton0Rgg.js +2 -0
- package/web/dist/assets/VVVO4ZVP-CdFWI9EE.js +2 -0
- package/web/dist/assets/WRGXZO53-DYQ4OW92.js +3 -0
- package/web/dist/assets/X5SG7MGC-DtC_vaXe.js +2 -0
- package/web/dist/assets/XLHPVVFU-MQkW7HpM.js +2 -0
- package/web/dist/assets/XXYPNCD5-Ib-xj97c.js +5 -0
- package/web/dist/assets/Z6WRYFJC-C6TE3q4J.js +7 -0
- package/web/dist/assets/ZI2QNEGF-DwOKsV8B.js +8 -0
- package/web/dist/assets/{agent-task-pickers-CJAx53eR.js → agent-task-pickers-C_2o0KYX.js} +1 -1
- package/web/dist/assets/{alert-dialog-BugYooRk.js → alert-dialog-fzSWCIyG.js} +1 -1
- package/web/dist/assets/arrow-left-CpV00riO.js +1 -0
- package/web/dist/assets/{automation-format-Bxe-TVRX.js → automation-format-BgAhuFNq.js} +1 -1
- package/web/dist/assets/automations-route-Ca648Wyc.js +1 -0
- package/web/dist/assets/bundle-mjs-rHxsej31.js +1 -0
- package/web/dist/assets/button-vdGgKu1b.js +100 -0
- package/web/dist/assets/{centered-state-Cm8_dS47.js → centered-state-C1nDqaTs.js} +1 -1
- package/web/dist/assets/check-DA3yaTey.js +1 -0
- package/web/dist/assets/chevron-left-D1eW2pzs.js +1 -0
- package/web/dist/assets/chevron-right-DwqBinJp.js +1 -0
- package/web/dist/assets/{chunk-BO2N2NFS-CFvlB0rH.js → chunk-BO2N2NFS-Bde6epwZ.js} +4 -4
- package/web/dist/assets/circle-check-G0BDdNX3.js +1 -0
- package/web/dist/assets/clipboard-B9AGRj3s.js +1 -0
- package/web/dist/assets/{collapsible-BoDLSmkP.js → collapsible-Ci-k9Y0m.js} +1 -1
- package/web/dist/assets/{commit-list-C_l41PzR.js → commit-list-B8qutNJ9.js} +1 -1
- package/web/dist/assets/{compare-variants-Du6vJ7FF.js → compare-variants-CD-H9QV0.js} +1 -1
- package/web/dist/assets/dashboard-BuNIEyIc.js +44 -0
- package/web/dist/assets/diff-DdDwJ41q.js +3 -0
- package/web/dist/assets/{diff-view-D7b6T1ik.js → diff-view-D4eUaNtD.js} +4 -4
- package/web/dist/assets/{download-CHsOA7RH.js → download-C9cyRK4D.js} +1 -1
- package/web/dist/assets/facet-filter-BpaMiUU2.js +5 -0
- package/web/dist/assets/{file-Bu00nVUj.js → file-CcDDcqzK.js} +1 -1
- package/web/dist/assets/file-preview-DyqTWb0f.js +2 -0
- package/web/dist/assets/{file-text-CISqp5LY.js → file-text-C5N0APxx.js} +1 -1
- package/web/dist/assets/{git-pull-request-draft-D2Lm-pPz.js → git-pull-request-draft-Bqwhflhv.js} +1 -1
- package/web/dist/assets/git-tab-loading-BXSixY5p.js +1 -0
- package/web/dist/assets/git-toolbar-CB3F5Ztu.js +1 -0
- package/web/dist/assets/github-CjHl4MMe.js +1 -0
- package/web/dist/assets/{highlighted-body-OFNGDK62-CDHv8VkT.js → highlighted-body-OFNGDK62-k8gmH63p.js} +1 -1
- package/web/dist/assets/{host-usage-CRNpjHr0.js → host-usage-EIcPz8s9.js} +1 -1
- package/web/dist/assets/{icon-tooltip-BrV8FoZY.js → icon-tooltip-CCXhXgac.js} +1 -1
- package/web/dist/assets/index-C_k6g6fh.js +29 -0
- package/web/dist/assets/index-DvagaaKL.css +2 -0
- package/web/dist/assets/{input-6sILF4ZL.js → input-DXFchFdf.js} +1 -1
- package/web/dist/assets/layout-cards-DrC84hQa.js +1 -0
- package/web/dist/assets/lazy-DaFjwB-q.js +11 -0
- package/web/dist/assets/lib-xgA2N1t8.js +1 -0
- package/web/dist/assets/loader-circle-B2Lhi0xN.js +1 -0
- package/web/dist/assets/{markdown-DDUUmNxl.js → markdown-3VbTQcD0.js} +1 -1
- package/web/dist/assets/markdown-DxPHdOwB.js +4 -0
- package/web/dist/assets/mermaid-GHXKKRXX-CQo8vsdt.js +1 -0
- package/web/dist/assets/{message-square-CUcOsOeK.js → message-square-9JNzSy42.js} +1 -1
- package/web/dist/assets/plus-BHSN5Uog.js +1 -0
- package/web/dist/assets/preload-helper-Czpn1I53.js +1 -0
- package/web/dist/assets/{project-router-Uv5K_t7U.js → project-router-BzcW5R3O.js} +2 -2
- package/web/dist/assets/queries-XYjXpa8s.js +1 -0
- package/web/dist/assets/reference-chip-JX3G6Wkk.js +1 -0
- package/web/dist/assets/repo-git-CZTtXETi.js +1 -0
- package/web/dist/assets/{run-diff-CaQSFkcv.js → run-diff-C_s9tHfS.js} +2 -2
- package/web/dist/assets/{save-D8UGIAXq.js → save-B4O7rFCS.js} +1 -1
- package/web/dist/assets/{scroll-within-CEDDAUiO.js → scroll-within-DTBX-TR6.js} +1 -1
- package/web/dist/assets/{search-x-CG0S6SUu.js → search-x-CQPbQgV6.js} +1 -1
- package/web/dist/assets/{settings-2-ogt1zu3P.js → settings-2-CrmZbb_8.js} +1 -1
- package/web/dist/assets/skills-DXkSdyb8.js +1 -0
- package/web/dist/assets/{square-VAdlYQJn.js → square-DCg6avOT.js} +1 -1
- package/web/dist/assets/{tabs-BP29AtfS.js → tabs-Cb8MmIEQ.js} +1 -1
- package/web/dist/assets/{tag-4juVmU06.js → tag-CEWhwfVf.js} +1 -1
- package/web/dist/assets/task-commits-BruCWCkF.js +1 -0
- package/web/dist/assets/{task-graph-4GzVwwdu.js → task-graph-D_OLXJSk.js} +1 -1
- package/web/dist/assets/{task-notes-CCT7q8Fr.js → task-notes-DzOdZjqZ.js} +1 -1
- package/web/dist/assets/task-workspace-C5Conyc1.js +29 -0
- package/web/dist/assets/{terminal-DEjD4n5K.js → terminal-BVAfyHZI.js} +1 -1
- package/web/dist/assets/terminal-drawer-Dcg67RS8.js +3 -0
- package/web/dist/assets/{textarea-DJjpA11v.js → textarea-DywMDkfl.js} +1 -1
- package/web/dist/assets/{token-metrics-BJ1naBNS.js → token-metrics-BiFl2ovY.js} +1 -1
- package/web/dist/assets/{tooltip-BieGyrAz.js → tooltip-7suUQClM.js} +1 -1
- package/web/dist/assets/{tracker-DitRxloO.js → tracker-BFYcbTEV.js} +2 -2
- package/web/dist/assets/{triangle-alert-lwmk_SnN.js → triangle-alert-hMpQrXJS.js} +1 -1
- package/web/dist/assets/{upload-Dx8IzFX_.js → upload-Ddh5Fb-A.js} +1 -1
- package/web/dist/assets/use-now-BlhSvP80.js +1 -0
- package/web/dist/assets/{use-submit-shortcut-B-uDwQhP.js → use-submit-shortcut-BC7gmgDS.js} +1 -1
- package/web/dist/assets/workflow-graph-BljUjNdF.js +13 -0
- package/web/dist/assets/worktree-lifecycle-operation-psNUwGwT.js +18 -0
- package/web/dist/index.html +41 -41
- package/web/dist/assets/arrow-left-FG-BtI91.js +0 -1
- package/web/dist/assets/automations-route-BRN9qRg1.js +0 -1
- package/web/dist/assets/bundle-mjs-BT31bpU6.js +0 -1
- package/web/dist/assets/button-DFlig-3W.js +0 -100
- package/web/dist/assets/check-Bg7-Ecuy.js +0 -1
- package/web/dist/assets/chevron-left-Cd_qkrfl.js +0 -1
- package/web/dist/assets/chevron-right-7BUoNLSN.js +0 -1
- package/web/dist/assets/circle-check-D3dWBsEI.js +0 -1
- package/web/dist/assets/dashboard-BDtFQg4f.js +0 -44
- package/web/dist/assets/diff-DZjcij_W.js +0 -3
- package/web/dist/assets/diff-stat-BIAV32IP.js +0 -1
- package/web/dist/assets/facet-filter-BCQvQXmA.js +0 -5
- package/web/dist/assets/file-preview-B0UXYkxB.js +0 -2
- package/web/dist/assets/git-tab-loading-Dcf8fCoC.js +0 -1
- package/web/dist/assets/git-toolbar-aXyXLu2P.js +0 -1
- package/web/dist/assets/github-PjL79xgT.js +0 -1
- package/web/dist/assets/index-DvwYGTi3.css +0 -2
- package/web/dist/assets/index-DxwI2MZD.js +0 -25
- package/web/dist/assets/layout-cards-Det2whh-.js +0 -1
- package/web/dist/assets/lib-BQXq3kEf.js +0 -1
- package/web/dist/assets/loader-circle-DDkRpp8X.js +0 -1
- package/web/dist/assets/markdown-lc7gwiQQ.js +0 -4
- package/web/dist/assets/mermaid-GHXKKRXX-CbLTa2tM.js +0 -1
- package/web/dist/assets/plus-BqHBcC4w.js +0 -1
- package/web/dist/assets/queries-C09jaXiS.js +0 -1
- package/web/dist/assets/reference-chip-CHF-Sbml.js +0 -1
- package/web/dist/assets/repo-git-DT0rQqvz.js +0 -1
- package/web/dist/assets/skills-Cf8xEPei.js +0 -1
- package/web/dist/assets/task-commits-CyO2Q8jS.js +0 -1
- package/web/dist/assets/task-workspace-C6o0DzgB.js +0 -29
- package/web/dist/assets/terminal-drawer-TV4K7S4u.js +0 -3
- package/web/dist/assets/use-now-Cr9QvR5I.js +0 -1
- package/web/dist/assets/workflow-graph-g3f0xPwZ.js +0 -13
- package/web/dist/assets/worktree-lifecycle-operation-COUqhS7A.js +0 -18
- package/web/dist/assets/x-BrRT8S7Q.js +0 -1
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { statSync } from 'node:fs';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import { isImageAttachmentName, MAX_ATTACHMENTS_PER_MESSAGE, MAX_ATTACHMENTS_TOTAL_BASE64 } from '../contract/index.js';
|
|
4
|
+
// Queued prompt stack bounds (#472), shared by `POST /runs/:id/messages` and the engine's own
|
|
5
|
+
// redelivery of deferred messages, so neither path can grow a stack the other would refuse.
|
|
6
|
+
// The per-message bounds mirror the message schema; the one that actually matters is the FOLDED
|
|
7
|
+
// total, because 20 messages of 100 000 chars each would otherwise compose a ~2 M-character {{task}}.
|
|
8
|
+
export const MAX_MESSAGE_TEXT_CHARS = 100_000;
|
|
9
|
+
export const MAX_QUEUED_MESSAGES = 20;
|
|
10
|
+
export const MAX_QUEUED_ATTACHMENTS = 2 * MAX_ATTACHMENTS_PER_MESSAGE;
|
|
11
|
+
export const MAX_FOLDED_TASK_CHARS = 200_000;
|
|
12
|
+
export const QUEUED_IMAGES_TOO_LARGE = 'too many queued images — 20 MB of images across the task and its queued messages';
|
|
13
|
+
/** Length of the prompt a run would execute with — `task` plus its whole stack,
|
|
14
|
+
* composed exactly as `hydrateQueuedInput` composes it. Checked against the
|
|
15
|
+
* PROSPECTIVE state so the user is stopped at the write, not at dequeue where
|
|
16
|
+
* there would be no one left to tell. */
|
|
17
|
+
export function foldedLength(task, stack) {
|
|
18
|
+
return [task, ...stack.map((m) => m.text)]
|
|
19
|
+
.map((part) => part.trim())
|
|
20
|
+
.filter((part) => part.length > 0)
|
|
21
|
+
.join('\n\n').length;
|
|
22
|
+
}
|
|
23
|
+
/** Base64 size of the images a queued run's OPENING turn will carry: its task images plus every
|
|
24
|
+
* stacked message's, read back from disk at dequeue and delivered together (#472). */
|
|
25
|
+
export function queuedImageChars(dataDir, runId, urls) {
|
|
26
|
+
let bytes = 0;
|
|
27
|
+
for (const url of urls) {
|
|
28
|
+
const name = url.split('/').pop() ?? '';
|
|
29
|
+
if (!isImageAttachmentName(name) || name.includes('..'))
|
|
30
|
+
continue;
|
|
31
|
+
try {
|
|
32
|
+
bytes += statSync(join(dataDir, 'runs', `${runId}-images`, name)).size;
|
|
33
|
+
}
|
|
34
|
+
catch {
|
|
35
|
+
// Gone files are dropped at dequeue too.
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return Math.ceil(bytes / 3) * 4;
|
|
39
|
+
}
|
|
40
|
+
/** Base64 size of the image blocks among a message's resolved attachments. */
|
|
41
|
+
export function imageChars(content) {
|
|
42
|
+
return content.reduce((n, b) => (b.type === 'image' ? n + b.source.data.length : n), 0);
|
|
43
|
+
}
|
|
44
|
+
/** The text a message's blocks carry, joined the way a stacked message stores it. */
|
|
45
|
+
export function messageText(content) {
|
|
46
|
+
return content
|
|
47
|
+
.filter((b) => b.type === 'text')
|
|
48
|
+
.map((b) => b.text)
|
|
49
|
+
.join('\n');
|
|
50
|
+
}
|
|
51
|
+
/** Why stacking `content` onto a queued run would be refused, or undefined when it fits.
|
|
52
|
+
* `text` defaults to the content's own text blocks. */
|
|
53
|
+
export function queuedStackRefusal(dataDir, run, content, text = messageText(content)) {
|
|
54
|
+
const stack = run.queuedMessages ?? [];
|
|
55
|
+
if (stack.length >= MAX_QUEUED_MESSAGES)
|
|
56
|
+
return `too many queued messages — ${MAX_QUEUED_MESSAGES} message limit`;
|
|
57
|
+
const stackedImages = stack.reduce((n, m) => n + (m.images?.length ?? 0), 0);
|
|
58
|
+
if (stackedImages + content.filter((b) => b.type !== 'text').length > MAX_QUEUED_ATTACHMENTS) {
|
|
59
|
+
return `too many queued attachments — ${MAX_QUEUED_ATTACHMENTS} attachment limit across the stack`;
|
|
60
|
+
}
|
|
61
|
+
const opening = [...(run.taskImages ?? []), ...stack.flatMap((m) => m.images ?? [])];
|
|
62
|
+
if (queuedImageChars(dataDir, run.id, opening) + imageChars(content) > MAX_ATTACHMENTS_TOTAL_BASE64)
|
|
63
|
+
return QUEUED_IMAGES_TOO_LARGE;
|
|
64
|
+
const prospective = foldedLength(run.task, [...stack, { text }]);
|
|
65
|
+
if (prospective > MAX_FOLDED_TASK_CHARS) {
|
|
66
|
+
return `prompt too long — ${MAX_FOLDED_TASK_CHARS} character limit across the task and its queued messages (would be ${prospective})`;
|
|
67
|
+
}
|
|
68
|
+
return undefined;
|
|
69
|
+
}
|
|
70
|
+
/** Why one Continue could not carry `content` — the `POST /runs/:id/continue` body bounds. */
|
|
71
|
+
export function continuePromptRefusal(text, content) {
|
|
72
|
+
if (text.length > MAX_MESSAGE_TEXT_CHARS)
|
|
73
|
+
return `prompt too long — ${MAX_MESSAGE_TEXT_CHARS} character limit for one turn`;
|
|
74
|
+
if (content.filter((b) => b.type !== 'text').length > MAX_ATTACHMENTS_PER_MESSAGE) {
|
|
75
|
+
return `too many attachments — ${MAX_ATTACHMENTS_PER_MESSAGE} attachment limit for one turn`;
|
|
76
|
+
}
|
|
77
|
+
if (imageChars(content) > MAX_ATTACHMENTS_TOTAL_BASE64)
|
|
78
|
+
return 'too many images for one turn';
|
|
79
|
+
return undefined;
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=queued-bounds.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queued-bounds.js","sourceRoot":"","sources":["../../src/workflows/queued-bounds.ts"],"names":[],"mappings":"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"}
|
package/dist/workflows/run.d.ts
CHANGED
|
@@ -18,6 +18,8 @@ import { type WorkflowDef } from './types.ts';
|
|
|
18
18
|
* reply arrives as written. Gates and questions read the label, not the header.
|
|
19
19
|
*/
|
|
20
20
|
export declare function cardReply(text: string, header: string): string;
|
|
21
|
+
/** Fallback monitoring window when the waiting-session idle timeout is disabled. */
|
|
22
|
+
export declare const MONITORING_LIVENESS_MS: number;
|
|
21
23
|
/**
|
|
22
24
|
* The text a turn-end marker is matched against: the accumulated turn text with
|
|
23
25
|
* trailing whitespace and trailing task-reference lines removed.
|
|
@@ -102,6 +104,9 @@ interface ActiveRun {
|
|
|
102
104
|
idleClosed?: boolean;
|
|
103
105
|
/** The user pressed Finish on this owner; a repeat while it settles is the same request (6a3cecee). */
|
|
104
106
|
finishRequested?: boolean;
|
|
107
|
+
/** Finish pressed at a graph wait — not `finishRequested`, which would also turn the settle into
|
|
108
|
+
* `done`; read only by `deferredStopReason` so a held message does not resume the run. */
|
|
109
|
+
finishedAtWait?: boolean;
|
|
105
110
|
/** Review accepted while the engine was still tearing down; `dropActive` applies it. */
|
|
106
111
|
acceptReviewOnDrop?: boolean;
|
|
107
112
|
/** The session is over and only teardown (the turn-end autosave) remains, so a record that
|
|
@@ -115,6 +120,11 @@ interface ActiveRun {
|
|
|
115
120
|
monitoringWakeTimer?: NodeJS.Timeout;
|
|
116
121
|
monitoringWakeIntervalMinutes?: number;
|
|
117
122
|
monitoringWakeups?: number;
|
|
123
|
+
monitoringLivenessTimer?: NodeJS.Timeout;
|
|
124
|
+
/** Whether the current liveness timer was armed at the wake-up cap. A capped run may carry the
|
|
125
|
+
* liveness bound even with a wake interval configured, and every re-arm from the timer callback
|
|
126
|
+
* must keep that allowance — a one-shot option would drop it on the second window. */
|
|
127
|
+
monitoringLivenessAtCap?: boolean;
|
|
118
128
|
autosaveTimer?: NodeJS.Timeout;
|
|
119
129
|
/** Check-owned path snapshots; changed content transfers ownership back to the agent. */
|
|
120
130
|
autosaveExcludedPaths: Map<string, string>;
|
|
@@ -146,7 +156,7 @@ interface ActiveRun {
|
|
|
146
156
|
* - `'waiting'` — live: the session is open and an answer or monitored work is still expected.
|
|
147
157
|
* `execute` sits inside `runAgentStep` for as long as that holds, so seeing
|
|
148
158
|
* this value after the step loop means the session closed WITHOUT an answer
|
|
149
|
-
* (the idle timer, the
|
|
159
|
+
* (the idle timer, the runner timeout, a crash) and the run settles `failed`.
|
|
150
160
|
* - `'abandoned'` — the user pressed Finish instead of answering: "stop here",
|
|
151
161
|
* so the run settles like any other finished run.
|
|
152
162
|
*
|
|
@@ -157,6 +167,8 @@ interface ActiveRun {
|
|
|
157
167
|
* `tryAutonomousNudge` and the park in `runAgentStep`'s turn-end.
|
|
158
168
|
*/
|
|
159
169
|
askPark?: 'waiting' | 'abandoned';
|
|
170
|
+
/** The `waiting` park is a monitor handed to the user, not a `CEZ:ASK` question. */
|
|
171
|
+
monitorHandoff?: boolean;
|
|
160
172
|
/** The last `CEZ:ASK` the autonomous nudge overrode, as its joined question text. An agent
|
|
161
173
|
* that asks the SAME thing again right after being nudged is blocked on something the nudge
|
|
162
174
|
* cannot answer (a disabled capability, a missing credential), and parks instead of burning
|
|
@@ -356,16 +368,23 @@ export interface StartRunInput {
|
|
|
356
368
|
prUrl: string;
|
|
357
369
|
untrusted: boolean;
|
|
358
370
|
};
|
|
371
|
+
/** Internal (#1300): this job resumes the agent step a usage limit interrupted. Set only by
|
|
372
|
+
* `fireAutoResume` (and a restart that revives that queued job), never derived in `execute`. */
|
|
373
|
+
usageLimitResume?: boolean;
|
|
359
374
|
}
|
|
360
375
|
/**
|
|
361
376
|
* The effective "extra" system prompt for a run (spec §protocol v2, R2 2.3):
|
|
362
377
|
* the per-run override (`POST /api/runs` `systemPrompt`) REPLACES the
|
|
363
378
|
* `config.json` default — they are the same knob at two scopes, so the more
|
|
364
|
-
* specific one wins outright; they never concatenate.
|
|
365
|
-
*
|
|
366
|
-
* along
|
|
379
|
+
* specific one wins outright; they never concatenate. The global instructions
|
|
380
|
+
* (`~/.cezar/config.json` `systemPrompt`) are a different knob: they always
|
|
381
|
+
* ride along, placed FIRST and labelled as yielding to the project's. Whichever
|
|
382
|
+
* wins is ADDITIVE to the skill body and the handoff contract (see
|
|
383
|
+
* `composeSystemPrompt`). Blank strings count as unset.
|
|
367
384
|
*/
|
|
368
|
-
export declare function resolveExtraSystemPrompt(override: string | undefined, configDefault: string | undefined): string | undefined;
|
|
385
|
+
export declare function resolveExtraSystemPrompt(override: string | undefined, configDefault: string | undefined, globalDefault?: string): string | undefined;
|
|
386
|
+
export declare const GLOBAL_INSTRUCTIONS_HEADING = "## Global instructions\n\nThese apply to every project. Where they conflict with the project instructions below, the project instructions win.";
|
|
387
|
+
export declare const PROJECT_INSTRUCTIONS_HEADING = "## Project instructions\n\nThese are specific to this project and take precedence over the global instructions above.";
|
|
369
388
|
/**
|
|
370
389
|
* Joins the parts of one agent step's system prompt in fixed order — skill
|
|
371
390
|
* body (most task-specific), then the run's extra prompt (user guidance, can
|
|
@@ -381,7 +400,8 @@ export declare function composeSystemPrompt(...parts: Array<string | undefined>)
|
|
|
381
400
|
*
|
|
382
401
|
* De-duplicated against the run's extra system prompt, and that is not a micro-optimisation:
|
|
383
402
|
* `dispatch()` seeds a child's extra prompt with the very same text, so composing both would
|
|
384
|
-
* hand the backend the same instructions twice.
|
|
403
|
+
* hand the backend the same instructions twice. Containment, not equality: with global
|
|
404
|
+
* instructions set, `resolveExtraSystemPrompt` wraps that seed under its own heading.
|
|
385
405
|
*/
|
|
386
406
|
export declare function dispatchPromptPart(prompt: string | undefined, extra: string | undefined): string | undefined;
|
|
387
407
|
/**
|
|
@@ -719,9 +739,10 @@ export declare class RunManager {
|
|
|
719
739
|
/**
|
|
720
740
|
* Leave the monitoring set — the ONE exit, and every transition out of the state goes through
|
|
721
741
|
* it: a child's report or a user message (`deliverMessage`), the next turn ending in anything
|
|
722
|
-
* but a park, a native `ask.requested`, the session's own teardown,
|
|
723
|
-
* settle, restart recovery)
|
|
724
|
-
*
|
|
742
|
+
* but a park, a native `ask.requested`, the session's own teardown, `dropActive` (cancel,
|
|
743
|
+
* settle, restart recovery), and `parkMonitorAsWaiting` (the wake-up cap and the liveness
|
|
744
|
+
* timer). An ordinary wake-up is deliberately NOT one: its nudge is delivered into the same
|
|
745
|
+
* parked session and the turn it starts ends back here.
|
|
725
746
|
*/
|
|
726
747
|
private leaveMonitoring;
|
|
727
748
|
/** Epoch ms of this manager's oldest queued run (the semaphore's fairness
|
|
@@ -772,9 +793,9 @@ export declare class RunManager {
|
|
|
772
793
|
* workflowDef (or the catalog by name for older records);
|
|
773
794
|
* - `waiting` → the turn was over and the ball was in the user's court —
|
|
774
795
|
* settle exactly like a closed session (review/done, Continue still works),
|
|
775
|
-
* unless `askParked
|
|
776
|
-
* which settles `failed` instead so unrun steps are not
|
|
777
|
-
* with `awaitingAnswerSince` so the task still reads as "needs you";
|
|
796
|
+
* unless `askParked`, native `attentionRequest`, or an unfinished monitor
|
|
797
|
+
* records pending work, which settles `failed` instead so unrun steps are not
|
|
798
|
+
* reported as done, with `awaitingAnswerSince` so the task still reads as "needs you";
|
|
778
799
|
* - `running` → mark interrupted, then immediately resume the last agent
|
|
779
800
|
* session via the Continue path, pointing the agent at its handoff file.
|
|
780
801
|
* Call once, before the server starts taking requests.
|
|
@@ -798,6 +819,27 @@ export declare class RunManager {
|
|
|
798
819
|
private failOwnedContinuation;
|
|
799
820
|
/** Remove a run from the live registries — keeps `waiting ⊆ active`. */
|
|
800
821
|
private dropActive;
|
|
822
|
+
/**
|
|
823
|
+
* A drop that ends the run on purpose — cancel, an accepted review, Finish, a memory-limit pause
|
|
824
|
+
* — must not be undone by a message deferred in its teardown window (`redeliverDeferred`).
|
|
825
|
+
* Undefined for an ordinary settle, which the message resumes.
|
|
826
|
+
*/
|
|
827
|
+
private deferredStopReason;
|
|
828
|
+
/**
|
|
829
|
+
* Messages `deferMessage` accepted for a session that never opened again: the run settled
|
|
830
|
+
* instead. Delivered the way the cockpit would have — stacked onto a re-queued prompt, else as
|
|
831
|
+
* a Continue — so an accepted message is never silently lost (telemetry 1408d7cb). A `stoppedBy`
|
|
832
|
+
* reason (the run was ended on purpose) or a message over the route's bounds is reported
|
|
833
|
+
* undelivered instead.
|
|
834
|
+
*/
|
|
835
|
+
private redeliverDeferred;
|
|
836
|
+
/**
|
|
837
|
+
* The one writer of `deferredMessages`. A marker file mirrors how many are held, so a restart —
|
|
838
|
+
* which loses the buffer itself — can still say so on the run (`noteDeferredLostInRestart`).
|
|
839
|
+
*/
|
|
840
|
+
private setDeferred;
|
|
841
|
+
/** Startup: messages a previous process held for a session that never reopened are gone. */
|
|
842
|
+
private noteDeferredLostInRestart;
|
|
801
843
|
/** Is this run settled and not owned by a session again (a Continue inside the grace)? */
|
|
802
844
|
private runSettled;
|
|
803
845
|
/**
|
|
@@ -897,6 +939,8 @@ export declare class RunManager {
|
|
|
897
939
|
* no schema, so the parent still reads every question.
|
|
898
940
|
*/
|
|
899
941
|
private recordAsk;
|
|
942
|
+
/** Snapshot all attention sources; only explicit CEZ:ASK carries dispatch Guard semantics. */
|
|
943
|
+
private recordAttention;
|
|
900
944
|
/** The answer arrived (any message delivered into the session): the question is no longer pending. */
|
|
901
945
|
private clearPendingAsk;
|
|
902
946
|
/**
|
|
@@ -968,14 +1012,36 @@ export declare class RunManager {
|
|
|
968
1012
|
* transcript, because a run that stops resuming itself needs to explain why.
|
|
969
1013
|
*/
|
|
970
1014
|
private scheduleAutoResumeIfLimited;
|
|
1015
|
+
/** The backend whose session failed — a per-step runner or a Continue override, else the run's. */
|
|
1016
|
+
private failedBackend;
|
|
1017
|
+
/**
|
|
1018
|
+
* A transient provider failure (an overload, no response, the OAuth refresh race between two of
|
|
1019
|
+
* cezar's own Claude processes): resume the same session after a short backoff, at most
|
|
1020
|
+
* `MAX_TRANSIENT_RETRIES` times per streak, through the usage-limit resume's timer and exits.
|
|
1021
|
+
*/
|
|
1022
|
+
private scheduleTransientRetry;
|
|
1023
|
+
/** A transient failure cezar will not retry carries signal again: report it as the agent error
|
|
1024
|
+
* `reportAgentError` held back when the event arrived. */
|
|
1025
|
+
private reportUnretriedTransient;
|
|
1026
|
+
private armUsageLimitResume;
|
|
971
1027
|
/** Publish the deadline on the record (the cockpit's only source) and arm the timer for it. */
|
|
972
1028
|
private armAutoResume;
|
|
973
1029
|
/**
|
|
974
1030
|
* The window has reopened. Re-check the record synchronously — hours may have passed, and the
|
|
975
1031
|
* user may have continued, deleted or cancelled the run in them — then hand the resume to the
|
|
976
|
-
* ordinary
|
|
1032
|
+
* ordinary scheduler so it obeys both concurrency caps like any other work.
|
|
977
1033
|
*/
|
|
978
1034
|
private fireAutoResume;
|
|
1035
|
+
/** Recover the failed workflow agent from the existing durable step/session checkpoint. */
|
|
1036
|
+
private interruptedWorkflowStep;
|
|
1037
|
+
/**
|
|
1038
|
+
* A queued run revived after a restart was an auto-resume `fireAutoResume` queued (#1300) when
|
|
1039
|
+
* its walk stopped on the interrupted agent. A walk parked at another node (a restart-resume
|
|
1040
|
+
* cursor) keeps that cursor — a failed agent behind a wired `failed` port must not hijack it.
|
|
1041
|
+
*/
|
|
1042
|
+
private queuedUsageLimitResume;
|
|
1043
|
+
/** Rebuild executable input from the durable record, for auto-resume and queued recovery. */
|
|
1044
|
+
private workflowInput;
|
|
979
1045
|
/**
|
|
980
1046
|
* Make the armed timers agree with the records and the current setting. Runs on every `pump()`
|
|
981
1047
|
* — which is where a settings change lands (a config PUT refreshes the shared semaphore, which
|
|
@@ -1139,6 +1205,8 @@ export declare class RunManager {
|
|
|
1139
1205
|
cancel(runId: string): boolean;
|
|
1140
1206
|
/** One run's cancellation, with no regard for a hierarchy — what `cancel` has always done. */
|
|
1141
1207
|
private cancelOne;
|
|
1208
|
+
/** Process-local proof, not merely a deadline left in the run record. */
|
|
1209
|
+
hasScheduledAutoResume(runId: string): boolean;
|
|
1142
1210
|
/** Removal waits for the captured provider result, never merely the cancel flag. */
|
|
1143
1211
|
cancelAndWait(runId: string): Promise<boolean>;
|
|
1144
1212
|
private waitInactive;
|
|
@@ -1219,8 +1287,8 @@ export declare class RunManager {
|
|
|
1219
1287
|
* backend, so there is nothing left to amend and no session to deliver into —
|
|
1220
1288
|
* without this rung the message would 409, a genuinely dropped message in the
|
|
1221
1289
|
* feature built to stop dropping them. Flushed as an ordinary follow-up turn
|
|
1222
|
-
* the instant the session opens;
|
|
1223
|
-
*
|
|
1290
|
+
* the instant the session opens; a run that settles first resumes with it
|
|
1291
|
+
* (`redeliverDeferred`).
|
|
1224
1292
|
*
|
|
1225
1293
|
* The buffer lives on the manager rather than the `ActiveRun` because the
|
|
1226
1294
|
* `ActiveRun` does not exist yet for part of this window.
|
|
@@ -1408,6 +1476,13 @@ export declare class RunManager {
|
|
|
1408
1476
|
* record keeps the highest water mark across all of them.
|
|
1409
1477
|
*/
|
|
1410
1478
|
private recordUsagePeaks;
|
|
1479
|
+
/**
|
|
1480
|
+
* Settle a run whose session closed while it was parked for a reply that never came — a
|
|
1481
|
+
* mid-workflow `CEZ:ASK` (#917) or a monitor handed to the user. `settleSuccess` would put a
|
|
1482
|
+
* finished badge on work the agent said was still open; `failed` says what happened and keeps
|
|
1483
|
+
* the Continue button, which reopens the session so the reply can still be given.
|
|
1484
|
+
*/
|
|
1485
|
+
private settleUnansweredPark;
|
|
1411
1486
|
/**
|
|
1412
1487
|
* Diff-first review gate (spec 009), shared by `execute` and
|
|
1413
1488
|
* `runContinuation`: a *successful* run whose worktree holds changes rests
|
|
@@ -1429,6 +1504,13 @@ export declare class RunManager {
|
|
|
1429
1504
|
private landingPolicy;
|
|
1430
1505
|
/** The most recent thing the user asked this task for — context for a commit message. */
|
|
1431
1506
|
private latestRequest;
|
|
1507
|
+
/**
|
|
1508
|
+
* Capture the lifecycle that requested a landing before any await. Continue appends a
|
|
1509
|
+
* step synchronously, even when deferred, so its step count is a durable generation
|
|
1510
|
+
* fence (including a newer turn that has already returned to the same status).
|
|
1511
|
+
* Owner identity alone cannot fence detached review/Commit operations.
|
|
1512
|
+
*/
|
|
1513
|
+
private landingFence;
|
|
1432
1514
|
/** Land now and record the outcome on the run. A `nothing` never overwrites an earlier result. */
|
|
1433
1515
|
private landNow;
|
|
1434
1516
|
/**
|
|
@@ -1452,11 +1534,6 @@ export declare class RunManager {
|
|
|
1452
1534
|
/** Accept an in-place run resting at `review`: land it when the project auto-lands, else the
|
|
1453
1535
|
* ordinary accept. */
|
|
1454
1536
|
private finishReview;
|
|
1455
|
-
/**
|
|
1456
|
-
* Finish on a run resting at `review` with unlanded in-place changes: land them, then `done`.
|
|
1457
|
-
* Refused while another task works in the checkout — it would commit that task's edits too.
|
|
1458
|
-
*/
|
|
1459
|
-
private landReviewed;
|
|
1460
1537
|
/**
|
|
1461
1538
|
* The settle-time half of auto-land: a run that ends without a `CEZ:DONE` landing (Finish, an
|
|
1462
1539
|
* idle close) still lands what it left, and a landing that never succeeded fails the run rather
|
|
@@ -1610,6 +1687,22 @@ export declare class RunManager {
|
|
|
1610
1687
|
private reconcileMonitoringWakeTimers;
|
|
1611
1688
|
private armMonitoringWakeTimer;
|
|
1612
1689
|
private clearMonitoringWakeTimer;
|
|
1690
|
+
/**
|
|
1691
|
+
* The wake-up cap is a lifetime budget: only a user message (`sendMessage`) refills it. At the
|
|
1692
|
+
* cap a run with a dispatched child still in flight stays parked for that child's report;
|
|
1693
|
+
* any other run is handed to the user. That stay must still be bounded: a child that settles
|
|
1694
|
+
* without delivering (cancelled from the queue) would otherwise leave the run with no timer.
|
|
1695
|
+
*/
|
|
1696
|
+
private monitoringWakeCapReached;
|
|
1697
|
+
private armMonitoringLivenessTimer;
|
|
1698
|
+
private clearMonitoringLivenessTimer;
|
|
1699
|
+
private hasInFlightChildren;
|
|
1700
|
+
/**
|
|
1701
|
+
* Turn a monitoring park into a `waiting` park: attention raised, idle timer armed if enabled,
|
|
1702
|
+
* session left open so a reply still lands in it. Parked like a `CEZ:ASK` (`askPark`), so a
|
|
1703
|
+
* hand-off nobody answers settles `failed` with Continue when the idle timer closes it.
|
|
1704
|
+
*/
|
|
1705
|
+
private parkMonitorAsWaiting;
|
|
1613
1706
|
/** Autosave-commit the worktree every 90 s while the run lives (spec 006).
|
|
1614
1707
|
* Opt-in via CEZ_AUTOSAVE=1 (#471) — see periodicAutosaveEnabled. */
|
|
1615
1708
|
private armAutosave;
|