@cortex-agent/server 2026.10.28 → 2026.11.17
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 +255 -21
- package/README.md +36 -7
- package/THIRD_PARTY_NOTICES.txt +1109 -278
- package/defaults/hooks/cortex-hook-api.mjs +2 -1
- package/defaults/plugins/cortex-system/skills/client-manage/SKILL.md +23 -15
- package/dist/agent-adapter/claude/remote-mcp-proxy.js +1 -1
- package/dist/chunks/{anthropic-messages-M3SMXACA.js → anthropic-messages-M732OMEE.js} +1 -1
- package/dist/chunks/{azure-openai-responses-76YWXHSB.js → azure-openai-responses-RAKTV6JY.js} +1 -1
- package/dist/chunks/bedrock-converse-stream-WNUGNZ27.js +62 -0
- package/dist/chunks/bowser-MLGGLXTZ.js +20 -0
- package/dist/chunks/child-runner-MO5RT6FH.js +4 -0
- package/dist/chunks/chunk-2ATTYCRJ.js +4 -0
- package/dist/chunks/{chunk-PXS5SHOV.js → chunk-2ROGTDM2.js} +1 -1
- package/dist/chunks/chunk-2VVRTJQN.js +4 -0
- package/dist/chunks/{chunk-OZGBWAT2.js → chunk-2YTYYG4K.js} +1 -1
- package/dist/chunks/chunk-3CPIMAYX.js +30 -0
- package/dist/chunks/{chunk-FXDIR3SQ.js → chunk-3CZPBLB3.js} +1 -1
- package/dist/chunks/chunk-3ORG56I5.js +8 -0
- package/dist/chunks/{chunk-LEUENXI2.js → chunk-4YLAGSDM.js} +1 -1
- package/dist/chunks/{chunk-HU6UIDEJ.js → chunk-53TQNK7Z.js} +1 -1
- package/dist/chunks/{chunk-4U7XXM4W.js → chunk-5A6CA5TM.js} +1 -1
- package/dist/chunks/{chunk-PBJ5MPPX.js → chunk-5DF5WJNM.js} +1 -1
- package/dist/chunks/chunk-5PAW3DEU.js +50 -0
- package/dist/chunks/{chunk-DXBSQXJL.js → chunk-7GAYFN52.js} +1 -1
- package/dist/chunks/chunk-7GEBDPTT.js +4 -0
- package/dist/chunks/{chunk-NR6U3WIZ.js → chunk-AFTBQRPN.js} +1 -1
- package/dist/chunks/chunk-AVXDF7AG.js +4 -0
- package/dist/chunks/chunk-BDLKI2NT.js +4 -0
- package/dist/chunks/{chunk-P52RMIYX.js → chunk-BJGYGEZO.js} +1 -1
- package/dist/chunks/chunk-BUZQBTV2.js +10 -0
- package/dist/chunks/chunk-BZDIAI5M.js +125 -0
- package/dist/chunks/{chunk-A34TDMIC.js → chunk-CEGSDGYQ.js} +1 -1
- package/dist/chunks/{chunk-Q7CE3UIE.js → chunk-CK3P345X.js} +69 -69
- package/dist/chunks/{chunk-YAEVYJAR.js → chunk-EE3WT25T.js} +1 -1
- package/dist/chunks/chunk-ETIBCA2S.js +4 -0
- package/dist/chunks/{chunk-REBNWCKI.js → chunk-FP7ML72L.js} +1 -1
- package/dist/chunks/{chunk-H2FP6DG4.js → chunk-H4QZ2P3Z.js} +1 -1
- package/dist/chunks/chunk-IA6IODY3.js +4 -0
- package/dist/chunks/{chunk-D3NXKK2L.js → chunk-IKLTEWA3.js} +1 -1
- package/dist/chunks/chunk-IYVZHGUQ.js +5 -0
- package/dist/chunks/chunk-JJDEQ6N2.js +4 -0
- package/dist/chunks/chunk-JKL3AK5D.js +106 -0
- package/dist/chunks/chunk-KDPY2YA3.js +129 -0
- package/dist/chunks/{chunk-SUFW24P4.js → chunk-KUDK7GPS.js} +1 -1
- package/dist/chunks/chunk-LAWOWPZX.js +363 -0
- package/dist/chunks/chunk-LEAV3FFG.js +4 -0
- package/dist/chunks/chunk-LP72AF56.js +45 -0
- package/dist/chunks/{chunk-KENCMLRE.js → chunk-LP7T32PW.js} +1 -1
- package/dist/chunks/chunk-LQTFDC67.js +4 -0
- package/dist/chunks/{chunk-HALUQ7ZF.js → chunk-MGYYSX7Y.js} +1 -1
- package/dist/chunks/chunk-NNBSSISP.js +4 -0
- package/dist/chunks/chunk-NNTQUHLO.js +877 -0
- package/dist/chunks/{chunk-PFMEUFJ7.js → chunk-NRD57ICT.js} +1 -1
- package/dist/chunks/{chunk-QWAQHHRS.js → chunk-NXZS5PEW.js} +1 -1
- package/dist/chunks/chunk-OFEPDNRB.js +4 -0
- package/dist/chunks/{chunk-6LZK4DDH.js → chunk-P7TVR4GY.js} +1 -1
- package/dist/chunks/chunk-QEL6CMLE.js +4 -0
- package/dist/chunks/chunk-QMSSIDRQ.js +70 -0
- package/dist/chunks/chunk-QUXPMNFQ.js +4 -0
- package/dist/chunks/chunk-R52AVUQB.js +5 -0
- package/dist/chunks/chunk-R6CGBSTC.js +22 -0
- package/dist/chunks/chunk-RA2BUYI3.js +6 -0
- package/dist/chunks/chunk-RDW6FRF5.js +4 -0
- package/dist/chunks/chunk-RF4JLYBX.js +6 -0
- package/dist/chunks/{chunk-YPK2CAIZ.js → chunk-ROVKOIHF.js} +1 -1
- package/dist/chunks/chunk-RYLSRII6.js +7 -0
- package/dist/chunks/{chunk-XNSSUVT6.js → chunk-S3MR37DL.js} +1 -1
- package/dist/chunks/chunk-SAJD4EKE.js +10 -0
- package/dist/chunks/chunk-SFX7V5O2.js +10 -0
- package/dist/chunks/chunk-STCNHXPJ.js +6 -0
- package/dist/chunks/{chunk-FOJQXLL2.js → chunk-SY2HV3V5.js} +1 -1
- package/dist/chunks/chunk-T73GHMFB.js +4 -0
- package/dist/chunks/chunk-TKFFQNAP.js +19 -0
- package/dist/chunks/chunk-TMV2ZDOI.js +18 -0
- package/dist/chunks/chunk-TX46YMGI.js +5 -0
- package/dist/chunks/chunk-U23S37TT.js +6 -0
- package/dist/chunks/chunk-UT6DGZDO.js +4 -0
- package/dist/chunks/{chunk-JERCOLY3.js → chunk-V35MFAUQ.js} +4 -6
- package/dist/chunks/chunk-V6X7Y62J.js +7 -0
- package/dist/chunks/chunk-V7K3KNDM.js +4 -0
- package/dist/chunks/{chunk-NAA7GF6Q.js → chunk-VBN2JSER.js} +1 -1
- package/dist/chunks/chunk-VIMHSW6J.js +4 -0
- package/dist/chunks/chunk-VK5J556O.js +4 -0
- package/dist/chunks/chunk-VPVSKJGX.js +6 -0
- package/dist/chunks/chunk-VTL3Z2OP.js +23 -0
- package/dist/chunks/{chunk-X2GYYRVM.js → chunk-VW7TLY3P.js} +1 -1
- package/dist/chunks/chunk-W34AK4SK.js +65 -0
- package/dist/chunks/chunk-W6AKCEYF.js +8 -0
- package/dist/chunks/chunk-WBSE3EF3.js +27 -0
- package/dist/chunks/chunk-WZYS2HAK.js +4 -0
- package/dist/chunks/{chunk-UNVEZI57.js → chunk-XEBEWR6Y.js} +1 -1
- package/dist/chunks/chunk-XPPZ6Y3X.js +8 -0
- package/dist/chunks/chunk-XYSXL3KX.js +4 -0
- package/dist/chunks/chunk-YAAKL3QS.js +80 -0
- package/dist/chunks/chunk-YB5LUJHS.js +65 -0
- package/dist/chunks/chunk-Z24SBRJK.js +4 -0
- package/dist/chunks/cloudflare-workers-ai-system-one-32JCFHI3.js +1 -1
- package/dist/chunks/context-GQKWKFRM.js +4 -0
- package/dist/chunks/cost-OOO32GLC.js +5 -0
- package/dist/chunks/dist-V5FRMUFH.js +4 -0
- package/dist/chunks/easter-egg-3d-CZH7AYZ7.js +4 -0
- package/dist/chunks/{event-streams-3JSFPOTZ.js → event-streams-AVE4MSS6.js} +1 -1
- package/dist/chunks/execution-repo-XXL4FXC6.js +4 -0
- package/dist/chunks/{executions-6ARGR3IO.js → executions-BN6OLLVM.js} +1 -1
- package/dist/chunks/file-H572PL2Z.js +4 -0
- package/dist/chunks/google-generative-ai-2G4ITOZL.js +4 -0
- package/dist/chunks/google-vertex-PACHCMRZ.js +4 -0
- package/dist/chunks/init-75F4V7SK.js +4 -0
- package/dist/chunks/{install-cli-4IZCSDFZ.js → install-cli-ABBD7DO5.js} +1 -1
- package/dist/chunks/{interaction-ask-G5T3H3CG.js → interaction-ask-EE2UPR3Q.js} +1 -1
- package/dist/chunks/{interaction-plan-E5V42MUP.js → interaction-plan-C446T2GZ.js} +1 -1
- package/dist/chunks/{llama-cpp-classify-OTXZWCMW.js → llama-cpp-classify-IA2F2H7A.js} +1 -1
- package/dist/chunks/local-client-stop-5YOLXGYT.js +4 -0
- package/dist/chunks/memory-cli-5SSF6YJM.js +11 -0
- package/dist/chunks/{mistral-conversations-34F66L3O.js → mistral-conversations-VHP63CDS.js} +1 -1
- package/dist/chunks/{model-resolver-N3DTAQ2S.js → model-resolver-FVJNZ6NA.js} +1 -1
- package/dist/chunks/{node-PTK2HCDV.js → node-DAO3SX7O.js} +1 -1
- package/dist/chunks/{openai-codex-2REL6UQU.js → openai-codex-JULCKICT.js} +1 -1
- package/dist/chunks/{openai-codex-responses-ZBVHREB3.js → openai-codex-responses-EHJ4AZBE.js} +1 -1
- package/dist/chunks/{openai-completions-VVIB26SH.js → openai-completions-CRAGQFCE.js} +1 -1
- package/dist/chunks/{openai-decisions-2N6ZRPZC.js → openai-decisions-P5UX7BWY.js} +1 -1
- package/dist/chunks/{openai-responses-735XA2ZX.js → openai-responses-IZ22NVQ7.js} +1 -1
- package/dist/chunks/{openrouter-images-3IKETHAC.js → openrouter-images-W2JAMSRH.js} +1 -1
- package/dist/chunks/{pi-messages-I3E4ZFHA.js → pi-messages-MJEEQU2R.js} +1 -1
- package/dist/chunks/{radius-HXRZVBDB.js → radius-ZM7ZRMXF.js} +1 -1
- package/dist/chunks/{remote-ops-BALZYKH6.js → remote-ops-O5CR4RGA.js} +1 -1
- package/dist/chunks/runner-S6R3US24.js +4 -0
- package/dist/chunks/schedule-cli-4T4YC5V5.js +4 -0
- package/dist/chunks/slack-2CGM4SMY.js +4 -0
- package/dist/chunks/start-ui-http-3D7QNHGB.js +43 -0
- package/dist/chunks/subagent-OZGUOV3J.js +4 -0
- package/dist/chunks/{time-KEHDQT6K.js → time-P6PE52WL.js} +1 -1
- package/dist/chunks/tool-shims-IA2WELXJ.js +4 -0
- package/dist/chunks/typesafe-system-one-6ULACYD4.js +1 -1
- package/dist/chunks/ui-board-H4INJD6C.js +5 -0
- package/dist/chunks/ui-decision-6HHNROIT.js +4 -0
- package/dist/chunks/{ui-file-GVH53O3X.js → ui-file-6PLXHSTB.js} +1 -1
- package/dist/chunks/ui-view-6MDU4GXY.js +4 -0
- package/dist/chunks/virtual-modules-OFI7QKYH.js +4 -0
- package/dist/chunks/waitpoint-W5M3BE55.js +5 -0
- package/dist/chunks/workers-GTFP75MS.js +4 -0
- package/dist/client-bundle/client.mjs +44 -31
- 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 +4 -0
- package/dist/entry/app.js +201 -191
- package/dist/entry/browser-cli.js +10 -10
- package/dist/entry/cli.js +1 -1
- package/dist/entry/cortex-cli.js +1 -1
- package/dist/entry/daemon.js +4 -4
- package/dist/entry/hook-cli.js +2 -2
- 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 +2 -2
- package/dist/tui/index.js +41 -41
- package/package.json +3 -3
- package/vendor/pi/dist/core/extensions/loader.js +1 -1
- package/vendor/pi/dist/extensions/codemode/execute.js +1 -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-BPXakv_3.js → board-math-css-BgIyUG-C.js} +1 -1
- package/web/dist/assets/index-9lyu2S6W.css +1 -0
- package/web/dist/assets/index-C-hpzey7.js +532 -0
- package/web/dist/assets/{index-WCm6wwmM.js → index-C2eMpcuI.js} +1 -1
- package/web/dist/assets/pdf-worker-DdZgk2mV.js +57 -0
- package/web/dist/assets/pdf.worker.min-Bz_KHX45.js +55 -0
- package/web/dist/index.html +2 -2
- package/web/dist/theme.css +22 -0
- package/dist/chunks/api-GM53PHIL-GFHEXXE6.js +0 -4
- package/dist/chunks/bedrock-converse-stream-5UPX4NTQ.js +0 -58
- package/dist/chunks/child-runner-3GHOWGZP.js +0 -4
- package/dist/chunks/chunk-2ZNLUY2U.js +0 -128
- package/dist/chunks/chunk-3F6WW7HR.js +0 -13
- package/dist/chunks/chunk-3OKHUVEM.js +0 -7
- package/dist/chunks/chunk-3THJYAEF.js +0 -4
- package/dist/chunks/chunk-3YHOCPQU.js +0 -10
- package/dist/chunks/chunk-4LLH5OWM.js +0 -10
- package/dist/chunks/chunk-52T37Y47.js +0 -8
- package/dist/chunks/chunk-7MU2AKNM.js +0 -4
- package/dist/chunks/chunk-AAA3UBIS.js +0 -4
- package/dist/chunks/chunk-ASYQHJVQ.js +0 -9
- package/dist/chunks/chunk-BGVHA2D4.js +0 -4
- package/dist/chunks/chunk-BKHDWCRT.js +0 -79
- package/dist/chunks/chunk-CQLH4UVX.js +0 -4
- package/dist/chunks/chunk-D6UA4BZC.js +0 -19
- package/dist/chunks/chunk-DGMNI4AO.js +0 -4
- package/dist/chunks/chunk-DHSA5ACV.js +0 -125
- package/dist/chunks/chunk-DPQPXBTP.js +0 -68
- package/dist/chunks/chunk-E7ZMYIY6.js +0 -30
- package/dist/chunks/chunk-EQITBTJC.js +0 -10
- package/dist/chunks/chunk-EXJA5RIX.js +0 -357
- package/dist/chunks/chunk-FH74NME3.js +0 -115
- package/dist/chunks/chunk-FOQ7VLIL.js +0 -17
- package/dist/chunks/chunk-J5DVLUKY.js +0 -6
- package/dist/chunks/chunk-JW2HFMTF.js +0 -4
- package/dist/chunks/chunk-KIGMAATV.js +0 -23
- package/dist/chunks/chunk-KIU5FAPY.js +0 -5
- package/dist/chunks/chunk-KIWMQPH7.js +0 -739
- package/dist/chunks/chunk-LMSQZ6TQ.js +0 -4
- package/dist/chunks/chunk-MEPASGPP.js +0 -6
- package/dist/chunks/chunk-MFAEUHMV.js +0 -28
- package/dist/chunks/chunk-NKDMKRSB.js +0 -68
- package/dist/chunks/chunk-NKXV32S6.js +0 -4
- package/dist/chunks/chunk-NVX5IPRN.js +0 -4
- package/dist/chunks/chunk-O3JW2F7D.js +0 -8
- package/dist/chunks/chunk-OISO5JXB.js +0 -4
- package/dist/chunks/chunk-OPYXNSMY.js +0 -4
- package/dist/chunks/chunk-PZMXHA6X.js +0 -9
- package/dist/chunks/chunk-QEOFEETJ.js +0 -4
- package/dist/chunks/chunk-REPYBMQS.js +0 -4
- package/dist/chunks/chunk-TAWLERZA.js +0 -4
- package/dist/chunks/chunk-TWAEABGG.js +0 -52
- package/dist/chunks/chunk-TZFLHVOQ.js +0 -7
- package/dist/chunks/chunk-UD3NMUHR.js +0 -12
- package/dist/chunks/chunk-W25TB3PU.js +0 -4
- package/dist/chunks/chunk-W5LGYSPZ.js +0 -4
- package/dist/chunks/chunk-XAJLZR7C.js +0 -28
- package/dist/chunks/chunk-XH6FMP3N.js +0 -71
- package/dist/chunks/chunk-XSRZHN63.js +0 -4
- package/dist/chunks/chunk-YG7OEPR2.js +0 -6
- package/dist/chunks/chunk-YHIWOGVL.js +0 -4
- package/dist/chunks/chunk-YZSHTWNM.js +0 -92
- package/dist/chunks/chunk-Z4H3VDHI.js +0 -4
- package/dist/chunks/client-XOGYH5UR.js +0 -4
- package/dist/chunks/config-DJSQI77S-335IXHSM.js +0 -4
- package/dist/chunks/context-VCQH5OB6.js +0 -4
- package/dist/chunks/cost-PGGFI7QJ.js +0 -5
- package/dist/chunks/dist-PUKMZ7GW.js +0 -4
- package/dist/chunks/easter-egg-3d-MO4MOEVF.js +0 -4
- package/dist/chunks/es5-VNTQPCKX.js +0 -4
- package/dist/chunks/execution-repo-ZLJTBWFC.js +0 -4
- package/dist/chunks/file-7BN7RCAY.js +0 -4
- package/dist/chunks/gateway-UCRPMR75.js +0 -36
- package/dist/chunks/google-generative-ai-2VXWLHWI.js +0 -4
- package/dist/chunks/google-vertex-UA36QP2U.js +0 -4
- package/dist/chunks/init-HA7FAQ73.js +0 -4
- package/dist/chunks/local-client-stop-SQRU7ZZM.js +0 -4
- package/dist/chunks/memory-cli-PYOILNN5.js +0 -11
- package/dist/chunks/models-L5VF4I5O-XXNJYQMQ.js +0 -4
- package/dist/chunks/runner-PLVZDGHB.js +0 -4
- package/dist/chunks/schedule-cli-OLASBBYJ.js +0 -4
- package/dist/chunks/slack-WAGSPZUX.js +0 -4
- package/dist/chunks/start-ui-http-QALT7C3P.js +0 -43
- package/dist/chunks/subagent-E3UC7ZHC.js +0 -4
- package/dist/chunks/tool-shims-Q6P6UXVC.js +0 -4
- package/dist/chunks/ui-board-4GYW6KKW.js +0 -5
- package/dist/chunks/ui-decision-U2FXSEC2.js +0 -4
- package/dist/chunks/ui-view-O7PLANT7.js +0 -4
- package/dist/chunks/virtual-modules-IDC5YKZJ.js +0 -4
- package/dist/chunks/waitpoint-2FGQBIAC.js +0 -5
- package/dist/chunks/workers-XN4PSTH6.js +0 -4
- package/vendor/aistatus/gateway-cli.js +0 -21
- package/web/dist/assets/index-BHZpFXhc.js +0 -525
- package/web/dist/assets/index-DqWMdMkh.css +0 -1
- package/web/dist/assets/pdf-worker-Hp15W1QJ.js +0 -57
- package/web/dist/assets/pdf.worker.min-DnhTvCwe.js +0 -55
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cortex-agent/server",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.11.17",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"license": "
|
|
5
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"description": "Agent workbench for auto research, self-improvement loops, and long-running work — multi-agent teams, persistent project memory, cross-machine GPU training.",
|
|
7
7
|
"engines": {
|
|
8
8
|
"node": ">=22.19.0"
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@silvia-odwyer/photon-node": "0.3.4"
|
|
39
39
|
},
|
|
40
40
|
"optionalDependencies": {
|
|
41
|
-
"sharp": "^0.
|
|
41
|
+
"sharp": "^0.35.5"
|
|
42
42
|
},
|
|
43
43
|
"repository": "https://github.com/fangxm233/cortex-agent",
|
|
44
44
|
"keywords": [
|
|
@@ -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{k as a,l as b,m as c,n as d,o as e,p as f}from"../../../../../dist/chunks/chunk-
|
|
4
|
+
import{k as a,l as b,m as c,n as d,o as e,p as f}from"../../../../../dist/chunks/chunk-BJGYGEZO.js";import"../../../../../dist/chunks/chunk-RA6HKFBV.js";import"../../../../../dist/chunks/chunk-QUUEQRIT.js";import"../../../../../dist/chunks/chunk-B3XBQEFM.js";import"../../../../../dist/chunks/chunk-WHC7AYZD.js";export{a as clearExtensionCache,b as createExtensionRuntime,f as discoverAndLoadExtensions,c as loadExtensionFromFactory,d as loadExtensions,e as loadExtensionsCached};
|
|
@@ -1,7 +1,7 @@
|
|
|
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{E as y,F as G,G as V,I as de,J as fe,K as pe,N as X,O as K,P as me,Q as he,c as J,g as ce,n as ue}from"../../../../../dist/chunks/chunk-PBJ5MPPX.js";import"../../../../../dist/chunks/chunk-LACGULCN.js";import"../../../../../dist/chunks/chunk-FX6MOGLR.js";import"../../../../../dist/chunks/chunk-Q7CE3UIE.js";import"../../../../../dist/chunks/chunk-3TGQSGG4.js";import"../../../../../dist/chunks/chunk-ZQ7LGTSN.js";import{A as ae,B as le}from"../../../../../dist/chunks/chunk-QUUEQRIT.js";import"../../../../../dist/chunks/chunk-OPYXNSMY.js";import"../../../../../dist/chunks/chunk-B3XBQEFM.js";import"../../../../../dist/chunks/chunk-WHC7AYZD.js";function Y(t){if(typeof t!="object"||t===null)return!1;let e=t.type;return e==="call"||e==="output"||e==="done"||e==="crash"||e==="started"||e==="idle"}var qe=3e5,Ce=/^[A-Za-z_$][A-Za-z0-9_$]*$/,Re=new Set(["tools","ALL_TOOLS","console","text","image","exit","globalThis","store","load"]);function x(t){return t instanceof Error?t.message:String(t)}function ge(t){let e={};for(let[r,n]of Object.entries(t??{})){let s=JSON.stringify(n);s!==void 0&&(e[r]=s)}return e}var b=class extends Error{};function $(t,e){try{return JSON.parse(t)}catch{throw new b(`${e} is not valid JSON`)}}function $e(t){let e=$(t,"store writes");if(!Array.isArray(e))throw new b("store writes are not an array");let r={set:{},delete:[]};for(let n of e){if(!Array.isArray(n)||typeof n[0]!="string"||(n.length===2?typeof n[1]!="string":n.length!==1))throw new b("store writes contain a malformed entry");let[s,o]=n;o===void 0?r.delete.push(s):r.set[s]=$(o,`store value for ${JSON.stringify(s)}`)}return r}function Me(t){let e=$(t,"script error");if(typeof e!="object"||e===null)throw new b("script error is not an object");let{name:r,message:n,stack:s}=e;if(typeof n!="string"||r!==void 0&&typeof r!="string"||s!==void 0&&typeof s!="string")throw new b("script error is malformed");return{kind:"script",name:r,message:n,stack:s}}function _e(t){let e=new Set,r=new Set;for(let n of t){let s=n.name.split(".");if(s.length>2||!s.every(o=>Ce.test(o))||Re.has(s[0]))throw new Error(`Invalid global name "${n.name}"`);if(e.has(n.name))throw new Error(`Global "${n.name}" is already registered`);s.length===2&&r.add(s[0]),e.add(n.name)}for(let n of r)if(e.has(n))throw new Error(`Global "${n}" conflicts with the namespace "${n}"`)}var F=class{promise;resolveResult;channel;unsent=[];executors;control;delivered=new Set;signal;timer;output=[];calls=[];pending=new Map;finished=!1;constructor(e){if(this.promise=new Promise(s=>{this.resolveResult=s}),this.executors=e.executors,this.control=e.control,this.signal=e.signal,Number.isFinite(e.timeoutMs)&&(this.timer=setTimeout(()=>{this.finish({kind:"timeout",message:`Execution timed out after ${e.timeoutMs} ms`})},e.timeoutMs)),e.signal&&(e.signal.aborted?this.onAbort():e.signal.addEventListener("abort",this.onAbort,{once:!0})),this.finished)return;let r={code:e.code,tools:e.tools.map(s=>({name:s.name,jsName:s.jsName??y(s.name),description:s.description??""})),globals:e.globals.map(s=>({name:s.name,spread:s.spread===!0})),memoryLimitBytes:e.memoryLimitBytes,store:e.store,...e.deterministic?{deterministic:e.deterministic}:{}},n={message:s=>this.receive(s),failure:s=>this.finish(s)};new Promise(s=>s(e.launch(r,n))).then(s=>{if(this.finished){s.stop().catch(()=>{});return}this.channel=s;for(let o of this.unsent.splice(0))s.post(o)},s=>{this.finish({kind:"sandbox",message:x(s)})})}deliver(e,r,n,s){if(this.finished)return;if(!Number.isFinite(r))throw new Error(`The clock value of result ${e} is not a finite number`);if(!Number.isInteger(e)||e<1||this.delivered.has(e))throw new Error(`Result number ${e} is not a positive integer used once`);let o=this.pending.get(n);if(o===void 0)throw new Error(`Call ${n} is not waiting for a result`);if(!s.ok&&s.properties!==void 0){let{properties:c}=s;if(typeof c!="object"||c===null||Array.isArray(c))throw new Error(`The properties of result ${e} are not an object`)}let a=s.ok?s.value===void 0?void 0:JSON.stringify(s.value):s.message,i=!s.ok&&s.properties!==void 0?JSON.stringify(s.properties):void 0;this.delivered.add(e),this.pending.delete(n),o.record&&(o.record.status=s.ok?"ok":"error",o.record.durationMs=performance.now()-o.startedAt),this.post({type:"result",id:n,ok:s.ok,payload:a,seq:e,now:r,...i===void 0?{}:{properties:i}})}abort(e){return this.finish({kind:"aborted",message:e}),this.promise}onAbort=()=>{let e=this.signal?.reason;this.finish({kind:"aborted",message:e instanceof Error?e.message:"Execution aborted"})};post(e){this.channel?this.channel.post(e):this.unsent.push(e)}receive(e){try{this.handleMessage(e)}catch(r){this.finish({kind:"sandbox",message:r instanceof b?`Sandbox bridge broken: ${r.message}. The script may have modified built-ins such as a prototype's toJSON.`:`Sandbox host failed: ${x(r)}`})}}handleMessage(e){if(!this.finished){if(!Y(e))throw new b("unknown message from the worker");switch(e.type){case"output":this.output.push(e.item);break;case"call":if(this.pending.has(e.id))throw new b(`duplicate call id ${e.id}`);this.control?this.forwardCall(e,this.control):this.handleCall(e);break;case"started":this.control?.onStarted?.(e.fingerprint);break;case"idle":this.control?.onIdle?.(e.seq,e.issued);break;case"done":this.handleDone(e);break;case"crash":this.finish({kind:"sandbox",message:e.message});break}}}handleDone(e){if(!e.ok){this.finish(Me(e.error),void 0,void 0,e.during);return}let r=e.value===void 0?void 0:$(e.value,"return value");this.finish(void 0,r,$e(e.writes),e.during)}forwardCall(e,r){let{id:n,name:s,target:o}=e,a=e.args===void 0?void 0:$(e.args,"call arguments"),i=o==="tool"?{name:s,status:"cancelled",durationMs:0}:void 0;i&&this.calls.push(i),this.pending.set(n,{record:i,startedAt:performance.now(),controller:new AbortController}),r.onCall({id:n,target:o,name:s,args:a})}async handleCall(e){let{id:r,name:n}=e,s=e.target==="tool",o=s?{name:n,status:"cancelled",durationMs:0}:void 0;o&&this.calls.push(o);let a={record:o,startedAt:performance.now(),controller:new AbortController};this.pending.set(r,a);let i,c;try{let l=(s?this.executors.tools:this.executors.globals).get(n);if(!l)throw new Error(`Unknown ${s?"tool":"global"} "${n}"`);let d=e.args===void 0?void 0:JSON.parse(e.args),u=await l.execute(d,{signal:a.controller.signal});c={type:"result",id:r,ok:!0,payload:u===void 0?void 0:JSON.stringify(u)},i="ok"}catch(l){c={type:"result",id:r,ok:!1,payload:x(l)},i="error"}this.pending.delete(r)&&(o&&(o.status=i,o.durationMs=performance.now()-a.startedAt),this.post(c))}finish(e,r,n,s){if(this.finished)return;this.finished=!0,clearTimeout(this.timer),this.signal?.removeEventListener("abort",this.onAbort);let o=performance.now();for(let c of this.pending.values())c.record&&(c.record.durationMs=o-c.startedAt),c.controller.abort();this.pending.clear(),this.unsent=[];let a=s===void 0?{}:{during:{seq:s.seq,issued:s.issued}},i=e?{ok:!1,error:e,output:this.output,calls:this.calls,...a}:{ok:!0,value:r,output:this.output,calls:this.calls,storeWrites:n??{set:{},delete:[]},...a};if(!this.channel){this.resolveResult(i);return}this.channel.stop().catch(()=>{}).then(()=>this.resolveResult(i))}},O=class{toolsByName=new Map;globalsByName=new Map;timeoutMs;memoryLimitBytes;launch;running=new Set;closed=!1;constructor(e,r){this.timeoutMs=e.timeoutMs??qe,this.memoryLimitBytes=e.memoryLimitBytes,this.launch=r;for(let n of e.tools??[])this.registerTool(n);_e(e.globals??[]);for(let n of e.globals??[])this.globalsByName.set(n.name,n)}registerTool(e){if(this.toolsByName.has(e.name))throw new Error(`Tool "${e.name}" is already registered`);this.toolsByName.set(e.name,e)}unregisterTool(e){return this.toolsByName.delete(e)}get tools(){return[...this.toolsByName.values()]}get globals(){return[...this.globalsByName.values()]}execute(e,r={}){if(this.closed)return Promise.reject(new Error("Sandbox is closed"));let n=new Map(this.toolsByName),s=new F({code:e,tools:[...n.values()],globals:[...this.globalsByName.values()],executors:{tools:n,globals:this.globalsByName},timeoutMs:r.timeoutMs??this.timeoutMs,signal:r.signal,memoryLimitBytes:this.memoryLimitBytes,store:ge(r.store),launch:this.launch});return this.running.add(s),s.promise.finally(()=>this.running.delete(s))}start(e,r){if(this.closed)throw new Error("Sandbox is closed");if(!Number.isFinite(r.startedAt)||r.startedAt<0)throw new Error("startedAt must be a non-negative number of milliseconds since the epoch");if(!Number.isInteger(r.seed)||r.seed<0||r.seed>4294967295)throw new Error("seed must be a 32-bit unsigned integer");let n=r.tools??[];if(new Set(n.map(c=>c.name)).size!==n.length)throw new Error("Tool names must be unique");let s=n.map(c=>c.jsName??y(c.name));if(new Set(s).size!==n.length)throw new Error("Tool script names must be unique");let o=r.globals??[];_e(o);let a=new F({code:e,tools:n,globals:o,executors:{tools:new Map,globals:new Map},timeoutMs:r.timeoutMs??Number.POSITIVE_INFINITY,signal:r.signal,memoryLimitBytes:this.memoryLimitBytes,store:ge(r.store),deterministic:{startedAt:r.startedAt,seed:r.seed},control:{onStarted:r.onStarted,onCall:r.onCall,onIdle:r.onIdle},launch:this.launch});return this.running.add(a),{result:a.promise.finally(()=>this.running.delete(a)),deliver:(c,l,d,u)=>a.deliver(c,l,d,u),get finished(){return a.finished}}}async close(){this.closed=!0,await Promise.all([...this.running].map(e=>e.abort("Sandbox closed")))}};import{Worker as De}from"node:worker_threads";import{fileURLToPath as Ue}from"node:url";import{readFile as Ie}from"node:fs/promises";var Q=new Map;function M(t){let e=t??Ue(new URL("vendor/quickjs.wasm",__cortexPackageRoot)),r=Q.get(e);if(!r){let{WebAssembly:n}=globalThis;r=Ie(e).then(s=>n.compile(s)).catch(s=>{throw Q.delete(e),s}),Q.set(e,r)}return r}function Le(){return new URL(import.meta.url.endsWith(".ts")?"./worker.ts":"./worker.js",import.meta.url)}function He(t){return async(e,r)=>{let n;try{n=await(t.wasm??M())}catch(l){throw new Error(`Failed to load QuickJS: ${x(l)}`)}let s=new SharedArrayBuffer(4),o={...e,wasm:n,interrupt:s},a=t.acquireWorker?.(),i;try{i=new De(t.workerUrl??Le(),{workerData:o})}catch(l){throw a?.(),new Error(`Failed to start worker: ${x(l)}`)}a&&i.once("exit",a),i.on("message",l=>{typeof l=="object"&&l!==null&&("watch:import"in l||"watch:require"in l)||r.message(l)}),i.on("error",l=>{r.failure({kind:"sandbox",name:l instanceof Error?l.name:void 0,message:x(l)})}),i.on("exit",l=>{r.failure({kind:"sandbox",message:`Worker exited with code ${l} before the script settled`})});let c=async()=>{Atomics.store(new Int32Array(s),0,1),i.terminate().catch(()=>{}),i.unref()};try{t.onWorkerStarted?.(new Promise(l=>i.once("exit",()=>l())))}catch(l){throw c(),l}return{post:l=>i.postMessage(l),stop:c}}}var U=class extends O{constructor(e={}){super(e,He(e))}};var Ot=new TextDecoder;var Be=512*1024;var It=new TextDecoder,Dt=new TextEncoder;var z='image expects a non-empty image URL string, an object with image_url, or an image block { type: "image", data, mimeType }',we=`(function (bridge, toolsJson, globalsJson, storeJson) {
|
|
4
|
+
import{E as y,F as G,G as V,I as de,J as fe,K as pe,N as X,O as K,P as me,Q as he,c as J,g as ce,n as ue}from"../../../../../dist/chunks/chunk-5DF5WJNM.js";import"../../../../../dist/chunks/chunk-FX6MOGLR.js";import"../../../../../dist/chunks/chunk-CK3P345X.js";import"../../../../../dist/chunks/chunk-ZQ7LGTSN.js";import"../../../../../dist/chunks/chunk-LACGULCN.js";import"../../../../../dist/chunks/chunk-3TGQSGG4.js";import{A as ae,B as le}from"../../../../../dist/chunks/chunk-QUUEQRIT.js";import"../../../../../dist/chunks/chunk-B3XBQEFM.js";import"../../../../../dist/chunks/chunk-WHC7AYZD.js";function Y(t){if(typeof t!="object"||t===null)return!1;let e=t.type;return e==="call"||e==="output"||e==="done"||e==="crash"||e==="started"||e==="idle"}var qe=3e5,Ce=/^[A-Za-z_$][A-Za-z0-9_$]*$/,Re=new Set(["tools","ALL_TOOLS","console","text","image","exit","globalThis","store","load"]);function x(t){return t instanceof Error?t.message:String(t)}function ge(t){let e={};for(let[r,n]of Object.entries(t??{})){let s=JSON.stringify(n);s!==void 0&&(e[r]=s)}return e}var b=class extends Error{};function $(t,e){try{return JSON.parse(t)}catch{throw new b(`${e} is not valid JSON`)}}function $e(t){let e=$(t,"store writes");if(!Array.isArray(e))throw new b("store writes are not an array");let r={set:{},delete:[]};for(let n of e){if(!Array.isArray(n)||typeof n[0]!="string"||(n.length===2?typeof n[1]!="string":n.length!==1))throw new b("store writes contain a malformed entry");let[s,o]=n;o===void 0?r.delete.push(s):r.set[s]=$(o,`store value for ${JSON.stringify(s)}`)}return r}function Me(t){let e=$(t,"script error");if(typeof e!="object"||e===null)throw new b("script error is not an object");let{name:r,message:n,stack:s}=e;if(typeof n!="string"||r!==void 0&&typeof r!="string"||s!==void 0&&typeof s!="string")throw new b("script error is malformed");return{kind:"script",name:r,message:n,stack:s}}function _e(t){let e=new Set,r=new Set;for(let n of t){let s=n.name.split(".");if(s.length>2||!s.every(o=>Ce.test(o))||Re.has(s[0]))throw new Error(`Invalid global name "${n.name}"`);if(e.has(n.name))throw new Error(`Global "${n.name}" is already registered`);s.length===2&&r.add(s[0]),e.add(n.name)}for(let n of r)if(e.has(n))throw new Error(`Global "${n}" conflicts with the namespace "${n}"`)}var F=class{promise;resolveResult;channel;unsent=[];executors;control;delivered=new Set;signal;timer;output=[];calls=[];pending=new Map;finished=!1;constructor(e){if(this.promise=new Promise(s=>{this.resolveResult=s}),this.executors=e.executors,this.control=e.control,this.signal=e.signal,Number.isFinite(e.timeoutMs)&&(this.timer=setTimeout(()=>{this.finish({kind:"timeout",message:`Execution timed out after ${e.timeoutMs} ms`})},e.timeoutMs)),e.signal&&(e.signal.aborted?this.onAbort():e.signal.addEventListener("abort",this.onAbort,{once:!0})),this.finished)return;let r={code:e.code,tools:e.tools.map(s=>({name:s.name,jsName:s.jsName??y(s.name),description:s.description??""})),globals:e.globals.map(s=>({name:s.name,spread:s.spread===!0})),memoryLimitBytes:e.memoryLimitBytes,store:e.store,...e.deterministic?{deterministic:e.deterministic}:{}},n={message:s=>this.receive(s),failure:s=>this.finish(s)};new Promise(s=>s(e.launch(r,n))).then(s=>{if(this.finished){s.stop().catch(()=>{});return}this.channel=s;for(let o of this.unsent.splice(0))s.post(o)},s=>{this.finish({kind:"sandbox",message:x(s)})})}deliver(e,r,n,s){if(this.finished)return;if(!Number.isFinite(r))throw new Error(`The clock value of result ${e} is not a finite number`);if(!Number.isInteger(e)||e<1||this.delivered.has(e))throw new Error(`Result number ${e} is not a positive integer used once`);let o=this.pending.get(n);if(o===void 0)throw new Error(`Call ${n} is not waiting for a result`);if(!s.ok&&s.properties!==void 0){let{properties:c}=s;if(typeof c!="object"||c===null||Array.isArray(c))throw new Error(`The properties of result ${e} are not an object`)}let a=s.ok?s.value===void 0?void 0:JSON.stringify(s.value):s.message,i=!s.ok&&s.properties!==void 0?JSON.stringify(s.properties):void 0;this.delivered.add(e),this.pending.delete(n),o.record&&(o.record.status=s.ok?"ok":"error",o.record.durationMs=performance.now()-o.startedAt),this.post({type:"result",id:n,ok:s.ok,payload:a,seq:e,now:r,...i===void 0?{}:{properties:i}})}abort(e){return this.finish({kind:"aborted",message:e}),this.promise}onAbort=()=>{let e=this.signal?.reason;this.finish({kind:"aborted",message:e instanceof Error?e.message:"Execution aborted"})};post(e){this.channel?this.channel.post(e):this.unsent.push(e)}receive(e){try{this.handleMessage(e)}catch(r){this.finish({kind:"sandbox",message:r instanceof b?`Sandbox bridge broken: ${r.message}. The script may have modified built-ins such as a prototype's toJSON.`:`Sandbox host failed: ${x(r)}`})}}handleMessage(e){if(!this.finished){if(!Y(e))throw new b("unknown message from the worker");switch(e.type){case"output":this.output.push(e.item);break;case"call":if(this.pending.has(e.id))throw new b(`duplicate call id ${e.id}`);this.control?this.forwardCall(e,this.control):this.handleCall(e);break;case"started":this.control?.onStarted?.(e.fingerprint);break;case"idle":this.control?.onIdle?.(e.seq,e.issued);break;case"done":this.handleDone(e);break;case"crash":this.finish({kind:"sandbox",message:e.message});break}}}handleDone(e){if(!e.ok){this.finish(Me(e.error),void 0,void 0,e.during);return}let r=e.value===void 0?void 0:$(e.value,"return value");this.finish(void 0,r,$e(e.writes),e.during)}forwardCall(e,r){let{id:n,name:s,target:o}=e,a=e.args===void 0?void 0:$(e.args,"call arguments"),i=o==="tool"?{name:s,status:"cancelled",durationMs:0}:void 0;i&&this.calls.push(i),this.pending.set(n,{record:i,startedAt:performance.now(),controller:new AbortController}),r.onCall({id:n,target:o,name:s,args:a})}async handleCall(e){let{id:r,name:n}=e,s=e.target==="tool",o=s?{name:n,status:"cancelled",durationMs:0}:void 0;o&&this.calls.push(o);let a={record:o,startedAt:performance.now(),controller:new AbortController};this.pending.set(r,a);let i,c;try{let l=(s?this.executors.tools:this.executors.globals).get(n);if(!l)throw new Error(`Unknown ${s?"tool":"global"} "${n}"`);let d=e.args===void 0?void 0:JSON.parse(e.args),u=await l.execute(d,{signal:a.controller.signal});c={type:"result",id:r,ok:!0,payload:u===void 0?void 0:JSON.stringify(u)},i="ok"}catch(l){c={type:"result",id:r,ok:!1,payload:x(l)},i="error"}this.pending.delete(r)&&(o&&(o.status=i,o.durationMs=performance.now()-a.startedAt),this.post(c))}finish(e,r,n,s){if(this.finished)return;this.finished=!0,clearTimeout(this.timer),this.signal?.removeEventListener("abort",this.onAbort);let o=performance.now();for(let c of this.pending.values())c.record&&(c.record.durationMs=o-c.startedAt),c.controller.abort();this.pending.clear(),this.unsent=[];let a=s===void 0?{}:{during:{seq:s.seq,issued:s.issued}},i=e?{ok:!1,error:e,output:this.output,calls:this.calls,...a}:{ok:!0,value:r,output:this.output,calls:this.calls,storeWrites:n??{set:{},delete:[]},...a};if(!this.channel){this.resolveResult(i);return}this.channel.stop().catch(()=>{}).then(()=>this.resolveResult(i))}},O=class{toolsByName=new Map;globalsByName=new Map;timeoutMs;memoryLimitBytes;launch;running=new Set;closed=!1;constructor(e,r){this.timeoutMs=e.timeoutMs??qe,this.memoryLimitBytes=e.memoryLimitBytes,this.launch=r;for(let n of e.tools??[])this.registerTool(n);_e(e.globals??[]);for(let n of e.globals??[])this.globalsByName.set(n.name,n)}registerTool(e){if(this.toolsByName.has(e.name))throw new Error(`Tool "${e.name}" is already registered`);this.toolsByName.set(e.name,e)}unregisterTool(e){return this.toolsByName.delete(e)}get tools(){return[...this.toolsByName.values()]}get globals(){return[...this.globalsByName.values()]}execute(e,r={}){if(this.closed)return Promise.reject(new Error("Sandbox is closed"));let n=new Map(this.toolsByName),s=new F({code:e,tools:[...n.values()],globals:[...this.globalsByName.values()],executors:{tools:n,globals:this.globalsByName},timeoutMs:r.timeoutMs??this.timeoutMs,signal:r.signal,memoryLimitBytes:this.memoryLimitBytes,store:ge(r.store),launch:this.launch});return this.running.add(s),s.promise.finally(()=>this.running.delete(s))}start(e,r){if(this.closed)throw new Error("Sandbox is closed");if(!Number.isFinite(r.startedAt)||r.startedAt<0)throw new Error("startedAt must be a non-negative number of milliseconds since the epoch");if(!Number.isInteger(r.seed)||r.seed<0||r.seed>4294967295)throw new Error("seed must be a 32-bit unsigned integer");let n=r.tools??[];if(new Set(n.map(c=>c.name)).size!==n.length)throw new Error("Tool names must be unique");let s=n.map(c=>c.jsName??y(c.name));if(new Set(s).size!==n.length)throw new Error("Tool script names must be unique");let o=r.globals??[];_e(o);let a=new F({code:e,tools:n,globals:o,executors:{tools:new Map,globals:new Map},timeoutMs:r.timeoutMs??Number.POSITIVE_INFINITY,signal:r.signal,memoryLimitBytes:this.memoryLimitBytes,store:ge(r.store),deterministic:{startedAt:r.startedAt,seed:r.seed},control:{onStarted:r.onStarted,onCall:r.onCall,onIdle:r.onIdle},launch:this.launch});return this.running.add(a),{result:a.promise.finally(()=>this.running.delete(a)),deliver:(c,l,d,u)=>a.deliver(c,l,d,u),get finished(){return a.finished}}}async close(){this.closed=!0,await Promise.all([...this.running].map(e=>e.abort("Sandbox closed")))}};import{Worker as De}from"node:worker_threads";import{fileURLToPath as Ue}from"node:url";import{readFile as Ie}from"node:fs/promises";var Q=new Map;function M(t){let e=t??Ue(new URL("vendor/quickjs.wasm",__cortexPackageRoot)),r=Q.get(e);if(!r){let{WebAssembly:n}=globalThis;r=Ie(e).then(s=>n.compile(s)).catch(s=>{throw Q.delete(e),s}),Q.set(e,r)}return r}function Le(){return new URL(import.meta.url.endsWith(".ts")?"./worker.ts":"./worker.js",import.meta.url)}function He(t){return async(e,r)=>{let n;try{n=await(t.wasm??M())}catch(l){throw new Error(`Failed to load QuickJS: ${x(l)}`)}let s=new SharedArrayBuffer(4),o={...e,wasm:n,interrupt:s},a=t.acquireWorker?.(),i;try{i=new De(t.workerUrl??Le(),{workerData:o})}catch(l){throw a?.(),new Error(`Failed to start worker: ${x(l)}`)}a&&i.once("exit",a),i.on("message",l=>{typeof l=="object"&&l!==null&&("watch:import"in l||"watch:require"in l)||r.message(l)}),i.on("error",l=>{r.failure({kind:"sandbox",name:l instanceof Error?l.name:void 0,message:x(l)})}),i.on("exit",l=>{r.failure({kind:"sandbox",message:`Worker exited with code ${l} before the script settled`})});let c=async()=>{Atomics.store(new Int32Array(s),0,1),i.terminate().catch(()=>{}),i.unref()};try{t.onWorkerStarted?.(new Promise(l=>i.once("exit",()=>l())))}catch(l){throw c(),l}return{post:l=>i.postMessage(l),stop:c}}}var U=class extends O{constructor(e={}){super(e,He(e))}};var Ot=new TextDecoder;var Be=512*1024;var It=new TextDecoder,Dt=new TextEncoder;var z='image expects a non-empty image URL string, an object with image_url, or an image block { type: "image", data, mimeType }',we=`(function (bridge, toolsJson, globalsJson, storeJson) {
|
|
5
5
|
"use strict";
|
|
6
6
|
|
|
7
7
|
// Freeze every object reachable from the built-in globals, plus the intrinsics that are only
|
package/vendor/pi-ai/bedrock.js
CHANGED
|
@@ -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,b}from"../../dist/chunks/chunk-
|
|
4
|
+
import{a,b}from"../../dist/chunks/chunk-XEBEWR6Y.js";import"../../dist/chunks/chunk-OSEIQ7SS.js";import"../../dist/chunks/chunk-CXT5IR5T.js";import"../../dist/chunks/chunk-WHC7AYZD.js";export{b as bedrockConverseStreamApi,a as setBedrockProviderModule};
|
|
@@ -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,b,c,d,e,f,g,h,i,j}from"../../dist/chunks/chunk-
|
|
4
|
+
import{a,b,c,d,e,f,g,h,i,j}from"../../dist/chunks/chunk-AFTBQRPN.js";import"../../dist/chunks/chunk-WHC7AYZD.js";export{b as loadAnthropicOAuth,e as loadGitHubCopilotOAuth,g as loadKimiCodingOAuth,h as loadMetaOAuth,d as loadOpenAIChatGPTOAuth,c as loadOpenAICodexOAuth,f as loadOpenRouterOAuth,j as loadRadiusOAuth,i as loadXaiOAuth,a as registerBundledOAuthFlowLoaders};
|