@namzu/cli 34.1.1 → 36.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +800 -0
- package/README.md +160 -394
- package/assets/pal-blender-mcp.py +123 -0
- package/assets/pal-godot-mcp-pin.json +135 -0
- package/assets/pal-godot-mcp.cjs +418 -0
- package/dist/bin-main.d.ts +3 -0
- package/dist/bin-main.d.ts.map +1 -0
- package/dist/bin.d.ts +2 -1
- package/dist/bin.d.ts.map +1 -1
- package/dist/bin.js +85 -23
- package/dist/bin.js.map +6 -1
- package/dist/boot-narrative.d.ts +16 -0
- package/dist/boot-narrative.d.ts.map +1 -0
- package/dist/checkpoints/manifest.d.ts +107 -0
- package/dist/checkpoints/manifest.d.ts.map +1 -0
- package/dist/checkpoints/store.d.ts +280 -40
- package/dist/checkpoints/store.d.ts.map +1 -1
- package/dist/checkpoints/undo-plan.d.ts +83 -0
- package/dist/checkpoints/undo-plan.d.ts.map +1 -0
- package/dist/checkpoints/wrap.d.ts +4 -0
- package/dist/checkpoints/wrap.d.ts.map +1 -1
- package/dist/chunks/acp-BOSEA4R3.js +13448 -0
- package/dist/chunks/acp-BOSEA4R3.js.map +6 -0
- package/dist/chunks/activity-command-ACS7KL3C.js +262 -0
- package/dist/chunks/activity-command-ACS7KL3C.js.map +6 -0
- package/dist/chunks/add-DLS54YKS.js +712 -0
- package/dist/chunks/add-DLS54YKS.js.map +6 -0
- package/dist/chunks/agent-GV3DWYQC.js +87 -0
- package/dist/chunks/agent-GV3DWYQC.js.map +6 -0
- package/dist/chunks/agent-session-7VE6GJJH.js +46 -0
- package/dist/chunks/agent-session-7VE6GJJH.js.map +6 -0
- package/dist/chunks/archive-6ZENIEBP.js +84 -0
- package/dist/chunks/archive-6ZENIEBP.js.map +6 -0
- package/dist/chunks/bin-main-NFFT5ZIU.js +126 -0
- package/dist/chunks/bin-main-NFFT5ZIU.js.map +6 -0
- package/dist/chunks/browser-VT2U6NG2.js +31 -0
- package/dist/chunks/browser-VT2U6NG2.js.map +6 -0
- package/dist/chunks/chat-UNYVLDFL.js +101 -0
- package/dist/chunks/chat-UNYVLDFL.js.map +6 -0
- package/dist/chunks/chunk-2IL6OG3X.js +311 -0
- package/dist/chunks/chunk-2IL6OG3X.js.map +6 -0
- package/dist/chunks/chunk-2RBYHHLM.js +319 -0
- package/dist/chunks/chunk-2RBYHHLM.js.map +6 -0
- package/dist/chunks/chunk-42ZK2AH4.js +71 -0
- package/dist/chunks/chunk-42ZK2AH4.js.map +6 -0
- package/dist/chunks/chunk-5PQVJBIO.js +168 -0
- package/dist/chunks/chunk-5PQVJBIO.js.map +6 -0
- package/dist/chunks/chunk-6CPT2ZBS.js +75 -0
- package/dist/chunks/chunk-6CPT2ZBS.js.map +6 -0
- package/dist/chunks/chunk-6LLJQ3KY.js +225 -0
- package/dist/chunks/chunk-6LLJQ3KY.js.map +6 -0
- package/dist/chunks/chunk-6YFJDVGA.js +161 -0
- package/dist/chunks/chunk-6YFJDVGA.js.map +6 -0
- package/dist/chunks/chunk-6YG7D7U4.js +159 -0
- package/dist/chunks/chunk-6YG7D7U4.js.map +6 -0
- package/dist/chunks/chunk-6ZPODOJN.js +828 -0
- package/dist/chunks/chunk-6ZPODOJN.js.map +6 -0
- package/dist/chunks/chunk-76FLAFCG.js +51 -0
- package/dist/chunks/chunk-76FLAFCG.js.map +6 -0
- package/dist/chunks/chunk-7HCPD673.js +25326 -0
- package/dist/chunks/chunk-7HCPD673.js.map +6 -0
- package/dist/chunks/chunk-7KWGR2YA.js +257 -0
- package/dist/chunks/chunk-7KWGR2YA.js.map +6 -0
- package/dist/chunks/chunk-A22MBIYU.js +42 -0
- package/dist/chunks/chunk-A22MBIYU.js.map +6 -0
- package/dist/chunks/chunk-AHIDYIRB.js +329 -0
- package/dist/chunks/chunk-AHIDYIRB.js.map +6 -0
- package/dist/chunks/chunk-AK2U3N2A.js +31 -0
- package/dist/chunks/chunk-AK2U3N2A.js.map +6 -0
- package/dist/chunks/chunk-AKKRZTPB.js +283 -0
- package/dist/chunks/chunk-AKKRZTPB.js.map +6 -0
- package/dist/chunks/chunk-BCZR2B3Y.js +97 -0
- package/dist/chunks/chunk-BCZR2B3Y.js.map +6 -0
- package/dist/chunks/chunk-CHIEVVQ2.js +32 -0
- package/dist/chunks/chunk-CHIEVVQ2.js.map +6 -0
- package/dist/chunks/chunk-D67YBUO3.js +110 -0
- package/dist/chunks/chunk-D67YBUO3.js.map +6 -0
- package/dist/chunks/chunk-DIHEHK7K.js +765 -0
- package/dist/chunks/chunk-DIHEHK7K.js.map +6 -0
- package/dist/chunks/chunk-E5VLANCO.js +101 -0
- package/dist/chunks/chunk-E5VLANCO.js.map +6 -0
- package/dist/chunks/chunk-EEDZOGV4.js +47 -0
- package/dist/chunks/chunk-EEDZOGV4.js.map +6 -0
- package/dist/chunks/chunk-ENGNEELC.js +271 -0
- package/dist/chunks/chunk-ENGNEELC.js.map +6 -0
- package/dist/chunks/chunk-EVY4MVRE.js +74 -0
- package/dist/chunks/chunk-EVY4MVRE.js.map +6 -0
- package/dist/chunks/chunk-FJNDNNNQ.js +115 -0
- package/dist/chunks/chunk-FJNDNNNQ.js.map +6 -0
- package/dist/chunks/chunk-FOFGMP7O.js +20 -0
- package/dist/chunks/chunk-FOFGMP7O.js.map +6 -0
- package/dist/chunks/chunk-FTMTO72X.js +95 -0
- package/dist/chunks/chunk-FTMTO72X.js.map +6 -0
- package/dist/chunks/chunk-GIXSS6KW.js +2228 -0
- package/dist/chunks/chunk-GIXSS6KW.js.map +6 -0
- package/dist/chunks/chunk-GNBMKISG.js +19 -0
- package/dist/chunks/chunk-GNBMKISG.js.map +6 -0
- package/dist/chunks/chunk-GWQEMJFS.js +28 -0
- package/dist/chunks/chunk-GWQEMJFS.js.map +6 -0
- package/dist/chunks/chunk-H6B6AROX.js +151 -0
- package/dist/chunks/chunk-H6B6AROX.js.map +6 -0
- package/dist/chunks/chunk-HE7WUOX2.js +26 -0
- package/dist/chunks/chunk-HE7WUOX2.js.map +6 -0
- package/dist/chunks/chunk-HZBKWL42.js +303 -0
- package/dist/chunks/chunk-HZBKWL42.js.map +6 -0
- package/dist/chunks/chunk-I7HQR6ET.js +75 -0
- package/dist/chunks/chunk-I7HQR6ET.js.map +6 -0
- package/dist/chunks/chunk-IJEB77SH.js +648 -0
- package/dist/chunks/chunk-IJEB77SH.js.map +6 -0
- package/dist/chunks/chunk-JNPDWME5.js +675 -0
- package/dist/chunks/chunk-JNPDWME5.js.map +6 -0
- package/dist/chunks/chunk-JORONMD3.js +18 -0
- package/dist/chunks/chunk-JORONMD3.js.map +6 -0
- package/dist/chunks/chunk-JV3LONAU.js +76 -0
- package/dist/chunks/chunk-JV3LONAU.js.map +6 -0
- package/dist/chunks/chunk-K5HARZ7G.js +82516 -0
- package/dist/chunks/chunk-K5HARZ7G.js.map +6 -0
- package/dist/chunks/chunk-KONYGNG6.js +7661 -0
- package/dist/chunks/chunk-KONYGNG6.js.map +6 -0
- package/dist/chunks/chunk-LXB3S4IC.js +19 -0
- package/dist/chunks/chunk-LXB3S4IC.js.map +6 -0
- package/dist/chunks/chunk-M3IAMIBJ.js +661 -0
- package/dist/chunks/chunk-M3IAMIBJ.js.map +6 -0
- package/dist/chunks/chunk-MH6KUKVV.js +1142 -0
- package/dist/chunks/chunk-MH6KUKVV.js.map +6 -0
- package/dist/chunks/chunk-MS3IYQ72.js +1479 -0
- package/dist/chunks/chunk-MS3IYQ72.js.map +6 -0
- package/dist/chunks/chunk-MZP6SH3M.js +3497 -0
- package/dist/chunks/chunk-MZP6SH3M.js.map +6 -0
- package/dist/chunks/chunk-N3ZEXVSS.js +76 -0
- package/dist/chunks/chunk-N3ZEXVSS.js.map +6 -0
- package/dist/chunks/chunk-N6SR54VC.js +207 -0
- package/dist/chunks/chunk-N6SR54VC.js.map +6 -0
- package/dist/chunks/chunk-NADQQMMG.js +46 -0
- package/dist/chunks/chunk-NADQQMMG.js.map +6 -0
- package/dist/chunks/chunk-NBH52WHS.js +247 -0
- package/dist/chunks/chunk-NBH52WHS.js.map +6 -0
- package/dist/chunks/chunk-NICLKFBG.js +109 -0
- package/dist/chunks/chunk-NICLKFBG.js.map +6 -0
- package/dist/chunks/chunk-NIPHHZ5G.js +283 -0
- package/dist/chunks/chunk-NIPHHZ5G.js.map +6 -0
- package/dist/chunks/chunk-NQT244I2.js +517 -0
- package/dist/chunks/chunk-NQT244I2.js.map +6 -0
- package/dist/chunks/chunk-NUGPLXVK.js +228 -0
- package/dist/chunks/chunk-NUGPLXVK.js.map +6 -0
- package/dist/chunks/chunk-OEW7CJKK.js +140 -0
- package/dist/chunks/chunk-OEW7CJKK.js.map +6 -0
- package/dist/chunks/chunk-OH6TB27S.js +111 -0
- package/dist/chunks/chunk-OH6TB27S.js.map +6 -0
- package/dist/chunks/chunk-OWH6QQY2.js +1858 -0
- package/dist/chunks/chunk-OWH6QQY2.js.map +6 -0
- package/dist/chunks/chunk-OWXJOD4H.js +773 -0
- package/dist/chunks/chunk-OWXJOD4H.js.map +6 -0
- package/dist/chunks/chunk-PT537V7B.js +787 -0
- package/dist/chunks/chunk-PT537V7B.js.map +6 -0
- package/dist/chunks/chunk-QEQZFG2X.js +106 -0
- package/dist/chunks/chunk-QEQZFG2X.js.map +6 -0
- package/dist/chunks/chunk-QL4O4UGZ.js +245 -0
- package/dist/chunks/chunk-QL4O4UGZ.js.map +6 -0
- package/dist/chunks/chunk-QL54XCF4.js +73 -0
- package/dist/chunks/chunk-QL54XCF4.js.map +6 -0
- package/dist/chunks/chunk-SB6UD3ED.js +1355 -0
- package/dist/chunks/chunk-SB6UD3ED.js.map +6 -0
- package/dist/chunks/chunk-SGGRGKGV.js +34 -0
- package/dist/chunks/chunk-SGGRGKGV.js.map +6 -0
- package/dist/chunks/chunk-SKKWMMFP.js +474 -0
- package/dist/chunks/chunk-SKKWMMFP.js.map +6 -0
- package/dist/chunks/chunk-SMIDV4KH.js +171 -0
- package/dist/chunks/chunk-SMIDV4KH.js.map +6 -0
- package/dist/chunks/chunk-T2VUTAHB.js +46 -0
- package/dist/chunks/chunk-T2VUTAHB.js.map +6 -0
- package/dist/chunks/chunk-T4SB6AAF.js +134 -0
- package/dist/chunks/chunk-T4SB6AAF.js.map +6 -0
- package/dist/chunks/chunk-TBIX6JRE.js +24 -0
- package/dist/chunks/chunk-TBIX6JRE.js.map +6 -0
- package/dist/chunks/chunk-THNCQJ33.js +11265 -0
- package/dist/chunks/chunk-THNCQJ33.js.map +6 -0
- package/dist/chunks/chunk-U56QFYGA.js +818 -0
- package/dist/chunks/chunk-U56QFYGA.js.map +6 -0
- package/dist/chunks/chunk-U6GZ7EW4.js +106 -0
- package/dist/chunks/chunk-U6GZ7EW4.js.map +6 -0
- package/dist/chunks/chunk-UDDSFIMB.js +1373 -0
- package/dist/chunks/chunk-UDDSFIMB.js.map +6 -0
- package/dist/chunks/chunk-UFHNXZL2.js +399 -0
- package/dist/chunks/chunk-UFHNXZL2.js.map +6 -0
- package/dist/chunks/chunk-US5ZFPAU.js +400 -0
- package/dist/chunks/chunk-US5ZFPAU.js.map +6 -0
- package/dist/chunks/chunk-VRL2WNQN.js +7534 -0
- package/dist/chunks/chunk-VRL2WNQN.js.map +6 -0
- package/dist/chunks/chunk-W3UQMRYA.js +380 -0
- package/dist/chunks/chunk-W3UQMRYA.js.map +6 -0
- package/dist/chunks/chunk-W5KGCUP3.js +11111 -0
- package/dist/chunks/chunk-W5KGCUP3.js.map +6 -0
- package/dist/chunks/chunk-WHODOMXA.js +132 -0
- package/dist/chunks/chunk-WHODOMXA.js.map +6 -0
- package/dist/chunks/chunk-WT6TFCPV.js +154 -0
- package/dist/chunks/chunk-WT6TFCPV.js.map +6 -0
- package/dist/chunks/chunk-WY2WUTFR.js +164 -0
- package/dist/chunks/chunk-WY2WUTFR.js.map +6 -0
- package/dist/chunks/chunk-XEUQN4JC.js +54 -0
- package/dist/chunks/chunk-XEUQN4JC.js.map +6 -0
- package/dist/chunks/chunk-Y7B67G22.js +26 -0
- package/dist/chunks/chunk-Y7B67G22.js.map +6 -0
- package/dist/chunks/chunk-YEMJX2DS.js +69 -0
- package/dist/chunks/chunk-YEMJX2DS.js.map +6 -0
- package/dist/chunks/chunk-YKLKHDZU.js +2953 -0
- package/dist/chunks/chunk-YKLKHDZU.js.map +6 -0
- package/dist/chunks/chunk-YQEWD2EN.js +127 -0
- package/dist/chunks/chunk-YQEWD2EN.js.map +6 -0
- package/dist/chunks/chunk-YYQJIECC.js +1439 -0
- package/dist/chunks/chunk-YYQJIECC.js.map +6 -0
- package/dist/chunks/chunk-ZKVZNOUS.js +106 -0
- package/dist/chunks/chunk-ZKVZNOUS.js.map +6 -0
- package/dist/chunks/chunk-ZPR4IMRT.js +36 -0
- package/dist/chunks/chunk-ZPR4IMRT.js.map +6 -0
- package/dist/chunks/chunk-ZWA2JRJV.js +45 -0
- package/dist/chunks/chunk-ZWA2JRJV.js.map +6 -0
- package/dist/chunks/cli-runtime-F4MBZ2UQ.js +129 -0
- package/dist/chunks/cli-runtime-F4MBZ2UQ.js.map +6 -0
- package/dist/chunks/commands-GMQGFTIY.js +21 -0
- package/dist/chunks/commands-GMQGFTIY.js.map +6 -0
- package/dist/chunks/computer-GXDY4H35.js +493 -0
- package/dist/chunks/computer-GXDY4H35.js.map +6 -0
- package/dist/chunks/crash-report-STOHSORG.js +21 -0
- package/dist/chunks/crash-report-STOHSORG.js.map +6 -0
- package/dist/chunks/devtools-LBE4PAQN.js +3851 -0
- package/dist/chunks/devtools-LBE4PAQN.js.map +6 -0
- package/dist/chunks/dist-3AF2X4S5.js +1339 -0
- package/dist/chunks/dist-3AF2X4S5.js.map +6 -0
- package/dist/chunks/dist-AZIMHV2B.js +514 -0
- package/dist/chunks/dist-AZIMHV2B.js.map +6 -0
- package/dist/chunks/dist-BGYRQ5BC.js +555 -0
- package/dist/chunks/dist-BGYRQ5BC.js.map +6 -0
- package/dist/chunks/dist-OTTZ7WVD.js +1415 -0
- package/dist/chunks/dist-OTTZ7WVD.js.map +6 -0
- package/dist/chunks/dist-R3I3ATSG.js +1018 -0
- package/dist/chunks/dist-R3I3ATSG.js.map +6 -0
- package/dist/chunks/dist-TXEKDBQO.js +40642 -0
- package/dist/chunks/dist-TXEKDBQO.js.map +6 -0
- package/dist/chunks/dist-XTWYQHHN.js +520 -0
- package/dist/chunks/dist-XTWYQHHN.js.map +6 -0
- package/dist/chunks/doctor-VXSB4Y4P.js +28 -0
- package/dist/chunks/doctor-VXSB4Y4P.js.map +6 -0
- package/dist/chunks/drain-DXVICQBR.js +471 -0
- package/dist/chunks/drain-DXVICQBR.js.map +6 -0
- package/dist/chunks/endpoint-M2DDENPP.js +15 -0
- package/dist/chunks/endpoint-M2DDENPP.js.map +6 -0
- package/dist/chunks/eval-BMJQXDKA.js +187 -0
- package/dist/chunks/eval-BMJQXDKA.js.map +6 -0
- package/dist/chunks/exec-3T5ESZPH.js +1284 -0
- package/dist/chunks/exec-3T5ESZPH.js.map +6 -0
- package/dist/chunks/home-ILHA7B6Z.js +16 -0
- package/dist/chunks/home-ILHA7B6Z.js.map +6 -0
- package/dist/chunks/host-queries-QCMWDZGS.js +152 -0
- package/dist/chunks/host-queries-QCMWDZGS.js.map +6 -0
- package/dist/chunks/lib-KXZZJJG2.js +2657 -0
- package/dist/chunks/lib-KXZZJJG2.js.map +6 -0
- package/dist/chunks/lifecycle-CB23VJI7.js +63 -0
- package/dist/chunks/lifecycle-CB23VJI7.js.map +6 -0
- package/dist/chunks/list-N6WXZBMD.js +293 -0
- package/dist/chunks/list-N6WXZBMD.js.map +6 -0
- package/dist/chunks/login-26NCG6EQ.js +29 -0
- package/dist/chunks/login-26NCG6EQ.js.map +6 -0
- package/dist/chunks/logs-V7SNM7LA.js +116 -0
- package/dist/chunks/logs-V7SNM7LA.js.map +6 -0
- package/dist/chunks/mcp-BTHCU5ZC.js +763 -0
- package/dist/chunks/mcp-BTHCU5ZC.js.map +6 -0
- package/dist/chunks/message-command-HMIOR52C.js +170 -0
- package/dist/chunks/message-command-HMIOR52C.js.map +6 -0
- package/dist/chunks/node-QB2FA2ZB.js +916 -0
- package/dist/chunks/node-QB2FA2ZB.js.map +6 -0
- package/dist/chunks/operator-tools-7LMWOHSN.js +115 -0
- package/dist/chunks/operator-tools-7LMWOHSN.js.map +6 -0
- package/dist/chunks/output-schema-XCONYVZ7.js +11 -0
- package/dist/chunks/output-schema-XCONYVZ7.js.map +6 -0
- package/dist/chunks/pal-YEUKHA6F.js +200 -0
- package/dist/chunks/pal-YEUKHA6F.js.map +6 -0
- package/dist/chunks/paths-DXYFKIJU.js +10 -0
- package/dist/chunks/paths-DXYFKIJU.js.map +6 -0
- package/dist/chunks/pica-WNHDDIFX.js +1736 -0
- package/dist/chunks/pica-WNHDDIFX.js.map +6 -0
- package/dist/chunks/providers-EI3FAKYB.js +160 -0
- package/dist/chunks/providers-EI3FAKYB.js.map +6 -0
- package/dist/chunks/resident-5ZY6OG6B.js +1314 -0
- package/dist/chunks/resident-5ZY6OG6B.js.map +6 -0
- package/dist/chunks/resume-command-ONYRZIIA.js +22 -0
- package/dist/chunks/resume-command-ONYRZIIA.js.map +6 -0
- package/dist/chunks/schedule-6JPEO4NR.js +143 -0
- package/dist/chunks/schedule-6JPEO4NR.js.map +6 -0
- package/dist/chunks/serve-S7UWNIR3.js +21 -0
- package/dist/chunks/serve-S7UWNIR3.js.map +6 -0
- package/dist/chunks/service-WSW3M6K5.js +1633 -0
- package/dist/chunks/service-WSW3M6K5.js.map +6 -0
- package/dist/chunks/session-step-2VZM3CCA.js +26 -0
- package/dist/chunks/session-step-2VZM3CCA.js.map +6 -0
- package/dist/chunks/skills-KAZJYGX5.js +282 -0
- package/dist/chunks/skills-KAZJYGX5.js.map +6 -0
- package/dist/chunks/state-263OUKQA.js +717 -0
- package/dist/chunks/state-263OUKQA.js.map +6 -0
- package/dist/chunks/store-3XLCJ7EL.js +42 -0
- package/dist/chunks/store-3XLCJ7EL.js.map +6 -0
- package/dist/chunks/store-KN65QI2M.js +82 -0
- package/dist/chunks/store-KN65QI2M.js.map +6 -0
- package/dist/chunks/store-X3TESBIN.js +34 -0
- package/dist/chunks/store-X3TESBIN.js.map +6 -0
- package/dist/chunks/tui-5MU7JBXX.js +56703 -0
- package/dist/chunks/tui-5MU7JBXX.js.map +6 -0
- package/dist/chunks/upgrade-BYM4MWBC.js +315 -0
- package/dist/chunks/upgrade-BYM4MWBC.js.map +6 -0
- package/dist/chunks/webapi-6HUHZUAH.js +2715 -0
- package/dist/chunks/webapi-6HUHZUAH.js.map +6 -0
- package/dist/chunks/worktree-K3ZIPXRM.js +116 -0
- package/dist/chunks/worktree-K3ZIPXRM.js.map +6 -0
- package/dist/cli-runtime.d.ts +19 -0
- package/dist/cli-runtime.d.ts.map +1 -0
- package/dist/cli.d.ts +0 -15
- package/dist/cli.d.ts.map +1 -1
- package/dist/commands/acp-harness.d.ts +64 -0
- package/dist/commands/acp-harness.d.ts.map +1 -0
- package/dist/commands/acp-provider-retry.d.ts +27 -0
- package/dist/commands/acp-provider-retry.d.ts.map +1 -0
- package/dist/commands/acp.d.ts +134 -3
- package/dist/commands/acp.d.ts.map +1 -1
- package/dist/commands/computer.d.ts +3 -0
- package/dist/commands/computer.d.ts.map +1 -0
- package/dist/commands/desktop-host-changes.d.ts +65 -0
- package/dist/commands/desktop-host-changes.d.ts.map +1 -0
- package/dist/commands/desktop-host-header.d.ts +30 -0
- package/dist/commands/desktop-host-header.d.ts.map +1 -0
- package/dist/commands/desktop-host.d.ts +354 -0
- package/dist/commands/desktop-host.d.ts.map +1 -0
- package/dist/commands/desktop-model-catalogue.d.ts +25 -0
- package/dist/commands/desktop-model-catalogue.d.ts.map +1 -0
- package/dist/commands/effort-levels.d.ts +3 -0
- package/dist/commands/effort-levels.d.ts.map +1 -0
- package/dist/commands/exec-flags.d.ts +4 -0
- package/dist/commands/exec-flags.d.ts.map +1 -1
- package/dist/commands/exec.d.ts.map +1 -1
- package/dist/commands/lazy.d.ts +20 -0
- package/dist/commands/lazy.d.ts.map +1 -0
- package/dist/commands/manifest.d.ts +33 -0
- package/dist/commands/manifest.d.ts.map +1 -0
- package/dist/commands/mcp.d.ts +3 -0
- package/dist/commands/mcp.d.ts.map +1 -1
- package/dist/commands/pal.d.ts +5 -0
- package/dist/commands/pal.d.ts.map +1 -0
- package/dist/commands/permission-preview.d.ts +38 -0
- package/dist/commands/permission-preview.d.ts.map +1 -0
- package/dist/commands/registry.d.ts +10 -0
- package/dist/commands/registry.d.ts.map +1 -1
- package/dist/commands/serve.d.ts +1 -12
- package/dist/commands/serve.d.ts.map +1 -1
- package/dist/commands/stdin.d.ts.map +1 -1
- package/dist/commands/upgrade.d.ts +14 -0
- package/dist/commands/upgrade.d.ts.map +1 -1
- package/dist/compile-cache-enable.d.ts +2 -0
- package/dist/compile-cache-enable.d.ts.map +1 -0
- package/dist/compile-cache.d.ts +53 -0
- package/dist/compile-cache.d.ts.map +1 -0
- package/dist/computer/bundle.d.ts +18 -0
- package/dist/computer/bundle.d.ts.map +1 -0
- package/dist/computer/run.d.ts +26 -0
- package/dist/computer/run.d.ts.map +1 -0
- package/dist/computer/sentences.d.ts +30 -0
- package/dist/computer/sentences.d.ts.map +1 -0
- package/dist/config/load.d.ts +10 -1
- package/dist/config/load.d.ts.map +1 -1
- package/dist/context/capabilities.d.ts +25 -2
- package/dist/context/capabilities.d.ts.map +1 -1
- package/dist/context/runtime-message.d.ts.map +1 -1
- package/dist/crash-report.d.ts +22 -0
- package/dist/crash-report.d.ts.map +1 -0
- package/dist/debug-requested.d.ts +7 -0
- package/dist/debug-requested.d.ts.map +1 -0
- package/dist/doctor/checks/credentials.d.ts.map +1 -1
- package/dist/exit-codes.d.ts +9 -1
- package/dist/exit-codes.d.ts.map +1 -1
- package/dist/index.js +105 -17
- package/dist/index.js.map +6 -1
- package/dist/integrations/harness/claude-adapter.d.ts +20 -0
- package/dist/integrations/harness/claude-adapter.d.ts.map +1 -0
- package/dist/integrations/harness/claude-protocol.d.ts +67 -0
- package/dist/integrations/harness/claude-protocol.d.ts.map +1 -0
- package/dist/integrations/harness/codex-adapter.d.ts +80 -0
- package/dist/integrations/harness/codex-adapter.d.ts.map +1 -0
- package/dist/integrations/harness/codex-protocol.d.ts +22 -0
- package/dist/integrations/harness/codex-protocol.d.ts.map +1 -0
- package/dist/integrations/harness/model-cache.d.ts +16 -0
- package/dist/integrations/harness/model-cache.d.ts.map +1 -0
- package/dist/integrations/harness/native-executable.d.ts +8 -0
- package/dist/integrations/harness/native-executable.d.ts.map +1 -0
- package/dist/integrations/harness/process.d.ts +25 -0
- package/dist/integrations/harness/process.d.ts.map +1 -0
- package/dist/integrations/mcp/servers.d.ts.map +1 -1
- package/dist/integrations/peers/runtime.d.ts +64 -0
- package/dist/integrations/peers/runtime.d.ts.map +1 -0
- package/dist/integrations/plugins/inventory.d.ts +27 -0
- package/dist/integrations/plugins/inventory.d.ts.map +1 -0
- package/dist/integrations/providers/composer-settings.d.ts +33 -0
- package/dist/integrations/providers/composer-settings.d.ts.map +1 -0
- package/dist/integrations/providers/connections.d.ts +37 -0
- package/dist/integrations/providers/connections.d.ts.map +1 -0
- package/dist/integrations/providers/credential-store.d.ts +35 -0
- package/dist/integrations/providers/credential-store.d.ts.map +1 -1
- package/dist/integrations/providers/discover.d.ts +27 -1
- package/dist/integrations/providers/discover.d.ts.map +1 -1
- package/dist/integrations/providers/index.d.ts +2 -2
- package/dist/integrations/providers/index.d.ts.map +1 -1
- package/dist/integrations/providers/picker-operation.d.ts +6 -0
- package/dist/integrations/providers/picker-operation.d.ts.map +1 -0
- package/dist/integrations/providers/setup.d.ts +16 -1
- package/dist/integrations/providers/setup.d.ts.map +1 -1
- package/dist/integrations/resident/runner-worker.js +190 -161
- package/dist/integrations/resident/runner-worker.js.map +6 -1
- package/dist/integrations/resident/session-step.d.ts.map +1 -1
- package/dist/integrations/sessions/display-title.d.ts +8 -0
- package/dist/integrations/sessions/display-title.d.ts.map +1 -1
- package/dist/integrations/sessions/store.d.ts +23 -9
- package/dist/integrations/sessions/store.d.ts.map +1 -1
- package/dist/integrations/sessions/task-context.d.ts +1 -1
- package/dist/integrations/sessions/task-context.d.ts.map +1 -1
- package/dist/integrations/sessions/transcript-export.d.ts.map +1 -1
- package/dist/integrations/subagents/activity.d.ts +9 -6
- package/dist/integrations/subagents/activity.d.ts.map +1 -1
- package/dist/integrations/subagents/operator-journal.d.ts +20 -0
- package/dist/integrations/subagents/operator-journal.d.ts.map +1 -0
- package/dist/integrations/subagents/runtime.d.ts +11 -0
- package/dist/integrations/subagents/runtime.d.ts.map +1 -1
- package/dist/integrations/trust/store.d.ts +14 -0
- package/dist/integrations/trust/store.d.ts.map +1 -1
- package/dist/integrations/web/search.d.ts +1 -1
- package/dist/pals/actions.d.ts +57 -0
- package/dist/pals/actions.d.ts.map +1 -0
- package/dist/pals/activity-command.d.ts +3 -0
- package/dist/pals/activity-command.d.ts.map +1 -0
- package/dist/pals/activity.d.ts +18 -0
- package/dist/pals/activity.d.ts.map +1 -0
- package/dist/pals/agent-session.d.ts +19 -0
- package/dist/pals/agent-session.d.ts.map +1 -0
- package/dist/pals/channel-actions.d.ts +5 -0
- package/dist/pals/channel-actions.d.ts.map +1 -0
- package/dist/pals/channel-local.d.ts +7 -0
- package/dist/pals/channel-local.d.ts.map +1 -0
- package/dist/pals/channel.d.ts +20 -0
- package/dist/pals/channel.d.ts.map +1 -0
- package/dist/pals/chat.d.ts +6 -0
- package/dist/pals/chat.d.ts.map +1 -0
- package/dist/pals/communication.d.ts +47 -0
- package/dist/pals/communication.d.ts.map +1 -0
- package/dist/pals/conversations.d.ts +26 -0
- package/dist/pals/conversations.d.ts.map +1 -0
- package/dist/pals/desktop-communication.d.ts +111 -0
- package/dist/pals/desktop-communication.d.ts.map +1 -0
- package/dist/pals/dispatch.d.ts +13 -0
- package/dist/pals/dispatch.d.ts.map +1 -0
- package/dist/pals/environment.d.ts +103 -0
- package/dist/pals/environment.d.ts.map +1 -0
- package/dist/pals/guest-mcp-transport.d.ts +28 -0
- package/dist/pals/guest-mcp-transport.d.ts.map +1 -0
- package/dist/pals/guest-mcp.d.ts +22 -0
- package/dist/pals/guest-mcp.d.ts.map +1 -0
- package/dist/pals/inbox-start.d.ts +35 -0
- package/dist/pals/inbox-start.d.ts.map +1 -0
- package/dist/pals/message-command.d.ts +3 -0
- package/dist/pals/message-command.d.ts.map +1 -0
- package/dist/pals/operator-tools.d.ts +23 -0
- package/dist/pals/operator-tools.d.ts.map +1 -0
- package/dist/pals/public-transcript.d.ts +4 -0
- package/dist/pals/public-transcript.d.ts.map +1 -0
- package/dist/pals/review.d.ts +16 -0
- package/dist/pals/review.d.ts.map +1 -0
- package/dist/pals/store.d.ts +16 -0
- package/dist/pals/store.d.ts.map +1 -0
- package/dist/pals/tui-session.d.ts +11 -0
- package/dist/pals/tui-session.d.ts.map +1 -0
- package/dist/permissions/mode-names.d.ts +2 -0
- package/dist/permissions/mode-names.d.ts.map +1 -0
- package/dist/resume-invocation.d.ts +1 -1
- package/dist/resume-invocation.d.ts.map +1 -1
- package/dist/resume-shell.d.ts +8 -0
- package/dist/resume-shell.d.ts.map +1 -0
- package/dist/schedule/build.d.ts +12 -3
- package/dist/schedule/build.d.ts.map +1 -1
- package/dist/schedule/commands/add.d.ts +1 -1
- package/dist/schedule/commands/add.d.ts.map +1 -1
- package/dist/schedule/commands/lifecycle.d.ts.map +1 -1
- package/dist/schedule/commands/list.d.ts +3 -1
- package/dist/schedule/commands/list.d.ts.map +1 -1
- package/dist/schedule/daemon/daemon.d.ts +2 -0
- package/dist/schedule/daemon/daemon.d.ts.map +1 -1
- package/dist/schedule/delivery.d.ts +66 -0
- package/dist/schedule/delivery.d.ts.map +1 -0
- package/dist/schedule/fire/fire.d.ts +1 -1
- package/dist/schedule/fire/fire.d.ts.map +1 -1
- package/dist/schedule/fire/run-script.d.ts +2 -2
- package/dist/schedule/fire/run-script.d.ts.map +1 -1
- package/dist/schedule/fire/script-report.d.ts +31 -0
- package/dist/schedule/fire/script-report.d.ts.map +1 -0
- package/dist/schedule/floor.d.ts +1 -1
- package/dist/schedule/floor.d.ts.map +1 -1
- package/dist/schedule/folder.d.ts +6 -0
- package/dist/schedule/folder.d.ts.map +1 -1
- package/dist/schedule/resume-command.d.ts +3 -3
- package/dist/schedule/resume-command.d.ts.map +1 -1
- package/dist/schedule/store/history.d.ts.map +1 -1
- package/dist/schedule/store/jobs.d.ts +6 -6
- package/dist/schedule/store/jobs.d.ts.map +1 -1
- package/dist/schedule/store/script-state.d.ts +31 -0
- package/dist/schedule/store/script-state.d.ts.map +1 -0
- package/dist/schedule/store/state.d.ts +4 -2
- package/dist/schedule/store/state.d.ts.map +1 -1
- package/dist/schedule/types.d.ts +61 -16
- package/dist/schedule/types.d.ts.map +1 -1
- package/dist/skills/store.d.ts.map +1 -1
- package/dist/terminal/host.d.ts +22 -0
- package/dist/terminal/host.d.ts.map +1 -0
- package/dist/terminal/manager.d.ts +124 -0
- package/dist/terminal/manager.d.ts.map +1 -0
- package/dist/terminal/protocol.d.ts +162 -0
- package/dist/terminal/protocol.d.ts.map +1 -0
- package/dist/terminal/pty.d.ts +85 -0
- package/dist/terminal/pty.d.ts.map +1 -0
- package/dist/terminal/ring.d.ts +23 -0
- package/dist/terminal/ring.d.ts.map +1 -0
- package/dist/terminal/screen.d.ts +31 -0
- package/dist/terminal/screen.d.ts.map +1 -0
- package/dist/termination-state.d.ts +19 -0
- package/dist/termination-state.d.ts.map +1 -0
- package/dist/termination.d.ts +2 -9
- package/dist/termination.d.ts.map +1 -1
- package/dist/tui/AgentExplorer.d.ts +4 -1
- package/dist/tui/AgentExplorer.d.ts.map +1 -1
- package/dist/tui/App.d.ts.map +1 -1
- package/dist/tui/BackgroundJobsPanel.d.ts +26 -0
- package/dist/tui/BackgroundJobsPanel.d.ts.map +1 -0
- package/dist/tui/BrandHeader.d.ts.map +1 -1
- package/dist/tui/ChildComposer.d.ts +22 -0
- package/dist/tui/ChildComposer.d.ts.map +1 -0
- package/dist/tui/ChoicePicker.d.ts.map +1 -1
- package/dist/tui/Composer.d.ts +25 -4
- package/dist/tui/Composer.d.ts.map +1 -1
- package/dist/tui/ComposerFrame.d.ts.map +1 -1
- package/dist/tui/CopyPicker.d.ts.map +1 -1
- package/dist/tui/EditPromptPicker.d.ts.map +1 -1
- package/dist/tui/EffortSlider.d.ts.map +1 -1
- package/dist/tui/LiveActivity.d.ts +7 -1
- package/dist/tui/LiveActivity.d.ts.map +1 -1
- package/dist/tui/Markdown.d.ts.map +1 -1
- package/dist/tui/PendingInputPanel.d.ts +34 -0
- package/dist/tui/PendingInputPanel.d.ts.map +1 -0
- package/dist/tui/PermissionOverlay.d.ts.map +1 -1
- package/dist/tui/Picker.d.ts.map +1 -1
- package/dist/tui/ProviderSetup.d.ts.map +1 -1
- package/dist/tui/ResumePicker.d.ts.map +1 -1
- package/dist/tui/SaveSkillOverlay.d.ts.map +1 -1
- package/dist/tui/ScheduleReviewOverlay.d.ts +1 -1
- package/dist/tui/ScheduleReviewOverlay.d.ts.map +1 -1
- package/dist/tui/StatusBar.d.ts +7 -1
- package/dist/tui/StatusBar.d.ts.map +1 -1
- package/dist/tui/StatusPanel.d.ts.map +1 -1
- package/dist/tui/TextPrompt.d.ts.map +1 -1
- package/dist/tui/ToolOutputViewer.d.ts.map +1 -1
- package/dist/tui/Transcript.d.ts.map +1 -1
- package/dist/tui/TrustPrompt.d.ts +8 -0
- package/dist/tui/TrustPrompt.d.ts.map +1 -1
- package/dist/tui/agent.d.ts +135 -6
- package/dist/tui/agent.d.ts.map +1 -1
- package/dist/tui/browser-notices.d.ts.map +1 -1
- package/dist/tui/capability-notice.d.ts +38 -0
- package/dist/tui/capability-notice.d.ts.map +1 -0
- package/dist/tui/console-input.d.ts +31 -0
- package/dist/tui/console-input.d.ts.map +1 -0
- package/dist/tui/conversation-evidence-view.d.ts.map +1 -1
- package/dist/tui/credential-entry.d.ts.map +1 -1
- package/dist/tui/exit-summary.d.ts +9 -1
- package/dist/tui/exit-summary.d.ts.map +1 -1
- package/dist/tui/external-editor.d.ts.map +1 -1
- package/dist/tui/index.d.ts.map +1 -1
- package/dist/tui/key-hints.d.ts +51 -0
- package/dist/tui/key-hints.d.ts.map +1 -0
- package/dist/tui/launch-settings.d.ts +34 -0
- package/dist/tui/launch-settings.d.ts.map +1 -0
- package/dist/tui/log-pane.d.ts.map +1 -1
- package/dist/tui/model-choices.d.ts +39 -1
- package/dist/tui/model-choices.d.ts.map +1 -1
- package/dist/tui/model-search.d.ts +4 -1
- package/dist/tui/model-search.d.ts.map +1 -1
- package/dist/tui/output-size-watch.d.ts +32 -0
- package/dist/tui/output-size-watch.d.ts.map +1 -0
- package/dist/tui/permission-review.d.ts.map +1 -1
- package/dist/tui/person-terms.d.ts +58 -0
- package/dist/tui/person-terms.d.ts.map +1 -0
- package/dist/tui/plain-failure.d.ts +27 -0
- package/dist/tui/plain-failure.d.ts.map +1 -0
- package/dist/tui/plain-interruption.d.ts +46 -0
- package/dist/tui/plain-interruption.d.ts.map +1 -0
- package/dist/tui/provider-list.d.ts.map +1 -1
- package/dist/tui/render-mode.d.ts +19 -0
- package/dist/tui/render-mode.d.ts.map +1 -0
- package/dist/tui/schedule/host-commands.d.ts +2 -9
- package/dist/tui/schedule/host-commands.d.ts.map +1 -1
- package/dist/tui/schedule/integration.d.ts +8 -0
- package/dist/tui/schedule/integration.d.ts.map +1 -1
- package/dist/tui/schedule/source-deliveries.d.ts +37 -0
- package/dist/tui/schedule/source-deliveries.d.ts.map +1 -0
- package/dist/tui/schedule/startup.d.ts.map +1 -1
- package/dist/tui/schedule/tool-host.d.ts +3 -1
- package/dist/tui/schedule/tool-host.d.ts.map +1 -1
- package/dist/tui/setup-text.d.ts +14 -0
- package/dist/tui/setup-text.d.ts.map +1 -0
- package/dist/tui/shell-escape.d.ts.map +1 -1
- package/dist/tui/skills/suggest-setting.d.ts.map +1 -1
- package/dist/tui/slashCommands.d.ts +9 -2
- package/dist/tui/slashCommands.d.ts.map +1 -1
- package/dist/tui/terminal-choice-text.d.ts +7 -0
- package/dist/tui/terminal-choice-text.d.ts.map +1 -1
- package/dist/tui/tidy-tool-output.d.ts +83 -0
- package/dist/tui/tidy-tool-output.d.ts.map +1 -0
- package/dist/tui/tool-presentation.d.ts +6 -0
- package/dist/tui/tool-presentation.d.ts.map +1 -0
- package/dist/tui/triggers/copy.d.ts.map +1 -1
- package/dist/tui/triggers/setting.d.ts.map +1 -1
- package/dist/tui/turn-interruption.d.ts +1 -1
- package/dist/tui/turn-interruption.d.ts.map +1 -1
- package/dist/tui/turn-limits-settings.d.ts +4 -4
- package/dist/tui/turn-limits-settings.d.ts.map +1 -1
- package/dist/tui/types.d.ts +10 -0
- package/dist/tui/types.d.ts.map +1 -1
- package/dist/tui/web-activity.d.ts +3 -2
- package/dist/tui/web-activity.d.ts.map +1 -1
- package/dist/tui/zen-free-refusal.d.ts +17 -0
- package/dist/tui/zen-free-refusal.d.ts.map +1 -0
- package/dist/usage-error.d.ts +15 -0
- package/dist/usage-error.d.ts.map +1 -0
- package/dist/warning-filter.d.ts +30 -0
- package/dist/warning-filter.d.ts.map +1 -0
- package/package.json +22 -11
- package/skills/schedule-task/SKILL.md +74 -20
- package/dist/browser/commands.js +0 -365
- package/dist/browser/commands.js.map +0 -1
- package/dist/browser/control.js +0 -140
- package/dist/browser/control.js.map +0 -1
- package/dist/browser/describe.js +0 -27
- package/dist/browser/describe.js.map +0 -1
- package/dist/checkpoints/store.js +0 -192
- package/dist/checkpoints/store.js.map +0 -1
- package/dist/checkpoints/wrap.js +0 -37
- package/dist/checkpoints/wrap.js.map +0 -1
- package/dist/cli.js +0 -602
- package/dist/cli.js.map +0 -1
- package/dist/commands/acp.js +0 -388
- package/dist/commands/acp.js.map +0 -1
- package/dist/commands/archive.js +0 -65
- package/dist/commands/archive.js.map +0 -1
- package/dist/commands/browser.js +0 -16
- package/dist/commands/browser.js.map +0 -1
- package/dist/commands/doctor.js +0 -267
- package/dist/commands/doctor.js.map +0 -1
- package/dist/commands/drain.js +0 -498
- package/dist/commands/drain.js.map +0 -1
- package/dist/commands/eval.js +0 -237
- package/dist/commands/eval.js.map +0 -1
- package/dist/commands/exec-flags.js +0 -334
- package/dist/commands/exec-flags.js.map +0 -1
- package/dist/commands/exec-json.js +0 -497
- package/dist/commands/exec-json.js.map +0 -1
- package/dist/commands/exec.js +0 -688
- package/dist/commands/exec.js.map +0 -1
- package/dist/commands/host-queries.js +0 -156
- package/dist/commands/host-queries.js.map +0 -1
- package/dist/commands/login.js +0 -315
- package/dist/commands/login.js.map +0 -1
- package/dist/commands/mcp-oauth-login.js +0 -213
- package/dist/commands/mcp-oauth-login.js.map +0 -1
- package/dist/commands/mcp.js +0 -288
- package/dist/commands/mcp.js.map +0 -1
- package/dist/commands/prior-messages.js +0 -329
- package/dist/commands/prior-messages.js.map +0 -1
- package/dist/commands/provider-wait.js +0 -65
- package/dist/commands/provider-wait.js.map +0 -1
- package/dist/commands/registry.js +0 -40
- package/dist/commands/registry.js.map +0 -1
- package/dist/commands/resident-flags.js +0 -193
- package/dist/commands/resident-flags.js.map +0 -1
- package/dist/commands/resident-learning.js +0 -293
- package/dist/commands/resident-learning.js.map +0 -1
- package/dist/commands/resident.js +0 -419
- package/dist/commands/resident.js.map +0 -1
- package/dist/commands/resume.js +0 -109
- package/dist/commands/resume.js.map +0 -1
- package/dist/commands/schedule.js +0 -131
- package/dist/commands/schedule.js.map +0 -1
- package/dist/commands/serve.js +0 -21
- package/dist/commands/serve.js.map +0 -1
- package/dist/commands/skills.js +0 -178
- package/dist/commands/skills.js.map +0 -1
- package/dist/commands/state.js +0 -110
- package/dist/commands/state.js.map +0 -1
- package/dist/commands/stdin.js +0 -69
- package/dist/commands/stdin.js.map +0 -1
- package/dist/commands/types.js +0 -2
- package/dist/commands/types.js.map +0 -1
- package/dist/commands/upgrade-progress.js +0 -54
- package/dist/commands/upgrade-progress.js.map +0 -1
- package/dist/commands/upgrade.js +0 -232
- package/dist/commands/upgrade.js.map +0 -1
- package/dist/commands/worktree.js +0 -86
- package/dist/commands/worktree.js.map +0 -1
- package/dist/config/composer-triggers.js +0 -80
- package/dist/config/composer-triggers.js.map +0 -1
- package/dist/config/debug.js +0 -126
- package/dist/config/debug.js.map +0 -1
- package/dist/config/load.js +0 -1208
- package/dist/config/load.js.map +0 -1
- package/dist/config/schema.js +0 -13
- package/dist/config/schema.js.map +0 -1
- package/dist/config/tool-result-screens.js +0 -104
- package/dist/config/tool-result-screens.js.map +0 -1
- package/dist/config/trusted-project-context.js +0 -28
- package/dist/config/trusted-project-context.js.map +0 -1
- package/dist/config/turn-guards.js +0 -46
- package/dist/config/turn-guards.js.map +0 -1
- package/dist/config/user-config.js +0 -118
- package/dist/config/user-config.js.map +0 -1
- package/dist/context/capabilities.js +0 -164
- package/dist/context/capabilities.js.map +0 -1
- package/dist/context/directories.js +0 -69
- package/dist/context/directories.js.map +0 -1
- package/dist/context/doctrine.js +0 -24
- package/dist/context/doctrine.js.map +0 -1
- package/dist/context/environment.js +0 -255
- package/dist/context/environment.js.map +0 -1
- package/dist/context/project-path.js +0 -16
- package/dist/context/project-path.js.map +0 -1
- package/dist/context/project-tracker.js +0 -217
- package/dist/context/project-tracker.js.map +0 -1
- package/dist/context/project.js +0 -256
- package/dist/context/project.js.map +0 -1
- package/dist/context/runtime-message.js +0 -30
- package/dist/context/runtime-message.js.map +0 -1
- package/dist/context/sandbox.js +0 -114
- package/dist/context/sandbox.js.map +0 -1
- package/dist/context/turn-snapshot.js +0 -122
- package/dist/context/turn-snapshot.js.map +0 -1
- package/dist/doctor/checks/browser.js +0 -63
- package/dist/doctor/checks/browser.js.map +0 -1
- package/dist/doctor/checks/chain.js +0 -211
- package/dist/doctor/checks/chain.js.map +0 -1
- package/dist/doctor/checks/credentials.js +0 -98
- package/dist/doctor/checks/credentials.js.map +0 -1
- package/dist/doctor/checks/index.js +0 -72
- package/dist/doctor/checks/index.js.map +0 -1
- package/dist/doctor/checks/invariants.js +0 -79
- package/dist/doctor/checks/invariants.js.map +0 -1
- package/dist/doctor/checks/logging.js +0 -69
- package/dist/doctor/checks/logging.js.map +0 -1
- package/dist/doctor/checks/providers.js +0 -30
- package/dist/doctor/checks/providers.js.map +0 -1
- package/dist/doctor/checks/runtime.js +0 -40
- package/dist/doctor/checks/runtime.js.map +0 -1
- package/dist/doctor/checks/sandbox.js +0 -76
- package/dist/doctor/checks/sandbox.js.map +0 -1
- package/dist/doctor/checks/scheduler.js +0 -74
- package/dist/doctor/checks/scheduler.js.map +0 -1
- package/dist/doctor/checks/session-export.js +0 -62
- package/dist/doctor/checks/session-export.js.map +0 -1
- package/dist/doctor/checks/telemetry.js +0 -58
- package/dist/doctor/checks/telemetry.js.map +0 -1
- package/dist/doctor/checks/vault.js +0 -67
- package/dist/doctor/checks/vault.js.map +0 -1
- package/dist/doctor/index.js +0 -3
- package/dist/doctor/index.js.map +0 -1
- package/dist/doctor/registry.js +0 -230
- package/dist/doctor/registry.js.map +0 -1
- package/dist/exit-codes.js +0 -62
- package/dist/exit-codes.js.map +0 -1
- package/dist/installation.js +0 -48
- package/dist/installation.js.map +0 -1
- package/dist/integrations/clipboard/image.js +0 -119
- package/dist/integrations/clipboard/image.js.map +0 -1
- package/dist/integrations/clipboard/text.js +0 -43
- package/dist/integrations/clipboard/text.js.map +0 -1
- package/dist/integrations/files/attachment-store.js +0 -86
- package/dist/integrations/files/attachment-store.js.map +0 -1
- package/dist/integrations/mcp/oauth-store.js +0 -549
- package/dist/integrations/mcp/oauth-store.js.map +0 -1
- package/dist/integrations/mcp/servers.js +0 -519
- package/dist/integrations/mcp/servers.js.map +0 -1
- package/dist/integrations/mcp/user-config.js +0 -92
- package/dist/integrations/mcp/user-config.js.map +0 -1
- package/dist/integrations/notifications/desktop/freedesktop.js +0 -33
- package/dist/integrations/notifications/desktop/freedesktop.js.map +0 -1
- package/dist/integrations/notifications/desktop/macos.js +0 -17
- package/dist/integrations/notifications/desktop/macos.js.map +0 -1
- package/dist/integrations/notifications/desktop/sanitize.js +0 -49
- package/dist/integrations/notifications/desktop/sanitize.js.map +0 -1
- package/dist/integrations/notifications/desktop/throttle.js +0 -39
- package/dist/integrations/notifications/desktop/throttle.js.map +0 -1
- package/dist/integrations/notifications/desktop/windows-toast.js +0 -56
- package/dist/integrations/notifications/desktop/windows-toast.js.map +0 -1
- package/dist/integrations/notifications/desktop.js +0 -199
- package/dist/integrations/notifications/desktop.js.map +0 -1
- package/dist/integrations/notifications/terminal.js +0 -46
- package/dist/integrations/notifications/terminal.js.map +0 -1
- package/dist/integrations/npm-invocation.js +0 -23
- package/dist/integrations/npm-invocation.js.map +0 -1
- package/dist/integrations/plugins/runtime.js +0 -189
- package/dist/integrations/plugins/runtime.js.map +0 -1
- package/dist/integrations/plugins/settings.js +0 -106
- package/dist/integrations/plugins/settings.js.map +0 -1
- package/dist/integrations/providers/access.js +0 -23
- package/dist/integrations/providers/access.js.map +0 -1
- package/dist/integrations/providers/chain-capabilities.js +0 -211
- package/dist/integrations/providers/chain-capabilities.js.map +0 -1
- package/dist/integrations/providers/codex-device-login.js +0 -195
- package/dist/integrations/providers/codex-device-login.js.map +0 -1
- package/dist/integrations/providers/codex-oauth.js +0 -95
- package/dist/integrations/providers/codex-oauth.js.map +0 -1
- package/dist/integrations/providers/credential-provider.js +0 -74
- package/dist/integrations/providers/credential-provider.js.map +0 -1
- package/dist/integrations/providers/credential-store.js +0 -657
- package/dist/integrations/providers/credential-store.js.map +0 -1
- package/dist/integrations/providers/current-credential.js +0 -45
- package/dist/integrations/providers/current-credential.js.map +0 -1
- package/dist/integrations/providers/discover.js +0 -313
- package/dist/integrations/providers/discover.js.map +0 -1
- package/dist/integrations/providers/gemini-credentials.js +0 -148
- package/dist/integrations/providers/gemini-credentials.js.map +0 -1
- package/dist/integrations/providers/harness-credentials.js +0 -344
- package/dist/integrations/providers/harness-credentials.js.map +0 -1
- package/dist/integrations/providers/identity.js +0 -64
- package/dist/integrations/providers/identity.js.map +0 -1
- package/dist/integrations/providers/index.js +0 -14
- package/dist/integrations/providers/index.js.map +0 -1
- package/dist/integrations/providers/keychain.js +0 -78
- package/dist/integrations/providers/keychain.js.map +0 -1
- package/dist/integrations/providers/model-reasoning.js +0 -51
- package/dist/integrations/providers/model-reasoning.js.map +0 -1
- package/dist/integrations/providers/oauth.js +0 -302
- package/dist/integrations/providers/oauth.js.map +0 -1
- package/dist/integrations/providers/preferences.js +0 -287
- package/dist/integrations/providers/preferences.js.map +0 -1
- package/dist/integrations/providers/register.js +0 -154
- package/dist/integrations/providers/register.js.map +0 -1
- package/dist/integrations/providers/registry.js +0 -289
- package/dist/integrations/providers/registry.js.map +0 -1
- package/dist/integrations/providers/setup.js +0 -158
- package/dist/integrations/providers/setup.js.map +0 -1
- package/dist/integrations/providers/subscription-login.js +0 -328
- package/dist/integrations/providers/subscription-login.js.map +0 -1
- package/dist/integrations/providers/zen-catalogue.js +0 -196
- package/dist/integrations/providers/zen-catalogue.js.map +0 -1
- package/dist/integrations/resident/foreground.js +0 -95
- package/dist/integrations/resident/foreground.js.map +0 -1
- package/dist/integrations/resident/inspection.js +0 -282
- package/dist/integrations/resident/inspection.js.map +0 -1
- package/dist/integrations/resident/learning-sources.js +0 -79
- package/dist/integrations/resident/learning-sources.js.map +0 -1
- package/dist/integrations/resident/learning-storage.js +0 -55
- package/dist/integrations/resident/learning-storage.js.map +0 -1
- package/dist/integrations/resident/lifecycle-errors.js +0 -15
- package/dist/integrations/resident/lifecycle-errors.js.map +0 -1
- package/dist/integrations/resident/owned-runner.js +0 -91
- package/dist/integrations/resident/owned-runner.js.map +0 -1
- package/dist/integrations/resident/runner-control.js +0 -238
- package/dist/integrations/resident/runner-control.js.map +0 -1
- package/dist/integrations/resident/runner-launch.js +0 -142
- package/dist/integrations/resident/runner-launch.js.map +0 -1
- package/dist/integrations/resident/runner-store.js +0 -284
- package/dist/integrations/resident/runner-store.js.map +0 -1
- package/dist/integrations/resident/session-log-reads.js +0 -125
- package/dist/integrations/resident/session-log-reads.js.map +0 -1
- package/dist/integrations/resident/session-step.js +0 -471
- package/dist/integrations/resident/session-step.js.map +0 -1
- package/dist/integrations/resident/storage.js +0 -183
- package/dist/integrations/resident/storage.js.map +0 -1
- package/dist/integrations/resident/tool-evidence.js +0 -123
- package/dist/integrations/resident/tool-evidence.js.map +0 -1
- package/dist/integrations/resident/verification.js +0 -109
- package/dist/integrations/resident/verification.js.map +0 -1
- package/dist/integrations/sessions/checkpoint-view.js +0 -48
- package/dist/integrations/sessions/checkpoint-view.js.map +0 -1
- package/dist/integrations/sessions/context-inventory.js +0 -44
- package/dist/integrations/sessions/context-inventory.js.map +0 -1
- package/dist/integrations/sessions/conversation-search.js +0 -572
- package/dist/integrations/sessions/conversation-search.js.map +0 -1
- package/dist/integrations/sessions/display-title.js +0 -5
- package/dist/integrations/sessions/display-title.js.map +0 -1
- package/dist/integrations/sessions/evidence-page-validation.js +0 -74
- package/dist/integrations/sessions/evidence-page-validation.js.map +0 -1
- package/dist/integrations/sessions/evidence-recall.js +0 -117
- package/dist/integrations/sessions/evidence-recall.js.map +0 -1
- package/dist/integrations/sessions/store.js +0 -780
- package/dist/integrations/sessions/store.js.map +0 -1
- package/dist/integrations/sessions/task-context.js +0 -96
- package/dist/integrations/sessions/task-context.js.map +0 -1
- package/dist/integrations/sessions/transcript-export.js +0 -342
- package/dist/integrations/sessions/transcript-export.js.map +0 -1
- package/dist/integrations/state/home.js +0 -17
- package/dist/integrations/state/home.js.map +0 -1
- package/dist/integrations/state/identity.js +0 -49
- package/dist/integrations/state/identity.js.map +0 -1
- package/dist/integrations/state/immutable-json.js +0 -38
- package/dist/integrations/state/immutable-json.js.map +0 -1
- package/dist/integrations/state/private-directory.js +0 -43
- package/dist/integrations/state/private-directory.js.map +0 -1
- package/dist/integrations/state/project.js +0 -13
- package/dist/integrations/state/project.js.map +0 -1
- package/dist/integrations/state/report.js +0 -626
- package/dist/integrations/state/report.js.map +0 -1
- package/dist/integrations/state/retention.js +0 -18
- package/dist/integrations/state/retention.js.map +0 -1
- package/dist/integrations/subagents/NamzuCliAgent.js +0 -9
- package/dist/integrations/subagents/NamzuCliAgent.js.map +0 -1
- package/dist/integrations/subagents/activity.js +0 -759
- package/dist/integrations/subagents/activity.js.map +0 -1
- package/dist/integrations/subagents/batches.js +0 -172
- package/dist/integrations/subagents/batches.js.map +0 -1
- package/dist/integrations/subagents/definitions.js +0 -26
- package/dist/integrations/subagents/definitions.js.map +0 -1
- package/dist/integrations/subagents/model-effort.js +0 -12
- package/dist/integrations/subagents/model-effort.js.map +0 -1
- package/dist/integrations/subagents/parent.js +0 -47
- package/dist/integrations/subagents/parent.js.map +0 -1
- package/dist/integrations/subagents/policy.js +0 -3
- package/dist/integrations/subagents/policy.js.map +0 -1
- package/dist/integrations/subagents/replay.js +0 -295
- package/dist/integrations/subagents/replay.js.map +0 -1
- package/dist/integrations/subagents/runtime.js +0 -1317
- package/dist/integrations/subagents/runtime.js.map +0 -1
- package/dist/integrations/subagents/saved-agents.js +0 -102
- package/dist/integrations/subagents/saved-agents.js.map +0 -1
- package/dist/integrations/subagents/slash.js +0 -45
- package/dist/integrations/subagents/slash.js.map +0 -1
- package/dist/integrations/subagents/worktree-driver.js +0 -72
- package/dist/integrations/subagents/worktree-driver.js.map +0 -1
- package/dist/integrations/telemetry/session-export.js +0 -119
- package/dist/integrations/telemetry/session-export.js.map +0 -1
- package/dist/integrations/trust/store.js +0 -73
- package/dist/integrations/trust/store.js.map +0 -1
- package/dist/integrations/updates.js +0 -115
- package/dist/integrations/updates.js.map +0 -1
- package/dist/integrations/web/exa-search.js +0 -154
- package/dist/integrations/web/exa-search.js.map +0 -1
- package/dist/integrations/web/open-url.js +0 -73
- package/dist/integrations/web/open-url.js.map +0 -1
- package/dist/integrations/web/search.js +0 -68
- package/dist/integrations/web/search.js.map +0 -1
- package/dist/integrations/worktrees/managed.js +0 -231
- package/dist/integrations/worktrees/managed.js.map +0 -1
- package/dist/logging.js +0 -115
- package/dist/logging.js.map +0 -1
- package/dist/memory/io.js +0 -177
- package/dist/memory/io.js.map +0 -1
- package/dist/memory/presentation.js +0 -76
- package/dist/memory/presentation.js.map +0 -1
- package/dist/memory/store.js +0 -180
- package/dist/memory/store.js.map +0 -1
- package/dist/memory/typed.js +0 -336
- package/dist/memory/typed.js.map +0 -1
- package/dist/output/formatter.js +0 -16
- package/dist/output/formatter.js.map +0 -1
- package/dist/output/index.js +0 -22
- package/dist/output/index.js.map +0 -1
- package/dist/output/json.js +0 -51
- package/dist/output/json.js.map +0 -1
- package/dist/output/text.js +0 -50
- package/dist/output/text.js.map +0 -1
- package/dist/output/yaml.js +0 -26
- package/dist/output/yaml.js.map +0 -1
- package/dist/output-schema.js +0 -18
- package/dist/output-schema.js.map +0 -1
- package/dist/permissions/browser-sites.js +0 -270
- package/dist/permissions/browser-sites.js.map +0 -1
- package/dist/permissions/canonical-project.js +0 -13
- package/dist/permissions/canonical-project.js.map +0 -1
- package/dist/permissions/checks.js +0 -128
- package/dist/permissions/checks.js.map +0 -1
- package/dist/permissions/headless-trust.js +0 -86
- package/dist/permissions/headless-trust.js.map +0 -1
- package/dist/permissions/live-mode.js +0 -62
- package/dist/permissions/live-mode.js.map +0 -1
- package/dist/permissions/mode.js +0 -65
- package/dist/permissions/mode.js.map +0 -1
- package/dist/permissions/rules.js +0 -358
- package/dist/permissions/rules.js.map +0 -1
- package/dist/release-notes.js +0 -64
- package/dist/release-notes.js.map +0 -1
- package/dist/resume-invocation.js +0 -24
- package/dist/resume-invocation.js.map +0 -1
- package/dist/schedule/build.js +0 -374
- package/dist/schedule/build.js.map +0 -1
- package/dist/schedule/changes.js +0 -78
- package/dist/schedule/changes.js.map +0 -1
- package/dist/schedule/commands/add.js +0 -603
- package/dist/schedule/commands/add.js.map +0 -1
- package/dist/schedule/commands/args.js +0 -80
- package/dist/schedule/commands/args.js.map +0 -1
- package/dist/schedule/commands/confirm-prompt.js +0 -21
- package/dist/schedule/commands/confirm-prompt.js.map +0 -1
- package/dist/schedule/commands/lifecycle.js +0 -586
- package/dist/schedule/commands/lifecycle.js.map +0 -1
- package/dist/schedule/commands/list.js +0 -260
- package/dist/schedule/commands/list.js.map +0 -1
- package/dist/schedule/commands/logs.js +0 -106
- package/dist/schedule/commands/logs.js.map +0 -1
- package/dist/schedule/commands/service.js +0 -458
- package/dist/schedule/commands/service.js.map +0 -1
- package/dist/schedule/daemon/daemon.js +0 -1265
- package/dist/schedule/daemon/daemon.js.map +0 -1
- package/dist/schedule/daemon/endpoint.js +0 -158
- package/dist/schedule/daemon/endpoint.js.map +0 -1
- package/dist/schedule/daemon/exit.js +0 -8
- package/dist/schedule/daemon/exit.js.map +0 -1
- package/dist/schedule/daemon/log.js +0 -53
- package/dist/schedule/daemon/log.js.map +0 -1
- package/dist/schedule/daemon/notify.js +0 -158
- package/dist/schedule/daemon/notify.js.map +0 -1
- package/dist/schedule/daemon/retention.js +0 -46
- package/dist/schedule/daemon/retention.js.map +0 -1
- package/dist/schedule/daemon/sessions.js +0 -52
- package/dist/schedule/daemon/sessions.js.map +0 -1
- package/dist/schedule/env.js +0 -106
- package/dist/schedule/env.js.map +0 -1
- package/dist/schedule/fire/browser-preflight.js +0 -73
- package/dist/schedule/fire/browser-preflight.js.map +0 -1
- package/dist/schedule/fire/calls.js +0 -114
- package/dist/schedule/fire/calls.js.map +0 -1
- package/dist/schedule/fire/fire.js +0 -681
- package/dist/schedule/fire/fire.js.map +0 -1
- package/dist/schedule/fire/result.js +0 -19
- package/dist/schedule/fire/result.js.map +0 -1
- package/dist/schedule/fire/run-script.js +0 -81
- package/dist/schedule/fire/run-script.js.map +0 -1
- package/dist/schedule/fire/unattended-note.js +0 -51
- package/dist/schedule/fire/unattended-note.js.map +0 -1
- package/dist/schedule/fire/wake-gate.js +0 -90
- package/dist/schedule/fire/wake-gate.js.map +0 -1
- package/dist/schedule/floor.js +0 -1561
- package/dist/schedule/floor.js.map +0 -1
- package/dist/schedule/folder.js +0 -84
- package/dist/schedule/folder.js.map +0 -1
- package/dist/schedule/paths.js +0 -53
- package/dist/schedule/paths.js.map +0 -1
- package/dist/schedule/policy.js +0 -414
- package/dist/schedule/policy.js.map +0 -1
- package/dist/schedule/resume-command.js +0 -72
- package/dist/schedule/resume-command.js.map +0 -1
- package/dist/schedule/script-check.js +0 -146
- package/dist/schedule/script-check.js.map +0 -1
- package/dist/schedule/script-shell.js +0 -5
- package/dist/schedule/script-shell.js.map +0 -1
- package/dist/schedule/service/detect.js +0 -29
- package/dist/schedule/service/detect.js.map +0 -1
- package/dist/schedule/service/index.js +0 -361
- package/dist/schedule/service/index.js.map +0 -1
- package/dist/schedule/service/launchd.js +0 -84
- package/dist/schedule/service/launchd.js.map +0 -1
- package/dist/schedule/service/manifest.js +0 -16
- package/dist/schedule/service/manifest.js.map +0 -1
- package/dist/schedule/service/names.js +0 -22
- package/dist/schedule/service/names.js.map +0 -1
- package/dist/schedule/service/quote.js +0 -64
- package/dist/schedule/service/quote.js.map +0 -1
- package/dist/schedule/service/runner.js +0 -31
- package/dist/schedule/service/runner.js.map +0 -1
- package/dist/schedule/service/systemd.js +0 -96
- package/dist/schedule/service/systemd.js.map +0 -1
- package/dist/schedule/service/windows-task.js +0 -199
- package/dist/schedule/service/windows-task.js.map +0 -1
- package/dist/schedule/service/wsl.js +0 -121
- package/dist/schedule/service/wsl.js.map +0 -1
- package/dist/schedule/store/atomic.js +0 -138
- package/dist/schedule/store/atomic.js.map +0 -1
- package/dist/schedule/store/claims.js +0 -57
- package/dist/schedule/store/claims.js.map +0 -1
- package/dist/schedule/store/digest.js +0 -139
- package/dist/schedule/store/digest.js.map +0 -1
- package/dist/schedule/store/history.js +0 -117
- package/dist/schedule/store/history.js.map +0 -1
- package/dist/schedule/store/jobs.js +0 -277
- package/dist/schedule/store/jobs.js.map +0 -1
- package/dist/schedule/store/state.js +0 -38
- package/dist/schedule/store/state.js.map +0 -1
- package/dist/schedule/types.js +0 -33
- package/dist/schedule/types.js.map +0 -1
- package/dist/schedule/visible-source.js +0 -59
- package/dist/schedule/visible-source.js.map +0 -1
- package/dist/skills/audit.js +0 -75
- package/dist/skills/audit.js.map +0 -1
- package/dist/skills/catalog.js +0 -226
- package/dist/skills/catalog.js.map +0 -1
- package/dist/skills/directory.js +0 -51
- package/dist/skills/directory.js.map +0 -1
- package/dist/skills/save.js +0 -344
- package/dist/skills/save.js.map +0 -1
- package/dist/skills/store.js +0 -351
- package/dist/skills/store.js.map +0 -1
- package/dist/termination.js +0 -143
- package/dist/termination.js.map +0 -1
- package/dist/test-support/toolset.js +0 -27
- package/dist/test-support/toolset.js.map +0 -1
- package/dist/tui/AgentExplorer.js +0 -789
- package/dist/tui/AgentExplorer.js.map +0 -1
- package/dist/tui/App.js +0 -8209
- package/dist/tui/App.js.map +0 -1
- package/dist/tui/BrandHeader.js +0 -14
- package/dist/tui/BrandHeader.js.map +0 -1
- package/dist/tui/Checklist.js +0 -90
- package/dist/tui/Checklist.js.map +0 -1
- package/dist/tui/ChoicePicker.js +0 -64
- package/dist/tui/ChoicePicker.js.map +0 -1
- package/dist/tui/Composer.js +0 -908
- package/dist/tui/Composer.js.map +0 -1
- package/dist/tui/ComposerFrame.js +0 -79
- package/dist/tui/ComposerFrame.js.map +0 -1
- package/dist/tui/CopyPicker.js +0 -19
- package/dist/tui/CopyPicker.js.map +0 -1
- package/dist/tui/EditPromptPicker.js +0 -17
- package/dist/tui/EditPromptPicker.js.map +0 -1
- package/dist/tui/EffortSlider.js +0 -134
- package/dist/tui/EffortSlider.js.map +0 -1
- package/dist/tui/LiveActivity.js +0 -89
- package/dist/tui/LiveActivity.js.map +0 -1
- package/dist/tui/Markdown.js +0 -137
- package/dist/tui/Markdown.js.map +0 -1
- package/dist/tui/PermissionOverlay.js +0 -278
- package/dist/tui/PermissionOverlay.js.map +0 -1
- package/dist/tui/Picker.js +0 -1310
- package/dist/tui/Picker.js.map +0 -1
- package/dist/tui/ProviderSetup.js +0 -125
- package/dist/tui/ProviderSetup.js.map +0 -1
- package/dist/tui/ResumePicker.js +0 -34
- package/dist/tui/ResumePicker.js.map +0 -1
- package/dist/tui/SaveSkillOverlay.js +0 -118
- package/dist/tui/SaveSkillOverlay.js.map +0 -1
- package/dist/tui/ScheduleReviewOverlay.js +0 -166
- package/dist/tui/ScheduleReviewOverlay.js.map +0 -1
- package/dist/tui/StatusBar.js +0 -182
- package/dist/tui/StatusBar.js.map +0 -1
- package/dist/tui/StatusPanel.js +0 -11
- package/dist/tui/StatusPanel.js.map +0 -1
- package/dist/tui/TaskList.js +0 -43
- package/dist/tui/TaskList.js.map +0 -1
- package/dist/tui/TextPrompt.js +0 -185
- package/dist/tui/TextPrompt.js.map +0 -1
- package/dist/tui/ToolOutputViewer.js +0 -39
- package/dist/tui/ToolOutputViewer.js.map +0 -1
- package/dist/tui/Transcript.js +0 -235
- package/dist/tui/Transcript.js.map +0 -1
- package/dist/tui/TrustPrompt.js +0 -13
- package/dist/tui/TrustPrompt.js.map +0 -1
- package/dist/tui/ViewportBound.js +0 -55
- package/dist/tui/ViewportBound.js.map +0 -1
- package/dist/tui/agent-transcript-rows.js +0 -115
- package/dist/tui/agent-transcript-rows.js.map +0 -1
- package/dist/tui/agent.js +0 -4235
- package/dist/tui/agent.js.map +0 -1
- package/dist/tui/browser-notices.js +0 -107
- package/dist/tui/browser-notices.js.map +0 -1
- package/dist/tui/choice-selection.js +0 -38
- package/dist/tui/choice-selection.js.map +0 -1
- package/dist/tui/compact-transcript.js +0 -46
- package/dist/tui/compact-transcript.js.map +0 -1
- package/dist/tui/consent-timing.js +0 -48
- package/dist/tui/consent-timing.js.map +0 -1
- package/dist/tui/conversation-evidence-view.js +0 -96
- package/dist/tui/conversation-evidence-view.js.map +0 -1
- package/dist/tui/conversation-history.js +0 -33
- package/dist/tui/conversation-history.js.map +0 -1
- package/dist/tui/copy-targets.js +0 -189
- package/dist/tui/copy-targets.js.map +0 -1
- package/dist/tui/credential-entry.js +0 -134
- package/dist/tui/credential-entry.js.map +0 -1
- package/dist/tui/edit-prompts.js +0 -35
- package/dist/tui/edit-prompts.js.map +0 -1
- package/dist/tui/exit-summary.js +0 -30
- package/dist/tui/exit-summary.js.map +0 -1
- package/dist/tui/external-editor.js +0 -169
- package/dist/tui/external-editor.js.map +0 -1
- package/dist/tui/hypermode.js +0 -58
- package/dist/tui/hypermode.js.map +0 -1
- package/dist/tui/index.js +0 -81
- package/dist/tui/index.js.map +0 -1
- package/dist/tui/live-window.js +0 -281
- package/dist/tui/live-window.js.map +0 -1
- package/dist/tui/log-pane.js +0 -100
- package/dist/tui/log-pane.js.map +0 -1
- package/dist/tui/login-prompt.js +0 -105
- package/dist/tui/login-prompt.js.map +0 -1
- package/dist/tui/logo.js +0 -9
- package/dist/tui/logo.js.map +0 -1
- package/dist/tui/markdown-block-cache.js +0 -76
- package/dist/tui/markdown-block-cache.js.map +0 -1
- package/dist/tui/markdown-table.js +0 -175
- package/dist/tui/markdown-table.js.map +0 -1
- package/dist/tui/markdown-wrap.js +0 -189
- package/dist/tui/markdown-wrap.js.map +0 -1
- package/dist/tui/markdownParser.js +0 -237
- package/dist/tui/markdownParser.js.map +0 -1
- package/dist/tui/mentions.js +0 -150
- package/dist/tui/mentions.js.map +0 -1
- package/dist/tui/model-catalogue-view.js +0 -75
- package/dist/tui/model-catalogue-view.js.map +0 -1
- package/dist/tui/model-choices.js +0 -157
- package/dist/tui/model-choices.js.map +0 -1
- package/dist/tui/model-search.js +0 -28
- package/dist/tui/model-search.js.map +0 -1
- package/dist/tui/model-selection-intent.js +0 -96
- package/dist/tui/model-selection-intent.js.map +0 -1
- package/dist/tui/model-switch-tool.js +0 -74
- package/dist/tui/model-switch-tool.js.map +0 -1
- package/dist/tui/model-switch.js +0 -106
- package/dist/tui/model-switch.js.map +0 -1
- package/dist/tui/notices.js +0 -27
- package/dist/tui/notices.js.map +0 -1
- package/dist/tui/open-browser.js +0 -147
- package/dist/tui/open-browser.js.map +0 -1
- package/dist/tui/permission-review.js +0 -858
- package/dist/tui/permission-review.js.map +0 -1
- package/dist/tui/plugin-view.js +0 -59
- package/dist/tui/plugin-view.js.map +0 -1
- package/dist/tui/provider-list.js +0 -327
- package/dist/tui/provider-list.js.map +0 -1
- package/dist/tui/provider-selection.js +0 -16
- package/dist/tui/provider-selection.js.map +0 -1
- package/dist/tui/schedule/host-commands.js +0 -428
- package/dist/tui/schedule/host-commands.js.map +0 -1
- package/dist/tui/schedule/integration.js +0 -150
- package/dist/tui/schedule/integration.js.map +0 -1
- package/dist/tui/schedule/loop-host.js +0 -153
- package/dist/tui/schedule/loop-host.js.map +0 -1
- package/dist/tui/schedule/resume.js +0 -333
- package/dist/tui/schedule/resume.js.map +0 -1
- package/dist/tui/schedule/startup.js +0 -121
- package/dist/tui/schedule/startup.js.map +0 -1
- package/dist/tui/schedule/tool-host.js +0 -619
- package/dist/tui/schedule/tool-host.js.map +0 -1
- package/dist/tui/selection-window.js +0 -37
- package/dist/tui/selection-window.js.map +0 -1
- package/dist/tui/shell-escape.js +0 -110
- package/dist/tui/shell-escape.js.map +0 -1
- package/dist/tui/skills/learning.js +0 -131
- package/dist/tui/skills/learning.js.map +0 -1
- package/dist/tui/skills/suggest-setting.js +0 -55
- package/dist/tui/skills/suggest-setting.js.map +0 -1
- package/dist/tui/skills/suggestion-ledger.js +0 -52
- package/dist/tui/skills/suggestion-ledger.js.map +0 -1
- package/dist/tui/slashCommands.js +0 -1587
- package/dist/tui/slashCommands.js.map +0 -1
- package/dist/tui/status-card.js +0 -30
- package/dist/tui/status-card.js.map +0 -1
- package/dist/tui/status-panel-layout.js +0 -42
- package/dist/tui/status-panel-layout.js.map +0 -1
- package/dist/tui/stream-blocks.js +0 -187
- package/dist/tui/stream-blocks.js.map +0 -1
- package/dist/tui/task-activity.js +0 -157
- package/dist/tui/task-activity.js.map +0 -1
- package/dist/tui/terminal-choice-text.js +0 -118
- package/dist/tui/terminal-choice-text.js.map +0 -1
- package/dist/tui/terminal-display.js +0 -65
- package/dist/tui/terminal-display.js.map +0 -1
- package/dist/tui/terminal-hyperlinks.js +0 -70
- package/dist/tui/terminal-hyperlinks.js.map +0 -1
- package/dist/tui/theme.js +0 -34
- package/dist/tui/theme.js.map +0 -1
- package/dist/tui/triggers/analyze.js +0 -221
- package/dist/tui/triggers/analyze.js.map +0 -1
- package/dist/tui/triggers/context-text.js +0 -44
- package/dist/tui/triggers/context-text.js.map +0 -1
- package/dist/tui/triggers/copy.js +0 -163
- package/dist/tui/triggers/copy.js.map +0 -1
- package/dist/tui/triggers/detect.js +0 -295
- package/dist/tui/triggers/detect.js.map +0 -1
- package/dist/tui/triggers/fold.js +0 -44
- package/dist/tui/triggers/fold.js.map +0 -1
- package/dist/tui/triggers/pattern.js +0 -243
- package/dist/tui/triggers/pattern.js.map +0 -1
- package/dist/tui/triggers/provenance.js +0 -98
- package/dist/tui/triggers/provenance.js.map +0 -1
- package/dist/tui/triggers/registry.js +0 -164
- package/dist/tui/triggers/registry.js.map +0 -1
- package/dist/tui/triggers/setting.js +0 -61
- package/dist/tui/triggers/setting.js.map +0 -1
- package/dist/tui/triggers/verbs.js +0 -140
- package/dist/tui/triggers/verbs.js.map +0 -1
- package/dist/tui/turn-interruption.js +0 -160
- package/dist/tui/turn-interruption.js.map +0 -1
- package/dist/tui/turn-limits-settings.js +0 -88
- package/dist/tui/turn-limits-settings.js.map +0 -1
- package/dist/tui/types.js +0 -7
- package/dist/tui/types.js.map +0 -1
- package/dist/tui/units.js +0 -20
- package/dist/tui/units.js.map +0 -1
- package/dist/tui/use-selection-index.js +0 -13
- package/dist/tui/use-selection-index.js.map +0 -1
- package/dist/tui/web-activity.js +0 -105
- package/dist/tui/web-activity.js.map +0 -1
- package/dist/tui/workspace-diff.js +0 -101
- package/dist/tui/workspace-diff.js.map +0 -1
- package/dist/tui/workspace-review.js +0 -67
- package/dist/tui/workspace-review.js.map +0 -1
- package/dist/user-commands/store.js +0 -235
- package/dist/user-commands/store.js.map +0 -1
- package/dist/version.js +0 -23
- package/dist/version.js.map +0 -1
|
@@ -0,0 +1,1339 @@
|
|
|
1
|
+
import { createRequire as __namzuCreateRequire } from 'node:module';
|
|
2
|
+
const require = __namzuCreateRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
ProviderRegistry,
|
|
5
|
+
assertThinkingUnsupported,
|
|
6
|
+
isCallerAbortError,
|
|
7
|
+
isProviderRequestError,
|
|
8
|
+
providerVendorError,
|
|
9
|
+
toolResultToText
|
|
10
|
+
} from "./chunk-K5HARZ7G.js";
|
|
11
|
+
import {
|
|
12
|
+
__commonJS,
|
|
13
|
+
__name,
|
|
14
|
+
__toESM
|
|
15
|
+
} from "./chunk-76FLAFCG.js";
|
|
16
|
+
|
|
17
|
+
// ../../node_modules/.pnpm/whatwg-fetch@3.6.20/node_modules/whatwg-fetch/dist/fetch.umd.js
|
|
18
|
+
var require_fetch_umd = __commonJS({
|
|
19
|
+
"../../node_modules/.pnpm/whatwg-fetch@3.6.20/node_modules/whatwg-fetch/dist/fetch.umd.js"(exports, module) {
|
|
20
|
+
"use strict";
|
|
21
|
+
(function(global2, factory) {
|
|
22
|
+
typeof exports === "object" && typeof module !== "undefined" ? factory(exports) : typeof define === "function" && define.amd ? define(["exports"], factory) : factory(global2.WHATWGFetch = {});
|
|
23
|
+
})(exports, (function(exports2) {
|
|
24
|
+
"use strict";
|
|
25
|
+
var g = typeof globalThis !== "undefined" && globalThis || typeof self !== "undefined" && self || // eslint-disable-next-line no-undef
|
|
26
|
+
typeof global !== "undefined" && global || {};
|
|
27
|
+
var support = {
|
|
28
|
+
searchParams: "URLSearchParams" in g,
|
|
29
|
+
iterable: "Symbol" in g && "iterator" in Symbol,
|
|
30
|
+
blob: "FileReader" in g && "Blob" in g && (function() {
|
|
31
|
+
try {
|
|
32
|
+
new Blob();
|
|
33
|
+
return true;
|
|
34
|
+
} catch (e) {
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
})(),
|
|
38
|
+
formData: "FormData" in g,
|
|
39
|
+
arrayBuffer: "ArrayBuffer" in g
|
|
40
|
+
};
|
|
41
|
+
function isDataView(obj) {
|
|
42
|
+
return obj && DataView.prototype.isPrototypeOf(obj);
|
|
43
|
+
}
|
|
44
|
+
__name(isDataView, "isDataView");
|
|
45
|
+
if (support.arrayBuffer) {
|
|
46
|
+
var viewClasses = [
|
|
47
|
+
"[object Int8Array]",
|
|
48
|
+
"[object Uint8Array]",
|
|
49
|
+
"[object Uint8ClampedArray]",
|
|
50
|
+
"[object Int16Array]",
|
|
51
|
+
"[object Uint16Array]",
|
|
52
|
+
"[object Int32Array]",
|
|
53
|
+
"[object Uint32Array]",
|
|
54
|
+
"[object Float32Array]",
|
|
55
|
+
"[object Float64Array]"
|
|
56
|
+
];
|
|
57
|
+
var isArrayBufferView = ArrayBuffer.isView || function(obj) {
|
|
58
|
+
return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1;
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
function normalizeName(name) {
|
|
62
|
+
if (typeof name !== "string") {
|
|
63
|
+
name = String(name);
|
|
64
|
+
}
|
|
65
|
+
if (/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(name) || name === "") {
|
|
66
|
+
throw new TypeError('Invalid character in header field name: "' + name + '"');
|
|
67
|
+
}
|
|
68
|
+
return name.toLowerCase();
|
|
69
|
+
}
|
|
70
|
+
__name(normalizeName, "normalizeName");
|
|
71
|
+
function normalizeValue(value) {
|
|
72
|
+
if (typeof value !== "string") {
|
|
73
|
+
value = String(value);
|
|
74
|
+
}
|
|
75
|
+
return value;
|
|
76
|
+
}
|
|
77
|
+
__name(normalizeValue, "normalizeValue");
|
|
78
|
+
function iteratorFor(items) {
|
|
79
|
+
var iterator = {
|
|
80
|
+
next: /* @__PURE__ */ __name(function() {
|
|
81
|
+
var value = items.shift();
|
|
82
|
+
return { done: value === void 0, value };
|
|
83
|
+
}, "next")
|
|
84
|
+
};
|
|
85
|
+
if (support.iterable) {
|
|
86
|
+
iterator[Symbol.iterator] = function() {
|
|
87
|
+
return iterator;
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
return iterator;
|
|
91
|
+
}
|
|
92
|
+
__name(iteratorFor, "iteratorFor");
|
|
93
|
+
function Headers2(headers) {
|
|
94
|
+
this.map = {};
|
|
95
|
+
if (headers instanceof Headers2) {
|
|
96
|
+
headers.forEach(function(value, name) {
|
|
97
|
+
this.append(name, value);
|
|
98
|
+
}, this);
|
|
99
|
+
} else if (Array.isArray(headers)) {
|
|
100
|
+
headers.forEach(function(header) {
|
|
101
|
+
if (header.length != 2) {
|
|
102
|
+
throw new TypeError("Headers constructor: expected name/value pair to be length 2, found" + header.length);
|
|
103
|
+
}
|
|
104
|
+
this.append(header[0], header[1]);
|
|
105
|
+
}, this);
|
|
106
|
+
} else if (headers) {
|
|
107
|
+
Object.getOwnPropertyNames(headers).forEach(function(name) {
|
|
108
|
+
this.append(name, headers[name]);
|
|
109
|
+
}, this);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
__name(Headers2, "Headers");
|
|
113
|
+
Headers2.prototype.append = function(name, value) {
|
|
114
|
+
name = normalizeName(name);
|
|
115
|
+
value = normalizeValue(value);
|
|
116
|
+
var oldValue = this.map[name];
|
|
117
|
+
this.map[name] = oldValue ? oldValue + ", " + value : value;
|
|
118
|
+
};
|
|
119
|
+
Headers2.prototype["delete"] = function(name) {
|
|
120
|
+
delete this.map[normalizeName(name)];
|
|
121
|
+
};
|
|
122
|
+
Headers2.prototype.get = function(name) {
|
|
123
|
+
name = normalizeName(name);
|
|
124
|
+
return this.has(name) ? this.map[name] : null;
|
|
125
|
+
};
|
|
126
|
+
Headers2.prototype.has = function(name) {
|
|
127
|
+
return this.map.hasOwnProperty(normalizeName(name));
|
|
128
|
+
};
|
|
129
|
+
Headers2.prototype.set = function(name, value) {
|
|
130
|
+
this.map[normalizeName(name)] = normalizeValue(value);
|
|
131
|
+
};
|
|
132
|
+
Headers2.prototype.forEach = function(callback, thisArg) {
|
|
133
|
+
for (var name in this.map) {
|
|
134
|
+
if (this.map.hasOwnProperty(name)) {
|
|
135
|
+
callback.call(thisArg, this.map[name], name, this);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
Headers2.prototype.keys = function() {
|
|
140
|
+
var items = [];
|
|
141
|
+
this.forEach(function(value, name) {
|
|
142
|
+
items.push(name);
|
|
143
|
+
});
|
|
144
|
+
return iteratorFor(items);
|
|
145
|
+
};
|
|
146
|
+
Headers2.prototype.values = function() {
|
|
147
|
+
var items = [];
|
|
148
|
+
this.forEach(function(value) {
|
|
149
|
+
items.push(value);
|
|
150
|
+
});
|
|
151
|
+
return iteratorFor(items);
|
|
152
|
+
};
|
|
153
|
+
Headers2.prototype.entries = function() {
|
|
154
|
+
var items = [];
|
|
155
|
+
this.forEach(function(value, name) {
|
|
156
|
+
items.push([name, value]);
|
|
157
|
+
});
|
|
158
|
+
return iteratorFor(items);
|
|
159
|
+
};
|
|
160
|
+
if (support.iterable) {
|
|
161
|
+
Headers2.prototype[Symbol.iterator] = Headers2.prototype.entries;
|
|
162
|
+
}
|
|
163
|
+
function consumed(body) {
|
|
164
|
+
if (body._noBody) return;
|
|
165
|
+
if (body.bodyUsed) {
|
|
166
|
+
return Promise.reject(new TypeError("Already read"));
|
|
167
|
+
}
|
|
168
|
+
body.bodyUsed = true;
|
|
169
|
+
}
|
|
170
|
+
__name(consumed, "consumed");
|
|
171
|
+
function fileReaderReady(reader) {
|
|
172
|
+
return new Promise(function(resolve2, reject) {
|
|
173
|
+
reader.onload = function() {
|
|
174
|
+
resolve2(reader.result);
|
|
175
|
+
};
|
|
176
|
+
reader.onerror = function() {
|
|
177
|
+
reject(reader.error);
|
|
178
|
+
};
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
__name(fileReaderReady, "fileReaderReady");
|
|
182
|
+
function readBlobAsArrayBuffer(blob) {
|
|
183
|
+
var reader = new FileReader();
|
|
184
|
+
var promise = fileReaderReady(reader);
|
|
185
|
+
reader.readAsArrayBuffer(blob);
|
|
186
|
+
return promise;
|
|
187
|
+
}
|
|
188
|
+
__name(readBlobAsArrayBuffer, "readBlobAsArrayBuffer");
|
|
189
|
+
function readBlobAsText(blob) {
|
|
190
|
+
var reader = new FileReader();
|
|
191
|
+
var promise = fileReaderReady(reader);
|
|
192
|
+
var match = /charset=([A-Za-z0-9_-]+)/.exec(blob.type);
|
|
193
|
+
var encoding = match ? match[1] : "utf-8";
|
|
194
|
+
reader.readAsText(blob, encoding);
|
|
195
|
+
return promise;
|
|
196
|
+
}
|
|
197
|
+
__name(readBlobAsText, "readBlobAsText");
|
|
198
|
+
function readArrayBufferAsText(buf) {
|
|
199
|
+
var view = new Uint8Array(buf);
|
|
200
|
+
var chars = new Array(view.length);
|
|
201
|
+
for (var i = 0; i < view.length; i++) {
|
|
202
|
+
chars[i] = String.fromCharCode(view[i]);
|
|
203
|
+
}
|
|
204
|
+
return chars.join("");
|
|
205
|
+
}
|
|
206
|
+
__name(readArrayBufferAsText, "readArrayBufferAsText");
|
|
207
|
+
function bufferClone(buf) {
|
|
208
|
+
if (buf.slice) {
|
|
209
|
+
return buf.slice(0);
|
|
210
|
+
} else {
|
|
211
|
+
var view = new Uint8Array(buf.byteLength);
|
|
212
|
+
view.set(new Uint8Array(buf));
|
|
213
|
+
return view.buffer;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
__name(bufferClone, "bufferClone");
|
|
217
|
+
function Body() {
|
|
218
|
+
this.bodyUsed = false;
|
|
219
|
+
this._initBody = function(body) {
|
|
220
|
+
this.bodyUsed = this.bodyUsed;
|
|
221
|
+
this._bodyInit = body;
|
|
222
|
+
if (!body) {
|
|
223
|
+
this._noBody = true;
|
|
224
|
+
this._bodyText = "";
|
|
225
|
+
} else if (typeof body === "string") {
|
|
226
|
+
this._bodyText = body;
|
|
227
|
+
} else if (support.blob && Blob.prototype.isPrototypeOf(body)) {
|
|
228
|
+
this._bodyBlob = body;
|
|
229
|
+
} else if (support.formData && FormData.prototype.isPrototypeOf(body)) {
|
|
230
|
+
this._bodyFormData = body;
|
|
231
|
+
} else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
|
|
232
|
+
this._bodyText = body.toString();
|
|
233
|
+
} else if (support.arrayBuffer && support.blob && isDataView(body)) {
|
|
234
|
+
this._bodyArrayBuffer = bufferClone(body.buffer);
|
|
235
|
+
this._bodyInit = new Blob([this._bodyArrayBuffer]);
|
|
236
|
+
} else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {
|
|
237
|
+
this._bodyArrayBuffer = bufferClone(body);
|
|
238
|
+
} else {
|
|
239
|
+
this._bodyText = body = Object.prototype.toString.call(body);
|
|
240
|
+
}
|
|
241
|
+
if (!this.headers.get("content-type")) {
|
|
242
|
+
if (typeof body === "string") {
|
|
243
|
+
this.headers.set("content-type", "text/plain;charset=UTF-8");
|
|
244
|
+
} else if (this._bodyBlob && this._bodyBlob.type) {
|
|
245
|
+
this.headers.set("content-type", this._bodyBlob.type);
|
|
246
|
+
} else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
|
|
247
|
+
this.headers.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8");
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
};
|
|
251
|
+
if (support.blob) {
|
|
252
|
+
this.blob = function() {
|
|
253
|
+
var rejected = consumed(this);
|
|
254
|
+
if (rejected) {
|
|
255
|
+
return rejected;
|
|
256
|
+
}
|
|
257
|
+
if (this._bodyBlob) {
|
|
258
|
+
return Promise.resolve(this._bodyBlob);
|
|
259
|
+
} else if (this._bodyArrayBuffer) {
|
|
260
|
+
return Promise.resolve(new Blob([this._bodyArrayBuffer]));
|
|
261
|
+
} else if (this._bodyFormData) {
|
|
262
|
+
throw new Error("could not read FormData body as blob");
|
|
263
|
+
} else {
|
|
264
|
+
return Promise.resolve(new Blob([this._bodyText]));
|
|
265
|
+
}
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
this.arrayBuffer = function() {
|
|
269
|
+
if (this._bodyArrayBuffer) {
|
|
270
|
+
var isConsumed = consumed(this);
|
|
271
|
+
if (isConsumed) {
|
|
272
|
+
return isConsumed;
|
|
273
|
+
} else if (ArrayBuffer.isView(this._bodyArrayBuffer)) {
|
|
274
|
+
return Promise.resolve(
|
|
275
|
+
this._bodyArrayBuffer.buffer.slice(
|
|
276
|
+
this._bodyArrayBuffer.byteOffset,
|
|
277
|
+
this._bodyArrayBuffer.byteOffset + this._bodyArrayBuffer.byteLength
|
|
278
|
+
)
|
|
279
|
+
);
|
|
280
|
+
} else {
|
|
281
|
+
return Promise.resolve(this._bodyArrayBuffer);
|
|
282
|
+
}
|
|
283
|
+
} else if (support.blob) {
|
|
284
|
+
return this.blob().then(readBlobAsArrayBuffer);
|
|
285
|
+
} else {
|
|
286
|
+
throw new Error("could not read as ArrayBuffer");
|
|
287
|
+
}
|
|
288
|
+
};
|
|
289
|
+
this.text = function() {
|
|
290
|
+
var rejected = consumed(this);
|
|
291
|
+
if (rejected) {
|
|
292
|
+
return rejected;
|
|
293
|
+
}
|
|
294
|
+
if (this._bodyBlob) {
|
|
295
|
+
return readBlobAsText(this._bodyBlob);
|
|
296
|
+
} else if (this._bodyArrayBuffer) {
|
|
297
|
+
return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer));
|
|
298
|
+
} else if (this._bodyFormData) {
|
|
299
|
+
throw new Error("could not read FormData body as text");
|
|
300
|
+
} else {
|
|
301
|
+
return Promise.resolve(this._bodyText);
|
|
302
|
+
}
|
|
303
|
+
};
|
|
304
|
+
if (support.formData) {
|
|
305
|
+
this.formData = function() {
|
|
306
|
+
return this.text().then(decode);
|
|
307
|
+
};
|
|
308
|
+
}
|
|
309
|
+
this.json = function() {
|
|
310
|
+
return this.text().then(JSON.parse);
|
|
311
|
+
};
|
|
312
|
+
return this;
|
|
313
|
+
}
|
|
314
|
+
__name(Body, "Body");
|
|
315
|
+
var methods = ["CONNECT", "DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT", "TRACE"];
|
|
316
|
+
function normalizeMethod(method) {
|
|
317
|
+
var upcased = method.toUpperCase();
|
|
318
|
+
return methods.indexOf(upcased) > -1 ? upcased : method;
|
|
319
|
+
}
|
|
320
|
+
__name(normalizeMethod, "normalizeMethod");
|
|
321
|
+
function Request(input, options) {
|
|
322
|
+
if (!(this instanceof Request)) {
|
|
323
|
+
throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');
|
|
324
|
+
}
|
|
325
|
+
options = options || {};
|
|
326
|
+
var body = options.body;
|
|
327
|
+
if (input instanceof Request) {
|
|
328
|
+
if (input.bodyUsed) {
|
|
329
|
+
throw new TypeError("Already read");
|
|
330
|
+
}
|
|
331
|
+
this.url = input.url;
|
|
332
|
+
this.credentials = input.credentials;
|
|
333
|
+
if (!options.headers) {
|
|
334
|
+
this.headers = new Headers2(input.headers);
|
|
335
|
+
}
|
|
336
|
+
this.method = input.method;
|
|
337
|
+
this.mode = input.mode;
|
|
338
|
+
this.signal = input.signal;
|
|
339
|
+
if (!body && input._bodyInit != null) {
|
|
340
|
+
body = input._bodyInit;
|
|
341
|
+
input.bodyUsed = true;
|
|
342
|
+
}
|
|
343
|
+
} else {
|
|
344
|
+
this.url = String(input);
|
|
345
|
+
}
|
|
346
|
+
this.credentials = options.credentials || this.credentials || "same-origin";
|
|
347
|
+
if (options.headers || !this.headers) {
|
|
348
|
+
this.headers = new Headers2(options.headers);
|
|
349
|
+
}
|
|
350
|
+
this.method = normalizeMethod(options.method || this.method || "GET");
|
|
351
|
+
this.mode = options.mode || this.mode || null;
|
|
352
|
+
this.signal = options.signal || this.signal || (function() {
|
|
353
|
+
if ("AbortController" in g) {
|
|
354
|
+
var ctrl = new AbortController();
|
|
355
|
+
return ctrl.signal;
|
|
356
|
+
}
|
|
357
|
+
})();
|
|
358
|
+
this.referrer = null;
|
|
359
|
+
if ((this.method === "GET" || this.method === "HEAD") && body) {
|
|
360
|
+
throw new TypeError("Body not allowed for GET or HEAD requests");
|
|
361
|
+
}
|
|
362
|
+
this._initBody(body);
|
|
363
|
+
if (this.method === "GET" || this.method === "HEAD") {
|
|
364
|
+
if (options.cache === "no-store" || options.cache === "no-cache") {
|
|
365
|
+
var reParamSearch = /([?&])_=[^&]*/;
|
|
366
|
+
if (reParamSearch.test(this.url)) {
|
|
367
|
+
this.url = this.url.replace(reParamSearch, "$1_=" + (/* @__PURE__ */ new Date()).getTime());
|
|
368
|
+
} else {
|
|
369
|
+
var reQueryString = /\?/;
|
|
370
|
+
this.url += (reQueryString.test(this.url) ? "&" : "?") + "_=" + (/* @__PURE__ */ new Date()).getTime();
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
__name(Request, "Request");
|
|
376
|
+
Request.prototype.clone = function() {
|
|
377
|
+
return new Request(this, { body: this._bodyInit });
|
|
378
|
+
};
|
|
379
|
+
function decode(body) {
|
|
380
|
+
var form = new FormData();
|
|
381
|
+
body.trim().split("&").forEach(function(bytes) {
|
|
382
|
+
if (bytes) {
|
|
383
|
+
var split = bytes.split("=");
|
|
384
|
+
var name = split.shift().replace(/\+/g, " ");
|
|
385
|
+
var value = split.join("=").replace(/\+/g, " ");
|
|
386
|
+
form.append(decodeURIComponent(name), decodeURIComponent(value));
|
|
387
|
+
}
|
|
388
|
+
});
|
|
389
|
+
return form;
|
|
390
|
+
}
|
|
391
|
+
__name(decode, "decode");
|
|
392
|
+
function parseHeaders(rawHeaders) {
|
|
393
|
+
var headers = new Headers2();
|
|
394
|
+
var preProcessedHeaders = rawHeaders.replace(/\r?\n[\t ]+/g, " ");
|
|
395
|
+
preProcessedHeaders.split("\r").map(function(header) {
|
|
396
|
+
return header.indexOf("\n") === 0 ? header.substr(1, header.length) : header;
|
|
397
|
+
}).forEach(function(line) {
|
|
398
|
+
var parts = line.split(":");
|
|
399
|
+
var key = parts.shift().trim();
|
|
400
|
+
if (key) {
|
|
401
|
+
var value = parts.join(":").trim();
|
|
402
|
+
try {
|
|
403
|
+
headers.append(key, value);
|
|
404
|
+
} catch (error) {
|
|
405
|
+
console.warn("Response " + error.message);
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
});
|
|
409
|
+
return headers;
|
|
410
|
+
}
|
|
411
|
+
__name(parseHeaders, "parseHeaders");
|
|
412
|
+
Body.call(Request.prototype);
|
|
413
|
+
function Response(bodyInit, options) {
|
|
414
|
+
if (!(this instanceof Response)) {
|
|
415
|
+
throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');
|
|
416
|
+
}
|
|
417
|
+
if (!options) {
|
|
418
|
+
options = {};
|
|
419
|
+
}
|
|
420
|
+
this.type = "default";
|
|
421
|
+
this.status = options.status === void 0 ? 200 : options.status;
|
|
422
|
+
if (this.status < 200 || this.status > 599) {
|
|
423
|
+
throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");
|
|
424
|
+
}
|
|
425
|
+
this.ok = this.status >= 200 && this.status < 300;
|
|
426
|
+
this.statusText = options.statusText === void 0 ? "" : "" + options.statusText;
|
|
427
|
+
this.headers = new Headers2(options.headers);
|
|
428
|
+
this.url = options.url || "";
|
|
429
|
+
this._initBody(bodyInit);
|
|
430
|
+
}
|
|
431
|
+
__name(Response, "Response");
|
|
432
|
+
Body.call(Response.prototype);
|
|
433
|
+
Response.prototype.clone = function() {
|
|
434
|
+
return new Response(this._bodyInit, {
|
|
435
|
+
status: this.status,
|
|
436
|
+
statusText: this.statusText,
|
|
437
|
+
headers: new Headers2(this.headers),
|
|
438
|
+
url: this.url
|
|
439
|
+
});
|
|
440
|
+
};
|
|
441
|
+
Response.error = function() {
|
|
442
|
+
var response = new Response(null, { status: 200, statusText: "" });
|
|
443
|
+
response.ok = false;
|
|
444
|
+
response.status = 0;
|
|
445
|
+
response.type = "error";
|
|
446
|
+
return response;
|
|
447
|
+
};
|
|
448
|
+
var redirectStatuses = [301, 302, 303, 307, 308];
|
|
449
|
+
Response.redirect = function(url, status) {
|
|
450
|
+
if (redirectStatuses.indexOf(status) === -1) {
|
|
451
|
+
throw new RangeError("Invalid status code");
|
|
452
|
+
}
|
|
453
|
+
return new Response(null, { status, headers: { location: url } });
|
|
454
|
+
};
|
|
455
|
+
exports2.DOMException = g.DOMException;
|
|
456
|
+
try {
|
|
457
|
+
new exports2.DOMException();
|
|
458
|
+
} catch (err) {
|
|
459
|
+
exports2.DOMException = function(message, name) {
|
|
460
|
+
this.message = message;
|
|
461
|
+
this.name = name;
|
|
462
|
+
var error = Error(message);
|
|
463
|
+
this.stack = error.stack;
|
|
464
|
+
};
|
|
465
|
+
exports2.DOMException.prototype = Object.create(Error.prototype);
|
|
466
|
+
exports2.DOMException.prototype.constructor = exports2.DOMException;
|
|
467
|
+
}
|
|
468
|
+
function fetch2(input, init) {
|
|
469
|
+
return new Promise(function(resolve2, reject) {
|
|
470
|
+
var request = new Request(input, init);
|
|
471
|
+
if (request.signal && request.signal.aborted) {
|
|
472
|
+
return reject(new exports2.DOMException("Aborted", "AbortError"));
|
|
473
|
+
}
|
|
474
|
+
var xhr = new XMLHttpRequest();
|
|
475
|
+
function abortXhr() {
|
|
476
|
+
xhr.abort();
|
|
477
|
+
}
|
|
478
|
+
__name(abortXhr, "abortXhr");
|
|
479
|
+
xhr.onload = function() {
|
|
480
|
+
var options = {
|
|
481
|
+
statusText: xhr.statusText,
|
|
482
|
+
headers: parseHeaders(xhr.getAllResponseHeaders() || "")
|
|
483
|
+
};
|
|
484
|
+
if (request.url.indexOf("file://") === 0 && (xhr.status < 200 || xhr.status > 599)) {
|
|
485
|
+
options.status = 200;
|
|
486
|
+
} else {
|
|
487
|
+
options.status = xhr.status;
|
|
488
|
+
}
|
|
489
|
+
options.url = "responseURL" in xhr ? xhr.responseURL : options.headers.get("X-Request-URL");
|
|
490
|
+
var body = "response" in xhr ? xhr.response : xhr.responseText;
|
|
491
|
+
setTimeout(function() {
|
|
492
|
+
resolve2(new Response(body, options));
|
|
493
|
+
}, 0);
|
|
494
|
+
};
|
|
495
|
+
xhr.onerror = function() {
|
|
496
|
+
setTimeout(function() {
|
|
497
|
+
reject(new TypeError("Network request failed"));
|
|
498
|
+
}, 0);
|
|
499
|
+
};
|
|
500
|
+
xhr.ontimeout = function() {
|
|
501
|
+
setTimeout(function() {
|
|
502
|
+
reject(new TypeError("Network request timed out"));
|
|
503
|
+
}, 0);
|
|
504
|
+
};
|
|
505
|
+
xhr.onabort = function() {
|
|
506
|
+
setTimeout(function() {
|
|
507
|
+
reject(new exports2.DOMException("Aborted", "AbortError"));
|
|
508
|
+
}, 0);
|
|
509
|
+
};
|
|
510
|
+
function fixUrl(url) {
|
|
511
|
+
try {
|
|
512
|
+
return url === "" && g.location.href ? g.location.href : url;
|
|
513
|
+
} catch (e) {
|
|
514
|
+
return url;
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
__name(fixUrl, "fixUrl");
|
|
518
|
+
xhr.open(request.method, fixUrl(request.url), true);
|
|
519
|
+
if (request.credentials === "include") {
|
|
520
|
+
xhr.withCredentials = true;
|
|
521
|
+
} else if (request.credentials === "omit") {
|
|
522
|
+
xhr.withCredentials = false;
|
|
523
|
+
}
|
|
524
|
+
if ("responseType" in xhr) {
|
|
525
|
+
if (support.blob) {
|
|
526
|
+
xhr.responseType = "blob";
|
|
527
|
+
} else if (support.arrayBuffer) {
|
|
528
|
+
xhr.responseType = "arraybuffer";
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
if (init && typeof init.headers === "object" && !(init.headers instanceof Headers2 || g.Headers && init.headers instanceof g.Headers)) {
|
|
532
|
+
var names = [];
|
|
533
|
+
Object.getOwnPropertyNames(init.headers).forEach(function(name) {
|
|
534
|
+
names.push(normalizeName(name));
|
|
535
|
+
xhr.setRequestHeader(name, normalizeValue(init.headers[name]));
|
|
536
|
+
});
|
|
537
|
+
request.headers.forEach(function(value, name) {
|
|
538
|
+
if (names.indexOf(name) === -1) {
|
|
539
|
+
xhr.setRequestHeader(name, value);
|
|
540
|
+
}
|
|
541
|
+
});
|
|
542
|
+
} else {
|
|
543
|
+
request.headers.forEach(function(value, name) {
|
|
544
|
+
xhr.setRequestHeader(name, value);
|
|
545
|
+
});
|
|
546
|
+
}
|
|
547
|
+
if (request.signal) {
|
|
548
|
+
request.signal.addEventListener("abort", abortXhr);
|
|
549
|
+
xhr.onreadystatechange = function() {
|
|
550
|
+
if (xhr.readyState === 4) {
|
|
551
|
+
request.signal.removeEventListener("abort", abortXhr);
|
|
552
|
+
}
|
|
553
|
+
};
|
|
554
|
+
}
|
|
555
|
+
xhr.send(typeof request._bodyInit === "undefined" ? null : request._bodyInit);
|
|
556
|
+
});
|
|
557
|
+
}
|
|
558
|
+
__name(fetch2, "fetch");
|
|
559
|
+
fetch2.polyfill = true;
|
|
560
|
+
if (!g.fetch) {
|
|
561
|
+
g.fetch = fetch2;
|
|
562
|
+
g.Headers = Headers2;
|
|
563
|
+
g.Request = Request;
|
|
564
|
+
g.Response = Response;
|
|
565
|
+
}
|
|
566
|
+
exports2.Headers = Headers2;
|
|
567
|
+
exports2.Request = Request;
|
|
568
|
+
exports2.Response = Response;
|
|
569
|
+
exports2.fetch = fetch2;
|
|
570
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
571
|
+
}));
|
|
572
|
+
}
|
|
573
|
+
});
|
|
574
|
+
|
|
575
|
+
// ../providers/ollama/dist/client.js
|
|
576
|
+
import { randomUUID } from "node:crypto";
|
|
577
|
+
|
|
578
|
+
// ../../node_modules/.pnpm/ollama@0.5.18/node_modules/ollama/dist/index.mjs
|
|
579
|
+
import fs, { promises } from "node:fs";
|
|
580
|
+
import { resolve } from "node:path";
|
|
581
|
+
|
|
582
|
+
// ../../node_modules/.pnpm/ollama@0.5.18/node_modules/ollama/dist/browser.mjs
|
|
583
|
+
var import_whatwg_fetch = __toESM(require_fetch_umd(), 1);
|
|
584
|
+
var defaultPort = "11434";
|
|
585
|
+
var defaultHost = `http://127.0.0.1:${defaultPort}`;
|
|
586
|
+
var version = "0.5.18";
|
|
587
|
+
var __defProp$1 = Object.defineProperty;
|
|
588
|
+
var __defNormalProp$1 = /* @__PURE__ */ __name((obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value, "__defNormalProp$1");
|
|
589
|
+
var __publicField$1 = /* @__PURE__ */ __name((obj, key, value) => {
|
|
590
|
+
__defNormalProp$1(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
591
|
+
return value;
|
|
592
|
+
}, "__publicField$1");
|
|
593
|
+
var ResponseError = class _ResponseError extends Error {
|
|
594
|
+
static {
|
|
595
|
+
__name(this, "ResponseError");
|
|
596
|
+
}
|
|
597
|
+
constructor(error, status_code) {
|
|
598
|
+
super(error);
|
|
599
|
+
this.error = error;
|
|
600
|
+
this.status_code = status_code;
|
|
601
|
+
this.name = "ResponseError";
|
|
602
|
+
if (Error.captureStackTrace) {
|
|
603
|
+
Error.captureStackTrace(this, _ResponseError);
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
};
|
|
607
|
+
var AbortableAsyncIterator = class {
|
|
608
|
+
static {
|
|
609
|
+
__name(this, "AbortableAsyncIterator");
|
|
610
|
+
}
|
|
611
|
+
constructor(abortController, itr, doneCallback) {
|
|
612
|
+
__publicField$1(this, "abortController");
|
|
613
|
+
__publicField$1(this, "itr");
|
|
614
|
+
__publicField$1(this, "doneCallback");
|
|
615
|
+
this.abortController = abortController;
|
|
616
|
+
this.itr = itr;
|
|
617
|
+
this.doneCallback = doneCallback;
|
|
618
|
+
}
|
|
619
|
+
abort() {
|
|
620
|
+
this.abortController.abort();
|
|
621
|
+
}
|
|
622
|
+
async *[Symbol.asyncIterator]() {
|
|
623
|
+
for await (const message of this.itr) {
|
|
624
|
+
if ("error" in message) {
|
|
625
|
+
throw new Error(message.error);
|
|
626
|
+
}
|
|
627
|
+
yield message;
|
|
628
|
+
if (message.done || message.status === "success") {
|
|
629
|
+
this.doneCallback();
|
|
630
|
+
return;
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
throw new Error("Did not receive done or success response in stream.");
|
|
634
|
+
}
|
|
635
|
+
};
|
|
636
|
+
var checkOk = /* @__PURE__ */ __name(async (response) => {
|
|
637
|
+
if (response.ok) {
|
|
638
|
+
return;
|
|
639
|
+
}
|
|
640
|
+
let message = `Error ${response.status}: ${response.statusText}`;
|
|
641
|
+
let errorData = null;
|
|
642
|
+
if (response.headers.get("content-type")?.includes("application/json")) {
|
|
643
|
+
try {
|
|
644
|
+
errorData = await response.json();
|
|
645
|
+
message = errorData.error || message;
|
|
646
|
+
} catch (error) {
|
|
647
|
+
console.log("Failed to parse error response as JSON");
|
|
648
|
+
}
|
|
649
|
+
} else {
|
|
650
|
+
try {
|
|
651
|
+
console.log("Getting text from response");
|
|
652
|
+
const textResponse = await response.text();
|
|
653
|
+
message = textResponse || message;
|
|
654
|
+
} catch (error) {
|
|
655
|
+
console.log("Failed to get text from error response");
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
throw new ResponseError(message, response.status);
|
|
659
|
+
}, "checkOk");
|
|
660
|
+
function getPlatform() {
|
|
661
|
+
if (typeof window !== "undefined" && window.navigator) {
|
|
662
|
+
const nav = navigator;
|
|
663
|
+
if ("userAgentData" in nav && nav.userAgentData?.platform) {
|
|
664
|
+
return `${nav.userAgentData.platform.toLowerCase()} Browser/${navigator.userAgent};`;
|
|
665
|
+
}
|
|
666
|
+
if (navigator.platform) {
|
|
667
|
+
return `${navigator.platform.toLowerCase()} Browser/${navigator.userAgent};`;
|
|
668
|
+
}
|
|
669
|
+
return `unknown Browser/${navigator.userAgent};`;
|
|
670
|
+
} else if (typeof process !== "undefined") {
|
|
671
|
+
return `${process.arch} ${process.platform} Node.js/${process.version}`;
|
|
672
|
+
}
|
|
673
|
+
return "";
|
|
674
|
+
}
|
|
675
|
+
__name(getPlatform, "getPlatform");
|
|
676
|
+
function normalizeHeaders(headers) {
|
|
677
|
+
if (headers instanceof Headers) {
|
|
678
|
+
const obj = {};
|
|
679
|
+
headers.forEach((value, key) => {
|
|
680
|
+
obj[key] = value;
|
|
681
|
+
});
|
|
682
|
+
return obj;
|
|
683
|
+
} else if (Array.isArray(headers)) {
|
|
684
|
+
return Object.fromEntries(headers);
|
|
685
|
+
} else {
|
|
686
|
+
return headers || {};
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
__name(normalizeHeaders, "normalizeHeaders");
|
|
690
|
+
var fetchWithHeaders = /* @__PURE__ */ __name(async (fetch2, url, options = {}) => {
|
|
691
|
+
const defaultHeaders = {
|
|
692
|
+
"Content-Type": "application/json",
|
|
693
|
+
Accept: "application/json",
|
|
694
|
+
"User-Agent": `ollama-js/${version} (${getPlatform()})`
|
|
695
|
+
};
|
|
696
|
+
options.headers = normalizeHeaders(options.headers);
|
|
697
|
+
const customHeaders = Object.fromEntries(
|
|
698
|
+
Object.entries(options.headers).filter(([key]) => !Object.keys(defaultHeaders).some((defaultKey) => defaultKey.toLowerCase() === key.toLowerCase()))
|
|
699
|
+
);
|
|
700
|
+
options.headers = {
|
|
701
|
+
...defaultHeaders,
|
|
702
|
+
...customHeaders
|
|
703
|
+
};
|
|
704
|
+
return fetch2(url, options);
|
|
705
|
+
}, "fetchWithHeaders");
|
|
706
|
+
var get = /* @__PURE__ */ __name(async (fetch2, host, options) => {
|
|
707
|
+
const response = await fetchWithHeaders(fetch2, host, {
|
|
708
|
+
headers: options?.headers
|
|
709
|
+
});
|
|
710
|
+
await checkOk(response);
|
|
711
|
+
return response;
|
|
712
|
+
}, "get");
|
|
713
|
+
var post = /* @__PURE__ */ __name(async (fetch2, host, data, options) => {
|
|
714
|
+
const isRecord = /* @__PURE__ */ __name((input) => {
|
|
715
|
+
return input !== null && typeof input === "object" && !Array.isArray(input);
|
|
716
|
+
}, "isRecord");
|
|
717
|
+
const formattedData = isRecord(data) ? JSON.stringify(data) : data;
|
|
718
|
+
const response = await fetchWithHeaders(fetch2, host, {
|
|
719
|
+
method: "POST",
|
|
720
|
+
body: formattedData,
|
|
721
|
+
signal: options?.signal,
|
|
722
|
+
headers: options?.headers
|
|
723
|
+
});
|
|
724
|
+
await checkOk(response);
|
|
725
|
+
return response;
|
|
726
|
+
}, "post");
|
|
727
|
+
var del = /* @__PURE__ */ __name(async (fetch2, host, data, options) => {
|
|
728
|
+
const response = await fetchWithHeaders(fetch2, host, {
|
|
729
|
+
method: "DELETE",
|
|
730
|
+
body: JSON.stringify(data),
|
|
731
|
+
headers: options?.headers
|
|
732
|
+
});
|
|
733
|
+
await checkOk(response);
|
|
734
|
+
return response;
|
|
735
|
+
}, "del");
|
|
736
|
+
var parseJSON = /* @__PURE__ */ __name(async function* (itr) {
|
|
737
|
+
const decoder = new TextDecoder("utf-8");
|
|
738
|
+
let buffer = "";
|
|
739
|
+
const reader = itr.getReader();
|
|
740
|
+
while (true) {
|
|
741
|
+
const { done, value: chunk } = await reader.read();
|
|
742
|
+
if (done) {
|
|
743
|
+
break;
|
|
744
|
+
}
|
|
745
|
+
buffer += decoder.decode(chunk);
|
|
746
|
+
const parts = buffer.split("\n");
|
|
747
|
+
buffer = parts.pop() ?? "";
|
|
748
|
+
for (const part of parts) {
|
|
749
|
+
try {
|
|
750
|
+
yield JSON.parse(part);
|
|
751
|
+
} catch (error) {
|
|
752
|
+
console.warn("invalid json: ", part);
|
|
753
|
+
}
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
for (const part of buffer.split("\n").filter((p) => p !== "")) {
|
|
757
|
+
try {
|
|
758
|
+
yield JSON.parse(part);
|
|
759
|
+
} catch (error) {
|
|
760
|
+
console.warn("invalid json: ", part);
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
}, "parseJSON");
|
|
764
|
+
var formatHost = /* @__PURE__ */ __name((host) => {
|
|
765
|
+
if (!host) {
|
|
766
|
+
return defaultHost;
|
|
767
|
+
}
|
|
768
|
+
let isExplicitProtocol = host.includes("://");
|
|
769
|
+
if (host.startsWith(":")) {
|
|
770
|
+
host = `http://127.0.0.1${host}`;
|
|
771
|
+
isExplicitProtocol = true;
|
|
772
|
+
}
|
|
773
|
+
if (!isExplicitProtocol) {
|
|
774
|
+
host = `http://${host}`;
|
|
775
|
+
}
|
|
776
|
+
const url = new URL(host);
|
|
777
|
+
let port = url.port;
|
|
778
|
+
if (!port) {
|
|
779
|
+
if (!isExplicitProtocol) {
|
|
780
|
+
port = defaultPort;
|
|
781
|
+
} else {
|
|
782
|
+
port = url.protocol === "https:" ? "443" : "80";
|
|
783
|
+
}
|
|
784
|
+
}
|
|
785
|
+
let auth = "";
|
|
786
|
+
if (url.username) {
|
|
787
|
+
auth = url.username;
|
|
788
|
+
if (url.password) {
|
|
789
|
+
auth += `:${url.password}`;
|
|
790
|
+
}
|
|
791
|
+
auth += "@";
|
|
792
|
+
}
|
|
793
|
+
let formattedHost = `${url.protocol}//${auth}${url.hostname}:${port}${url.pathname}`;
|
|
794
|
+
if (formattedHost.endsWith("/")) {
|
|
795
|
+
formattedHost = formattedHost.slice(0, -1);
|
|
796
|
+
}
|
|
797
|
+
return formattedHost;
|
|
798
|
+
}, "formatHost");
|
|
799
|
+
var __defProp = Object.defineProperty;
|
|
800
|
+
var __defNormalProp = /* @__PURE__ */ __name((obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value, "__defNormalProp");
|
|
801
|
+
var __publicField = /* @__PURE__ */ __name((obj, key, value) => {
|
|
802
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
803
|
+
return value;
|
|
804
|
+
}, "__publicField");
|
|
805
|
+
var Ollama$1 = class Ollama {
|
|
806
|
+
static {
|
|
807
|
+
__name(this, "Ollama");
|
|
808
|
+
}
|
|
809
|
+
constructor(config) {
|
|
810
|
+
__publicField(this, "config");
|
|
811
|
+
__publicField(this, "fetch");
|
|
812
|
+
__publicField(this, "ongoingStreamedRequests", []);
|
|
813
|
+
this.config = {
|
|
814
|
+
host: "",
|
|
815
|
+
headers: config?.headers
|
|
816
|
+
};
|
|
817
|
+
if (!config?.proxy) {
|
|
818
|
+
this.config.host = formatHost(config?.host ?? defaultHost);
|
|
819
|
+
}
|
|
820
|
+
this.fetch = config?.fetch ?? fetch;
|
|
821
|
+
}
|
|
822
|
+
// Abort any ongoing streamed requests to Ollama
|
|
823
|
+
abort() {
|
|
824
|
+
for (const request of this.ongoingStreamedRequests) {
|
|
825
|
+
request.abort();
|
|
826
|
+
}
|
|
827
|
+
this.ongoingStreamedRequests.length = 0;
|
|
828
|
+
}
|
|
829
|
+
/**
|
|
830
|
+
* Processes a request to the Ollama server. If the request is streamable, it will return a
|
|
831
|
+
* AbortableAsyncIterator that yields the response messages. Otherwise, it will return the response
|
|
832
|
+
* object.
|
|
833
|
+
* @param endpoint {string} - The endpoint to send the request to.
|
|
834
|
+
* @param request {object} - The request object to send to the endpoint.
|
|
835
|
+
* @protected {T | AbortableAsyncIterator<T>} - The response object or a AbortableAsyncIterator that yields
|
|
836
|
+
* response messages.
|
|
837
|
+
* @throws {Error} - If the response body is missing or if the response is an error.
|
|
838
|
+
* @returns {Promise<T | AbortableAsyncIterator<T>>} - The response object or a AbortableAsyncIterator that yields the streamed response.
|
|
839
|
+
*/
|
|
840
|
+
async processStreamableRequest(endpoint, request) {
|
|
841
|
+
request.stream = request.stream ?? false;
|
|
842
|
+
const host = `${this.config.host}/api/${endpoint}`;
|
|
843
|
+
if (request.stream) {
|
|
844
|
+
const abortController = new AbortController();
|
|
845
|
+
const response2 = await post(this.fetch, host, request, {
|
|
846
|
+
signal: abortController.signal,
|
|
847
|
+
headers: this.config.headers
|
|
848
|
+
});
|
|
849
|
+
if (!response2.body) {
|
|
850
|
+
throw new Error("Missing body");
|
|
851
|
+
}
|
|
852
|
+
const itr = parseJSON(response2.body);
|
|
853
|
+
const abortableAsyncIterator = new AbortableAsyncIterator(
|
|
854
|
+
abortController,
|
|
855
|
+
itr,
|
|
856
|
+
() => {
|
|
857
|
+
const i = this.ongoingStreamedRequests.indexOf(abortableAsyncIterator);
|
|
858
|
+
if (i > -1) {
|
|
859
|
+
this.ongoingStreamedRequests.splice(i, 1);
|
|
860
|
+
}
|
|
861
|
+
}
|
|
862
|
+
);
|
|
863
|
+
this.ongoingStreamedRequests.push(abortableAsyncIterator);
|
|
864
|
+
return abortableAsyncIterator;
|
|
865
|
+
}
|
|
866
|
+
const response = await post(this.fetch, host, request, {
|
|
867
|
+
headers: this.config.headers
|
|
868
|
+
});
|
|
869
|
+
return await response.json();
|
|
870
|
+
}
|
|
871
|
+
/**
|
|
872
|
+
* Encodes an image to base64 if it is a Uint8Array.
|
|
873
|
+
* @param image {Uint8Array | string} - The image to encode.
|
|
874
|
+
* @returns {Promise<string>} - The base64 encoded image.
|
|
875
|
+
*/
|
|
876
|
+
async encodeImage(image) {
|
|
877
|
+
if (typeof image !== "string") {
|
|
878
|
+
const uint8Array = new Uint8Array(image);
|
|
879
|
+
let byteString = "";
|
|
880
|
+
const len = uint8Array.byteLength;
|
|
881
|
+
for (let i = 0; i < len; i++) {
|
|
882
|
+
byteString += String.fromCharCode(uint8Array[i]);
|
|
883
|
+
}
|
|
884
|
+
return btoa(byteString);
|
|
885
|
+
}
|
|
886
|
+
return image;
|
|
887
|
+
}
|
|
888
|
+
/**
|
|
889
|
+
* Generates a response from a text prompt.
|
|
890
|
+
* @param request {GenerateRequest} - The request object.
|
|
891
|
+
* @returns {Promise<GenerateResponse | AbortableAsyncIterator<GenerateResponse>>} - The response object or
|
|
892
|
+
* an AbortableAsyncIterator that yields response messages.
|
|
893
|
+
*/
|
|
894
|
+
async generate(request) {
|
|
895
|
+
if (request.images) {
|
|
896
|
+
request.images = await Promise.all(request.images.map(this.encodeImage.bind(this)));
|
|
897
|
+
}
|
|
898
|
+
return this.processStreamableRequest("generate", request);
|
|
899
|
+
}
|
|
900
|
+
/**
|
|
901
|
+
* Chats with the model. The request object can contain messages with images that are either
|
|
902
|
+
* Uint8Arrays or base64 encoded strings. The images will be base64 encoded before sending the
|
|
903
|
+
* request.
|
|
904
|
+
* @param request {ChatRequest} - The request object.
|
|
905
|
+
* @returns {Promise<ChatResponse | AbortableAsyncIterator<ChatResponse>>} - The response object or an
|
|
906
|
+
* AbortableAsyncIterator that yields response messages.
|
|
907
|
+
*/
|
|
908
|
+
async chat(request) {
|
|
909
|
+
if (request.messages) {
|
|
910
|
+
for (const message of request.messages) {
|
|
911
|
+
if (message.images) {
|
|
912
|
+
message.images = await Promise.all(
|
|
913
|
+
message.images.map(this.encodeImage.bind(this))
|
|
914
|
+
);
|
|
915
|
+
}
|
|
916
|
+
}
|
|
917
|
+
}
|
|
918
|
+
return this.processStreamableRequest("chat", request);
|
|
919
|
+
}
|
|
920
|
+
/**
|
|
921
|
+
* Creates a new model from a stream of data.
|
|
922
|
+
* @param request {CreateRequest} - The request object.
|
|
923
|
+
* @returns {Promise<ProgressResponse | AbortableAsyncIterator<ProgressResponse>>} - The response object or a stream of progress responses.
|
|
924
|
+
*/
|
|
925
|
+
async create(request) {
|
|
926
|
+
return this.processStreamableRequest("create", {
|
|
927
|
+
...request
|
|
928
|
+
});
|
|
929
|
+
}
|
|
930
|
+
/**
|
|
931
|
+
* Pulls a model from the Ollama registry. The request object can contain a stream flag to indicate if the
|
|
932
|
+
* response should be streamed.
|
|
933
|
+
* @param request {PullRequest} - The request object.
|
|
934
|
+
* @returns {Promise<ProgressResponse | AbortableAsyncIterator<ProgressResponse>>} - The response object or
|
|
935
|
+
* an AbortableAsyncIterator that yields response messages.
|
|
936
|
+
*/
|
|
937
|
+
async pull(request) {
|
|
938
|
+
return this.processStreamableRequest("pull", {
|
|
939
|
+
name: request.model,
|
|
940
|
+
stream: request.stream,
|
|
941
|
+
insecure: request.insecure
|
|
942
|
+
});
|
|
943
|
+
}
|
|
944
|
+
/**
|
|
945
|
+
* Pushes a model to the Ollama registry. The request object can contain a stream flag to indicate if the
|
|
946
|
+
* response should be streamed.
|
|
947
|
+
* @param request {PushRequest} - The request object.
|
|
948
|
+
* @returns {Promise<ProgressResponse | AbortableAsyncIterator<ProgressResponse>>} - The response object or
|
|
949
|
+
* an AbortableAsyncIterator that yields response messages.
|
|
950
|
+
*/
|
|
951
|
+
async push(request) {
|
|
952
|
+
return this.processStreamableRequest("push", {
|
|
953
|
+
name: request.model,
|
|
954
|
+
stream: request.stream,
|
|
955
|
+
insecure: request.insecure
|
|
956
|
+
});
|
|
957
|
+
}
|
|
958
|
+
/**
|
|
959
|
+
* Deletes a model from the server. The request object should contain the name of the model to
|
|
960
|
+
* delete.
|
|
961
|
+
* @param request {DeleteRequest} - The request object.
|
|
962
|
+
* @returns {Promise<StatusResponse>} - The response object.
|
|
963
|
+
*/
|
|
964
|
+
async delete(request) {
|
|
965
|
+
await del(
|
|
966
|
+
this.fetch,
|
|
967
|
+
`${this.config.host}/api/delete`,
|
|
968
|
+
{ name: request.model },
|
|
969
|
+
{ headers: this.config.headers }
|
|
970
|
+
);
|
|
971
|
+
return { status: "success" };
|
|
972
|
+
}
|
|
973
|
+
/**
|
|
974
|
+
* Copies a model from one name to another. The request object should contain the name of the
|
|
975
|
+
* model to copy and the new name.
|
|
976
|
+
* @param request {CopyRequest} - The request object.
|
|
977
|
+
* @returns {Promise<StatusResponse>} - The response object.
|
|
978
|
+
*/
|
|
979
|
+
async copy(request) {
|
|
980
|
+
await post(this.fetch, `${this.config.host}/api/copy`, { ...request }, {
|
|
981
|
+
headers: this.config.headers
|
|
982
|
+
});
|
|
983
|
+
return { status: "success" };
|
|
984
|
+
}
|
|
985
|
+
/**
|
|
986
|
+
* Lists the models on the server.
|
|
987
|
+
* @returns {Promise<ListResponse>} - The response object.
|
|
988
|
+
* @throws {Error} - If the response body is missing.
|
|
989
|
+
*/
|
|
990
|
+
async list() {
|
|
991
|
+
const response = await get(this.fetch, `${this.config.host}/api/tags`, {
|
|
992
|
+
headers: this.config.headers
|
|
993
|
+
});
|
|
994
|
+
return await response.json();
|
|
995
|
+
}
|
|
996
|
+
/**
|
|
997
|
+
* Shows the metadata of a model. The request object should contain the name of the model.
|
|
998
|
+
* @param request {ShowRequest} - The request object.
|
|
999
|
+
* @returns {Promise<ShowResponse>} - The response object.
|
|
1000
|
+
*/
|
|
1001
|
+
async show(request) {
|
|
1002
|
+
const response = await post(this.fetch, `${this.config.host}/api/show`, {
|
|
1003
|
+
...request
|
|
1004
|
+
}, {
|
|
1005
|
+
headers: this.config.headers
|
|
1006
|
+
});
|
|
1007
|
+
return await response.json();
|
|
1008
|
+
}
|
|
1009
|
+
/**
|
|
1010
|
+
* Embeds text input into vectors.
|
|
1011
|
+
* @param request {EmbedRequest} - The request object.
|
|
1012
|
+
* @returns {Promise<EmbedResponse>} - The response object.
|
|
1013
|
+
*/
|
|
1014
|
+
async embed(request) {
|
|
1015
|
+
const response = await post(this.fetch, `${this.config.host}/api/embed`, {
|
|
1016
|
+
...request
|
|
1017
|
+
}, {
|
|
1018
|
+
headers: this.config.headers
|
|
1019
|
+
});
|
|
1020
|
+
return await response.json();
|
|
1021
|
+
}
|
|
1022
|
+
/**
|
|
1023
|
+
* Embeds a text prompt into a vector.
|
|
1024
|
+
* @param request {EmbeddingsRequest} - The request object.
|
|
1025
|
+
* @returns {Promise<EmbeddingsResponse>} - The response object.
|
|
1026
|
+
*/
|
|
1027
|
+
async embeddings(request) {
|
|
1028
|
+
const response = await post(this.fetch, `${this.config.host}/api/embeddings`, {
|
|
1029
|
+
...request
|
|
1030
|
+
}, {
|
|
1031
|
+
headers: this.config.headers
|
|
1032
|
+
});
|
|
1033
|
+
return await response.json();
|
|
1034
|
+
}
|
|
1035
|
+
/**
|
|
1036
|
+
* Lists the running models on the server
|
|
1037
|
+
* @returns {Promise<ListResponse>} - The response object.
|
|
1038
|
+
* @throws {Error} - If the response body is missing.
|
|
1039
|
+
*/
|
|
1040
|
+
async ps() {
|
|
1041
|
+
const response = await get(this.fetch, `${this.config.host}/api/ps`, {
|
|
1042
|
+
headers: this.config.headers
|
|
1043
|
+
});
|
|
1044
|
+
return await response.json();
|
|
1045
|
+
}
|
|
1046
|
+
};
|
|
1047
|
+
var browser = new Ollama$1();
|
|
1048
|
+
|
|
1049
|
+
// ../../node_modules/.pnpm/ollama@0.5.18/node_modules/ollama/dist/index.mjs
|
|
1050
|
+
var import_whatwg_fetch2 = __toESM(require_fetch_umd(), 1);
|
|
1051
|
+
var Ollama2 = class extends Ollama$1 {
|
|
1052
|
+
static {
|
|
1053
|
+
__name(this, "Ollama");
|
|
1054
|
+
}
|
|
1055
|
+
async encodeImage(image) {
|
|
1056
|
+
if (typeof image !== "string") {
|
|
1057
|
+
return Buffer.from(image).toString("base64");
|
|
1058
|
+
}
|
|
1059
|
+
try {
|
|
1060
|
+
if (fs.existsSync(image)) {
|
|
1061
|
+
const fileBuffer = await promises.readFile(resolve(image));
|
|
1062
|
+
return Buffer.from(fileBuffer).toString("base64");
|
|
1063
|
+
}
|
|
1064
|
+
} catch {
|
|
1065
|
+
}
|
|
1066
|
+
return image;
|
|
1067
|
+
}
|
|
1068
|
+
/**
|
|
1069
|
+
* checks if a file exists
|
|
1070
|
+
* @param path {string} - The path to the file
|
|
1071
|
+
* @private @internal
|
|
1072
|
+
* @returns {Promise<boolean>} - Whether the file exists or not
|
|
1073
|
+
*/
|
|
1074
|
+
async fileExists(path) {
|
|
1075
|
+
try {
|
|
1076
|
+
await promises.access(path);
|
|
1077
|
+
return true;
|
|
1078
|
+
} catch {
|
|
1079
|
+
return false;
|
|
1080
|
+
}
|
|
1081
|
+
}
|
|
1082
|
+
async create(request) {
|
|
1083
|
+
if (request.from && await this.fileExists(resolve(request.from))) {
|
|
1084
|
+
throw Error("Creating with a local path is not currently supported from ollama-js");
|
|
1085
|
+
}
|
|
1086
|
+
if (request.stream) {
|
|
1087
|
+
return super.create(request);
|
|
1088
|
+
} else {
|
|
1089
|
+
return super.create(request);
|
|
1090
|
+
}
|
|
1091
|
+
}
|
|
1092
|
+
};
|
|
1093
|
+
var index = new Ollama2();
|
|
1094
|
+
|
|
1095
|
+
// ../providers/ollama/dist/request-timeout.js
|
|
1096
|
+
function withRequestTimeout(base, timeoutMs) {
|
|
1097
|
+
if (timeoutMs === void 0)
|
|
1098
|
+
return base;
|
|
1099
|
+
if (!Number.isFinite(timeoutMs) || timeoutMs <= 0) {
|
|
1100
|
+
throw new Error(`Ollama timeout must be a positive number of milliseconds, got ${timeoutMs}. A zero or negative deadline would abort every request before it was sent.`);
|
|
1101
|
+
}
|
|
1102
|
+
const inner = base ?? fetch;
|
|
1103
|
+
return async (input, init) => {
|
|
1104
|
+
const deadline = AbortSignal.timeout(timeoutMs);
|
|
1105
|
+
const signal = init?.signal ? AbortSignal.any([init.signal, deadline]) : deadline;
|
|
1106
|
+
return inner(input, { ...init, signal });
|
|
1107
|
+
};
|
|
1108
|
+
}
|
|
1109
|
+
__name(withRequestTimeout, "withRequestTimeout");
|
|
1110
|
+
|
|
1111
|
+
// ../providers/ollama/dist/client.js
|
|
1112
|
+
var OLLAMA_CAPABILITIES = {
|
|
1113
|
+
supportsTools: false,
|
|
1114
|
+
supportsStreaming: true,
|
|
1115
|
+
supportsFunctionCalling: false,
|
|
1116
|
+
supportsVision: false,
|
|
1117
|
+
// Images only. A document degrades to a named placeholder.
|
|
1118
|
+
supportsDocuments: false,
|
|
1119
|
+
supportsToolResultImages: false,
|
|
1120
|
+
supportsToolResultDocuments: false
|
|
1121
|
+
};
|
|
1122
|
+
var DEFAULT_HOST = "http://localhost:11434";
|
|
1123
|
+
function resolveHost(config) {
|
|
1124
|
+
if (config.host)
|
|
1125
|
+
return config.host;
|
|
1126
|
+
const envHost = process.env.OLLAMA_HOST;
|
|
1127
|
+
if (envHost && envHost.length > 0)
|
|
1128
|
+
return envHost;
|
|
1129
|
+
return DEFAULT_HOST;
|
|
1130
|
+
}
|
|
1131
|
+
__name(resolveHost, "resolveHost");
|
|
1132
|
+
function toOllamaMessages(messages) {
|
|
1133
|
+
return messages.map((msg) => ({
|
|
1134
|
+
role: msg.role,
|
|
1135
|
+
// A tool result can be content BLOCKS now; this wire takes text, so
|
|
1136
|
+
// flatten rather than hand it an array it cannot read.
|
|
1137
|
+
content: typeof msg.content === "string" ? msg.content : toolResultToText(msg.content ?? "")
|
|
1138
|
+
}));
|
|
1139
|
+
}
|
|
1140
|
+
__name(toOllamaMessages, "toOllamaMessages");
|
|
1141
|
+
function mapDoneReason(reason) {
|
|
1142
|
+
switch (reason) {
|
|
1143
|
+
case "length":
|
|
1144
|
+
return "length";
|
|
1145
|
+
case "stop":
|
|
1146
|
+
return "stop";
|
|
1147
|
+
default:
|
|
1148
|
+
return "stop";
|
|
1149
|
+
}
|
|
1150
|
+
}
|
|
1151
|
+
__name(mapDoneReason, "mapDoneReason");
|
|
1152
|
+
function buildUsage(resp) {
|
|
1153
|
+
const promptTokens = resp.prompt_eval_count ?? 0;
|
|
1154
|
+
const completionTokens = resp.eval_count ?? 0;
|
|
1155
|
+
return {
|
|
1156
|
+
promptTokens,
|
|
1157
|
+
completionTokens,
|
|
1158
|
+
totalTokens: promptTokens + completionTokens,
|
|
1159
|
+
cachedTokens: 0,
|
|
1160
|
+
cacheWriteTokens: 0
|
|
1161
|
+
};
|
|
1162
|
+
}
|
|
1163
|
+
__name(buildUsage, "buildUsage");
|
|
1164
|
+
async function awaitStreamStart(operation, signal) {
|
|
1165
|
+
if (!signal)
|
|
1166
|
+
return operation;
|
|
1167
|
+
let onAbort;
|
|
1168
|
+
const aborted = new Promise((_resolve, reject) => {
|
|
1169
|
+
if (signal.aborted) {
|
|
1170
|
+
reject(signal.reason);
|
|
1171
|
+
return;
|
|
1172
|
+
}
|
|
1173
|
+
onAbort = /* @__PURE__ */ __name(() => reject(signal.reason), "onAbort");
|
|
1174
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
1175
|
+
});
|
|
1176
|
+
void operation.then((stream) => {
|
|
1177
|
+
if (signal.aborted)
|
|
1178
|
+
stream.abort();
|
|
1179
|
+
}, () => void 0);
|
|
1180
|
+
try {
|
|
1181
|
+
return await Promise.race([operation, aborted]);
|
|
1182
|
+
} finally {
|
|
1183
|
+
if (onAbort)
|
|
1184
|
+
signal.removeEventListener("abort", onAbort);
|
|
1185
|
+
}
|
|
1186
|
+
}
|
|
1187
|
+
__name(awaitStreamStart, "awaitStreamStart");
|
|
1188
|
+
var OllamaProvider = class {
|
|
1189
|
+
static {
|
|
1190
|
+
__name(this, "OllamaProvider");
|
|
1191
|
+
}
|
|
1192
|
+
id = "ollama";
|
|
1193
|
+
name = "Ollama";
|
|
1194
|
+
capabilities = OLLAMA_CAPABILITIES;
|
|
1195
|
+
client;
|
|
1196
|
+
config;
|
|
1197
|
+
constructor(config = {}) {
|
|
1198
|
+
this.config = config;
|
|
1199
|
+
this.client = new Ollama2({
|
|
1200
|
+
host: resolveHost(config),
|
|
1201
|
+
fetch: withRequestTimeout(config.fetch, config.timeout)
|
|
1202
|
+
});
|
|
1203
|
+
}
|
|
1204
|
+
buildOptions(params) {
|
|
1205
|
+
const options = {};
|
|
1206
|
+
if (params.temperature !== void 0)
|
|
1207
|
+
options.temperature = params.temperature;
|
|
1208
|
+
if (params.topP !== void 0)
|
|
1209
|
+
options.top_p = params.topP;
|
|
1210
|
+
if (params.topK !== void 0)
|
|
1211
|
+
options.top_k = params.topK;
|
|
1212
|
+
if (params.maxTokens !== void 0)
|
|
1213
|
+
options.num_predict = params.maxTokens;
|
|
1214
|
+
if (params.stop)
|
|
1215
|
+
options.stop = params.stop;
|
|
1216
|
+
return options;
|
|
1217
|
+
}
|
|
1218
|
+
resolveModel(params) {
|
|
1219
|
+
const model = params.model || this.config.model;
|
|
1220
|
+
if (!model) {
|
|
1221
|
+
throw new Error("OllamaProvider: no model specified. Pass `model` on the chat params or set a default via config.");
|
|
1222
|
+
}
|
|
1223
|
+
return model;
|
|
1224
|
+
}
|
|
1225
|
+
async *chatStream(params) {
|
|
1226
|
+
assertThinkingUnsupported("OllamaProvider", params);
|
|
1227
|
+
const model = this.resolveModel(params);
|
|
1228
|
+
const messages = toOllamaMessages(params.messages);
|
|
1229
|
+
const options = this.buildOptions(params);
|
|
1230
|
+
let stream;
|
|
1231
|
+
try {
|
|
1232
|
+
params.signal?.throwIfAborted();
|
|
1233
|
+
stream = await awaitStreamStart(this.client.chat({
|
|
1234
|
+
model,
|
|
1235
|
+
messages,
|
|
1236
|
+
stream: true,
|
|
1237
|
+
...Object.keys(options).length > 0 ? { options } : {}
|
|
1238
|
+
}), params.signal);
|
|
1239
|
+
} catch (err) {
|
|
1240
|
+
if (isCallerAbortError(err, params.signal))
|
|
1241
|
+
throw params.signal?.reason ?? err;
|
|
1242
|
+
if (isProviderRequestError(err))
|
|
1243
|
+
throw err;
|
|
1244
|
+
throw providerVendorError({ providerId: "ollama", error: err });
|
|
1245
|
+
}
|
|
1246
|
+
const signal = params.signal;
|
|
1247
|
+
const onAbort = /* @__PURE__ */ __name(() => stream.abort(), "onAbort");
|
|
1248
|
+
if (signal?.aborted)
|
|
1249
|
+
stream.abort();
|
|
1250
|
+
else
|
|
1251
|
+
signal?.addEventListener("abort", onAbort, { once: true });
|
|
1252
|
+
const id = randomUUID();
|
|
1253
|
+
try {
|
|
1254
|
+
for await (const chunk of stream) {
|
|
1255
|
+
signal?.throwIfAborted();
|
|
1256
|
+
const content = chunk.message?.content;
|
|
1257
|
+
if (content && content.length > 0) {
|
|
1258
|
+
yield {
|
|
1259
|
+
id,
|
|
1260
|
+
delta: { content }
|
|
1261
|
+
};
|
|
1262
|
+
}
|
|
1263
|
+
if (chunk.done === true) {
|
|
1264
|
+
const usage = buildUsage(chunk);
|
|
1265
|
+
yield {
|
|
1266
|
+
id,
|
|
1267
|
+
delta: {},
|
|
1268
|
+
// `done_reason` was ignored and every finish reported as 'stop', so a
|
|
1269
|
+
// length-truncated answer was indistinguishable from a finished one.
|
|
1270
|
+
// The consumer that starves on this is real: the iteration loop's
|
|
1271
|
+
// auto-continuation only fires on `finishReason === 'length'`, so it
|
|
1272
|
+
// could never fire for Ollama. The field is in the vendor's own
|
|
1273
|
+
// typings, so this needs no cast.
|
|
1274
|
+
finishReason: mapDoneReason(chunk.done_reason),
|
|
1275
|
+
usage
|
|
1276
|
+
};
|
|
1277
|
+
}
|
|
1278
|
+
}
|
|
1279
|
+
} catch (err) {
|
|
1280
|
+
if (isCallerAbortError(err, signal))
|
|
1281
|
+
throw signal?.reason ?? err;
|
|
1282
|
+
if (isProviderRequestError(err))
|
|
1283
|
+
throw err;
|
|
1284
|
+
throw providerVendorError({ providerId: "ollama", error: err });
|
|
1285
|
+
} finally {
|
|
1286
|
+
signal?.removeEventListener("abort", onAbort);
|
|
1287
|
+
}
|
|
1288
|
+
}
|
|
1289
|
+
/**
|
|
1290
|
+
* A local server takes no credential, so this establishes reachability
|
|
1291
|
+
* rather than authorisation — which is the whole of what "does this work?"
|
|
1292
|
+
* can mean here. Declared so the answer comes from the driver rather than
|
|
1293
|
+
* from a listing call that happened to throw.
|
|
1294
|
+
*/
|
|
1295
|
+
async probeCredential(signal) {
|
|
1296
|
+
signal?.throwIfAborted();
|
|
1297
|
+
await this.client.list();
|
|
1298
|
+
signal?.throwIfAborted();
|
|
1299
|
+
}
|
|
1300
|
+
async listModels(signal) {
|
|
1301
|
+
signal?.throwIfAborted();
|
|
1302
|
+
const resp = await this.client.list();
|
|
1303
|
+
signal?.throwIfAborted();
|
|
1304
|
+
return resp.models.map((m) => ({
|
|
1305
|
+
id: m.name,
|
|
1306
|
+
name: m.name,
|
|
1307
|
+
// A price this driver KNOWS, not a placeholder for one it does not.
|
|
1308
|
+
// Ollama serves a server the operator runs locally and bills per
|
|
1309
|
+
// token exactly never, so zero is the true rate. Absence would say
|
|
1310
|
+
// "nobody knows" — the one thing that is untrue of it — and a
|
|
1311
|
+
// consumer is right to read `0` here as free. See
|
|
1312
|
+
// `ModelInfo.inputPrice`.
|
|
1313
|
+
inputPrice: 0,
|
|
1314
|
+
outputPrice: 0,
|
|
1315
|
+
supportsToolUse: false,
|
|
1316
|
+
supportsStreaming: true
|
|
1317
|
+
}));
|
|
1318
|
+
}
|
|
1319
|
+
async healthCheck() {
|
|
1320
|
+
try {
|
|
1321
|
+
await this.client.list();
|
|
1322
|
+
return true;
|
|
1323
|
+
} catch {
|
|
1324
|
+
return false;
|
|
1325
|
+
}
|
|
1326
|
+
}
|
|
1327
|
+
};
|
|
1328
|
+
|
|
1329
|
+
// ../providers/ollama/dist/index.js
|
|
1330
|
+
function registerOllama(options) {
|
|
1331
|
+
ProviderRegistry.register("ollama", OllamaProvider, OLLAMA_CAPABILITIES, options);
|
|
1332
|
+
}
|
|
1333
|
+
__name(registerOllama, "registerOllama");
|
|
1334
|
+
export {
|
|
1335
|
+
OLLAMA_CAPABILITIES,
|
|
1336
|
+
OllamaProvider,
|
|
1337
|
+
registerOllama
|
|
1338
|
+
};
|
|
1339
|
+
//# sourceMappingURL=dist-3AF2X4S5.js.map
|