@cortex-agent/server 2026.11.17 → 2026.12.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/THIRD_PARTY_NOTICES.txt +860 -294
- package/defaults/hooks/quota-stop.mjs +37 -0
- package/defaults/prompts/clean-workspace.md +5 -0
- package/dist/agent-adapter/claude/remote-mcp-proxy.js +1 -1
- package/dist/chunks/agent-runner-LVZVKBZX.js +4 -0
- package/dist/chunks/anthropic-messages-TT6454AA.js +8 -0
- package/dist/chunks/azure-openai-responses-52LR2XZD.js +4 -0
- package/dist/chunks/bedrock-converse-stream-EOZGYUNY.js +60 -0
- package/dist/chunks/child-runner-SMG2VOU5.js +4 -0
- package/dist/chunks/chunk-24DH4IR5.js +4 -0
- package/dist/chunks/chunk-25XKBRDT.js +70 -0
- package/dist/chunks/{chunk-VTL3Z2OP.js → chunk-2ABET62E.js} +1 -1
- package/dist/chunks/chunk-2BVUA256.js +4 -0
- package/dist/chunks/{chunk-4YLAGSDM.js → chunk-2WFL62UO.js} +1 -1
- package/dist/chunks/{chunk-LQTFDC67.js → chunk-335SSANX.js} +1 -1
- package/dist/chunks/chunk-377OPTXX.js +17 -0
- package/dist/chunks/chunk-3EZNVLBF.js +129 -0
- package/dist/chunks/{chunk-V6X7Y62J.js → chunk-3O6ZG5HA.js} +1 -1
- package/dist/chunks/{chunk-6AKUD3CF.js → chunk-3XLHL5YT.js} +1 -1
- package/dist/chunks/{chunk-2ATTYCRJ.js → chunk-4HRI75GU.js} +1 -1
- package/dist/chunks/chunk-4JBYLRPM.js +57 -0
- package/dist/chunks/chunk-4KKV7VKE.js +4 -0
- package/dist/chunks/chunk-4KQHDDC5.js +4 -0
- package/dist/chunks/chunk-4SWD4JMP.js +33 -0
- package/dist/chunks/chunk-52VCLZS5.js +4 -0
- package/dist/chunks/chunk-54P7TSY3.js +10 -0
- package/dist/chunks/chunk-5DVSAXOI.js +7 -0
- package/dist/chunks/chunk-5F3A62YS.js +4 -0
- package/dist/chunks/{chunk-S3MR37DL.js → chunk-5FHETFZM.js} +1 -1
- package/dist/chunks/{chunk-CEGSDGYQ.js → chunk-5LBLRAHS.js} +1 -1
- package/dist/chunks/chunk-5UYVNA3W.js +4 -0
- package/dist/chunks/chunk-6G3OYMCV.js +21 -0
- package/dist/chunks/chunk-7GGPYU5E.js +30 -0
- package/dist/chunks/chunk-7TYSMLUV.js +4 -0
- package/dist/chunks/chunk-7W7VYUTK.js +5 -0
- package/dist/chunks/chunk-AXYAZTTN.js +6 -0
- package/dist/chunks/chunk-B3NB243Z.js +4 -0
- package/dist/chunks/{chunk-XPPZ6Y3X.js → chunk-BKYP6AGM.js} +1 -1
- package/dist/chunks/{chunk-QUXPMNFQ.js → chunk-BVEDNESB.js} +1 -1
- package/dist/chunks/chunk-BWDJS6A4.js +12 -0
- package/dist/chunks/chunk-C6YVF7EI.js +4 -0
- package/dist/chunks/chunk-CEJIYYVE.js +15 -0
- package/dist/chunks/{chunk-5PAW3DEU.js → chunk-CI2RHH74.js} +4 -4
- package/dist/chunks/{chunk-OFEPDNRB.js → chunk-CMSOOLJB.js} +1 -1
- package/dist/chunks/chunk-CSVTYYLP.js +4 -0
- package/dist/chunks/chunk-DE5EGVKG.js +6 -0
- package/dist/chunks/{chunk-E6BYRULL.js → chunk-DK3RPZOQ.js} +1 -1
- package/dist/chunks/{chunk-ROVKOIHF.js → chunk-DK4UCK7L.js} +1 -1
- package/dist/chunks/chunk-DYLBVUAU.js +4 -0
- package/dist/chunks/{chunk-WBSE3EF3.js → chunk-FDC2GRBK.js} +1 -1
- package/dist/chunks/chunk-FE7HH5JS.js +18 -0
- package/dist/chunks/chunk-FYD57YRO.js +436 -0
- package/dist/chunks/chunk-G264APQN.js +5 -0
- package/dist/chunks/chunk-G4JYZFEO.js +11 -0
- package/dist/chunks/chunk-GFFM56U2.js +4 -0
- package/dist/chunks/chunk-GOS3P7KS.js +132 -0
- package/dist/chunks/{chunk-2VVRTJQN.js → chunk-HVN37UXD.js} +1 -1
- package/dist/chunks/{chunk-53TQNK7Z.js → chunk-IGZWZP7Z.js} +1 -1
- package/dist/chunks/{chunk-AFTBQRPN.js → chunk-IJ7XFQMI.js} +1 -1
- package/dist/chunks/{chunk-U23S37TT.js → chunk-IMMGYDAB.js} +1 -1
- package/dist/chunks/chunk-IOWBF7UK.js +10 -0
- package/dist/chunks/{chunk-MGYYSX7Y.js → chunk-ITGCWQFK.js} +1 -1
- package/dist/chunks/{chunk-QEL6CMLE.js → chunk-IVZ7QUEG.js} +1 -1
- package/dist/chunks/{chunk-EE3WT25T.js → chunk-IWY2HIFK.js} +1 -1
- package/dist/chunks/{chunk-KGJZAYQD.js → chunk-J7OBATRN.js} +1 -1
- package/dist/chunks/{chunk-NXZS5PEW.js → chunk-JGUEIW2W.js} +1 -1
- package/dist/chunks/chunk-JZ7U7RUK.js +351 -0
- package/dist/chunks/{chunk-VIMHSW6J.js → chunk-KJUQCCB5.js} +1 -1
- package/dist/chunks/{chunk-BUZQBTV2.js → chunk-KST6OY76.js} +1 -1
- package/dist/chunks/{chunk-KDPY2YA3.js → chunk-KZSAFVSY.js} +2 -2
- package/dist/chunks/chunk-LD2ZSH3M.js +903 -0
- package/dist/chunks/{chunk-RYLSRII6.js → chunk-LE6QPXN6.js} +1 -1
- package/dist/chunks/{chunk-TX46YMGI.js → chunk-LIIZI3HY.js} +1 -1
- package/dist/chunks/{chunk-3CZPBLB3.js → chunk-MJQ2D2OP.js} +1 -1
- package/dist/chunks/{chunk-P7TVR4GY.js → chunk-NHHR4DCF.js} +1 -1
- package/dist/chunks/chunk-NW4GW47L.js +4 -0
- package/dist/chunks/chunk-OALEJ6FG.js +60 -0
- package/dist/chunks/chunk-OIV4DIMB.js +4 -0
- package/dist/chunks/{chunk-T73GHMFB.js → chunk-OJ37ZWBG.js} +1 -1
- package/dist/chunks/{chunk-7GEBDPTT.js → chunk-OZXMPBUX.js} +1 -1
- package/dist/chunks/chunk-PG7452XE.js +4 -0
- package/dist/chunks/chunk-PJCUB7YJ.js +4 -0
- package/dist/chunks/{chunk-RA2BUYI3.js → chunk-PTS3J4DQ.js} +1 -1
- package/dist/chunks/{chunk-2ROGTDM2.js → chunk-PVVEEBUU.js} +1 -1
- package/dist/chunks/{chunk-W6AKCEYF.js → chunk-Q7BZLPBU.js} +1 -1
- package/dist/chunks/{chunk-SY2HV3V5.js → chunk-QC66ZXPP.js} +1 -1
- package/dist/chunks/chunk-QXFWIL4C.js +4 -0
- package/dist/chunks/{chunk-NRD57ICT.js → chunk-R2CCD4OF.js} +1 -1
- package/dist/chunks/{chunk-R52AVUQB.js → chunk-RG5GP4RB.js} +1 -1
- package/dist/chunks/{chunk-IKLTEWA3.js → chunk-RW2F2QNP.js} +1 -1
- package/dist/chunks/{chunk-XEBEWR6Y.js → chunk-RWPO3NZ3.js} +1 -1
- package/dist/chunks/chunk-SDUS2H3E.js +4 -0
- package/dist/chunks/chunk-SIHGKM4E.js +4 -0
- package/dist/chunks/{chunk-NNBSSISP.js → chunk-SKHFU5DI.js} +1 -1
- package/dist/chunks/{chunk-STUHNKQS.js → chunk-SM45TH22.js} +1 -1
- package/dist/chunks/chunk-T54CZKNJ.js +6 -0
- package/dist/chunks/chunk-TRXLIL7V.js +4 -0
- package/dist/chunks/{chunk-KUDK7GPS.js → chunk-UEEW2R4E.js} +1 -1
- package/dist/chunks/chunk-UHXPRU6G.js +10 -0
- package/dist/chunks/chunk-UPQVWHZ3.js +4 -0
- package/dist/chunks/{chunk-BDLKI2NT.js → chunk-VHX2GHBF.js} +1 -1
- package/dist/chunks/chunk-VOAKRJ4R.js +4 -0
- package/dist/chunks/{chunk-FP7ML72L.js → chunk-WU7RNAZD.js} +1 -1
- package/dist/chunks/chunk-WZC4TDDM.js +6 -0
- package/dist/chunks/chunk-X2TKJ7KR.js +11 -0
- package/dist/chunks/{chunk-H4QZ2P3Z.js → chunk-X5ND4H4P.js} +1 -1
- package/dist/chunks/{chunk-5A6CA5TM.js → chunk-Y3AOGNDT.js} +1 -1
- package/dist/chunks/chunk-Y6DGVTKM.js +6 -0
- package/dist/chunks/{chunk-LP7T32PW.js → chunk-YAEHSSR4.js} +1 -1
- package/dist/chunks/chunk-YWPBE5LP.js +4 -0
- package/dist/chunks/chunk-ZAVX7G2M.js +15 -0
- package/dist/chunks/chunk-ZD2M73XA.js +19 -0
- package/dist/chunks/chunk-ZD4O6NPV.js +4 -0
- package/dist/chunks/chunk-ZNAMETPQ.js +4 -0
- package/dist/chunks/chunk-ZY6N5LVQ.js +4 -0
- package/dist/chunks/chunk-ZYQ4TDTT.js +81 -0
- package/dist/chunks/cli-VB2N7HEK.js +55 -0
- package/dist/chunks/cloudflare-workers-ai-system-one-YKU742EC.js +4 -0
- package/dist/chunks/context-CI2FKEQE.js +4 -0
- package/dist/chunks/cost-CZRRSIUF.js +5 -0
- package/dist/chunks/dist-QCNQN6DY.js +4 -0
- package/dist/chunks/{easter-egg-3d-CZH7AYZ7.js → easter-egg-3d-XR5S2O3T.js} +1 -1
- package/dist/chunks/execution-repo-5TLV2NM4.js +4 -0
- package/dist/chunks/{executions-BN6OLLVM.js → executions-I3UUIGSL.js} +1 -1
- package/dist/chunks/file-Y5G56IUT.js +4 -0
- package/dist/chunks/github-copilot-BRU2SRRZ.js +4 -0
- package/dist/chunks/google-generative-ai-ZF5QEUZV.js +4 -0
- package/dist/chunks/google-vertex-4PJZZI3Y.js +4 -0
- package/dist/chunks/init-A6GY656J.js +4 -0
- package/dist/chunks/{install-cli-ABBD7DO5.js → install-cli-FALWKQYO.js} +1 -1
- package/dist/chunks/{interaction-ask-EE2UPR3Q.js → interaction-ask-O5HGF6CH.js} +1 -1
- package/dist/chunks/{interaction-plan-C446T2GZ.js → interaction-plan-JTVDN3BC.js} +1 -1
- package/dist/chunks/kimi-coding-ZCIBMDZ6.js +4 -0
- package/dist/chunks/{llama-cpp-classify-IA2F2H7A.js → llama-cpp-classify-NRUXAIGQ.js} +3 -3
- package/dist/chunks/local-client-stop-RS4AHNF4.js +4 -0
- package/dist/chunks/memory-cli-DIT4DQF3.js +11 -0
- package/dist/chunks/meta-JQH66YU7.js +4 -0
- package/dist/chunks/mistral-conversations-CXHOECUV.js +7 -0
- package/dist/chunks/model-resolver-GIBPYRKP.js +4 -0
- package/dist/chunks/monitor-Z2HKNY5E.js +4 -0
- package/dist/chunks/openai-codex-responses-U6DGMGDK.js +12 -0
- package/dist/chunks/openai-completions-PP4XLLOM.js +9 -0
- package/dist/chunks/{openai-decisions-P5UX7BWY.js → openai-decisions-JU6QQKEM.js} +1 -1
- package/dist/chunks/openai-responses-2SG757TL.js +6 -0
- package/dist/chunks/openrouter-images-32M7YZWC.js +4 -0
- package/dist/chunks/pi-messages-VSINMXN4.js +10 -0
- package/dist/chunks/radius-THYKWV4E.js +4 -0
- package/dist/chunks/remote-ops-2WBEFQ3E.js +14 -0
- package/dist/chunks/runner-5MKMRTIN.js +4 -0
- package/dist/chunks/runtime-DST3H5JP.js +4 -0
- package/dist/chunks/schedule-cli-V7Y2BBVY.js +4 -0
- package/dist/chunks/slack-R7SEJYMY.js +4 -0
- package/dist/chunks/start-ui-http-7K5JOLPU.js +43 -0
- package/dist/chunks/subagent-Z5IQ4L54.js +4 -0
- package/dist/chunks/tool-shims-YCXZWTST.js +4 -0
- package/dist/chunks/typesafe-system-one-M2DABJSZ.js +4 -0
- package/dist/chunks/ui-board-HQIE4RZG.js +5 -0
- package/dist/chunks/ui-decision-YBZDS4YW.js +4 -0
- package/dist/chunks/{ui-file-6PLXHSTB.js → ui-file-SRD4ILBS.js} +1 -1
- package/dist/chunks/ui-view-Z25MTZT7.js +4 -0
- package/dist/chunks/virtual-modules-H4DXPJZB.js +4 -0
- package/dist/chunks/{waitpoint-W5M3BE55.js → waitpoint-M6JZBSLT.js} +1 -1
- package/dist/chunks/workers-SQ2R32TK.js +4 -0
- package/dist/client-bundle/client.mjs +229 -62
- package/dist/client-bundle/manifest.json +2 -2
- package/dist/core/pi-sdk.js +1 -1
- package/dist/domain/auth/cc-auth-cli.js +1 -1
- package/dist/domain/mcp/bundled-server.js +1 -1
- package/dist/domain/mcp/feishu/client.js +1 -1
- package/dist/entry/app.js +138 -556
- package/dist/entry/browser-cli.js +1 -1
- package/dist/entry/cli.js +1 -1
- package/dist/entry/cortex-cli.js +1 -1
- package/dist/entry/daemon.js +3 -3
- package/dist/entry/hook-cli.js +1 -1
- package/dist/entry/production-app-bootstrap.js +1 -1
- package/dist/entry/production-evidence-export-cli.js +1 -1
- package/dist/entry/signal-cli.js +1 -1
- package/dist/tui/index.js +1 -1
- package/package.json +1 -1
- package/vendor/pi/CHANGELOG.md +330 -0
- package/vendor/pi/dist/codemode-worker.js +2 -0
- package/vendor/pi/dist/core/export-html/ansi-to-html.js +57 -20
- package/vendor/pi/dist/core/export-html/template.css +9 -0
- package/vendor/pi/dist/core/export-html/template.js +166 -46
- package/vendor/pi/dist/core/export-html/tool-renderer.js +5 -3
- package/vendor/pi/dist/core/extensions/loader.js +1 -1
- package/vendor/pi/dist/extensions/codemode/execute.js +15 -13
- package/vendor/pi/dist/modes/interactive/theme/theme.js +36 -23
- package/vendor/pi/dist/utils/image-resize-worker.js +1 -1
- package/vendor/pi/dist/utils/image-resize.js +1 -1
- package/vendor/pi/docs/cli.md +35 -12
- package/vendor/pi/docs/custom-provider.md +2 -0
- package/vendor/pi/docs/environment-variables.md +2 -0
- package/vendor/pi/docs/extensions.md +3192 -225
- package/vendor/pi/docs/keybindings.md +2 -2
- package/vendor/pi/docs/llama-cpp.md +27 -19
- package/vendor/pi/docs/mcp.md +6 -4
- package/vendor/pi/docs/message-types.md +1 -1
- package/vendor/pi/docs/models-configuration.md +9 -3
- package/vendor/pi/docs/models.md +2 -1
- package/vendor/pi/docs/nvidia-rtx-llama-cpp.md +5 -5
- package/vendor/pi/docs/packages.md +24 -0
- package/vendor/pi/docs/prompt-templates.md +1 -1
- package/vendor/pi/docs/providers.md +4 -2
- package/vendor/pi/docs/quickstart.md +7 -3
- package/vendor/pi/docs/rpc-commands.md +1 -1
- package/vendor/pi/docs/rpc.md +4 -2
- package/vendor/pi/docs/sessions.md +17 -3
- package/vendor/pi/docs/settings.md +6 -5
- package/vendor/pi/docs/slash-commands.md +3 -2
- package/vendor/pi/docs/terminal-setup.md +3 -1
- package/vendor/pi/docs/tmux.md +6 -0
- package/vendor/pi/docs/tui.md +4 -0
- package/vendor/pi/docs/windows.md +27 -0
- package/vendor/pi/examples/extensions/README.md +2 -1
- package/vendor/pi/examples/extensions/custom-provider-anthropic/index.ts +27 -31
- package/vendor/pi/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/vendor/pi/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/vendor/pi/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/vendor/pi/examples/extensions/debug-provider.ts +2 -2
- package/vendor/pi/examples/extensions/gondolin/index.ts +4 -7
- package/vendor/pi/examples/extensions/gondolin/package-lock.json +19 -29
- package/vendor/pi/examples/extensions/gondolin/package.json +2 -2
- package/vendor/pi/examples/extensions/plan-mode/index.ts +23 -13
- package/vendor/pi/examples/extensions/plan-mode/utils.ts +42 -16
- package/vendor/pi/examples/extensions/preset.ts +2 -0
- package/vendor/pi/examples/extensions/reload-runtime.ts +17 -5
- package/vendor/pi/examples/extensions/subagent/README.md +14 -11
- package/vendor/pi/examples/extensions/subagent/index.ts +392 -171
- package/vendor/pi/examples/extensions/todo.ts +7 -0
- package/vendor/pi/examples/extensions/tools.ts +2 -0
- package/vendor/pi/examples/extensions/with-deps/package-lock.json +2 -2
- package/vendor/pi/examples/extensions/with-deps/package.json +1 -1
- package/vendor/pi/examples/tsconfig.json +208 -0
- package/vendor/pi/package.json +15 -16
- package/vendor/pi/schemas/models.schema.json +66 -37
- package/vendor/pi/schemas/settings.schema.json +18 -1
- package/vendor/pi-ai/bedrock.js +1 -1
- package/vendor/pi-ai/oauth-load.js +1 -1
- package/web/dist/assets/{board-math-css-BgIyUG-C.js → board-math-css-DKX6FcUS.js} +1 -1
- package/web/dist/assets/index-D11wi0uG.js +540 -0
- package/web/dist/assets/index-JedYumhY.css +1 -0
- package/web/dist/assets/{index-C2eMpcuI.js → index-jl30Gy8P.js} +1 -1
- package/web/dist/index.html +2 -2
- package/dist/chunks/anthropic-messages-M732OMEE.js +0 -8
- package/dist/chunks/azure-openai-responses-RAKTV6JY.js +0 -4
- package/dist/chunks/bedrock-converse-stream-WNUGNZ27.js +0 -62
- package/dist/chunks/child-runner-MO5RT6FH.js +0 -4
- package/dist/chunks/chunk-3CPIMAYX.js +0 -30
- package/dist/chunks/chunk-3ORG56I5.js +0 -8
- package/dist/chunks/chunk-4EX2JJWB.js +0 -4
- package/dist/chunks/chunk-5DF5WJNM.js +0 -60
- package/dist/chunks/chunk-7GAYFN52.js +0 -18
- package/dist/chunks/chunk-AVXDF7AG.js +0 -4
- package/dist/chunks/chunk-BJGYGEZO.js +0 -6
- package/dist/chunks/chunk-BZDIAI5M.js +0 -125
- package/dist/chunks/chunk-CK3P345X.js +0 -133
- package/dist/chunks/chunk-CVC66CFV.js +0 -33
- package/dist/chunks/chunk-ETIBCA2S.js +0 -4
- package/dist/chunks/chunk-FF7UELTU.js +0 -4
- package/dist/chunks/chunk-FX6MOGLR.js +0 -11
- package/dist/chunks/chunk-G2V65UBA.js +0 -4
- package/dist/chunks/chunk-HGPBHTVD.js +0 -6
- package/dist/chunks/chunk-IYVZHGUQ.js +0 -5
- package/dist/chunks/chunk-JJDEQ6N2.js +0 -4
- package/dist/chunks/chunk-KDYEGGMW.js +0 -4
- package/dist/chunks/chunk-L6VCIGWS.js +0 -11
- package/dist/chunks/chunk-LACGULCN.js +0 -10
- package/dist/chunks/chunk-LAWOWPZX.js +0 -363
- package/dist/chunks/chunk-NNTQUHLO.js +0 -877
- package/dist/chunks/chunk-OE4KH3NJ.js +0 -4
- package/dist/chunks/chunk-OSEIQ7SS.js +0 -4
- package/dist/chunks/chunk-PZMGBKUR.js +0 -13
- package/dist/chunks/chunk-QBKCAIJG.js +0 -4
- package/dist/chunks/chunk-QMSSIDRQ.js +0 -70
- package/dist/chunks/chunk-QUUEQRIT.js +0 -4
- package/dist/chunks/chunk-RA6HKFBV.js +0 -4
- package/dist/chunks/chunk-RDW6FRF5.js +0 -4
- package/dist/chunks/chunk-RF4JLYBX.js +0 -6
- package/dist/chunks/chunk-SFX7V5O2.js +0 -10
- package/dist/chunks/chunk-SKHLZ6XY.js +0 -9
- package/dist/chunks/chunk-STCNHXPJ.js +0 -6
- package/dist/chunks/chunk-UT6DGZDO.js +0 -4
- package/dist/chunks/chunk-VBN2JSER.js +0 -5
- package/dist/chunks/chunk-VK5J556O.js +0 -4
- package/dist/chunks/chunk-VPVSKJGX.js +0 -6
- package/dist/chunks/chunk-VQUPKMDR.js +0 -4
- package/dist/chunks/chunk-WEZWKMYU.js +0 -4
- package/dist/chunks/chunk-XYSXL3KX.js +0 -4
- package/dist/chunks/chunk-Y3GFB5XM.js +0 -8
- package/dist/chunks/chunk-YAAKL3QS.js +0 -80
- package/dist/chunks/chunk-YB5LUJHS.js +0 -65
- package/dist/chunks/chunk-YKKEI5GI.js +0 -4
- package/dist/chunks/chunk-Z24SBRJK.js +0 -4
- package/dist/chunks/cli-5DBTRMHU.js +0 -53
- package/dist/chunks/cloudflare-workers-ai-system-one-32JCFHI3.js +0 -4
- package/dist/chunks/context-GQKWKFRM.js +0 -4
- package/dist/chunks/cost-OOO32GLC.js +0 -5
- package/dist/chunks/dist-V5FRMUFH.js +0 -4
- package/dist/chunks/execution-repo-XXL4FXC6.js +0 -4
- package/dist/chunks/file-H572PL2Z.js +0 -4
- package/dist/chunks/github-copilot-HAI2DA62.js +0 -4
- package/dist/chunks/google-generative-ai-2G4ITOZL.js +0 -4
- package/dist/chunks/google-vertex-PACHCMRZ.js +0 -4
- package/dist/chunks/init-75F4V7SK.js +0 -4
- package/dist/chunks/kimi-coding-HMJRKCPA.js +0 -4
- package/dist/chunks/local-client-stop-5YOLXGYT.js +0 -4
- package/dist/chunks/memory-cli-5SSF6YJM.js +0 -11
- package/dist/chunks/meta-KY3LNFV2.js +0 -4
- package/dist/chunks/mistral-conversations-VHP63CDS.js +0 -7
- package/dist/chunks/model-resolver-FVJNZ6NA.js +0 -4
- package/dist/chunks/openai-codex-responses-EHJ4AZBE.js +0 -12
- package/dist/chunks/openai-completions-CRAGQFCE.js +0 -9
- package/dist/chunks/openai-responses-IZ22NVQ7.js +0 -6
- package/dist/chunks/openrouter-images-W2JAMSRH.js +0 -4
- package/dist/chunks/pi-messages-MJEEQU2R.js +0 -10
- package/dist/chunks/radius-ZM7ZRMXF.js +0 -4
- package/dist/chunks/remote-ops-O5CR4RGA.js +0 -14
- package/dist/chunks/runner-S6R3US24.js +0 -4
- package/dist/chunks/runtime-6YLTA2ZD.js +0 -4
- package/dist/chunks/schedule-cli-4T4YC5V5.js +0 -4
- package/dist/chunks/slack-2CGM4SMY.js +0 -4
- package/dist/chunks/start-ui-http-3D7QNHGB.js +0 -43
- package/dist/chunks/subagent-OZGUOV3J.js +0 -4
- package/dist/chunks/tool-shims-IA2WELXJ.js +0 -4
- package/dist/chunks/typesafe-system-one-6ULACYD4.js +0 -4
- package/dist/chunks/ui-board-H4INJD6C.js +0 -5
- package/dist/chunks/ui-decision-6HHNROIT.js +0 -4
- package/dist/chunks/ui-view-6MDU4GXY.js +0 -4
- package/dist/chunks/virtual-modules-OFI7QKYH.js +0 -4
- package/dist/chunks/workers-GTFP75MS.js +0 -4
- package/vendor/pi/examples/extensions/sandbox/index.ts +0 -321
- package/vendor/pi/examples/extensions/sandbox/package-lock.json +0 -92
- package/vendor/pi/examples/extensions/sandbox/package.json +0 -19
- package/web/dist/assets/index-9lyu2S6W.css +0 -1
- package/web/dist/assets/index-C-hpzey7.js +0 -532
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// PostToolUse hook on every Claude process Cortex starts (see hooks-builder.ts, withQuotaStopHook).
|
|
3
|
+
// While this process's account is past its five-hour stop threshold, it ends an automatic turn once
|
|
4
|
+
// the tool that just ran has finished: `continue: false` stops the loop without undoing the tool.
|
|
5
|
+
// The server writes the state file (domain/costs/quota-stop.ts) only while some account is stopped:
|
|
6
|
+
// { "routes": { "<account>": { "utilization", "threshold", "resetsAt" (epoch s), … } },
|
|
7
|
+
// "exempt": ["<session id of a turn a person opened>", …] }
|
|
8
|
+
|
|
9
|
+
import { readFileSync } from 'node:fs';
|
|
10
|
+
|
|
11
|
+
/** Too close to the reset, a stop would outlive its reason. */
|
|
12
|
+
const RESET_MARGIN_S = 60;
|
|
13
|
+
|
|
14
|
+
function readJson(source) {
|
|
15
|
+
try { return JSON.parse(readFileSync(source, 'utf8')); } catch { return null; }
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function percent(value) {
|
|
19
|
+
return `${Math.round(value * 100)}%`;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function stopReason(route, entry) {
|
|
23
|
+
return `Cortex quota stop: the ${route} five-hour window at ${percent(entry.utilization)} `
|
|
24
|
+
+ `(stop threshold ${percent(entry.threshold)}). This automatic turn resumes after the window resets.`;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function spared(state, input) {
|
|
28
|
+
const exempt = new Set(Array.isArray(state.exempt) ? state.exempt : []);
|
|
29
|
+
return exempt.has(process.env.CORTEX_SESSION_ID) || exempt.has(input?.session_id);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const state = readJson(process.argv[2]);
|
|
33
|
+
const route = process.env.CORTEX_QUOTA_ROUTE;
|
|
34
|
+
const entry = route ? state?.routes?.[route] : undefined;
|
|
35
|
+
if (entry && Date.now() / 1000 < entry.resetsAt - RESET_MARGIN_S && !spared(state, readJson(0))) {
|
|
36
|
+
process.stdout.write(JSON.stringify({ continue: false, stopReason: stopReason(route, entry) }));
|
|
37
|
+
}
|
|
@@ -5,6 +5,11 @@ sources for this task. You may also access files or directories outside the work
|
|
|
5
5
|
user explicitly authorizes for this task, within the authorized paths and operations. Files given
|
|
6
6
|
for the task are in `inputs/`; treat them as reference unless asked to change them.
|
|
7
7
|
|
|
8
|
+
The most recent `[Authorized Paths]` block is the current list of authorized paths; use each one
|
|
9
|
+
only with the access it lists, and stop using a path once a newer block drops it. A path written
|
|
10
|
+
`<device>:<path>` is on that connected device: reach it with the remote_* tools. A path the user
|
|
11
|
+
authorizes in the conversation itself is authorized too.
|
|
12
|
+
|
|
8
13
|
- Read, search and list files only inside the workspace or user-authorized paths. Do not open,
|
|
9
14
|
grep, glob or ls anywhere else — home, parent directories, other projects, configuration or
|
|
10
15
|
history folders — however relevant a path looks.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { createRequire as __cortexCreateRequire } from 'node:module';
|
|
2
2
|
const require = __cortexCreateRequire(import.meta.url);
|
|
3
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-R6CGBSTC.js";import{a as f,b as d}from"../../chunks/chunk-WZYS2HAK.js";import{H as c,K as i}from"../../chunks/chunk-TMV2ZDOI.js";import"../../chunks/chunk-KRXTI4JO.js";import{K as o}from"../../chunks/chunk-W34AK4SK.js";import{e as s}from"../../chunks/chunk-
|
|
4
|
+
import{a as m,b as p,c as l,d as u}from"../../chunks/chunk-R6CGBSTC.js";import{a as f,b as d}from"../../chunks/chunk-WZYS2HAK.js";import{H as c,K as i}from"../../chunks/chunk-TMV2ZDOI.js";import"../../chunks/chunk-KRXTI4JO.js";import{K as o}from"../../chunks/chunk-W34AK4SK.js";import{e as s}from"../../chunks/chunk-7W7VYUTK.js";import{b as a}from"../../chunks/chunk-JGUEIW2W.js";import"../../chunks/chunk-T54CZKNJ.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,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{Ub as a,Vb as b}from"./chunk-FYD57YRO.js";import"./chunk-TURBFBYN.js";import"./chunk-ZYQ4TDTT.js";import"./chunk-IVZ7QUEG.js";import"./chunk-LE6QPXN6.js";import"./chunk-PVVEEBUU.js";import"./chunk-NT32UURL.js";import"./chunk-TJ4GQRT6.js";import"./chunk-ZAVX7G2M.js";import"./chunk-Y3AOGNDT.js";import"./chunk-LMDWRRX4.js";import"./chunk-3EZNVLBF.js";import"./chunk-IA6IODY3.js";import"./chunk-UHXPRU6G.js";import"./chunk-NHD2ESHA.js";import"./chunk-QN44UXQR.js";import"./chunk-I6OPDRVF.js";import"./chunk-B3XBQEFM.js";import"./chunk-TZGNSHOL.js";import"./chunk-2YTYYG4K.js";import"./chunk-CMSOOLJB.js";import"./chunk-ZNAMETPQ.js";import"./chunk-4KQHDDC5.js";import"./chunk-QXFWIL4C.js";import"./chunk-Y6ZEVVL5.js";import"./chunk-R6CGBSTC.js";import"./chunk-WZYS2HAK.js";import"./chunk-TMV2ZDOI.js";import"./chunk-JKL3AK5D.js";import"./chunk-LP72AF56.js";import"./chunk-N6BTQN7R.js";import"./chunk-SAJD4EKE.js";import"./chunk-IOWBF7UK.js";import"./chunk-2ABET62E.js";import"./chunk-2WFL62UO.js";import"./chunk-5LBLRAHS.js";import"./chunk-IWY2HIFK.js";import"./chunk-PG7452XE.js";import"./chunk-RW2F2QNP.js";import"./chunk-5DVSAXOI.js";import"./chunk-HVN37UXD.js";import"./chunk-Y6DGVTKM.js";import"./chunk-OZXMPBUX.js";import"./chunk-V7K3KNDM.js";import"./chunk-5T7IX5KN.js";import"./chunk-UEEW2R4E.js";import"./chunk-VHX2GHBF.js";import"./chunk-C6YVF7EI.js";import"./chunk-ITGCWQFK.js";import"./chunk-PTS3J4DQ.js";import"./chunk-IMMGYDAB.js";import"./chunk-OJ37ZWBG.js";import"./chunk-SKHFU5DI.js";import"./chunk-V35MFAUQ.js";import"./chunk-OKRK6JPY.js";import"./chunk-52VCLZS5.js";import"./chunk-B3NB243Z.js";import"./chunk-LCKVYFMD.js";import"./chunk-5M4PFLRW.js";import"./chunk-BVEDNESB.js";import"./chunk-BKYP6AGM.js";import"./chunk-KST6OY76.js";import"./chunk-AXYAZTTN.js";import"./chunk-SM45TH22.js";import"./chunk-R2CCD4OF.js";import"./chunk-KRXTI4JO.js";import"./chunk-W34AK4SK.js";import"./chunk-LIIZI3HY.js";import"./chunk-Q4UGYGU5.js";import"./chunk-TRXLIL7V.js";import"./chunk-7GGPYU5E.js";import"./chunk-7W7VYUTK.js";import"./chunk-JGUEIW2W.js";import"./chunk-T54CZKNJ.js";import"./chunk-WHC7AYZD.js";export{a as AgentRunner,b as agentRunner};
|
|
@@ -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 ne,e as se,f as re,g as oe,h as ie}from"./chunk-4KKV7VKE.js";import{a as le,b as de}from"./chunk-UPQVWHZ3.js";import{a as ge,b as me}from"./chunk-BGYR4ID3.js";import{a as ce}from"./chunk-V3AQJSWR.js";import{a as Te,b as xe,c as be}from"./chunk-ZY6N5LVQ.js";import{a as te}from"./chunk-OIV4DIMB.js";import{b as X,f as ee}from"./chunk-BWDJS6A4.js";import{a as C}from"./chunk-6R73ICDB.js";import{a as pe}from"./chunk-23PRJECN.js";import{a as F,b as fe,f as he,i as _e,k as ye,o as ke,p as we,q as j}from"./chunk-7TYSMLUV.js";import{G as U,p as Z,r as L,v as Q}from"./chunk-DE5EGVKG.js";import{d as N}from"./chunk-D6VMBA4C.js";import{a as b}from"./chunk-USBJFDJ6.js";import{b as ae}from"./chunk-ZD4O6NPV.js";import{a as ue}from"./chunk-K4NTZEDJ.js";import{h as H}from"./chunk-3XLHL5YT.js";import{b as J,c as Y}from"./chunk-X2TKJ7KR.js";import"./chunk-NW4GW47L.js";import{b as $}from"./chunk-CXT5IR5T.js";import{m as P}from"./chunk-VW7TLY3P.js";import"./chunk-WHC7AYZD.js";function Ee(e,n){return e||(C("PI_CACHE_RETENTION",n)==="long"?"long":"short")}function Le(e,n,t){let s=Ee(n,t);if(s==="none")return{retention:s};let i=s==="long"&&O(e).supportsLongCacheRetention?"1h":void 0;return{retention:s,cacheControl:{type:"ephemeral",...i&&{ttl:i}}}}var Pe="2.1.322",De=["Read","Write","Edit","Bash","Grep","Glob","AskUserQuestion","EnterPlanMode","ExitPlanMode","KillShell","NotebookEdit","Skill","Task","TaskOutput","TodoWrite","WebFetch","WebSearch"],Be=new Map(De.map(e=>[e.toLowerCase(),e])),V=e=>Be.get(e.toLowerCase())??e,He=(e,n)=>{if(n&&n.length>0){let t=e.toLowerCase(),s=n.find(i=>i.name.toLowerCase()===t);if(s)return s.name}return e};function z(e){return{type:"image",source:{type:"base64",media_type:e.mimeType,data:e.data}}}function Ue(e){if(!e.some(i=>i.type==="image"))return b(e.map(i=>i.text).join(`
|
|
5
|
+
`));let t=e.map(i=>i.type==="text"?{type:"text",text:b(i.text)}:z(i));return t.some(i=>i.type==="text")||t.unshift({type:"text",text:"(see attached image)"}),t}var Fe="fine-grained-tool-streaming-2025-05-14",je="interleaved-thinking-2025-05-14",We="server-side-fallback-2026-07-01",qe="mid-conversation-output-config-2026-07-01",Ge="thinking-binding-controls-2026-08-01",Ke="inline-tools-2026-09-15",Ve="message-threads-2026-08-12",ze={name:"__pi_deferred_placeholder__",description:"Reserved placeholder. Never available. Never call this.",input_schema:{type:"object",properties:{},required:[]},defer_loading:!0};function $e(e){return(e.compat?.allowedFallbackModels?.length??0)>0}function O(e){let n=e.provider==="openrouter"||e.baseUrl.includes("openrouter.ai");return{supportsEagerToolInputStreaming:e.compat?.supportsEagerToolInputStreaming??!0,supportsLongCacheRetention:e.compat?.supportsLongCacheRetention??!0,sendSessionAffinityHeaders:e.compat?.sendSessionAffinityHeaders??n,sessionAffinityFormat:e.compat?.sessionAffinityFormat??(n?"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,supportsMessageThreads:e.compat?.supportsMessageThreads??e.baseUrl.includes("api.anthropic.com")}}var S=new Map,Je=1e4,Ye=new Set(["thread_not_found","thread_already_continued","thread_continue_in_flight","thread_fingerprint_mismatch"]);function Se(e,n){if(S.delete(e),S.set(e,n),S.size>Je){let t=S.keys().next().value;t!==void 0&&S.delete(t)}}te(e=>{e?S.delete(e):S.clear()});function Re(e,n,t){let{system:s,tools:i,thinking:a,output_config:c,tool_choice:r,betas:l,fallbacks:m}=n,u=JSON.stringify([e.provider,e.baseUrl,n.model,s,i,a,c,r,l,m]),d=JSON.stringify(t,(h,_)=>{if(h!=="cache_control")return h==="content"&&typeof _=="string"?[{type:"text",text:_}]:_});return ce(u+d)}function Ce(e,n){return{sessionId:e,body:{...n,thread:{type:"create"}}}}function Ze(e,n,t){let s=S.get(n);if(s!=="off"){if(s!==void 0&&t.messages.length>s.prefixCount&&Re(e,t,t.messages.slice(0,s.prefixCount))===s.prefixHash){S.delete(n);let{system:i,tools:a,...c}=t;return{body:{...c,messages:t.messages.slice(s.prefixCount),thread:{type:"continue",previous_message_id:s.replyId}},sessionId:n}}return Ce(n,t)}}function Qe(e){let t=e.error?.error?.details?.error_code;return typeof t=="string"?t:void 0}async function Xe(e,n,t,s,i){try{return{response:await t(e.body),thread:e}}catch(a){if(i?.aborted||!(a instanceof P.APIError))throw a;let c=Qe(a),r=c!==void 0&&Ye.has(c),l=c==="thread_unsupported_request"||c===void 0&&a.status===400&&a.message.includes("thread");if(!r&&!l)throw a;if(N(s,{type:"anthropic_thread_fallback",timestamp:Date.now(),error:{message:a.message},details:{reason:c??String(a.status)}}),r){let u=Ce(e.sessionId,n);return{response:await t(u.body),thread:u}}let m=await t(n);return Se(e.sessionId,"off"),{response:m,thread:void 0}}}function et(e,n,t,s,i,a){if(s.responseId===void 0||s.responseModel!==void 0)return;let c=Ne(j([s],e,Oe),i,void 0,a).messages.filter(l=>l.role==="assistant"),r=[...t.messages,...c];Se(n.sessionId,{prefixCount:r.length,prefixHash:Re(e,t,r),replyId:s.responseId})}function W(...e){let n={};for(let t of e)t&&Object.assign(n,t);return n}function q(e,n){if(!e)return!1;let t=n.toLowerCase();for(let[s,i]of Object.entries(e))if(s.toLowerCase()===t&&i!==null&&i.trim().length>0)return!0;return!1}function ve(e,n){return!!e||q(n,"authorization")||q(n,"x-api-key")||q(n,"cf-aig-authorization")}function Ie(e,n,t){if(!ve(n,t))throw new Error(`No API key for provider: ${e}`)}var M=class extends P{_shouldResolveDefaultCredentials(){return!1}};function Ae(e,n,t,s){if(e.provider!=="anthropic"||ve(n,t))return;let i=C(ne,s),a=C(se,s),c=C(oe,s);if(!(!i||!a||!c))return{organization_id:a,workspace_id:C(ie,s),authentication:{type:"oidc_federation",federation_rule_id:i,service_account_id:C(re,s),identity_token:{source:"file",path:c}}}}var D,tt=new Set(["message_start","message_delta","message_stop","content_block_start","content_block_delta","content_block_stop"]);function Me(e){if(!e.event&&e.data.length===0)return null;let n={event:e.event,data:e.data.join(`
|
|
6
|
+
`),raw:[...e.raw]};return e.event=null,e.data=[],e.raw=[],n}function G(e,n){if(e==="")return Me(n);if(n.raw.push(e),e.startsWith(":"))return null;let t=e.indexOf(":"),s=t===-1?e:e.slice(0,t),i=t===-1?"":e.slice(t+1);return i.startsWith(" ")&&(i=i.slice(1)),s==="event"?n.event=i:s==="data"&&n.data.push(i),null}function nt(e){let n=e.indexOf("\r"),t=e.indexOf(`
|
|
7
|
+
`);return n===-1?t:t===-1?n:Math.min(n,t)}function B(e){let n=nt(e);if(n===-1)return null;let t=n+1;return e[n]==="\r"&&e[t]===`
|
|
8
|
+
`&&(t+=1),{line:e.slice(0,n),rest:e.slice(t)}}async function*st(e,n){let t=e.getReader(),s=new TextDecoder,i={event:null,data:[],raw:[]},a="";try{for(;;){if(n?.aborted)throw new Error("Request was aborted");let{value:l,done:m}=await t.read();if(m)break;a+=s.decode(l,{stream:!0});let u=B(a);for(;u;){a=u.rest;let d=G(u.line,i);d&&(yield d),u=B(a)}}a+=s.decode();let c=B(a);for(;c;){a=c.rest;let l=G(c.line,i);l&&(yield l),c=B(a)}if(a.length>0){let l=G(a,i);l&&(yield l)}let r=Me(i);r&&(yield r)}finally{t.releaseLock()}}async function*rt(e,n){if(!e.body)throw new Error("Attempted to iterate over an Anthropic response with no body");let t=!1,s=!1;for await(let i of st(e.body,n)){if(i.event==="error")throw new Error(i.data);if(tt.has(i.event??""))try{let a=X(i.data);a.type==="message_start"?t=!0:a.type==="message_stop"&&(s=!0),yield a}catch(a){let c=a instanceof Error?a.message:String(a);throw new Error(`Could not parse Anthropic SSE event ${i.event}: ${c}; data=${i.data}; raw=${i.raw.join("\\n")}`)}}if(t&&!s)throw new Error("Anthropic stream ended before message_stop")}var K=(e,n,t)=>{let s=new $,i=O(e),a=Q(n,i.supportsMidConvoSystemMessages),c=L(a.messages);return(async()=>{let r={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 l,m,u=e,d,_=Ee(t?.cacheRetention,t?.env)==="none"?void 0:t?.sessionId,p=i.supportsMessageThreads?_:void 0;if(t?.client)l=t.client,m=!1;else{let o=t?.apiKey,f=Ae(e,o,t?.headers,t?.env);f||Ie(e.provider,o,t?.headers);let g;if(e.provider==="github-copilot"){let A=ge(a.messages);g=me({messages:a.messages,hasImages:A})}let y=at(e,o,t?.headers,t?.fetch,g,_,f,t?.identity);l=y.client,m=y.isOAuthToken}let x={...t?.signal?{signal:t.signal}:{},...t?.timeoutMs!==void 0?{timeout:t.timeoutMs}:{},maxRetries:0},k=o=>pe(()=>l.beta.messages.create(o,x).asResponse(),{maxRetries:t?.maxRetries,maxRetryDelayMs:t?.maxRetryDelayMs,signal:t?.signal}),v=be(t?.sessionId),R,w,T;for(;;){t?.signal?.throwIfAborted();let o=ut(e,a,m,t,{disablePreferredStrictTools:v,messageThreads:p!==void 0});o.providerThinkingLevel&&(r.providerThinkingLevel=o.providerThinkingLevel),w=o.params;let f=await t?.onPayload?.(w,e);f!==void 0&&(w={...f,stream:!0});let g=p!==void 0&&t?.disableContinuation!==!0?Ze(e,p,w):void 0;try{let y=g?await Xe(g,w,k,r,t?.signal):{response:await k(w),thread:void 0};R=y.response,T=y.thread;break}catch(y){if(t?.signal?.aborted||v||!o.hasPreferredStrictTools||!(y instanceof P.APIError)||y.status!==400||y.type!=="invalid_request_error"||!Te(y.message))throw y;v=!0,xe(t?.sessionId),N(r,{type:"anthropic_strict_tools_fallback",timestamp:Date.now(),error:{message:y.message},details:{reason:"strict_tool_limits_exceeded"}})}}await t?.onResponse?.({status:R.status,headers:ue(R.headers)},e),s.push({type:"start",partial:r});let E=new Map,I=o=>{let f=E.get(o);return f===void 0?void 0:{...f,block:r.content[f.contentIndex]}};for await(let o of rt(R,t?.signal))if(await t?.onProviderStreamEvent?.(o,e),o.type==="message_start"){r.responseId=o.message.id;let f=o.message.input_transformations;Array.isArray(f)&&(d=f);let g=o.message.model;g!==e.id&&(r.responseModel=g);let y=g===e.id?void 0:e.compat?.allowedFallbackModels?.find(A=>A.provider===e.provider&&A.model===g)?.cost;u=y?{...e,id:g,cost:y}:e,r.usage.input=o.message.usage.input_tokens||0,r.usage.output=o.message.usage.output_tokens||0,r.usage.cacheRead=o.message.usage.cache_read_input_tokens||0,r.usage.cacheWrite=o.message.usage.cache_creation_input_tokens||0,r.usage.cacheWrite1h=o.message.usage.cache_creation?.ephemeral_1h_input_tokens||0,r.usage.totalTokens=r.usage.input+r.usage.output+r.usage.cacheRead+r.usage.cacheWrite,U(u,r.usage)}else if(o.type==="content_block_start"){if(o.content_block.type==="fallback"){if(r.content.length>0)throw new Error("Anthropic performed an unsupported mid-output model fallback");continue}o.content_block.type==="text"?(r.content.push({type:"text",text:o.content_block.text??""}),E.set(o.index,{contentIndex:r.content.length-1}),s.push({type:"text_start",contentIndex:r.content.length-1,partial:r})):o.content_block.type==="thinking"?(r.content.push({type:"thinking",thinking:o.content_block.thinking??"",thinkingSignature:o.content_block.signature??""}),E.set(o.index,{contentIndex:r.content.length-1}),s.push({type:"thinking_start",contentIndex:r.content.length-1,partial:r})):o.content_block.type==="redacted_thinking"?(r.content.push({type:"thinking",thinking:"[Reasoning redacted]",thinkingSignature:o.content_block.data,redacted:!0}),E.set(o.index,{contentIndex:r.content.length-1}),s.push({type:"thinking_start",contentIndex:r.content.length-1,partial:r})):o.content_block.type==="tool_use"&&(r.content.push({type:"toolCall",id:o.content_block.id,name:m?He(o.content_block.name,c):o.content_block.name,arguments:o.content_block.input??{}}),E.set(o.index,{contentIndex:r.content.length-1,arguments:new ee}),s.push({type:"toolcall_start",contentIndex:r.content.length-1,partial:r}))}else if(o.type==="content_block_delta"){let f=I(o.index);o.delta.type==="text_delta"?f?.block.type==="text"&&(f.block.text+=o.delta.text,s.push({type:"text_delta",contentIndex:f.contentIndex,delta:o.delta.text,partial:r})):o.delta.type==="thinking_delta"?f?.block.type==="thinking"&&(f.block.thinking+=o.delta.thinking,s.push({type:"thinking_delta",contentIndex:f.contentIndex,delta:o.delta.thinking,partial:r})):o.delta.type==="input_json_delta"?f?.block.type==="toolCall"&&f.arguments!==void 0&&(f.block.arguments=f.arguments.append(o.delta.partial_json),s.push({type:"toolcall_delta",contentIndex:f.contentIndex,delta:o.delta.partial_json,partial:r})):o.delta.type==="signature_delta"&&f?.block.type==="thinking"&&(f.block.thinkingSignature=f.block.thinkingSignature||"",f.block.thinkingSignature+=o.delta.signature)}else if(o.type==="content_block_stop"){let f=I(o.index);if(E.delete(o.index),f){let{block:g,contentIndex:y}=f;g.type==="text"?s.push({type:"text_end",contentIndex:y,content:g.text,partial:r}):g.type==="thinking"?s.push({type:"thinking_end",contentIndex:y,content:g.thinking,partial:r}):g.type==="toolCall"&&f.arguments!==void 0&&(Object.assign(g,f.arguments.finish()),s.push({type:"toolcall_end",contentIndex:y,toolCall:g,partial:r}))}}else if(o.type==="message_delta"){let f=o.input_transformations;if(Array.isArray(f)&&(d=f),o.delta.stop_reason){r.rawStopReason=o.delta.stop_reason;let g=yt(o.delta.stop_reason,o.delta.stop_details);r.stopReason=g.stopReason,g.errorMessage&&(r.errorMessage=g.errorMessage)}if(o.usage){o.usage.input_tokens!=null&&(r.usage.input=o.usage.input_tokens),o.usage.output_tokens!=null&&(r.usage.output=o.usage.output_tokens),o.usage.cache_read_input_tokens!=null&&(r.usage.cacheRead=o.usage.cache_read_input_tokens),o.usage.cache_creation_input_tokens!=null&&(r.usage.cacheWrite=o.usage.cache_creation_input_tokens);let g=o.usage.cache_creation;g?.ephemeral_1h_input_tokens!=null&&(r.usage.cacheWrite1h=g.ephemeral_1h_input_tokens);let y=o.usage.output_tokens_details?.thinking_tokens;y!=null&&(r.usage.reasoning=y)}r.usage.totalTokens=r.usage.input+r.usage.output+r.usage.cacheRead+r.usage.cacheWrite,U(u,r.usage),le(e)&&o.usage&&de(r.usage,o.usage)}if(t?.signal?.aborted)throw new Error("Request was aborted");if(r.stopReason==="pending")throw new Error("Anthropic stream ended without a stop reason");if(r.stopReason==="aborted"||r.stopReason==="error")throw new Error(r.errorMessage||"An unknown error occurred");T&&et(e,T,w,r,m,i.allowEmptySignature),d&&d.length>0&&N(r,{type:"anthropic_input_transformations",timestamp:Date.now(),details:{transformations:d.map(o=>({type:o.type??void 0,path:o.path??void 0,reason:o.reason??void 0}))}}),s.push({type:"done",reason:r.stopReason,message:r}),s.end()}catch(l){r.stopReason=t?.signal?.aborted?"aborted":"error",r.errorMessage=l instanceof Error?ae(l):JSON.stringify(l),s.push({type:"error",reason:r.stopReason,error:r}),s.end()}})(),s};function ot(e,n){let t=n?e.thinkingLevelMap?.[n]:void 0;if(typeof t=="string")return t;switch(n){case"minimal":case"low":return"low";case"medium":return"medium";case"high":return"high";default:return"high"}}var Wt=(e,n,t)=>{Ae(e,t?.apiKey,t?.headers,t?.env)||Ie(e.provider,t?.apiKey,t?.headers);let s={...ye(e,n,t,t?.apiKey),toolChoice:t?.toolChoice};if(!t?.reasoning)return K(e,n,{...s,thinkingEnabled:!1});if(e.compat?.forceAdaptiveThinking===!0){let c=ot(e,t.reasoning);return K(e,n,{...s,thinkingEnabled:!0,effort:c})}let i=ke(s.maxTokens,e.maxTokens,t.reasoning,t.thinkingBudgets),a=_e(e,n,i.maxTokens);return K(e,n,{...s,maxTokens:a,thinkingEnabled:!0,thinkingBudgetTokens:Math.min(i.thinkingBudget,Math.max(0,a-1024))})};function it(e){return e.includes("sk-ant-oat")}function at(e,n,t,s,i,a,c,r){if(e.provider==="github-copilot")return{client:new M({apiKey:null,authToken:n??null,baseURL:e.baseUrl,dangerouslyAllowBrowser:!0,fetch:s,defaultHeaders:W(H(e,r),{accept:"application/json","anthropic-dangerous-direct-browser-access":"true"},e.headers,i,t)}),isOAuthToken:!1};if(n&&it(n))return{client:new M({apiKey:null,authToken:n,baseURL:e.baseUrl,dangerouslyAllowBrowser:!0,fetch:s,defaultHeaders:W({accept:"application/json","anthropic-dangerous-direct-browser-access":"true","user-agent":`claude-cli/${Pe}`,"x-app":"cli"},e.headers,t)}),isOAuthToken:!0};let l=O(e),m={};if(a&&l.sendSessionAffinityHeaders){let h=l.sessionAffinityFormat==="openrouter"?"x-session-id":"x-session-affinity";m[h]=a}let u=W(H(e,r),{accept:"application/json","anthropic-dangerous-direct-browser-access":"true"},m,e.headers,t);if(c){let h=JSON.stringify([e.baseUrl,c]);if(D?.key!==h||D.fetch!==s){let _=new M({apiKey:null,authToken:null,config:c,baseURL:e.baseUrl,dangerouslyAllowBrowser:!0,fetch:s});D={key:h,fetch:s,client:_}}return{client:D.client.withOptions({defaultHeaders:u}),isOAuthToken:!1}}return{client:new M({apiKey:n??null,authToken:null,baseURL:e.baseUrl,dangerouslyAllowBrowser:!0,fetch:s,defaultHeaders:u}),isOAuthToken:!1}}function ct(e,n,t,{isOAuthToken:s,nativeToolChanges:i,messageThreads:a}){let c;for(let l of[e.headers,t?.headers])for(let[m,u]of Object.entries(l??{}))m.toLowerCase()==="anthropic-beta"&&(c=u);if(c===null)return[];if(c!==void 0)return[...new Set(c.split(",").map(l=>l.trim()).filter(l=>l.length>0))];let r=[];return s&&r.push("claude-code-20250219","oauth-2025-04-20"),ft(e,n)&&r.push(Fe),e.reasoning&&t?.thinkingEnabled===!0&&(t.interleavedThinking??!0)&&e.compat?.forceAdaptiveThinking!==!0&&r.push(je),$e(e)&&r.push(We),e.compat?.supportsMidConvoEffort===!0&&r.push(qe,Ge),i&&r.push(Ke),a&&r.push(Ve),[...new Set(r)]}function ut(e,n,t,s,i){let{cacheControl:a}=Le(e,s?.cacheRetention,s?.env),c=O(e),r=Z(n.messages),l=r?J(r):"",m=j(n.messages,e,Oe),u=r?m.slice(1):m,d=!1,h=(o,f)=>{let g=_t(o,t,c.supportsEagerToolInputStreaming,c.supportsStrictTools,f,i.disablePreferredStrictTools);return g.some((y,A)=>y.strict===!0&&F(o[A]))&&(d=!0),g},_=r?.toolsAdded??[],p=c.supportsMidConvoSystemMessages&&c.supportsMidConvoToolChanges&&_.length>0,x=e.reasoning&&s?.thinkingEnabled===!1&&e.thinkingLevelMap?.off!==null,k=e.compat?.supportsMidConvoEffort===!0&&!x,v=Ne(u,t,a,c.allowEmptySignature,k?e.provider:void 0,p?h:void 0),R=s?.effort??"high",w=ct(e,n,s,{isOAuthToken:t,nativeToolChanges:p,messageThreads:i.messageThreads}),T={model:e.id,messages:k?pt(v,R):v.messages,max_tokens:s?.maxTokens??e.maxTokens,stream:!0,...w.length>0?{betas:w}:{}};t?(T.system=[{type:"text",text:"You are Claude Code, Anthropic's official CLI for Claude.",...a?{cache_control:a}:{}}],l&&T.system.push({type:"text",text:b(l),...a?{cache_control:a}:{}})):l&&(T.system=[{type:"text",text:b(l),...a?{cache_control:a}:{}}]),s?.temperature!==void 0&&!s?.thinkingEnabled&&e.compat?.supportsMidConvoEffort!==!0&&c.supportsTemperature&&(T.temperature=s.temperature);let E=c.supportsCacheControlOnTools?a:void 0;if(p)T.tools=[...h(_,E),ze];else{let o=L(n.messages);o.length>0&&(T.tools=h(o,E))}if(x)T.thinking={type:"disabled"};else if(k)T.thinking={type:"adaptive",display:s?.thinkingDisplay??"summarized",block_binding:{prefix_mismatch_behavior:"drop_block"}},T.output_config={effort:"low"};else if(e.reasoning&&s?.thinkingEnabled){let o=s.thinkingDisplay??"summarized";e.compat?.forceAdaptiveThinking===!0?(T.thinking={type:"adaptive",display:o},s.effort&&(T.output_config={effort:s.effort})):T.thinking={type:"enabled",budget_tokens:s.thinkingBudgetTokens||1024,display:o}}if(s?.metadata){let o=s.metadata.user_id;typeof o=="string"&&(T.metadata={user_id:o})}s?.toolChoice&&(typeof s.toolChoice=="string"?T.tool_choice={type:s.toolChoice}:T.tool_choice=s.toolChoice);let I=e.compat?.allowedFallbackModels;return I&&I.length>0&&(T.fallbacks=I.map(o=>({model:o.model}))),{params:T,hasPreferredStrictTools:d,providerThinkingLevel:k?R:void 0}}function Oe(e){return e.replace(/[^a-zA-Z0-9_-]/g,"_").slice(0,64)}function lt(e,n=e.content){return{type:"tool_result",tool_use_id:e.toolCallId,content:Ue(n),is_error:e.isError}}function Ne(e,n,t,s=!1,i,a){let c=[],r=new Map,l=[],m=()=>{c.push(...l),l.length=0};for(let u=0;u<e.length;u++){let d=e[u];if(d.role==="system"){let h=Y(d),_=[];if(h.length>0&&_.push({type:"text",text:b(h)}),a){let p=d.toolsAdded??[],x=new Set(p.map(k=>k.name));for(let k of d.toolsRemoved??[])x.has(k.name)||_.push({type:"tool_removal",tool:{type:"tool_reference",name:n?V(k.name):k.name}});for(let k of a(p))_.push({type:"tool_addition",tool:{type:"tool_definition",definition:k}})}_.length>0&&l.push({role:"system",content:_})}else if(d.role==="user")if(typeof d.content=="string")d.content.trim().length>0&&c.push({role:"user",content:b(d.content)});else{let _=d.content.map(p=>p.type==="text"?{type:"text",text:b(p.text)}:z(p)).filter(p=>p.type==="text"?p.text.trim().length>0:!0);if(_.length===0)continue;c.push({role:"user",content:_})}else if(d.role==="assistant"){let h=[];for(let p of d.content)if(p.type==="text"){if(p.text.trim().length===0)continue;h.push({type:"text",text:b(p.text)})}else if(p.type==="thinking"){if(p.redacted){h.push({type:"redacted_thinking",data:p.thinkingSignature});continue}let x=p.thinkingSignature,k=!!x&&x.trim().length>0;if(p.thinking.trim().length===0&&!k)continue;k?h.push({type:"thinking",thinking:b(p.thinking),signature:x}):h.push(s?{type:"thinking",thinking:b(p.thinking),signature:""}:{type:"text",text:b(p.thinking)})}else p.type==="toolCall"&&h.push({type:"tool_use",id:p.id,name:n?V(p.name):p.name,input:p.arguments??{}});if(h.length===0)continue;m();let _=c.length;c.push({role:"assistant",content:h}),i!==void 0&&d.api==="anthropic-messages"&&d.provider===i&&dt(d.providerThinkingLevel)&&r.set(_,d.providerThinkingLevel)}else if(d.role==="toolResult"){let h=[],_=[],p=u;for(;p<e.length&&e[p].role==="toolResult";){let x=e[p],k=we(x);h.push(lt(x,k?.content)),k&&_.push({type:"text",text:k.caption},...k.images.map(z)),p++}u=p-1,c.push({role:"user",content:[...h,..._]})}}if(m(),t&&c.length>0){let u=c[c.length-1];if(u.role==="user"||u.role==="system")if(Array.isArray(u.content)){let d=u.content[u.content.length-1];d&&(d.type==="text"||d.type==="image"||d.type==="tool_result"||d.type==="tool_addition"||d.type==="tool_removal")&&(d.cache_control=t)}else typeof u.content=="string"&&(u.content=[{type:"text",text:u.content,cache_control:t}])}return{messages:c,assistantLevels:r}}function dt(e){return e==="low"||e==="medium"||e==="high"||e==="xhigh"||e==="max"}function pt(e,n){let t=[];for(let s=0;s<e.messages.length;s++){let i=e.assistantLevels.get(s);i!==void 0&&t.push({role:"system",content:[],output_config:{effort:i}}),t.push(e.messages[s])}return t.push({role:"system",content:[],output_config:{effort:n}}),t}function ft(e,n){return L(n.messages).length>0&&!O(e).supportsEagerToolInputStreaming}var ht=new Set(["minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","maxItems","uniqueItems","minContains","maxContains","minProperties","maxProperties"]),gt=new Set(["date-time","time","date","duration","email","hostname","uri","ipv4","ipv6","uuid"]),mt=(e,n)=>ht.has(e)?!0:e==="minItems"?n!==0&&n!==1:e==="format"?typeof n!="string"||!gt.has(n):!1;function _t(e,n,t,s,i,a=!1){return e?e.map((c,r)=>{let l=a&&F(c)?void 0:he(c,s,mt),m=fe(c,l),u=m,d={type:"object",properties:u.properties??{},required:u.required??[],...u.additionalProperties===void 0?{}:{additionalProperties:u.additionalProperties},...u.$defs===void 0?{}:{$defs:u.$defs},...u.definitions===void 0?{}:{definitions:u.definitions}},h=l===!0?{...m,...d}:d;return{name:n?V(c.name):c.name,description:c.description,...t?{eager_input_streaming:!0}:{},...l===!0?{strict:!0}:{},input_schema:h,...i&&r===e.length-1?{cache_control:i}:{}}}):[]}function yt(e,n){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:n?.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{K as stream,Wt 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{a as P,c as C}from"./chunk-ZNZFWSPH.js";import{a as _,b as k,c as x,d as z}from"./chunk-FE7HH5JS.js";import{a as b}from"./chunk-XIECJESP.js";import{b as I}from"./chunk-4SWD4JMP.js";import"./chunk-V3AQJSWR.js";import"./chunk-BWDJS6A4.js";import"./chunk-6R73ICDB.js";import{a as w}from"./chunk-23PRJECN.js";import{h as d,j as E,k as O}from"./chunk-7TYSMLUV.js";import{C as R,I as T,v,z as l}from"./chunk-DE5EGVKG.js";import"./chunk-D6VMBA4C.js";import"./chunk-USBJFDJ6.js";import{a as M,c as A}from"./chunk-ZD4O6NPV.js";import{a as S}from"./chunk-K4NTZEDJ.js";import{h as y}from"./chunk-3XLHL5YT.js";import"./chunk-X2TKJ7KR.js";import"./chunk-NW4GW47L.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 K(r){return A(M(r),"Azure OpenAI API error")}var D=(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 u=q(r,i,e),o=d(l(p.messages),r.compat?.supportsOpenAIGrammarTools??!1),m=U(r,p,e,n,o),c=await e?.onPayload?.(m,r);c!==void 0&&(m=c);let f={...e?.signal?{signal:e.signal}:{},...e?.timeoutMs!==void 0?{timeout:e.timeoutMs}:{},maxRetries:0},{data:L,response:g}=await w(()=>u.responses.create(m,f).withResponse(),{maxRetries:e?.maxRetries,maxRetryDelayMs:e?.maxRetryDelayMs,signal:e?.signal});if(await e?.onResponse?.({status:g.status,headers:S(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){s.stopReason=e?.signal?.aborted?"aborted":"error",s.errorMessage=K(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={...O(r,a,e,t),toolChoice:e?.toolChoice},n=e?.reasoning?T(r,e.reasoning):void 0;return D(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 I({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,_({supportsMidConvoSystemMessages:r.compat?.supportsMidConvoSystemMessages??!1,supportsAdditionalTools:n,supportsToolSearch:s})),u=k(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:u,stream:!0,prompt_cache_key:r.compat?.promptCacheKeyMode==="disabled"?void 0: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 c=E(r,m??"off",e?.samplingParams);return c&&Object.assign(o,c),o}export{D as stream,re as streamSimple};
|