shadow-claw 1.51.0 → 1.52.1
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/.well-known/mcp/server-card.json +1 -1
- package/.well-known/mcp.json +1 -1
- package/README.md +10 -10
- package/dist/cli/build/build.js +1 -1
- package/dist/cli/{chunk-Dtse8rAn.js → chunk-5ryVpyup.js} +1 -1
- package/dist/cli/chunk-Aq3057Xo.js +1 -0
- package/dist/cli/{chunk-4CZJpLqA.js → chunk-BV9JBYpl.js} +2 -2
- package/dist/cli/{chunk-mbFAP9Ev.js → chunk-BZI3bWDA.js} +1 -1
- package/dist/cli/chunk-BaUCHRPD.js +1 -0
- package/dist/cli/{chunk-vzUrhBN5.js → chunk-BdbEt6gM.js} +1 -1
- package/dist/cli/{chunk-DYq-orHK.js → chunk-BgTv9w0K.js} +1 -1
- package/dist/cli/{chunk-BU8UG4L_.js → chunk-BiWLawPV.js} +1 -1
- package/dist/cli/chunk-BkLnHJeo.js +1 -0
- package/dist/cli/{chunk-BqfPWIBf.js → chunk-BzWY1sKE.js} +1 -1
- package/dist/cli/{chunk-DajM7Kro.js → chunk-C79eIU-4.js} +1 -1
- package/dist/cli/{chunk-CI9r1AM5.js → chunk-CDw214Zi.js} +1 -1
- package/dist/cli/chunk-CNqc7LLn.js +1 -0
- package/dist/cli/{chunk-CEhU-Ah-.js → chunk-CWW7dqIv.js} +1 -1
- package/dist/cli/{chunk-BT_C3OlA.js → chunk-CcSTYHtR.js} +1 -1
- package/dist/cli/chunk-ClOfk6Ga.js +1 -0
- package/dist/cli/chunk-ComXUwW0.js +1 -0
- package/dist/cli/{chunk-lL1BhHVe.js → chunk-CooeO4UQ.js} +1 -1
- package/dist/cli/{chunk-khr7--yI.js → chunk-CtfWY4G6.js} +1 -1
- package/dist/cli/{chunk-C4iW1XuQ.js → chunk-DFgSiYMW.js} +1 -1
- package/dist/cli/chunk-DGBnjngK.js +1 -0
- package/dist/cli/{chunk-D7bFIUK3.js → chunk-DGu1OhJs.js} +1 -1
- package/dist/cli/{chunk-CzfOerQR.js → chunk-DIjCY0Wf.js} +1 -1
- package/dist/cli/{chunk-D-iqEY5G.js → chunk-DJ_LeQtz.js} +1 -1
- package/dist/cli/{chunk-BmEsDkRK.js → chunk-DQRu-9wO.js} +1 -1
- package/dist/cli/{chunk-DojiYody.js → chunk-DToVgO9a.js} +1 -1
- package/dist/cli/{chunk-De5a_Rlp.js → chunk-DVbNkQRL.js} +1 -1
- package/dist/cli/{chunk-c8MIYB2y.js → chunk-Ddtzaj43.js} +1 -1
- package/dist/cli/{chunk-aJ6fufe-.js → chunk-DiqS56rD.js} +1 -1
- package/dist/cli/{chunk-CeUEmZNt.js → chunk-DnRcu9b4.js} +1 -1
- package/dist/cli/chunk-DtgZDsJA.js +1 -0
- package/dist/cli/{chunk-DVMcK7g6.js → chunk-Du4qvxo_.js} +2 -2
- package/dist/cli/{chunk-CegcvNc9.js → chunk-Dz5_hgvL.js} +8 -8
- package/dist/cli/{chunk-Cd4Dv5Eq.js → chunk-I3mxEelq.js} +1 -1
- package/dist/cli/{chunk-Do3VICh1.js → chunk-IU2SH_ti.js} +1 -1
- package/dist/cli/{chunk-BQveaAaD.js → chunk-NC8XsSSA.js} +1 -1
- package/dist/cli/{chunk-D702W_Ry.js → chunk-Q4BZ9QN9.js} +1 -1
- package/dist/cli/chunk-WTlDd4Ou.js +1 -0
- package/dist/cli/chunk-XGzq5joC.js +1 -0
- package/dist/cli/{chunk-ar7eAlxK.js → chunk-aJfaGe2s.js} +8 -8
- package/dist/cli/chunk-bPVrFlmk.js +1 -0
- package/dist/cli/{chunk-C6jii2Fl.js → chunk-d5hIhj8t.js} +1 -1
- package/dist/cli/chunk-jXJHKxdR.js +1 -0
- package/dist/cli/{chunk-C3dTAmV_.js → chunk-rstVU7U0.js} +1 -1
- package/dist/cli/{chunk-DGfTzQui.js → chunk-t72uObQ7.js} +1 -1
- package/dist/cli/{chunk-DDgfljzN.js → chunk-vq8xlroY.js} +1 -1
- package/dist/cli/cli.js +1 -1
- package/dist/headless-agent.js +1 -1
- package/dist/lib/components/common/shadow-claw-provider-model-picker.js +1 -1
- package/dist/lib/components/index.js +27 -27
- package/dist/lib/components/settings/shadow-claw-accounts.js +1 -1
- package/dist/lib/components/settings/shadow-claw-channel-config.js +1 -1
- package/dist/lib/components/settings/shadow-claw-control-plane.js +1 -1
- package/dist/lib/components/settings/shadow-claw-git.js +1 -1
- package/dist/lib/components/settings/shadow-claw-integrations.js +1 -1
- package/dist/lib/components/settings/shadow-claw-llm/model-ranking.d.ts +12 -0
- package/dist/lib/components/settings/shadow-claw-llm.js +1 -1
- package/dist/lib/components/settings/shadow-claw-mcp-remote.js +1 -1
- package/dist/lib/components/settings/shadow-claw-networking.js +1 -1
- package/dist/lib/components/settings/shadow-claw-notifications.js +1 -1
- package/dist/lib/components/settings/shadow-claw-peerjs.js +1 -1
- package/dist/lib/components/settings/shadow-claw-storage.js +1 -1
- package/dist/lib/components/settings/shadow-claw-task-server.js +1 -1
- package/dist/lib/components/settings/shadow-claw-webvm.js +1 -1
- package/dist/lib/components/shadow-claw-a2ui.js +1 -1
- package/dist/lib/components/shadow-claw-accounts.js +1 -1
- package/dist/lib/components/shadow-claw-channel-config.js +1 -1
- package/dist/lib/components/shadow-claw-channels.js +1 -1
- package/dist/lib/components/shadow-claw-chat/shadow-claw-chat.d.ts +1 -0
- package/dist/lib/components/shadow-claw-chat.js +1 -1
- package/dist/lib/components/shadow-claw-control-plane.js +1 -1
- package/dist/lib/components/shadow-claw-conversations.js +1 -1
- package/dist/lib/components/shadow-claw-file-viewer.js +1 -1
- package/dist/lib/components/shadow-claw-files.js +1 -1
- package/dist/lib/components/shadow-claw-git.js +1 -1
- package/dist/lib/components/shadow-claw-integrations.js +1 -1
- package/dist/lib/components/shadow-claw-llm.js +1 -1
- package/dist/lib/components/shadow-claw-mcp-remote.js +1 -1
- package/dist/lib/components/shadow-claw-networking.js +1 -1
- package/dist/lib/components/shadow-claw-notifications.js +1 -1
- package/dist/lib/components/shadow-claw-page-header.js +1 -1
- package/dist/lib/components/shadow-claw-pages.js +1 -1
- package/dist/lib/components/shadow-claw-peerjs.js +1 -1
- package/dist/lib/components/shadow-claw-provider-model-picker.js +1 -1
- package/dist/lib/components/shadow-claw-settings.js +1 -1
- package/dist/lib/components/shadow-claw-storage.js +1 -1
- package/dist/lib/components/shadow-claw-task-server.js +1 -1
- package/dist/lib/components/shadow-claw-tasks.js +1 -1
- package/dist/lib/components/shadow-claw-terminal.js +1 -1
- package/dist/lib/components/shadow-claw-tools.js +1 -1
- package/dist/lib/components/shadow-claw-webvm.js +1 -1
- package/dist/lib/components/shadow-claw.js +1 -1
- package/dist/lib/config/config.d.ts +2 -1
- package/dist/lib/{config-DxDaVDTn.js → config-DFLs7eoC.js} +3 -2
- package/dist/lib/config-DFLs7eoC.js.map +1 -0
- package/dist/lib/{configurePeerJs-ScwZiGbF.js → configurePeerJs-DJ0H6e6s.js} +3 -3
- package/dist/lib/{configurePeerJs-ScwZiGbF.js.map → configurePeerJs-DJ0H6e6s.js.map} +1 -1
- package/dist/lib/{connections-D82zele0.js → connections-DT3nPylw.js} +2 -2
- package/dist/lib/{connections-D82zele0.js.map → connections-DT3nPylw.js.map} +1 -1
- package/dist/lib/{downloadGroupFile-D7-5y6NI.js → downloadGroupFile-DMnAiPj4.js} +2 -2
- package/dist/lib/{downloadGroupFile-D7-5y6NI.js.map → downloadGroupFile-DMnAiPj4.js.map} +1 -1
- package/dist/lib/{file-viewer-BMvvndPQ.js → file-viewer-OHmGC_l7.js} +5 -5
- package/dist/lib/{file-viewer-BMvvndPQ.js.map → file-viewer-OHmGC_l7.js.map} +1 -1
- package/dist/lib/{getGroupDir-BidwYPfP.js → getGroupDir-mTV2Iz2b.js} +3 -3
- package/dist/lib/{getGroupDir-BidwYPfP.js.map → getGroupDir-mTV2Iz2b.js.map} +1 -1
- package/dist/lib/{git-CXmWufWS.js → git-CGdKghMC.js} +3 -3
- package/dist/lib/{git-CXmWufWS.js.map → git-CGdKghMC.js.map} +1 -1
- package/dist/lib/index.js +28 -28
- package/dist/lib/{initChatSplitResize-tvUZ-wsp.js → initChatSplitResize-B8zHHQdm.js} +2 -2
- package/dist/lib/{initChatSplitResize-tvUZ-wsp.js.map → initChatSplitResize-B8zHHQdm.js.map} +1 -1
- package/dist/lib/{initControlPlane-Dnjkb-6J.js → initControlPlane-BczrlTf3.js} +14 -14
- package/dist/lib/{initControlPlane-Dnjkb-6J.js.map → initControlPlane-BczrlTf3.js.map} +1 -1
- package/dist/lib/{markdown-WCXar9C8.js → markdown-D-7Cjyye.js} +3 -3
- package/dist/lib/{markdown-WCXar9C8.js.map → markdown-D-7Cjyye.js.map} +1 -1
- package/dist/lib/{mcp-reconnect-WTOQONHZ.js → mcp-reconnect-Czf7QCCv.js} +2 -2
- package/dist/lib/{mcp-reconnect-WTOQONHZ.js.map → mcp-reconnect-Czf7QCCv.js.map} +1 -1
- package/dist/lib/{memoryStorage-Bo2Wpfmg.js → memoryStorage-CXyKsKMo.js} +2 -2
- package/dist/lib/{memoryStorage-Bo2Wpfmg.js.map → memoryStorage-CXyKsKMo.js.map} +1 -1
- package/dist/lib/model-ranking-Bo8CpGH1.js +116 -0
- package/dist/lib/model-ranking-Bo8CpGH1.js.map +1 -0
- package/dist/lib/{orchestrator-Crw4btGn.js → orchestrator-BK138MkV.js} +10 -10
- package/dist/lib/{orchestrator-Crw4btGn.js.map → orchestrator-BK138MkV.js.map} +1 -1
- package/dist/lib/{orchestrator-Dro541iH.js → orchestrator-BtbxiPQB.js} +17 -16
- package/dist/lib/{orchestrator-Dro541iH.js.map → orchestrator-BtbxiPQB.js.map} +1 -1
- package/dist/lib/{peerjs-D741bHrf.js → peerjs-QJr03K9F.js} +7 -7
- package/dist/lib/{peerjs-D741bHrf.js.map → peerjs-QJr03K9F.js.map} +1 -1
- package/dist/lib/{prompt-api-D9XdrCep.js → prompt-api-vf351sf2.js} +2 -19
- package/dist/lib/{prompt-api-D9XdrCep.js.map → prompt-api-vf351sf2.js.map} +1 -1
- package/dist/lib/{push-client-DKFUY_Ti.js → push-client-BOHgqHbk.js} +4 -4
- package/dist/lib/{push-client-DKFUY_Ti.js.map → push-client-BOHgqHbk.js.map} +1 -1
- package/dist/lib/{readGroupFileBytes-C8Xqlb8l.js → readGroupFileBytes-CRA6dmgT.js} +2 -2
- package/dist/lib/{readGroupFileBytes-C8Xqlb8l.js.map → readGroupFileBytes-CRA6dmgT.js.map} +1 -1
- package/dist/lib/{shadow-claw-a2ui-CPydWVdW.js → shadow-claw-a2ui-DbZa4Gxp.js} +2 -2
- package/dist/lib/{shadow-claw-a2ui-CPydWVdW.js.map → shadow-claw-a2ui-DbZa4Gxp.js.map} +1 -1
- package/dist/lib/{shadow-claw-accounts-CUypXc3I.js → shadow-claw-accounts-B6OW2NVD.js} +3 -3
- package/dist/lib/{shadow-claw-accounts-CUypXc3I.js.map → shadow-claw-accounts-B6OW2NVD.js.map} +1 -1
- package/dist/lib/{shadow-claw-channel-config-D_Vb2ous.js → shadow-claw-channel-config-F_EJ-uK2.js} +3 -3
- package/dist/lib/{shadow-claw-channel-config-D_Vb2ous.js.map → shadow-claw-channel-config-F_EJ-uK2.js.map} +1 -1
- package/dist/lib/{shadow-claw-channels-hgjjzvRr.js → shadow-claw-channels-XYylMpjg.js} +3 -3
- package/dist/lib/{shadow-claw-channels-hgjjzvRr.js.map → shadow-claw-channels-XYylMpjg.js.map} +1 -1
- package/dist/lib/{shadow-claw-chat-D69IiLXd.js → shadow-claw-chat-dbK_DGO_.js} +124 -38
- package/dist/lib/shadow-claw-chat-dbK_DGO_.js.map +1 -0
- package/dist/lib/{shadow-claw-control-plane-zBYlFvzQ.js → shadow-claw-control-plane-BJKkmahQ.js} +7 -7
- package/dist/lib/{shadow-claw-control-plane-zBYlFvzQ.js.map → shadow-claw-control-plane-BJKkmahQ.js.map} +1 -1
- package/dist/lib/{shadow-claw-conversations-1GW8_e8o.js → shadow-claw-conversations-BKSsMYTc.js} +6 -6
- package/dist/lib/{shadow-claw-conversations-1GW8_e8o.js.map → shadow-claw-conversations-BKSsMYTc.js.map} +1 -1
- package/dist/lib/{shadow-claw-D3z3tFyE.js → shadow-claw-eBB2dbpd.js} +11 -11
- package/dist/lib/{shadow-claw-D3z3tFyE.js.map → shadow-claw-eBB2dbpd.js.map} +1 -1
- package/dist/lib/{shadow-claw-file-viewer-DI4r7Th9.js → shadow-claw-file-viewer-BqChtTvM.js} +8 -8
- package/dist/lib/{shadow-claw-file-viewer-DI4r7Th9.js.map → shadow-claw-file-viewer-BqChtTvM.js.map} +1 -1
- package/dist/lib/{shadow-claw-files-BM7qW3TW.js → shadow-claw-files-Bu7VCQw6.js} +9 -9
- package/dist/lib/{shadow-claw-files-BM7qW3TW.js.map → shadow-claw-files-Bu7VCQw6.js.map} +1 -1
- package/dist/lib/{shadow-claw-git-BBTiTYIn.js → shadow-claw-git-CdPPN6Qb.js} +6 -6
- package/dist/lib/{shadow-claw-git-BBTiTYIn.js.map → shadow-claw-git-CdPPN6Qb.js.map} +1 -1
- package/dist/lib/{shadow-claw-integrations-DTY3E545.js → shadow-claw-integrations-DehqBSRe.js} +4 -4
- package/dist/lib/{shadow-claw-integrations-DTY3E545.js.map → shadow-claw-integrations-DehqBSRe.js.map} +1 -1
- package/dist/lib/{shadow-claw-llm-AJwzkOGo.js → shadow-claw-llm-COZkufA8.js} +13 -11
- package/dist/lib/shadow-claw-llm-COZkufA8.js.map +1 -0
- package/dist/lib/{shadow-claw-mcp-remote-n7YXKxmv.js → shadow-claw-mcp-remote-axF50-le.js} +4 -4
- package/dist/lib/{shadow-claw-mcp-remote-n7YXKxmv.js.map → shadow-claw-mcp-remote-axF50-le.js.map} +1 -1
- package/dist/lib/{shadow-claw-networking-B3leDgZ4.js → shadow-claw-networking-BT_Rxj36.js} +2 -2
- package/dist/lib/{shadow-claw-networking-B3leDgZ4.js.map → shadow-claw-networking-BT_Rxj36.js.map} +1 -1
- package/dist/lib/{shadow-claw-notifications-Bm2aHQ0U.js → shadow-claw-notifications-ClqAXDDN.js} +3 -3
- package/dist/lib/{shadow-claw-notifications-Bm2aHQ0U.js.map → shadow-claw-notifications-ClqAXDDN.js.map} +1 -1
- package/dist/lib/{shadow-claw-page-header-BBqSWlhP.js → shadow-claw-page-header-bigC_h6U.js} +2 -2
- package/dist/lib/{shadow-claw-page-header-BBqSWlhP.js.map → shadow-claw-page-header-bigC_h6U.js.map} +1 -1
- package/dist/lib/{shadow-claw-pages-BFOcluFY.js → shadow-claw-pages-CjHS50HN.js} +10 -10
- package/dist/lib/{shadow-claw-pages-BFOcluFY.js.map → shadow-claw-pages-CjHS50HN.js.map} +1 -1
- package/dist/lib/{shadow-claw-peerjs-BvD_MH_l.js → shadow-claw-peerjs-CvcH2DkA.js} +3 -3
- package/dist/lib/{shadow-claw-peerjs-BvD_MH_l.js.map → shadow-claw-peerjs-CvcH2DkA.js.map} +1 -1
- package/dist/lib/{shadow-claw-provider-model-picker-CsA-507a.js → shadow-claw-provider-model-picker-fcVQdDtQ.js} +2 -2
- package/dist/lib/{shadow-claw-provider-model-picker-CsA-507a.js.map → shadow-claw-provider-model-picker-fcVQdDtQ.js.map} +1 -1
- package/dist/lib/{shadow-claw-settings-CZgGMz0a.js → shadow-claw-settings-CkO6JjA4.js} +6 -6
- package/dist/lib/{shadow-claw-settings-CZgGMz0a.js.map → shadow-claw-settings-CkO6JjA4.js.map} +1 -1
- package/dist/lib/{shadow-claw-storage-BTUpEKO0.js → shadow-claw-storage-10w-y8vL.js} +5 -5
- package/dist/lib/{shadow-claw-storage-BTUpEKO0.js.map → shadow-claw-storage-10w-y8vL.js.map} +1 -1
- package/dist/lib/{shadow-claw-task-server-B1X2AYyZ.js → shadow-claw-task-server-U98sZxPu.js} +2 -2
- package/dist/lib/{shadow-claw-task-server-B1X2AYyZ.js.map → shadow-claw-task-server-U98sZxPu.js.map} +1 -1
- package/dist/lib/{shadow-claw-tasks-BYtaRUAd.js → shadow-claw-tasks-DrSVUOsP.js} +8 -8
- package/dist/lib/{shadow-claw-tasks-BYtaRUAd.js.map → shadow-claw-tasks-DrSVUOsP.js.map} +1 -1
- package/dist/lib/{shadow-claw-terminal-LGuXKu77.js → shadow-claw-terminal-B7HYLuce.js} +2 -2
- package/dist/lib/{shadow-claw-terminal-LGuXKu77.js.map → shadow-claw-terminal-B7HYLuce.js.map} +1 -1
- package/dist/lib/{shadow-claw-tools-C_S-xXVG.js → shadow-claw-tools-BKrXzZfF.js} +7 -7
- package/dist/lib/{shadow-claw-tools-C_S-xXVG.js.map → shadow-claw-tools-BKrXzZfF.js.map} +1 -1
- package/dist/lib/{shadow-claw-webvm-Cab1n1bu.js → shadow-claw-webvm-Duwa5oiW.js} +3 -3
- package/dist/lib/{shadow-claw-webvm-Cab1n1bu.js.map → shadow-claw-webvm-Duwa5oiW.js.map} +1 -1
- package/dist/lib/{syncWebMcpRegistration-Dy5NS_4G.js → syncWebMcpRegistration-BOx-0F6_.js} +5 -5
- package/dist/lib/{syncWebMcpRegistration-Dy5NS_4G.js.map → syncWebMcpRegistration-BOx-0F6_.js.map} +1 -1
- package/dist/lib/{tools-B7gC1eb_.js → tools-BEuBatUs.js} +4 -4
- package/dist/lib/{tools-B7gC1eb_.js.map → tools-BEuBatUs.js.map} +1 -1
- package/dist/lib/utils/index.js +1 -1
- package/dist/lib/utils/utils.js +1 -1
- package/dist/lib/{utils-D_ylqOY-.js → utils-D8AxCH6m.js} +2 -2
- package/dist/lib/{utils-D_ylqOY-.js.map → utils-D8AxCH6m.js.map} +1 -1
- package/dist/lib/{webmcp-CkYINKJj.js → webmcp-BjfVWX1K.js} +2 -2
- package/dist/lib/{webmcp-CkYINKJj.js.map → webmcp-BjfVWX1K.js.map} +1 -1
- package/dist/public/.well-known/mcp/server-card.json +1 -1
- package/dist/public/.well-known/mcp.json +1 -1
- package/dist/public/AGENTS.md +1 -1
- package/dist/public/README.md +10 -10
- package/dist/public/agent.worker.js +1 -1
- package/dist/public/components/shadow-claw-chat/shadow-claw-chat.html +1 -1
- package/dist/public/config-071HSho8.js +1 -0
- package/dist/public/{configurePeerJs-DQQ6YL-5.js → configurePeerJs-DL-LurJY.js} +1 -1
- package/dist/public/{connections-CRNk2FxF.js → connections-Bb0rBpV-.js} +1 -1
- package/dist/public/{custom-element-security-3_FKCXcg.js → custom-element-security-Td4vrRc_.js} +1 -1
- package/dist/public/docs/README.md +1 -1
- package/dist/public/docs/architecture/orchestrator.md +2 -2
- package/dist/public/docs/architecture/overview.md +3 -3
- package/dist/public/docs/architecture/worker-protocol.md +29 -29
- package/dist/public/docs/example/article/index.html +1 -1
- package/dist/public/docs/example/article.html +1 -1
- package/dist/public/docs/publishing/index.html +1 -1
- package/dist/public/docs/publishing.html +1 -1
- package/dist/public/docs/skill-creator/index.html +1 -1
- package/dist/public/docs/skill-creator.html +1 -1
- package/dist/public/docs/subsystems/local-models.md +1 -1
- package/dist/public/docs/subsystems/providers.md +12 -5
- package/dist/public/{downloadGroupFile-wkdhVgrZ.js → downloadGroupFile-Unq8_7D9.js} +1 -1
- package/dist/public/e2e/README.md +2 -2
- package/dist/public/{e2e-bridge-DnFHPuwg.js → e2e-bridge-Dbc9fCDq.js} +1 -1
- package/dist/public/{file-viewer-C92v4Ggd.js → file-viewer-QkCuknFn.js} +1 -1
- package/dist/public/{getGroupDir-BGGIJL4Y.js → getGroupDir-Bj5XCflQ.js} +1 -1
- package/dist/public/{git-BH6qyToB.js → git-Bhz4YHc8.js} +2 -2
- package/dist/public/index.html +1 -1
- package/dist/public/index.js +1 -1
- package/dist/public/{initChatSplitResize--RH5kzVF.js → initChatSplitResize-KNL9Oh7s.js} +1 -1
- package/dist/public/{initControlPlane-yPJ3ajkj.js → initControlPlane-D2fVhRFC.js} +1 -1
- package/dist/public/llms.txt +1 -1
- package/dist/public/main/index.html +1 -1
- package/dist/public/main/memory/index.html +1 -1
- package/dist/public/main/memory.html +1 -1
- package/dist/public/main.html +1 -1
- package/dist/public/{markdown-CA0v11cd.js → markdown-By6gdUvF.js} +1 -1
- package/dist/public/{mcp-reconnect-uyNSigzu.js → mcp-reconnect-CDRJPuoN.js} +1 -1
- package/dist/public/{memoryStorage-DjPNAT5t.js → memoryStorage-C-ao9y-j.js} +1 -1
- package/dist/public/model-ranking-DUdrFOcC.js +1 -0
- package/dist/public/{orchestrator-DTzgyL23.js → orchestrator-B7MpomoG.js} +2 -2
- package/dist/public/{orchestrator-Cmr69pMC.js → orchestrator-C8aIHbDy.js} +2 -2
- package/dist/public/{peerjs-Br38mUFC.js → peerjs-DwGjY5VX.js} +1 -1
- package/dist/public/prompt-api-BWe_j3Wg.js +1 -0
- package/dist/public/{push-client-CB8haOGC.js → push-client-o8g5_EOe.js} +1 -1
- package/dist/public/service-worker.js +1 -1
- package/dist/public/{shadow-claw-RuFQ2Ej5.js → shadow-claw-T9oPpqxT.js} +2 -2
- package/dist/public/{shadow-claw-accounts-BMsEItB6.js → shadow-claw-accounts-BbNPiiaV.js} +1 -1
- package/dist/public/{shadow-claw-channels-Q_AXuEaI.js → shadow-claw-channels-CHGtPkfY.js} +1 -1
- package/dist/public/{shadow-claw-chat-DZQ3OaH7.js → shadow-claw-chat-3TmjJA6-.js} +90 -23
- package/dist/public/{shadow-claw-control-plane-CyXA8tB8.js → shadow-claw-control-plane-BAFT06LL.js} +2 -2
- package/dist/public/{shadow-claw-conversations-BLKtlvHe.js → shadow-claw-conversations-DsQ_kxWm.js} +1 -1
- package/dist/public/{shadow-claw-file-viewer-CVLDfpZe.js → shadow-claw-file-viewer-hBxTknL2.js} +1 -1
- package/dist/public/{shadow-claw-files-DB6VVjir.js → shadow-claw-files-Daw6IIrJ.js} +1 -1
- package/dist/public/{shadow-claw-git-D57bTSMF.js → shadow-claw-git-CxGwyxim.js} +2 -2
- package/dist/public/{shadow-claw-integrations-BOwhUY-4.js → shadow-claw-integrations-DnIr6xp-.js} +1 -1
- package/dist/public/{shadow-claw-llm-CYenm-mm.js → shadow-claw-llm-Bc6tZ8kk.js} +3 -3
- package/dist/public/{shadow-claw-mcp-remote-CJ-Ckl0j.js → shadow-claw-mcp-remote-nGPpFpI-.js} +1 -1
- package/dist/public/{shadow-claw-networking-Cut76YQL.js → shadow-claw-networking-B6YgtiA7.js} +1 -1
- package/dist/public/{shadow-claw-notifications-C3kYCrIa.js → shadow-claw-notifications-BSxifptS.js} +1 -1
- package/dist/public/{shadow-claw-page-header-Dd7QafUk.js → shadow-claw-page-header-LzVgEn46.js} +1 -1
- package/dist/public/{shadow-claw-pages-BWtVtwTG.js → shadow-claw-pages-IW_LNEL_.js} +2 -2
- package/dist/public/{shadow-claw-settings-Bj7jnngO.js → shadow-claw-settings-DGkwt1ge.js} +2 -2
- package/dist/public/{shadow-claw-storage-CMSzQs1-.js → shadow-claw-storage-DX_4T7KR.js} +1 -1
- package/dist/public/{shadow-claw-task-server-CFclo7UX.js → shadow-claw-task-server-DTsbEs5z.js} +1 -1
- package/dist/public/{shadow-claw-tasks-ClDdeB6Z.js → shadow-claw-tasks-rr6fMxAM.js} +1 -1
- package/dist/public/{shadow-claw-terminal-3ysWZJix.js → shadow-claw-terminal-C7DhrrX6.js} +1 -1
- package/dist/public/{shadow-claw-tools-DQVwpTcZ.js → shadow-claw-tools-DcQroojH.js} +1 -1
- package/dist/public/{shadow-claw-webvm-Cnxz04Fk.js → shadow-claw-webvm-bZj44Did.js} +1 -1
- package/dist/public/{syncWebMcpRegistration-QwnLMAK3.js → syncWebMcpRegistration-XJjIlDNO.js} +1 -1
- package/dist/public/{tools-DvQ_ngXn.js → tools-BpZh7hgB.js} +1 -1
- package/dist/public/{webmcp-CJymew4t.js → webmcp-CkfDZfZ0.js} +1 -1
- package/dist/server.js +1 -1
- package/package.json +1 -1
- package/src/cli/build/build.test.ts +95 -0
- package/src/cli/build/build.ts +5 -1
- package/src/cli/commands/agent.test.ts +134 -0
- package/src/cli/commands/backup.test.ts +85 -0
- package/src/cli/commands/clients.test.ts +32 -0
- package/src/cli/commands/mcp.test.ts +260 -1
- package/src/cli/commands/send-file.test.ts +73 -0
- package/src/cli/commands/send.test.ts +58 -0
- package/src/cli/commands/tasks.test.ts +78 -0
- package/src/cli/commands/webrtc-listen.test.ts +74 -0
- package/src/cli/tools/assert-version-bump.test.ts +30 -1
- package/src/cli/tools/file-search-replace.test.ts +33 -1
- package/src/cli/tools/patch-service-worker-trusted-types.test.ts +24 -1
- package/src/cli/tools/touch-nojekyll.test.ts +12 -0
- package/src/cli/tools/version.test.ts +109 -5
- package/src/cli/utils/agent-core.test.ts +40 -0
- package/src/cli/utils/control-client.test.ts +239 -2
- package/src/cli/utils/load-workspace-config.test.ts +63 -0
- package/src/cli/utils/local-models.test.ts +98 -0
- package/src/cli/utils/progress-bar.test.ts +41 -2
- package/src/cli/utils/resolve-cache-dir.test.ts +61 -0
- package/src/cli/utils/resolve-project-root.test.ts +17 -0
- package/src/cli/utils/stdin.test.ts +38 -0
- package/src/cli/utils/stdio.test.ts +51 -1
- package/src/cli/utils/suppress-warnings.test.ts +9 -0
- package/src/cli/utils/webrtc-control-client.test.ts +569 -0
- package/src/common/utils/frontmatter.test.ts +117 -0
- package/src/components/common/help/providers.test.ts +67 -0
- package/src/components/common/shadow-claw-provider-model-picker/shadow-claw-provider-model-picker.test.ts +121 -0
- package/src/components/settings/shadow-claw-accounts/shadow-claw-accounts.test.ts +131 -0
- package/src/components/settings/shadow-claw-git/shadow-claw-git.test.ts +130 -0
- package/src/components/settings/shadow-claw-integrations/connection-test-auth.test.ts +12 -0
- package/src/components/settings/shadow-claw-integrations/shadow-claw-integrations.test.ts +328 -0
- package/src/components/settings/shadow-claw-llm/model-ranking.test.ts +121 -7
- package/src/components/settings/shadow-claw-llm/model-ranking.ts +97 -0
- package/src/components/settings/shadow-claw-llm/shadow-claw-llm.test.ts +565 -8
- package/src/components/settings/shadow-claw-llm/shadow-claw-llm.ts +15 -5
- package/src/components/settings/shadow-claw-mcp-remote/shadow-claw-mcp-remote.test.ts +459 -0
- package/src/components/settings/shadow-claw-networking/shadow-claw-networking.test.ts +88 -0
- package/src/components/settings/shadow-claw-notifications/shadow-claw-notifications.test.ts +92 -0
- package/src/components/settings/shadow-claw-peerjs/shadow-claw-peerjs.test.ts +127 -0
- package/src/components/settings/shadow-claw-storage/shadow-claw-storage.test.ts +173 -0
- package/src/components/settings/shadow-claw-task-server/shadow-claw-task-server.test.ts +62 -0
- package/src/components/settings/shadow-claw-webvm/shadow-claw-webvm.test.ts +104 -0
- package/src/components/shadow-claw/shadow-claw.test.ts +112 -0
- package/src/components/shadow-claw-a2ui/shadow-claw-a2ui.test.ts +109 -0
- package/src/components/shadow-claw-chat/shadow-claw-chat.html +81 -14
- package/src/components/shadow-claw-chat/shadow-claw-chat.test.ts +73 -0
- package/src/components/shadow-claw-chat/shadow-claw-chat.trusted-types.test.ts +3 -0
- package/src/components/shadow-claw-chat/shadow-claw-chat.ts +79 -32
- package/src/components/shadow-claw-conversations/shadow-claw-conversations.test.ts +361 -0
- package/src/components/shadow-claw-dialog/shadow-claw-dialog.test.ts +76 -0
- package/src/components/shadow-claw-file-viewer/shadow-claw-file-viewer.test.ts +307 -0
- package/src/components/shadow-claw-files/shadow-claw-files.test.ts +398 -1
- package/src/components/shadow-claw-pages/shadow-claw-pages.test.ts +85 -0
- package/src/components/shadow-claw-pages/shadow-claw-pages.ts +2 -1
- package/src/components/shadow-claw-pdf-viewer/shadow-claw-pdf-viewer.test.ts +229 -0
- package/src/components/shadow-claw-settings/shadow-claw-settings.test.ts +233 -0
- package/src/components/shadow-claw-tasks/shadow-claw-tasks.test.ts +223 -1
- package/src/components/shadow-claw-toast/shadow-claw-toast.test.ts +79 -0
- package/src/components/shadow-claw-tools/shadow-claw-tools.test.ts +229 -1
- package/src/config/config.test.ts +4 -4
- package/src/config/config.ts +2 -1
- package/src/core/orchestrator/orchestrator.test.ts +2 -1
- package/src/core/orchestrator/utils/initTasks.ts +5 -4
- package/src/server/logger.test.ts +57 -0
- package/src/server/peer.test.ts +47 -0
- package/src/server/routes/gemini.test.ts +244 -0
- package/src/server/server-peer.test.ts +245 -11
- package/src/server/services/llamafile-manager.test.ts +668 -0
- package/src/share-target/pending-shares.test.ts +90 -0
- package/src/shell/fs.test.ts +125 -0
- package/src/shell/shell.test.ts +8 -0
- package/src/subsystems/git/credentials.test.ts +260 -0
- package/src/subsystems/git/git.test.ts +64 -0
- package/src/subsystems/providers/executeNativeAiTask.test.ts +78 -0
- package/src/subsystems/providers/utils/parseLocalModelToolCall.test.ts +57 -0
- package/src/worker/tools/builtin-ai/builtin-ai.test.ts +88 -0
- package/src/worker/tools/email/email.test.ts +358 -0
- package/src/worker/tools/email/utils/resolveIntegrationEmailAuth.test.ts +120 -0
- package/src/worker/tools/email/utils/resolveUniqueAttachmentPath.test.ts +80 -0
- package/src/worker/tools/fetch-file/fetch-file.test.ts +111 -0
- package/src/worker/tools/fetch-url/fetch-url.test.ts +295 -0
- package/dist/cli/chunk-B3S061IE.js +0 -1
- package/dist/cli/chunk-BUJdF9o3.js +0 -1
- package/dist/cli/chunk-BX0R2gIY.js +0 -1
- package/dist/cli/chunk-BoiPfhwJ.js +0 -1
- package/dist/cli/chunk-BtJYj7vB.js +0 -1
- package/dist/cli/chunk-BwXrZVeU.js +0 -1
- package/dist/cli/chunk-CaWh9Pru.js +0 -1
- package/dist/cli/chunk-Ck4ePI8z.js +0 -1
- package/dist/cli/chunk-Ctg-SXcP.js +0 -1
- package/dist/cli/chunk-DTKv1-tk.js +0 -1
- package/dist/cli/chunk-DdYpd9Nu.js +0 -1
- package/dist/cli/chunk-DflhmBY2.js +0 -1
- package/dist/lib/config-DxDaVDTn.js.map +0 -1
- package/dist/lib/model-ranking-CDXs7hkK.js +0 -57
- package/dist/lib/model-ranking-CDXs7hkK.js.map +0 -1
- package/dist/lib/shadow-claw-chat-D69IiLXd.js.map +0 -1
- package/dist/lib/shadow-claw-llm-AJwzkOGo.js.map +0 -1
- package/dist/public/config-Dqn5OMfC.js +0 -1
- package/dist/public/model-ranking-DLIC9IDU.js +0 -1
- package/dist/public/prompt-api-B-8N-MRY.js +0 -11
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { jest } from "@jest/globals";
|
|
2
|
+
|
|
3
|
+
let resolveUniqueAttachmentPath: any;
|
|
4
|
+
let mockGroupFileExists: any;
|
|
5
|
+
let mockUlid: any;
|
|
6
|
+
|
|
7
|
+
describe("resolveUniqueAttachmentPath", () => {
|
|
8
|
+
beforeEach(async () => {
|
|
9
|
+
jest.resetModules();
|
|
10
|
+
mockGroupFileExists = jest.fn();
|
|
11
|
+
mockUlid = jest.fn(() => "mock-ulid-123");
|
|
12
|
+
|
|
13
|
+
jest.unstable_mockModule("../../../../storage/groupFileExists.js", () => ({
|
|
14
|
+
groupFileExists: mockGroupFileExists,
|
|
15
|
+
}));
|
|
16
|
+
jest.unstable_mockModule("../../../../utils/ulid.js", () => ({
|
|
17
|
+
ulid: mockUlid,
|
|
18
|
+
}));
|
|
19
|
+
|
|
20
|
+
const mod = await import("./resolveUniqueAttachmentPath.js");
|
|
21
|
+
resolveUniqueAttachmentPath = mod.resolveUniqueAttachmentPath;
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
it("returns base path when file does not exist", async () => {
|
|
25
|
+
mockGroupFileExists.mockResolvedValueOnce(false);
|
|
26
|
+
const result = await resolveUniqueAttachmentPath(
|
|
27
|
+
{} as any,
|
|
28
|
+
"group-1",
|
|
29
|
+
"downloads/email",
|
|
30
|
+
"file.pdf",
|
|
31
|
+
);
|
|
32
|
+
expect(result).toBe("downloads/email/file.pdf");
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
it("returns incremented name when initial exists", async () => {
|
|
36
|
+
mockGroupFileExists
|
|
37
|
+
.mockResolvedValueOnce(true)
|
|
38
|
+
.mockResolvedValueOnce(false);
|
|
39
|
+
const result = await resolveUniqueAttachmentPath(
|
|
40
|
+
{} as any,
|
|
41
|
+
"group-1",
|
|
42
|
+
"downloads/email",
|
|
43
|
+
"file.pdf",
|
|
44
|
+
);
|
|
45
|
+
expect(result).toBe("downloads/email/file-2.pdf");
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
it("handles empty directory", async () => {
|
|
49
|
+
mockGroupFileExists.mockResolvedValueOnce(false);
|
|
50
|
+
const result = await resolveUniqueAttachmentPath(
|
|
51
|
+
{} as any,
|
|
52
|
+
"group-1",
|
|
53
|
+
" ",
|
|
54
|
+
"file.txt",
|
|
55
|
+
);
|
|
56
|
+
expect(result).toBe("file.txt");
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
it("falls back to ulid when all 1000 candidate names exist", async () => {
|
|
60
|
+
mockGroupFileExists.mockResolvedValue(true);
|
|
61
|
+
const result = await resolveUniqueAttachmentPath(
|
|
62
|
+
{} as any,
|
|
63
|
+
"group-1",
|
|
64
|
+
"downloads",
|
|
65
|
+
"file.txt",
|
|
66
|
+
);
|
|
67
|
+
expect(result).toBe("downloads/mock-ulid-123-file.txt");
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
it("falls back to ulid when all 1000 candidate names exist in root directory", async () => {
|
|
71
|
+
mockGroupFileExists.mockResolvedValue(true);
|
|
72
|
+
const result = await resolveUniqueAttachmentPath(
|
|
73
|
+
{} as any,
|
|
74
|
+
"group-1",
|
|
75
|
+
"",
|
|
76
|
+
"file.txt",
|
|
77
|
+
);
|
|
78
|
+
expect(result).toBe("mock-ulid-123-file.txt");
|
|
79
|
+
});
|
|
80
|
+
});
|
|
@@ -492,4 +492,115 @@ describe("worker/tools/fetch-file — bind safety", () => {
|
|
|
492
492
|
|
|
493
493
|
expect(result).toContain("Saved");
|
|
494
494
|
});
|
|
495
|
+
|
|
496
|
+
it("handles OAuth Git re-auth required on 401", async () => {
|
|
497
|
+
const deps = makeDeps({
|
|
498
|
+
fetchImpl: jest.fn(async () =>
|
|
499
|
+
createResponse({
|
|
500
|
+
status: 401,
|
|
501
|
+
statusText: "Unauthorized",
|
|
502
|
+
contentType: "text/plain",
|
|
503
|
+
body: "auth required",
|
|
504
|
+
}),
|
|
505
|
+
),
|
|
506
|
+
resolveGitCredentials: jest
|
|
507
|
+
.fn()
|
|
508
|
+
.mockResolvedValueOnce({
|
|
509
|
+
token: "old-token",
|
|
510
|
+
authMode: "oauth",
|
|
511
|
+
accountId: "git-1",
|
|
512
|
+
} as any)
|
|
513
|
+
.mockResolvedValueOnce({
|
|
514
|
+
reauthRequired: true,
|
|
515
|
+
provider: "github",
|
|
516
|
+
} as any),
|
|
517
|
+
buildAuthHeaders: jest.fn(() => ({ Authorization: "Bearer old-token" })),
|
|
518
|
+
});
|
|
519
|
+
|
|
520
|
+
const result = await executeFetchFileTool(
|
|
521
|
+
{} as any,
|
|
522
|
+
{
|
|
523
|
+
url: "https://api.github.com/repos/org/repo/raw",
|
|
524
|
+
path: "out/file.txt",
|
|
525
|
+
use_git_auth: true,
|
|
526
|
+
},
|
|
527
|
+
"group-1",
|
|
528
|
+
deps,
|
|
529
|
+
);
|
|
530
|
+
|
|
531
|
+
expect(result).toContain("OAuth Git account reconnect required for github");
|
|
532
|
+
});
|
|
533
|
+
|
|
534
|
+
it("refreshes OAuth Git token and retries on 401", async () => {
|
|
535
|
+
let callCount = 0;
|
|
536
|
+
const deps = makeDeps({
|
|
537
|
+
fetchImpl: jest.fn(async () => {
|
|
538
|
+
callCount++;
|
|
539
|
+
if (callCount === 1) {
|
|
540
|
+
return createResponse({
|
|
541
|
+
status: 401,
|
|
542
|
+
statusText: "Unauthorized",
|
|
543
|
+
contentType: "text/plain",
|
|
544
|
+
body: "unauthorized",
|
|
545
|
+
});
|
|
546
|
+
}
|
|
547
|
+
return createResponse({
|
|
548
|
+
status: 200,
|
|
549
|
+
statusText: "OK",
|
|
550
|
+
contentType: "text/plain",
|
|
551
|
+
body: "success content",
|
|
552
|
+
});
|
|
553
|
+
}),
|
|
554
|
+
resolveGitCredentials: jest
|
|
555
|
+
.fn()
|
|
556
|
+
.mockResolvedValueOnce({
|
|
557
|
+
token: "old-token",
|
|
558
|
+
authMode: "oauth",
|
|
559
|
+
accountId: "git-1",
|
|
560
|
+
} as any)
|
|
561
|
+
.mockResolvedValueOnce({
|
|
562
|
+
token: "new-token",
|
|
563
|
+
authMode: "oauth",
|
|
564
|
+
accountId: "git-1",
|
|
565
|
+
} as any),
|
|
566
|
+
buildAuthHeaders: jest
|
|
567
|
+
.fn()
|
|
568
|
+
.mockReturnValueOnce({ Authorization: "Bearer old-token" })
|
|
569
|
+
.mockReturnValueOnce({ Authorization: "Bearer new-token" }),
|
|
570
|
+
});
|
|
571
|
+
|
|
572
|
+
const result = await executeFetchFileTool(
|
|
573
|
+
{} as any,
|
|
574
|
+
{
|
|
575
|
+
url: "https://api.github.com/repos/org/repo/raw",
|
|
576
|
+
path: "out/file.txt",
|
|
577
|
+
use_git_auth: true,
|
|
578
|
+
},
|
|
579
|
+
"group-1",
|
|
580
|
+
deps,
|
|
581
|
+
);
|
|
582
|
+
|
|
583
|
+
expect(deps.fetchImpl).toHaveBeenCalledTimes(2);
|
|
584
|
+
expect(result).toContain("Saved");
|
|
585
|
+
});
|
|
586
|
+
|
|
587
|
+
it("handles generic network fetch errors", async () => {
|
|
588
|
+
const deps = makeDeps({
|
|
589
|
+
fetchImpl: jest.fn(async () => {
|
|
590
|
+
throw new Error("Connection refused");
|
|
591
|
+
}),
|
|
592
|
+
});
|
|
593
|
+
|
|
594
|
+
const result = await executeFetchFileTool(
|
|
595
|
+
{} as any,
|
|
596
|
+
{ url: "https://unreachable.test", path: "out/file.txt" },
|
|
597
|
+
"group-1",
|
|
598
|
+
deps,
|
|
599
|
+
);
|
|
600
|
+
|
|
601
|
+
expect(result).toContain(
|
|
602
|
+
"Network Error: Failed to fetch https://unreachable.test",
|
|
603
|
+
);
|
|
604
|
+
expect(result).toContain("Connection refused");
|
|
605
|
+
});
|
|
495
606
|
});
|
|
@@ -332,4 +332,299 @@ describe("worker/tools/fetch-url", () => {
|
|
|
332
332
|
expect(statusIndex).toBeGreaterThanOrEqual(0);
|
|
333
333
|
expect(beginIndex).toBeGreaterThan(statusIndex);
|
|
334
334
|
});
|
|
335
|
+
|
|
336
|
+
it("handles binary image and pdf responses and uploads to workspace", async () => {
|
|
337
|
+
const deps = makeDeps({
|
|
338
|
+
fetchImpl: jest.fn(async () => ({
|
|
339
|
+
...createResponse({
|
|
340
|
+
status: 200,
|
|
341
|
+
statusText: "OK",
|
|
342
|
+
contentType: "image/jpeg",
|
|
343
|
+
body: "image-bytes",
|
|
344
|
+
}),
|
|
345
|
+
headers: new Map([["content-type", "image/jpeg"]]),
|
|
346
|
+
})),
|
|
347
|
+
});
|
|
348
|
+
|
|
349
|
+
const imgResult = await executeFetchUrlTool(
|
|
350
|
+
{} as any,
|
|
351
|
+
{
|
|
352
|
+
url: "https://example.com/photo",
|
|
353
|
+
include_headers: true,
|
|
354
|
+
headers: { "X-Test": "1" },
|
|
355
|
+
},
|
|
356
|
+
"group-1",
|
|
357
|
+
deps,
|
|
358
|
+
);
|
|
359
|
+
|
|
360
|
+
expect(imgResult).toContain("Successfully downloaded binary file");
|
|
361
|
+
expect(imgResult).toContain("");
|
|
362
|
+
expect(deps.uploadGroupFile).toHaveBeenCalledWith(
|
|
363
|
+
{},
|
|
364
|
+
"group-1",
|
|
365
|
+
"downloads/photo.jpg",
|
|
366
|
+
expect.any(Blob),
|
|
367
|
+
);
|
|
368
|
+
|
|
369
|
+
// PDF binary
|
|
370
|
+
deps.fetchImpl = jest.fn(async () => ({
|
|
371
|
+
...createResponse({
|
|
372
|
+
status: 200,
|
|
373
|
+
statusText: "OK",
|
|
374
|
+
contentType: "application/pdf",
|
|
375
|
+
body: "pdf-bytes",
|
|
376
|
+
}),
|
|
377
|
+
headers: new Map([["content-type", "application/pdf"]]),
|
|
378
|
+
}));
|
|
379
|
+
|
|
380
|
+
const pdfResult = await executeFetchUrlTool(
|
|
381
|
+
{} as any,
|
|
382
|
+
{ url: "https://example.com/manual" },
|
|
383
|
+
"group-1",
|
|
384
|
+
deps,
|
|
385
|
+
);
|
|
386
|
+
|
|
387
|
+
expect(pdfResult).toContain("[Attachment](downloads/manual.pdf)");
|
|
388
|
+
});
|
|
389
|
+
|
|
390
|
+
it("truncates long response bodies exceeding fetchMaxResponse", async () => {
|
|
391
|
+
const deps = makeDeps({
|
|
392
|
+
fetchMaxResponse: 20,
|
|
393
|
+
fetchImpl: jest.fn(async () =>
|
|
394
|
+
createResponse({
|
|
395
|
+
status: 200,
|
|
396
|
+
statusText: "OK",
|
|
397
|
+
contentType: "text/plain",
|
|
398
|
+
body: "01234567890123456789extra_content_here",
|
|
399
|
+
}),
|
|
400
|
+
),
|
|
401
|
+
});
|
|
402
|
+
|
|
403
|
+
const result = await executeFetchUrlTool(
|
|
404
|
+
{} as any,
|
|
405
|
+
{ url: "https://example.com/large" },
|
|
406
|
+
"group-1",
|
|
407
|
+
deps,
|
|
408
|
+
);
|
|
409
|
+
|
|
410
|
+
expect(result).toContain(
|
|
411
|
+
"--- Response truncated (showed 20 of 38 chars) ---",
|
|
412
|
+
);
|
|
413
|
+
});
|
|
414
|
+
|
|
415
|
+
it("handles git auth, reauth requirement, and 401 retry", async () => {
|
|
416
|
+
// 1. Initial reauthRequired
|
|
417
|
+
const deps1 = makeDeps({
|
|
418
|
+
resolveGitCredentials: jest.fn(async () => ({
|
|
419
|
+
token: undefined,
|
|
420
|
+
reauthRequired: true,
|
|
421
|
+
hostPattern: "github.com",
|
|
422
|
+
})),
|
|
423
|
+
});
|
|
424
|
+
|
|
425
|
+
const res1 = await executeFetchUrlTool(
|
|
426
|
+
{} as any,
|
|
427
|
+
{ url: "https://github.com/org/repo", use_git_auth: true },
|
|
428
|
+
"group-1",
|
|
429
|
+
deps1,
|
|
430
|
+
);
|
|
431
|
+
expect(res1).toContain(
|
|
432
|
+
"OAuth Git account reconnect required for github.com",
|
|
433
|
+
);
|
|
434
|
+
|
|
435
|
+
// 2. 401 on git auth with refreshed credentials needing reauth
|
|
436
|
+
const deps2 = makeDeps({
|
|
437
|
+
resolveGitCredentials: jest
|
|
438
|
+
.fn<any>()
|
|
439
|
+
.mockResolvedValueOnce({
|
|
440
|
+
token: "old-token",
|
|
441
|
+
authMode: "oauth",
|
|
442
|
+
hostPattern: "github.com",
|
|
443
|
+
})
|
|
444
|
+
.mockResolvedValueOnce({
|
|
445
|
+
token: undefined,
|
|
446
|
+
authMode: "oauth",
|
|
447
|
+
reauthRequired: true,
|
|
448
|
+
hostPattern: "github.com",
|
|
449
|
+
}),
|
|
450
|
+
buildAuthHeaders: jest.fn(() => ({ Authorization: "Bearer old-token" })),
|
|
451
|
+
fetchImpl: jest.fn(async () =>
|
|
452
|
+
createResponse({
|
|
453
|
+
status: 401,
|
|
454
|
+
statusText: "Unauthorized",
|
|
455
|
+
contentType: "text/plain",
|
|
456
|
+
body: "Bad credentials",
|
|
457
|
+
}),
|
|
458
|
+
),
|
|
459
|
+
});
|
|
460
|
+
|
|
461
|
+
const res2 = await executeFetchUrlTool(
|
|
462
|
+
{} as any,
|
|
463
|
+
{ url: "https://github.com/org/repo", use_git_auth: true },
|
|
464
|
+
"group-1",
|
|
465
|
+
deps2,
|
|
466
|
+
);
|
|
467
|
+
expect(res2).toContain(
|
|
468
|
+
"OAuth Git account reconnect required for github.com",
|
|
469
|
+
);
|
|
470
|
+
|
|
471
|
+
// 3. 401 on git auth with headers updated succeeds on second try
|
|
472
|
+
const deps3 = makeDeps({
|
|
473
|
+
resolveGitCredentials: jest
|
|
474
|
+
.fn<any>()
|
|
475
|
+
.mockResolvedValueOnce({
|
|
476
|
+
token: "token1",
|
|
477
|
+
authMode: "oauth",
|
|
478
|
+
})
|
|
479
|
+
.mockResolvedValueOnce({
|
|
480
|
+
token: "token2",
|
|
481
|
+
authMode: "oauth",
|
|
482
|
+
}),
|
|
483
|
+
buildAuthHeaders: jest
|
|
484
|
+
.fn<any>()
|
|
485
|
+
.mockReturnValueOnce({ Authorization: "Bearer token1" })
|
|
486
|
+
.mockReturnValueOnce({ Authorization: "Bearer token2" }),
|
|
487
|
+
fetchImpl: jest
|
|
488
|
+
.fn<any>()
|
|
489
|
+
.mockResolvedValueOnce(
|
|
490
|
+
createResponse({
|
|
491
|
+
status: 401,
|
|
492
|
+
statusText: "Unauthorized",
|
|
493
|
+
contentType: "text/plain",
|
|
494
|
+
body: "stale",
|
|
495
|
+
}),
|
|
496
|
+
)
|
|
497
|
+
.mockResolvedValueOnce(
|
|
498
|
+
createResponse({
|
|
499
|
+
status: 200,
|
|
500
|
+
statusText: "OK",
|
|
501
|
+
contentType: "text/plain",
|
|
502
|
+
body: "refreshed git data",
|
|
503
|
+
}),
|
|
504
|
+
),
|
|
505
|
+
});
|
|
506
|
+
|
|
507
|
+
const res3 = await executeFetchUrlTool(
|
|
508
|
+
{} as any,
|
|
509
|
+
{ url: "https://github.com/org/repo", use_git_auth: true },
|
|
510
|
+
"group-1",
|
|
511
|
+
deps3,
|
|
512
|
+
);
|
|
513
|
+
expect(res3).toContain("refreshed git data");
|
|
514
|
+
});
|
|
515
|
+
|
|
516
|
+
it("provides helpful hints on 401 and 404 responses", async () => {
|
|
517
|
+
// 401 on github without use_git_auth
|
|
518
|
+
const deps = makeDeps({
|
|
519
|
+
fetchImpl: jest.fn(async () =>
|
|
520
|
+
createResponse({
|
|
521
|
+
status: 401,
|
|
522
|
+
statusText: "Unauthorized",
|
|
523
|
+
contentType: "text/plain",
|
|
524
|
+
body: "Need auth",
|
|
525
|
+
}),
|
|
526
|
+
),
|
|
527
|
+
resolveServiceCredentials: jest.fn(
|
|
528
|
+
async () =>
|
|
529
|
+
({
|
|
530
|
+
service: "Slack",
|
|
531
|
+
hostPattern: "slack.com",
|
|
532
|
+
}) as any,
|
|
533
|
+
),
|
|
534
|
+
});
|
|
535
|
+
|
|
536
|
+
const gitHintRes = await executeFetchUrlTool(
|
|
537
|
+
{} as any,
|
|
538
|
+
{ url: "https://github.com/private/repo" },
|
|
539
|
+
"group-1",
|
|
540
|
+
deps,
|
|
541
|
+
);
|
|
542
|
+
expect(gitHintRes).toContain(
|
|
543
|
+
"This looks like a Git host and you received a 401",
|
|
544
|
+
);
|
|
545
|
+
expect(gitHintRes).toContain("use_git_auth: true");
|
|
546
|
+
|
|
547
|
+
// 401 on non-git host with saved account
|
|
548
|
+
const svcHintRes = await executeFetchUrlTool(
|
|
549
|
+
{} as any,
|
|
550
|
+
{ url: "https://slack.com/api/test" },
|
|
551
|
+
"group-1",
|
|
552
|
+
deps,
|
|
553
|
+
);
|
|
554
|
+
expect(svcHintRes).toContain(
|
|
555
|
+
'A saved account for "Slack" (slack.com) was found',
|
|
556
|
+
);
|
|
557
|
+
expect(svcHintRes).toContain("use_account_auth: true");
|
|
558
|
+
|
|
559
|
+
// Generic 404 error
|
|
560
|
+
deps.fetchImpl = jest.fn(async () =>
|
|
561
|
+
createResponse({
|
|
562
|
+
status: 404,
|
|
563
|
+
statusText: "Not Found",
|
|
564
|
+
contentType: "text/plain",
|
|
565
|
+
body: "Missing page",
|
|
566
|
+
}),
|
|
567
|
+
);
|
|
568
|
+
const notFoundRes = await executeFetchUrlTool(
|
|
569
|
+
{} as any,
|
|
570
|
+
{ url: "https://example.com/notfound" },
|
|
571
|
+
"group-1",
|
|
572
|
+
deps,
|
|
573
|
+
);
|
|
574
|
+
expect(notFoundRes).toContain("[HTTP 404 Not Found]");
|
|
575
|
+
expect(notFoundRes).toContain(
|
|
576
|
+
"Error fetching URL. Content preview:\nMissing page",
|
|
577
|
+
);
|
|
578
|
+
});
|
|
579
|
+
|
|
580
|
+
it("handles retryable error toast and exceptions", async () => {
|
|
581
|
+
const deps = makeDeps({
|
|
582
|
+
withRetry: jest.fn(async (fn: any, options: any) => {
|
|
583
|
+
// Trigger onRetry callback
|
|
584
|
+
options.onRetry(1, 3, 1000, new Error("Temporary timeout"));
|
|
585
|
+
return fn();
|
|
586
|
+
}),
|
|
587
|
+
fetchImpl: jest.fn(async () => {
|
|
588
|
+
throw new TypeError("Failed to fetch");
|
|
589
|
+
}),
|
|
590
|
+
});
|
|
591
|
+
|
|
592
|
+
const networkErr = await executeFetchUrlTool(
|
|
593
|
+
{} as any,
|
|
594
|
+
{ url: "https://broken.domain" },
|
|
595
|
+
"group-1",
|
|
596
|
+
deps,
|
|
597
|
+
);
|
|
598
|
+
|
|
599
|
+
expect(deps.post).toHaveBeenCalledWith(
|
|
600
|
+
expect.objectContaining({
|
|
601
|
+
type: "show-toast",
|
|
602
|
+
payload: expect.objectContaining({
|
|
603
|
+
message: expect.stringContaining("Temporary timeout"),
|
|
604
|
+
}),
|
|
605
|
+
}),
|
|
606
|
+
);
|
|
607
|
+
expect(networkErr).toContain(
|
|
608
|
+
"Network Error: Failed to fetch https://broken.domain",
|
|
609
|
+
);
|
|
610
|
+
|
|
611
|
+
// HttpError instance thrown during fetch
|
|
612
|
+
const { HttpError } = await import("../utils/HttpError.js");
|
|
613
|
+
deps.fetchImpl = jest.fn(async () => {
|
|
614
|
+
throw new HttpError(
|
|
615
|
+
503,
|
|
616
|
+
"Service Unavailable",
|
|
617
|
+
"Over capacity",
|
|
618
|
+
"X-Retry-After: 5\n",
|
|
619
|
+
);
|
|
620
|
+
});
|
|
621
|
+
const httpErr = await executeFetchUrlTool(
|
|
622
|
+
{} as any,
|
|
623
|
+
{ url: "https://overloaded.domain" },
|
|
624
|
+
"group-1",
|
|
625
|
+
deps,
|
|
626
|
+
);
|
|
627
|
+
expect(httpErr).toContain("[HTTP 503 Service Unavailable]");
|
|
628
|
+
expect(httpErr).toContain("Over capacity");
|
|
629
|
+
});
|
|
335
630
|
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{r as orchestratorStore}from"./chunk-DVMcK7g6.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{t as fetchDiscoveryManifest}from"./chunk-D702W_Ry.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{n as runWebRtcListenCommand}from"./chunk-BQveaAaD.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{t as resolveAgentProvider,s as runAgentRun}from"./chunk-CegcvNc9.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{t as getAgentCore}from"./chunk-khr7--yI.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{t as importRemoteArtifacts}from"./chunk-mbFAP9Ev.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{n as runWebRtcListenCommand}from"./chunk-aJ6fufe-.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{r as orchestratorStore}from"./chunk-4CZJpLqA.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{a as getMemoryOpfsRoot}from"./chunk-D7bFIUK3.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{t as fetchDiscoveryManifest}from"./chunk-D-iqEY5G.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{t as getAgentCore}from"./chunk-BU8UG4L_.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{t as importRemoteArtifacts}from"./chunk-BT_C3OlA.js";
|