@cortex-agent/server 2026.10.25 → 2026.10.28
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/LICENSE +21 -0
- package/README.md +23 -5
- package/THIRD_PARTY_NOTICES.txt +16546 -0
- package/defaults/prompts/clean-workspace.md +21 -0
- package/dist/agent-adapter/claude/remote-mcp-proxy.js +4 -66
- package/dist/chunks/anthropic-SUZWKBRW.js +4 -0
- package/dist/chunks/anthropic-messages-M3SMXACA.js +8 -0
- package/dist/chunks/api-GM53PHIL-GFHEXXE6.js +4 -0
- package/dist/chunks/azure-openai-responses-76YWXHSB.js +4 -0
- package/dist/chunks/bedrock-converse-stream-5UPX4NTQ.js +58 -0
- package/dist/chunks/child-runner-3GHOWGZP.js +4 -0
- package/dist/chunks/chunk-23PRJECN.js +4 -0
- package/dist/chunks/chunk-2ZNLUY2U.js +128 -0
- package/dist/chunks/chunk-3F6WW7HR.js +13 -0
- package/dist/chunks/chunk-3OKHUVEM.js +7 -0
- package/dist/chunks/chunk-3TGQSGG4.js +8 -0
- package/dist/chunks/chunk-3THJYAEF.js +4 -0
- package/dist/chunks/chunk-3YHOCPQU.js +10 -0
- package/dist/chunks/chunk-4EX2JJWB.js +4 -0
- package/dist/chunks/chunk-4LLH5OWM.js +10 -0
- package/dist/chunks/chunk-4U7XXM4W.js +4 -0
- package/dist/chunks/chunk-52T37Y47.js +8 -0
- package/dist/chunks/chunk-5M4PFLRW.js +4 -0
- package/dist/chunks/chunk-5NRGVROY.js +4 -0
- package/dist/chunks/chunk-5T7IX5KN.js +4 -0
- package/dist/chunks/chunk-6AKUD3CF.js +4 -0
- package/dist/chunks/chunk-6LZK4DDH.js +4 -0
- package/dist/chunks/chunk-6R73ICDB.js +4 -0
- package/dist/chunks/chunk-7MU2AKNM.js +4 -0
- package/dist/chunks/chunk-A34TDMIC.js +7 -0
- package/dist/chunks/chunk-AAA3UBIS.js +4 -0
- package/dist/chunks/chunk-ASYQHJVQ.js +9 -0
- package/dist/chunks/chunk-AWFUHWQK.js +4 -0
- package/dist/chunks/chunk-B3XBQEFM.js +4 -0
- package/dist/chunks/chunk-BGVHA2D4.js +4 -0
- package/dist/chunks/chunk-BGYR4ID3.js +4 -0
- package/dist/chunks/chunk-BKHDWCRT.js +79 -0
- package/dist/chunks/chunk-BR7A5SWM.js +23 -0
- package/dist/chunks/chunk-CQLH4UVX.js +4 -0
- package/dist/chunks/chunk-CVC66CFV.js +33 -0
- package/dist/chunks/chunk-CXT5IR5T.js +4 -0
- package/dist/chunks/chunk-D3NXKK2L.js +4 -0
- package/dist/chunks/chunk-D6UA4BZC.js +19 -0
- package/dist/chunks/chunk-D6VMBA4C.js +4 -0
- package/dist/chunks/chunk-DGMNI4AO.js +4 -0
- package/dist/chunks/chunk-DHSA5ACV.js +125 -0
- package/dist/chunks/chunk-DPQPXBTP.js +68 -0
- package/dist/chunks/chunk-DQJ6LLAS.js +4 -0
- package/dist/chunks/chunk-DXBSQXJL.js +18 -0
- package/dist/chunks/chunk-E6BYRULL.js +4 -0
- package/dist/chunks/chunk-E7ZMYIY6.js +30 -0
- package/dist/chunks/chunk-EQIMHXC4.js +5 -0
- package/dist/chunks/chunk-EQITBTJC.js +10 -0
- package/dist/chunks/chunk-EXJA5RIX.js +357 -0
- package/dist/chunks/chunk-FF7UELTU.js +4 -0
- package/dist/chunks/chunk-FH74NME3.js +115 -0
- package/dist/chunks/chunk-FOJQXLL2.js +6 -0
- package/dist/chunks/chunk-FOQ7VLIL.js +17 -0
- package/dist/chunks/chunk-FX6MOGLR.js +11 -0
- package/dist/chunks/chunk-FXDIR3SQ.js +4 -0
- package/dist/chunks/chunk-G2V65UBA.js +4 -0
- package/dist/chunks/chunk-H2FP6DG4.js +5 -0
- package/dist/chunks/chunk-HALUQ7ZF.js +4 -0
- package/dist/chunks/chunk-HGPBHTVD.js +6 -0
- package/dist/chunks/chunk-HU6UIDEJ.js +6 -0
- package/dist/chunks/chunk-I6OPDRVF.js +4 -0
- package/dist/chunks/chunk-ILEML5IP.js +4 -0
- package/dist/chunks/chunk-IRWZ7UPF.js +77 -0
- package/dist/chunks/chunk-J5DVLUKY.js +6 -0
- package/dist/chunks/chunk-JERCOLY3.js +142 -0
- package/dist/chunks/chunk-JW2HFMTF.js +4 -0
- package/dist/chunks/chunk-JXFG66UN.js +4 -0
- package/dist/chunks/chunk-K4NTZEDJ.js +4 -0
- package/dist/chunks/chunk-KDYEGGMW.js +4 -0
- package/dist/chunks/chunk-KENCMLRE.js +4 -0
- package/dist/chunks/chunk-KGJZAYQD.js +4 -0
- package/dist/chunks/chunk-KIGMAATV.js +23 -0
- package/dist/chunks/chunk-KIU5FAPY.js +5 -0
- package/dist/chunks/chunk-KIWMQPH7.js +739 -0
- package/dist/chunks/chunk-KRXTI4JO.js +3 -0
- package/dist/chunks/chunk-L6VCIGWS.js +11 -0
- package/dist/chunks/chunk-LACGULCN.js +10 -0
- package/dist/chunks/chunk-LCKVYFMD.js +4 -0
- package/dist/chunks/chunk-LEUENXI2.js +6 -0
- package/dist/chunks/chunk-LMDWRRX4.js +4 -0
- package/dist/chunks/chunk-LMSQZ6TQ.js +4 -0
- package/dist/chunks/chunk-MEPASGPP.js +6 -0
- package/dist/chunks/chunk-MFAEUHMV.js +28 -0
- package/dist/chunks/chunk-N6BTQN7R.js +8 -0
- package/dist/chunks/chunk-NAA7GF6Q.js +5 -0
- package/dist/chunks/chunk-NHD2ESHA.js +4 -0
- package/dist/chunks/chunk-NKDMKRSB.js +68 -0
- package/dist/chunks/chunk-NKXV32S6.js +4 -0
- package/dist/chunks/chunk-NR6U3WIZ.js +4 -0
- package/dist/chunks/chunk-NT32UURL.js +4 -0
- package/dist/chunks/chunk-NVX5IPRN.js +4 -0
- package/dist/chunks/chunk-O3JW2F7D.js +8 -0
- package/dist/chunks/chunk-OE4KH3NJ.js +4 -0
- package/dist/chunks/chunk-OISO5JXB.js +4 -0
- package/dist/chunks/chunk-OKRK6JPY.js +4 -0
- package/dist/chunks/chunk-OPYXNSMY.js +4 -0
- package/dist/chunks/chunk-OSEIQ7SS.js +4 -0
- package/dist/chunks/chunk-OZGBWAT2.js +4 -0
- package/dist/chunks/chunk-P52RMIYX.js +6 -0
- package/dist/chunks/chunk-PBJ5MPPX.js +60 -0
- package/dist/chunks/chunk-PFMEUFJ7.js +4 -0
- package/dist/chunks/chunk-PMG4YGDU.js +7 -0
- package/dist/chunks/chunk-PXS5SHOV.js +4 -0
- package/dist/chunks/chunk-PZMGBKUR.js +13 -0
- package/dist/chunks/chunk-PZMXHA6X.js +9 -0
- package/dist/chunks/chunk-Q4UGYGU5.js +4 -0
- package/dist/chunks/chunk-Q7CE3UIE.js +133 -0
- package/dist/chunks/chunk-QBKCAIJG.js +4 -0
- package/dist/chunks/chunk-QEOFEETJ.js +4 -0
- package/dist/chunks/chunk-QN44UXQR.js +11 -0
- package/dist/chunks/chunk-QUUEQRIT.js +4 -0
- package/dist/chunks/chunk-QWAQHHRS.js +4 -0
- package/dist/chunks/chunk-RA6HKFBV.js +4 -0
- package/dist/chunks/chunk-REBNWCKI.js +4 -0
- package/dist/chunks/chunk-REPYBMQS.js +4 -0
- package/dist/chunks/chunk-RO4C2MJP.js +4 -0
- package/dist/chunks/chunk-SKHLZ6XY.js +9 -0
- package/dist/chunks/chunk-STUHNKQS.js +4 -0
- package/dist/chunks/chunk-SUFW24P4.js +7 -0
- package/dist/chunks/chunk-TAWLERZA.js +4 -0
- package/dist/chunks/chunk-TCAEECDI.js +4 -0
- package/dist/chunks/chunk-TJ4GQRT6.js +8 -0
- package/dist/chunks/chunk-TURBFBYN.js +4 -0
- package/dist/chunks/chunk-TWAEABGG.js +52 -0
- package/dist/chunks/chunk-TZFLHVOQ.js +7 -0
- package/dist/chunks/chunk-TZGNSHOL.js +4 -0
- package/dist/chunks/chunk-UD3NMUHR.js +12 -0
- package/dist/chunks/chunk-UNVEZI57.js +4 -0
- package/dist/chunks/chunk-USBJFDJ6.js +4 -0
- package/dist/chunks/chunk-V3AQJSWR.js +4 -0
- package/dist/chunks/chunk-VQUPKMDR.js +4 -0
- package/dist/chunks/chunk-W25TB3PU.js +4 -0
- package/dist/chunks/chunk-W5LGYSPZ.js +4 -0
- package/dist/chunks/chunk-WEZWKMYU.js +4 -0
- package/dist/chunks/chunk-WHC7AYZD.js +4 -0
- package/dist/chunks/chunk-X2GYYRVM.js +22 -0
- package/dist/chunks/chunk-XAJLZR7C.js +28 -0
- package/dist/chunks/chunk-XAXWLYH5.js +4 -0
- package/dist/chunks/chunk-XBJOYU5Y.js +4 -0
- package/dist/chunks/chunk-XH6FMP3N.js +71 -0
- package/dist/chunks/chunk-XIECJESP.js +4 -0
- package/dist/chunks/chunk-XNSSUVT6.js +4 -0
- package/dist/chunks/chunk-XSRZHN63.js +4 -0
- package/dist/chunks/chunk-Y3GFB5XM.js +8 -0
- package/dist/chunks/chunk-Y6ZEVVL5.js +4 -0
- package/dist/chunks/chunk-YAEVYJAR.js +4 -0
- package/dist/chunks/chunk-YG7OEPR2.js +6 -0
- package/dist/chunks/chunk-YHIWOGVL.js +4 -0
- package/dist/chunks/chunk-YKKEI5GI.js +4 -0
- package/dist/chunks/chunk-YPK2CAIZ.js +8 -0
- package/dist/chunks/chunk-YZSHTWNM.js +92 -0
- package/dist/chunks/chunk-Z2Q2NR46.js +34 -0
- package/dist/chunks/chunk-Z4H3VDHI.js +4 -0
- package/dist/chunks/chunk-ZFPMIQA3.js +6 -0
- package/dist/chunks/chunk-ZNZFWSPH.js +4 -0
- package/dist/chunks/chunk-ZQ7LGTSN.js +8 -0
- package/dist/chunks/chunk-ZSV6TO7Q.js +4 -0
- package/dist/chunks/cli-5DBTRMHU.js +53 -0
- package/dist/chunks/client-XOGYH5UR.js +4 -0
- package/dist/chunks/cloudflare-workers-ai-system-one-32JCFHI3.js +4 -0
- package/dist/chunks/config-DJSQI77S-335IXHSM.js +4 -0
- package/dist/chunks/context-VCQH5OB6.js +4 -0
- package/dist/chunks/cost-PGGFI7QJ.js +5 -0
- package/dist/chunks/dist-7RWW7YH4.js +11 -0
- package/dist/chunks/dist-PUKMZ7GW.js +4 -0
- package/dist/chunks/easter-egg-3d-MO4MOEVF.js +4 -0
- package/dist/chunks/es5-VNTQPCKX.js +4 -0
- package/dist/chunks/event-streams-3JSFPOTZ.js +4 -0
- package/dist/chunks/execution-repo-ZLJTBWFC.js +4 -0
- package/dist/chunks/executions-6ARGR3IO.js +9 -0
- package/dist/chunks/file-7BN7RCAY.js +4 -0
- package/dist/chunks/gateway-UCRPMR75.js +36 -0
- package/dist/chunks/github-copilot-HAI2DA62.js +4 -0
- package/dist/chunks/google-generative-ai-2VXWLHWI.js +4 -0
- package/dist/chunks/google-vertex-UA36QP2U.js +4 -0
- package/dist/chunks/init-HA7FAQ73.js +4 -0
- package/dist/chunks/install-cli-4IZCSDFZ.js +16 -0
- package/dist/chunks/interaction-ask-G5T3H3CG.js +9 -0
- package/dist/chunks/interaction-plan-E5V42MUP.js +11 -0
- package/dist/chunks/jiti-loader-WANUXUDO.js +4 -0
- package/dist/chunks/jiti-static-loader-W3QZ4GDS.js +476 -0
- package/dist/chunks/kimi-coding-HMJRKCPA.js +4 -0
- package/dist/chunks/lib-RSOU34HQ.js +11 -0
- package/dist/chunks/llama-cpp-classify-OTXZWCMW.js +24 -0
- package/dist/chunks/local-client-stop-SQRU7ZZM.js +4 -0
- package/dist/chunks/memory-cli-PYOILNN5.js +11 -0
- package/dist/chunks/meta-KY3LNFV2.js +4 -0
- package/dist/chunks/mistral-conversations-34F66L3O.js +7 -0
- package/dist/chunks/model-resolver-N3DTAQ2S.js +4 -0
- package/dist/chunks/models-L5VF4I5O-XXNJYQMQ.js +4 -0
- package/dist/chunks/multipart-parser-GEHG6YAR.js +5 -0
- package/dist/chunks/node-PTK2HCDV.js +18 -0
- package/dist/chunks/node-VLVSZ76W.js +4 -0
- package/dist/chunks/openai-chatgpt-PETGIJOZ.js +4 -0
- package/dist/chunks/openai-codex-2REL6UQU.js +4 -0
- package/dist/chunks/openai-codex-responses-ZBVHREB3.js +12 -0
- package/dist/chunks/openai-completions-VVIB26SH.js +9 -0
- package/dist/chunks/openai-decisions-2N6ZRPZC.js +7 -0
- package/dist/chunks/openai-responses-735XA2ZX.js +6 -0
- package/dist/chunks/openrouter-GDY3BLT2.js +4 -0
- package/dist/chunks/openrouter-images-3IKETHAC.js +4 -0
- package/dist/chunks/pi-messages-I3E4ZFHA.js +10 -0
- package/dist/chunks/radius-HXRZVBDB.js +4 -0
- package/dist/chunks/remote-ops-BALZYKH6.js +14 -0
- package/dist/chunks/runner-PLVZDGHB.js +4 -0
- package/dist/chunks/runtime-6YLTA2ZD.js +4 -0
- package/dist/chunks/schedule-cli-OLASBBYJ.js +4 -0
- package/dist/chunks/slack-WAGSPZUX.js +4 -0
- package/dist/chunks/src-CCI7P7AI.js +6 -0
- package/dist/chunks/start-ui-http-QALT7C3P.js +43 -0
- package/dist/chunks/subagent-E3UC7ZHC.js +4 -0
- package/dist/chunks/time-KEHDQT6K.js +4 -0
- package/dist/chunks/tool-shims-Q6P6UXVC.js +4 -0
- package/dist/chunks/typesafe-system-one-6ULACYD4.js +4 -0
- package/dist/chunks/ui-board-4GYW6KKW.js +5 -0
- package/dist/chunks/ui-decision-U2FXSEC2.js +4 -0
- package/dist/chunks/ui-file-GVH53O3X.js +5 -0
- package/dist/chunks/ui-view-O7PLANT7.js +4 -0
- package/dist/chunks/virtual-modules-IDC5YKZJ.js +4 -0
- package/dist/chunks/waitpoint-2FGQBIAC.js +5 -0
- package/dist/chunks/workers-XN4PSTH6.js +4 -0
- package/dist/chunks/xai-KEVUJTFV.js +4 -0
- package/dist/client-bundle/manifest.json +1 -1
- package/dist/core/pi-sdk.js +4 -73
- package/dist/domain/auth/cc-auth-cli.js +4 -248
- package/dist/domain/mcp/bundled-server.js +4 -146
- package/dist/entry/app.js +601 -611
- package/dist/entry/browser-cli.js +14 -316
- package/dist/entry/cli.js +4 -587
- package/dist/entry/cortex-cli.js +4 -2
- package/dist/entry/daemon.js +7 -909
- package/dist/entry/hook-cli.js +6 -401
- package/dist/entry/production-app-bootstrap.js +5 -42
- package/dist/entry/production-evidence-export-cli.js +12 -99
- package/dist/entry/signal-cli.js +6 -198
- package/dist/tui/index.js +114 -306
- package/package.json +11 -50
- package/scripts/bundle-prune-browser.mjs +52 -0
- package/scripts/postinstall-restart-trigger.mjs +8 -0
- package/vendor/aistatus/gateway-cli.js +21 -0
- package/vendor/pi/CHANGELOG.md +6365 -0
- package/vendor/pi/README.md +95 -0
- package/vendor/pi/dist/codemode-worker.js +478 -0
- package/vendor/pi/dist/core/export-html/ansi-to-html.js +249 -0
- package/vendor/pi/dist/core/export-html/index.js +228 -0
- package/vendor/pi/dist/core/export-html/template.css +1076 -0
- package/vendor/pi/dist/core/export-html/template.html +56 -0
- package/vendor/pi/dist/core/export-html/template.js +1924 -0
- package/vendor/pi/dist/core/export-html/tool-renderer.js +110 -0
- package/vendor/pi/dist/core/export-html/vendor/highlight.min.js +1213 -0
- package/vendor/pi/dist/core/export-html/vendor/marked-cjk-friendly.min.js +6 -0
- package/vendor/pi/dist/core/export-html/vendor/marked.min.js +79 -0
- package/vendor/pi/dist/core/extensions/loader.js +4 -0
- package/vendor/pi/dist/extensions/codemode/execute.js +507 -0
- package/vendor/pi/dist/modes/interactive/assets/clankolas.png +0 -0
- package/vendor/pi/dist/modes/interactive/theme/dark.json +78 -0
- package/vendor/pi/dist/modes/interactive/theme/light.json +78 -0
- package/vendor/pi/dist/modes/interactive/theme/system-theme.js +546 -0
- package/vendor/pi/dist/modes/interactive/theme/theme-controller.js +210 -0
- package/vendor/pi/dist/modes/interactive/theme/theme-schema.js +105 -0
- package/vendor/pi/dist/modes/interactive/theme/theme-tokens.js +94 -0
- package/vendor/pi/dist/modes/interactive/theme/theme.js +905 -0
- package/vendor/pi/dist/utils/image-resize-worker.js +4 -0
- package/vendor/pi/dist/utils/image-resize.js +4 -0
- package/vendor/pi/docs/cli-integration.md +106 -0
- package/vendor/pi/docs/cli.md +333 -0
- package/vendor/pi/docs/codemode.md +230 -0
- package/vendor/pi/docs/compaction.md +463 -0
- package/vendor/pi/docs/configuration.md +47 -0
- package/vendor/pi/docs/containerization.md +183 -0
- package/vendor/pi/docs/custom-provider.md +225 -0
- package/vendor/pi/docs/docs.json +220 -0
- package/vendor/pi/docs/environment-variables.md +101 -0
- package/vendor/pi/docs/extensions.md +400 -0
- package/vendor/pi/docs/how-pi-works.md +49 -0
- package/vendor/pi/docs/images/doom-extension.png +0 -0
- package/vendor/pi/docs/images/exy.png +0 -0
- package/vendor/pi/docs/images/interactive-mode.png +0 -0
- package/vendor/pi/docs/images/tree-view.png +0 -0
- package/vendor/pi/docs/index.md +39 -0
- package/vendor/pi/docs/json.md +226 -0
- package/vendor/pi/docs/keybindings.md +195 -0
- package/vendor/pi/docs/llama-cpp.md +121 -0
- package/vendor/pi/docs/mcp.md +272 -0
- package/vendor/pi/docs/message-types.md +279 -0
- package/vendor/pi/docs/models-configuration.md +196 -0
- package/vendor/pi/docs/models.md +225 -0
- package/vendor/pi/docs/nvidia-rtx-llama-cpp.md +96 -0
- package/vendor/pi/docs/packages.md +129 -0
- package/vendor/pi/docs/prompt-templates.md +59 -0
- package/vendor/pi/docs/providers.md +247 -0
- package/vendor/pi/docs/quickstart.md +136 -0
- package/vendor/pi/docs/rpc-commands.md +860 -0
- package/vendor/pi/docs/rpc-extension-ui.md +200 -0
- package/vendor/pi/docs/rpc.md +193 -0
- package/vendor/pi/docs/sdk.md +147 -0
- package/vendor/pi/docs/security.md +99 -0
- package/vendor/pi/docs/session-format.md +293 -0
- package/vendor/pi/docs/sessions.md +66 -0
- package/vendor/pi/docs/settings.md +172 -0
- package/vendor/pi/docs/shell-aliases.md +93 -0
- package/vendor/pi/docs/skills.md +93 -0
- package/vendor/pi/docs/slash-commands.md +60 -0
- package/vendor/pi/docs/terminal-setup.md +233 -0
- package/vendor/pi/docs/termux.md +117 -0
- package/vendor/pi/docs/themes.md +138 -0
- package/vendor/pi/docs/tmux.md +55 -0
- package/vendor/pi/docs/tui.md +195 -0
- package/vendor/pi/docs/usage.md +94 -0
- package/vendor/pi/docs/virtual-models.md +114 -0
- package/vendor/pi/docs/windows.md +81 -0
- package/vendor/pi/examples/README.md +36 -0
- package/vendor/pi/examples/extensions/README.md +214 -0
- package/vendor/pi/examples/extensions/auto-commit-on-exit.ts +49 -0
- package/vendor/pi/examples/extensions/bash-spawn-hook.ts +30 -0
- package/vendor/pi/examples/extensions/bookmark.ts +50 -0
- package/vendor/pi/examples/extensions/border-status-editor.ts +150 -0
- package/vendor/pi/examples/extensions/built-in-tool-renderer.ts +225 -0
- package/vendor/pi/examples/extensions/claude-rules.ts +86 -0
- package/vendor/pi/examples/extensions/commands.ts +72 -0
- package/vendor/pi/examples/extensions/confirm-destructive.ts +59 -0
- package/vendor/pi/examples/extensions/custom-compaction.ts +117 -0
- package/vendor/pi/examples/extensions/custom-footer.ts +64 -0
- package/vendor/pi/examples/extensions/custom-header.ts +73 -0
- package/vendor/pi/examples/extensions/custom-provider-anthropic/index.ts +617 -0
- package/vendor/pi/examples/extensions/custom-provider-anthropic/package-lock.json +24 -0
- package/vendor/pi/examples/extensions/custom-provider-anthropic/package.json +19 -0
- package/vendor/pi/examples/extensions/custom-provider-gitlab-duo/index.ts +405 -0
- package/vendor/pi/examples/extensions/custom-provider-gitlab-duo/package.json +16 -0
- package/vendor/pi/examples/extensions/custom-provider-gitlab-duo/test.ts +82 -0
- package/vendor/pi/examples/extensions/debug-provider.ts +90 -0
- package/vendor/pi/examples/extensions/dirty-repo-guard.ts +56 -0
- package/vendor/pi/examples/extensions/doom-overlay/README.md +46 -0
- package/vendor/pi/examples/extensions/doom-overlay/doom/build/doom.js +21 -0
- package/vendor/pi/examples/extensions/doom-overlay/doom/build/doom.wasm +0 -0
- package/vendor/pi/examples/extensions/doom-overlay/doom/build.sh +152 -0
- package/vendor/pi/examples/extensions/doom-overlay/doom/doomgeneric_pi.c +72 -0
- package/vendor/pi/examples/extensions/doom-overlay/doom-component.ts +132 -0
- package/vendor/pi/examples/extensions/doom-overlay/doom-engine.ts +173 -0
- package/vendor/pi/examples/extensions/doom-overlay/doom-keys.ts +104 -0
- package/vendor/pi/examples/extensions/doom-overlay/index.ts +74 -0
- package/vendor/pi/examples/extensions/doom-overlay/wad-finder.ts +55 -0
- package/vendor/pi/examples/extensions/dynamic-resources/SKILL.md +8 -0
- package/vendor/pi/examples/extensions/dynamic-resources/dynamic.json +81 -0
- package/vendor/pi/examples/extensions/dynamic-resources/dynamic.md +5 -0
- package/vendor/pi/examples/extensions/dynamic-resources/index.ts +15 -0
- package/vendor/pi/examples/extensions/dynamic-tools.ts +74 -0
- package/vendor/pi/examples/extensions/entry-renderer.ts +41 -0
- package/vendor/pi/examples/extensions/event-bus.ts +43 -0
- package/vendor/pi/examples/extensions/file-trigger.ts +41 -0
- package/vendor/pi/examples/extensions/git-checkpoint.ts +53 -0
- package/vendor/pi/examples/extensions/git-merge-and-resolve.ts +115 -0
- package/vendor/pi/examples/extensions/github-issue-autocomplete.ts +185 -0
- package/vendor/pi/examples/extensions/gondolin/index.ts +531 -0
- package/vendor/pi/examples/extensions/gondolin/package-lock.json +185 -0
- package/vendor/pi/examples/extensions/gondolin/package.json +19 -0
- package/vendor/pi/examples/extensions/handoff.ts +190 -0
- package/vendor/pi/examples/extensions/hello.ts +26 -0
- package/vendor/pi/examples/extensions/hidden-thinking-label.ts +53 -0
- package/vendor/pi/examples/extensions/inline-bash.ts +94 -0
- package/vendor/pi/examples/extensions/input-transform-streaming.ts +39 -0
- package/vendor/pi/examples/extensions/input-transform.ts +43 -0
- package/vendor/pi/examples/extensions/interactive-shell.ts +196 -0
- package/vendor/pi/examples/extensions/jev-router.ts +113 -0
- package/vendor/pi/examples/extensions/mac-system-theme.ts +47 -0
- package/vendor/pi/examples/extensions/message-renderer.ts +59 -0
- package/vendor/pi/examples/extensions/minimal-mode.ts +353 -0
- package/vendor/pi/examples/extensions/modal-editor.ts +85 -0
- package/vendor/pi/examples/extensions/model-status.ts +31 -0
- package/vendor/pi/examples/extensions/notify.ts +57 -0
- package/vendor/pi/examples/extensions/overlay-qa-tests.ts +1450 -0
- package/vendor/pi/examples/extensions/overlay-test.ts +153 -0
- package/vendor/pi/examples/extensions/permission-gate.ts +34 -0
- package/vendor/pi/examples/extensions/pirate.ts +47 -0
- package/vendor/pi/examples/extensions/plan-mode/README.md +66 -0
- package/vendor/pi/examples/extensions/plan-mode/index.ts +394 -0
- package/vendor/pi/examples/extensions/plan-mode/utils.ts +168 -0
- package/vendor/pi/examples/extensions/preset.ts +436 -0
- package/vendor/pi/examples/extensions/project-trust.ts +64 -0
- package/vendor/pi/examples/extensions/prompt-customizer.ts +49 -0
- package/vendor/pi/examples/extensions/protected-paths.ts +30 -0
- package/vendor/pi/examples/extensions/provider-payload.ts +18 -0
- package/vendor/pi/examples/extensions/qna.ts +118 -0
- package/vendor/pi/examples/extensions/question.ts +286 -0
- package/vendor/pi/examples/extensions/questionnaire.ts +448 -0
- package/vendor/pi/examples/extensions/rainbow-editor.ts +88 -0
- package/vendor/pi/examples/extensions/reload-runtime.ts +37 -0
- package/vendor/pi/examples/extensions/rpc-demo.ts +118 -0
- package/vendor/pi/examples/extensions/sandbox/index.ts +321 -0
- package/vendor/pi/examples/extensions/sandbox/package-lock.json +92 -0
- package/vendor/pi/examples/extensions/sandbox/package.json +19 -0
- package/vendor/pi/examples/extensions/send-user-message.ts +97 -0
- package/vendor/pi/examples/extensions/session-name.ts +27 -0
- package/vendor/pi/examples/extensions/shutdown-command.ts +63 -0
- package/vendor/pi/examples/extensions/snake.ts +343 -0
- package/vendor/pi/examples/extensions/space-invaders.ts +560 -0
- package/vendor/pi/examples/extensions/ssh.ts +220 -0
- package/vendor/pi/examples/extensions/status-line.ts +32 -0
- package/vendor/pi/examples/extensions/structured-output.ts +65 -0
- package/vendor/pi/examples/extensions/subagent/README.md +177 -0
- package/vendor/pi/examples/extensions/subagent/agents/planner.md +37 -0
- package/vendor/pi/examples/extensions/subagent/agents/reviewer.md +35 -0
- package/vendor/pi/examples/extensions/subagent/agents/scout.md +50 -0
- package/vendor/pi/examples/extensions/subagent/agents/worker.md +24 -0
- package/vendor/pi/examples/extensions/subagent/agents.ts +157 -0
- package/vendor/pi/examples/extensions/subagent/index.ts +1036 -0
- package/vendor/pi/examples/extensions/subagent/prompts/implement-and-review.md +10 -0
- package/vendor/pi/examples/extensions/subagent/prompts/implement.md +10 -0
- package/vendor/pi/examples/extensions/subagent/prompts/scout-and-plan.md +9 -0
- package/vendor/pi/examples/extensions/summarize.ts +199 -0
- package/vendor/pi/examples/extensions/system-prompt-header.ts +17 -0
- package/vendor/pi/examples/extensions/tic-tac-toe.ts +1008 -0
- package/vendor/pi/examples/extensions/timed-confirm.ts +70 -0
- package/vendor/pi/examples/extensions/titlebar-spinner.ts +58 -0
- package/vendor/pi/examples/extensions/todo.ts +297 -0
- package/vendor/pi/examples/extensions/tool-override.ts +144 -0
- package/vendor/pi/examples/extensions/tools.ts +146 -0
- package/vendor/pi/examples/extensions/trigger-compact.ts +50 -0
- package/vendor/pi/examples/extensions/truncated-tool.ts +195 -0
- package/vendor/pi/examples/extensions/widget-placement.ts +9 -0
- package/vendor/pi/examples/extensions/with-deps/index.ts +32 -0
- package/vendor/pi/examples/extensions/with-deps/package-lock.json +31 -0
- package/vendor/pi/examples/extensions/with-deps/package.json +22 -0
- package/vendor/pi/examples/extensions/working-indicator.ts +123 -0
- package/vendor/pi/examples/extensions/working-message-test.ts +25 -0
- package/vendor/pi/examples/rpc-client.ts +35 -0
- package/vendor/pi/examples/rpc-extension-ui.ts +661 -0
- package/vendor/pi/examples/sdk/01-minimal.ts +26 -0
- package/vendor/pi/examples/sdk/02-custom-model.ts +49 -0
- package/vendor/pi/examples/sdk/03-custom-prompt.ts +75 -0
- package/vendor/pi/examples/sdk/04-skills.ts +55 -0
- package/vendor/pi/examples/sdk/05-tools.ts +48 -0
- package/vendor/pi/examples/sdk/06-extensions.ts +99 -0
- package/vendor/pi/examples/sdk/07-context-files.ts +47 -0
- package/vendor/pi/examples/sdk/08-prompt-templates.ts +51 -0
- package/vendor/pi/examples/sdk/09-api-keys-and-oauth.ts +34 -0
- package/vendor/pi/examples/sdk/10-settings.ts +53 -0
- package/vendor/pi/examples/sdk/11-sessions.ts +52 -0
- package/vendor/pi/examples/sdk/12-full-control.ts +74 -0
- package/vendor/pi/examples/sdk/13-session-runtime.ts +67 -0
- package/vendor/pi/examples/sdk/14-codemode-mcp.ts +61 -0
- package/vendor/pi/examples/sdk/README.md +141 -0
- package/vendor/pi/package.json +98 -0
- package/vendor/pi/schemas/keybindings.schema.json +393 -0
- package/vendor/pi/schemas/models.schema.json +1211 -0
- package/vendor/pi/schemas/settings.schema.json +783 -0
- package/vendor/pi/schemas/theme.schema.json +365 -0
- package/vendor/pi-ai/bedrock.js +4 -0
- package/vendor/pi-ai/oauth-load.js +4 -0
- package/vendor/quickjs.wasm +0 -0
- package/web/dist/assets/board-math-css-BPXakv_3.js +2 -0
- package/web/dist/assets/index-BHZpFXhc.js +525 -0
- package/web/dist/assets/index-DqWMdMkh.css +1 -0
- package/web/dist/assets/index-WCm6wwmM.js +1 -0
- package/web/dist/index.html +2 -2
- package/dist/agent-adapter/bg-wait.d.ts +0 -11
- package/dist/agent-adapter/bg-wait.js +0 -32
- package/dist/agent-adapter/capabilities.d.ts +0 -18
- package/dist/agent-adapter/capabilities.js +0 -39
- package/dist/agent-adapter/claude/active-capture-registry.d.ts +0 -7
- package/dist/agent-adapter/claude/active-capture-registry.js +0 -42
- package/dist/agent-adapter/claude/adapter.d.ts +0 -170
- package/dist/agent-adapter/claude/adapter.js +0 -459
- package/dist/agent-adapter/claude/assistant-blocks.d.ts +0 -5
- package/dist/agent-adapter/claude/assistant-blocks.js +0 -61
- package/dist/agent-adapter/claude/bg-task-tracker.d.ts +0 -105
- package/dist/agent-adapter/claude/bg-task-tracker.js +0 -168
- package/dist/agent-adapter/claude/cache-refresh.d.ts +0 -58
- package/dist/agent-adapter/claude/cache-refresh.js +0 -145
- package/dist/agent-adapter/claude/cache-touch.d.ts +0 -12
- package/dist/agent-adapter/claude/cache-touch.js +0 -75
- package/dist/agent-adapter/claude/compact-window.d.ts +0 -18
- package/dist/agent-adapter/claude/compact-window.js +0 -49
- package/dist/agent-adapter/claude/context-usage.d.ts +0 -28
- package/dist/agent-adapter/claude/context-usage.js +0 -173
- package/dist/agent-adapter/claude/defaults.d.ts +0 -42
- package/dist/agent-adapter/claude/defaults.js +0 -59
- package/dist/agent-adapter/claude/engine.d.ts +0 -75
- package/dist/agent-adapter/claude/engine.js +0 -139
- package/dist/agent-adapter/claude/event-parser.d.ts +0 -60
- package/dist/agent-adapter/claude/event-parser.js +0 -259
- package/dist/agent-adapter/claude/event-translator.d.ts +0 -45
- package/dist/agent-adapter/claude/event-translator.js +0 -98
- package/dist/agent-adapter/claude/hooks-builder.d.ts +0 -19
- package/dist/agent-adapter/claude/hooks-builder.js +0 -57
- package/dist/agent-adapter/claude/mcp-config.d.ts +0 -11
- package/dist/agent-adapter/claude/mcp-config.js +0 -142
- package/dist/agent-adapter/claude/remote-mcp-proxy.d.ts +0 -1
- package/dist/agent-adapter/claude/session-options.d.ts +0 -70
- package/dist/agent-adapter/claude/session-options.js +0 -148
- package/dist/agent-adapter/claude/spawn-args.d.ts +0 -70
- package/dist/agent-adapter/claude/spawn-args.js +0 -367
- package/dist/agent-adapter/claude/tool-summarizers.d.ts +0 -2
- package/dist/agent-adapter/claude/tool-summarizers.js +0 -20
- package/dist/agent-adapter/claude/transcript-clear.d.ts +0 -42
- package/dist/agent-adapter/claude/transcript-clear.js +0 -217
- package/dist/agent-adapter/claude/transcript-path.d.ts +0 -39
- package/dist/agent-adapter/claude/transcript-path.js +0 -114
- package/dist/agent-adapter/claude/turn-machine.d.ts +0 -220
- package/dist/agent-adapter/claude/turn-machine.js +0 -731
- package/dist/agent-adapter/claude/window-warmup.d.ts +0 -13
- package/dist/agent-adapter/claude/window-warmup.js +0 -38
- package/dist/agent-adapter/continuation-phase.d.ts +0 -131
- package/dist/agent-adapter/continuation-phase.js +0 -345
- package/dist/agent-adapter/engine-injections.d.ts +0 -47
- package/dist/agent-adapter/engine-injections.js +0 -80
- package/dist/agent-adapter/mcp-remote-fetch.d.ts +0 -1
- package/dist/agent-adapter/mcp-remote-fetch.js +0 -32
- package/dist/agent-adapter/normalize/event-types.d.ts +0 -125
- package/dist/agent-adapter/normalize/event-types.js +0 -1
- package/dist/agent-adapter/normalize/prompt-builder.d.ts +0 -22
- package/dist/agent-adapter/normalize/prompt-builder.js +0 -41
- package/dist/agent-adapter/normalize/tool-result-images.d.ts +0 -11
- package/dist/agent-adapter/normalize/tool-result-images.js +0 -32
- package/dist/agent-adapter/pi/adapter.d.ts +0 -125
- package/dist/agent-adapter/pi/adapter.js +0 -275
- package/dist/agent-adapter/pi/agent-dir.d.ts +0 -57
- package/dist/agent-adapter/pi/agent-dir.js +0 -154
- package/dist/agent-adapter/pi/background-subagent.d.ts +0 -26
- package/dist/agent-adapter/pi/background-subagent.js +0 -1
- package/dist/agent-adapter/pi/child-events.d.ts +0 -13
- package/dist/agent-adapter/pi/child-events.js +0 -96
- package/dist/agent-adapter/pi/child-runner.d.ts +0 -31
- package/dist/agent-adapter/pi/child-runner.js +0 -133
- package/dist/agent-adapter/pi/child-session.d.ts +0 -28
- package/dist/agent-adapter/pi/child-session.js +0 -70
- package/dist/agent-adapter/pi/custom-catalog.d.ts +0 -10
- package/dist/agent-adapter/pi/custom-catalog.js +0 -38
- package/dist/agent-adapter/pi/defaults.d.ts +0 -7
- package/dist/agent-adapter/pi/defaults.js +0 -11
- package/dist/agent-adapter/pi/discovery.d.ts +0 -37
- package/dist/agent-adapter/pi/discovery.js +0 -33
- package/dist/agent-adapter/pi/engine.d.ts +0 -66
- package/dist/agent-adapter/pi/engine.js +0 -180
- package/dist/agent-adapter/pi/event-parser.d.ts +0 -43
- package/dist/agent-adapter/pi/event-parser.js +0 -446
- package/dist/agent-adapter/pi/extensions.d.ts +0 -33
- package/dist/agent-adapter/pi/extensions.js +0 -58
- package/dist/agent-adapter/pi/hook-bridge.d.ts +0 -54
- package/dist/agent-adapter/pi/hook-bridge.js +0 -394
- package/dist/agent-adapter/pi/image-first.d.ts +0 -3
- package/dist/agent-adapter/pi/image-first.js +0 -31
- package/dist/agent-adapter/pi/mcp-bridge-logic.d.ts +0 -32
- package/dist/agent-adapter/pi/mcp-bridge-logic.js +0 -63
- package/dist/agent-adapter/pi/mcp-bridge.d.ts +0 -65
- package/dist/agent-adapter/pi/mcp-bridge.js +0 -389
- package/dist/agent-adapter/pi/native-tool-policy.d.ts +0 -3
- package/dist/agent-adapter/pi/native-tool-policy.js +0 -11
- package/dist/agent-adapter/pi/pi-session.d.ts +0 -185
- package/dist/agent-adapter/pi/pi-session.js +0 -656
- package/dist/agent-adapter/pi/providers-config.d.ts +0 -60
- package/dist/agent-adapter/pi/providers-config.js +0 -96
- package/dist/agent-adapter/pi/quota-probe.d.ts +0 -12
- package/dist/agent-adapter/pi/quota-probe.js +0 -33
- package/dist/agent-adapter/pi/quota-sink.d.ts +0 -33
- package/dist/agent-adapter/pi/quota-sink.js +0 -57
- package/dist/agent-adapter/pi/runtime-settings.d.ts +0 -9
- package/dist/agent-adapter/pi/runtime-settings.js +0 -53
- package/dist/agent-adapter/pi/runtime.d.ts +0 -48
- package/dist/agent-adapter/pi/runtime.js +0 -163
- package/dist/agent-adapter/pi/session-files.d.ts +0 -2
- package/dist/agent-adapter/pi/session-files.js +0 -15
- package/dist/agent-adapter/pi/session-options.d.ts +0 -86
- package/dist/agent-adapter/pi/session-options.js +0 -162
- package/dist/agent-adapter/pi/session-support.d.ts +0 -54
- package/dist/agent-adapter/pi/session-support.js +0 -101
- package/dist/agent-adapter/pi/subagent-bridge.d.ts +0 -17
- package/dist/agent-adapter/pi/subagent-bridge.js +0 -1
- package/dist/agent-adapter/pi/subagent.d.ts +0 -100
- package/dist/agent-adapter/pi/subagent.js +0 -199
- package/dist/agent-adapter/pi/tool-shims.d.ts +0 -32
- package/dist/agent-adapter/pi/tool-shims.js +0 -148
- package/dist/agent-adapter/pi/ui-context.d.ts +0 -20
- package/dist/agent-adapter/pi/ui-context.js +0 -92
- package/dist/agent-adapter/pi/web-fetch.d.ts +0 -13
- package/dist/agent-adapter/pi/web-fetch.js +0 -196
- package/dist/agent-adapter/pi/web-search.d.ts +0 -9
- package/dist/agent-adapter/pi/web-search.js +0 -517
- package/dist/agent-adapter/run-events.d.ts +0 -169
- package/dist/agent-adapter/run-events.js +0 -119
- package/dist/agent-adapter/types.d.ts +0 -330
- package/dist/agent-adapter/types.js +0 -3
- package/dist/core/agents/roles.d.ts +0 -50
- package/dist/core/agents/roles.js +0 -176
- package/dist/core/agents/subagent/attribution.d.ts +0 -15
- package/dist/core/agents/subagent/attribution.js +0 -60
- package/dist/core/agents/subagent/catalog.d.ts +0 -65
- package/dist/core/agents/subagent/catalog.js +0 -200
- package/dist/core/agents/subagent/model-spec.d.ts +0 -28
- package/dist/core/agents/subagent/model-spec.js +0 -39
- package/dist/core/agents/subagent/orchestrate.d.ts +0 -25
- package/dist/core/agents/subagent/orchestrate.js +0 -92
- package/dist/core/agents/subagent/schema.d.ts +0 -12
- package/dist/core/agents/subagent/schema.js +0 -51
- package/dist/core/agents/subagent/types.d.ts +0 -84
- package/dist/core/agents/subagent/types.js +0 -1
- package/dist/core/agents/subagent/usage.d.ts +0 -8
- package/dist/core/agents/subagent/usage.js +0 -32
- package/dist/core/anthropic-model-discovery.d.ts +0 -54
- package/dist/core/anthropic-model-discovery.js +0 -156
- package/dist/core/anthropic-models.d.ts +0 -1
- package/dist/core/anthropic-models.js +0 -13
- package/dist/core/async-mutex.d.ts +0 -6
- package/dist/core/async-mutex.js +0 -32
- package/dist/core/atomic-write.d.ts +0 -9
- package/dist/core/atomic-write.js +0 -104
- package/dist/core/auth.d.ts +0 -40
- package/dist/core/auth.js +0 -94
- package/dist/core/board-action.d.ts +0 -19
- package/dist/core/board-action.js +0 -24
- package/dist/core/builtin-layer.d.ts +0 -22
- package/dist/core/builtin-layer.js +0 -45
- package/dist/core/cached-scan.d.ts +0 -42
- package/dist/core/cached-scan.js +0 -95
- package/dist/core/calver.d.ts +0 -1
- package/dist/core/calver.js +0 -25
- package/dist/core/claude-credentials.d.ts +0 -91
- package/dist/core/claude-credentials.js +0 -242
- package/dist/core/cli-utils.d.ts +0 -56
- package/dist/core/cli-utils.js +0 -70
- package/dist/core/codex-quota.d.ts +0 -27
- package/dist/core/codex-quota.js +0 -55
- package/dist/core/codex-token.d.ts +0 -4
- package/dist/core/codex-token.js +0 -26
- package/dist/core/config-generator.d.ts +0 -17
- package/dist/core/config-generator.js +0 -181
- package/dist/core/debug-mode.d.ts +0 -15
- package/dist/core/debug-mode.js +0 -22
- package/dist/core/exec-async.d.ts +0 -28
- package/dist/core/exec-async.js +0 -48
- package/dist/core/file-lock.d.ts +0 -15
- package/dist/core/file-lock.js +0 -164
- package/dist/core/format-duration.d.ts +0 -7
- package/dist/core/format-duration.js +0 -23
- package/dist/core/gateway-generator.d.ts +0 -152
- package/dist/core/gateway-generator.js +0 -559
- package/dist/core/git-availability.d.ts +0 -2
- package/dist/core/git-availability.js +0 -43
- package/dist/core/hook-bus.d.ts +0 -25
- package/dist/core/hook-bus.js +0 -99
- package/dist/core/hook-exec.d.ts +0 -15
- package/dist/core/hook-exec.js +0 -86
- package/dist/core/hook-scripts.d.ts +0 -19
- package/dist/core/hook-scripts.js +0 -30
- package/dist/core/i18n.d.ts +0 -19
- package/dist/core/i18n.js +0 -42
- package/dist/core/icons.d.ts +0 -72
- package/dist/core/icons.js +0 -71
- package/dist/core/json-repository.d.ts +0 -78
- package/dist/core/json-repository.js +0 -154
- package/dist/core/locales/en.d.ts +0 -911
- package/dist/core/locales/en.js +0 -32
- package/dist/core/locales/slices/commands.d.ts +0 -301
- package/dist/core/locales/slices/commands.js +0 -634
- package/dist/core/locales/slices/init.d.ts +0 -153
- package/dist/core/locales/slices/init.js +0 -431
- package/dist/core/locales/slices/interactions.d.ts +0 -47
- package/dist/core/locales/slices/interactions.js +0 -99
- package/dist/core/locales/slices/lang.d.ts +0 -8
- package/dist/core/locales/slices/lang.js +0 -15
- package/dist/core/locales/slices/notices.d.ts +0 -78
- package/dist/core/locales/slices/notices.js +0 -156
- package/dist/core/locales/slices/providers.d.ts +0 -43
- package/dist/core/locales/slices/providers.js +0 -87
- package/dist/core/locales/slices/scheduling.d.ts +0 -33
- package/dist/core/locales/slices/scheduling.js +0 -65
- package/dist/core/locales/slices/startup.d.ts +0 -10
- package/dist/core/locales/slices/startup.js +0 -19
- package/dist/core/locales/slices/status.d.ts +0 -48
- package/dist/core/locales/slices/status.js +0 -109
- package/dist/core/locales/slices/tui.d.ts +0 -93
- package/dist/core/locales/slices/tui.js +0 -192
- package/dist/core/locales/slices/uiextra.d.ts +0 -49
- package/dist/core/locales/slices/uiextra.js +0 -102
- package/dist/core/locales/slices/uimsg.d.ts +0 -74
- package/dist/core/locales/slices/uimsg.js +0 -158
- package/dist/core/locales/zh.d.ts +0 -5
- package/dist/core/locales/zh.js +0 -30
- package/dist/core/log.d.ts +0 -16
- package/dist/core/log.js +0 -174
- package/dist/core/loopback-http.d.ts +0 -6
- package/dist/core/loopback-http.js +0 -43
- package/dist/core/mcp-bundles.d.ts +0 -8
- package/dist/core/mcp-bundles.js +0 -47
- package/dist/core/mcp-timeout.d.ts +0 -1
- package/dist/core/mcp-timeout.js +0 -1
- package/dist/core/mcp-tool-gate.d.ts +0 -25
- package/dist/core/mcp-tool-gate.js +0 -97
- package/dist/core/media-types.d.ts +0 -20
- package/dist/core/media-types.js +0 -63
- package/dist/core/models-generator.d.ts +0 -29
- package/dist/core/models-generator.js +0 -82
- package/dist/core/native-name.d.ts +0 -4
- package/dist/core/native-name.js +0 -57
- package/dist/core/paths.d.ts +0 -63
- package/dist/core/paths.js +0 -105
- package/dist/core/pi-sdk.d.ts +0 -38
- package/dist/core/pi-session-filename.d.ts +0 -10
- package/dist/core/pi-session-filename.js +0 -49
- package/dist/core/platform-settings-spec.d.ts +0 -47
- package/dist/core/platform-settings-spec.js +0 -28
- package/dist/core/private-dir.d.ts +0 -13
- package/dist/core/private-dir.js +0 -48
- package/dist/core/process-command-line.d.ts +0 -6
- package/dist/core/process-command-line.js +0 -39
- package/dist/core/prompt-template.d.ts +0 -14
- package/dist/core/prompt-template.js +0 -29
- package/dist/core/rebuild-progress.d.ts +0 -59
- package/dist/core/rebuild-progress.js +0 -106
- package/dist/core/resilient-watch.d.ts +0 -28
- package/dist/core/resilient-watch.js +0 -108
- package/dist/core/resume-reminder.d.ts +0 -5
- package/dist/core/resume-reminder.js +0 -12
- package/dist/core/run-registry.d.ts +0 -134
- package/dist/core/run-registry.js +0 -256
- package/dist/core/runtime-env.d.ts +0 -1
- package/dist/core/runtime-env.js +0 -11
- package/dist/core/session-holds.d.ts +0 -88
- package/dist/core/session-holds.js +0 -168
- package/dist/core/session-state.d.ts +0 -32
- package/dist/core/session-state.js +0 -39
- package/dist/core/session-todos.d.ts +0 -12
- package/dist/core/session-todos.js +0 -44
- package/dist/core/settings-migration.d.ts +0 -5
- package/dist/core/settings-migration.js +0 -128
- package/dist/core/settings-spec.d.ts +0 -301
- package/dist/core/settings-spec.js +0 -309
- package/dist/core/settings.d.ts +0 -19
- package/dist/core/settings.js +0 -492
- package/dist/core/short-session-id.d.ts +0 -2
- package/dist/core/short-session-id.js +0 -4
- package/dist/core/singleton-lock.d.ts +0 -39
- package/dist/core/singleton-lock.js +0 -127
- package/dist/core/status-format.d.ts +0 -70
- package/dist/core/status-format.js +0 -59
- package/dist/core/subagent-spawn.d.ts +0 -40
- package/dist/core/subagent-spawn.js +0 -47
- package/dist/core/team-action.d.ts +0 -28
- package/dist/core/team-action.js +0 -65
- package/dist/core/todo.d.ts +0 -18
- package/dist/core/todo.js +0 -79
- package/dist/core/tool-names.d.ts +0 -12
- package/dist/core/tool-names.js +0 -65
- package/dist/core/types/agent-types.d.ts +0 -173
- package/dist/core/types/agent-types.js +0 -1
- package/dist/core/types/environment-types.d.ts +0 -45
- package/dist/core/types/environment-types.js +0 -1
- package/dist/core/utils.d.ts +0 -72
- package/dist/core/utils.js +0 -176
- package/dist/core/version.d.ts +0 -6
- package/dist/core/version.js +0 -11
- package/dist/core/workspace-filenames.d.ts +0 -9
- package/dist/core/workspace-filenames.js +0 -61
- package/dist/domain/agents/agent-state.d.ts +0 -19
- package/dist/domain/agents/agent-state.js +0 -73
- package/dist/domain/agents/agent-switch.d.ts +0 -16
- package/dist/domain/agents/agent-switch.js +0 -30
- package/dist/domain/agents/config.d.ts +0 -20
- package/dist/domain/agents/config.js +0 -89
- package/dist/domain/agents/engine-selection.d.ts +0 -21
- package/dist/domain/agents/engine-selection.js +0 -37
- package/dist/domain/agents/environments/entities.d.ts +0 -50
- package/dist/domain/agents/environments/entities.js +0 -94
- package/dist/domain/agents/environments/file-refs.d.ts +0 -20
- package/dist/domain/agents/environments/file-refs.js +0 -51
- package/dist/domain/agents/environments/index.d.ts +0 -7
- package/dist/domain/agents/environments/index.js +0 -9
- package/dist/domain/agents/environments/paths.d.ts +0 -7
- package/dist/domain/agents/environments/paths.js +0 -9
- package/dist/domain/agents/environments/prompt-includes.d.ts +0 -1
- package/dist/domain/agents/environments/prompt-includes.js +0 -91
- package/dist/domain/agents/environments/registry.d.ts +0 -17
- package/dist/domain/agents/environments/registry.js +0 -163
- package/dist/domain/agents/environments/resolve.d.ts +0 -11
- package/dist/domain/agents/environments/resolve.js +0 -36
- package/dist/domain/agents/environments/schema.d.ts +0 -69
- package/dist/domain/agents/environments/schema.js +0 -115
- package/dist/domain/agents/environments/schema.parity.d.ts +0 -1
- package/dist/domain/agents/environments/schema.parity.js +0 -7
- package/dist/domain/agents/environments/system-prompt.d.ts +0 -37
- package/dist/domain/agents/environments/system-prompt.js +0 -110
- package/dist/domain/agents/index.d.ts +0 -6
- package/dist/domain/agents/index.js +0 -7
- package/dist/domain/agents/model-selection.d.ts +0 -30
- package/dist/domain/agents/model-selection.js +0 -111
- package/dist/domain/agents/models.d.ts +0 -12
- package/dist/domain/agents/models.js +0 -94
- package/dist/domain/agents/provider-run-lifecycle.d.ts +0 -11
- package/dist/domain/agents/provider-run-lifecycle.js +0 -17
- package/dist/domain/agents/subagent/background-spend.d.ts +0 -17
- package/dist/domain/agents/subagent/background-spend.js +0 -42
- package/dist/domain/agents/subagent/foreign.d.ts +0 -13
- package/dist/domain/agents/subagent/foreign.js +0 -30
- package/dist/domain/agents/subagent/registry.d.ts +0 -106
- package/dist/domain/agents/subagent/registry.js +0 -272
- package/dist/domain/agents/subagent/runner.d.ts +0 -61
- package/dist/domain/agents/subagent/runner.js +0 -301
- package/dist/domain/agents/subagent/service.d.ts +0 -26
- package/dist/domain/agents/subagent/service.js +0 -68
- package/dist/domain/auth/anthropic-env.d.ts +0 -20
- package/dist/domain/auth/anthropic-env.js +0 -132
- package/dist/domain/auth/auth-events.d.ts +0 -18
- package/dist/domain/auth/auth-events.js +0 -34
- package/dist/domain/auth/auth-format.d.ts +0 -2
- package/dist/domain/auth/auth-format.js +0 -53
- package/dist/domain/auth/auth-status.d.ts +0 -63
- package/dist/domain/auth/auth-status.js +0 -286
- package/dist/domain/auth/auth-watch.d.ts +0 -16
- package/dist/domain/auth/auth-watch.js +0 -166
- package/dist/domain/auth/cc-auth-cli.d.ts +0 -30
- package/dist/domain/auth/cc-login.d.ts +0 -7
- package/dist/domain/auth/cc-login.js +0 -20
- package/dist/domain/auth/cc-subscription.d.ts +0 -18
- package/dist/domain/auth/cc-subscription.js +0 -54
- package/dist/domain/auth/claude-account-credentials.d.ts +0 -13
- package/dist/domain/auth/claude-account-credentials.js +0 -22
- package/dist/domain/auth/claude-user-settings.d.ts +0 -22
- package/dist/domain/auth/claude-user-settings.js +0 -104
- package/dist/domain/auth/codex-credentials.d.ts +0 -13
- package/dist/domain/auth/codex-credentials.js +0 -25
- package/dist/domain/auth/gateway-sync.d.ts +0 -19
- package/dist/domain/auth/gateway-sync.js +0 -46
- package/dist/domain/auth/index.d.ts +0 -14
- package/dist/domain/auth/index.js +0 -14
- package/dist/domain/auth/login-flow.d.ts +0 -141
- package/dist/domain/auth/login-flow.js +0 -339
- package/dist/domain/auth/login-service.d.ts +0 -33
- package/dist/domain/auth/login-service.js +0 -65
- package/dist/domain/auth/logout.d.ts +0 -32
- package/dist/domain/auth/logout.js +0 -156
- package/dist/domain/auth/pi-login.d.ts +0 -26
- package/dist/domain/auth/pi-login.js +0 -70
- package/dist/domain/auth/pi-oauth.d.ts +0 -26
- package/dist/domain/auth/pi-oauth.js +0 -85
- package/dist/domain/auth/pi-runtime.d.ts +0 -82
- package/dist/domain/auth/pi-runtime.js +0 -40
- package/dist/domain/benchmark/accounting-reconciliation.d.ts +0 -117
- package/dist/domain/benchmark/accounting-reconciliation.js +0 -174
- package/dist/domain/benchmark/atif.d.ts +0 -42
- package/dist/domain/benchmark/atif.js +0 -263
- package/dist/domain/benchmark/attempt-record.d.ts +0 -167
- package/dist/domain/benchmark/attempt-record.js +0 -113
- package/dist/domain/benchmark/benchmark-types.d.ts +0 -17
- package/dist/domain/benchmark/benchmark-types.js +0 -1
- package/dist/domain/benchmark/composite-manifest.d.ts +0 -117
- package/dist/domain/benchmark/composite-manifest.js +0 -477
- package/dist/domain/benchmark/decimal-text.d.ts +0 -22
- package/dist/domain/benchmark/decimal-text.js +0 -42
- package/dist/domain/benchmark/identity.d.ts +0 -39
- package/dist/domain/benchmark/identity.js +0 -70
- package/dist/domain/benchmark/journal.d.ts +0 -47
- package/dist/domain/benchmark/journal.js +0 -254
- package/dist/domain/benchmark/manifest-contract.d.ts +0 -30
- package/dist/domain/benchmark/manifest-contract.js +0 -118
- package/dist/domain/benchmark/production-attempt-identity.d.ts +0 -73
- package/dist/domain/benchmark/production-attempt-identity.js +0 -372
- package/dist/domain/benchmark/production-attempt-journal.d.ts +0 -38
- package/dist/domain/benchmark/production-attempt-journal.js +0 -267
- package/dist/domain/benchmark/production-benchmark-evidence.d.ts +0 -2
- package/dist/domain/benchmark/production-benchmark-evidence.js +0 -67
- package/dist/domain/benchmark/production-evidence-export.d.ts +0 -14
- package/dist/domain/benchmark/production-evidence-export.js +0 -134
- package/dist/domain/benchmark/production-evidence-journal.d.ts +0 -11
- package/dist/domain/benchmark/production-evidence-journal.js +0 -81
- package/dist/domain/benchmark/production-evidence-projection.d.ts +0 -39
- package/dist/domain/benchmark/production-evidence-projection.js +0 -392
- package/dist/domain/benchmark/role-surface.d.ts +0 -4
- package/dist/domain/benchmark/role-surface.js +0 -117
- package/dist/domain/benchmark/session-evidence.d.ts +0 -7
- package/dist/domain/benchmark/session-evidence.js +0 -34
- package/dist/domain/boards/board-context.d.ts +0 -17
- package/dist/domain/boards/board-context.js +0 -11
- package/dist/domain/boards/board-paths.d.ts +0 -18
- package/dist/domain/boards/board-paths.js +0 -32
- package/dist/domain/boards/board-service.d.ts +0 -50
- package/dist/domain/boards/board-service.js +0 -146
- package/dist/domain/boards/board-watcher.d.ts +0 -36
- package/dist/domain/boards/board-watcher.js +0 -284
- package/dist/domain/boards/decision-projection.d.ts +0 -46
- package/dist/domain/boards/decision-projection.js +0 -44
- package/dist/domain/browser/broker.d.ts +0 -99
- package/dist/domain/browser/broker.js +0 -487
- package/dist/domain/costs/account-reset.d.ts +0 -30
- package/dist/domain/costs/account-reset.js +0 -98
- package/dist/domain/costs/aistatus-config.d.ts +0 -27
- package/dist/domain/costs/aistatus-config.js +0 -56
- package/dist/domain/costs/claude-account.d.ts +0 -34
- package/dist/domain/costs/claude-account.js +0 -170
- package/dist/domain/costs/codex-account.d.ts +0 -55
- package/dist/domain/costs/codex-account.js +0 -155
- package/dist/domain/costs/cost-tracker.d.ts +0 -181
- package/dist/domain/costs/cost-tracker.js +0 -350
- package/dist/domain/costs/gateway-manager.d.ts +0 -6
- package/dist/domain/costs/gateway-manager.js +0 -225
- package/dist/domain/costs/rate-limit-throttle.d.ts +0 -78
- package/dist/domain/costs/rate-limit-throttle.js +0 -502
- package/dist/domain/costs/reset-account.d.ts +0 -36
- package/dist/domain/costs/reset-account.js +0 -5
- package/dist/domain/costs/resume-registry.d.ts +0 -30
- package/dist/domain/costs/resume-registry.js +0 -108
- package/dist/domain/costs/usage-service.d.ts +0 -80
- package/dist/domain/costs/usage-service.js +0 -618
- package/dist/domain/costs/usage-store.d.ts +0 -83
- package/dist/domain/costs/usage-store.js +0 -104
- package/dist/domain/executions/registry.d.ts +0 -47
- package/dist/domain/executions/registry.js +0 -100
- package/dist/domain/hooks/hook-view.d.ts +0 -22
- package/dist/domain/hooks/hook-view.js +0 -34
- package/dist/domain/mcp/bundled-server.d.ts +0 -19
- package/dist/domain/mcp/feishu/client.d.ts +0 -46
- package/dist/domain/mcp/feishu/client.js +0 -91
- package/dist/domain/mcp/feishu/file.d.ts +0 -14
- package/dist/domain/mcp/feishu/file.js +0 -88
- package/dist/domain/mcp/feishu/types.d.ts +0 -31
- package/dist/domain/mcp/feishu/types.js +0 -34
- package/dist/domain/mcp/feishu/user-auth.d.ts +0 -140
- package/dist/domain/mcp/feishu/user-auth.js +0 -278
- package/dist/domain/mcp/tools/agents-md.d.ts +0 -16
- package/dist/domain/mcp/tools/agents-md.js +0 -34
- package/dist/domain/mcp/tools/catalog-owner.d.ts +0 -3
- package/dist/domain/mcp/tools/catalog-owner.js +0 -23
- package/dist/domain/mcp/tools/context.d.ts +0 -69
- package/dist/domain/mcp/tools/context.js +0 -106
- package/dist/domain/mcp/tools/cost.d.ts +0 -2
- package/dist/domain/mcp/tools/cost.js +0 -56
- package/dist/domain/mcp/tools/executions.d.ts +0 -2
- package/dist/domain/mcp/tools/executions.js +0 -71
- package/dist/domain/mcp/tools/interaction-ask.d.ts +0 -37
- package/dist/domain/mcp/tools/interaction-ask.js +0 -131
- package/dist/domain/mcp/tools/interaction-plan.d.ts +0 -34
- package/dist/domain/mcp/tools/interaction-plan.js +0 -116
- package/dist/domain/mcp/tools/remote-devices.d.ts +0 -9
- package/dist/domain/mcp/tools/remote-devices.js +0 -28
- package/dist/domain/mcp/tools/remote-file.d.ts +0 -24
- package/dist/domain/mcp/tools/remote-file.js +0 -52
- package/dist/domain/mcp/tools/remote-ops.d.ts +0 -3
- package/dist/domain/mcp/tools/remote-ops.js +0 -359
- package/dist/domain/mcp/tools/slack.d.ts +0 -23
- package/dist/domain/mcp/tools/slack.js +0 -106
- package/dist/domain/mcp/tools/subagent.d.ts +0 -23
- package/dist/domain/mcp/tools/subagent.js +0 -179
- package/dist/domain/mcp/tools/time.d.ts +0 -2
- package/dist/domain/mcp/tools/time.js +0 -62
- package/dist/domain/mcp/tools/ui-board.d.ts +0 -12
- package/dist/domain/mcp/tools/ui-board.js +0 -48
- package/dist/domain/mcp/tools/ui-decision.d.ts +0 -3
- package/dist/domain/mcp/tools/ui-decision.js +0 -37
- package/dist/domain/mcp/tools/ui-file.d.ts +0 -3
- package/dist/domain/mcp/tools/ui-file.js +0 -70
- package/dist/domain/mcp/tools/ui-view.d.ts +0 -3
- package/dist/domain/mcp/tools/ui-view.js +0 -44
- package/dist/domain/mcp/tools/waitpoint.d.ts +0 -28
- package/dist/domain/mcp/tools/waitpoint.js +0 -109
- package/dist/domain/mcp/tools/workers.d.ts +0 -5
- package/dist/domain/mcp/tools/workers.js +0 -77
- package/dist/domain/memory/agents-md-injector.d.ts +0 -25
- package/dist/domain/memory/agents-md-injector.js +0 -58
- package/dist/domain/memory/consolidate.d.ts +0 -56
- package/dist/domain/memory/consolidate.js +0 -419
- package/dist/domain/memory/index-regen.d.ts +0 -30
- package/dist/domain/memory/index-regen.js +0 -334
- package/dist/domain/memory/rules-loader.d.ts +0 -6
- package/dist/domain/memory/rules-loader.js +0 -13
- package/dist/domain/memory/user-context.d.ts +0 -5
- package/dist/domain/memory/user-context.js +0 -32
- package/dist/domain/memory/watcher.d.ts +0 -8
- package/dist/domain/memory/watcher.js +0 -135
- package/dist/domain/monitor/disk-monitor.d.ts +0 -17
- package/dist/domain/monitor/disk-monitor.js +0 -117
- package/dist/domain/monitor/event-loop-monitor.d.ts +0 -35
- package/dist/domain/monitor/event-loop-monitor.js +0 -64
- package/dist/domain/monitor/gpu-monitor.d.ts +0 -26
- package/dist/domain/monitor/gpu-monitor.js +0 -132
- package/dist/domain/pi-providers/custom-provider-model.d.ts +0 -49
- package/dist/domain/pi-providers/custom-provider-model.js +0 -116
- package/dist/domain/pi-providers/custom-provider-service.d.ts +0 -57
- package/dist/domain/pi-providers/custom-provider-service.js +0 -153
- package/dist/domain/pi-providers/gateway-route-store.d.ts +0 -23
- package/dist/domain/pi-providers/gateway-route-store.js +0 -74
- package/dist/domain/pi-providers/index.d.ts +0 -3
- package/dist/domain/pi-providers/index.js +0 -3
- package/dist/domain/pi-providers/models-json-store.d.ts +0 -6
- package/dist/domain/pi-providers/models-json-store.js +0 -73
- package/dist/domain/plugins/agent-plugins-v1.d.ts +0 -58
- package/dist/domain/plugins/agent-plugins-v1.js +0 -84
- package/dist/domain/plugins/authoring.d.ts +0 -46
- package/dist/domain/plugins/authoring.js +0 -335
- package/dist/domain/plugins/builtin.d.ts +0 -25
- package/dist/domain/plugins/builtin.js +0 -44
- package/dist/domain/plugins/catalog-types.d.ts +0 -89
- package/dist/domain/plugins/catalog-types.js +0 -39
- package/dist/domain/plugins/catalog.d.ts +0 -39
- package/dist/domain/plugins/catalog.js +0 -482
- package/dist/domain/plugins/conversation-skills.d.ts +0 -10
- package/dist/domain/plugins/conversation-skills.js +0 -22
- package/dist/domain/plugins/fs-helpers.d.ts +0 -9
- package/dist/domain/plugins/fs-helpers.js +0 -107
- package/dist/domain/plugins/mcp.d.ts +0 -6
- package/dist/domain/plugins/mcp.js +0 -223
- package/dist/domain/plugins/runtime-gc.d.ts +0 -17
- package/dist/domain/plugins/runtime-gc.js +0 -101
- package/dist/domain/plugins/runtime.d.ts +0 -21
- package/dist/domain/plugins/runtime.js +0 -555
- package/dist/domain/plugins/skill-projection.d.ts +0 -19
- package/dist/domain/plugins/skill-projection.js +0 -193
- package/dist/domain/plugins/skill.d.ts +0 -14
- package/dist/domain/plugins/skill.js +0 -145
- package/dist/domain/projects/index.d.ts +0 -3
- package/dist/domain/projects/index.js +0 -3
- package/dist/domain/projects/project-store.d.ts +0 -72
- package/dist/domain/projects/project-store.js +0 -240
- package/dist/domain/projects/project-types.d.ts +0 -11
- package/dist/domain/projects/project-types.js +0 -1
- package/dist/domain/remote/client-bootstrap.d.ts +0 -1
- package/dist/domain/remote/client-bootstrap.js +0 -126
- package/dist/domain/remote/client-hot-reload.d.ts +0 -40
- package/dist/domain/remote/client-hot-reload.js +0 -269
- package/dist/domain/remote/client-lifecycle.d.ts +0 -32
- package/dist/domain/remote/client-lifecycle.js +0 -382
- package/dist/domain/remote/client-manager.d.ts +0 -54
- package/dist/domain/remote/client-manager.js +0 -325
- package/dist/domain/remote/client-pids.d.ts +0 -13
- package/dist/domain/remote/client-pids.js +0 -43
- package/dist/domain/remote/client-protocol.d.ts +0 -1
- package/dist/domain/remote/client-protocol.js +0 -1
- package/dist/domain/remote/client-remove.d.ts +0 -61
- package/dist/domain/remote/client-remove.js +0 -129
- package/dist/domain/remote/client-ssh-tunnel.d.ts +0 -79
- package/dist/domain/remote/client-ssh-tunnel.js +0 -352
- package/dist/domain/remote/device-browser.d.ts +0 -38
- package/dist/domain/remote/device-browser.js +0 -158
- package/dist/domain/remote/device-chrome-commands.d.ts +0 -18
- package/dist/domain/remote/device-chrome-commands.js +0 -125
- package/dist/domain/remote/device-file.d.ts +0 -51
- package/dist/domain/remote/device-file.js +0 -193
- package/dist/domain/remote/device-port.d.ts +0 -23
- package/dist/domain/remote/device-port.js +0 -192
- package/dist/domain/remote/local-client-install.d.ts +0 -32
- package/dist/domain/remote/local-client-install.js +0 -168
- package/dist/domain/remote/local-client-stop.d.ts +0 -37
- package/dist/domain/remote/local-client-stop.js +0 -101
- package/dist/domain/remote/machine-registry.d.ts +0 -54
- package/dist/domain/remote/machine-registry.js +0 -184
- package/dist/domain/remote/owned-local-launch.d.ts +0 -22
- package/dist/domain/remote/owned-local-launch.js +0 -75
- package/dist/domain/remote/package-client-bundle.d.ts +0 -14
- package/dist/domain/remote/package-client-bundle.js +0 -37
- package/dist/domain/remote/reverse-stream.d.ts +0 -42
- package/dist/domain/remote/reverse-stream.js +0 -95
- package/dist/domain/remote/ssh-exec.d.ts +0 -10
- package/dist/domain/remote/ssh-exec.js +0 -25
- package/dist/domain/runs/adapters.d.ts +0 -15
- package/dist/domain/runs/adapters.js +0 -59
- package/dist/domain/runs/attempt.d.ts +0 -37
- package/dist/domain/runs/attempt.js +0 -232
- package/dist/domain/runs/builders.d.ts +0 -27
- package/dist/domain/runs/builders.js +0 -47
- package/dist/domain/runs/compact.d.ts +0 -30
- package/dist/domain/runs/compact.js +0 -43
- package/dist/domain/runs/config-resolver.d.ts +0 -26
- package/dist/domain/runs/config-resolver.js +0 -38
- package/dist/domain/runs/engine-spec.d.ts +0 -40
- package/dist/domain/runs/engine-spec.js +0 -215
- package/dist/domain/runs/engines.d.ts +0 -71
- package/dist/domain/runs/engines.js +0 -181
- package/dist/domain/runs/events.d.ts +0 -2
- package/dist/domain/runs/events.js +0 -1
- package/dist/domain/runs/fallback.d.ts +0 -11
- package/dist/domain/runs/fallback.js +0 -18
- package/dist/domain/runs/mode-env.d.ts +0 -16
- package/dist/domain/runs/mode-env.js +0 -48
- package/dist/domain/runs/notices.d.ts +0 -44
- package/dist/domain/runs/notices.js +0 -109
- package/dist/domain/runs/observers/resume-recorder.d.ts +0 -26
- package/dist/domain/runs/observers/resume-recorder.js +0 -27
- package/dist/domain/runs/prompt.d.ts +0 -78
- package/dist/domain/runs/prompt.js +0 -98
- package/dist/domain/runs/request.d.ts +0 -99
- package/dist/domain/runs/request.js +0 -1
- package/dist/domain/runs/retryable-errors.d.ts +0 -5
- package/dist/domain/runs/retryable-errors.js +0 -24
- package/dist/domain/runs/run.d.ts +0 -238
- package/dist/domain/runs/run.js +0 -574
- package/dist/domain/runs/service.d.ts +0 -3
- package/dist/domain/runs/service.js +0 -63
- package/dist/domain/runs/spec-loader.d.ts +0 -75
- package/dist/domain/runs/spec-loader.js +0 -58
- package/dist/domain/runs/spend.d.ts +0 -16
- package/dist/domain/runs/spend.js +0 -31
- package/dist/domain/scheduling/builtin-job-controller.d.ts +0 -21
- package/dist/domain/scheduling/builtin-job-controller.js +0 -106
- package/dist/domain/scheduling/builtin-job-migration.d.ts +0 -23
- package/dist/domain/scheduling/builtin-job-migration.js +0 -64
- package/dist/domain/scheduling/builtin-jobs.d.ts +0 -2
- package/dist/domain/scheduling/builtin-jobs.js +0 -44
- package/dist/domain/scheduling/job-registry.d.ts +0 -22
- package/dist/domain/scheduling/job-registry.js +0 -16
- package/dist/domain/scheduling/jobs/auth-expiry-scan.d.ts +0 -15
- package/dist/domain/scheduling/jobs/auth-expiry-scan.js +0 -75
- package/dist/domain/scheduling/jobs/scheduled-task.d.ts +0 -24
- package/dist/domain/scheduling/jobs/scheduled-task.js +0 -112
- package/dist/domain/scheduling/jobs/sync-public.d.ts +0 -4
- package/dist/domain/scheduling/jobs/sync-public.js +0 -40
- package/dist/domain/scheduling/run-guards.d.ts +0 -6
- package/dist/domain/scheduling/run-guards.js +0 -18
- package/dist/domain/scheduling/runner.d.ts +0 -17
- package/dist/domain/scheduling/runner.js +0 -22
- package/dist/domain/scheduling/schedule-ops.d.ts +0 -15
- package/dist/domain/scheduling/schedule-ops.js +0 -43
- package/dist/domain/scheduling/schedule-selection.d.ts +0 -3
- package/dist/domain/scheduling/schedule-selection.js +0 -16
- package/dist/domain/scheduling/schedule-spec.d.ts +0 -79
- package/dist/domain/scheduling/schedule-spec.js +0 -169
- package/dist/domain/scheduling/scheduler.d.ts +0 -75
- package/dist/domain/scheduling/scheduler.js +0 -312
- package/dist/domain/sessions/session-backup.d.ts +0 -44
- package/dist/domain/sessions/session-backup.js +0 -138
- package/dist/domain/sessions/session-hooks.d.ts +0 -130
- package/dist/domain/sessions/session-hooks.js +0 -347
- package/dist/domain/sessions/session-lifecycle.d.ts +0 -91
- package/dist/domain/sessions/session-lifecycle.js +0 -82
- package/dist/domain/sessions/session-retention.d.ts +0 -50
- package/dist/domain/sessions/session-retention.js +0 -466
- package/dist/domain/sessions/session-use.d.ts +0 -28
- package/dist/domain/sessions/session-use.js +0 -45
- package/dist/domain/sessions/session.d.ts +0 -3
- package/dist/domain/sessions/session.js +0 -13
- package/dist/domain/sessions/team.d.ts +0 -26
- package/dist/domain/sessions/team.js +0 -30
- package/dist/domain/system/doctor.d.ts +0 -82
- package/dist/domain/system/doctor.js +0 -484
- package/dist/domain/system/github-release.d.ts +0 -16
- package/dist/domain/system/github-release.js +0 -101
- package/dist/domain/system/install-cli.d.ts +0 -7
- package/dist/domain/system/install-cli.js +0 -107
- package/dist/domain/system/notice-history.d.ts +0 -18
- package/dist/domain/system/notice-history.js +0 -23
- package/dist/domain/system/own-bin-path.d.ts +0 -13
- package/dist/domain/system/own-bin-path.js +0 -36
- package/dist/domain/system/preferences.d.ts +0 -30
- package/dist/domain/system/preferences.js +0 -59
- package/dist/domain/system/rebuild-hold.d.ts +0 -36
- package/dist/domain/system/rebuild-hold.js +0 -83
- package/dist/domain/system/server-update-check.d.ts +0 -24
- package/dist/domain/system/server-update-check.js +0 -89
- package/dist/domain/system/server-update-coordinator.d.ts +0 -46
- package/dist/domain/system/server-update-coordinator.js +0 -155
- package/dist/domain/system/server-update-install.d.ts +0 -16
- package/dist/domain/system/server-update-install.js +0 -65
- package/dist/domain/system/system-notice.d.ts +0 -24
- package/dist/domain/system/system-notice.js +0 -31
- package/dist/domain/system/terminal-cli/index.d.ts +0 -58
- package/dist/domain/system/terminal-cli/index.js +0 -100
- package/dist/domain/system/terminal-cli/posix-profiles.d.ts +0 -23
- package/dist/domain/system/terminal-cli/posix-profiles.js +0 -74
- package/dist/domain/system/terminal-cli/registrar.d.ts +0 -12
- package/dist/domain/system/terminal-cli/registrar.js +0 -1
- package/dist/domain/system/terminal-cli/shims.d.ts +0 -27
- package/dist/domain/system/terminal-cli/shims.js +0 -108
- package/dist/domain/system/terminal-cli/state.d.ts +0 -7
- package/dist/domain/system/terminal-cli/state.js +0 -36
- package/dist/domain/system/terminal-cli/windows-user-path.d.ts +0 -13
- package/dist/domain/system/terminal-cli/windows-user-path.js +0 -67
- package/dist/domain/system/update-prompt.d.ts +0 -8
- package/dist/domain/system/update-prompt.js +0 -1
- package/dist/domain/system/update-state.d.ts +0 -9
- package/dist/domain/system/update-state.js +0 -22
- package/dist/domain/system/update-ui-state.d.ts +0 -39
- package/dist/domain/system/update-ui-state.js +0 -70
- package/dist/domain/telemetry/bus-collector.d.ts +0 -3
- package/dist/domain/telemetry/bus-collector.js +0 -22
- package/dist/domain/telemetry/child-exit.d.ts +0 -11
- package/dist/domain/telemetry/child-exit.js +0 -36
- package/dist/domain/telemetry/client-kind.d.ts +0 -4
- package/dist/domain/telemetry/client-kind.js +0 -7
- package/dist/domain/telemetry/crash-limits.d.ts +0 -15
- package/dist/domain/telemetry/crash-limits.js +0 -50
- package/dist/domain/telemetry/crash.d.ts +0 -25
- package/dist/domain/telemetry/crash.js +0 -70
- package/dist/domain/telemetry/daily-upload.d.ts +0 -5
- package/dist/domain/telemetry/daily-upload.js +0 -20
- package/dist/domain/telemetry/daily.d.ts +0 -5
- package/dist/domain/telemetry/daily.js +0 -104
- package/dist/domain/telemetry/endpoint.d.ts +0 -7
- package/dist/domain/telemetry/endpoint.js +0 -40
- package/dist/domain/telemetry/envelope.d.ts +0 -6
- package/dist/domain/telemetry/envelope.js +0 -35
- package/dist/domain/telemetry/error-digest.d.ts +0 -7
- package/dist/domain/telemetry/error-digest.js +0 -43
- package/dist/domain/telemetry/funnel.d.ts +0 -6
- package/dist/domain/telemetry/funnel.js +0 -22
- package/dist/domain/telemetry/gate.d.ts +0 -19
- package/dist/domain/telemetry/gate.js +0 -67
- package/dist/domain/telemetry/heartbeat.d.ts +0 -17
- package/dist/domain/telemetry/heartbeat.js +0 -49
- package/dist/domain/telemetry/info.d.ts +0 -9
- package/dist/domain/telemetry/info.js +0 -12
- package/dist/domain/telemetry/init-answer.d.ts +0 -12
- package/dist/domain/telemetry/init-answer.js +0 -42
- package/dist/domain/telemetry/install-id.d.ts +0 -5
- package/dist/domain/telemetry/install-id.js +0 -42
- package/dist/domain/telemetry/normalize.d.ts +0 -33
- package/dist/domain/telemetry/normalize.js +0 -88
- package/dist/domain/telemetry/outbox.d.ts +0 -18
- package/dist/domain/telemetry/outbox.js +0 -93
- package/dist/domain/telemetry/panic-group.d.ts +0 -4
- package/dist/domain/telemetry/panic-group.js +0 -51
- package/dist/domain/telemetry/paths.d.ts +0 -7
- package/dist/domain/telemetry/paths.js +0 -11
- package/dist/domain/telemetry/redact.d.ts +0 -18
- package/dist/domain/telemetry/redact.js +0 -109
- package/dist/domain/telemetry/rollup-types.d.ts +0 -81
- package/dist/domain/telemetry/rollup-types.js +0 -31
- package/dist/domain/telemetry/rollup.d.ts +0 -16
- package/dist/domain/telemetry/rollup.js +0 -102
- package/dist/domain/telemetry/schema.d.ts +0 -931
- package/dist/domain/telemetry/schema.js +0 -275
- package/dist/domain/telemetry/service.d.ts +0 -34
- package/dist/domain/telemetry/service.js +0 -146
- package/dist/domain/telemetry/state.d.ts +0 -17
- package/dist/domain/telemetry/state.js +0 -29
- package/dist/domain/telemetry/turns.d.ts +0 -17
- package/dist/domain/telemetry/turns.js +0 -176
- package/dist/domain/telemetry/upgrade.d.ts +0 -14
- package/dist/domain/telemetry/upgrade.js +0 -87
- package/dist/domain/telemetry/uploader.d.ts +0 -21
- package/dist/domain/telemetry/uploader.js +0 -82
- package/dist/domain/telemetry/usage.d.ts +0 -25
- package/dist/domain/telemetry/usage.js +0 -153
- package/dist/domain/telemetry/web-report.d.ts +0 -8
- package/dist/domain/telemetry/web-report.js +0 -15
- package/dist/domain/tui-session/index.d.ts +0 -2
- package/dist/domain/tui-session/index.js +0 -1
- package/dist/domain/tui-session/tui-session-service.d.ts +0 -2
- package/dist/domain/tui-session/tui-session-service.js +0 -85
- package/dist/domain/tui-session/types.d.ts +0 -40
- package/dist/domain/tui-session/types.js +0 -1
- package/dist/domain/ui-service/app-router.d.ts +0 -1180
- package/dist/domain/ui-service/app-router.js +0 -312
- package/dist/domain/ui-service/assistant-snapshots.d.ts +0 -10
- package/dist/domain/ui-service/assistant-snapshots.js +0 -45
- package/dist/domain/ui-service/contract.parity.d.ts +0 -19
- package/dist/domain/ui-service/contract.parity.js +0 -1
- package/dist/domain/ui-service/index.d.ts +0 -4
- package/dist/domain/ui-service/index.js +0 -1
- package/dist/domain/ui-service/inline-media-types.d.ts +0 -18
- package/dist/domain/ui-service/inline-media-types.js +0 -1
- package/dist/domain/ui-service/input-schemas.d.ts +0 -1132
- package/dist/domain/ui-service/input-schemas.js +0 -710
- package/dist/domain/ui-service/mutate/approvals.d.ts +0 -33
- package/dist/domain/ui-service/mutate/approvals.js +0 -134
- package/dist/domain/ui-service/mutate/auth.d.ts +0 -15
- package/dist/domain/ui-service/mutate/auth.js +0 -103
- package/dist/domain/ui-service/mutate/config.d.ts +0 -18
- package/dist/domain/ui-service/mutate/config.js +0 -108
- package/dist/domain/ui-service/mutate/custom-providers.d.ts +0 -8
- package/dist/domain/ui-service/mutate/custom-providers.js +0 -33
- package/dist/domain/ui-service/mutate/environments.d.ts +0 -27
- package/dist/domain/ui-service/mutate/environments.js +0 -66
- package/dist/domain/ui-service/mutate/errors.d.ts +0 -7
- package/dist/domain/ui-service/mutate/errors.js +0 -14
- package/dist/domain/ui-service/mutate/executions.d.ts +0 -4
- package/dist/domain/ui-service/mutate/executions.js +0 -15
- package/dist/domain/ui-service/mutate/hooks.d.ts +0 -12
- package/dist/domain/ui-service/mutate/hooks.js +0 -110
- package/dist/domain/ui-service/mutate/issues.d.ts +0 -18
- package/dist/domain/ui-service/mutate/issues.js +0 -100
- package/dist/domain/ui-service/mutate/models.d.ts +0 -13
- package/dist/domain/ui-service/mutate/models.js +0 -137
- package/dist/domain/ui-service/mutate/notes.d.ts +0 -6
- package/dist/domain/ui-service/mutate/notes.js +0 -32
- package/dist/domain/ui-service/mutate/platform-settings.d.ts +0 -6
- package/dist/domain/ui-service/mutate/platform-settings.js +0 -17
- package/dist/domain/ui-service/mutate/plugin-packages.d.ts +0 -10
- package/dist/domain/ui-service/mutate/plugin-packages.js +0 -152
- package/dist/domain/ui-service/mutate/plugins.d.ts +0 -2
- package/dist/domain/ui-service/mutate/plugins.js +0 -38
- package/dist/domain/ui-service/mutate/projects.d.ts +0 -4
- package/dist/domain/ui-service/mutate/projects.js +0 -7
- package/dist/domain/ui-service/mutate/resolve-media.d.ts +0 -4
- package/dist/domain/ui-service/mutate/resolve-media.js +0 -17
- package/dist/domain/ui-service/mutate/schedules.d.ts +0 -12
- package/dist/domain/ui-service/mutate/schedules.js +0 -75
- package/dist/domain/ui-service/mutate/session-metadata.d.ts +0 -3
- package/dist/domain/ui-service/mutate/session-metadata.js +0 -22
- package/dist/domain/ui-service/mutate/sessions.d.ts +0 -19
- package/dist/domain/ui-service/mutate/sessions.js +0 -307
- package/dist/domain/ui-service/mutate/system.d.ts +0 -10
- package/dist/domain/ui-service/mutate/system.js +0 -120
- package/dist/domain/ui-service/mutate/telemetry.d.ts +0 -5
- package/dist/domain/ui-service/mutate/telemetry.js +0 -6
- package/dist/domain/ui-service/mutate/usage-sharing.d.ts +0 -8
- package/dist/domain/ui-service/mutate/usage-sharing.js +0 -16
- package/dist/domain/ui-service/mutate/waitpoints.d.ts +0 -2
- package/dist/domain/ui-service/mutate/waitpoints.js +0 -13
- package/dist/domain/ui-service/platform-settings.d.ts +0 -5
- package/dist/domain/ui-service/platform-settings.js +0 -72
- package/dist/domain/ui-service/plugins-shared.d.ts +0 -29
- package/dist/domain/ui-service/plugins-shared.js +0 -176
- package/dist/domain/ui-service/query/approvals.d.ts +0 -10
- package/dist/domain/ui-service/query/approvals.js +0 -119
- package/dist/domain/ui-service/query/auth.d.ts +0 -6
- package/dist/domain/ui-service/query/auth.js +0 -8
- package/dist/domain/ui-service/query/boards.d.ts +0 -14
- package/dist/domain/ui-service/query/boards.js +0 -111
- package/dist/domain/ui-service/query/config.d.ts +0 -9
- package/dist/domain/ui-service/query/config.js +0 -167
- package/dist/domain/ui-service/query/cost.d.ts +0 -3
- package/dist/domain/ui-service/query/cost.js +0 -3
- package/dist/domain/ui-service/query/custom-providers.d.ts +0 -8
- package/dist/domain/ui-service/query/custom-providers.js +0 -9
- package/dist/domain/ui-service/query/environments.d.ts +0 -12
- package/dist/domain/ui-service/query/environments.js +0 -73
- package/dist/domain/ui-service/query/executions.d.ts +0 -3
- package/dist/domain/ui-service/query/executions.js +0 -61
- package/dist/domain/ui-service/query/hooks.d.ts +0 -9
- package/dist/domain/ui-service/query/hooks.js +0 -92
- package/dist/domain/ui-service/query/issues.d.ts +0 -14
- package/dist/domain/ui-service/query/issues.js +0 -78
- package/dist/domain/ui-service/query/machine-detail.d.ts +0 -2
- package/dist/domain/ui-service/query/machine-detail.js +0 -30
- package/dist/domain/ui-service/query/machine-probe.d.ts +0 -18
- package/dist/domain/ui-service/query/machine-probe.js +0 -133
- package/dist/domain/ui-service/query/machines.d.ts +0 -2
- package/dist/domain/ui-service/query/machines.js +0 -21
- package/dist/domain/ui-service/query/memory.d.ts +0 -7
- package/dist/domain/ui-service/query/memory.js +0 -191
- package/dist/domain/ui-service/query/models.d.ts +0 -27
- package/dist/domain/ui-service/query/models.js +0 -125
- package/dist/domain/ui-service/query/notes.d.ts +0 -3
- package/dist/domain/ui-service/query/notes.js +0 -15
- package/dist/domain/ui-service/query/plugin-source.d.ts +0 -4
- package/dist/domain/ui-service/query/plugin-source.js +0 -58
- package/dist/domain/ui-service/query/plugins.d.ts +0 -2
- package/dist/domain/ui-service/query/plugins.js +0 -28
- package/dist/domain/ui-service/query/projects.d.ts +0 -2
- package/dist/domain/ui-service/query/projects.js +0 -27
- package/dist/domain/ui-service/query/schedules.d.ts +0 -5
- package/dist/domain/ui-service/query/schedules.js +0 -28
- package/dist/domain/ui-service/query/sessions.d.ts +0 -6
- package/dist/domain/ui-service/query/sessions.js +0 -430
- package/dist/domain/ui-service/query/skills.d.ts +0 -5
- package/dist/domain/ui-service/query/skills.js +0 -16
- package/dist/domain/ui-service/query/system.d.ts +0 -6
- package/dist/domain/ui-service/query/system.js +0 -120
- package/dist/domain/ui-service/query/telemetry.d.ts +0 -3
- package/dist/domain/ui-service/query/telemetry.js +0 -4
- package/dist/domain/ui-service/query/usage-sharing.d.ts +0 -4
- package/dist/domain/ui-service/query/usage-sharing.js +0 -5
- package/dist/domain/ui-service/query/waitpoints.d.ts +0 -10
- package/dist/domain/ui-service/query/waitpoints.js +0 -37
- package/dist/domain/ui-service/query-input-schemas.d.ts +0 -73
- package/dist/domain/ui-service/query-input-schemas.js +0 -70
- package/dist/domain/ui-service/session-metadata-schemas.d.ts +0 -13
- package/dist/domain/ui-service/session-metadata-schemas.js +0 -9
- package/dist/domain/ui-service/subscribe.d.ts +0 -6
- package/dist/domain/ui-service/subscribe.js +0 -125
- package/dist/domain/ui-service/trpc.d.ts +0 -52
- package/dist/domain/ui-service/trpc.js +0 -43
- package/dist/domain/ui-service/types.d.ts +0 -1808
- package/dist/domain/ui-service/types.js +0 -1
- package/dist/domain/ui-service/ui-service.d.ts +0 -541
- package/dist/domain/ui-service/ui-service.js +0 -235
- package/dist/domain/waitpoints/notices.d.ts +0 -25
- package/dist/domain/waitpoints/notices.js +0 -125
- package/dist/domain/waitpoints/service.d.ts +0 -107
- package/dist/domain/waitpoints/service.js +0 -276
- package/dist/domain/waitpoints/view.d.ts +0 -29
- package/dist/domain/waitpoints/view.js +0 -97
- package/dist/entry/admin-channel-hot-reload.d.ts +0 -4
- package/dist/entry/admin-channel-hot-reload.js +0 -17
- package/dist/entry/app.d.ts +0 -1
- package/dist/entry/auth-cli.d.ts +0 -9
- package/dist/entry/auth-cli.js +0 -55
- package/dist/entry/auth-login-cli.d.ts +0 -20
- package/dist/entry/auth-login-cli.js +0 -153
- package/dist/entry/auth-login-terminal.d.ts +0 -16
- package/dist/entry/auth-login-terminal.js +0 -59
- package/dist/entry/boot-jobs.d.ts +0 -7
- package/dist/entry/boot-jobs.js +0 -16
- package/dist/entry/browser-cli.d.ts +0 -39
- package/dist/entry/cli-help.d.ts +0 -10
- package/dist/entry/cli-help.js +0 -290
- package/dist/entry/cli.d.ts +0 -19
- package/dist/entry/client-cli.d.ts +0 -4
- package/dist/entry/client-cli.js +0 -62
- package/dist/entry/cortex-cli.d.ts +0 -1
- package/dist/entry/daemon-notice.d.ts +0 -26
- package/dist/entry/daemon-notice.js +0 -38
- package/dist/entry/daemon.d.ts +0 -120
- package/dist/entry/doctor-cli.d.ts +0 -8
- package/dist/entry/doctor-cli.js +0 -70
- package/dist/entry/draft-attachments.d.ts +0 -8
- package/dist/entry/draft-attachments.js +0 -79
- package/dist/entry/fast-install.d.ts +0 -49
- package/dist/entry/fast-install.js +0 -192
- package/dist/entry/feishu-login.d.ts +0 -21
- package/dist/entry/feishu-login.js +0 -209
- package/dist/entry/hook-cli.d.ts +0 -14
- package/dist/entry/init-auth.d.ts +0 -4
- package/dist/entry/init-auth.js +0 -42
- package/dist/entry/init-git.d.ts +0 -6
- package/dist/entry/init-git.js +0 -36
- package/dist/entry/init-local-client.d.ts +0 -11
- package/dist/entry/init-local-client.js +0 -34
- package/dist/entry/init.d.ts +0 -151
- package/dist/entry/init.js +0 -1292
- package/dist/entry/local-ui.d.ts +0 -38
- package/dist/entry/local-ui.js +0 -107
- package/dist/entry/memory-cli.d.ts +0 -3
- package/dist/entry/memory-cli.js +0 -79
- package/dist/entry/path-cli.d.ts +0 -4
- package/dist/entry/path-cli.js +0 -65
- package/dist/entry/platform-connect.d.ts +0 -23
- package/dist/entry/platform-connect.js +0 -94
- package/dist/entry/production-app-bootstrap.d.ts +0 -1
- package/dist/entry/production-evidence-export-cli.d.ts +0 -13
- package/dist/entry/provider-cli.d.ts +0 -12
- package/dist/entry/provider-cli.js +0 -199
- package/dist/entry/schedule-cli.d.ts +0 -10
- package/dist/entry/schedule-cli.js +0 -166
- package/dist/entry/shutdown.d.ts +0 -32
- package/dist/entry/shutdown.js +0 -84
- package/dist/entry/signal-cli.d.ts +0 -25
- package/dist/entry/start-ui-http.d.ts +0 -24
- package/dist/entry/start-ui-http.js +0 -188
- package/dist/entry/startup-helpers.d.ts +0 -2
- package/dist/entry/startup-helpers.js +0 -15
- package/dist/entry/startup-notify.d.ts +0 -6
- package/dist/entry/startup-notify.js +0 -18
- package/dist/entry/telemetry-wiring.d.ts +0 -12
- package/dist/entry/telemetry-wiring.js +0 -56
- package/dist/entry/ui-cli.d.ts +0 -2
- package/dist/entry/ui-cli.js +0 -87
- package/dist/entry/ui-http-gate.d.ts +0 -17
- package/dist/entry/ui-http-gate.js +0 -17
- package/dist/entry/ui-service-wiring.d.ts +0 -12
- package/dist/entry/ui-service-wiring.js +0 -144
- package/dist/events/event-bus.d.ts +0 -47
- package/dist/events/event-bus.js +0 -83
- package/dist/events/event-logger.d.ts +0 -12
- package/dist/events/event-logger.js +0 -144
- package/dist/events/event-types.d.ts +0 -259
- package/dist/events/event-types.js +0 -1
- package/dist/events/index.d.ts +0 -5
- package/dist/events/index.js +0 -2
- package/dist/orchestration/agent-decision-send.d.ts +0 -42
- package/dist/orchestration/agent-decision-send.js +0 -62
- package/dist/orchestration/agent-file-send.d.ts +0 -58
- package/dist/orchestration/agent-file-send.js +0 -69
- package/dist/orchestration/agent-runner.d.ts +0 -52
- package/dist/orchestration/agent-runner.js +0 -230
- package/dist/orchestration/agent-view-send.d.ts +0 -66
- package/dist/orchestration/agent-view-send.js +0 -103
- package/dist/orchestration/attachments-store.d.ts +0 -31
- package/dist/orchestration/attachments-store.js +0 -156
- package/dist/orchestration/benchmark-session-webhook.d.ts +0 -19
- package/dist/orchestration/benchmark-session-webhook.js +0 -142
- package/dist/orchestration/board-webhook.d.ts +0 -7
- package/dist/orchestration/board-webhook.js +0 -38
- package/dist/orchestration/browser-webhook.d.ts +0 -11
- package/dist/orchestration/browser-webhook.js +0 -28
- package/dist/orchestration/busy-tracker.d.ts +0 -15
- package/dist/orchestration/busy-tracker.js +0 -38
- package/dist/orchestration/cache-keep-warm.d.ts +0 -77
- package/dist/orchestration/cache-keep-warm.js +0 -213
- package/dist/orchestration/claude-window-warmup.d.ts +0 -40
- package/dist/orchestration/claude-window-warmup.js +0 -126
- package/dist/orchestration/conduit-queue.d.ts +0 -14
- package/dist/orchestration/conduit-queue.js +0 -53
- package/dist/orchestration/conversation-request.d.ts +0 -163
- package/dist/orchestration/conversation-request.js +0 -276
- package/dist/orchestration/delta-coalescer.d.ts +0 -69
- package/dist/orchestration/delta-coalescer.js +0 -120
- package/dist/orchestration/durable-helpers.d.ts +0 -3
- package/dist/orchestration/durable-helpers.js +0 -38
- package/dist/orchestration/edit-retry.d.ts +0 -35
- package/dist/orchestration/edit-retry.js +0 -127
- package/dist/orchestration/injection-ledger.d.ts +0 -56
- package/dist/orchestration/injection-ledger.js +0 -270
- package/dist/orchestration/inline-media-eager.d.ts +0 -13
- package/dist/orchestration/inline-media-eager.js +0 -58
- package/dist/orchestration/inline-media.d.ts +0 -22
- package/dist/orchestration/inline-media.js +0 -151
- package/dist/orchestration/interactions/answer-question.d.ts +0 -16
- package/dist/orchestration/interactions/answer-question.js +0 -38
- package/dist/orchestration/interactions/ask-user-question.d.ts +0 -34
- package/dist/orchestration/interactions/ask-user-question.js +0 -179
- package/dist/orchestration/interactions/ask-user-resume.d.ts +0 -11
- package/dist/orchestration/interactions/ask-user-resume.js +0 -57
- package/dist/orchestration/interactions/command-action-router.d.ts +0 -31
- package/dist/orchestration/interactions/command-action-router.js +0 -48
- package/dist/orchestration/interactions/interaction-handlers.d.ts +0 -5
- package/dist/orchestration/interactions/interaction-handlers.js +0 -288
- package/dist/orchestration/interactions/interaction-records.d.ts +0 -57
- package/dist/orchestration/interactions/interaction-records.js +0 -142
- package/dist/orchestration/interactions/plan-approvals.d.ts +0 -38
- package/dist/orchestration/interactions/plan-approvals.js +0 -73
- package/dist/orchestration/interactions/plan-handler.d.ts +0 -3
- package/dist/orchestration/interactions/plan-handler.js +0 -13
- package/dist/orchestration/interactions/plan-response.d.ts +0 -9
- package/dist/orchestration/interactions/plan-response.js +0 -23
- package/dist/orchestration/interactions/ui-update-prompt.d.ts +0 -8
- package/dist/orchestration/interactions/ui-update-prompt.js +0 -39
- package/dist/orchestration/interactions/update-prompt.d.ts +0 -6
- package/dist/orchestration/interactions/update-prompt.js +0 -150
- package/dist/orchestration/mid-turn-inject.d.ts +0 -64
- package/dist/orchestration/mid-turn-inject.js +0 -103
- package/dist/orchestration/orchestrator.d.ts +0 -23
- package/dist/orchestration/orchestrator.js +0 -12
- package/dist/orchestration/outputs-store.d.ts +0 -40
- package/dist/orchestration/outputs-store.js +0 -83
- package/dist/orchestration/pending-injection-recovery.d.ts +0 -36
- package/dist/orchestration/pending-injection-recovery.js +0 -88
- package/dist/orchestration/pi-background-subagent.d.ts +0 -15
- package/dist/orchestration/pi-background-subagent.js +0 -34
- package/dist/orchestration/resume-dispatcher.d.ts +0 -20
- package/dist/orchestration/resume-dispatcher.js +0 -97
- package/dist/orchestration/resume-target-sink.d.ts +0 -37
- package/dist/orchestration/resume-target-sink.js +0 -68
- package/dist/orchestration/routing/commands/cancel.d.ts +0 -58
- package/dist/orchestration/routing/commands/cancel.js +0 -212
- package/dist/orchestration/routing/commands/channel.d.ts +0 -7
- package/dist/orchestration/routing/commands/channel.js +0 -229
- package/dist/orchestration/routing/commands/command-context.d.ts +0 -14
- package/dist/orchestration/routing/commands/command-context.js +0 -1
- package/dist/orchestration/routing/commands/compact.d.ts +0 -6
- package/dist/orchestration/routing/commands/compact.js +0 -22
- package/dist/orchestration/routing/commands/cost.d.ts +0 -11
- package/dist/orchestration/routing/commands/cost.js +0 -101
- package/dist/orchestration/routing/commands/device.d.ts +0 -4
- package/dist/orchestration/routing/commands/device.js +0 -70
- package/dist/orchestration/routing/commands/index.d.ts +0 -22
- package/dist/orchestration/routing/commands/index.js +0 -160
- package/dist/orchestration/routing/commands/lang.d.ts +0 -9
- package/dist/orchestration/routing/commands/lang.js +0 -34
- package/dist/orchestration/routing/commands/login-custom.d.ts +0 -26
- package/dist/orchestration/routing/commands/login-custom.js +0 -85
- package/dist/orchestration/routing/commands/login-notice.d.ts +0 -23
- package/dist/orchestration/routing/commands/login-notice.js +0 -84
- package/dist/orchestration/routing/commands/login.d.ts +0 -12
- package/dist/orchestration/routing/commands/login.js +0 -560
- package/dist/orchestration/routing/commands/mode.d.ts +0 -10
- package/dist/orchestration/routing/commands/mode.js +0 -302
- package/dist/orchestration/routing/commands/nvtop.d.ts +0 -3
- package/dist/orchestration/routing/commands/nvtop.js +0 -107
- package/dist/orchestration/routing/commands/orient.d.ts +0 -2
- package/dist/orchestration/routing/commands/orient.js +0 -5
- package/dist/orchestration/routing/commands/restart.d.ts +0 -18
- package/dist/orchestration/routing/commands/restart.js +0 -31
- package/dist/orchestration/routing/commands/schedule.d.ts +0 -6
- package/dist/orchestration/routing/commands/schedule.js +0 -206
- package/dist/orchestration/routing/commands/sendfile.d.ts +0 -2
- package/dist/orchestration/routing/commands/sendfile.js +0 -97
- package/dist/orchestration/routing/commands/session.d.ts +0 -18
- package/dist/orchestration/routing/commands/session.js +0 -131
- package/dist/orchestration/routing/commands/status.d.ts +0 -5
- package/dist/orchestration/routing/commands/status.js +0 -165
- package/dist/orchestration/routing/commands/tail.d.ts +0 -2
- package/dist/orchestration/routing/commands/tail.js +0 -79
- package/dist/orchestration/routing/commands/time-ago.d.ts +0 -2
- package/dist/orchestration/routing/commands/time-ago.js +0 -14
- package/dist/orchestration/routing/commands/usage-format.d.ts +0 -5
- package/dist/orchestration/routing/commands/usage-format.js +0 -107
- package/dist/orchestration/routing/commands/usage-reset.d.ts +0 -20
- package/dist/orchestration/routing/commands/usage-reset.js +0 -123
- package/dist/orchestration/routing/commands/usage.d.ts +0 -10
- package/dist/orchestration/routing/commands/usage.js +0 -54
- package/dist/orchestration/routing/edit-handler.d.ts +0 -27
- package/dist/orchestration/routing/edit-handler.js +0 -205
- package/dist/orchestration/routing/file-handler.d.ts +0 -15
- package/dist/orchestration/routing/file-handler.js +0 -39
- package/dist/orchestration/routing/hook-bridge-subscribers.d.ts +0 -14
- package/dist/orchestration/routing/hook-bridge-subscribers.js +0 -174
- package/dist/orchestration/routing/hook-bridge.d.ts +0 -28
- package/dist/orchestration/routing/hook-bridge.js +0 -104
- package/dist/orchestration/routing/message-router.d.ts +0 -6
- package/dist/orchestration/routing/message-router.js +0 -62
- package/dist/orchestration/routing/webhook.d.ts +0 -10
- package/dist/orchestration/routing/webhook.js +0 -434
- package/dist/orchestration/runtime.d.ts +0 -30
- package/dist/orchestration/runtime.js +0 -37
- package/dist/orchestration/session-compact.d.ts +0 -50
- package/dist/orchestration/session-compact.js +0 -84
- package/dist/orchestration/session-events.d.ts +0 -173
- package/dist/orchestration/session-events.js +0 -140
- package/dist/orchestration/session-gateway.d.ts +0 -52
- package/dist/orchestration/session-gateway.js +0 -87
- package/dist/orchestration/session-retention-controller.d.ts +0 -14
- package/dist/orchestration/session-retention-controller.js +0 -88
- package/dist/orchestration/session-retention-liveness.d.ts +0 -13
- package/dist/orchestration/session-retention-liveness.js +0 -31
- package/dist/orchestration/session-rewind.d.ts +0 -79
- package/dist/orchestration/session-rewind.js +0 -147
- package/dist/orchestration/status-helpers.d.ts +0 -40
- package/dist/orchestration/status-helpers.js +0 -177
- package/dist/orchestration/subagent-adopt.d.ts +0 -20
- package/dist/orchestration/subagent-adopt.js +0 -43
- package/dist/orchestration/subagent-attribution.d.ts +0 -42
- package/dist/orchestration/subagent-attribution.js +0 -130
- package/dist/orchestration/subagent-delivery.d.ts +0 -43
- package/dist/orchestration/subagent-delivery.js +0 -112
- package/dist/orchestration/subagent-rows.d.ts +0 -11
- package/dist/orchestration/subagent-rows.js +0 -16
- package/dist/orchestration/subagent-webhook.d.ts +0 -6
- package/dist/orchestration/subagent-webhook.js +0 -89
- package/dist/orchestration/team-delivery.d.ts +0 -81
- package/dist/orchestration/team-delivery.js +0 -284
- package/dist/orchestration/team-inbox.d.ts +0 -18
- package/dist/orchestration/team-inbox.js +0 -49
- package/dist/orchestration/team-state.d.ts +0 -74
- package/dist/orchestration/team-state.js +0 -219
- package/dist/orchestration/team-webhook.d.ts +0 -57
- package/dist/orchestration/team-webhook.js +0 -293
- package/dist/orchestration/transcript-sink.d.ts +0 -83
- package/dist/orchestration/transcript-sink.js +0 -267
- package/dist/orchestration/turn/active-turns.d.ts +0 -49
- package/dist/orchestration/turn/active-turns.js +0 -76
- package/dist/orchestration/turn/background-hold.d.ts +0 -158
- package/dist/orchestration/turn/background-hold.js +0 -240
- package/dist/orchestration/turn/hold-render-platform.d.ts +0 -35
- package/dist/orchestration/turn/hold-render-platform.js +0 -105
- package/dist/orchestration/turn/hold-render-web.d.ts +0 -17
- package/dist/orchestration/turn/hold-render-web.js +0 -51
- package/dist/orchestration/turn/terminal.d.ts +0 -105
- package/dist/orchestration/turn/terminal.js +0 -194
- package/dist/orchestration/turn/turn-prep.d.ts +0 -33
- package/dist/orchestration/turn/turn-prep.js +0 -44
- package/dist/orchestration/turn/turn-tracking.d.ts +0 -22
- package/dist/orchestration/turn/turn-tracking.js +0 -89
- package/dist/orchestration/turn/turn.d.ts +0 -199
- package/dist/orchestration/turn/turn.js +0 -586
- package/dist/orchestration/turn-mutation-lock.d.ts +0 -3
- package/dist/orchestration/turn-mutation-lock.js +0 -32
- package/dist/orchestration/turn-notify.d.ts +0 -22
- package/dist/orchestration/turn-notify.js +0 -50
- package/dist/orchestration/waitpoint-ingress.d.ts +0 -36
- package/dist/orchestration/waitpoint-ingress.js +0 -183
- package/dist/orchestration/waitpoint-notifier.d.ts +0 -32
- package/dist/orchestration/waitpoint-notifier.js +0 -140
- package/dist/orchestration/waitpoint-remote-drain.d.ts +0 -22
- package/dist/orchestration/waitpoint-remote-drain.js +0 -134
- package/dist/orchestration/waitpoint-sweep.d.ts +0 -43
- package/dist/orchestration/waitpoint-sweep.js +0 -84
- package/dist/platform/adapter.d.ts +0 -48
- package/dist/platform/adapter.js +0 -1
- package/dist/platform/adapters/chunked-output-stream.d.ts +0 -71
- package/dist/platform/adapters/chunked-output-stream.js +0 -382
- package/dist/platform/adapters/composite-adapter.d.ts +0 -99
- package/dist/platform/adapters/composite-adapter.js +0 -369
- package/dist/platform/adapters/feishu-http.d.ts +0 -46
- package/dist/platform/adapters/feishu-http.js +0 -108
- package/dist/platform/adapters/feishu-image.d.ts +0 -19
- package/dist/platform/adapters/feishu-image.js +0 -64
- package/dist/platform/adapters/feishu-output-stream.d.ts +0 -11
- package/dist/platform/adapters/feishu-output-stream.js +0 -29
- package/dist/platform/adapters/feishu.d.ts +0 -167
- package/dist/platform/adapters/feishu.js +0 -1059
- package/dist/platform/adapters/index.d.ts +0 -19
- package/dist/platform/adapters/index.js +0 -108
- package/dist/platform/adapters/project-conduits.d.ts +0 -9
- package/dist/platform/adapters/project-conduits.js +0 -36
- package/dist/platform/adapters/slack-output-stream.d.ts +0 -15
- package/dist/platform/adapters/slack-output-stream.js +0 -33
- package/dist/platform/adapters/slack.d.ts +0 -106
- package/dist/platform/adapters/slack.js +0 -733
- package/dist/platform/adapters/tui/index.d.ts +0 -2
- package/dist/platform/adapters/tui/index.js +0 -2
- package/dist/platform/adapters/tui/ports.d.ts +0 -46
- package/dist/platform/adapters/tui/ports.js +0 -1
- package/dist/platform/adapters/tui/tui-connection.d.ts +0 -20
- package/dist/platform/adapters/tui/tui-connection.js +0 -44
- package/dist/platform/adapters/tui/tui-gateway.d.ts +0 -90
- package/dist/platform/adapters/tui/tui-gateway.js +0 -884
- package/dist/platform/adapters/tui/tui-output-stream.d.ts +0 -35
- package/dist/platform/adapters/tui/tui-output-stream.js +0 -94
- package/dist/platform/adapters/tui/tui-transcript.d.ts +0 -8
- package/dist/platform/adapters/tui/tui-transcript.js +0 -42
- package/dist/platform/browser/agent-browser.d.ts +0 -50
- package/dist/platform/browser/agent-browser.js +0 -165
- package/dist/platform/browser/display.d.ts +0 -48
- package/dist/platform/browser/display.js +0 -188
- package/dist/platform/browser/managed-browser.d.ts +0 -23
- package/dist/platform/browser/managed-browser.js +0 -357
- package/dist/platform/index.d.ts +0 -10
- package/dist/platform/index.js +0 -6
- package/dist/platform/interactive-builder.d.ts +0 -34
- package/dist/platform/interactive-builder.js +0 -138
- package/dist/platform/output-stream-chunk.d.ts +0 -6
- package/dist/platform/output-stream-chunk.js +0 -42
- package/dist/platform/output-stream-helpers.d.ts +0 -8
- package/dist/platform/output-stream-helpers.js +0 -19
- package/dist/platform/output-stream.d.ts +0 -35
- package/dist/platform/output-stream.js +0 -1
- package/dist/platform/testing.d.ts +0 -136
- package/dist/platform/testing.js +0 -286
- package/dist/platform/tool-trace.d.ts +0 -35
- package/dist/platform/tool-trace.js +0 -287
- package/dist/platform/tui/protocol.d.ts +0 -352
- package/dist/platform/tui/protocol.js +0 -146
- package/dist/platform/types.d.ts +0 -223
- package/dist/platform/types.js +0 -22
- package/dist/platform/ui-http/access-jwt.d.ts +0 -28
- package/dist/platform/ui-http/access-jwt.js +0 -53
- package/dist/platform/ui-http/app-update.d.ts +0 -69
- package/dist/platform/ui-http/app-update.js +0 -143
- package/dist/platform/ui-http/browser-stream.d.ts +0 -110
- package/dist/platform/ui-http/browser-stream.js +0 -447
- package/dist/platform/ui-http/device-ports.d.ts +0 -34
- package/dist/platform/ui-http/device-ports.js +0 -102
- package/dist/platform/ui-http/file-routes.d.ts +0 -23
- package/dist/platform/ui-http/file-routes.js +0 -224
- package/dist/platform/ui-http/http-json.d.ts +0 -24
- package/dist/platform/ui-http/http-json.js +0 -109
- package/dist/platform/ui-http/listening-ports.d.ts +0 -98
- package/dist/platform/ui-http/listening-ports.js +0 -239
- package/dist/platform/ui-http/port-forward.d.ts +0 -40
- package/dist/platform/ui-http/port-forward.js +0 -130
- package/dist/platform/ui-http/ui-auth-routes.d.ts +0 -51
- package/dist/platform/ui-http/ui-auth-routes.js +0 -120
- package/dist/platform/ui-http/ui-device-routes.d.ts +0 -13
- package/dist/platform/ui-http/ui-device-routes.js +0 -81
- package/dist/platform/ui-http/ui-devices.d.ts +0 -24
- package/dist/platform/ui-http/ui-devices.js +0 -107
- package/dist/platform/ui-http/ui-http-server.d.ts +0 -100
- package/dist/platform/ui-http/ui-http-server.js +0 -310
- package/dist/platform/ui-http/ui-ota.d.ts +0 -22
- package/dist/platform/ui-http/ui-ota.js +0 -151
- package/dist/platform/ui-http/ui-pairing.d.ts +0 -25
- package/dist/platform/ui-http/ui-pairing.js +0 -98
- package/dist/platform/ui-http/ui-session.d.ts +0 -33
- package/dist/platform/ui-http/ui-session.js +0 -124
- package/dist/platform/ui-http/zip-writer.d.ts +0 -13
- package/dist/platform/ui-http/zip-writer.js +0 -93
- package/dist/platform/utils/rate-limiter.d.ts +0 -90
- package/dist/platform/utils/rate-limiter.js +0 -203
- package/dist/platform/utils/reaction-diagnostics.d.ts +0 -9
- package/dist/platform/utils/reaction-diagnostics.js +0 -19
- package/dist/platform/utils/readable-file.d.ts +0 -9
- package/dist/platform/utils/readable-file.js +0 -18
- package/dist/store/board-migration.d.ts +0 -21
- package/dist/store/board-migration.js +0 -217
- package/dist/store/board-repo.d.ts +0 -35
- package/dist/store/board-repo.js +0 -62
- package/dist/store/builtin-overlay-migration.d.ts +0 -11
- package/dist/store/builtin-overlay-migration.js +0 -308
- package/dist/store/claude-transcript-migration.d.ts +0 -32
- package/dist/store/claude-transcript-migration.js +0 -119
- package/dist/store/conversation-display-projection.d.ts +0 -36
- package/dist/store/conversation-display-projection.js +0 -180
- package/dist/store/conversation-history-reader.d.ts +0 -30
- package/dist/store/conversation-history-reader.js +0 -440
- package/dist/store/conversation-history-repo.d.ts +0 -449
- package/dist/store/conversation-history-repo.js +0 -632
- package/dist/store/conversation-ledger-repo.d.ts +0 -76
- package/dist/store/conversation-ledger-repo.js +0 -219
- package/dist/store/cost-repo.d.ts +0 -88
- package/dist/store/cost-repo.js +0 -233
- package/dist/store/execution-repo.d.ts +0 -169
- package/dist/store/execution-repo.js +0 -329
- package/dist/store/gitignore-migration.d.ts +0 -2
- package/dist/store/gitignore-migration.js +0 -16
- package/dist/store/hook-registry.d.ts +0 -101
- package/dist/store/hook-registry.js +0 -319
- package/dist/store/hook-writer.d.ts +0 -43
- package/dist/store/hook-writer.js +0 -133
- package/dist/store/models-repo.d.ts +0 -18
- package/dist/store/models-repo.js +0 -74
- package/dist/store/outbound-queue.d.ts +0 -67
- package/dist/store/outbound-queue.js +0 -284
- package/dist/store/pending-injection-repo.d.ts +0 -29
- package/dist/store/pending-injection-repo.js +0 -52
- package/dist/store/project-dir-repo.d.ts +0 -17
- package/dist/store/project-dir-repo.js +0 -44
- package/dist/store/project-notes-repo.d.ts +0 -27
- package/dist/store/project-notes-repo.js +0 -219
- package/dist/store/prompt-migration-replacements.d.ts +0 -3
- package/dist/store/prompt-migration-replacements.js +0 -96
- package/dist/store/provider-state-repo.d.ts +0 -22
- package/dist/store/provider-state-repo.js +0 -115
- package/dist/store/retention-candidate-repo.d.ts +0 -12
- package/dist/store/retention-candidate-repo.js +0 -47
- package/dist/store/retire-profiles-migration.d.ts +0 -28
- package/dist/store/retire-profiles-migration.js +0 -335
- package/dist/store/schedule-repo.d.ts +0 -53
- package/dist/store/schedule-repo.js +0 -121
- package/dist/store/session-registry-import.d.ts +0 -34
- package/dist/store/session-registry-import.js +0 -173
- package/dist/store/session-registry-journal.d.ts +0 -195
- package/dist/store/session-registry-journal.js +0 -871
- package/dist/store/session-registry-repo.d.ts +0 -169
- package/dist/store/session-registry-repo.js +0 -530
- package/dist/store/session-totals-repo.d.ts +0 -45
- package/dist/store/session-totals-repo.js +0 -104
- package/dist/store/session-totals.d.ts +0 -69
- package/dist/store/session-totals.js +0 -93
- package/dist/store/team-inbox-repo.d.ts +0 -34
- package/dist/store/team-inbox-repo.js +0 -72
- package/dist/store/team-outbox-repo.d.ts +0 -20
- package/dist/store/team-outbox-repo.js +0 -39
- package/dist/store/tool-image-files.d.ts +0 -12
- package/dist/store/tool-image-files.js +0 -40
- package/dist/store/version-migrations.d.ts +0 -120
- package/dist/store/version-migrations.js +0 -1408
- package/dist/store/waitpoint-repo.d.ts +0 -111
- package/dist/store/waitpoint-repo.js +0 -83
- package/dist/tui/App.d.ts +0 -27
- package/dist/tui/App.js +0 -406
- package/dist/tui/components/AskUserModal.d.ts +0 -10
- package/dist/tui/components/AskUserModal.js +0 -362
- package/dist/tui/components/ConfirmModal.d.ts +0 -12
- package/dist/tui/components/ConfirmModal.js +0 -29
- package/dist/tui/components/Dashboard.d.ts +0 -24
- package/dist/tui/components/Dashboard.js +0 -89
- package/dist/tui/components/DashboardCostTab.d.ts +0 -7
- package/dist/tui/components/DashboardCostTab.js +0 -32
- package/dist/tui/components/DashboardExecutionsTab.d.ts +0 -11
- package/dist/tui/components/DashboardExecutionsTab.js +0 -112
- package/dist/tui/components/DashboardSchedulesTab.d.ts +0 -11
- package/dist/tui/components/DashboardSchedulesTab.js +0 -132
- package/dist/tui/components/InputBox.d.ts +0 -26
- package/dist/tui/components/InputBox.js +0 -266
- package/dist/tui/components/Notifications.d.ts +0 -12
- package/dist/tui/components/Notifications.js +0 -59
- package/dist/tui/components/ProjectSwitcher.d.ts +0 -17
- package/dist/tui/components/ProjectSwitcher.js +0 -40
- package/dist/tui/components/SessionPicker.d.ts +0 -13
- package/dist/tui/components/SessionPicker.js +0 -42
- package/dist/tui/components/SidePanel.d.ts +0 -19
- package/dist/tui/components/SidePanel.js +0 -8
- package/dist/tui/components/SlashMenu.d.ts +0 -8
- package/dist/tui/components/SlashMenu.js +0 -15
- package/dist/tui/components/StatusLine.d.ts +0 -19
- package/dist/tui/components/StatusLine.js +0 -39
- package/dist/tui/components/Transcript.d.ts +0 -21
- package/dist/tui/components/Transcript.js +0 -150
- package/dist/tui/components/dashboard-constants.d.ts +0 -1
- package/dist/tui/components/dashboard-constants.js +0 -1
- package/dist/tui/hooks/useDashboardData.d.ts +0 -24
- package/dist/tui/hooks/useDashboardData.js +0 -75
- package/dist/tui/hooks/useKeybindings.d.ts +0 -19
- package/dist/tui/hooks/useKeybindings.js +0 -75
- package/dist/tui/hooks/useMouseHandler.d.ts +0 -15
- package/dist/tui/hooks/useMouseHandler.js +0 -90
- package/dist/tui/hooks/useMutate.d.ts +0 -22
- package/dist/tui/hooks/useMutate.js +0 -54
- package/dist/tui/hooks/useNotifications.d.ts +0 -26
- package/dist/tui/hooks/useNotifications.js +0 -60
- package/dist/tui/hooks/useTranscript.d.ts +0 -42
- package/dist/tui/hooks/useTranscript.js +0 -277
- package/dist/tui/index.d.ts +0 -2
- package/dist/tui/logic.d.ts +0 -144
- package/dist/tui/logic.js +0 -388
- package/dist/tui/raf-batch.d.ts +0 -31
- package/dist/tui/raf-batch.js +0 -89
- package/dist/tui/render/inline-markdown.d.ts +0 -22
- package/dist/tui/render/inline-markdown.js +0 -99
- package/dist/tui/render/markdown.d.ts +0 -10
- package/dist/tui/render/markdown.js +0 -35
- package/dist/tui/render-output.d.ts +0 -42
- package/dist/tui/render-output.js +0 -81
- package/dist/tui/slash-commands.d.ts +0 -21
- package/dist/tui/slash-commands.js +0 -71
- package/dist/tui/turn-status.d.ts +0 -10
- package/dist/tui/turn-status.js +0 -48
- package/dist/tui/ws-client.d.ts +0 -39
- package/dist/tui/ws-client.js +0 -139
- package/scripts/install-bundled-dependencies.mjs +0 -54
- package/web/dist/assets/board-math-css-spk7yR6n.js +0 -2
- package/web/dist/assets/index-BQ69u-92.css +0 -1
- package/web/dist/assets/index-CKNLatCd.js +0 -1
- package/web/dist/assets/index-CkzWfC98.js +0 -525
|
@@ -1,100 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { setProcessLogPolicy } from '../core/log.js';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
};
|
|
14
|
-
function readInput(source) {
|
|
15
|
-
return source === '-' ? readStdinSync() : fs.readFileSync(path.resolve(source), 'utf8');
|
|
16
|
-
}
|
|
17
|
-
function prepareProductionStores() {
|
|
18
|
-
initializeProductionAttemptIdentity();
|
|
19
|
-
executionRepo.load();
|
|
20
|
-
}
|
|
21
|
-
const DEFAULT_DEPS = {
|
|
22
|
-
readInput,
|
|
23
|
-
prepareProductionStores,
|
|
24
|
-
exportEvidence: input => exportProductionBenchmarkEvidence(input),
|
|
25
|
-
};
|
|
26
|
-
function parseArgs(args) {
|
|
27
|
-
if (args.length !== 2 || args[0] !== '--input-file') {
|
|
28
|
-
throw new Error(formatError('Expected exactly --input-file <path|->.', { hint: "Run 'cortex-evidence-export --help' for usage." }));
|
|
29
|
-
}
|
|
30
|
-
if (!args[1])
|
|
31
|
-
throw new Error('Missing value for --input-file.');
|
|
32
|
-
return args[1];
|
|
33
|
-
}
|
|
34
|
-
function parseInput(text) {
|
|
35
|
-
try {
|
|
36
|
-
return JSON.parse(text);
|
|
37
|
-
}
|
|
38
|
-
catch (error) {
|
|
39
|
-
throw new Error(`Input is not valid JSON: ${error.message}`);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
function success(result) {
|
|
43
|
-
return JSON.stringify({
|
|
44
|
-
ok: true,
|
|
45
|
-
directory: result.directory,
|
|
46
|
-
composite_path: result.compositePath,
|
|
47
|
-
composite_sha256: result.compositeSha256,
|
|
48
|
-
terminal_paths: result.terminalPaths,
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
function failure(error) {
|
|
52
|
-
return JSON.stringify({
|
|
53
|
-
ok: false,
|
|
54
|
-
error: error?.message ?? String(error),
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
export async function runProductionEvidenceExportCli(args, io = DEFAULT_IO, deps = DEFAULT_DEPS) {
|
|
58
|
-
if (args.includes('--help') || args.includes('-h')) {
|
|
59
|
-
io.stdout.write(`${getProductionEvidenceExportHelp()}\n`);
|
|
60
|
-
return 0;
|
|
61
|
-
}
|
|
62
|
-
const restoreLogPolicy = setProcessLogPolicy({
|
|
63
|
-
consoleToStderr: true,
|
|
64
|
-
files: false,
|
|
65
|
-
console: false,
|
|
66
|
-
});
|
|
67
|
-
try {
|
|
68
|
-
const input = parseInput(deps.readInput(parseArgs(args)));
|
|
69
|
-
deps.prepareProductionStores();
|
|
70
|
-
io.stdout.write(`${success(await deps.exportEvidence(input))}\n`);
|
|
71
|
-
return 0;
|
|
72
|
-
}
|
|
73
|
-
catch (error) {
|
|
74
|
-
io.stderr.write(`${failure(error)}\n`);
|
|
75
|
-
return 1;
|
|
76
|
-
}
|
|
77
|
-
finally {
|
|
78
|
-
restoreLogPolicy();
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
export function getProductionEvidenceExportHelp() {
|
|
82
|
-
return formatHelp({
|
|
83
|
-
name: 'cortex-evidence-export',
|
|
84
|
-
description: 'Publish production terminal/composite benchmark evidence v2',
|
|
85
|
-
usage: 'cortex-evidence-export --input-file <path|->',
|
|
86
|
-
options: [
|
|
87
|
-
{ flag: '--input-file <path|->', description: 'ProductionEvidenceExportInput JSON, or - for stdin' },
|
|
88
|
-
{ flag: '--help, -h', description: 'Show this help' },
|
|
89
|
-
],
|
|
90
|
-
examples: [
|
|
91
|
-
{ description: 'Read launcher input from a file', command: 'cortex-evidence-export --input-file production-evidence.json' },
|
|
92
|
-
{ description: 'Read launcher input from stdin', command: 'cat production-evidence.json | cortex-evidence-export --input-file -' },
|
|
93
|
-
],
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
if (isMainModule(import.meta.url)) {
|
|
97
|
-
runProductionEvidenceExportCli(process.argv.slice(2)).then((code) => {
|
|
98
|
-
process.exitCode = code;
|
|
99
|
-
});
|
|
100
|
-
}
|
|
2
|
+
import { createRequire as __cortexCreateRequire } from 'node:module';
|
|
3
|
+
const require = __cortexCreateRequire(import.meta.url);
|
|
4
|
+
const __cortexPackageRoot = new URL("../../", import.meta.url);
|
|
5
|
+
import{r as b,t as pt,u as mt,w as ft}from"../chunks/chunk-EQITBTJC.js";import{a as G}from"../chunks/chunk-UD3NMUHR.js";import{h as A}from"../chunks/chunk-LEUENXI2.js";import"../chunks/chunk-HALUQ7ZF.js";import"../chunks/chunk-3THJYAEF.js";import"../chunks/chunk-D3NXKK2L.js";import"../chunks/chunk-OE4KH3NJ.js";import"../chunks/chunk-5M4PFLRW.js";import{a as ht,b as yt,c as gt}from"../chunks/chunk-PMG4YGDU.js";import"../chunks/chunk-Q4UGYGU5.js";import"../chunks/chunk-W5LGYSPZ.js";import"../chunks/chunk-E7ZMYIY6.js";import{c as _t}from"../chunks/chunk-NAA7GF6Q.js";import{b as lt}from"../chunks/chunk-QWAQHHRS.js";import"../chunks/chunk-J5DVLUKY.js";import"../chunks/chunk-WHC7AYZD.js";import Yn from"node:fs";import Vn from"node:path";import{createHash as qn,randomUUID as Un}from"node:crypto";import p from"node:fs";import m from"node:path";import{spawnSync as Ln}from"node:child_process";import{createHash as fn}from"node:crypto";function S(t){throw new Error(`malformed_fragment:${t}`)}function le(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function z(t){return t.event.type}function pe(t,e){let n=[],o=[],r=e,s=e;for(;r<t.length&&z(t[r])!=="tool_result";){if(z(t[r])==="tool_use"){n.push(...o,t[r]),o=[],r+=1,s=r;continue}o.push(t[r]),r+=1}return{records:n,next:s}}function me(t,e,n,o){let r=[],s=new Set(n),a=new Set([...n].filter(d=>o.has(d))),c=e;for(;c<t.length&&s.size>0;){let d=t[c],u=d.event;u.type==="tool_result"&&(n.has(u.toolUseId)?(s.delete(u.toolUseId),a.delete(u.toolUseId)):a.size===0&&S("unpaired_tool_result")),r.push(d),c+=1}return a.size>0&&S("unclosed_subagent_span"),{records:r,next:c}}function fe(t,e,n){let o=pe(t,e),r=o.records.flatMap(u=>u.event.type==="tool_use"?[u.event.toolUseId]:[]),s=new Set(r);s.size!==r.length&&S("duplicate_tool_call_id");let a=me(t,o.next,s,n),c=a.records.flatMap(u=>u.event.type==="tool_result"?[u.event.toolUseId]:[]);new Set(c).size!==c.length&&S("duplicate_tool_result");let d=[...s,...a.records.flatMap(u=>u.event.type==="tool_use"?[u.event.toolUseId]:[])];return new Set(d).size!==d.length&&S("duplicate_tool_call_id"),{group:{records:[...o.records,...a.records]},next:a.next}}function he(t){return new Set(t.flatMap(e=>e.event.type==="subagent_activity"?[e.event.parentToolUseId]:[]))}function ye(t){let e=[],n=he(t),o=0;for(;o<t.length;){let r=z(t[o]);if(r==="tool_result"&&S("unpaired_tool_result"),r!=="tool_use"){e.push({records:[t[o]]}),o+=1;continue}let s=fe(t,o,n);e.push(s.group),o=s.next}return e}function ge(t){return le(t)?t:{value:t}}function be(t){return t.records.flatMap(e=>{let n=e.event;return n.type!=="tool_use"?[]:[{tool_call_id:n.toolUseId,function_name:n.name,arguments:ge(n.input)}]})}function xe(t){return t.records.flatMap(e=>{let n=e.event;return n.type!=="tool_result"?[]:[{source_call_id:n.toolUseId,content:n.content,subagent_trajectory_ref:null,extra:{ok:n.ok}}]})}function ve(t){if(t.records.length===1){let e=t.records[0].event;if(e.type==="assistant_text"||e.type==="assistant_delta")return e.text}return JSON.stringify(t.records.map(e=>e.event))}function Ee(t,e){let n=t.records[0],o=be(t),r=xe(t);return{step_id:e,timestamp:n.ts,source:"agent",model_name:n.reported_model,message:ve(t),reasoning_content:null,...o.length>0?{tool_calls:o}:{},...r.length>0?{observation:{results:r}}:{},extra:{source_events:t.records}}}function ke(t){return{name:`cortex-${t.header.agent_slot}`,version:t.header.bundle_manifest_hash,model_name:t.events[0]?.requested_model??null,extra:{agent_slot:t.header.agent_slot,model_execution_identity_hash:t.header.model_execution_identity_hash,role_tool_surface_hash:t.header.role_tool_surface_hash,bundle_manifest_hash:t.header.bundle_manifest_hash,journal_schema_version:t.header.schema_version}}}function Se(t){return{root_run_id:t.header.root_run_id,session_id:t.header.session_id,agent_slot:t.header.agent_slot,resolved_cwd:t.header.resolved_cwd,model_execution_identity_hash:t.header.model_execution_identity_hash,role_tool_surface_hash:t.header.role_tool_surface_hash,bundle_manifest_hash:t.header.bundle_manifest_hash,journal_sha256:t.terminal.journal_sha256,terminal:{state:t.terminal.state,terminal_reason:t.terminal.terminal_reason}}}function je(t){let e=String(t.terminal.state),n=String(t.terminal.terminal_reason);return{step_id:1,timestamp:t.terminal.ended_at,source:"system",message:`Terminal state ${e}; reason ${n}`,extra:{synthesized_from:"terminal_manifest"}}}function Ae(t){return t.events.length===0?[je(t)]:ye(t.events).map((e,n)=>Ee(e,n+1))}function bt(t){let e=t.fragment,n={schema_version:"ATIF-v1.7",trajectory_id:e.header.session_id,agent:ke(e),steps:Ae(e),extra:Se(e)};return t.children.length>0&&(n.subagent_trajectories=t.children.map(bt)),n}function xt(t){let e=bt(t);return e.extra.subagent_link_source="explicit",e.extra.final_metrics_status="unavailable",e}import Y from"node:path";var kt="cortex-bench-manifest/2",Ie=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/,Ne=/^[a-f0-9]{64}$/,Te=["model_execution_identity_hash","role_tool_surface_hash","bundle_manifest_hash"],we=["schema_version","state","started_at","ended_at","journal_path","journal_sha256","event_count","steps","cost_usd","tokens",...Te,"terminal_reason"],St={completed:["ok"],failed:["child_failure","trajectory_write_failed","containment_failure","rate_limited","protocol_violation","step_limit_exceeded","cost_limit_exceeded","provider_error"],cancelled:["cancelled"],timeout:["deadline","deadline_exceeded"],aborted:["aborted"]};function jt(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function At(t,e){let n=new Set(e);return e.every(o=>Object.hasOwn(t,o))&&Object.keys(t).every(o=>n.has(o))}function vt(t){if(typeof t!="string"||!Ie.test(t))return!1;try{return new Date(t).toISOString()===t}catch{return!1}}function R(t){return typeof t=="string"&&Ne.test(t)}function Oe(t){return Number.isInteger(t)&&Number(t)>=0}function $e(t){return typeof t=="number"&&Number.isFinite(t)}function Et(t){return t===null||$e(t)}function Me(t){return t===null||typeof t=="number"&&Number.isFinite(t)&&t>=0}function It(t){return t==="completed"||t==="failed"||t==="cancelled"||t==="timeout"||t==="aborted"}function Re(t){return Object.values(St).some(e=>e.includes(t))}function V(t,e){return!It(t)||!Re(e)?!1:St[t].includes(e)}function Pe(t){if(!jt(t))return!1;let e=["input","output","cache_read","cache_creation"];return At(t,e)&&e.every(n=>Me(t[n]))}var Ce=[["schema_version",t=>t.schema_version===kt],["state",t=>It(t.state)],["started_at",t=>vt(t.started_at)],["ended_at",t=>vt(t.ended_at)],["journal_path",t=>typeof t.journal_path=="string"&&t.journal_path.length>0],["journal_sha256",t=>R(t.journal_sha256)],["event_count",t=>Oe(t.event_count)],["steps",t=>Et(t.steps)],["cost_usd",t=>Et(t.cost_usd)],["tokens",t=>Pe(t.tokens)],["model_execution_identity_hash",t=>R(t.model_execution_identity_hash)],["role_tool_surface_hash",t=>R(t.role_tool_surface_hash)],["bundle_manifest_hash",t=>R(t.bundle_manifest_hash)],["terminal_reason",t=>V(t.state,t.terminal_reason)]];function Nt(t){return!jt(t)||!At(t,we)?"envelope":Ce.find(([,e])=>!e(t))?.[0]??null}function De(t,e){let n=Y.resolve(t);return Y.relative(n,Y.resolve(n,e))}function Tt(t){return{schema_version:kt,state:t.state,started_at:t.startedAt,ended_at:t.endedAt,journal_path:De(t.trajectoryRoot,t.journalPath),journal_sha256:t.journalSha256,event_count:t.eventCount,steps:t.steps,cost_usd:t.costUsd,tokens:t.tokens,model_execution_identity_hash:t.modelExecutionIdentityHash,role_tool_surface_hash:t.roleToolSurfaceHash,bundle_manifest_hash:t.bundleManifestHash,terminal_reason:t.terminalReason}}var qe=/^[+-]?\d+(\.\d+)?([eE][+-]?\d+)?$/,P=class extends Error{constructor(e){super(`not a decimal string: ${e}`),this.name="DecimalTextError"}};function X(t){return typeof t=="string"&&qe.test(t)}function Ue(t){if(!X(t))throw new P(String(t));let[e,n]=t.split(/[eE]/),[o,r=""]=e.replace(/^[+-]/,"").split("."),s=BigInt(`${o}${r}`)*(t.startsWith("-")?-1n:1n);return Le({units:s,scale:r.length-Number(n??0)})}function wt(t){let e=t.units<0n,n=(e?-t.units:t.units).toString().padStart(t.scale+1,"0"),o=n.length-t.scale,r=t.scale>0?n.slice(o).replace(/0+$/,""):"",s=r?`${n.slice(0,o)}.${r}`:n.slice(0,o);return e&&t.units!==0n?`-${s}`:s}function Ot(t){if(!Number.isFinite(t))throw new P(String(t));return Ue(String(t))}function Le(t){return t.scale>=0?t:{units:t.units*10n**BigInt(-t.scale),scale:0}}var Fe="cortex-bench-accounting/2",He="cortex-bench-proxy-export/1",Je=["proxy_not_started","counter_unreadable","audit_log_unreadable","no_echo_received","no_cache_breakdown_reported","journal_absent","journal_underivable","operand_unavailable"],W=class extends Error{constructor(e){super(`accounting input invalid: ${e}`),this.name="AccountingInputError"}};function Mt(t,e){let n=Be(t),o=Ge(e);return Pt({schema_version:Fe,trial_id:Ye(t.trial_id),proxy:n,journal:o,unaccounted_roles:Ke(n,o,e.roles)})}function Rt(t){return typeof t!="number"||!Number.isFinite(t)||t<0?{status:"unavailable",reason:"journal_underivable"}:{status:"available",value:wt(Ot(t))}}function Ke(t,e,n){if(t.requests.status!=="available"||e.requests.status!=="available")return[];let o=t.requests.value-e.requests.value;return o<=0?[]:[{kind:"proxy_excess",journal_roles:[...n],requests:{status:"available",value:o}}]}function Be(t){return g(t?.schema_version===He,"proxy.schema_version"),g(t.source==="proxy_export","proxy.source"),{requests:y(t.requests,"proxy.requests"),cached_tokens:y(t.cached_tokens,"proxy.cached_tokens"),input_tokens:y(t.input_tokens,"proxy.input_tokens"),output_tokens:y(t.output_tokens,"proxy.output_tokens"),audit_log:$t(t.audit_log,"proxy.audit_log"),lease_echo:$t(t.lease_echo,"proxy.lease_echo"),source:"proxy_export"}}function Ge(t){return g(t?.source==="trajectory_merge","journal.source"),g(Array.isArray(t.roles),"journal.roles"),{requests:y(t.requests,"journal.requests"),cost_usd:ze(t.cost_usd,"journal.cost_usd"),steps:y(t.steps,"journal.steps"),tokens:{input:y(t.tokens?.input,"journal.tokens.input"),output:y(t.tokens?.output,"journal.tokens.output"),cached:y(t.tokens?.cached,"journal.tokens.cached")},source:"trajectory_merge"}}function Z(t,e,n){g(typeof t=="object"&&t!==null,e);let o=t;return o.status==="unavailable"?(g(Je.includes(o.reason),`${e}.reason`),{status:"unavailable",reason:o.reason}):(g(o.status==="available",`${e}.status`),g(n(o.value),`${e}.value`),{status:"available",value:o.value})}function y(t,e){return Z(t,e,n=>Number.isSafeInteger(n)&&n>=0)}function ze(t,e){return Z(t,e,n=>X(n)&&!n.startsWith("-"))}function $t(t,e){let n=Z(t,e,o=>typeof o=="object"&&o!==null);return n.status!=="available"?n:{status:"available",value:structuredClone(n.value)}}function Ye(t){return g(typeof t=="string"&&t.length>0,"proxy.trial_id"),t}function g(t,e){if(!t)throw new W(e)}function Pt(t){for(let e of Object.values(t))e!==null&&typeof e=="object"&&Pt(e);return Object.freeze(t)}var Ct=["spawn","decompose","depends_on","dispatch","proposal","seal","delivery","verdict","rework","supersede","rotation","question","answer"],Ve=["spawn","decompose","depends_on","dispatch","delivery","verdict","rework","question","answer"],Xe=new Set(Ve);function Dt(t){return Xe.has(t)}var qt=Object.freeze({spawn:{from:["attempt"],to:["attempt"]},decompose:{from:["attempt"],to:["task"]},depends_on:{from:["task"],to:["task"]},dispatch:{from:["task"],to:["attempt"]},proposal:{from:["attempt"],to:["proposal"]},seal:{from:["proposal"],to:["outcome"]},delivery:{from:["outcome"],to:["attempt"]},verdict:{from:["attempt"],to:["attempt"]},rework:{from:["attempt"],to:["attempt"]},supersede:{from:["attempt"],to:["attempt"]},rotation:{from:["attempt"],to:["attempt"]},question:{from:["attempt"],to:["attempt"]},answer:{from:["attempt"],to:["attempt"]}});function Ut(t){if(!t||typeof t!="object"||Array.isArray(t))return!1;let e=t,n=["input","output","cache_read","cache_creation"];return Object.keys(e).length===n.length&&n.every(o=>Object.hasOwn(e,o)&&(e[o]===null||typeof e[o]=="number"&&Number.isFinite(e[o])&&e[o]>=0))}var C=["trial_id","root_run_id","task_id","parent_task_id","dispatch_generation","attempt_id","attempt_ordinal","session_id","execution_id","task_ancestry","role","backend","provider","requested_model","reported_model","model_execution_identity_hash","role_tool_surface_hash","bundle_manifest_hash","terminal_state","terminal_reason","disposition","superseded_by","artifact_path","artifact_sha256","journal_path","journal_sha256","event_count","terminal_manifest_path","terminal_manifest_sha256","edges","started_at","ended_at","steps","cost_usd","tokens","provider_requests"];function Lt(t){let e=new Map;for(let o of t){let r=e.get(o.task_id);r?r.push(o):e.set(o.task_id,[o])}let n=new Map;for(let o of e.values())[...o].sort((s,a)=>s.started_at<a.started_at?-1:s.started_at>a.started_at?1:s.attempt_id<a.attempt_id?-1:s.attempt_id>a.attempt_id?1:0).forEach((s,a)=>n.set(s.attempt_id,a+1));return n}var Kt="cortex-bench-composite-manifest/3",We=["G1","G2","G3","G4","G5","G6","G7","G8"],Bt=Object.freeze({direct:Object.freeze(["D1","D2","D3","D4","D5","D6"]),"coder-review":Object.freeze(["C1","C2","C3","C4","C5","C6","C7","C8"]),manager:Object.freeze(["M-1","M-2","M-3","M-4","M-5","M-6","M-7","M-8","M-9","M-10","M-11","M-12","M-13","M-14","M-15","M-16"])});function Gt(t){return[...We,...Bt[t]]}var D=["schema_version","trial_id","root_run_id","arm_name","arm_canonical_sha256","identity","nodes","edges","roots","accounting","predicate"];var Ze=new Set(["attempt_missing_lifecycle_pair","lifecycle_pair_missing_attempt"]);function Qe(t){return t==="attempt_unaccounted"?39:40}function I(t){return t.id}function f(t){return`${t.ref}\0${I(t)}`}var Ft=new Map(Ct.map((t,e)=>[t,e+1]));function j(t,e){return t<e?-1:t>e?1:0}function q(t,e){return Ft.get(t.kind)-Ft.get(e.kind)||j(t.from.ref,e.from.ref)||j(I(t.from),I(e.from))||j(t.to.ref,e.to.ref)||j(I(t.to),I(e.to))}var zt=new Set(["spawn","decompose","dispatch"]);function Yt(t,e){let n=new Map;for(let c of t){if(!zt.has(c.kind))continue;let d=f(c.from),u=n.get(d);u?u.push(f(c.to)):n.set(d,[f(c.to)])}let o=f({ref:"attempt",id:e}),r=new Map([[o,0]]),s=[o];for(;s.length>0;){let c=s.shift(),d=r.get(c);for(let u of n.get(c)??[])r.has(u)||(r.set(u,d+1),s.push(u))}let a=new Map;for(let[c,d]of r){let[u,h]=c.split("\0");u==="attempt"&&a.set(h,d)}return a}function tn(t){let e=new Map,n=new Set;for(let s of t){if(!zt.has(s.kind))continue;let a=f(s.from),c=f(s.to);n.add(a),n.add(c);let d=e.get(a);d?d.push(c):e.set(a,[c])}let o=new Map,r=s=>{let a=o.get(s);if(a==="open")return!0;if(a==="closed")return!1;o.set(s,"open");for(let c of e.get(s)??[])if(r(c))return!0;return o.set(s,"closed"),!1};for(let s of n)if(r(s))return!0;return!1}var en="not evaluated at this pin";function nn(t,e){let n=Gt(t).map(o=>{let r=e?.[o];return r?{check_id:o,result:r.result,detail:r.detail}:{check_id:o,result:"unavailable",detail:en}});return{mode:t,checks:n}}function Vt(t){let e=[...t.edges].sort(q),n=Yt(e,t.roots.root_attempt_id),r=t.nodes.map(s=>({...s,edges:e.filter(a=>a.from.ref==="attempt"&&a.from.id===s.attempt_id)})).sort((s,a)=>(n.get(s.attempt_id)??Number.MAX_SAFE_INTEGER)-(n.get(a.attempt_id)??Number.MAX_SAFE_INTEGER)||s.attempt_ordinal-a.attempt_ordinal||j(s.attempt_id,a.attempt_id));return{schema_version:Kt,trial_id:t.trial_id,root_run_id:t.root_run_id,arm_name:t.arm_name,arm_canonical_sha256:t.arm_canonical_sha256,identity:t.identity,nodes:r,edges:e,roots:t.roots,accounting:t.accounting,predicate:nn(t.mode,t.evaluatedChecks)}}function Ht(t){return{ref:t.ref,id:t.id}}function Xt(t){return{kind:t.kind,from:Ht(t.from),to:Ht(t.to)}}function on(t){let e={};for(let n of C)if(n==="edges")e[n]=t.edges.map(Xt);else if(n==="tokens"){let o=t.tokens;e[n]={input:o.input,output:o.output,cache_read:o.cache_read,cache_creation:o.cache_creation}}else e[n]=t[n];return e}function Wt(t){let e={};for(let n of D)n==="nodes"?e[n]=t.nodes.map(on):n==="edges"?e[n]=t.edges.map(Xt):n==="roots"?e[n]={root_attempt_id:t.roots.root_attempt_id,root_task_id:t.roots.root_task_id}:n==="predicate"?e[n]={mode:t.predicate.mode,checks:t.predicate.checks.map(o=>({check_id:o.check_id,result:o.result,detail:o.detail}))}:e[n]=t[n];return Buffer.from(`${JSON.stringify(e,null,2)}
|
|
6
|
+
`,"utf8")}var rn=["requests","cached_tokens","input_tokens","output_tokens","audit_log","lease_echo","source"],sn=["requests","cost_usd","steps","tokens","source"],an=/^[a-f0-9]{64}$/;function Q(t){return typeof t=="string"&&an.test(t)}function Jt(t){if(!t||typeof t!="object"||Array.isArray(t))return!1;let e=Object.entries(t);return e.length>0&&e.every(([n,o])=>n.length>0&&Q(o))}function cn(t){if(Object.keys(t).length!==C.length||!C.every(r=>Object.hasOwn(t,r)))return!1;let n=[t.journal_path,t.terminal_manifest_path,t.session_id,t.execution_id],o=[t.model_execution_identity_hash,t.role_tool_surface_hash,t.bundle_manifest_hash,t.journal_sha256,t.terminal_manifest_sha256];return n.every(r=>typeof r=="string"&&r.length>0)&&t.terminal_manifest_path.endsWith(".terminal.json")&&o.every(Q)&&Number.isInteger(t.event_count)&&t.event_count>=0&&Ut(t.tokens)&&(t.provider_requests===null||Number.isInteger(t.provider_requests)&&t.provider_requests>0)&&V(t.terminal_state,t.terminal_reason)}function Zt(t,e){let n=[],o=(i,l)=>{n.push({code:i,failure_code:Qe(Ze.has(i)?"attempt_unaccounted":"composite_manifest_invalid"),detail:l})},r=t,s=Object.keys(r),a=new Set(D);for(let i of s)a.has(i)||o("unknown_top_level_member",i);for(let i of D)Object.hasOwn(r,i)||o("top_level_member_missing",i);let c=D.filter(i=>Object.hasOwn(r,i)),d=s.filter(i=>a.has(i));d.join(",")!==c.join(",")&&o("member_order_invalid",`expected ${c.join(",")}, got ${d.join(",")}`),t.schema_version!==Kt&&o("schema_version_invalid",String(t.schema_version));let u=t.nodes??[],h=t.edges??[];u.length===0&&o("nodes_empty","a trial with no attempt has no manifest to publish");let w=new Set;for(let i of u)w.has(i.attempt_id)&&o("attempt_id_not_unique",i.attempt_id),w.add(i.attempt_id);let ce=new Set(u.map(i=>i.task_id)),rt=i=>{switch(i.ref){case"attempt":case"proposal":case"outcome":return w.has(i.id);case"task":return ce.has(i.id)}};for(let i of h){if(!Dt(i.kind)){o("edge_kind_out_of_contract",i.kind);continue}let l=qt[i.kind];l.from.includes(i.from.ref)||o("edge_endpoint_type_invalid",`${i.kind}.from may not be ${i.from.ref}`),l.to.includes(i.to.ref)||o("edge_endpoint_type_invalid",`${i.kind}.to may not be ${i.to.ref}`),rt(i.from)||o("edge_endpoint_unresolved",`${i.kind}.from ${f(i.from)}`),rt(i.to)||o("edge_endpoint_unresolved",`${i.kind}.to ${f(i.to)}`)}let st=new Set;for(let i of h){let l=`${i.kind}\0${f(i.from)}\0${f(i.to)}`;st.has(l)&&o("edge_duplicated",l),st.add(l)}let de=[...h].sort(q);h.some((i,l)=>q(i,de[l])!==0)&&o("edges_out_of_order","edges are not in (kind, from, to) order");let O=t.roots?.root_attempt_id;tn(h)&&o("attempt_dag_cycle","spawn/decompose/dispatch subset contains a cycle");let $=Yt(h,O);for(let i of u)$.has(i.attempt_id)||o("attempt_dag_unrooted",i.attempt_id);let ue=[...u].sort((i,l)=>($.get(i.attempt_id)??Number.MAX_SAFE_INTEGER)-($.get(l.attempt_id)??Number.MAX_SAFE_INTEGER)||i.attempt_ordinal-l.attempt_ordinal||j(i.attempt_id,l.attempt_id));u.some((i,l)=>i.attempt_id!==ue[l].attempt_id)&&o("nodes_out_of_order","nodes are not in (depth, attempt_ordinal, attempt_id) order");let it=new Set(e.lifecycleStems);for(let i of u)it.has(i.attempt_id)||o("attempt_missing_lifecycle_pair",i.attempt_id);for(let i of it)w.has(i)||o("lifecycle_pair_missing_attempt",i);for(let i of u){let l=h.filter(M=>M.from.ref==="attempt"&&M.from.id===i.attempt_id),ut=i.edges??[];ut.length===l.length&&l.every((M,_e)=>q(M,ut[_e])===0)||o("node_edge_projection_mismatch",i.attempt_id)}let at=u.find(i=>i.attempt_id===O);(!at||$.get(O)!==0||!at.session_id)&&o("roots_parent_attempt_invalid",String(O));for(let i of u)i.trial_id!==t.trial_id&&o("node_trial_id_mismatch",i.attempt_id);t.accounting?.trial_id!==t.trial_id&&o("accounting_trial_id_mismatch",String(t.accounting?.trial_id));let ct=Object.keys(t.accounting?.proxy??{}),dt=Object.keys(t.accounting?.journal??{});ct.join(",")!==rn.join(",")&&o("accounting_shape_invalid",`proxy keys ${ct.join(",")}`),dt.join(",")!==sn.join(",")&&o("accounting_shape_invalid",`journal keys ${dt.join(",")}`);let H=t.identity;(!Jt(H?.model_execution_identity_hash)||!Jt(H?.role_tool_surface_hash)||!Q(H?.bundle_manifest_hash))&&o("identity_invalid","spawn-time identity is absent or malformed");for(let i of u){(!Number.isInteger(i.attempt_ordinal)||i.attempt_ordinal<1)&&o("attempt_ordinal_invalid",`${i.attempt_id} ordinal ${i.attempt_ordinal}`),cn(i)||o("attempt_evidence_invalid",i.attempt_id),i.superseded_by!==null&&o("superseded_by_unresolved",i.attempt_id);let l=i.task_ancestry??[];(l.length===0||l[l.length-1]!==i.task_id)&&o("task_ancestry_invalid",i.attempt_id)}let J=t.predicate?.mode,K=J&&Bt[J]?Gt(J):null,B=(t.predicate?.checks??[]).map(i=>i.check_id);if(K){let i=K.filter(l=>!B.includes(l));i.length>0?o("predicate_checks_incomplete",i.join(",")):B.join(",")!==K.join(",")&&o("predicate_checks_out_of_order",B.join(","))}for(let i of t.predicate?.checks??[])(i.result==="pass"?i.detail===null:typeof i.detail=="string"&&i.detail.length>0)||o("predicate_check_detail_invalid",i.check_id);return n}import{createHash as dn}from"node:crypto";import un from"node:fs";var Qt="cortex-bench-journal/2";function x(t){throw new Error(`production evidence journal invalid: ${t}`)}function _n(t){return dn("sha256").update(t).digest("hex")}function ln(t,e){return(t.length===0||t.at(-1)!==10)&&x(`${e} is incomplete`),t.toString("utf8").trimEnd().split(`
|
|
7
|
+
`).map((n,o)=>{try{let r=JSON.parse(n);if(!r||typeof r!="object"||Array.isArray(r))throw new Error;return r}catch{return x(`${e} row ${o+1} is malformed`)}})}function pn(t,e){let o=[[t.schema_version,Qt,"schema"],[t.type,"run_header","header"],[t.root_run_id,e.root_run_id,"root run"],[t.session_id,e.session_id,"session"],[t.agent_slot,b,"role"],[t.model_execution_identity_hash,e.model_execution_identity_hash,"model identity"],[t.role_tool_surface_hash,e.role_tool_surface_hash,"role identity"],[t.bundle_manifest_hash,e.bundle_manifest_hash,"bundle identity"]].find(([r,s])=>r!==s);o&&x(`${o[2]} mismatch for ${e.attempt_id}`)}function mn(t,e){(t.schema_version!==Qt||t.type!=="event")&&x(`event schema mismatch for ${e.attempt_id}`),[[t.root_run_id,e.root_run_id],[t.session_id,e.session_id],[t.agent_slot,b],[t.backend,e.backend],[t.provider,e.provider],[t.requested_model,e.requested_model],[t.model_execution_identity_hash,e.model_execution_identity_hash],[t.role_tool_surface_hash,e.role_tool_surface_hash],[t.bundle_manifest_hash,e.bundle_manifest_hash]].some(([o,r])=>o!==r)&&x(`event identity mismatch for ${e.attempt_id}`)}function te(t,e){let n;try{n=un.readFileSync(t.journal_path)}catch{return x(`bytes missing for ${e.attempt_id}`)}_n(n)!==t.journal_sha256&&x(`hash mismatch for ${e.attempt_id}`);let o=ln(n,e.attempt_id);pn(o[0]??{},e);let r=o.slice(1);r.length!==t.event_count&&x(`event count mismatch for ${e.attempt_id}`),r.forEach(a=>mn(a,e));let s=r.map(a=>a.reported_model).filter(a=>typeof a=="string"&&a.length>0);return{bytes:n,header:o[0],events:r,reportedModel:s.at(-1)??null,rateLimited:r.some(a=>a.event?.type==="rate_limit")}}var hn=/^[a-f0-9]{64}$/,yn=/^[A-Za-z0-9._-]+$/,T=class extends Error{constructor(e){super(`production evidence export failed: ${e}`),this.name="ProductionEvidenceExportError"}};function _(t){throw new T(t)}function k(t,e){return(typeof t!="string"||t.length===0)&&_(`${e} is missing`),t}function U(t,e){let n=k(t,e);return hn.test(n)||_(`${e} is not sha256`),n}function tt(t,e){let n=k(t,e);return(Number.isNaN(Date.parse(n))||new Date(n).toISOString()!==n)&&_(`${e} is invalid`),n}function L(t,e){return(!t||typeof t!="object"||Array.isArray(t))&&_(`${e} must be an object`),t}function gn(t,e){return typeof t=="string"&&e.includes(t)}function bn(t){if(t===void 0)return;let e=L(t,"evaluated checks");for(let[n,o]of Object.entries(e)){let r=L(o,`evaluated check ${n}`);gn(r.result,["pass","fail","unavailable"])||_(`evaluated check ${n} result is invalid`),r.detail!==null&&typeof r.detail!="string"&&_(`evaluated check ${n} detail is invalid`),r.result==="fail"&&_("failed predicate cannot be published")}}function et(t){let e=L(t,"input");k(e.outputDirectory,"output directory"),k(e.trialId,"trial identity"),k(e.rootRunId,"root run identity"),k(e.armName,"arm name"),U(e.armCanonicalSha256,"arm canonical hash"),U(e.bundleManifestHash,"bundle manifest hash"),L(e.proxyExport,"proxy export").trial_id!==e.trialId&&_("proxy trial identity mismatch"),bn(e.evaluatedChecks)}function xn(t){return fn("sha256").update(t).digest("hex")}function vn(t,e){(t.trial_id!==e.trialId||t.root_run_id!==e.rootRunId)&&_(`attempt scope mismatch for ${t.attempt_id}`),t.bundle_manifest_hash!==e.bundleManifestHash&&_(`bundle identity mismatch for ${t.attempt_id}`),U(t.model_execution_identity_hash,"model execution identity"),U(t.role_tool_surface_hash,"role tool identity"),yn.test(t.attempt_id)||_(`attempt path identity invalid: ${t.attempt_id}`)}function En(t,e){let n=tt(t.runtime.startedAt,"execution started_at"),o=tt(t.runtime.endedAt,"execution ended_at"),r=tt(e.frozen_at,"identity frozen_at");(n>r||r>o)&&_(`attempt timing mismatch for ${e.attempt_id}`),t.session.sessionId!==e.session_id&&_(`execution linkage mismatch for ${e.attempt_id}`),["completed","failed","cancelled"].includes(t.status)||_(`execution is not classifiable for ${e.attempt_id}`)}function kn(t,e){return[[t.execution_id,e.execution_id],[t.session_id,e.session_id],[t.root_attempt_id,e.root_attempt_id]].every(([o,r])=>o===r)}function Sn(t,e,n){let o=new Map(e.map(s=>[s.attempt_id,s])),r=new Map;for(let s of t.filter(a=>a.trial_id===n.trialId)){s.root_run_id!==n.rootRunId&&_("cost root run identity mismatch");let a=k(s.attempt_id,"cost attempt identity"),c=o.get(a);(!c||!kn(s,c))&&_(`cost attribution mismatch for ${a}`);let d=r.get(a)??[];d.push(s),r.set(a,d)}return r}function jn(t,e,n,o){let r=Sn(o,n,t);return n.map(s=>{vn(s,t);let a=e.getJournal(s.execution_id);(!a||a.attempt_id!==s.attempt_id||a.execution_id!==s.execution_id)&&_(`journal record missing for ${s.attempt_id}`);let c=e.getExecution(s.execution_id);return c||_(`execution record missing for ${s.attempt_id}`),En(c,s),{identity:s,journal:a,execution:c,parsedJournal:te(a,s),costs:r.get(s.attempt_id)??[]}})}function E(t,e){if(t.length===0)return null;let n=t.map(e);return n.some(o=>o==null)?null:(n.some(o=>typeof o!="number"||!Number.isFinite(o)||o<0)&&_("cost row contains an invalid counter"),n.reduce((o,r)=>o+r,0))}function An(t){let e=E(t.costs,n=>n.provider_requests);return e===0&&_(`provider request zero stand-in for ${t.identity.attempt_id}`),{steps:E(t.costs,n=>n.num_turns)??t.execution.metrics.numTurns,costUsd:E(t.costs,n=>n.cost_usd)??t.execution.metrics.costUsd,tokens:{input:E(t.costs,n=>n.input_tokens),output:E(t.costs,n=>n.output_tokens),cache_read:E(t.costs,n=>n.cache_read_tokens),cache_creation:E(t.costs,n=>n.cache_creation_tokens)},providerRequests:e}}function In(t){return{completed:{state:"completed",reason:"ok"},cancelled:{state:"cancelled",reason:"cancelled"},failed:t.parsedJournal.rateLimited?{state:"failed",reason:"rate_limited"}:{state:"failed",reason:"child_failure"}}[t.execution.status]??_(`terminal outcome missing for ${t.identity.attempt_id}`)}function Nn(t){return t.flatMap(e=>e.identity.spawn_parent_attempt_id?[{kind:"spawn",from:{ref:"attempt",id:e.identity.spawn_parent_attempt_id},to:{ref:"attempt",id:e.identity.attempt_id}}]:[])}function Tn(t,e,n,o,r){let s=Tt({trajectoryRoot:"/",state:e,startedAt:t.execution.runtime.startedAt,endedAt:t.execution.runtime.endedAt,journalPath:r,journalSha256:t.journal.journal_sha256,eventCount:t.journal.event_count,steps:o.steps,costUsd:o.costUsd,tokens:{input:o.tokens.input,output:o.tokens.output,cache_read:o.tokens.cache_read,cache_creation:o.tokens.cache_creation},modelExecutionIdentityHash:t.identity.model_execution_identity_hash,roleToolSurfaceHash:t.identity.role_tool_surface_hash,bundleManifestHash:t.identity.bundle_manifest_hash,terminalReason:n}),a=Nt(s);return a&&_(`terminal manifest ${a} for ${t.identity.attempt_id}`),Buffer.from(`${JSON.stringify(s)}
|
|
8
|
+
`,"utf8")}function wn(t,e){return t.map(n=>{let o=In(n),r=An(n),s=n.identity.attempt_id===e,a=s?"events.jsonl":`journals/${n.identity.attempt_id}.ndjson`,c=s?`run-${n.identity.root_run_id}.terminal.json`:`${n.identity.attempt_id}.terminal.json`,d=Tn(n,o.state,o.reason,r,a);return{source:n,state:o.state,reason:o.reason,usage:r,journalPath:a,terminalPath:c,terminalBytes:d,terminalSha256:xn(d)}})}function On(t){let e=Lt(t.map(n=>({attempt_id:n.source.identity.attempt_id,task_id:n.source.identity.trial_id,started_at:n.source.execution.runtime.startedAt})));return t.map(n=>{let{identity:o,execution:r,parsedJournal:s,journal:a}=n.source;return{trial_id:o.trial_id,root_run_id:o.root_run_id,task_id:o.trial_id,parent_task_id:null,dispatch_generation:null,attempt_id:o.attempt_id,attempt_ordinal:e.get(o.attempt_id),session_id:o.session_id,execution_id:o.execution_id,task_ancestry:[o.trial_id],role:b,backend:o.backend,provider:o.provider,requested_model:o.requested_model,reported_model:s.reportedModel,model_execution_identity_hash:o.model_execution_identity_hash,role_tool_surface_hash:o.role_tool_surface_hash,bundle_manifest_hash:o.bundle_manifest_hash,terminal_state:n.state,terminal_reason:n.reason,disposition:"none",superseded_by:null,artifact_path:null,artifact_sha256:null,journal_path:n.journalPath,journal_sha256:a.journal_sha256,event_count:a.event_count,terminal_manifest_path:n.terminalPath,terminal_manifest_sha256:n.terminalSha256,edges:[],started_at:r.runtime.startedAt,ended_at:r.runtime.endedAt,steps:n.usage.steps,cost_usd:n.usage.costUsd,tokens:n.usage.tokens,provider_requests:n.usage.providerRequests}})}function ee(t,e){let n=new Set(t.map(o=>e(o.identity)));return n.size!==1&&_(`role identity drift for ${b}`),{[b]:[...n][0]}}function N(t){return t.some(e=>e===null)?{status:"unavailable",reason:"journal_underivable"}:{status:"available",value:t.reduce((e,n)=>e+n,0)}}function $n(t){let e=t.map(o=>o.usage.costUsd),n=e.some(o=>o===null)?{status:"unavailable",reason:"journal_underivable"}:Rt(e.reduce((o,r)=>o+r,0));return{requests:N(t.map(o=>o.usage.providerRequests)),cost_usd:n,steps:N(t.map(o=>o.usage.steps)),tokens:{input:N(t.map(o=>o.usage.tokens.input)),output:N(t.map(o=>o.usage.tokens.output)),cached:N(t.map(o=>o.usage.tokens.cache_read))},source:"trajectory_merge",roles:[b]}}function Mn(t){let e=t.filter(n=>n.identity.spawn_parent_attempt_id===null&&n.identity.attempt_id===n.identity.root_attempt_id);return e.length!==1&&_(`real production root resolves to ${e.length} attempts`),e[0]}function Rn(t){return Buffer.from(`${JSON.stringify({root_run_id:t.source.identity.root_run_id,session_id:t.source.identity.session_id,ts:t.source.execution.runtime.startedAt,journal_path:t.journalPath})}
|
|
9
|
+
`,"utf8")}function Pn(t){let e=JSON.parse(t.terminalBytes.toString("utf8"));return!e||typeof e!="object"||Array.isArray(e)?_(`terminal bytes malformed for ${t.source.identity.attempt_id}`):e}function ne(t,e){let n=e.filter(o=>o.source.identity.spawn_parent_attempt_id===t.source.identity.attempt_id);return{fragment:{header:t.source.parsedJournal.header,events:[...t.source.parsedJournal.events],terminal:Pn(t)},children:n.map(o=>ne(o,e))}}function oe(t,e,n){t.trajectory_id=e.source.identity.attempt_id,t.extra.attempt_id=e.source.identity.attempt_id;let o=n.filter(s=>s.source.identity.spawn_parent_attempt_id===e.source.identity.attempt_id),r=t.subagent_trajectories??[];o.length!==r.length&&_("ATIF child projection mismatch"),o.forEach((s,a)=>oe(r[a],s,n))}function Cn(t){let e=t.filter(o=>o.source.identity.spawn_parent_attempt_id===null&&o.source.identity.root_attempt_id===o.source.identity.attempt_id);e.length!==1&&_(`ATIF root resolves to ${e.length} attempts`);let n=xt(ne(e[0],t));return oe(n,e[0],t),Buffer.from(`${JSON.stringify(n,null,2)}
|
|
10
|
+
`,"utf8")}function Dn(t,e){let n=new Map;for(let o of t)n.set(o.journalPath,o.source.parsedJournal.bytes),n.set(o.terminalPath.replace(".terminal.json",".started.json"),Rn(o)),n.set(o.terminalPath,o.terminalBytes);return n.set("composite-manifest.json",Wt(e)),n.set("trajectory.json",Cn(t)),n}async function re(t,e){et(t),await e.flush();let n=e.listIdentities({trialId:t.trialId,rootRunId:t.rootRunId}),o=jn(t,e,n,await e.readCosts()),r=Mn(o),s=wn(o,r.identity.attempt_id),a=Vt({trial_id:t.trialId,root_run_id:t.rootRunId,arm_name:t.armName,arm_canonical_sha256:t.armCanonicalSha256,identity:{model_execution_identity_hash:ee(o,d=>d.model_execution_identity_hash),role_tool_surface_hash:ee(o,d=>d.role_tool_surface_hash),bundle_manifest_hash:t.bundleManifestHash},nodes:On(s),edges:Nn(o),roots:{root_attempt_id:r.identity.attempt_id,root_task_id:null},accounting:Mt(t.proxyExport,$n(s)),mode:"direct",evaluatedChecks:t.evaluatedChecks}),c=Zt(a,{lifecycleStems:s.map(d=>d.source.identity.attempt_id)});return c.length>0&&_(`composite invalid: ${c.map(d=>d.code).join(",")}`),{files:Dn(s,a),terminalPaths:s.map(d=>d.terminalPath)}}var se={flush:async()=>{await Promise.all([A.flush(),G.flush()])},listIdentities:ft,getJournal:pt,getExecution:t=>A.getExecution(t),readCosts:async()=>(await G.readCosts()).entries};function v(t){throw new T(t)}function nt(t){return qn("sha256").update(t).digest("hex")}function F(t){try{return p.lstatSync(t),!0}catch(e){if(e.code==="ENOENT")return!1;throw e}}function Fn(t){let e=m.basename(t);return m.join(m.dirname(t),`.${e}.staging-${process.pid}-${Un()}`)}function ot(t,e){if(!e||m.isAbsolute(e))return v(`invalid evidence path ${e}`);let n=m.resolve(t,e),o=`${m.resolve(t)}${m.sep}`;return n.startsWith(o)?n:v(`evidence path escapes output: ${e}`)}function Hn(t,e){p.mkdirSync(m.dirname(t),{recursive:!0,mode:448});let n=p.openSync(t,p.constants.O_WRONLY|p.constants.O_CREAT|p.constants.O_EXCL,384);try{let o=0;for(;o<e.length;)o+=p.writeSync(n,e,o,e.length-o);p.fsyncSync(n)}finally{p.closeSync(n)}}function ie(t){let e=p.openSync(t,p.constants.O_RDONLY);try{p.fsyncSync(e)}finally{p.closeSync(e)}}function Jn(t,e){for(let[o,r]of e.files)Hn(ot(t,o),r);let n=new Set([t]);for(let o of e.files.keys())n.add(m.dirname(ot(t,o)));[...n].sort((o,r)=>r.length-o.length).forEach(ie)}function Kn(t,e){for(let[n,o]of e.files){let r=p.readFileSync(ot(t,n));nt(r)!==nt(o)&&v(`staged evidence changed: ${n}`)}}function Bn(t){F(t)&&p.rmSync(t,{recursive:!0})}function Gn(t,e){let n=Ln("mv",["--no-clobber","--no-target-directory","--",t,e],{encoding:"utf8"});if(n.error)throw n.error;(n.signal||n.status!==0)&&v(`atomic rename failed: ${n.stderr.trim()||n.signal||n.status}`),F(t)&&v(`output directory exists: ${e}`),F(e)||v("atomic rename produced no output")}function zn(t,e){let n=m.join(t,"composite-manifest.json"),o=e.files.get("composite-manifest.json");return o||v("composite projection is missing"),{directory:t,compositePath:n,compositeSha256:nt(o),terminalPaths:e.terminalPaths.map(r=>m.join(t,r))}}async function ae(t,e=se){et(t);let n=m.resolve(t.outputDirectory);p.mkdirSync(m.dirname(n),{recursive:!0,mode:448}),F(n)&&v(`output directory exists: ${n}`);let o=await re(t,e),r=Fn(n);try{return p.mkdirSync(r,{mode:448}),Jn(r,o),Kn(r,o),Gn(r,n),ie(m.dirname(n)),zn(n,o)}catch(s){try{Bn(r)}catch(a){throw new AggregateError([s,a],"evidence publication and cleanup failed")}throw s}}var Xn={stdout:process.stdout,stderr:process.stderr};function Wn(t){return t==="-"?gt():Yn.readFileSync(Vn.resolve(t),"utf8")}function Zn(){mt(),A.load()}var Qn={readInput:Wn,prepareProductionStores:Zn,exportEvidence:t=>ae(t)};function to(t){if(t.length!==2||t[0]!=="--input-file")throw new Error(yt("Expected exactly --input-file <path|->.",{hint:"Run 'cortex-evidence-export --help' for usage."}));if(!t[1])throw new Error("Missing value for --input-file.");return t[1]}function eo(t){try{return JSON.parse(t)}catch(e){throw new Error(`Input is not valid JSON: ${e.message}`)}}function no(t){return JSON.stringify({ok:!0,directory:t.directory,composite_path:t.compositePath,composite_sha256:t.compositeSha256,terminal_paths:t.terminalPaths})}function oo(t){return JSON.stringify({ok:!1,error:t?.message??String(t)})}async function ro(t,e=Xn,n=Qn){if(t.includes("--help")||t.includes("-h"))return e.stdout.write(`${so()}
|
|
11
|
+
`),0;let o=_t({consoleToStderr:!0,files:!1,console:!1});try{let r=eo(n.readInput(to(t)));return n.prepareProductionStores(),e.stdout.write(`${no(await n.exportEvidence(r))}
|
|
12
|
+
`),0}catch(r){return e.stderr.write(`${oo(r)}
|
|
13
|
+
`),1}finally{o()}}function so(){return ht({name:"cortex-evidence-export",description:"Publish production terminal/composite benchmark evidence v2",usage:"cortex-evidence-export --input-file <path|->",options:[{flag:"--input-file <path|->",description:"ProductionEvidenceExportInput JSON, or - for stdin"},{flag:"--help, -h",description:"Show this help"}],examples:[{description:"Read launcher input from a file",command:"cortex-evidence-export --input-file production-evidence.json"},{description:"Read launcher input from stdin",command:"cat production-evidence.json | cortex-evidence-export --input-file -"}]})}lt(new URL("dist/entry/production-evidence-export-cli.js",__cortexPackageRoot).href)&&ro(process.argv.slice(2)).then(t=>{process.exitCode=t});export{so as getProductionEvidenceExportHelp,ro as runProductionEvidenceExportCli};
|
package/dist/entry/signal-cli.js
CHANGED
|
@@ -1,199 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
name: 'cortex-signal',
|
|
9
|
-
description: 'Tell Cortex that something it is waiting for has finished.',
|
|
10
|
-
usage: 'cortex-signal [--id wp_…] [--secret …] [--status ok|fail|progress] [--message TEXT] [--exit-code N]',
|
|
11
|
-
options: [
|
|
12
|
-
{ flag: '--id <wp_…>', description: 'Waitpoint id', default: '$CORTEX_SIGNAL_ID' },
|
|
13
|
-
{ flag: '--secret <hex>', description: 'Capability issued with the waitpoint', default: '$CORTEX_SIGNAL_SECRET' },
|
|
14
|
-
{ flag: '--status <s>', description: 'ok | fail | progress', default: 'ok' },
|
|
15
|
-
{ flag: '--exit-code <n>', description: 'Set status from a command exit code (0 = ok, else fail)' },
|
|
16
|
-
{ flag: '--message <text>', description: 'One-line summary shown in the wake message' },
|
|
17
|
-
{ flag: '--member <name>', description: 'Which member of a multi-job waitpoint this is (required when it names members)' },
|
|
18
|
-
{ flag: '--data <@file|->', description: 'Extra payload from a file or stdin (treated as data, not instructions)' },
|
|
19
|
-
{ flag: '--url <url>', description: 'Daemon signal endpoint', default: 'http://127.0.0.1:$WEBHOOK_PORT/webhook/signal' },
|
|
20
|
-
{ flag: '--no-spool', description: 'Fail instead of spooling to disk when the daemon is unreachable' },
|
|
21
|
-
{ flag: '--help, -h', description: 'Show this help' },
|
|
22
|
-
],
|
|
23
|
-
examples: [
|
|
24
|
-
{ description: 'Report the exit code of the command that just ran', command: 'python train.py; cortex-signal --exit-code $?' },
|
|
25
|
-
{ description: 'Report one arm of a multi-job waitpoint', command: 'cortex-signal --member arm2 --status ok --message "33,120 steps"' },
|
|
26
|
-
{ description: 'Attach the tail of a log as data', command: 'tail -c 2000 train.log | cortex-signal --exit-code $? --data -' },
|
|
27
|
-
],
|
|
28
|
-
};
|
|
29
|
-
const VALUE_FLAGS = {
|
|
30
|
-
'--id': 'id',
|
|
31
|
-
'--secret': 'secret',
|
|
32
|
-
'--status': 'status',
|
|
33
|
-
'--message': 'message',
|
|
34
|
-
'--member': 'member',
|
|
35
|
-
'--data': 'data',
|
|
36
|
-
'--exit-code': 'exitCode',
|
|
37
|
-
'--url': 'url',
|
|
38
|
-
};
|
|
39
|
-
const STATUSES = ['ok', 'fail', 'progress'];
|
|
40
|
-
export function parseSignalArgs(argv) {
|
|
41
|
-
const parsed = {
|
|
42
|
-
help: false, id: null, secret: null, status: null, message: null,
|
|
43
|
-
data: null, member: null, exitCode: null, url: null, noSpool: false,
|
|
44
|
-
};
|
|
45
|
-
for (let i = 0; i < argv.length; i += 1) {
|
|
46
|
-
const token = argv[i];
|
|
47
|
-
if (token === '--help' || token === '-h') {
|
|
48
|
-
parsed.help = true;
|
|
49
|
-
continue;
|
|
50
|
-
}
|
|
51
|
-
if (token === '--no-spool') {
|
|
52
|
-
parsed.noSpool = true;
|
|
53
|
-
continue;
|
|
54
|
-
}
|
|
55
|
-
const field = VALUE_FLAGS[token];
|
|
56
|
-
if (!field) {
|
|
57
|
-
throw cliError(formatError(`Unknown argument: '${token}'`, {
|
|
58
|
-
validValues: [...Object.keys(VALUE_FLAGS), '--no-spool', '--help'],
|
|
59
|
-
}));
|
|
60
|
-
}
|
|
61
|
-
const value = argv[i + 1];
|
|
62
|
-
if (value === undefined || (value.startsWith('--') && field !== 'message')) {
|
|
63
|
-
throw cliError(formatError(`${token} requires a value`));
|
|
64
|
-
}
|
|
65
|
-
parsed[field] = value;
|
|
66
|
-
i += 1;
|
|
67
|
-
}
|
|
68
|
-
return parsed;
|
|
69
|
-
}
|
|
70
|
-
/** `--exit-code` is the ergonomic form: one flag turns `$?` into both a status and a message. */
|
|
71
|
-
function resolveStatus(parsed) {
|
|
72
|
-
if (parsed.status !== null && !STATUSES.includes(parsed.status)) {
|
|
73
|
-
throw cliError(formatError(`Invalid --status '${parsed.status}'`, { validValues: STATUSES }));
|
|
74
|
-
}
|
|
75
|
-
if (parsed.exitCode === null)
|
|
76
|
-
return { status: parsed.status ?? 'ok', message: parsed.message };
|
|
77
|
-
const code = Number.parseInt(parsed.exitCode, 10);
|
|
78
|
-
if (!Number.isFinite(code)) {
|
|
79
|
-
throw cliError(formatError(`--exit-code must be a number, got '${parsed.exitCode}'`));
|
|
80
|
-
}
|
|
81
|
-
return { status: parsed.status ?? (code === 0 ? 'ok' : 'fail'), message: parsed.message ?? `exit=${code}` };
|
|
82
|
-
}
|
|
83
|
-
function readData(spec) {
|
|
84
|
-
if (spec === null)
|
|
85
|
-
return undefined;
|
|
86
|
-
if (spec === '-')
|
|
87
|
-
return readStdinSync();
|
|
88
|
-
if (spec.startsWith('@')) {
|
|
89
|
-
const file = spec.slice(1);
|
|
90
|
-
try {
|
|
91
|
-
return fs.readFileSync(file, 'utf8');
|
|
92
|
-
}
|
|
93
|
-
catch (error) {
|
|
94
|
-
throw cliError(formatError(`Cannot read --data file '${file}': ${error.message}`));
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
return spec;
|
|
98
|
-
}
|
|
99
|
-
async function httpPost(url, body) {
|
|
100
|
-
const response = await fetch(url, {
|
|
101
|
-
method: 'POST',
|
|
102
|
-
headers: { 'content-type': 'application/json' },
|
|
103
|
-
body: JSON.stringify(body),
|
|
104
|
-
});
|
|
105
|
-
const text = await response.text();
|
|
106
|
-
let parsed = text;
|
|
107
|
-
try {
|
|
108
|
-
parsed = JSON.parse(text);
|
|
109
|
-
}
|
|
110
|
-
catch { /* non-JSON bodies surface as text */ }
|
|
111
|
-
return { status: response.status, body: parsed };
|
|
112
|
-
}
|
|
113
|
-
function defaultSpoolDir(env) {
|
|
114
|
-
const home = env.CORTEX_HOME ? path.resolve(env.CORTEX_HOME) : path.join(os.homedir(), '.cortex');
|
|
115
|
-
return path.join(home, 'tmp', 'signals');
|
|
116
|
-
}
|
|
117
|
-
/** Write-then-rename: a same-directory rename is atomic, so a drain never sees a half file. */
|
|
118
|
-
function writeSpoolFile(dir, name, contents) {
|
|
119
|
-
fs.mkdirSync(dir, { recursive: true });
|
|
120
|
-
const tmp = path.join(dir, `${name}.tmp`);
|
|
121
|
-
fs.writeFileSync(tmp, contents);
|
|
122
|
-
fs.renameSync(tmp, path.join(dir, name));
|
|
123
|
-
}
|
|
124
|
-
export async function runSignalCli(argv, options = {}) {
|
|
125
|
-
const env = options.env ?? process.env;
|
|
126
|
-
try {
|
|
127
|
-
const parsed = parseSignalArgs(argv);
|
|
128
|
-
if (parsed.help || argv.length === 0) {
|
|
129
|
-
return { exitCode: 0, stdout: formatHelp(HELP), stderr: '' };
|
|
130
|
-
}
|
|
131
|
-
const id = parsed.id ?? env.CORTEX_SIGNAL_ID ?? null;
|
|
132
|
-
const secret = parsed.secret ?? env.CORTEX_SIGNAL_SECRET ?? null;
|
|
133
|
-
if (!id || !secret) {
|
|
134
|
-
return {
|
|
135
|
-
exitCode: 2,
|
|
136
|
-
stdout: '',
|
|
137
|
-
stderr: formatError('A waitpoint id and secret are required', {
|
|
138
|
-
hint: 'Pass --id/--secret, or export CORTEX_SIGNAL_ID and CORTEX_SIGNAL_SECRET (wait_create prints both).',
|
|
139
|
-
}),
|
|
140
|
-
};
|
|
141
|
-
}
|
|
142
|
-
const { status, message } = resolveStatus(parsed);
|
|
143
|
-
const payload = { id, secret, status };
|
|
144
|
-
if (message)
|
|
145
|
-
payload.message = message;
|
|
146
|
-
if (parsed.member)
|
|
147
|
-
payload.member = parsed.member;
|
|
148
|
-
const data = readData(parsed.data);
|
|
149
|
-
if (data !== undefined)
|
|
150
|
-
payload.data = data;
|
|
151
|
-
const port = env.WEBHOOK_PORT || '3001';
|
|
152
|
-
const url = parsed.url ?? `http://127.0.0.1:${port}/webhook/signal`;
|
|
153
|
-
const post = options.post ?? httpPost;
|
|
154
|
-
let response;
|
|
155
|
-
try {
|
|
156
|
-
response = await post(url, payload);
|
|
157
|
-
}
|
|
158
|
-
catch (error) {
|
|
159
|
-
// The daemon is down, or this machine has no route to it. Spooling is not a fallback for
|
|
160
|
-
// failure — it is the normal path on a remote device, where the daemon collects the file.
|
|
161
|
-
if (parsed.noSpool) {
|
|
162
|
-
return { exitCode: 1, stdout: '', stderr: formatError(`Cannot reach ${url}: ${error.message}`) };
|
|
163
|
-
}
|
|
164
|
-
const dir = options.spoolDir ?? defaultSpoolDir(env);
|
|
165
|
-
const name = `${Date.now()}-${process.pid}-${Math.random().toString(36).slice(2, 8)}.json`;
|
|
166
|
-
writeSpoolFile(dir, name, JSON.stringify(payload));
|
|
167
|
-
return { exitCode: 0, stdout: `spooled ${path.join(dir, name)}`, stderr: '' };
|
|
168
|
-
}
|
|
169
|
-
if (response.status === 202) {
|
|
170
|
-
const note = response.body?.fired ? ' (waitpoint fired)'
|
|
171
|
-
: response.body?.held ? ' (hourly wake cap reached; the wake is delivered once it clears)' : '';
|
|
172
|
-
return { exitCode: 0, stdout: `accepted${note}`, stderr: '' };
|
|
173
|
-
}
|
|
174
|
-
if (response.status === 410) {
|
|
175
|
-
// Not an error worth failing a build over: the waitpoint did its job already.
|
|
176
|
-
return { exitCode: 0, stdout: `already resolved (${response.body?.state ?? 'unknown'})`, stderr: '' };
|
|
177
|
-
}
|
|
178
|
-
const detail = typeof response.body === 'object' && response.body?.error ? response.body.error : String(response.body ?? '');
|
|
179
|
-
return { exitCode: 1, stdout: '', stderr: formatError(`Signal refused (HTTP ${response.status}): ${detail}`) };
|
|
180
|
-
}
|
|
181
|
-
catch (error) {
|
|
182
|
-
// cliError() tags usage problems with cliMessage; exit 2 is the usage code (CLI Rule ④).
|
|
183
|
-
const cliMessage = error.cliMessage;
|
|
184
|
-
if (cliMessage)
|
|
185
|
-
return { exitCode: 2, stdout: '', stderr: cliMessage };
|
|
186
|
-
return { exitCode: 1, stdout: '', stderr: error.message };
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
export async function main(argv = process.argv.slice(2)) {
|
|
190
|
-
const result = await runSignalCli(argv);
|
|
191
|
-
if (result.stdout)
|
|
192
|
-
process.stdout.write(`${result.stdout}\n`);
|
|
193
|
-
if (result.stderr)
|
|
194
|
-
process.stderr.write(`${result.stderr}\n`);
|
|
195
|
-
process.exitCode = result.exitCode;
|
|
196
|
-
}
|
|
197
|
-
if (isMainModule(import.meta.url)) {
|
|
198
|
-
void main();
|
|
199
|
-
}
|
|
2
|
+
import { createRequire as __cortexCreateRequire } from 'node:module';
|
|
3
|
+
const require = __cortexCreateRequire(import.meta.url);
|
|
4
|
+
const __cortexPackageRoot = new URL("../../", import.meta.url);
|
|
5
|
+
import{a as S,b as n,c as y,d as c}from"../chunks/chunk-PMG4YGDU.js";import{b as w}from"../chunks/chunk-QWAQHHRS.js";import"../chunks/chunk-J5DVLUKY.js";import"../chunks/chunk-WHC7AYZD.js";import*as d from"node:fs";import*as $ from"node:os";import*as a from"node:path";var k={name:"cortex-signal",description:"Tell Cortex that something it is waiting for has finished.",usage:"cortex-signal [--id wp_\u2026] [--secret \u2026] [--status ok|fail|progress] [--message TEXT] [--exit-code N]",options:[{flag:"--id <wp_\u2026>",description:"Waitpoint id",default:"$CORTEX_SIGNAL_ID"},{flag:"--secret <hex>",description:"Capability issued with the waitpoint",default:"$CORTEX_SIGNAL_SECRET"},{flag:"--status <s>",description:"ok | fail | progress",default:"ok"},{flag:"--exit-code <n>",description:"Set status from a command exit code (0 = ok, else fail)"},{flag:"--message <text>",description:"One-line summary shown in the wake message"},{flag:"--member <name>",description:"Which member of a multi-job waitpoint this is (required when it names members)"},{flag:"--data <@file|->",description:"Extra payload from a file or stdin (treated as data, not instructions)"},{flag:"--url <url>",description:"Daemon signal endpoint",default:"http://127.0.0.1:$WEBHOOK_PORT/webhook/signal"},{flag:"--no-spool",description:"Fail instead of spooling to disk when the daemon is unreachable"},{flag:"--help, -h",description:"Show this help"}],examples:[{description:"Report the exit code of the command that just ran",command:"python train.py; cortex-signal --exit-code $?"},{description:"Report one arm of a multi-job waitpoint",command:'cortex-signal --member arm2 --status ok --message "33,120 steps"'},{description:"Attach the tail of a log as data",command:"tail -c 2000 train.log | cortex-signal --exit-code $? --data -"}]},b={"--id":"id","--secret":"secret","--status":"status","--message":"message","--member":"member","--data":"data","--exit-code":"exitCode","--url":"url"},C=["ok","fail","progress"];function R(t){let e={help:!1,id:null,secret:null,status:null,message:null,data:null,member:null,exitCode:null,url:null,noSpool:!1};for(let o=0;o<t.length;o+=1){let s=t[o];if(s==="--help"||s==="-h"){e.help=!0;continue}if(s==="--no-spool"){e.noSpool=!0;continue}let r=b[s];if(!r)throw c(n(`Unknown argument: '${s}'`,{validValues:[...Object.keys(b),"--no-spool","--help"]}));let l=t[o+1];if(l===void 0||l.startsWith("--")&&r!=="message")throw c(n(`${s} requires a value`));e[r]=l,o+=1}return e}function j(t){if(t.status!==null&&!C.includes(t.status))throw c(n(`Invalid --status '${t.status}'`,{validValues:C}));if(t.exitCode===null)return{status:t.status??"ok",message:t.message};let e=Number.parseInt(t.exitCode,10);if(!Number.isFinite(e))throw c(n(`--exit-code must be a number, got '${t.exitCode}'`));return{status:t.status??(e===0?"ok":"fail"),message:t.message??`exit=${e}`}}function v(t){if(t!==null){if(t==="-")return y();if(t.startsWith("@")){let e=t.slice(1);try{return d.readFileSync(e,"utf8")}catch(o){throw c(n(`Cannot read --data file '${e}': ${o.message}`))}}return t}}async function A(t,e){let o=await fetch(t,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)}),s=await o.text(),r=s;try{r=JSON.parse(s)}catch{}return{status:o.status,body:r}}function N(t){let e=t.CORTEX_HOME?a.resolve(t.CORTEX_HOME):a.join($.homedir(),".cortex");return a.join(e,"tmp","signals")}function I(t,e,o){d.mkdirSync(t,{recursive:!0});let s=a.join(t,`${e}.tmp`);d.writeFileSync(s,o),d.renameSync(s,a.join(t,e))}async function L(t,e={}){let o=e.env??process.env;try{let s=R(t);if(s.help||t.length===0)return{exitCode:0,stdout:S(k),stderr:""};let r=s.id??o.CORTEX_SIGNAL_ID??null,l=s.secret??o.CORTEX_SIGNAL_SECRET??null;if(!r||!l)return{exitCode:2,stdout:"",stderr:n("A waitpoint id and secret are required",{hint:"Pass --id/--secret, or export CORTEX_SIGNAL_ID and CORTEX_SIGNAL_SECRET (wait_create prints both)."})};let{status:E,message:f}=j(s),u={id:r,secret:l,status:E};f&&(u.message=f),s.member&&(u.member=s.member);let m=v(s.data);m!==void 0&&(u.data=m);let O=o.WEBHOOK_PORT||"3001",p=s.url??`http://127.0.0.1:${O}/webhook/signal`,_=e.post??A,i;try{i=await _(p,u)}catch(h){if(s.noSpool)return{exitCode:1,stdout:"",stderr:n(`Cannot reach ${p}: ${h.message}`)};let g=e.spoolDir??N(o),x=`${Date.now()}-${process.pid}-${Math.random().toString(36).slice(2,8)}.json`;return I(g,x,JSON.stringify(u)),{exitCode:0,stdout:`spooled ${a.join(g,x)}`,stderr:""}}if(i.status===202)return{exitCode:0,stdout:`accepted${i.body?.fired?" (waitpoint fired)":i.body?.held?" (hourly wake cap reached; the wake is delivered once it clears)":""}`,stderr:""};if(i.status===410)return{exitCode:0,stdout:`already resolved (${i.body?.state??"unknown"})`,stderr:""};let T=typeof i.body=="object"&&i.body?.error?i.body.error:String(i.body??"");return{exitCode:1,stdout:"",stderr:n(`Signal refused (HTTP ${i.status}): ${T}`)}}catch(s){let r=s.cliMessage;return r?{exitCode:2,stdout:"",stderr:r}:{exitCode:1,stdout:"",stderr:s.message}}}async function X(t=process.argv.slice(2)){let e=await L(t);e.stdout&&process.stdout.write(`${e.stdout}
|
|
6
|
+
`),e.stderr&&process.stderr.write(`${e.stderr}
|
|
7
|
+
`),process.exitCode=e.exitCode}w(new URL("dist/entry/signal-cli.js",__cortexPackageRoot).href)&&X();export{X as main,R as parseSignalArgs,L as runSignalCli};
|