@cortex-agent/server 2026.10.21 → 2026.10.27
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 +10 -6
- package/THIRD_PARTY_NOTICES.txt +16546 -0
- package/defaults/context/projects/AGENTS.md +1 -1
- package/defaults/gitignore +3 -3
- package/defaults/hooks/new-session-hook.mjs +1 -1
- package/defaults/hooks/status-md-guard.mjs +6 -6
- package/defaults/plugins/cortex-system/plugin.json +1 -1
- package/defaults/plugins/cortex-system/skills/client-manage/SKILL.md +16 -9
- package/defaults/plugins/cortex-system/skills/project-init/SKILL.md +2 -2
- package/defaults/prompts/clean-workspace.md +21 -0
- package/defaults/rules/agents-md.md +1 -1
- package/defaults/rules/issues-md.md +1 -1
- package/defaults/rules/meta-conventions.md +3 -3
- package/defaults/rules/mission-md.md +1 -1
- package/defaults/rules/status-md.md +1 -1
- package/dist/agent-adapter/claude/remote-mcp-proxy.js +4 -66
- package/dist/build-info.json +1 -0
- 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/client.mjs +10 -5
- package/dist/client-bundle/manifest.json +2 -2
- 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 -593
- 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 -895
- 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 -201
- 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-BmiXB1z5.js +2 -0
- package/web/dist/assets/index-DqWMdMkh.css +1 -0
- package/web/dist/assets/index-XBRXpnC5.js +1 -0
- package/web/dist/assets/index-btKNdkvc.js +525 -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 -103
- package/dist/agent-adapter/claude/bg-task-tracker.js +0 -164
- 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 -131
- 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 -219
- package/dist/agent-adapter/claude/turn-machine.js +0 -728
- 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 -128
- package/dist/agent-adapter/continuation-phase.js +0 -340
- 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 -165
- package/dist/agent-adapter/run-events.js +0 -119
- package/dist/agent-adapter/types.d.ts +0 -323
- 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 -85
- package/dist/core/claude-credentials.js +0 -231
- 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 -135
- package/dist/core/gateway-generator.js +0 -521
- 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 -106
- 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 -910
- 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 -152
- package/dist/core/locales/slices/init.js +0 -429
- 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 -13
- package/dist/core/log.js +0 -157
- 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 -296
- package/dist/core/settings-spec.js +0 -305
- 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 -171
- package/dist/core/types/agent-types.js +0 -1
- package/dist/core/types/environment-types.d.ts +0 -50
- 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 -162
- 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 -68
- package/dist/domain/agents/environments/schema.js +0 -114
- 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 -136
- 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 -70
- package/dist/domain/mcp/tools/context.js +0 -107
- 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 -33
- package/dist/domain/monitor/event-loop-monitor.js +0 -60
- 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 -39
- package/dist/domain/plugins/authoring.js +0 -320
- 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 -10
- package/dist/domain/plugins/runtime-gc.js +0 -68
- package/dist/domain/plugins/runtime.d.ts +0 -21
- package/dist/domain/plugins/runtime.js +0 -554
- 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 -320
- 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 -22
- 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 -12
- package/dist/domain/runs/service.js +0 -49
- 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 -19
- package/dist/domain/scheduling/builtin-job-controller.js +0 -103
- 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 -37
- 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 -303
- 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 -88
- 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/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 -1136
- package/dist/domain/ui-service/app-router.js +0 -305
- 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 -1068
- package/dist/domain/ui-service/input-schemas.js +0 -702
- package/dist/domain/ui-service/mutate/approvals.d.ts +0 -32
- package/dist/domain/ui-service/mutate/approvals.js +0 -133
- 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/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 -118
- 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 -132
- 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 -24
- package/dist/domain/ui-service/query/models.js +0 -108
- 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 -57
- 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 -429
- 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/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 -47
- package/dist/domain/ui-service/trpc.js +0 -43
- package/dist/domain/ui-service/types.d.ts +0 -1790
- package/dist/domain/ui-service/types.js +0 -1
- package/dist/domain/ui-service/ui-service.d.ts +0 -512
- package/dist/domain/ui-service/ui-service.js +0 -234
- 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 -277
- 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 -148
- package/dist/entry/init.js +0 -1270
- 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 -81
- 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 -166
- 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/ui-cli.d.ts +0 -13
- package/dist/entry/ui-cli.js +0 -78
- 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 -262
- 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 -60
- package/dist/orchestration/routing/webhook.d.ts +0 -10
- package/dist/orchestration/routing/webhook.js +0 -432
- 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 -77
- package/dist/orchestration/transcript-sink.js +0 -250
- 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 -180
- 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 -49
- package/dist/platform/ui-http/ui-auth-routes.js +0 -113
- package/dist/platform/ui-http/ui-http-server.d.ts +0 -93
- package/dist/platform/ui-http/ui-http-server.js +0 -306
- 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-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/hook-registry.d.ts +0 -101
- package/dist/store/hook-registry.js +0 -314
- 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 -868
- 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 -115
- package/dist/store/version-migrations.js +0 -1371
- 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 -88
- 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-CB4GJ6qO.js +0 -2
- package/web/dist/assets/index-CaSZPg_H.css +0 -1
- package/web/dist/assets/index-CzOR7Edh.js +0 -522
- package/web/dist/assets/index-cIGFv27z.js +0 -1
|
@@ -12,7 +12,7 @@ One subdirectory per active project.
|
|
|
12
12
|
|
|
13
13
|
| File | Type | Purpose |
|
|
14
14
|
|------|------|---------|
|
|
15
|
-
| `STATUS.md` | Overwrite | Present-tense state register: overwritten when the project situation changes (hard
|
|
15
|
+
| `STATUS.md` | Overwrite | Present-tense state register: overwritten when the project situation changes (hard caps <=80 lines and <=6KB, exceeding either is rejected; see rules/status-md.md) |
|
|
16
16
|
| `ISSUES.md` | Append | Record issues affecting work efficiency |
|
|
17
17
|
| `experiments/` | Atomic file | One `.md` file per experiment (YAML frontmatter + body), `index.md` auto-generated |
|
|
18
18
|
| `knowledge/` | Atomic file | One `.md` file per knowledge entry, `index.md` auto-generated |
|
package/defaults/gitignore
CHANGED
|
@@ -38,9 +38,9 @@ __pycache__/
|
|
|
38
38
|
.venv/
|
|
39
39
|
|
|
40
40
|
# Generated: memory index files (auto-rebuilt by memory-watcher / memory-index-regen)
|
|
41
|
-
projects/*/experiments/index.md
|
|
42
|
-
projects/*/knowledge/index.md
|
|
43
|
-
projects/*/patterns/index.md
|
|
41
|
+
context/projects/*/experiments/index.md
|
|
42
|
+
context/projects/*/knowledge/index.md
|
|
43
|
+
context/projects/*/patterns/index.md
|
|
44
44
|
|
|
45
45
|
# Local worktrees
|
|
46
46
|
.claude/worktrees/
|
|
@@ -40,7 +40,7 @@ Examples of what to record:
|
|
|
40
40
|
- A new project dependency or constraint was discovered → update STATUS.md
|
|
41
41
|
|
|
42
42
|
File update rules you MUST respect:
|
|
43
|
-
- **STATUS.md** — state register (hard
|
|
43
|
+
- **STATUS.md** — state register (hard caps <=80 lines and <=6KB; exceeding either is rejected): replace stale lines with the latest state, never append; one line + pointer per change, details live in EXP/K entries; adding a line requires checking which old lines expired
|
|
44
44
|
- **ISSUES.md** — append mode: add new entries at the end, keep history
|
|
45
45
|
- **knowledge/K-NNN.md** — atomic: one file per knowledge entry, with YAML frontmatter
|
|
46
46
|
- **knowledge/index.md, experiments/index.md, patterns/index.md** — AUTO-GENERATED, do NOT edit manually
|
|
@@ -24,7 +24,7 @@ const LIMIT_RULES = [
|
|
|
24
24
|
maxBytes: 6 * 1024,
|
|
25
25
|
warnLines: 60,
|
|
26
26
|
warnBytes: 4 * 1024,
|
|
27
|
-
capLabel: '80 lines
|
|
27
|
+
capLabel: '<=80 lines and <=6KB',
|
|
28
28
|
trimAdvice: [
|
|
29
29
|
'STATUS is a state register, not a changelog. Trim before writing:',
|
|
30
30
|
'- delete entries that no longer affect decisions (their content already lives in git / EXP records),',
|
|
@@ -40,7 +40,7 @@ const LIMIT_RULES = [
|
|
|
40
40
|
maxBytes: 6 * 1024,
|
|
41
41
|
warnLines: 60,
|
|
42
42
|
warnBytes: 4 * 1024,
|
|
43
|
-
capLabel: '80 lines
|
|
43
|
+
capLabel: '<=80 lines and <=6KB',
|
|
44
44
|
trimAdvice: [
|
|
45
45
|
'ISSUES.md is a friction log with <=4-line entries. Trim before writing:',
|
|
46
46
|
'- delete resolved entries outright (no changelog),',
|
|
@@ -56,7 +56,7 @@ const LIMIT_RULES = [
|
|
|
56
56
|
maxBytes: 8 * 1024,
|
|
57
57
|
warnLines: 90,
|
|
58
58
|
warnBytes: 6656,
|
|
59
|
-
capLabel: '120 lines
|
|
59
|
+
capLabel: '<=120 lines and <=8KB',
|
|
60
60
|
trimAdvice: [
|
|
61
61
|
'AGENTS.md is a directory index loaded into every agent that works here: it answers "what is here, where to look", not the content itself. Trim before writing:',
|
|
62
62
|
'- collapse atomic directories (experiments/ knowledge/ patterns/ decisions/) to one line each pointing at their index.md,',
|
|
@@ -89,7 +89,7 @@ function proposedContent(toolName, toolInput, currentContent) {
|
|
|
89
89
|
|
|
90
90
|
function denyReason(rule, lineCount, byteCount) {
|
|
91
91
|
return [
|
|
92
|
-
`${rule.name} write rejected: the result would be ${lineCount} lines / ${byteCount} bytes — the hard cap is ${rule.capLabel} (${rule.ruleFile}).`,
|
|
92
|
+
`${rule.name} write rejected: the result would be ${lineCount} lines / ${byteCount} bytes — the hard cap is ${rule.capLabel}, and exceeding either limit is rejected (${rule.ruleFile}).`,
|
|
93
93
|
'',
|
|
94
94
|
...rule.trimAdvice,
|
|
95
95
|
'',
|
|
@@ -150,9 +150,9 @@ function main() {
|
|
|
150
150
|
hookSpecificOutput: {
|
|
151
151
|
hookEventName: 'PreToolUse',
|
|
152
152
|
permissionDecision: 'allow',
|
|
153
|
-
permissionDecisionReason: `Still over the ${rule.name} cap (${lineCount} lines / ${byteCount} bytes
|
|
153
|
+
permissionDecisionReason: `Still over the ${rule.name} cap (${lineCount} lines / ${byteCount} bytes; cap ${rule.capLabel}) but shrinking — keep trimming until both limits are met.`,
|
|
154
154
|
},
|
|
155
|
-
systemMessage: `${rule.name} is still over
|
|
155
|
+
systemMessage: `${rule.name} is still over its cap of ${rule.capLabel} (${lineCount} lines / ${byteCount} bytes). This write shrinks it and is allowed — keep trimming.`,
|
|
156
156
|
}));
|
|
157
157
|
return;
|
|
158
158
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
|
|
3
3
|
"name": "cortex-system",
|
|
4
|
-
"version": "0.7.
|
|
4
|
+
"version": "0.7.1",
|
|
5
5
|
"description": "Cortex system skill bundle — approval / browser / client-manage / project-init / schedule / user-learn."
|
|
6
6
|
}
|
|
@@ -4,8 +4,8 @@ description: "Use when creating, deploying, updating, or troubleshooting cortex-
|
|
|
4
4
|
allowed-tools: Read, Write, Edit, Bash, mcp__cortex-core__remote_bash, mcp__cortex-core__remote_read, mcp__cortex-core__remote_write, mcp__cortex-core__remote_edit, mcp__cortex-core__remote_glob, mcp__cortex-core__remote_grep
|
|
5
5
|
metadata:
|
|
6
6
|
author: "Cortex"
|
|
7
|
-
version: "1.4.
|
|
8
|
-
date: "2026-
|
|
7
|
+
version: "1.4.1"
|
|
8
|
+
date: "2026-10-22"
|
|
9
9
|
---
|
|
10
10
|
|
|
11
11
|
# Client Manage
|
|
@@ -52,7 +52,13 @@ The client resolves its server URL by precedence (`server-url.ts`): `CORTEX_SERV
|
|
|
52
52
|
- `clientToken` — The server's `CORTEX_CLIENT_TOKEN` (see Authentication). Required unless injected via the `CORTEX_CLIENT_TOKEN` env at launch.
|
|
53
53
|
- `deviceName` — Must match the name in `machines.json` on the server.
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
Who writes this file:
|
|
56
|
+
|
|
57
|
+
- The bootstrap script (step 2 below) writes `serverHost`, `serverPort` and `deviceName`, replacing the whole file. Re-running bootstrap drops any `serverUrl` or `clientToken` you added.
|
|
58
|
+
- `cortex init` writes it for a local desktop client it prepares, and server startup finishes an interrupted preparation. It records ownership in `client/local-install.json` and refuses to overwrite a config that was edited afterwards.
|
|
59
|
+
- `cortex client remove` deletes it together with the client install.
|
|
60
|
+
|
|
61
|
+
Any other edit, such as switching a device to `serverUrl`, is yours to make on the device.
|
|
56
62
|
|
|
57
63
|
## Connectivity — The Most Important Part
|
|
58
64
|
|
|
@@ -97,7 +103,7 @@ Test each candidate from the remote device. Use the first one that works.
|
|
|
97
103
|
Read `machines.json` on the server for the current device list. Key fields per device:
|
|
98
104
|
|
|
99
105
|
- `ssh` — How the server reaches this device (empty = local)
|
|
100
|
-
- `cortexPath` —
|
|
106
|
+
- `cortexPath` — The user's home directory on the device (`/home/<user>`, `C:\Users\<user>` on Windows). It must exist: the Machines panel reports disk space for the filesystem holding it, and relative `!sendfile` paths resolve against it
|
|
101
107
|
- `gpuCount` — Number of GPUs
|
|
102
108
|
- `win` — `true` for Windows
|
|
103
109
|
- `clientCommand` — (optional) command the server runs over SSH to launch the client; defaults to `node "$HOME/.cortex/client/current/client.mjs"` (`%USERPROFILE%` on Windows). Override on machines where `node` isn't on the **non-login** SSH PATH — e.g. nvm installs: set an absolute node path like `"/home/u/.nvm/versions/node/v20.19.5/bin/node /home/u/.cortex/client/current/client.mjs"`. See Troubleshooting.
|
|
@@ -106,7 +112,7 @@ Read `machines.json` on the server for the current device list. Key fields per d
|
|
|
106
112
|
|
|
107
113
|
### 1. Register in machines.json
|
|
108
114
|
|
|
109
|
-
Edit `machines.json` on the server to add the device entry.
|
|
115
|
+
Edit `machines.json` on the server to add the device entry. Set `cortexPath` to the user's home directory on the device and confirm it exists (`ssh user@host 'echo $HOME'`).
|
|
110
116
|
|
|
111
117
|
### 2. Deploy the client bundle
|
|
112
118
|
|
|
@@ -180,13 +186,14 @@ To force a refresh, kill the client — the server relaunches it and the reconne
|
|
|
180
186
|
ssh user@host "pkill -f client.mjs"
|
|
181
187
|
```
|
|
182
188
|
|
|
183
|
-
If a bad bundle leaves the client unable to start,
|
|
189
|
+
If a bad bundle leaves the client unable to start, switch back to the prior version in `previous/` or re-run the bootstrap deployment (step 2 above). `current/` and `previous/` are real directories, not symlinks. Move the failing version aside into an unused name rather than deleting it; the command checks that `previous/` exists and `broken/` is free before moving anything:
|
|
184
190
|
|
|
185
191
|
```bash
|
|
186
|
-
ssh user@host
|
|
187
|
-
# or re-run the bootstrap deployment (step 2 above)
|
|
192
|
+
ssh user@host 'cd ~/.cortex/client && test -d previous && test ! -e broken && mv current broken && mv previous current'
|
|
188
193
|
```
|
|
189
194
|
|
|
195
|
+
On Windows devices, run the PowerShell form from `docs/cross-machine.md`. The server relaunches the client from `current/`. On reconnect it pushes its own bundle again whenever the hashes differ, so a rollback holds only until the server's bundle is fixed; setting `clientHotReloadEnabled` to `false` in the server's `settings.json` turns update pushes off meanwhile. Remove `broken/` once the device is healthy.
|
|
196
|
+
|
|
190
197
|
### Edit the config
|
|
191
198
|
|
|
192
199
|
```
|
|
@@ -201,7 +208,7 @@ mcp__cortex-core__remote_edit({
|
|
|
201
208
|
After editing, kill the client — server will restart it:
|
|
202
209
|
|
|
203
210
|
```bash
|
|
204
|
-
ssh user@host "pkill -f
|
|
211
|
+
ssh user@host "pkill -f client.mjs"
|
|
205
212
|
```
|
|
206
213
|
|
|
207
214
|
## Troubleshooting
|
|
@@ -51,7 +51,7 @@ This is the entry point for future sessions. Must include:
|
|
|
51
51
|
|
|
52
52
|
| File | Type | Purpose |
|
|
53
53
|
|------|------|---------|
|
|
54
|
-
| STATUS.md | Overwrite | Present-tense state register (hard
|
|
54
|
+
| STATUS.md | Overwrite | Present-tense state register (hard caps <=80 lines and <=6KB; exceeding either is rejected) |
|
|
55
55
|
| experiments/ | Atomic file | One EXP-NNN.md per experiment (YAML frontmatter + body), index.md auto-generated |
|
|
56
56
|
| knowledge/ | Atomic file | One K-NNN.md per knowledge entry, index.md auto-generated |
|
|
57
57
|
| patterns/ | Atomic file | Cross-experiment patterns, index.md auto-generated |
|
|
@@ -80,7 +80,7 @@ This is the entry point for future sessions. Must include:
|
|
|
80
80
|
|
|
81
81
|
### STATUS.md (required) — Current state snapshot
|
|
82
82
|
|
|
83
|
-
Format is governed by `rules/status-md.md` (overwrite-style state register, hard
|
|
83
|
+
Format is governed by `rules/status-md.md` (overwrite-style state register, hard caps <=80 lines and <=6KB with either one rejecting the write, each bullet <=2 lines, facts with a durable home appear as pointers only):
|
|
84
84
|
|
|
85
85
|
```markdown
|
|
86
86
|
# [Project Name] Status
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
## Workspace
|
|
2
|
+
|
|
3
|
+
Your workspace is the current directory, {{workspace}}. Use it and this conversation as your
|
|
4
|
+
sources for this task. You may also access files or directories outside the workspace that the
|
|
5
|
+
user explicitly authorizes for this task, within the authorized paths and operations. Files given
|
|
6
|
+
for the task are in `inputs/`; treat them as reference unless asked to change them.
|
|
7
|
+
|
|
8
|
+
- Read, search and list files only inside the workspace or user-authorized paths. Do not open,
|
|
9
|
+
grep, glob or ls anywhere else — home, parent directories, other projects, configuration or
|
|
10
|
+
history folders — however relevant a path looks.
|
|
11
|
+
- Write only inside the workspace unless the user explicitly authorizes writing to an external
|
|
12
|
+
file or directory. Put scratch files in `tmp/` here, not in /tmp.
|
|
13
|
+
- Running programs is fine. Interpreters, compilers, libraries, package managers and system tools
|
|
14
|
+
read their own files wherever they are installed; that is not crossing the boundary. Using them
|
|
15
|
+
to access files beyond the workspace and user-authorized paths is crossing the boundary.
|
|
16
|
+
- A path merely appearing in the task, an error, or a config file is not authorization. If you
|
|
17
|
+
need an external path the user has not authorized, name it and explain why, ask for permission,
|
|
18
|
+
and carry on with what you have until permission is given.
|
|
19
|
+
- When information is missing, say so rather than looking beyond the allowed paths. "I don't
|
|
20
|
+
have X" is better than an answer built on files you were not given or authorized to access.
|
|
21
|
+
- Public web search and fetching are allowed unless the task says otherwise.
|
|
@@ -9,7 +9,7 @@ Directory index + entry map. Loaded into the context of every agent that works i
|
|
|
9
9
|
|
|
10
10
|
## Hard Constraints
|
|
11
11
|
|
|
12
|
-
- **Hard cap: 120 lines
|
|
12
|
+
- **Hard cap: at most 120 lines and at most 8KB** (enforced by guard hook, which rejects a write that exceeds either limit). The hook path truncates at 9,500 characters, so content past that line is never injected at all — pure waste.
|
|
13
13
|
- **Each index line <=200 characters**: one sentence of purpose + pointer.
|
|
14
14
|
- **One line per atomic directory**: experiments/, knowledge/, patterns/, decisions/ each take a single line in the index, pointing at their auto-generated index.md (or the directory itself). **Never enumerate per-entry summaries** — summaries already live in the atomic files' frontmatter and index.md; copies in the index are pure redundancy.
|
|
15
15
|
|
|
@@ -9,7 +9,7 @@ Records execution friction affecting work efficiency: misleading requirements, c
|
|
|
9
9
|
|
|
10
10
|
## Hard Constraints
|
|
11
11
|
|
|
12
|
-
- **Length limit: 80 lines
|
|
12
|
+
- **Length limit: at most 80 lines and at most 6KB** (enforced by guard hook, which rejects a write that exceeds either limit; the byte limit keeps mega-lines from gaming the line cap). Exceeding means unresolved issues are accumulating, triggering cleanup.
|
|
13
13
|
- **Each entry <=4 lines**. Investigation detail not fitting is a signal to pointer-ize, not to lengthen the line.
|
|
14
14
|
- **Append mode**: New issues are appended to the end.
|
|
15
15
|
- **Resolved entries are deleted directly**: No archiving, no history retained. Delete the corresponding entry from the file immediately after fixing.
|
|
@@ -31,9 +31,9 @@ PostToolUse hook automatically records Read/Grep access to atomic files (EXP/K/P
|
|
|
31
31
|
|
|
32
32
|
| File | Dedicated rule | Update mode |
|
|
33
33
|
|------|----------------|-------------|
|
|
34
|
-
| `STATUS.md` | status-md.md | Overwrite snapshot (state register), hard
|
|
35
|
-
| `ISSUES.md` | issues-md.md | Append, resolved entries deleted directly, hard
|
|
36
|
-
| `AGENTS.md` (directory index) | agents-md.md | Pointer-style index, hard
|
|
34
|
+
| `STATUS.md` | status-md.md | Overwrite snapshot (state register), hard limits <=80 lines and <=6KB (exceeding either is rejected), each bullet <=2 lines |
|
|
35
|
+
| `ISSUES.md` | issues-md.md | Append, resolved entries deleted directly, hard limits <=80 lines and <=6KB (exceeding either is rejected), each entry <=4 lines |
|
|
36
|
+
| `AGENTS.md` (directory index) | agents-md.md | Pointer-style index, hard limits <=120 lines and <=8KB (exceeding either is rejected), one line per atomic directory |
|
|
37
37
|
| `mission.md` | mission-md.md | Modify after user confirmation |
|
|
38
38
|
| `roadmap.md` | roadmap-md.md | Stable, milestones must contain testable checklist |
|
|
39
39
|
| `OVERVIEW.md` | overview-md.md | Synchronous update, hard limit 60 lines |
|
|
@@ -11,7 +11,7 @@ The project's "constitution": defines goals and success conditions. It is the ba
|
|
|
11
11
|
|
|
12
12
|
- **Stable file**: Can only be modified after user confirmation. Cortex must not rewrite or expand scope on its own.
|
|
13
13
|
- **Modification trigger condition**: User explicitly directs a re-orientation, pivot, or scope change. Do not touch in any other case.
|
|
14
|
-
- **Limit: 100 lines
|
|
14
|
+
- **Limit: at most 100 lines and at most 8KB**. Exceeding either means content that belongs in roadmap/STATUS or a project-pitch document has been mixed in; trimming also requires user confirmation.
|
|
15
15
|
|
|
16
16
|
## Required Sections
|
|
17
17
|
|
|
@@ -17,7 +17,7 @@ It answers exactly four questions: where are we, what is in flight, what is in t
|
|
|
17
17
|
## Hard Constraints
|
|
18
18
|
|
|
19
19
|
- **Update mode: overwrite-rewrite the snapshot**. Every "add a line" must be paired with a check for which existing lines it makes stale — delete those.
|
|
20
|
-
- **Length limit: 80 lines
|
|
20
|
+
- **Length limit: at most 80 lines and at most 6KB, both hard**: exceeding either one blocks the write. Scan before writing: at >=60 lines or >=4KB, warn and trim proactively; over either limit, trim below both before the write is allowed.
|
|
21
21
|
- **Each bullet <= 2 lines**. If it doesn't fit, the detail belongs elsewhere — keep one sentence + a pointer.
|
|
22
22
|
- **Facts with a durable home appear only as pointers**: EXP-NNN / K-NNN / DR-NNNN / commit SHA / file path. The only content unique to STATUS is the one-sentence synthesis of the current situation.
|
|
23
23
|
|
|
@@ -1,66 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
import { SSEClientTransport } from '@modelcontextprotocol/sdk/client/sse.js';
|
|
6
|
-
import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js';
|
|
7
|
-
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
8
|
-
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
9
|
-
import { CallToolRequestSchema, ListToolsRequestSchema } from '@modelcontextprotocol/sdk/types.js';
|
|
10
|
-
import { z } from 'zod';
|
|
11
|
-
import { createLogger } from '../../core/log.js';
|
|
12
|
-
import { isMainModule } from '../../core/utils.js';
|
|
13
|
-
import { createRedirectRejectingFetch } from '../mcp-remote-fetch.js';
|
|
14
|
-
const log = createLogger('claude-remote-mcp-proxy');
|
|
15
|
-
const remoteConfigSchema = z.object({
|
|
16
|
-
type: z.enum(['streamable-http', 'sse']),
|
|
17
|
-
url: z.string().url().refine((value) => ['http:', 'https:'].includes(new URL(value).protocol)),
|
|
18
|
-
headers: z.record(z.string(), z.string()),
|
|
19
|
-
}).strict();
|
|
20
|
-
function sha256(text) {
|
|
21
|
-
return createHash('sha256').update(text, 'utf8').digest('hex');
|
|
22
|
-
}
|
|
23
|
-
function loadRemoteConfig(filePath) {
|
|
24
|
-
const stat = fs.lstatSync(filePath);
|
|
25
|
-
if (!stat.isFile() || stat.isSymbolicLink() || (stat.mode & 0o077) !== 0) {
|
|
26
|
-
throw new Error(`Claude remote MCP proxy config is not private: ${filePath}`);
|
|
27
|
-
}
|
|
28
|
-
const text = fs.readFileSync(filePath, 'utf8');
|
|
29
|
-
if (path.basename(filePath) !== `${sha256(text)}.json`) {
|
|
30
|
-
throw new Error(`Claude remote MCP proxy config identity mismatch: ${filePath}`);
|
|
31
|
-
}
|
|
32
|
-
return remoteConfigSchema.parse(JSON.parse(text));
|
|
33
|
-
}
|
|
34
|
-
function remoteTransport(config) {
|
|
35
|
-
const headers = { ...config.headers };
|
|
36
|
-
const safeFetch = createRedirectRejectingFetch(headers);
|
|
37
|
-
if (config.type === 'streamable-http') {
|
|
38
|
-
return new StreamableHTTPClientTransport(new URL(config.url), {
|
|
39
|
-
requestInit: { headers }, fetch: safeFetch,
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
return new SSEClientTransport(new URL(config.url), {
|
|
43
|
-
fetch: safeFetch,
|
|
44
|
-
eventSourceInit: { fetch: safeFetch },
|
|
45
|
-
requestInit: { headers },
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
function registerToolProxy(server, upstream) {
|
|
49
|
-
server.setRequestHandler(ListToolsRequestSchema, async () => upstream.listTools());
|
|
50
|
-
server.setRequestHandler(CallToolRequestSchema, async (request) => upstream.callTool(request.params));
|
|
51
|
-
}
|
|
52
|
-
export async function startClaudeRemoteMcpProxy(filePath) {
|
|
53
|
-
const config = loadRemoteConfig(filePath);
|
|
54
|
-
const upstream = new Client({ name: 'cortex-claude-remote-proxy', version: '1.0.0' });
|
|
55
|
-
await upstream.connect(remoteTransport(config));
|
|
56
|
-
const server = new Server({ name: 'cortex-claude-remote-proxy', version: '1.0.0' }, { capabilities: { tools: {} } });
|
|
57
|
-
registerToolProxy(server, upstream);
|
|
58
|
-
server.onclose = () => { void upstream.close().catch((error) => log.warn(error)); };
|
|
59
|
-
await server.connect(new StdioServerTransport());
|
|
60
|
-
}
|
|
61
|
-
if (isMainModule(import.meta.url)) {
|
|
62
|
-
startClaudeRemoteMcpProxy(process.argv[2] ?? '').catch((error) => {
|
|
63
|
-
log.error(error);
|
|
64
|
-
process.exit(1);
|
|
65
|
-
});
|
|
66
|
-
}
|
|
1
|
+
import { createRequire as __cortexCreateRequire } from 'node:module';
|
|
2
|
+
const require = __cortexCreateRequire(import.meta.url);
|
|
3
|
+
const __cortexPackageRoot = new URL("../../../", import.meta.url);
|
|
4
|
+
import{a as m,b as p,c as l,d as u}from"../../chunks/chunk-3F6WW7HR.js";import{a as f,b as d}from"../../chunks/chunk-Z4H3VDHI.js";import{I as c,L as i}from"../../chunks/chunk-FOQ7VLIL.js";import"../../chunks/chunk-KRXTI4JO.js";import{J as o}from"../../chunks/chunk-DPQPXBTP.js";import{e as s}from"../../chunks/chunk-NAA7GF6Q.js";import{b as a}from"../../chunks/chunk-QWAQHHRS.js";import"../../chunks/chunk-J5DVLUKY.js";import"../../chunks/chunk-WHC7AYZD.js";import{createHash as x}from"node:crypto";import h from"node:fs";import g from"node:path";var y=s("claude-remote-mcp-proxy"),S=o.object({type:o.enum(["streamable-http","sse"]),url:o.string().url().refine(e=>["http:","https:"].includes(new URL(e).protocol)),headers:o.record(o.string(),o.string())}).strict();function R(e){return x("sha256").update(e,"utf8").digest("hex")}function C(e){let t=h.lstatSync(e);if(!t.isFile()||t.isSymbolicLink()||(t.mode&63)!==0)throw new Error(`Claude remote MCP proxy config is not private: ${e}`);let r=h.readFileSync(e,"utf8");if(g.basename(e)!==`${R(r)}.json`)throw new Error(`Claude remote MCP proxy config identity mismatch: ${e}`);return S.parse(JSON.parse(r))}function T(e){let t={...e.headers},r=u(t);return e.type==="streamable-http"?new p(new URL(e.url),{requestInit:{headers:t},fetch:r}):new l(new URL(e.url),{fetch:r,eventSourceInit:{fetch:r},requestInit:{headers:t}})}function v(e,t){e.setRequestHandler(c,async()=>t.listTools()),e.setRequestHandler(i,async r=>t.callTool(r.params))}async function b(e){let t=C(e),r=new m({name:"cortex-claude-remote-proxy",version:"1.0.0"});await r.connect(T(t));let n=new f({name:"cortex-claude-remote-proxy",version:"1.0.0"},{capabilities:{tools:{}}});v(n,r),n.onclose=()=>{r.close().catch(w=>y.warn(w))},await n.connect(new d)}a(new URL("dist/agent-adapter/claude/remote-mcp-proxy.js",__cortexPackageRoot).href)&&b(process.argv[2]??"").catch(e=>{y.error(e),process.exit(1)});export{b as startClaudeRemoteMcpProxy};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"telemetryEndpoint":"https://telemetry.fangxm.me/v1/batch"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { createRequire as __cortexCreateRequire } from 'node:module';
|
|
2
|
+
const require = __cortexCreateRequire(import.meta.url);
|
|
3
|
+
const __cortexPackageRoot = new URL("../../", import.meta.url);
|
|
4
|
+
import{a as g,b as y}from"./chunk-XBJOYU5Y.js";import{a as p}from"./chunk-XAXWLYH5.js";import"./chunk-IRWZ7UPF.js";import{a as _}from"./chunk-6R73ICDB.js";import"./chunk-WHC7AYZD.js";var b=e=>atob(e),u=b("OWQxYzI1MGEtZTYxYi00NGQ5LTg4ZWQtNTk0NGQxOTYyZjVl"),C="https://claude.ai/oauth/authorize",i="https://platform.claude.com/v1/oauth/token",P=_("PI_OAUTH_CALLBACK_HOST")||"127.0.0.1",O=53692,E="/callback",L=`http://localhost:${O}${E}`,m="https://platform.claude.com/oauth/code/callback",w="browser",A="copy_code",k="org:create_api_key user:profile user:inference user:sessions:claude_code user:mcp_servers user:file_upload";function $(e){let t=e.trim();if(!t)return{};try{let r=new URL(t);return{code:r.searchParams.get("code")??void 0,state:r.searchParams.get("state")??void 0}}catch{}if(t.includes("#")){let[r,o]=t.split("#",2);return{code:r,state:o}}if(t.includes("code=")){let r=new URLSearchParams(t);return{code:r.get("code")??void 0,state:r.get("state")??void 0}}return{code:t}}function l(e){if(e instanceof Error){let t=[`${e.name}: ${e.message}`],r=e;return r.code&&t.push(`code=${r.code}`),typeof r.errno<"u"&&t.push(`errno=${String(r.errno)}`),typeof e.cause<"u"&&t.push(`cause=${l(e.cause)}`),e.stack&&t.push(`stack=${e.stack}`),t.join("; ")}return String(e)}async function S(e,t,r){let o=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(t),signal:AbortSignal.any([r,AbortSignal.timeout(3e4)])}),a=await o.text();if(!o.ok)throw new Error(`HTTP request failed. status=${o.status}; url=${e}; body=${a}`);return a}async function T(e,t,r,o,a){let n;try{n=await S(i,{grant_type:"authorization_code",client_id:u,code:e,state:t,redirect_uri:o,code_verifier:r},a)}catch(s){throw new Error(`Token exchange request failed. url=${i}; redirect_uri=${o}; response_type=authorization_code; details=${l(s)}`)}let c;try{c=JSON.parse(n)}catch(s){throw new Error(`Token exchange returned invalid JSON. url=${i}; body=${n}; details=${l(s)}`)}return{type:"oauth",refresh:c.refresh_token,access:c.access_token,expires:Date.now()+c.expires_in*1e3-300*1e3}}async function R(e){let{verifier:t,challenge:r}=await p(),o=c=>g({providerName:"Anthropic",host:P,port:c,path:E,redirectHost:"localhost",state:t,complete:async s=>s,signal:e.signal}),a=await o(O).catch(()=>o(0)).catch(()=>{}),n=a?.redirectUri??L;try{let c=new URLSearchParams({code:"true",client_id:u,response_type:"code",redirect_uri:n,scope:k,code_challenge:r,code_challenge_method:"S256",state:t});e.notify({type:"auth_url",url:`${C}?${c.toString()}`,instructions:"Complete login in your browser. If the browser is on another machine, paste the final redirect URL here."});let s=await y(e,a,{message:"Complete login in your browser, or paste the authorization code / redirect URL here:",placeholder:n}),h,f=t;if(s.type==="callback")h=s.value;else{let d=$(s.input);if(d.state&&d.state!==t)throw new Error("OAuth state mismatch");h=d.code,f=d.state??t}if(!h)throw new Error("Missing authorization code");return e.notify({type:"progress",message:"Exchanging authorization code for tokens..."}),await T(h,f,t,n,e.signal)}finally{a?.close()}}async function I(e){let{verifier:t,challenge:r}=await p(),o=new URLSearchParams({code:"true",client_id:u,response_type:"code",redirect_uri:m,scope:k,code_challenge:r,code_challenge_method:"S256",state:t});e.notify({type:"auth_url",url:`${C}?${o.toString()}`,instructions:"Complete login in your browser, then copy the code Anthropic shows and paste it here."});let a=await e.prompt({type:"manual_code",message:"Paste the code Anthropic shows after you sign in:",placeholder:"code#state",signal:e.signal}),n=$(a);if(n.state&&n.state!==t)throw new Error("OAuth state mismatch");if(!n.code)throw new Error("Missing authorization code");return e.notify({type:"progress",message:"Exchanging authorization code for tokens..."}),await T(n.code,n.state??t,t,m,e.signal)}async function x(e,t){let r;try{r=await S(i,{grant_type:"refresh_token",client_id:u,refresh_token:e},t)}catch(a){throw new Error(`Anthropic token refresh request failed. url=${i}; details=${l(a)}`)}let o;try{o=JSON.parse(r)}catch(a){throw new Error(`Anthropic token refresh returned invalid JSON. url=${i}; body=${r}; details=${l(a)}`)}return{type:"oauth",refresh:o.refresh_token,access:o.access_token,expires:Date.now()+o.expires_in*1e3-300*1e3}}var z={name:"Anthropic (Claude Pro/Max)",isSubscription:!0,async login(e){let t=await e.prompt({type:"select",message:"Select Anthropic login method:",options:[{id:w,label:"Browser login (default)"},{id:A,label:"Copy code login (headless)"}]});if(t===A)return I(e);if(t!==w)throw new Error(`Unknown Anthropic login method: ${t}`);return R(e)},refresh:(e,t)=>x(e.refresh,t),async toAuth(e){return{apiKey:e.access}}};export{z as anthropicOAuth};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { createRequire as __cortexCreateRequire } from 'node:module';
|
|
2
|
+
const require = __cortexCreateRequire(import.meta.url);
|
|
3
|
+
const __cortexPackageRoot = new URL("../../", import.meta.url);
|
|
4
|
+
import{d as Z,e as Q,f as X,g as ee,h as te}from"./chunk-KDYEGGMW.js";import{a as ie,b as ae}from"./chunk-BGYR4ID3.js";import{a as se}from"./chunk-23PRJECN.js";import{a as oe,d as re,g as ce,i as le,m as ue,n as pe,o as de}from"./chunk-QBKCAIJG.js";import{J as L,o as K,p as V,s as G,u as E,y as J}from"./chunk-PZMGBKUR.js";import{a as w}from"./chunk-6R73ICDB.js";import{b as z,c as $,d as Y}from"./chunk-SKHLZ6XY.js";import{d as O}from"./chunk-D6VMBA4C.js";import{a as T}from"./chunk-USBJFDJ6.js";import{a as ne}from"./chunk-K4NTZEDJ.js";import{h as N}from"./chunk-6AKUD3CF.js";import"./chunk-OSEIQ7SS.js";import{b as q}from"./chunk-CXT5IR5T.js";import{m as P}from"./chunk-X2GYYRVM.js";import"./chunk-WHC7AYZD.js";function fe(e,o){return e||(w("PI_CACHE_RETENTION",o)==="long"?"long":"short")}function Te(e,o,n){let r=fe(o,n);if(r==="none")return{retention:r};let i=r==="long"&&C(e).supportsLongCacheRetention?"1h":void 0;return{retention:r,cacheControl:{type:"ephemeral",...i&&{ttl:i}}}}var be="2.1.280",we=["Read","Write","Edit","Bash","Grep","Glob","AskUserQuestion","EnterPlanMode","ExitPlanMode","KillShell","NotebookEdit","Skill","Task","TaskOutput","TodoWrite","WebFetch","WebSearch"],ve=new Map(we.map(e=>[e.toLowerCase(),e])),H=e=>ve.get(e.toLowerCase())??e,Ce=(e,o)=>{if(o&&o.length>0){let n=e.toLowerCase(),r=o.find(i=>i.name.toLowerCase()===n);if(r)return r.name}return e};function j(e){return{type:"image",source:{type:"base64",media_type:e.mimeType,data:e.data}}}function Re(e){if(!e.some(i=>i.type==="image"))return T(e.map(i=>i.text).join(`
|
|
5
|
+
`));let n=e.map(i=>i.type==="text"?{type:"text",text:T(i.text)}:j(i));return n.some(i=>i.type==="text")||n.unshift({type:"text",text:"(see attached image)"}),n}var Ee="fine-grained-tool-streaming-2025-05-14",Se="interleaved-thinking-2025-05-14",Ie="server-side-fallback-2026-07-01",Ae="mid-conversation-output-config-2026-07-01",Me="thinking-binding-controls-2026-08-01",Oe="inline-tools-2026-09-15",Ne={name:"__pi_deferred_placeholder__",description:"Reserved placeholder. Never available. Never call this.",input_schema:{type:"object",properties:{},required:[]},defer_loading:!0};function Le(e){return(e.compat?.allowedFallbackModels?.length??0)>0}function C(e){let o=e.provider==="openrouter"||e.baseUrl.includes("openrouter.ai");return{supportsEagerToolInputStreaming:e.compat?.supportsEagerToolInputStreaming??!0,supportsLongCacheRetention:e.compat?.supportsLongCacheRetention??!0,sendSessionAffinityHeaders:e.compat?.sendSessionAffinityHeaders??o,sessionAffinityFormat:e.compat?.sessionAffinityFormat??(o?"openrouter":void 0),supportsCacheControlOnTools:e.compat?.supportsCacheControlOnTools??!0,supportsTemperature:e.compat?.supportsTemperature??!0,allowEmptySignature:e.compat?.allowEmptySignature??!1,supportsStrictTools:e.compat?.supportsStrictTools??!1,supportsMidConvoSystemMessages:e.compat?.supportsMidConvoSystemMessages??!1,supportsMidConvoToolChanges:e.compat?.supportsMidConvoToolChanges??!1}}function D(...e){let o={};for(let n of e)n&&Object.assign(o,n);return o}function B(e,o){if(!e)return!1;let n=o.toLowerCase();for(let[r,i]of Object.entries(e))if(r.toLowerCase()===n&&i!==null&&i.trim().length>0)return!0;return!1}function ge(e,o){return!!e||B(o,"authorization")||B(o,"x-api-key")||B(o,"cf-aig-authorization")}function he(e,o,n){if(!ge(o,n))throw new Error(`No API key for provider: ${e}`)}var v=class extends P{_shouldResolveDefaultCredentials(){return!1}};function me(e,o,n,r){if(e.provider!=="anthropic"||ge(o,n))return;let i=w(Z,r),l=w(Q,r),t=w(ee,r);if(!(!i||!l||!t))return{organization_id:l,workspace_id:w(te,r),authentication:{type:"oidc_federation",federation_rule_id:i,service_account_id:w(X,r),identity_token:{source:"file",path:t}}}}var S,Pe=new Set(["message_start","message_delta","message_stop","content_block_start","content_block_delta","content_block_stop"]);function _e(e){if(!e.event&&e.data.length===0)return null;let o={event:e.event,data:e.data.join(`
|
|
6
|
+
`),raw:[...e.raw]};return e.event=null,e.data=[],e.raw=[],o}function F(e,o){if(e==="")return _e(o);if(o.raw.push(e),e.startsWith(":"))return null;let n=e.indexOf(":"),r=n===-1?e:e.slice(0,n),i=n===-1?"":e.slice(n+1);return i.startsWith(" ")&&(i=i.slice(1)),r==="event"?o.event=i:r==="data"&&o.data.push(i),null}function De(e){let o=e.indexOf("\r"),n=e.indexOf(`
|
|
7
|
+
`);return o===-1?n:n===-1?o:Math.min(o,n)}function I(e){let o=De(e);if(o===-1)return null;let n=o+1;return e[o]==="\r"&&e[n]===`
|
|
8
|
+
`&&(n+=1),{line:e.slice(0,o),rest:e.slice(n)}}async function*Be(e,o){let n=e.getReader(),r=new TextDecoder,i={event:null,data:[],raw:[]},l="";try{for(;;){if(o?.aborted)throw new Error("Request was aborted");let{value:d,done:y}=await n.read();if(y)break;l+=r.decode(d,{stream:!0});let f=I(l);for(;f;){l=f.rest;let p=F(f.line,i);p&&(yield p),f=I(l)}}l+=r.decode();let t=I(l);for(;t;){l=t.rest;let d=F(t.line,i);d&&(yield d),t=I(l)}if(l.length>0){let d=F(l,i);d&&(yield d)}let h=_e(i);h&&(yield h)}finally{n.releaseLock()}}async function*Fe(e,o){if(!e.body)throw new Error("Attempted to iterate over an Anthropic response with no body");let n=!1,r=!1;for await(let i of Be(e.body,o)){if(i.event==="error")throw new Error(i.data);if(Pe.has(i.event??""))try{let l=z(i.data);l.type==="message_start"?n=!0:l.type==="message_stop"&&(r=!0),yield l}catch(l){let t=l instanceof Error?l.message:String(l);throw new Error(`Could not parse Anthropic SSE event ${i.event}: ${t}; data=${i.data}; raw=${i.raw.join("\\n")}`)}}if(n&&!r)throw new Error("Anthropic stream ended before message_stop")}var U=(e,o,n)=>{let r=new q,i=J(o,C(e).supportsMidConvoSystemMessages),l=E(i.messages);return(async()=>{let t={role:"assistant",content:[],api:e.api,provider:e.provider,model:e.id,usage:{input:0,output:0,cacheRead:0,cacheWrite:0,totalTokens:0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},stopReason:"pending",timestamp:Date.now()};try{let h,d,y=e,f;if(n?.client)h=n.client,d=!1;else{let s=n?.apiKey,a=me(e,s,n?.headers,n?.env);a||he(e.provider,s,n?.headers);let c;if(e.provider==="github-copilot"){let R=ie(i.messages);c=ae({messages:i.messages,hasImages:R})}let b=fe(n?.cacheRetention,n?.env)==="none"?void 0:n?.sessionId,k=je(e,s,n?.headers,n?.fetch,c,b,a,n?.identity);h=k.client,d=k.isOAuthToken}let p={...n?.signal?{signal:n.signal}:{},...n?.timeoutMs!==void 0?{timeout:n.timeoutMs}:{},maxRetries:0},g=!1,_;for(;;){n?.signal?.throwIfAborted();let s=qe(e,i,d,n,g);s.providerThinkingLevel&&(t.providerThinkingLevel=s.providerThinkingLevel);let a=s.params,c=await n?.onPayload?.(a,e);c!==void 0&&(a={...c,stream:!0});try{_=await se(()=>h.beta.messages.create(a,p).asResponse(),{maxRetries:n?.maxRetries,maxRetryDelayMs:n?.maxRetryDelayMs,signal:n?.signal});break}catch(m){if(n?.signal?.aborted||g||!s.hasPreferredStrictTools||!(m instanceof P.APIError)||m.status!==400||m.type!=="invalid_request_error"||!["The compiled grammar is too large","Too many strict tools (","Schemas contains too many parameters with union types ("].some(b=>m.message.includes(b)))throw m;g=!0,O(t,{type:"anthropic_strict_tools_fallback",timestamp:Date.now(),error:{message:m.message},details:{reason:"strict_tool_limits_exceeded"}})}}await n?.onResponse?.({status:_.status,headers:ne(_.headers)},e),r.push({type:"start",partial:t});let u=t.content;for await(let s of Fe(_,n?.signal))if(await n?.onProviderStreamEvent?.(s,e),s.type==="message_start"){t.responseId=s.message.id;let a=s.message.input_transformations;Array.isArray(a)&&(f=a);let c=s.message.model;c!==e.id&&(t.responseModel=c);let m=c===e.id?void 0:e.compat?.allowedFallbackModels?.find(b=>b.provider===e.provider&&b.model===c)?.cost;y=m?{...e,id:c,cost:m}:e,t.usage.input=s.message.usage.input_tokens||0,t.usage.output=s.message.usage.output_tokens||0,t.usage.cacheRead=s.message.usage.cache_read_input_tokens||0,t.usage.cacheWrite=s.message.usage.cache_creation_input_tokens||0,t.usage.cacheWrite1h=s.message.usage.cache_creation?.ephemeral_1h_input_tokens||0,t.usage.totalTokens=t.usage.input+t.usage.output+t.usage.cacheRead+t.usage.cacheWrite,L(y,t.usage)}else if(s.type==="content_block_start"){if(s.content_block.type==="fallback"){if(t.content.length>0)throw new Error("Anthropic performed an unsupported mid-output model fallback");continue}if(s.content_block.type==="text"){let a={type:"text",text:s.content_block.text??"",index:s.index};t.content.push(a),r.push({type:"text_start",contentIndex:t.content.length-1,partial:t})}else if(s.content_block.type==="thinking"){let a={type:"thinking",thinking:s.content_block.thinking??"",thinkingSignature:s.content_block.signature??"",index:s.index};t.content.push(a),r.push({type:"thinking_start",contentIndex:t.content.length-1,partial:t})}else if(s.content_block.type==="redacted_thinking"){let a={type:"thinking",thinking:"[Reasoning redacted]",thinkingSignature:s.content_block.data,redacted:!0,index:s.index};t.content.push(a),r.push({type:"thinking_start",contentIndex:t.content.length-1,partial:t})}else if(s.content_block.type==="tool_use"){let a={type:"toolCall",id:s.content_block.id,name:d?Ce(s.content_block.name,l):s.content_block.name,arguments:s.content_block.input??{},partialJson:"",index:s.index};t.content.push(a),r.push({type:"toolcall_start",contentIndex:t.content.length-1,partial:t})}}else if(s.type==="content_block_delta"){if(s.delta.type==="text_delta"){let a=u.findIndex(m=>m.index===s.index),c=u[a];c&&c.type==="text"&&(c.text+=s.delta.text,r.push({type:"text_delta",contentIndex:a,delta:s.delta.text,partial:t}))}else if(s.delta.type==="thinking_delta"){let a=u.findIndex(m=>m.index===s.index),c=u[a];c&&c.type==="thinking"&&(c.thinking+=s.delta.thinking,r.push({type:"thinking_delta",contentIndex:a,delta:s.delta.thinking,partial:t}))}else if(s.delta.type==="input_json_delta"){let a=u.findIndex(m=>m.index===s.index),c=u[a];c&&c.type==="toolCall"&&(c.partialJson+=s.delta.partial_json,c.arguments=Y(c.partialJson),r.push({type:"toolcall_delta",contentIndex:a,delta:s.delta.partial_json,partial:t}))}else if(s.delta.type==="signature_delta"){let a=u.findIndex(m=>m.index===s.index),c=u[a];c&&c.type==="thinking"&&(c.thinkingSignature=c.thinkingSignature||"",c.thinkingSignature+=s.delta.signature)}}else if(s.type==="content_block_stop"){let a=u.findIndex(m=>m.index===s.index),c=u[a];c&&(delete c.index,c.type==="text"?r.push({type:"text_end",contentIndex:a,content:c.text,partial:t}):c.type==="thinking"?r.push({type:"thinking_end",contentIndex:a,content:c.thinking,partial:t}):c.type==="toolCall"&&(Object.assign(c,$(c.partialJson)),delete c.partialJson,r.push({type:"toolcall_end",contentIndex:a,toolCall:c,partial:t})))}else if(s.type==="message_delta"){let a=s.input_transformations;if(Array.isArray(a)&&(f=a),s.delta.stop_reason){t.rawStopReason=s.delta.stop_reason;let c=et(s.delta.stop_reason,s.delta.stop_details);t.stopReason=c.stopReason,c.errorMessage&&(t.errorMessage=c.errorMessage)}if(s.usage){s.usage.input_tokens!=null&&(t.usage.input=s.usage.input_tokens),s.usage.output_tokens!=null&&(t.usage.output=s.usage.output_tokens),s.usage.cache_read_input_tokens!=null&&(t.usage.cacheRead=s.usage.cache_read_input_tokens),s.usage.cache_creation_input_tokens!=null&&(t.usage.cacheWrite=s.usage.cache_creation_input_tokens);let c=s.usage.cache_creation;c?.ephemeral_1h_input_tokens!=null&&(t.usage.cacheWrite1h=c.ephemeral_1h_input_tokens);let m=s.usage.output_tokens_details?.thinking_tokens;m!=null&&(t.usage.reasoning=m)}t.usage.totalTokens=t.usage.input+t.usage.output+t.usage.cacheRead+t.usage.cacheWrite,L(y,t.usage)}if(n?.signal?.aborted)throw new Error("Request was aborted");if(t.stopReason==="pending")throw new Error("Anthropic stream ended without a stop reason");if(t.stopReason==="aborted"||t.stopReason==="error")throw new Error(t.errorMessage||"An unknown error occurred");f&&f.length>0&&O(t,{type:"anthropic_input_transformations",timestamp:Date.now(),details:{transformations:f.map(s=>({type:s.type??void 0,path:s.path??void 0,reason:s.reason??void 0}))}}),r.push({type:"done",reason:t.stopReason,message:t}),r.end()}catch(h){for(let d of t.content)delete d.index,delete d.partialJson;t.stopReason=n?.signal?.aborted?"aborted":"error",t.errorMessage=h instanceof Error?h.message:JSON.stringify(h),r.push({type:"error",reason:t.stopReason,error:t}),r.end()}})(),r};function Ue(e,o){let n=o?e.thinkingLevelMap?.[o]:void 0;if(typeof n=="string")return n;switch(o){case"minimal":case"low":return"low";case"medium":return"medium";case"high":return"high";default:return"high"}}var yt=(e,o,n)=>{me(e,n?.apiKey,n?.headers,n?.env)||he(e.provider,n?.apiKey,n?.headers);let r={...le(e,o,n,n?.apiKey),toolChoice:n?.toolChoice};if(!n?.reasoning)return U(e,o,{...r,thinkingEnabled:!1});if(e.compat?.forceAdaptiveThinking===!0){let t=Ue(e,n.reasoning);return U(e,o,{...r,thinkingEnabled:!0,effort:t})}let i=ue(r.maxTokens,e.maxTokens,n.reasoning,n.thinkingBudgets),l=ce(e,o,i.maxTokens);return U(e,o,{...r,maxTokens:l,thinkingEnabled:!0,thinkingBudgetTokens:Math.min(i.thinkingBudget,Math.max(0,l-1024))})};function He(e){return e.includes("sk-ant-oat")}function je(e,o,n,r,i,l,t,h){if(e.provider==="github-copilot")return{client:new v({apiKey:null,authToken:o??null,baseURL:e.baseUrl,dangerouslyAllowBrowser:!0,fetch:r,defaultHeaders:D(N(e,h),{accept:"application/json","anthropic-dangerous-direct-browser-access":"true"},e.headers,i,n)}),isOAuthToken:!1};if(o&&He(o))return{client:new v({apiKey:null,authToken:o,baseURL:e.baseUrl,dangerouslyAllowBrowser:!0,fetch:r,defaultHeaders:D({accept:"application/json","anthropic-dangerous-direct-browser-access":"true","user-agent":`claude-cli/${be}`,"x-app":"cli"},e.headers,n)}),isOAuthToken:!0};let d=C(e),y={};if(l&&d.sendSessionAffinityHeaders){let g=d.sessionAffinityFormat==="openrouter"?"x-session-id":"x-session-affinity";y[g]=l}let f=D(N(e,h),{accept:"application/json","anthropic-dangerous-direct-browser-access":"true"},y,e.headers,n);if(t){let g=JSON.stringify([e.baseUrl,t]);if(S?.key!==g||S.fetch!==r){let _=new v({apiKey:null,authToken:null,config:t,baseURL:e.baseUrl,dangerouslyAllowBrowser:!0,fetch:r});S={key:g,fetch:r,client:_}}return{client:S.client.withOptions({defaultHeaders:f}),isOAuthToken:!1}}return{client:new v({apiKey:o??null,authToken:null,baseURL:e.baseUrl,dangerouslyAllowBrowser:!0,fetch:r,defaultHeaders:f}),isOAuthToken:!1}}function We(e,o,n,r,i){let l;for(let h of[e.headers,i?.headers])for(let[d,y]of Object.entries(h??{}))d.toLowerCase()==="anthropic-beta"&&(l=y);if(l===null)return[];if(l!==void 0)return[...new Set(l.split(",").map(h=>h.trim()).filter(h=>h.length>0))];let t=[];return n&&t.push("claude-code-20250219","oauth-2025-04-20"),$e(e,o)&&t.push(Ee),e.reasoning&&i?.thinkingEnabled===!0&&(i.interleavedThinking??!0)&&e.compat?.forceAdaptiveThinking!==!0&&t.push(Se),Le(e)&&t.push(Ie),e.compat?.supportsMidConvoEffort===!0&&t.push(Ae,Me),r&&t.push(Oe),[...new Set(t)]}function qe(e,o,n,r,i=!1){let{cacheControl:l}=Te(e,r?.cacheRetention,r?.env),t=C(e),h=G(o.messages),d=h?K(h):"",y=de(o.messages,e,Ke),f=h?y.slice(1):y,p=!1,g=(x,ye)=>{let W=Xe(x,n,t.supportsEagerToolInputStreaming,t.supportsStrictTools,ye,i);return W.some((ke,xe)=>{let M=x[xe].constrainedSampling;return ke.strict===!0&&M&&M.type==="json_schema"&&M.strict==="prefer"})&&(p=!0),W},_=h?.toolsAdded??[],u=t.supportsMidConvoSystemMessages&&t.supportsMidConvoToolChanges&&_.length>0,s=e.reasoning&&r?.thinkingEnabled===!1&&e.thinkingLevelMap?.off!==null,a=e.compat?.supportsMidConvoEffort===!0&&!s,c=Ge(f,n,l,t.allowEmptySignature,a?e.provider:void 0,u?g:void 0),m=r?.effort??"high",b=We(e,o,n,u,r),k={model:e.id,messages:a?ze(c,m):c.messages,max_tokens:r?.maxTokens??e.maxTokens,stream:!0,...b.length>0?{betas:b}:{}};n?(k.system=[{type:"text",text:"You are Claude Code, Anthropic's official CLI for Claude.",...l?{cache_control:l}:{}}],d&&k.system.push({type:"text",text:T(d),...l?{cache_control:l}:{}})):d&&(k.system=[{type:"text",text:T(d),...l?{cache_control:l}:{}}]),r?.temperature!==void 0&&!r?.thinkingEnabled&&e.compat?.supportsMidConvoEffort!==!0&&t.supportsTemperature&&(k.temperature=r.temperature);let R=t.supportsCacheControlOnTools?l:void 0;if(u)k.tools=[...g(_,R),Ne];else{let x=E(o.messages);x.length>0&&(k.tools=g(x,R))}if(s)k.thinking={type:"disabled"};else if(a)k.thinking={type:"adaptive",display:r?.thinkingDisplay??"summarized",block_binding:{prefix_mismatch_behavior:"drop_block"}},k.output_config={effort:"high"};else if(e.reasoning&&r?.thinkingEnabled){let x=r.thinkingDisplay??"summarized";e.compat?.forceAdaptiveThinking===!0?(k.thinking={type:"adaptive",display:x},r.effort&&(k.output_config={effort:r.effort})):k.thinking={type:"enabled",budget_tokens:r.thinkingBudgetTokens||1024,display:x}}if(r?.metadata){let x=r.metadata.user_id;typeof x=="string"&&(k.metadata={user_id:x})}r?.toolChoice&&(typeof r.toolChoice=="string"?k.tool_choice={type:r.toolChoice}:k.tool_choice=r.toolChoice);let A=e.compat?.allowedFallbackModels;return A&&A.length>0&&(k.fallbacks=A.map(x=>({model:x.model}))),{params:k,hasPreferredStrictTools:p,providerThinkingLevel:a?m:void 0}}function Ke(e){return e.replace(/[^a-zA-Z0-9_-]/g,"_").slice(0,64)}function Ve(e,o=e.content){return{type:"tool_result",tool_use_id:e.toolCallId,content:Re(o),is_error:e.isError}}function Ge(e,o,n,r=!1,i,l){let t=[],h=new Map,d=[],y=()=>{t.push(...d),d.length=0};for(let f=0;f<e.length;f++){let p=e[f];if(p.role==="system"){let g=V(p),_=[];if(g.length>0&&_.push({type:"text",text:T(g)}),l){let u=p.toolsAdded??[],s=new Set(u.map(a=>a.name));for(let a of p.toolsRemoved??[])s.has(a.name)||_.push({type:"tool_removal",tool:{type:"tool_reference",name:o?H(a.name):a.name}});for(let a of l(u))_.push({type:"tool_addition",tool:{type:"tool_definition",definition:a}})}_.length>0&&d.push({role:"system",content:_})}else if(p.role==="user")if(typeof p.content=="string")p.content.trim().length>0&&t.push({role:"user",content:T(p.content)});else{let _=p.content.map(u=>u.type==="text"?{type:"text",text:T(u.text)}:j(u)).filter(u=>u.type==="text"?u.text.trim().length>0:!0);if(_.length===0)continue;t.push({role:"user",content:_})}else if(p.role==="assistant"){y();let g=[];for(let u of p.content)if(u.type==="text"){if(u.text.trim().length===0)continue;g.push({type:"text",text:T(u.text)})}else if(u.type==="thinking"){if(u.redacted){g.push({type:"redacted_thinking",data:u.thinkingSignature});continue}let s=u.thinkingSignature,a=!!s&&s.trim().length>0;if(u.thinking.trim().length===0&&!a)continue;a?g.push({type:"thinking",thinking:T(u.thinking),signature:s}):g.push(r?{type:"thinking",thinking:T(u.thinking),signature:""}:{type:"text",text:T(u.thinking)})}else u.type==="toolCall"&&g.push({type:"tool_use",id:u.id,name:o?H(u.name):u.name,input:u.arguments??{}});if(g.length===0)continue;let _=t.length;t.push({role:"assistant",content:g}),i!==void 0&&p.api==="anthropic-messages"&&p.provider===i&&Je(p.providerThinkingLevel)&&h.set(_,p.providerThinkingLevel)}else if(p.role==="toolResult"){let g=[],_=[],u=f;for(;u<e.length&&e[u].role==="toolResult";){let s=e[u],a=pe(s);g.push(Ve(s,a?.content)),a&&_.push({type:"text",text:a.caption},...a.images.map(j)),u++}f=u-1,t.push({role:"user",content:[...g,..._]})}}if(y(),n&&t.length>0){let f=t[t.length-1];if(f.role==="user"||f.role==="system")if(Array.isArray(f.content)){let p=f.content[f.content.length-1];p&&(p.type==="text"||p.type==="image"||p.type==="tool_result"||p.type==="tool_addition"||p.type==="tool_removal")&&(p.cache_control=n)}else typeof f.content=="string"&&(f.content=[{type:"text",text:f.content,cache_control:n}])}return{messages:t,assistantLevels:h}}function Je(e){return e==="low"||e==="medium"||e==="high"||e==="xhigh"||e==="max"}function ze(e,o){let n=[];for(let r=0;r<e.messages.length;r++){let i=e.assistantLevels.get(r);i!==void 0&&n.push({role:"system",content:[],output_config:{effort:i}}),n.push(e.messages[r])}return n.push({role:"system",content:[],output_config:{effort:o}}),n}function $e(e,o){return E(o.messages).length>0&&!C(e).supportsEagerToolInputStreaming}var Ye=new Set(["minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","maxItems","uniqueItems","minContains","maxContains","minProperties","maxProperties"]),Ze=new Set(["date-time","time","date","duration","email","hostname","uri","ipv4","ipv6","uuid"]),Qe=(e,o)=>Ye.has(e)?!0:e==="minItems"?o!==0&&o!==1:e==="format"?typeof o!="string"||!Ze.has(o):!1;function Xe(e,o,n,r,i,l=!1){return e?e.map((t,h)=>{let d=t.constrainedSampling,y=l&&d&&d.type==="json_schema"&&d.strict==="prefer"?void 0:re(t,r,Qe),f=oe(t,y),p=f,g={type:"object",properties:p.properties??{},required:p.required??[]},_=y===!0?{...f,...g}:g;return{name:o?H(t.name):t.name,description:t.description,...n?{eager_input_streaming:!0}:{},...y===!0?{strict:!0}:{},input_schema:_,...i&&h===e.length-1?{cache_control:i}:{}}}):[]}function et(e,o){switch(e){case"end_turn":return{stopReason:"stop"};case"max_tokens":return{stopReason:"length"};case"tool_use":return{stopReason:"toolUse"};case"refusal":return{stopReason:"error",errorMessage:o?.explanation||"The model refused to complete the request"};case"pause_turn":return{stopReason:"stop"};case"stop_sequence":return{stopReason:"stop"};case"sensitive":return{stopReason:"error",errorMessage:"Provider stopped with: sensitive"};default:throw new Error(`Unhandled stop reason: ${e}`)}}export{U as stream,yt as streamSimple};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { createRequire as __cortexCreateRequire } from 'node:module';
|
|
2
|
+
const require = __cortexCreateRequire(import.meta.url);
|
|
3
|
+
const __cortexPackageRoot = new URL("../../", import.meta.url);
|
|
4
|
+
import{b as h}from"./chunk-OISO5JXB.js";import{a as u,c as i,d as m}from"./chunk-XSRZHN63.js";import"./chunk-WHC7AYZD.js";var P={anthropic:"anthropic",openai:"openai",google:"google",openrouter:"openrouter",deepseek:"deepseek",mistral:"mistral",mistralai:"mistral",xai:"xai","x-ai":"xai",groq:"groq",together:"together",moonshot:"moonshot",moonshotai:"moonshot",qwen:"qwen"};function n(e){let t=(e??"").trim().toLowerCase();return P[t]??t}function c(e){let t=(e??"").trim();return t.includes("/")?n(t.split("/",1)[0]):null}var y="https://aistatus.cc",A=class{baseUrl;timeoutMs;constructor(e=y,t=3){this.baseUrl=e.replace(/\/+$/,""),this.timeoutMs=t*1e3}async checkProvider(e){let t=await this.get("/api/check",{provider:e});return this.parseCheck(t)}async checkModel(e){let t=await this.get("/api/check",{model:e});return this.parseCheck(t)}async acheckProvider(e){return this.checkProvider(e)}async acheckModel(e){return this.checkModel(e)}async providers(){let e=await this.get("/api/providers");return(Array.isArray(e.providers)?e.providers:[]).map(o=>this.parseProviderStatus(o)).filter(o=>o!==null)}async model(e){try{let t=await this.get(`/api/models/${encodeURIComponent(e)}`);return this.parseModel(t)}catch(t){if(t instanceof u&&t.status===404)return null;throw t}}async searchModels(e){let t=await this.get("/api/models",{q:e});return(Array.isArray(t.models)?t.models:[]).map(s=>this.parseModel(s)).filter(s=>s!==null)}async get(e,t){let o=new URL(`${this.baseUrl}${e}`);if(t)for(let[s,a]of Object.entries(t))a!==void 0&&o.searchParams.set(s,a);return m(o.toString(),{timeoutMs:this.timeoutMs})}parseCheck(e){let t=r(e.model)??null,o=n(r(e.provider)??r(e.slug)??c(t)??"")||"",s=l(r(e.status)??r(e.providerStatus)??f(e.available)),a=Array.isArray(e.alternatives)?e.alternatives.map(p=>E(p)).filter(p=>p!==null):[];return new h({provider:o,status:s,statusDetail:r(e.statusDetail)??r(e.providerStatusDetail)??null,model:t,alternatives:a})}parseProviderStatus(e){return i(e)?{slug:n(r(e.slug)??""),name:r(e.name)??r(e.slug)??"",status:l(r(e.status)),statusDetail:r(e.statusDetail)??null,modelCount:d(e.modelCount)}:null}parseModel(e){if(!i(e))return null;let t=i(e.pricing)?e.pricing:{},o=i(e.provider)?e.provider:{};return{id:r(e.id)??"",name:r(e.name)??"",providerSlug:n(r(o.slug)??c(r(e.id)??"")??""),contextLength:d(e.context_length),modality:r(e.modality)??"text->text",promptPrice:g(t.prompt),completionPrice:g(t.completion)}}};function E(e){if(!i(e))return null;let t=r(e.suggestedModel)??r(e.model)??r(e.id)??"",o=n(r(e.slug)??r(e.provider)??c(t)??"");return{slug:o,name:r(e.name)??o,status:l(r(e.status)??r(e.providerStatus)??f(e.available)),suggestedModel:t}}function f(e){if(e===!0)return"operational";if(e===!1)return"down"}function l(e){switch(e){case"operational":return"operational";case"degraded":return"degraded";case"down":return"down";default:return"unknown"}}function r(e){return typeof e=="string"?e:void 0}function d(e){if(typeof e=="number"&&Number.isFinite(e))return e;if(typeof e=="string"){let t=Number(e);return Number.isFinite(t)?t:0}return 0}function g(e){return d(e)}export{A as StatusAPI};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { createRequire as __cortexCreateRequire } from 'node:module';
|
|
2
|
+
const require = __cortexCreateRequire(import.meta.url);
|
|
3
|
+
const __cortexPackageRoot = new URL("../../", import.meta.url);
|
|
4
|
+
import{a as P,c as C}from"./chunk-ZNZFWSPH.js";import{a as k,b as _,c as x,d as z}from"./chunk-DXBSQXJL.js";import{a as b}from"./chunk-XIECJESP.js";import"./chunk-V3AQJSWR.js";import{b as E}from"./chunk-CVC66CFV.js";import{a as M}from"./chunk-23PRJECN.js";import{a as O,b as I}from"./chunk-FF7UELTU.js";import{f as d,h as S,i as w}from"./chunk-QBKCAIJG.js";import{C as l,F as R,L as T,y as v}from"./chunk-PZMGBKUR.js";import"./chunk-6R73ICDB.js";import"./chunk-SKHLZ6XY.js";import"./chunk-D6VMBA4C.js";import"./chunk-USBJFDJ6.js";import{a as A}from"./chunk-K4NTZEDJ.js";import{h as y}from"./chunk-6AKUD3CF.js";import"./chunk-OSEIQ7SS.js";import{b as h}from"./chunk-CXT5IR5T.js";import"./chunk-WHC7AYZD.js";var N=new Set(["openai","openai-codex","opencode","azure"]),G=16;function D(r){return I(O(r),"Azure OpenAI API error")}var K=(r,a,e)=>{let t=new h,p=v(a,r.compat?.supportsMidConvoSystemMessages);return(async()=>{let n=P(r,e),s={role:"assistant",content:[],api:"azure-openai-responses",provider:r.provider,model:r.id,usage:{input:0,output:0,cacheRead:0,cacheWrite:0,totalTokens:0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},stopReason:"pending",timestamp:Date.now()};try{let i=e?.apiKey;if(!i)throw new Error(`No API key for provider: ${r.provider}`);let c=q(r,i,e),o=d(l(p.messages),r.compat?.supportsOpenAIGrammarTools??!1),m=U(r,p,e,n,o),u=await e?.onPayload?.(m,r);u!==void 0&&(m=u);let f={...e?.signal?{signal:e.signal}:{},...e?.timeoutMs!==void 0?{timeout:e.timeoutMs}:{},maxRetries:0},{data:L,response:g}=await M(()=>c.responses.create(m,f).withResponse(),{maxRetries:e?.maxRetries,maxRetryDelayMs:e?.maxRetryDelayMs,signal:e?.signal});if(await e?.onResponse?.({status:g.status,headers:A(g.headers)},r),t.push({type:"start",partial:s}),await z(L,s,t,r,{onProviderStreamEvent:e?.onProviderStreamEvent,grammarToolInputProperties:o}),e?.signal?.aborted)throw new Error("Request was aborted");if(s.stopReason==="pending")throw new Error("Azure OpenAI Responses stream ended without a stop reason");if(s.stopReason==="aborted"||s.stopReason==="error")throw new Error(s.errorMessage||"An unknown error occurred");t.push({type:"done",reason:s.stopReason,message:s}),t.end()}catch(i){for(let c of s.content)delete c.index,delete c.partialJson,delete c.customInput;s.stopReason=e?.signal?.aborted?"aborted":"error",s.errorMessage=D(i),t.push({type:"error",reason:s.stopReason,error:s}),t.end()}})(),t},re=(r,a,e)=>{let t=e?.apiKey;if(!t)throw new Error(`No API key for provider: ${r.provider}`);let p={...w(r,a,e,t),toolChoice:e?.toolChoice},n=e?.reasoning?T(r,e.reasoning):void 0;return K(r,a,{...p,reasoningEffort:n==="off"?void 0:n})};function q(r,a,e){let t={...y(r,e?.identity),...r.headers};e?.headers&&Object.assign(t,e.headers);let{baseUrl:p,apiVersion:n}=C(r,e);return new E({apiKey:a,apiVersion:n,dangerouslyAllowBrowser:!0,fetch:e?.fetch,defaultHeaders:t,baseURL:p})}function U(r,a,e,t,p=d(l(a.messages),r.compat?.supportsOpenAIGrammarTools??!1)){let n=r.compat?.supportsAdditionalTools??!1,s=r.compat?.supportsToolSearch??!1,i=R(a.messages,k({supportsMidConvoSystemMessages:r.compat?.supportsMidConvoSystemMessages??!1,supportsAdditionalTools:n,supportsToolSearch:s})),c=_(r,a,N,{grammarToolInputProperties:p,supportsMidConvoSystemMessages:r.compat?.supportsMidConvoSystemMessages??!1,supportsAdditionalTools:n,supportsToolSearch:s,toolOptions:{supportsStrictMode:r.compat?.supportsStrictMode??!0,supportsOpenAIGrammarTools:r.compat?.supportsOpenAIGrammarTools??!1}}),o={model:t,input:c,stream:!0,prompt_cache_key:b(e?.sessionId),store:!1};e?.maxTokens&&(o.max_output_tokens=Math.max(e.maxTokens,G)),e?.temperature!==void 0&&(o.temperature=e?.temperature),i.requestTools.length>0&&(o.tools=x(i.requestTools,{supportsStrictMode:r.compat?.supportsStrictMode??!0,supportsOpenAIGrammarTools:r.compat?.supportsOpenAIGrammarTools??!1})),e?.toolChoice!==void 0&&(o.tool_choice=e.toolChoice);let m=e?.reasoningEffort??(e?.reasoningSummary?"medium":void 0);if(r.reasoning)if(m){let f=e?.reasoningEffort?r.thinkingLevelMap?.[e.reasoningEffort]??e.reasoningEffort:m;o.reasoning={effort:f,summary:e?.reasoningSummary||"auto"},o.include=["reasoning.encrypted_content"]}else r.thinkingLevelMap?.off!==null&&(o.reasoning={effort:r.thinkingLevelMap?.off??"none"});let u=S(r,m??"off",e?.samplingParams);return u&&Object.assign(o,u),o}export{K as stream,re as streamSimple};
|