shadow-claw 1.29.0 → 1.30.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/.agents/skills/main/skill-creator/SKILL.md +3 -2
- package/.agents/skills/main/skill-creator/references/frontmatter-spec.md +5 -3
- package/.well-known/agent-skills/index.json +1 -1
- package/.well-known/mcp/server-card.json +1 -1
- package/.well-known/mcp.json +1 -1
- package/dist/lib/{app-routes-CqBOeA5q.js → app-routes-BAEMLu9g.js} +3 -2
- package/dist/lib/app-routes-BAEMLu9g.js.map +1 -0
- package/dist/lib/{bundler-8JNIKwOs.js → bundler-CsL7hHMq.js} +4 -9
- package/dist/lib/{bundler-8JNIKwOs.js.map → bundler-CsL7hHMq.js.map} +1 -1
- package/dist/lib/components/index.js +26 -26
- 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.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.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-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--CFrw3J3.js → config-DjZ9QWc4.js} +2 -2
- package/dist/lib/{config--CFrw3J3.js.map → config-DjZ9QWc4.js.map} +1 -1
- package/dist/lib/{configurePeerJs-DG4hliKp.js → configurePeerJs-H0WaoT0w.js} +3 -3
- package/dist/lib/{configurePeerJs-DG4hliKp.js.map → configurePeerJs-H0WaoT0w.js.map} +1 -1
- package/dist/lib/{connections-DwjzwVz0.js → connections-BURqMIUv.js} +2 -2
- package/dist/lib/{connections-DwjzwVz0.js.map → connections-BURqMIUv.js.map} +1 -1
- package/dist/lib/content/markdown-links.d.ts +19 -0
- package/dist/lib/core/app-routes.d.ts +1 -0
- package/dist/lib/{downloadGroupFile-DmcBQU1n.js → downloadGroupFile-B8J4up2a.js} +2 -2
- package/dist/lib/{downloadGroupFile-DmcBQU1n.js.map → downloadGroupFile-B8J4up2a.js.map} +1 -1
- package/dist/lib/{file-viewer-C3YKnq_-.js → file-viewer-CwvhxAAG.js} +5 -5
- package/dist/lib/{file-viewer-C3YKnq_-.js.map → file-viewer-CwvhxAAG.js.map} +1 -1
- package/dist/lib/{getGroupDir-m0f-ekgX.js → getGroupDir-QrN2aTo8.js} +4 -4
- package/dist/lib/{getGroupDir-m0f-ekgX.js.map → getGroupDir-QrN2aTo8.js.map} +1 -1
- package/dist/lib/{git-C-Q6-IVe.js → git-DhZoe1SE.js} +3 -3
- package/dist/lib/{git-C-Q6-IVe.js.map → git-DhZoe1SE.js.map} +1 -1
- package/dist/lib/{iframe-sanitizer-CUqHuWQ-.js → iframe-sanitizer-Bujgq14T.js} +2 -2
- package/dist/lib/{iframe-sanitizer-CUqHuWQ-.js.map → iframe-sanitizer-Bujgq14T.js.map} +1 -1
- package/dist/lib/index.js +27 -27
- package/dist/lib/{initChatSplitResize-yyBTU6h9.js → initChatSplitResize-BjiWoqC_.js} +2 -2
- package/dist/lib/{initChatSplitResize-yyBTU6h9.js.map → initChatSplitResize-BjiWoqC_.js.map} +1 -1
- package/dist/lib/{initControlPlane-DnpAzphg.js → initControlPlane-C9JxQCDh.js} +16 -16
- package/dist/lib/{initControlPlane-DnpAzphg.js.map → initControlPlane-C9JxQCDh.js.map} +1 -1
- package/dist/lib/{markdown-DgdSt2GD.js → markdown-DYHmNjC4.js} +126 -5
- package/dist/lib/markdown-DYHmNjC4.js.map +1 -0
- package/dist/lib/{mcp-reconnect-C86MR3z8.js → mcp-reconnect-BxJ77WSb.js} +2 -2
- package/dist/lib/{mcp-reconnect-C86MR3z8.js.map → mcp-reconnect-BxJ77WSb.js.map} +1 -1
- package/dist/lib/{memoryStorage-UR8E8K-H.js → memoryStorage-D3FBwO9T.js} +2 -2
- package/dist/lib/{memoryStorage-UR8E8K-H.js.map → memoryStorage-D3FBwO9T.js.map} +1 -1
- package/dist/lib/{orchestrator-ClXbJ4Mb.js → orchestrator-C6dc-2OQ.js} +130 -27
- package/dist/lib/{orchestrator-ClXbJ4Mb.js.map → orchestrator-C6dc-2OQ.js.map} +1 -1
- package/dist/lib/{orchestrator-CjEau_RG.js → orchestrator-DVkyd8K9.js} +27 -17
- package/dist/lib/orchestrator-DVkyd8K9.js.map +1 -0
- package/dist/lib/{peerjs-BdfpltIe.js → peerjs-BUS9O04I.js} +274 -60
- package/dist/lib/peerjs-BUS9O04I.js.map +1 -0
- package/dist/lib/{push-client-DjwKknNg.js → push-client-4JsQGmQa.js} +3 -3
- package/dist/lib/{push-client-DjwKknNg.js.map → push-client-4JsQGmQa.js.map} +1 -1
- package/dist/lib/{readGroupFileBytes-C8oOe8Iu.js → readGroupFileBytes-CSA7u-nJ.js} +2 -2
- package/dist/lib/{readGroupFileBytes-C8oOe8Iu.js.map → readGroupFileBytes-CSA7u-nJ.js.map} +1 -1
- package/dist/lib/{shadow-claw-DcPGKenn.js → shadow-claw-BMoF8Auf.js} +11 -11
- package/dist/lib/{shadow-claw-DcPGKenn.js.map → shadow-claw-BMoF8Auf.js.map} +1 -1
- package/dist/lib/{shadow-claw-a2ui-CpZUTzlh.js → shadow-claw-a2ui-2I5nffIn.js} +2 -2
- package/dist/lib/{shadow-claw-a2ui-CpZUTzlh.js.map → shadow-claw-a2ui-2I5nffIn.js.map} +1 -1
- package/dist/lib/{shadow-claw-accounts-03oJ__XC.js → shadow-claw-accounts-BCjlgvzy.js} +3 -3
- package/dist/lib/{shadow-claw-accounts-03oJ__XC.js.map → shadow-claw-accounts-BCjlgvzy.js.map} +1 -1
- package/dist/lib/{shadow-claw-channel-config-DEL-aZ7N.js → shadow-claw-channel-config-CxQAmlDE.js} +3 -3
- package/dist/lib/{shadow-claw-channel-config-DEL-aZ7N.js.map → shadow-claw-channel-config-CxQAmlDE.js.map} +1 -1
- package/dist/lib/{shadow-claw-channels-BgaJiPdE.js → shadow-claw-channels-CuYMUVAG.js} +3 -3
- package/dist/lib/{shadow-claw-channels-BgaJiPdE.js.map → shadow-claw-channels-CuYMUVAG.js.map} +1 -1
- package/dist/lib/{shadow-claw-chat-mXPQZbwT.js → shadow-claw-chat-RFtPmmyl.js} +13 -12
- package/dist/lib/shadow-claw-chat-RFtPmmyl.js.map +1 -0
- package/dist/lib/{shadow-claw-control-plane-DO6foOLV.js → shadow-claw-control-plane-siqmRzR1.js} +7 -7
- package/dist/lib/{shadow-claw-control-plane-DO6foOLV.js.map → shadow-claw-control-plane-siqmRzR1.js.map} +1 -1
- package/dist/lib/{shadow-claw-conversations-BLwHTwdW.js → shadow-claw-conversations-DygK5y1e.js} +7 -7
- package/dist/lib/{shadow-claw-conversations-BLwHTwdW.js.map → shadow-claw-conversations-DygK5y1e.js.map} +1 -1
- package/dist/lib/{shadow-claw-file-viewer-BSbZvSl-.js → shadow-claw-file-viewer-DGMA7d7H.js} +11 -11
- package/dist/lib/shadow-claw-file-viewer-DGMA7d7H.js.map +1 -0
- package/dist/lib/{shadow-claw-files-BLVr9Pua.js → shadow-claw-files-CgD1B9J7.js} +8 -8
- package/dist/lib/{shadow-claw-files-BLVr9Pua.js.map → shadow-claw-files-CgD1B9J7.js.map} +1 -1
- package/dist/lib/{shadow-claw-git-CHC1H86J.js → shadow-claw-git-Bw1jGRrf.js} +6 -6
- package/dist/lib/{shadow-claw-git-CHC1H86J.js.map → shadow-claw-git-Bw1jGRrf.js.map} +1 -1
- package/dist/lib/{shadow-claw-integrations-Ds-CLPhj.js → shadow-claw-integrations-ChaXtvsg.js} +4 -4
- package/dist/lib/{shadow-claw-integrations-Ds-CLPhj.js.map → shadow-claw-integrations-ChaXtvsg.js.map} +1 -1
- package/dist/lib/{shadow-claw-llm-CKXfxd3D.js → shadow-claw-llm-CDM4Akjc.js} +6 -6
- package/dist/lib/{shadow-claw-llm-CKXfxd3D.js.map → shadow-claw-llm-CDM4Akjc.js.map} +1 -1
- package/dist/lib/{shadow-claw-mcp-remote-CT5Q-54E.js → shadow-claw-mcp-remote-BLxs_Z4I.js} +4 -4
- package/dist/lib/{shadow-claw-mcp-remote-CT5Q-54E.js.map → shadow-claw-mcp-remote-BLxs_Z4I.js.map} +1 -1
- package/dist/lib/{shadow-claw-networking-dpYvfchh.js → shadow-claw-networking-BYt-kMSI.js} +2 -2
- package/dist/lib/{shadow-claw-networking-dpYvfchh.js.map → shadow-claw-networking-BYt-kMSI.js.map} +1 -1
- package/dist/lib/{shadow-claw-notifications-_YeAVPga.js → shadow-claw-notifications-Dpe4EtZI.js} +3 -3
- package/dist/lib/{shadow-claw-notifications-_YeAVPga.js.map → shadow-claw-notifications-Dpe4EtZI.js.map} +1 -1
- package/dist/lib/{shadow-claw-page-header-Cti2fzf-.js → shadow-claw-page-header-P4EvWyUr.js} +2 -2
- package/dist/lib/{shadow-claw-page-header-Cti2fzf-.js.map → shadow-claw-page-header-P4EvWyUr.js.map} +1 -1
- package/dist/lib/{shadow-claw-pages-DVzZriZ7.js → shadow-claw-pages-DWd_c4d6.js} +10 -10
- package/dist/lib/{shadow-claw-pages-DVzZriZ7.js.map → shadow-claw-pages-DWd_c4d6.js.map} +1 -1
- package/dist/lib/{shadow-claw-peerjs-BvixjeBz.js → shadow-claw-peerjs-D928817m.js} +3 -3
- package/dist/lib/{shadow-claw-peerjs-BvixjeBz.js.map → shadow-claw-peerjs-D928817m.js.map} +1 -1
- package/dist/lib/{shadow-claw-settings-DV9-gD4Q.js → shadow-claw-settings-C8OPrSqs.js} +8 -8
- package/dist/lib/{shadow-claw-settings-DV9-gD4Q.js.map → shadow-claw-settings-C8OPrSqs.js.map} +1 -1
- package/dist/lib/{shadow-claw-storage-Bv__kXG6.js → shadow-claw-storage-CZ2uZJNw.js} +5 -5
- package/dist/lib/{shadow-claw-storage-Bv__kXG6.js.map → shadow-claw-storage-CZ2uZJNw.js.map} +1 -1
- package/dist/lib/{shadow-claw-task-server-DNOe8PWK.js → shadow-claw-task-server-CLT018BX.js} +2 -2
- package/dist/lib/{shadow-claw-task-server-DNOe8PWK.js.map → shadow-claw-task-server-CLT018BX.js.map} +1 -1
- package/dist/lib/{shadow-claw-tasks-qmcDT4PU.js → shadow-claw-tasks-D5h-lGmq.js} +9 -8
- package/dist/lib/shadow-claw-tasks-D5h-lGmq.js.map +1 -0
- package/dist/lib/{shadow-claw-terminal-0QUWP8of.js → shadow-claw-terminal-Cy1O6KVM.js} +2 -2
- package/dist/lib/{shadow-claw-terminal-0QUWP8of.js.map → shadow-claw-terminal-Cy1O6KVM.js.map} +1 -1
- package/dist/lib/{shadow-claw-tools-Bs_bmI6-.js → shadow-claw-tools-CVD06bCR.js} +9 -9
- package/dist/lib/{shadow-claw-tools-Bs_bmI6-.js.map → shadow-claw-tools-CVD06bCR.js.map} +1 -1
- package/dist/lib/{shadow-claw-webvm-DYaoL7QY.js → shadow-claw-webvm-DoGl5ZSJ.js} +3 -3
- package/dist/lib/{shadow-claw-webvm-DYaoL7QY.js.map → shadow-claw-webvm-DoGl5ZSJ.js.map} +1 -1
- package/dist/lib/subsystems/channels/peerjs.d.ts +37 -4
- package/dist/lib/subsystems/channels/room.d.ts +4 -0
- package/dist/lib/{syncWebMcpRegistration-BhbqI6R2.js → syncWebMcpRegistration-BeYkQEvj.js} +5 -5
- package/dist/lib/{syncWebMcpRegistration-BhbqI6R2.js.map → syncWebMcpRegistration-BeYkQEvj.js.map} +1 -1
- package/dist/lib/tools-C3Kft940.js +1 -0
- package/dist/lib/{tools-DBaMRiEu.js → tools-DKzPWc0q.js} +2 -2
- package/dist/lib/{tools-DBaMRiEu.js.map → tools-DKzPWc0q.js.map} +1 -1
- package/dist/lib/{tools-DwwB9RBa.js → tools-DqcJe8LS.js} +5 -5
- package/dist/lib/{tools-DwwB9RBa.js.map → tools-DqcJe8LS.js.map} +1 -1
- package/dist/lib/{trusted-types-Dx0RZlrd.js → trusted-types-Oz7xXJAY.js} +4 -4
- package/dist/lib/{trusted-types-Dx0RZlrd.js.map → trusted-types-Oz7xXJAY.js.map} +1 -1
- package/dist/lib/utils/index.js +1 -1
- package/dist/lib/utils/namespacedStorage.js +1 -1
- package/dist/lib/utils/utils.js +1 -1
- package/dist/lib/{webmcp-j_1_T3wf.js → webmcp-BC8_WafM.js} +4 -4
- package/dist/lib/{webmcp-j_1_T3wf.js.map → webmcp-BC8_WafM.js.map} +1 -1
- package/dist/lib/worker/utils/system-prompt.d.ts +4 -1
- package/dist/public/.agents/skills/main/skill-creator/SKILL.md +3 -2
- package/dist/public/.agents/skills/main/skill-creator/references/frontmatter-spec.md +5 -3
- package/dist/public/.well-known/agent-skills/index.json +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/agent.worker.js +18 -17
- package/dist/public/app-routes-BMQ4HFaM.js +1 -0
- package/dist/public/{bundler-Ca-Xwln8.js → bundler-0if-QelV.js} +4 -4
- package/dist/public/{config-CrHchneq.js → config-Bnwx4EfS.js} +1 -1
- package/dist/public/{configurePeerJs-B470pdeU.js → configurePeerJs-DkyGvwk_.js} +1 -1
- package/dist/public/{connections-DvbgdkaB.js → connections-6575KDGE.js} +1 -1
- package/dist/public/{custom-element-security-FU04Cq05.js → custom-element-security-BQJQ_oKz.js} +1 -1
- package/dist/public/docs/example/article/index.html +2 -2
- package/dist/public/docs/publishing/index.html +2 -2
- package/dist/public/docs/skill-creator/index.html +2 -2
- package/dist/public/docs/subsystems/skills.md +3 -1
- package/dist/public/{downloadGroupFile-D8KRJGGL.js → downloadGroupFile-Wo1Sxdhr.js} +1 -1
- package/dist/public/{e2e-bridge-CSW0S5Yz.js → e2e-bridge-CvLCUU2O.js} +1 -1
- package/dist/public/{file-viewer-Cs-riNvy.js → file-viewer-CIjqAvNF.js} +1 -1
- package/dist/public/{getGroupDir-P1h9wl6S.js → getGroupDir-BwprrdrQ.js} +1 -1
- package/dist/public/{git-7Vq_SJSp.js → git-BSnY2D-A.js} +2 -2
- package/dist/public/{iframe-sanitizer-y2Z1pPwY.js → iframe-sanitizer-viROQkRn.js} +1 -1
- package/dist/public/index.html +2 -2
- package/dist/public/index.js +1 -1
- package/dist/public/{initChatSplitResize-CzV2E7Ul.js → initChatSplitResize-BA18wLQQ.js} +1 -1
- package/dist/public/{initControlPlane-BqCY0NQy.js → initControlPlane-L96uJkRA.js} +1 -1
- package/dist/public/main/index.html +2 -2
- package/dist/public/main/memory/index.html +2 -2
- package/dist/public/{markdown-Cw7vCtTg.js → markdown-DGjZAm_w.js} +17 -14
- package/dist/public/{mcp-reconnect-9emsqGRe.js → mcp-reconnect-CBHuaYdF.js} +1 -1
- package/dist/public/{memoryStorage-C0KvLNUp.js → memoryStorage-C1llaYus.js} +1 -1
- package/dist/public/orchestrator-C0VOoTiK.js +15 -0
- package/dist/public/{orchestrator-DpkkeD6T.js → orchestrator-DMWi--Dc.js} +20 -19
- package/dist/public/peerjs-Bf6ZxfbA.js +1 -0
- package/dist/public/{push-client-CHjSbrWs.js → push-client-BD4YalBa.js} +1 -1
- package/dist/public/service-worker.js +1 -1
- package/dist/public/{shadow-claw-BBPV_9X8.js → shadow-claw-DRy-D4Qi.js} +2 -2
- package/dist/public/{shadow-claw-accounts-xUOLBsQZ.js → shadow-claw-accounts-DnfmA8cb.js} +1 -1
- package/dist/public/{shadow-claw-channels-BJvrKQjg.js → shadow-claw-channels-8UkycZAa.js} +1 -1
- package/dist/public/{shadow-claw-chat-BG2EaRaw.js → shadow-claw-chat-Cf5LUiul.js} +9 -9
- package/dist/public/{shadow-claw-control-plane-BBa7WbTg.js → shadow-claw-control-plane-UsBF-Nvd.js} +2 -2
- package/dist/public/{shadow-claw-conversations-CFaWFmkm.js → shadow-claw-conversations-Aoe61Y21.js} +1 -1
- package/dist/public/{shadow-claw-file-viewer-Z-GIKaE9.js → shadow-claw-file-viewer-D28dSSEn.js} +6 -6
- package/dist/public/{shadow-claw-files-BBx4iMsk.js → shadow-claw-files-CaDUlPEU.js} +1 -1
- package/dist/public/{shadow-claw-git-vTOKatwd.js → shadow-claw-git-DYNcZMWA.js} +2 -2
- package/dist/public/{shadow-claw-integrations-BBVnO0Fc.js → shadow-claw-integrations-BJf_hQVv.js} +1 -1
- package/dist/public/{shadow-claw-llm-Ce1Ax6-x.js → shadow-claw-llm-BqK2SIRf.js} +2 -2
- package/dist/public/{shadow-claw-mcp-remote-Bkx0gsmF.js → shadow-claw-mcp-remote-B_dDG990.js} +1 -1
- package/dist/public/{shadow-claw-networking-q4XIzdB5.js → shadow-claw-networking-D8LxOofv.js} +1 -1
- package/dist/public/{shadow-claw-notifications-D2cz0gmm.js → shadow-claw-notifications-DpVyiNG_.js} +1 -1
- package/dist/public/{shadow-claw-page-header-BccSHItx.js → shadow-claw-page-header-DdC7bJuW.js} +1 -1
- package/dist/public/{shadow-claw-pages-3335lmSC.js → shadow-claw-pages-CYMl4J-6.js} +3 -3
- package/dist/public/{shadow-claw-settings-4ptYuJwO.js → shadow-claw-settings-Da_8Oy3O.js} +3 -3
- package/dist/public/{shadow-claw-storage-bIrPKFhF.js → shadow-claw-storage-DXIm86_-.js} +1 -1
- package/dist/public/{shadow-claw-task-server-5yqVBxy1.js → shadow-claw-task-server-BCceBD0G.js} +1 -1
- package/dist/public/{shadow-claw-tasks-DcqYHPLZ.js → shadow-claw-tasks-BW1QZ5L3.js} +19 -19
- package/dist/public/{shadow-claw-terminal-fARaDONr.js → shadow-claw-terminal-vqfsxhcK.js} +1 -1
- package/dist/public/{shadow-claw-tools-paEAhcJr.js → shadow-claw-tools-l0Jsa7UJ.js} +1 -1
- package/dist/public/{shadow-claw-webvm-CbzH_vyX.js → shadow-claw-webvm-CDPOWZm7.js} +1 -1
- package/dist/public/skills/main/skill-creator/SKILL.md +3 -2
- package/dist/public/skills/main/skill-creator/references/frontmatter-spec.md +5 -3
- package/dist/public/static-main-manifest.json +2 -2
- package/dist/public/{syncWebMcpRegistration-CWSYaHex.js → syncWebMcpRegistration-5b5FkP9_.js} +1 -1
- package/dist/public/tools-B-PzsLc2.js +1 -0
- package/dist/public/{tools-C8x3nmo4.js → tools-CcgG5XuA.js} +1 -1
- package/dist/public/{tools-DvckJZG2.js → tools-VSOY66vs.js} +1 -1
- package/dist/public/{webmcp-DAjmliCx.js → webmcp-DBONjQWd.js} +1 -1
- package/dist/server.js +2 -2
- package/package.json +2 -2
- package/src/__mocks__/marked.cjs +14 -0
- package/src/components/shadow-claw-chat/shadow-claw-chat.test.ts +17 -0
- package/src/components/shadow-claw-chat/shadow-claw-chat.ts +5 -1
- package/src/components/shadow-claw-file-viewer/shadow-claw-file-viewer.test.ts +78 -0
- package/src/components/shadow-claw-file-viewer/shadow-claw-file-viewer.ts +6 -2
- package/src/components/shadow-claw-pages/utils/resolveWorkspaceLinkPath.test.ts +56 -0
- package/src/components/shadow-claw-tasks/shadow-claw-tasks.test.ts +22 -0
- package/src/components/shadow-claw-tasks/shadow-claw-tasks.ts +5 -1
- package/src/content/markdown-links.test.ts +109 -0
- package/src/content/markdown-links.ts +187 -0
- package/src/content/markdown.test.ts +33 -0
- package/src/content/markdown.ts +6 -1
- package/src/core/app-routes.test.ts +65 -0
- package/src/core/app-routes.ts +1 -1
- package/src/core/orchestrator/orchestrator.ts +3 -0
- package/src/core/orchestrator/utils/compactContext.ts +2 -0
- package/src/core/orchestrator/utils/invokeAgent.ts +1 -0
- package/src/subsystems/accounts/service-accounts.test.ts +0 -1
- package/src/subsystems/channels/peerjs.test.ts +479 -1
- package/src/subsystems/channels/peerjs.ts +420 -75
- package/src/subsystems/channels/room.test.ts +35 -0
- package/src/subsystems/channels/room.ts +15 -0
- package/src/subsystems/skills/activateSkill.test.ts +38 -5
- package/src/subsystems/skills/activateSkill.ts +25 -3
- package/src/subsystems/skills/parseSkill.test.ts +71 -0
- package/src/subsystems/skills/parseSkill.ts +185 -25
- package/src/subsystems/tools/files.ts +4 -4
- package/src/worker/tools/spawn-subagent/spawn-subagent.test.ts +22 -23
- package/src/worker/tools/workspace/send-file.test.ts +24 -1
- package/src/worker/tools/workspace/send-file.ts +6 -3
- package/src/worker/utils/handleCompact.test.ts +3 -4
- package/src/worker/utils/handleInvoke.test.ts +13 -11
- package/src/worker/utils/handleInvoke.ts +3 -0
- package/src/worker/utils/handleMessage.test.ts +0 -1
- package/src/worker/utils/post.test.ts +3 -4
- package/src/worker/utils/sandboxedEval.test.ts +1 -2
- package/src/worker/utils/system-prompt.test.ts +59 -0
- package/src/worker/utils/system-prompt.ts +21 -1
- package/src/worker/utils/withRetry.test.ts +3 -16
- package/dist/lib/app-routes-CqBOeA5q.js.map +0 -1
- package/dist/lib/markdown-DgdSt2GD.js.map +0 -1
- package/dist/lib/orchestrator-CjEau_RG.js.map +0 -1
- package/dist/lib/peerjs-BdfpltIe.js.map +0 -1
- package/dist/lib/shadow-claw-chat-mXPQZbwT.js.map +0 -1
- package/dist/lib/shadow-claw-file-viewer-BSbZvSl-.js.map +0 -1
- package/dist/lib/shadow-claw-tasks-qmcDT4PU.js.map +0 -1
- package/dist/lib/tools-D4Pp-nUw.js +0 -1
- package/dist/public/app-routes-Bs-riIvr.js +0 -1
- package/dist/public/orchestrator-BWkHHO9Y.js +0 -15
- package/dist/public/peerjs-tf2EmWjB.js +0 -1
- package/dist/public/tools-COduyYJ0.js +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as getDb } from "./txPromise-CuGh-TGK.js";
|
|
2
2
|
import { t as Signal } from "./dist-Bxg3C_zy.js";
|
|
3
|
-
import { S as PEERJS_DEFAULT_HOST } from "./config
|
|
4
|
-
import { t as readGroupFileBytes } from "./readGroupFileBytes-
|
|
5
|
-
import { Kt as writeGroupFileBytes, Zt as groupFileExists, rn as uploadGroupFile } from "./orchestrator-
|
|
3
|
+
import { S as PEERJS_DEFAULT_HOST } from "./config-DjZ9QWc4.js";
|
|
4
|
+
import { t as readGroupFileBytes } from "./readGroupFileBytes-CSA7u-nJ.js";
|
|
5
|
+
import { Kt as writeGroupFileBytes, Zt as groupFileExists, rn as uploadGroupFile } from "./orchestrator-C6dc-2OQ.js";
|
|
6
6
|
import { ulid } from "./utils/ulid.js";
|
|
7
7
|
|
|
8
8
|
//#region src/content/message-attachments.ts
|
|
@@ -670,6 +670,31 @@ var PeerTaskManager = class {
|
|
|
670
670
|
* directly without going through the non-reactive orchestratorStore.orchestrator chain.
|
|
671
671
|
*/
|
|
672
672
|
const transferProgressSignal = new Signal.State(null);
|
|
673
|
+
let transferProgressClearTimeout = null;
|
|
674
|
+
/**
|
|
675
|
+
* Update transfer progress signal and cancel any pending delayed clear timer.
|
|
676
|
+
*/
|
|
677
|
+
function updateTransferProgress(progress) {
|
|
678
|
+
if (transferProgressClearTimeout !== null) {
|
|
679
|
+
clearTimeout(transferProgressClearTimeout);
|
|
680
|
+
transferProgressClearTimeout = null;
|
|
681
|
+
}
|
|
682
|
+
transferProgressSignal.set(progress);
|
|
683
|
+
}
|
|
684
|
+
/**
|
|
685
|
+
* Clear transfer progress after a delay, ensuring any existing timer is reset.
|
|
686
|
+
*/
|
|
687
|
+
function clearTransferProgressDelayed(delayMs = 1500) {
|
|
688
|
+
if (transferProgressClearTimeout !== null) clearTimeout(transferProgressClearTimeout);
|
|
689
|
+
transferProgressClearTimeout = setTimeout(() => {
|
|
690
|
+
transferProgressSignal.set(null);
|
|
691
|
+
transferProgressClearTimeout = null;
|
|
692
|
+
}, delayMs);
|
|
693
|
+
}
|
|
694
|
+
/** Maximum chunk size in bytes for application-level file transfers (15 KB to stay safely under PeerJS 16,300 MTU after msgpack framing) */
|
|
695
|
+
const FILE_CHUNK_SIZE = 15360;
|
|
696
|
+
/** Threshold for WebRTC DataChannel bufferedAmount backpressure (64 KB) */
|
|
697
|
+
const FILE_BUFFER_DRAIN_THRESHOLD = 65536;
|
|
673
698
|
/**
|
|
674
699
|
* A PeerJS-based WebRTC data-channel messaging channel.
|
|
675
700
|
*
|
|
@@ -714,17 +739,20 @@ var PeerJsChannel = class PeerJsChannel {
|
|
|
714
739
|
_roomNotificationHandler = null;
|
|
715
740
|
/** Per-connection task managers keyed by remote peer ID */
|
|
716
741
|
_taskManagers = /* @__PURE__ */ new Map();
|
|
742
|
+
/** Inbound multi-chunk file transfers keyed by transferId */
|
|
743
|
+
_inboundTransfers = /* @__PURE__ */ new Map();
|
|
717
744
|
constructor() {
|
|
718
745
|
if (typeof globalThis.addEventListener === "function") globalThis.addEventListener("peerjs-dc-handle-chunk", (e) => {
|
|
719
746
|
if (e?.detail?.chunkInfo) {
|
|
747
|
+
if (this._inboundTransfers.size > 0) return;
|
|
720
748
|
const { count: rawCount, total } = e.detail.chunkInfo;
|
|
721
749
|
const received = rawCount + 1;
|
|
722
|
-
|
|
750
|
+
updateTransferProgress({
|
|
723
751
|
count: received,
|
|
724
752
|
total,
|
|
725
753
|
direction: "receive"
|
|
726
754
|
});
|
|
727
|
-
if (received >= total)
|
|
755
|
+
if (received >= total) clearTransferProgressDelayed(1500);
|
|
728
756
|
}
|
|
729
757
|
});
|
|
730
758
|
}
|
|
@@ -823,6 +851,74 @@ var PeerJsChannel = class PeerJsChannel {
|
|
|
823
851
|
setRoomNotificationHandler(handler) {
|
|
824
852
|
this._roomNotificationHandler = handler;
|
|
825
853
|
}
|
|
854
|
+
/**
|
|
855
|
+
* Stream file attachments to all other members in a room over WebRTC DataConnections,
|
|
856
|
+
* tagged with the room groupId.
|
|
857
|
+
*/
|
|
858
|
+
async sendAttachmentsToRoom(room, groupId, attachments) {
|
|
859
|
+
const me = this.myPeerId;
|
|
860
|
+
const fileAttachments = (attachments || []).filter((a) => !!a.path);
|
|
861
|
+
if (fileAttachments.length === 0) return;
|
|
862
|
+
try {
|
|
863
|
+
const db = await getDb();
|
|
864
|
+
for (const att of fileAttachments) {
|
|
865
|
+
let bytes;
|
|
866
|
+
try {
|
|
867
|
+
bytes = await readGroupFileBytes(db, groupId, att.path);
|
|
868
|
+
} catch (err) {
|
|
869
|
+
console.warn(`PeerJsChannel: failed to read file ${att.path} for room:`, err);
|
|
870
|
+
continue;
|
|
871
|
+
}
|
|
872
|
+
const canonicalName = att.path;
|
|
873
|
+
const mimeType = att.mimeType || "application/octet-stream";
|
|
874
|
+
const totalChunks = Math.max(1, Math.ceil(bytes.length / FILE_CHUNK_SIZE));
|
|
875
|
+
for (const member of room.members) {
|
|
876
|
+
if (member.peerId === me) continue;
|
|
877
|
+
const conn = this._getOrOpenConnection(member.peerId);
|
|
878
|
+
if (!conn) continue;
|
|
879
|
+
try {
|
|
880
|
+
await this._waitForOpen(conn);
|
|
881
|
+
const transferId = ulid();
|
|
882
|
+
conn.send({
|
|
883
|
+
type: "__file_header",
|
|
884
|
+
id: transferId,
|
|
885
|
+
name: canonicalName,
|
|
886
|
+
mimeType,
|
|
887
|
+
size: bytes.length,
|
|
888
|
+
totalChunks,
|
|
889
|
+
chunkSize: FILE_CHUNK_SIZE,
|
|
890
|
+
groupId
|
|
891
|
+
});
|
|
892
|
+
for (let i = 0; i < totalChunks; i++) {
|
|
893
|
+
const start = i * FILE_CHUNK_SIZE;
|
|
894
|
+
const end = Math.min(start + FILE_CHUNK_SIZE, bytes.length);
|
|
895
|
+
const chunk = bytes.subarray(start, end);
|
|
896
|
+
const chunkBuf = chunk.buffer.slice(chunk.byteOffset, chunk.byteOffset + chunk.byteLength);
|
|
897
|
+
conn.send({
|
|
898
|
+
type: "__file_chunk",
|
|
899
|
+
id: transferId,
|
|
900
|
+
name: canonicalName,
|
|
901
|
+
index: i,
|
|
902
|
+
totalChunks,
|
|
903
|
+
data: chunkBuf
|
|
904
|
+
});
|
|
905
|
+
updateTransferProgress({
|
|
906
|
+
count: i + 1,
|
|
907
|
+
total: totalChunks,
|
|
908
|
+
direction: "send"
|
|
909
|
+
});
|
|
910
|
+
await this._waitForBufferDrain(conn);
|
|
911
|
+
}
|
|
912
|
+
clearTransferProgressDelayed(1500);
|
|
913
|
+
} catch (err) {
|
|
914
|
+
console.warn(`PeerJsChannel: failed to stream file ${att.path} to room member ${member.peerId}:`, err);
|
|
915
|
+
}
|
|
916
|
+
}
|
|
917
|
+
}
|
|
918
|
+
} catch (err) {
|
|
919
|
+
console.error("PeerJsChannel: failed to access DB for room file transfer", err);
|
|
920
|
+
}
|
|
921
|
+
}
|
|
826
922
|
setTyping(groupId, typing) {
|
|
827
923
|
const remotePeerId = groupId.replace(/^peer:/, "");
|
|
828
924
|
const conn = this.connections.get(remotePeerId);
|
|
@@ -915,15 +1011,39 @@ var PeerJsChannel = class PeerJsChannel {
|
|
|
915
1011
|
const canonicalName = att.path;
|
|
916
1012
|
if (!pathRemap.has(att.path)) pathRemap.set(att.path, canonicalName);
|
|
917
1013
|
const mimeType = att.mimeType || "application/octet-stream";
|
|
1014
|
+
const transferId = ulid();
|
|
1015
|
+
const totalChunks = Math.max(1, Math.ceil(bytes.length / FILE_CHUNK_SIZE));
|
|
918
1016
|
conn.send({
|
|
919
1017
|
type: "__file_header",
|
|
1018
|
+
id: transferId,
|
|
920
1019
|
name: canonicalName,
|
|
921
1020
|
mimeType,
|
|
922
|
-
size: bytes.length
|
|
1021
|
+
size: bytes.length,
|
|
1022
|
+
totalChunks,
|
|
1023
|
+
chunkSize: FILE_CHUNK_SIZE,
|
|
1024
|
+
groupId
|
|
923
1025
|
});
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
1026
|
+
for (let i = 0; i < totalChunks; i++) {
|
|
1027
|
+
const start = i * FILE_CHUNK_SIZE;
|
|
1028
|
+
const end = Math.min(start + FILE_CHUNK_SIZE, bytes.length);
|
|
1029
|
+
const chunk = bytes.subarray(start, end);
|
|
1030
|
+
const chunkBuf = chunk.buffer.slice(chunk.byteOffset, chunk.byteOffset + chunk.byteLength);
|
|
1031
|
+
conn.send({
|
|
1032
|
+
type: "__file_chunk",
|
|
1033
|
+
id: transferId,
|
|
1034
|
+
name: canonicalName,
|
|
1035
|
+
index: i,
|
|
1036
|
+
totalChunks,
|
|
1037
|
+
data: chunkBuf
|
|
1038
|
+
});
|
|
1039
|
+
updateTransferProgress({
|
|
1040
|
+
count: i + 1,
|
|
1041
|
+
total: totalChunks,
|
|
1042
|
+
direction: "send"
|
|
1043
|
+
});
|
|
1044
|
+
await this._waitForBufferDrain(conn);
|
|
1045
|
+
}
|
|
1046
|
+
clearTransferProgressDelayed(1500);
|
|
927
1047
|
fileParts.push({
|
|
928
1048
|
kind: "file",
|
|
929
1049
|
name: canonicalName,
|
|
@@ -1282,25 +1402,8 @@ var PeerJsChannel = class PeerJsChannel {
|
|
|
1282
1402
|
if (data instanceof ArrayBuffer || data instanceof Uint8Array) {
|
|
1283
1403
|
if (this._pendingInboundFile) {
|
|
1284
1404
|
const canonicalName = this._pendingInboundFile.name;
|
|
1285
|
-
const groupId = `peer:${remotePeerId}`;
|
|
1286
1405
|
const bytes = new Uint8Array(data);
|
|
1287
|
-
|
|
1288
|
-
let finalName = canonicalName;
|
|
1289
|
-
let counter = 1;
|
|
1290
|
-
while (await groupFileExists(db, groupId, finalName)) {
|
|
1291
|
-
const lastDotIndex = canonicalName.lastIndexOf(".");
|
|
1292
|
-
if (lastDotIndex > 0 && lastDotIndex < canonicalName.length - 1) {
|
|
1293
|
-
const base = canonicalName.substring(0, lastDotIndex);
|
|
1294
|
-
const ext = canonicalName.substring(lastDotIndex);
|
|
1295
|
-
finalName = `${base} (${counter})${ext}`;
|
|
1296
|
-
} else finalName = `${canonicalName} (${counter})`;
|
|
1297
|
-
counter++;
|
|
1298
|
-
}
|
|
1299
|
-
if (finalName !== canonicalName) this._inboundRemap.set(canonicalName, finalName);
|
|
1300
|
-
writeGroupFileBytes(db, groupId, finalName, bytes).catch((err) => {
|
|
1301
|
-
console.error("PeerJsChannel: failed to write inbound file bytes", err);
|
|
1302
|
-
});
|
|
1303
|
-
});
|
|
1406
|
+
this._saveInboundFile(remotePeerId, canonicalName, bytes);
|
|
1304
1407
|
this._pendingInboundFile = null;
|
|
1305
1408
|
}
|
|
1306
1409
|
return;
|
|
@@ -1308,11 +1411,74 @@ var PeerJsChannel = class PeerJsChannel {
|
|
|
1308
1411
|
if (!data || typeof data !== "object") return;
|
|
1309
1412
|
const msg = data;
|
|
1310
1413
|
if (msg.type === "__file_header") {
|
|
1414
|
+
const transferId = msg.id || msg.name;
|
|
1415
|
+
const totalChunks = msg.totalChunks || 1;
|
|
1416
|
+
const existing = this._inboundTransfers.get(transferId);
|
|
1417
|
+
this._inboundTransfers.set(transferId, {
|
|
1418
|
+
transferId,
|
|
1419
|
+
name: msg.name,
|
|
1420
|
+
mimeType: msg.mimeType || "application/octet-stream",
|
|
1421
|
+
size: msg.size || 0,
|
|
1422
|
+
totalChunks,
|
|
1423
|
+
receivedChunks: existing?.receivedChunks || /* @__PURE__ */ new Map(),
|
|
1424
|
+
receivedBytes: existing?.receivedBytes || 0,
|
|
1425
|
+
targetGroupId: typeof msg.groupId === "string" ? msg.groupId : void 0
|
|
1426
|
+
});
|
|
1311
1427
|
this._pendingInboundFile = {
|
|
1312
1428
|
name: msg.name,
|
|
1313
1429
|
mimeType: msg.mimeType,
|
|
1314
1430
|
size: msg.size
|
|
1315
1431
|
};
|
|
1432
|
+
updateTransferProgress({
|
|
1433
|
+
count: 0,
|
|
1434
|
+
total: totalChunks,
|
|
1435
|
+
direction: "receive"
|
|
1436
|
+
});
|
|
1437
|
+
return;
|
|
1438
|
+
}
|
|
1439
|
+
if (msg.type === "__file_chunk") {
|
|
1440
|
+
const transferId = msg.id || msg.name;
|
|
1441
|
+
let transfer = this._inboundTransfers.get(transferId);
|
|
1442
|
+
if (!transfer) {
|
|
1443
|
+
const totalChunks = msg.totalChunks || 1;
|
|
1444
|
+
transfer = {
|
|
1445
|
+
transferId,
|
|
1446
|
+
name: msg.name,
|
|
1447
|
+
mimeType: "application/octet-stream",
|
|
1448
|
+
size: 0,
|
|
1449
|
+
totalChunks,
|
|
1450
|
+
receivedChunks: /* @__PURE__ */ new Map(),
|
|
1451
|
+
receivedBytes: 0
|
|
1452
|
+
};
|
|
1453
|
+
this._inboundTransfers.set(transferId, transfer);
|
|
1454
|
+
}
|
|
1455
|
+
const index = typeof msg.index === "number" ? msg.index : 0;
|
|
1456
|
+
const chunkData = msg.data instanceof ArrayBuffer ? new Uint8Array(msg.data) : msg.data instanceof Uint8Array ? msg.data : new Uint8Array(msg.data || []);
|
|
1457
|
+
if (!transfer.receivedChunks.has(index)) {
|
|
1458
|
+
transfer.receivedChunks.set(index, chunkData);
|
|
1459
|
+
transfer.receivedBytes += chunkData.byteLength;
|
|
1460
|
+
}
|
|
1461
|
+
updateTransferProgress({
|
|
1462
|
+
count: transfer.receivedChunks.size,
|
|
1463
|
+
total: transfer.totalChunks,
|
|
1464
|
+
direction: "receive"
|
|
1465
|
+
});
|
|
1466
|
+
if (transfer.receivedChunks.size >= transfer.totalChunks) {
|
|
1467
|
+
const completeBytes = new Uint8Array(transfer.size || transfer.receivedBytes);
|
|
1468
|
+
let offset = 0;
|
|
1469
|
+
for (let i = 0; i < transfer.totalChunks; i++) {
|
|
1470
|
+
const part = transfer.receivedChunks.get(i);
|
|
1471
|
+
if (part) {
|
|
1472
|
+
completeBytes.set(part, offset);
|
|
1473
|
+
offset += part.byteLength;
|
|
1474
|
+
}
|
|
1475
|
+
}
|
|
1476
|
+
const targetGroupId = transfer.targetGroupId || `peer:${remotePeerId}`;
|
|
1477
|
+
this._saveInboundFile(targetGroupId, transfer.name, completeBytes);
|
|
1478
|
+
this._inboundTransfers.delete(transferId);
|
|
1479
|
+
this._pendingInboundFile = null;
|
|
1480
|
+
clearTransferProgressDelayed(1500);
|
|
1481
|
+
}
|
|
1316
1482
|
return;
|
|
1317
1483
|
}
|
|
1318
1484
|
if (msg.type === "typing") {
|
|
@@ -1340,7 +1506,7 @@ var PeerJsChannel = class PeerJsChannel {
|
|
|
1340
1506
|
const action = payload.action || "";
|
|
1341
1507
|
const args = payload.args || {};
|
|
1342
1508
|
const commandId = payload.commandId || "";
|
|
1343
|
-
import("./initControlPlane-
|
|
1509
|
+
import("./initControlPlane-C9JxQCDh.js").then(({ executeClientControlCommand }) => executeClientControlCommand(action, args)).then((result) => {
|
|
1344
1510
|
const conn = this.connections.get(remotePeerId);
|
|
1345
1511
|
if (conn) {
|
|
1346
1512
|
const hasError = Boolean(result?.error);
|
|
@@ -1391,6 +1557,7 @@ var PeerJsChannel = class PeerJsChannel {
|
|
|
1391
1557
|
} catch {}
|
|
1392
1558
|
return;
|
|
1393
1559
|
}
|
|
1560
|
+
this._attachChunkProgressTracker(conn);
|
|
1394
1561
|
this.connections.set(remotePeerId, conn);
|
|
1395
1562
|
this._updateConnectedPeersSignal();
|
|
1396
1563
|
conn.on("open", () => {
|
|
@@ -1425,6 +1592,40 @@ var PeerJsChannel = class PeerJsChannel {
|
|
|
1425
1592
|
});
|
|
1426
1593
|
}
|
|
1427
1594
|
/**
|
|
1595
|
+
* Intercept incoming BinaryPack chunk handling on DataConnection to track
|
|
1596
|
+
* file reception progress without requiring a custom PeerJS fork.
|
|
1597
|
+
*/
|
|
1598
|
+
_attachChunkProgressTracker(conn) {
|
|
1599
|
+
const connAny = conn;
|
|
1600
|
+
if (connAny._chunkProgressPatched) return;
|
|
1601
|
+
connAny._chunkProgressPatched = true;
|
|
1602
|
+
const self = this;
|
|
1603
|
+
const origHandleChunk = connAny._handleChunk;
|
|
1604
|
+
if (typeof origHandleChunk === "function") connAny._handleChunk = function(data) {
|
|
1605
|
+
if (data && typeof data === "object" && "__peerData" in data) {
|
|
1606
|
+
if (self._inboundTransfers.size === 0) {
|
|
1607
|
+
const id = data.__peerData;
|
|
1608
|
+
const currentCount = this._chunkedData?.[id]?.count ?? 0;
|
|
1609
|
+
const total = data.total;
|
|
1610
|
+
if (typeof globalThis.dispatchEvent === "function" && typeof CustomEvent === "function") globalThis.dispatchEvent(new CustomEvent("peerjs-dc-handle-chunk", { detail: { chunkInfo: {
|
|
1611
|
+
count: currentCount,
|
|
1612
|
+
total
|
|
1613
|
+
} } }));
|
|
1614
|
+
else {
|
|
1615
|
+
const received = currentCount + 1;
|
|
1616
|
+
updateTransferProgress({
|
|
1617
|
+
count: received,
|
|
1618
|
+
total,
|
|
1619
|
+
direction: "receive"
|
|
1620
|
+
});
|
|
1621
|
+
if (received >= total) clearTransferProgressDelayed(1500);
|
|
1622
|
+
}
|
|
1623
|
+
}
|
|
1624
|
+
}
|
|
1625
|
+
return origHandleChunk.call(this, data);
|
|
1626
|
+
};
|
|
1627
|
+
}
|
|
1628
|
+
/**
|
|
1428
1629
|
* Handle an inbound task status update notification.
|
|
1429
1630
|
*/
|
|
1430
1631
|
_handleTaskStatusNotification(remotePeerId, params) {
|
|
@@ -1440,7 +1641,7 @@ var PeerJsChannel = class PeerJsChannel {
|
|
|
1440
1641
|
} }));
|
|
1441
1642
|
}
|
|
1442
1643
|
async _initPeer() {
|
|
1443
|
-
const { Peer } = await import("./bundler-
|
|
1644
|
+
const { Peer } = await import("./bundler-CsL7hHMq.js");
|
|
1444
1645
|
const opts = {};
|
|
1445
1646
|
const host = this.serverConfig.host ?? "0.peerjs.com";
|
|
1446
1647
|
const port = this.serverConfig.port ?? 443;
|
|
@@ -1521,41 +1722,54 @@ var PeerJsChannel = class PeerJsChannel {
|
|
|
1521
1722
|
} catch {}
|
|
1522
1723
|
}
|
|
1523
1724
|
/**
|
|
1524
|
-
*
|
|
1525
|
-
*
|
|
1725
|
+
* Pause execution if the underlying WebRTC DataChannel send buffer
|
|
1726
|
+
* exceeds the drain threshold, preventing buffer bloat during large transfers.
|
|
1526
1727
|
*/
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
resolve();
|
|
1533
|
-
return;
|
|
1534
|
-
}
|
|
1535
|
-
this.transferProgressSignal.set({
|
|
1536
|
-
count: 0,
|
|
1537
|
-
total: totalBytes,
|
|
1538
|
-
direction: "send"
|
|
1539
|
-
});
|
|
1728
|
+
async _waitForBufferDrain(conn, threshold = FILE_BUFFER_DRAIN_THRESHOLD) {
|
|
1729
|
+
const rawDc = conn.dataChannel || conn._dc;
|
|
1730
|
+
if (!rawDc || typeof rawDc.bufferedAmount !== "number") return;
|
|
1731
|
+
if (rawDc.bufferedAmount <= threshold) return;
|
|
1732
|
+
await new Promise((resolve) => {
|
|
1540
1733
|
const poll = setInterval(() => {
|
|
1541
|
-
|
|
1542
|
-
const sent = Math.max(0, totalBytes - buffered);
|
|
1543
|
-
this.transferProgressSignal.set({
|
|
1544
|
-
count: sent,
|
|
1545
|
-
total: totalBytes,
|
|
1546
|
-
direction: "send"
|
|
1547
|
-
});
|
|
1548
|
-
if (buffered === 0) {
|
|
1734
|
+
if (!rawDc || rawDc.bufferedAmount <= threshold) {
|
|
1549
1735
|
clearInterval(poll);
|
|
1550
|
-
this.transferProgressSignal.set({
|
|
1551
|
-
count: totalBytes,
|
|
1552
|
-
total: totalBytes,
|
|
1553
|
-
direction: "send"
|
|
1554
|
-
});
|
|
1555
|
-
setTimeout(() => this.transferProgressSignal.set(null), 1500);
|
|
1556
1736
|
resolve();
|
|
1557
1737
|
}
|
|
1558
|
-
},
|
|
1738
|
+
}, 20);
|
|
1739
|
+
if (typeof rawDc.addEventListener === "function") {
|
|
1740
|
+
const onLow = () => {
|
|
1741
|
+
clearInterval(poll);
|
|
1742
|
+
rawDc.removeEventListener("bufferedamountlow", onLow);
|
|
1743
|
+
resolve();
|
|
1744
|
+
};
|
|
1745
|
+
try {
|
|
1746
|
+
rawDc.bufferedAmountLowThreshold = threshold;
|
|
1747
|
+
rawDc.addEventListener("bufferedamountlow", onLow, { once: true });
|
|
1748
|
+
} catch {}
|
|
1749
|
+
}
|
|
1750
|
+
});
|
|
1751
|
+
}
|
|
1752
|
+
/**
|
|
1753
|
+
* Persist complete received file bytes into group storage, handling
|
|
1754
|
+
* duplicate filename incrementing and path remapping.
|
|
1755
|
+
*/
|
|
1756
|
+
_saveInboundFile(groupId, canonicalName, bytes) {
|
|
1757
|
+
getDb().then(async (db) => {
|
|
1758
|
+
let finalName = canonicalName;
|
|
1759
|
+
let counter = 1;
|
|
1760
|
+
while (await groupFileExists(db, groupId, finalName)) {
|
|
1761
|
+
const lastDotIndex = canonicalName.lastIndexOf(".");
|
|
1762
|
+
if (lastDotIndex > 0 && lastDotIndex < canonicalName.length - 1) {
|
|
1763
|
+
const base = canonicalName.substring(0, lastDotIndex);
|
|
1764
|
+
const ext = canonicalName.substring(lastDotIndex);
|
|
1765
|
+
finalName = `${base} (${counter})${ext}`;
|
|
1766
|
+
} else finalName = `${canonicalName} (${counter})`;
|
|
1767
|
+
counter++;
|
|
1768
|
+
}
|
|
1769
|
+
if (finalName !== canonicalName) this._inboundRemap.set(canonicalName, finalName);
|
|
1770
|
+
writeGroupFileBytes(db, groupId, finalName, bytes).catch((err) => {
|
|
1771
|
+
console.error("PeerJsChannel: failed to write inbound file bytes", err);
|
|
1772
|
+
});
|
|
1559
1773
|
});
|
|
1560
1774
|
}
|
|
1561
1775
|
_updateConnectedPeersSignal() {
|
|
@@ -1657,4 +1871,4 @@ function normalizeAttachmentPath(path) {
|
|
|
1657
1871
|
|
|
1658
1872
|
//#endregion
|
|
1659
1873
|
export { persistMessageAttachments as a, inferAttachmentMimeType as i, transferProgressSignal as n, shouldInlineAttachmentInChat as o, ROOM_METHOD as r, PeerJsChannel as t };
|
|
1660
|
-
//# sourceMappingURL=peerjs-
|
|
1874
|
+
//# sourceMappingURL=peerjs-BUS9O04I.js.map
|