shadow-claw 1.40.0 → 1.41.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/.well-known/mcp/server-card.json +2 -2
- package/.well-known/mcp/servers.json +1 -1
- package/.well-known/mcp.json +2 -2
- package/README.md +1 -0
- package/dist/cli/build/build.js +1 -1
- package/dist/cli/{chunk-Bfz2NYgD.js → chunk-0IeC97mU.js} +7 -7
- package/dist/cli/chunk-3oLxlxPn.js +1 -0
- package/dist/cli/{chunk-BXg4-9Rq2.js → chunk-8CrZyP1b2.js} +1 -1
- package/dist/cli/{chunk-BP5Hg6CM.js → chunk-B--ueArB.js} +1 -1
- package/dist/cli/chunk-BIh7rXlJ2.js +1 -0
- package/dist/cli/{chunk-Drr0VSGA2.js → chunk-BKnTOLLS2.js} +1 -1
- package/dist/cli/{chunk-C5PuRV08.js → chunk-BLMC1Bxv.js} +1 -1
- package/dist/cli/{chunk-B2tNSlFy2.js → chunk-BOigzz2U2.js} +1 -1
- package/dist/cli/{chunk-DOf3DZdR.js → chunk-BOzn335y.js} +1 -1
- package/dist/cli/chunk-BjOeVLb42.js +1 -0
- package/dist/cli/{chunk-DqTx0rRp2.js → chunk-Bjqh5_SU2.js} +1 -1
- package/dist/cli/chunk-BqWBd_jF2.js +1 -0
- package/dist/cli/{chunk-Bc9nRNyN.js → chunk-BvVUnHTq.js} +12 -9
- package/dist/cli/{chunk-DIbSoQmd2.js → chunk-C6FFByBU2.js} +2 -2
- package/dist/cli/{chunk-Drq18VZe.js → chunk-C9-aL3rF.js} +1 -1
- package/dist/cli/{chunk-BUhqHeEA2.js → chunk-C9czddEh2.js} +2 -2
- package/dist/cli/chunk-CCx8WOwz2.js +1 -0
- package/dist/cli/{chunk-BkMSjVJb.js → chunk-CK6ejMig.js} +1 -1
- package/dist/cli/chunk-CUUERioR2.js +1 -0
- package/dist/cli/chunk-CXAobnJd.js +1 -0
- package/dist/cli/chunk-CY1X0pOF2.js +1 -0
- package/dist/cli/chunk-CZvvgLVv.js +1 -0
- package/dist/cli/chunk-CbcwbfJB.js +1 -0
- package/dist/cli/{chunk-quilB3TV2.js → chunk-Ci9OJGcd2.js} +1 -1
- package/dist/cli/chunk-Cj9wl0qx.js +1 -0
- package/dist/cli/{chunk-3gRhOmGo2.js → chunk-CjJsVrKI2.js} +1 -1
- package/dist/cli/{chunk-CmEfzm-_.js → chunk-ClPZ4Rea.js} +1 -1
- package/dist/cli/{chunk-WMPAfIvV2.js → chunk-DHJCGRuG2.js} +1 -1
- package/dist/cli/{chunk-C7Y2xIk4.js → chunk-DKVkYTV9.js} +1 -1
- package/dist/cli/chunk-DR2XtWRo.js +1 -0
- package/dist/cli/{chunk-DID5VvOG.js → chunk-DTES-dE6.js} +3 -3
- package/dist/cli/{chunk-BiVJVh_S.js → chunk-DUlIqkaX.js} +7 -7
- package/dist/cli/{chunk-CkpueGaZ2.js → chunk-DjWle8FF2.js} +1 -1
- package/dist/cli/{chunk-CSvHmNOk.js → chunk-DmRXVLfy.js} +1 -1
- package/dist/cli/{chunk-BT1xXZn72.js → chunk-HlSiTC-u2.js} +1 -1
- package/dist/cli/{chunk-da0bsiOn.js → chunk-P4JSeFBI.js} +1 -1
- package/dist/cli/chunk-UcNbHaRQ.js +1 -0
- package/dist/cli/{chunk-BXFHFbEd.js → chunk-UweLmfQS.js} +1 -1
- package/dist/cli/chunk-bQQkVCw-.js +94 -0
- package/dist/cli/{chunk-CGiXWHTi2.js → chunk-gwpxl-0W2.js} +1 -1
- package/dist/cli/{chunk-NH8koEis2.js → chunk-nmDhxXH_2.js} +1 -1
- package/dist/cli/chunk-p0n_c-I2.js +1 -0
- package/dist/cli/{chunk-D7xP72La.js → chunk-q7r4FosZ.js} +1 -1
- package/dist/cli/cli.js +3 -3
- package/dist/cli/prerender/dsd-shell/prerender-dsd-shell.js +1 -1
- package/dist/electron/main.cjs +1 -1
- package/dist/headless-agent.js +1 -1
- package/dist/lib/{app-routes-BAEMLu9g.js → app-routes-CKkiX12g.js} +7 -2
- package/dist/lib/app-routes-CKkiX12g.js.map +1 -0
- 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/utils/syncSlottedSidebarActiveLinks.d.ts +10 -0
- 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/shadow-claw-file-viewer.d.ts +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-CPHDmyTx.js → config-DZkF9LiO.js} +2 -2
- package/dist/lib/{config-CPHDmyTx.js.map → config-DZkF9LiO.js.map} +1 -1
- package/dist/lib/{configurePeerJs-BsJoycQd.js → configurePeerJs-B3IE9BY2.js} +3 -3
- package/dist/lib/{configurePeerJs-BsJoycQd.js.map → configurePeerJs-B3IE9BY2.js.map} +1 -1
- package/dist/lib/{connections-BdIru7bF.js → connections-CalJGWvZ.js} +2 -2
- package/dist/lib/{connections-BdIru7bF.js.map → connections-CalJGWvZ.js.map} +1 -1
- package/dist/lib/core/orchestrator/orchestrator-state.d.ts +2 -1
- package/dist/lib/core/orchestrator/orchestrator.d.ts +2 -1
- package/dist/lib/core/orchestrator/utils/operations/task.d.ts +1 -0
- package/dist/lib/{downloadGroupFile-Dn0KsMlV.js → downloadGroupFile-DDE1fIhJ.js} +2 -2
- package/dist/lib/{downloadGroupFile-Dn0KsMlV.js.map → downloadGroupFile-DDE1fIhJ.js.map} +1 -1
- package/dist/lib/{file-viewer-BYrXXu-X.js → file-viewer-Bll2EoGc.js} +5 -5
- package/dist/lib/{file-viewer-BYrXXu-X.js.map → file-viewer-Bll2EoGc.js.map} +1 -1
- package/dist/lib/{getGroupDir-DF-RZO8X.js → getGroupDir-MHv7Lvmp.js} +4 -4
- package/dist/lib/{getGroupDir-DF-RZO8X.js.map → getGroupDir-MHv7Lvmp.js.map} +1 -1
- package/dist/lib/{git-s_0cgKm1.js → git-Bv_M3dgw.js} +3 -3
- package/dist/lib/{git-s_0cgKm1.js.map → git-Bv_M3dgw.js.map} +1 -1
- package/dist/lib/{iframe-sanitizer-DFdda1jJ.js → iframe-sanitizer-C7ZGDjEI.js} +2 -2
- package/dist/lib/{iframe-sanitizer-DFdda1jJ.js.map → iframe-sanitizer-C7ZGDjEI.js.map} +1 -1
- package/dist/lib/{iframe-storage-proxy-qrhZmQyO.js → iframe-storage-proxy-CR8ZYHPd.js} +2 -2
- package/dist/lib/{iframe-storage-proxy-qrhZmQyO.js.map → iframe-storage-proxy-CR8ZYHPd.js.map} +1 -1
- package/dist/lib/index.js +27 -27
- package/dist/lib/{initChatSplitResize-DuNlwCuI.js → initChatSplitResize-DiKTI-wk.js} +2 -2
- package/dist/lib/{initChatSplitResize-DuNlwCuI.js.map → initChatSplitResize-DiKTI-wk.js.map} +1 -1
- package/dist/lib/{initControlPlane-D4UZ4EhV.js → initControlPlane-CzjtQ4aM.js} +15 -15
- package/dist/lib/{initControlPlane-D4UZ4EhV.js.map → initControlPlane-CzjtQ4aM.js.map} +1 -1
- package/dist/lib/{markdown-CRRwbN9h.js → markdown-k8wA9LKy.js} +4 -4
- package/dist/lib/{markdown-CRRwbN9h.js.map → markdown-k8wA9LKy.js.map} +1 -1
- package/dist/lib/{mcp-reconnect-COdZ-cea.js → mcp-reconnect-CGIdfZnS.js} +2 -2
- package/dist/lib/{mcp-reconnect-COdZ-cea.js.map → mcp-reconnect-CGIdfZnS.js.map} +1 -1
- package/dist/lib/{memoryStorage-BsMe2FOQ.js → memoryStorage-DL-Bo3dh.js} +2 -2
- package/dist/lib/{memoryStorage-BsMe2FOQ.js.map → memoryStorage-DL-Bo3dh.js.map} +1 -1
- package/dist/lib/{orchestrator-D9f5fDCb.js → orchestrator-DKHCoikY.js} +11 -11
- package/dist/lib/{orchestrator-D9f5fDCb.js.map → orchestrator-DKHCoikY.js.map} +1 -1
- package/dist/lib/{orchestrator-Bq9ft3uG.js → orchestrator-Dn1ZOz9B.js} +20 -24
- package/dist/lib/orchestrator-Dn1ZOz9B.js.map +1 -0
- package/dist/lib/{peerjs-6u8KtenE.js → peerjs-BK41iBvP.js} +7 -7
- package/dist/lib/{peerjs-6u8KtenE.js.map → peerjs-BK41iBvP.js.map} +1 -1
- package/dist/lib/{push-client-DCnB2-OU.js → push-client-DKgVFD2Z.js} +3 -3
- package/dist/lib/{push-client-DCnB2-OU.js.map → push-client-DKgVFD2Z.js.map} +1 -1
- package/dist/lib/{readGroupFileBytes-nKNJ6sbl.js → readGroupFileBytes-CgU_UfGv.js} +2 -2
- package/dist/lib/{readGroupFileBytes-nKNJ6sbl.js.map → readGroupFileBytes-CgU_UfGv.js.map} +1 -1
- package/dist/lib/{shadow-claw-MumteAJy.js → shadow-claw-CtCj5Rn_.js} +121 -16
- package/dist/lib/shadow-claw-CtCj5Rn_.js.map +1 -0
- package/dist/lib/{shadow-claw-a2ui-Dipe8nY2.js → shadow-claw-a2ui-CvK5w940.js} +2 -2
- package/dist/lib/{shadow-claw-a2ui-Dipe8nY2.js.map → shadow-claw-a2ui-CvK5w940.js.map} +1 -1
- package/dist/lib/{shadow-claw-accounts-BgCkz3Zv.js → shadow-claw-accounts-Br3XdHro.js} +3 -3
- package/dist/lib/{shadow-claw-accounts-BgCkz3Zv.js.map → shadow-claw-accounts-Br3XdHro.js.map} +1 -1
- package/dist/lib/{shadow-claw-channel-config-CIm_Bxd2.js → shadow-claw-channel-config-Da2dN19M.js} +3 -3
- package/dist/lib/{shadow-claw-channel-config-CIm_Bxd2.js.map → shadow-claw-channel-config-Da2dN19M.js.map} +1 -1
- package/dist/lib/{shadow-claw-channels-CaceK52s.js → shadow-claw-channels-BofYHgz8.js} +3 -3
- package/dist/lib/{shadow-claw-channels-CaceK52s.js.map → shadow-claw-channels-BofYHgz8.js.map} +1 -1
- package/dist/lib/{shadow-claw-chat-BD18-mAR.js → shadow-claw-chat-Dw32DPV2.js} +12 -12
- package/dist/lib/{shadow-claw-chat-BD18-mAR.js.map → shadow-claw-chat-Dw32DPV2.js.map} +1 -1
- package/dist/lib/{shadow-claw-control-plane-U6LsfRPm.js → shadow-claw-control-plane-CwFotFDh.js} +7 -7
- package/dist/lib/{shadow-claw-control-plane-U6LsfRPm.js.map → shadow-claw-control-plane-CwFotFDh.js.map} +1 -1
- package/dist/lib/{shadow-claw-conversations-CDsza_oB.js → shadow-claw-conversations-0UXge23k.js} +5 -5
- package/dist/lib/{shadow-claw-conversations-CDsza_oB.js.map → shadow-claw-conversations-0UXge23k.js.map} +1 -1
- package/dist/lib/{shadow-claw-file-viewer-CMOnFmcP.js → shadow-claw-file-viewer-CAsn9NxH.js} +30 -30
- package/dist/lib/{shadow-claw-file-viewer-CMOnFmcP.js.map → shadow-claw-file-viewer-CAsn9NxH.js.map} +1 -1
- package/dist/lib/{shadow-claw-files-BI0P3m8a.js → shadow-claw-files-xGGhsHNH.js} +9 -9
- package/dist/lib/{shadow-claw-files-BI0P3m8a.js.map → shadow-claw-files-xGGhsHNH.js.map} +1 -1
- package/dist/lib/{shadow-claw-git-xRApLEMN.js → shadow-claw-git-B606hcMU.js} +6 -6
- package/dist/lib/{shadow-claw-git-xRApLEMN.js.map → shadow-claw-git-B606hcMU.js.map} +1 -1
- package/dist/lib/{shadow-claw-integrations-B2e1Nfg1.js → shadow-claw-integrations-Bwq5cba1.js} +4 -4
- package/dist/lib/{shadow-claw-integrations-B2e1Nfg1.js.map → shadow-claw-integrations-Bwq5cba1.js.map} +1 -1
- package/dist/lib/{shadow-claw-llm-Bc2mWuGb.js → shadow-claw-llm-BgpcMBIy.js} +6 -6
- package/dist/lib/{shadow-claw-llm-Bc2mWuGb.js.map → shadow-claw-llm-BgpcMBIy.js.map} +1 -1
- package/dist/lib/{shadow-claw-mcp-remote-D_Bh3aeC.js → shadow-claw-mcp-remote-DvQCA-Bk.js} +4 -4
- package/dist/lib/{shadow-claw-mcp-remote-D_Bh3aeC.js.map → shadow-claw-mcp-remote-DvQCA-Bk.js.map} +1 -1
- package/dist/lib/{shadow-claw-networking-F5W3n5ci.js → shadow-claw-networking-Cxvf9c7E.js} +2 -2
- package/dist/lib/{shadow-claw-networking-F5W3n5ci.js.map → shadow-claw-networking-Cxvf9c7E.js.map} +1 -1
- package/dist/lib/{shadow-claw-notifications-lvMt9WJ1.js → shadow-claw-notifications-CGVcFYBy.js} +3 -3
- package/dist/lib/{shadow-claw-notifications-lvMt9WJ1.js.map → shadow-claw-notifications-CGVcFYBy.js.map} +1 -1
- package/dist/lib/{shadow-claw-page-header-6gq6EMqX.js → shadow-claw-page-header-DAYz3I_o.js} +2 -2
- package/dist/lib/{shadow-claw-page-header-6gq6EMqX.js.map → shadow-claw-page-header-DAYz3I_o.js.map} +1 -1
- package/dist/lib/{shadow-claw-pages-Bo8_z2S-.js → shadow-claw-pages-BLeEZb9k.js} +24 -12
- package/dist/lib/shadow-claw-pages-BLeEZb9k.js.map +1 -0
- package/dist/lib/{shadow-claw-peerjs-DRTLCVDQ.js → shadow-claw-peerjs-BcFnbK74.js} +3 -3
- package/dist/lib/{shadow-claw-peerjs-DRTLCVDQ.js.map → shadow-claw-peerjs-BcFnbK74.js.map} +1 -1
- package/dist/lib/{shadow-claw-settings-D00B4p4L.js → shadow-claw-settings-B7o0Z4hu.js} +9 -9
- package/dist/lib/{shadow-claw-settings-D00B4p4L.js.map → shadow-claw-settings-B7o0Z4hu.js.map} +1 -1
- package/dist/lib/{shadow-claw-storage-DgMe7-Zo.js → shadow-claw-storage-afMVqB7E.js} +5 -5
- package/dist/lib/{shadow-claw-storage-DgMe7-Zo.js.map → shadow-claw-storage-afMVqB7E.js.map} +1 -1
- package/dist/lib/{shadow-claw-task-server-D103YOuI.js → shadow-claw-task-server-B9-MQjl6.js} +2 -2
- package/dist/lib/{shadow-claw-task-server-D103YOuI.js.map → shadow-claw-task-server-B9-MQjl6.js.map} +1 -1
- package/dist/lib/{shadow-claw-tasks-6OhALkq1.js → shadow-claw-tasks-Dc4BC-t-.js} +8 -8
- package/dist/lib/{shadow-claw-tasks-6OhALkq1.js.map → shadow-claw-tasks-Dc4BC-t-.js.map} +1 -1
- package/dist/lib/{shadow-claw-terminal-BGtxA1qD.js → shadow-claw-terminal-BINcTdsk.js} +2 -2
- package/dist/lib/{shadow-claw-terminal-BGtxA1qD.js.map → shadow-claw-terminal-BINcTdsk.js.map} +1 -1
- package/dist/lib/{shadow-claw-tools-OeIwAnnd.js → shadow-claw-tools-BjFgXNLR.js} +7 -7
- package/dist/lib/{shadow-claw-tools-OeIwAnnd.js.map → shadow-claw-tools-BjFgXNLR.js.map} +1 -1
- package/dist/lib/{shadow-claw-webvm-gVFZ197u.js → shadow-claw-webvm-Xe3ByMDw.js} +3 -3
- package/dist/lib/{shadow-claw-webvm-gVFZ197u.js.map → shadow-claw-webvm-Xe3ByMDw.js.map} +1 -1
- package/dist/lib/subsystems/mcp/webmcp.d.ts +64 -0
- package/dist/lib/{syncWebMcpRegistration-Bbph0XZl.js → syncWebMcpRegistration-D7alChz0.js} +21 -6
- package/dist/lib/syncWebMcpRegistration-D7alChz0.js.map +1 -0
- package/dist/lib/{tools-D0OlSzMD.js → tools-Cmhpk3X8.js} +4 -4
- package/dist/lib/{tools-D0OlSzMD.js.map → tools-Cmhpk3X8.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/{utils-DYdrO2KI.js → utils-CzgKe_XZ.js} +4 -4
- package/dist/lib/{utils-DYdrO2KI.js.map → utils-CzgKe_XZ.js.map} +1 -1
- package/dist/lib/{webmcp-D2bocsgh.js → webmcp-oEP9YpR2.js} +119 -3
- package/dist/lib/{webmcp-D2bocsgh.js.map → webmcp-oEP9YpR2.js.map} +1 -1
- package/dist/public/.well-known/mcp/server-card.json +2 -2
- package/dist/public/.well-known/mcp/servers.json +1 -1
- package/dist/public/.well-known/mcp.json +2 -2
- package/dist/public/AGENTS.md +2 -1
- package/dist/public/README.md +1 -0
- package/dist/public/agent.worker.js +1 -1
- package/dist/public/app-routes-C6-H2zPH.js +1 -0
- package/dist/public/components/shadow-claw/shadow-claw.css +1 -1
- package/dist/public/components/shadow-claw/shadow-claw.html +1 -1
- package/dist/public/components/shadow-claw-pages/shadow-claw-pages.css +1 -1
- package/dist/public/{config-D4lVqMs8.js → config-Dewnqegf.js} +1 -1
- package/dist/public/{configurePeerJs-DDOAVSaH.js → configurePeerJs-CaPU2sN5.js} +1 -1
- package/dist/public/{connections-CiukjGiH.js → connections-CwE7jE9l.js} +1 -1
- package/dist/public/{custom-element-security-piU2U-Ec.js → custom-element-security-DLgHMf5R.js} +1 -1
- package/dist/public/docs/decisions/native-web-components-and-signals.md +1 -1
- package/dist/public/docs/example/article/index.html +5 -5
- package/dist/public/docs/guides/publishing-to-github-pages.md +49 -6
- package/dist/public/docs/publishing/index.html +5 -5
- package/dist/public/docs/skill-creator/index.html +5 -5
- package/dist/public/docs/subsystems/pages.md +10 -3
- package/dist/public/docs/subsystems/webmcp.md +89 -1
- package/dist/public/{downloadGroupFile-BiZQYY-O.js → downloadGroupFile-ChWHuap_.js} +1 -1
- package/dist/public/e2e/README.md +2 -2
- package/dist/public/{e2e-bridge-CybB810Q.js → e2e-bridge-BkaldjV2.js} +1 -1
- package/dist/public/{file-viewer-DLUBvOVD.js → file-viewer-Df4qUJCn.js} +1 -1
- package/dist/public/{getGroupDir-CLz5c8cg.js → getGroupDir-CeSr4fzS.js} +1 -1
- package/dist/public/{git-Ba8AeviI.js → git-Bscc1tK-.js} +2 -2
- package/dist/public/{iframe-sanitizer-CKOO7cxp.js → iframe-sanitizer-BVdkQsor.js} +1 -1
- package/dist/public/{iframe-storage-proxy-BvRiccH0.js → iframe-storage-proxy-Cg8aFw7o.js} +1 -1
- package/dist/public/index.css +1 -1
- package/dist/public/index.html +5 -5
- package/dist/public/index.js +1 -1
- package/dist/public/{initChatSplitResize-osJXM2gu.js → initChatSplitResize-C3Rp1LeZ.js} +1 -1
- package/dist/public/{initControlPlane-CNggzsRw.js → initControlPlane-C1pnzG16.js} +1 -1
- package/dist/public/llms.txt +1 -1
- package/dist/public/main/index.html +5 -5
- package/dist/public/main/memory/index.html +5 -5
- package/dist/public/{markdown-CZA-Ye2Q.js → markdown-D3A902nT.js} +1 -1
- package/dist/public/{mcp-reconnect-BK1bYBdC.js → mcp-reconnect-BJWxQBm_.js} +1 -1
- package/dist/public/{memoryStorage-Bew1X8Uy.js → memoryStorage-ykv-Ri-y.js} +1 -1
- package/dist/public/{orchestrator-D6tel2Zp.js → orchestrator-BVnC4Vtt.js} +2 -2
- package/dist/public/{orchestrator-BLkS_jpm.js → orchestrator-CQcc7OFA.js} +2 -2
- package/dist/public/{peerjs-CYs1F7sq.js → peerjs-CYC2cI1Y.js} +1 -1
- package/dist/public/{push-client-_HUyJlFJ.js → push-client-BJrnOULM.js} +1 -1
- package/dist/public/service-worker/fetch-proxy.js +1 -1
- package/dist/public/service-worker.js +1 -1
- package/dist/public/{shadow-claw-DmrxnX3Q.js → shadow-claw-WwfOu-tu.js} +33 -3
- package/dist/public/{shadow-claw-accounts-BqGrm47Z.js → shadow-claw-accounts-BFZxrPsH.js} +1 -1
- package/dist/public/{shadow-claw-channels-Ci2UPaaA.js → shadow-claw-channels-C0w0c1EF.js} +1 -1
- package/dist/public/{shadow-claw-chat-BxR6cBYQ.js → shadow-claw-chat-DIJ0A-QN.js} +1 -1
- package/dist/public/{shadow-claw-control-plane-C1A-CZ9H.js → shadow-claw-control-plane-DZoxUd-1.js} +2 -2
- package/dist/public/{shadow-claw-conversations-DcwG05-H.js → shadow-claw-conversations-DMyG_5zj.js} +1 -1
- package/dist/public/{shadow-claw-file-viewer-a_uRA30F.js → shadow-claw-file-viewer-DYgZjZb9.js} +2 -2
- package/dist/public/{shadow-claw-files-B774Xz1d.js → shadow-claw-files-DIOUdKJr.js} +1 -1
- package/dist/public/{shadow-claw-git-CTIPP0vs.js → shadow-claw-git-if5S0QJr.js} +2 -2
- package/dist/public/{shadow-claw-integrations-CjtkA6l0.js → shadow-claw-integrations-BQt4hcWe.js} +1 -1
- package/dist/public/{shadow-claw-llm-DfmITHde.js → shadow-claw-llm-9uf1KFA0.js} +2 -2
- package/dist/public/{shadow-claw-mcp-remote-BPuV22So.js → shadow-claw-mcp-remote-COpNIzJd.js} +1 -1
- package/dist/public/{shadow-claw-networking-DEMMygy0.js → shadow-claw-networking-AOVRUn6B.js} +1 -1
- package/dist/public/{shadow-claw-notifications-B9Xhcj1P.js → shadow-claw-notifications-CKB-W1TA.js} +1 -1
- package/dist/public/{shadow-claw-page-header-CAXokjQy.js → shadow-claw-page-header-D4LmUigA.js} +1 -1
- package/dist/public/{shadow-claw-pages-BRQw8bTm.js → shadow-claw-pages-BpHRY4vH.js} +12 -3
- package/dist/public/{shadow-claw-settings-BGrDNyqh.js → shadow-claw-settings-CE-aUo_J.js} +3 -3
- package/dist/public/{shadow-claw-storage-DK3pf11w.js → shadow-claw-storage-CFKC-Y3V.js} +1 -1
- package/dist/public/{shadow-claw-task-server-CMp5Vjza.js → shadow-claw-task-server-B_ZjqK4B.js} +1 -1
- package/dist/public/{shadow-claw-tasks-BO8aXM2B.js → shadow-claw-tasks-CGsEv48K.js} +1 -1
- package/dist/public/{shadow-claw-terminal-BSeTuyDa.js → shadow-claw-terminal-DcaS7cPH.js} +1 -1
- package/dist/public/{shadow-claw-tools-Bj6DLZ-2.js → shadow-claw-tools-Cnu9hKy0.js} +1 -1
- package/dist/public/{shadow-claw-webvm-M7d5RH8H.js → shadow-claw-webvm-BB8SFvJ8.js} +1 -1
- package/dist/public/syncWebMcpRegistration-D2Zx4oA1.js +1 -0
- package/dist/public/theme-init.js +1 -1
- package/dist/public/{tools-nysPKnGT.js → tools-sOLCHTj8.js} +1 -1
- package/dist/public/{webmcp-Bo3KTgRb.js → webmcp-YFt6vM1_.js} +1 -1
- package/dist/server.js +189 -189
- package/package.json +1 -1
- package/src/cli/cli.ts +2 -2
- package/src/cli/prerender/dsd-shell/prerender-dsd-shell.test.ts +4 -1
- package/src/cli/prerender/dsd-shell/prerender-dsd-shell.ts +7 -1
- package/src/cli/prerender/utils/insert-before-closing-head.test.ts +12 -0
- package/src/cli/prerender/utils/insert-before-closing-head.ts +4 -6
- package/src/cli/site-config/apply.test.ts +90 -0
- package/src/cli/site-config/apply.ts +181 -13
- package/src/components/shadow-claw/shadow-claw.css +26 -0
- package/src/components/shadow-claw/shadow-claw.html +4 -0
- package/src/components/shadow-claw/utils/applyRoute.ts +3 -0
- package/src/components/shadow-claw/utils/bindEventListeners.test.ts +6 -0
- package/src/components/shadow-claw/utils/bindEventListeners.ts +30 -1
- package/src/components/shadow-claw/utils/getRoute.test.ts +52 -0
- package/src/components/shadow-claw/utils/getRoute.ts +18 -0
- package/src/components/shadow-claw/utils/navigateToRoute.test.ts +21 -0
- package/src/components/shadow-claw/utils/navigateToRoute.ts +10 -0
- package/src/components/shadow-claw/utils/sidebarVisibility.ts +12 -4
- package/src/components/shadow-claw/utils/syncSlottedSidebarActiveLinks.test.ts +93 -0
- package/src/components/shadow-claw/utils/syncSlottedSidebarActiveLinks.ts +100 -0
- package/src/components/shadow-claw-file-viewer/shadow-claw-file-viewer.ts +31 -31
- package/src/components/shadow-claw-pages/shadow-claw-pages.css +10 -1
- package/src/components/shadow-claw-pages/utils/removePreviewIframe.ts +3 -0
- package/src/core/effect.test.ts +19 -0
- package/src/core/orchestrator/orchestrator-state.ts +2 -1
- package/src/core/orchestrator/orchestrator.test.ts +686 -5
- package/src/core/orchestrator/orchestrator.ts +3 -10
- package/src/core/orchestrator/utils/compactContext.test.ts +423 -121
- package/src/core/orchestrator/utils/configurePeerJs.test.ts +27 -0
- package/src/core/orchestrator/utils/deliverResponse.test.ts +127 -0
- package/src/core/orchestrator/utils/dispatchSubagentInvoke.test.ts +23 -0
- package/src/core/orchestrator/utils/enqueue.test.ts +520 -86
- package/src/core/orchestrator/utils/handleWorkerMessage.test.ts +664 -144
- package/src/core/orchestrator/utils/initTasks.node.test.ts +147 -0
- package/src/core/orchestrator/utils/initTasks.test.ts +926 -191
- package/src/core/orchestrator/utils/initTasks.ts +5 -4
- package/src/core/orchestrator/utils/invokeAgent.test.ts +563 -110
- package/src/core/orchestrator/utils/invokeAgent.ts +8 -10
- package/src/core/orchestrator/utils/loadChannelConfigurations.test.ts +50 -0
- package/src/core/orchestrator/utils/operations/channel.test.ts +377 -170
- package/src/core/orchestrator/utils/operations/provider.test.ts +663 -85
- package/src/core/orchestrator/utils/operations/room.test.ts +74 -11
- package/src/core/orchestrator/utils/operations/task.test.ts +452 -56
- package/src/core/orchestrator/utils/operations/task.ts +1 -1
- package/src/core/orchestrator/utils/operations/vm.test.ts +66 -7
- package/src/core/orchestrator/utils/parseDirectToolCommand.test.ts +6 -0
- package/src/core/orchestrator/utils/settings.test.ts +248 -81
- package/src/core/orchestrator/utils/setupPushTaskListener.test.ts +58 -0
- package/src/core/orchestrator/utils/syncWebMcpRegistration.test.ts +392 -64
- package/src/core/orchestrator/utils/syncWebMcpRegistration.ts +32 -3
- package/src/server/middleware/static-files.test.ts +36 -0
- package/src/server/middleware/static-files.ts +14 -6
- package/src/server/routes/mcp.ts +2 -2
- package/src/storage/staticRouting.test.ts +36 -0
- package/src/storage/staticRouting.ts +31 -3
- package/src/stores/file-viewer.test.ts +11 -0
- package/src/stores/theme.test.ts +41 -2
- package/src/stores/toast.test.ts +25 -0
- package/src/subsystems/mcp/webmcp.test.ts +255 -0
- package/src/subsystems/mcp/webmcp.ts +253 -0
- package/src/worker/tools/bash/native-bash-executor.test.ts +31 -1
- package/src/worker/tools/git/utils/extractConflictPaths.test.ts +24 -0
- package/src/worker/tools/git/utils/parseConflictRegions.test.ts +46 -0
- package/src/worker/tools/git/utils/resolveCorsProxy.test.ts +26 -5
- package/src/worker/tools/git/utils/truncateSnippet.test.ts +16 -0
- package/src/worker/tools/node-transformers-executor.test.ts +105 -6
- package/src/worker/tools/remote-mcp/remote-mcp.test.ts +172 -47
- package/src/worker/tools/remote-mcp/utils/formatListToolsOutput.test.ts +19 -0
- package/src/worker/tools/remote-mcp/utils/isMcpReauthError.test.ts +45 -0
- package/src/worker/tools/remote-mcp/utils/resolveMcpReauth.test.ts +48 -0
- package/src/worker/tools/rooms/list-room-members.test.ts +24 -10
- package/src/worker/tools/tasks/list-tasks.test.ts +39 -8
- package/src/worker/tools/tasks/update-task.test.ts +78 -14
- package/src/worker/tools/ui/javascript.test.ts +70 -17
- package/src/worker/tools/ui/list-tool-profiles.test.ts +31 -9
- package/dist/cli/chunk-00GAzVPl2.js +0 -1
- package/dist/cli/chunk-2hnFoNNC.js +0 -1
- package/dist/cli/chunk-BKQL4nzF2.js +0 -1
- package/dist/cli/chunk-BQ4K3fqj2.js +0 -1
- package/dist/cli/chunk-BVCGo6uf2.js +0 -1
- package/dist/cli/chunk-BcTH_-FL.js +0 -1
- package/dist/cli/chunk-BmD_sPRt.js +0 -1
- package/dist/cli/chunk-BsxNqqer.js +0 -1
- package/dist/cli/chunk-CCcF5T-c.js +0 -1
- package/dist/cli/chunk-CFhvwUeL.js +0 -91
- package/dist/cli/chunk-CwWtvULn.js +0 -1
- package/dist/cli/chunk-Drf-hXIR2.js +0 -1
- package/dist/cli/chunk-Dt5HNYVi.js +0 -1
- package/dist/cli/chunk-DwZQi9Ax.js +0 -1
- package/dist/cli/chunk-m9ZX7TyF2.js +0 -1
- package/dist/lib/app-routes-BAEMLu9g.js.map +0 -1
- package/dist/lib/orchestrator-Bq9ft3uG.js.map +0 -1
- package/dist/lib/shadow-claw-MumteAJy.js.map +0 -1
- package/dist/lib/shadow-claw-pages-Bo8_z2S-.js.map +0 -1
- package/dist/lib/syncWebMcpRegistration-Bbph0XZl.js.map +0 -1
- package/dist/public/app-routes-BMQ4HFaM.js +0 -1
- package/dist/public/syncWebMcpRegistration-4bT0YUyZ.js +0 -1
|
@@ -111,4 +111,25 @@ describe("navigateToRoute", () => {
|
|
|
111
111
|
route,
|
|
112
112
|
);
|
|
113
113
|
});
|
|
114
|
+
|
|
115
|
+
it("should applyRoute directly without calling nav.navigate if already at finalPath", async () => {
|
|
116
|
+
mockSupportsNavigationApi.mockReturnValue(true);
|
|
117
|
+
const origPathname = window.location.pathname;
|
|
118
|
+
try {
|
|
119
|
+
window.history.replaceState({}, "", "/base/chat");
|
|
120
|
+
await navigateToRoute(shadowRoot, shadowClaw, db, fStore, oStore, route);
|
|
121
|
+
|
|
122
|
+
expect(mockNav.navigate).not.toHaveBeenCalled();
|
|
123
|
+
expect(mockApplyRoute).toHaveBeenCalledWith(
|
|
124
|
+
shadowRoot,
|
|
125
|
+
shadowClaw,
|
|
126
|
+
db,
|
|
127
|
+
fStore,
|
|
128
|
+
oStore,
|
|
129
|
+
route,
|
|
130
|
+
);
|
|
131
|
+
} finally {
|
|
132
|
+
window.history.replaceState({}, "", origPathname);
|
|
133
|
+
}
|
|
134
|
+
});
|
|
114
135
|
});
|
|
@@ -21,6 +21,16 @@ export async function navigateToRoute(
|
|
|
21
21
|
const targetPath = buildRoutePath(route);
|
|
22
22
|
const finalPath = applyBasePath(targetPath);
|
|
23
23
|
|
|
24
|
+
const currentPath =
|
|
25
|
+
typeof window !== "undefined" && window.location
|
|
26
|
+
? `${window.location.pathname}${window.location.search}${window.location.hash}`
|
|
27
|
+
: "";
|
|
28
|
+
|
|
29
|
+
if (currentPath && finalPath === currentPath) {
|
|
30
|
+
await applyRoute(shadow, shadowClaw, db, fStore, oStore, route);
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
|
|
24
34
|
if (supportsNavigationApi()) {
|
|
25
35
|
const nav = (window as any).navigation;
|
|
26
36
|
|
|
@@ -34,12 +34,20 @@ export function applySidebarNavVisibility(
|
|
|
34
34
|
`.nav-item[data-page="${page}"]`,
|
|
35
35
|
) as HTMLElement | null;
|
|
36
36
|
|
|
37
|
-
if (
|
|
38
|
-
|
|
37
|
+
if (navItem) {
|
|
38
|
+
navItem.hidden = hidden;
|
|
39
|
+
navItem.setAttribute("aria-hidden", String(hidden));
|
|
39
40
|
}
|
|
40
41
|
|
|
41
|
-
|
|
42
|
-
|
|
42
|
+
if (page === "chat") {
|
|
43
|
+
const convoEl = shadow.querySelector(
|
|
44
|
+
"shadow-claw-conversations",
|
|
45
|
+
) as HTMLElement | null;
|
|
46
|
+
if (convoEl) {
|
|
47
|
+
convoEl.hidden = hidden;
|
|
48
|
+
convoEl.setAttribute("aria-hidden", String(hidden));
|
|
49
|
+
}
|
|
50
|
+
}
|
|
43
51
|
}
|
|
44
52
|
|
|
45
53
|
/**
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { describe, it, expect, beforeEach } from "@jest/globals";
|
|
2
|
+
import { syncSlottedSidebarActiveLinks } from "./syncSlottedSidebarActiveLinks.js";
|
|
3
|
+
|
|
4
|
+
describe("syncSlottedSidebarActiveLinks", () => {
|
|
5
|
+
let host: HTMLElement;
|
|
6
|
+
|
|
7
|
+
beforeEach(() => {
|
|
8
|
+
host = document.createElement("div");
|
|
9
|
+
host.innerHTML = `
|
|
10
|
+
<div slot="sidebar" class="sidebar-custom-sections">
|
|
11
|
+
<a href="/" class="sidebar-link">Home</a>
|
|
12
|
+
<a href="/about" class="sidebar-link">About</a>
|
|
13
|
+
<a href="/portfolio" class="sidebar-link">Portfolio</a>
|
|
14
|
+
<a href="https://external.example.com" class="sidebar-link" target="_blank">External</a>
|
|
15
|
+
</div>
|
|
16
|
+
`;
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
it("marks matching internal link as active and sets aria-current='page'", () => {
|
|
20
|
+
const url = new URL("https://example.com/about");
|
|
21
|
+
syncSlottedSidebarActiveLinks(host, url);
|
|
22
|
+
|
|
23
|
+
const homeLink = host.querySelector('a[href="/"]');
|
|
24
|
+
const aboutLink = host.querySelector('a[href="/about"]');
|
|
25
|
+
const portfolioLink = host.querySelector('a[href="/portfolio"]');
|
|
26
|
+
const externalLink = host.querySelector(
|
|
27
|
+
'a[href="https://external.example.com"]',
|
|
28
|
+
);
|
|
29
|
+
|
|
30
|
+
expect(aboutLink?.classList.contains("active")).toBe(true);
|
|
31
|
+
expect(aboutLink?.getAttribute("aria-current")).toBe("page");
|
|
32
|
+
|
|
33
|
+
expect(homeLink?.classList.contains("active")).toBe(false);
|
|
34
|
+
expect(homeLink?.hasAttribute("aria-current")).toBe(false);
|
|
35
|
+
|
|
36
|
+
expect(portfolioLink?.classList.contains("active")).toBe(false);
|
|
37
|
+
expect(externalLink?.classList.contains("active")).toBe(false);
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
it("handles root path matching correctly with trailing slashes", () => {
|
|
41
|
+
const url = new URL("https://example.com/");
|
|
42
|
+
syncSlottedSidebarActiveLinks(host, url);
|
|
43
|
+
|
|
44
|
+
const homeLink = host.querySelector('a[href="/"]');
|
|
45
|
+
const aboutLink = host.querySelector('a[href="/about"]');
|
|
46
|
+
|
|
47
|
+
expect(homeLink?.classList.contains("active")).toBe(true);
|
|
48
|
+
expect(homeLink?.getAttribute("aria-current")).toBe("page");
|
|
49
|
+
expect(aboutLink?.classList.contains("active")).toBe(false);
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
it("never marks external links as active", () => {
|
|
53
|
+
const url = new URL("https://example.com/");
|
|
54
|
+
syncSlottedSidebarActiveLinks(host, url);
|
|
55
|
+
|
|
56
|
+
const externalLink = host.querySelector(
|
|
57
|
+
'a[href="https://external.example.com"]',
|
|
58
|
+
);
|
|
59
|
+
expect(externalLink?.classList.contains("active")).toBe(false);
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
it("handles hash links properly without activating sub-items on base route", () => {
|
|
63
|
+
host.innerHTML = `
|
|
64
|
+
<div slot="sidebar">
|
|
65
|
+
<a href="/portfolio" class="sidebar-link">Portfolio</a>
|
|
66
|
+
<a href="/portfolio#web-apps" class="sidebar-link">Web Apps</a>
|
|
67
|
+
<a href="/portfolio#corporate-sites" class="sidebar-link">Corporate Sites</a>
|
|
68
|
+
</div>
|
|
69
|
+
`;
|
|
70
|
+
|
|
71
|
+
// 1. Browsed to base /portfolio with no hash
|
|
72
|
+
const baseUrl = new URL("https://example.com/portfolio");
|
|
73
|
+
syncSlottedSidebarActiveLinks(host, baseUrl);
|
|
74
|
+
|
|
75
|
+
const portfolioLink = host.querySelector('a[href="/portfolio"]');
|
|
76
|
+
const webAppsLink = host.querySelector('a[href="/portfolio#web-apps"]');
|
|
77
|
+
const corporateLink = host.querySelector(
|
|
78
|
+
'a[href="/portfolio#corporate-sites"]',
|
|
79
|
+
);
|
|
80
|
+
|
|
81
|
+
expect(portfolioLink?.classList.contains("active")).toBe(true);
|
|
82
|
+
expect(webAppsLink?.classList.contains("active")).toBe(false);
|
|
83
|
+
expect(corporateLink?.classList.contains("active")).toBe(false);
|
|
84
|
+
|
|
85
|
+
// 2. Browsed to /portfolio#web-apps with hash
|
|
86
|
+
const hashUrl = new URL("https://example.com/portfolio#web-apps");
|
|
87
|
+
syncSlottedSidebarActiveLinks(host, hashUrl);
|
|
88
|
+
|
|
89
|
+
expect(portfolioLink?.classList.contains("active")).toBe(false);
|
|
90
|
+
expect(webAppsLink?.classList.contains("active")).toBe(true);
|
|
91
|
+
expect(corporateLink?.classList.contains("active")).toBe(false);
|
|
92
|
+
});
|
|
93
|
+
});
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sync active state on slotted sidebar navigation links.
|
|
3
|
+
*/
|
|
4
|
+
export function syncSlottedSidebarActiveLinks(
|
|
5
|
+
host: HTMLElement | null,
|
|
6
|
+
currentUrl?: URL,
|
|
7
|
+
): void {
|
|
8
|
+
if (!host || typeof host.querySelectorAll !== "function") {
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const url =
|
|
13
|
+
currentUrl ||
|
|
14
|
+
(typeof window !== "undefined" && window.location?.href
|
|
15
|
+
? new URL(window.location.href)
|
|
16
|
+
: null);
|
|
17
|
+
if (!url) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const currentPath = url.pathname.replace(/\/+$/, "") || "/";
|
|
22
|
+
|
|
23
|
+
// Select all links slotted into sidebar slots or in custom sections
|
|
24
|
+
const slottedLinks = host.querySelectorAll<HTMLAnchorElement>(
|
|
25
|
+
'[slot="sidebar"] a[href], [slot="sidebar-nav"] a[href], [slot="sidebar-content"] a[href], [slot="sidebar-footer"] a[href], .sidebar-custom-sections a[href]',
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
slottedLinks.forEach((link) => {
|
|
29
|
+
try {
|
|
30
|
+
const href = link.getAttribute("href") || "";
|
|
31
|
+
if (
|
|
32
|
+
!href ||
|
|
33
|
+
href.startsWith("#") ||
|
|
34
|
+
href.startsWith("javascript:") ||
|
|
35
|
+
href.startsWith("mailto:") ||
|
|
36
|
+
href.startsWith("tel:")
|
|
37
|
+
) {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const linkUrl = new URL(href, url.origin);
|
|
42
|
+
if (linkUrl.origin !== url.origin) {
|
|
43
|
+
link.classList.remove("active");
|
|
44
|
+
link.removeAttribute("aria-current");
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const linkPath = linkUrl.pathname.replace(/\/+$/, "") || "/";
|
|
49
|
+
const isPathMatch = linkPath === currentPath;
|
|
50
|
+
const isMatch =
|
|
51
|
+
isPathMatch && (linkUrl.hash ? linkUrl.hash === url.hash : !url.hash);
|
|
52
|
+
|
|
53
|
+
if (isMatch) {
|
|
54
|
+
link.classList.add("active");
|
|
55
|
+
link.setAttribute("aria-current", "page");
|
|
56
|
+
} else {
|
|
57
|
+
link.classList.remove("active");
|
|
58
|
+
link.removeAttribute("aria-current");
|
|
59
|
+
}
|
|
60
|
+
} catch {
|
|
61
|
+
// Ignore URL parsing errors
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Sets up listeners so slotted sidebar active links stay in sync whenever
|
|
68
|
+
* the URL changes (popstate, Navigation API navigate, or iframe replaceState).
|
|
69
|
+
* Returns a cleanup function to remove the listeners.
|
|
70
|
+
*/
|
|
71
|
+
export function setupSlottedSidebarActiveLinks(
|
|
72
|
+
host: HTMLElement | null,
|
|
73
|
+
): () => void {
|
|
74
|
+
if (!host || typeof window === "undefined") {
|
|
75
|
+
return () => {};
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const sync = () => syncSlottedSidebarActiveLinks(host);
|
|
79
|
+
|
|
80
|
+
// Initial sync
|
|
81
|
+
sync();
|
|
82
|
+
|
|
83
|
+
// Re-sync on back/forward navigation and replaceState-driven URL changes
|
|
84
|
+
window.addEventListener("popstate", sync, { passive: true });
|
|
85
|
+
|
|
86
|
+
// Re-sync on Navigation API navigate (Chrome 102+) — covers pushState/replaceState too
|
|
87
|
+
const nav = (window as unknown as { navigation?: EventTarget }).navigation;
|
|
88
|
+
if (nav && typeof nav.addEventListener === "function") {
|
|
89
|
+
nav.addEventListener("navigate", sync, {
|
|
90
|
+
passive: true,
|
|
91
|
+
} as EventListenerOptions);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
return () => {
|
|
95
|
+
window.removeEventListener("popstate", sync);
|
|
96
|
+
if (nav && typeof nav.removeEventListener === "function") {
|
|
97
|
+
nav.removeEventListener("navigate", sync);
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
}
|
|
@@ -1667,6 +1667,37 @@ export class ShadowClawFileViewer extends ShadowClawElement {
|
|
|
1667
1667
|
}
|
|
1668
1668
|
}
|
|
1669
1669
|
|
|
1670
|
+
async handleSendFileToPeer() {
|
|
1671
|
+
const file = fileViewerStore.file;
|
|
1672
|
+
if (!file || !file.path) {
|
|
1673
|
+
showError("No file is currently open.", 4500);
|
|
1674
|
+
|
|
1675
|
+
return;
|
|
1676
|
+
}
|
|
1677
|
+
|
|
1678
|
+
const activeGroupId = file.groupId || orchestratorStore.activeGroupId || "";
|
|
1679
|
+
const isPeer = activeGroupId.startsWith("peer:");
|
|
1680
|
+
const isRoom = activeGroupId.startsWith("room:");
|
|
1681
|
+
|
|
1682
|
+
if (!isPeer && !isRoom) {
|
|
1683
|
+
showError(
|
|
1684
|
+
"Can only send files to peers in a peer or room conversation.",
|
|
1685
|
+
4500,
|
|
1686
|
+
);
|
|
1687
|
+
|
|
1688
|
+
return;
|
|
1689
|
+
}
|
|
1690
|
+
|
|
1691
|
+
try {
|
|
1692
|
+
await orchestratorStore.sendFileToPeer(file.path, activeGroupId, {
|
|
1693
|
+
fileName: file.name,
|
|
1694
|
+
mimeType: file.mimeType,
|
|
1695
|
+
});
|
|
1696
|
+
} catch {
|
|
1697
|
+
// Toast error handled in sendFileToPeer
|
|
1698
|
+
}
|
|
1699
|
+
}
|
|
1700
|
+
|
|
1670
1701
|
async handleShareFile() {
|
|
1671
1702
|
const file = fileViewerStore.file;
|
|
1672
1703
|
if (!file || !this.canShareCurrentFile(file)) {
|
|
@@ -1706,37 +1737,6 @@ export class ShadowClawFileViewer extends ShadowClawElement {
|
|
|
1706
1737
|
}
|
|
1707
1738
|
}
|
|
1708
1739
|
|
|
1709
|
-
async handleSendFileToPeer() {
|
|
1710
|
-
const file = fileViewerStore.file;
|
|
1711
|
-
if (!file || !file.path) {
|
|
1712
|
-
showError("No file is currently open.", 4500);
|
|
1713
|
-
|
|
1714
|
-
return;
|
|
1715
|
-
}
|
|
1716
|
-
|
|
1717
|
-
const activeGroupId = file.groupId || orchestratorStore.activeGroupId || "";
|
|
1718
|
-
const isPeer = activeGroupId.startsWith("peer:");
|
|
1719
|
-
const isRoom = activeGroupId.startsWith("room:");
|
|
1720
|
-
|
|
1721
|
-
if (!isPeer && !isRoom) {
|
|
1722
|
-
showError(
|
|
1723
|
-
"Can only send files to peers in a peer or room conversation.",
|
|
1724
|
-
4500,
|
|
1725
|
-
);
|
|
1726
|
-
|
|
1727
|
-
return;
|
|
1728
|
-
}
|
|
1729
|
-
|
|
1730
|
-
try {
|
|
1731
|
-
await orchestratorStore.sendFileToPeer(file.path, activeGroupId, {
|
|
1732
|
-
fileName: file.name,
|
|
1733
|
-
mimeType: file.mimeType,
|
|
1734
|
-
});
|
|
1735
|
-
} catch {
|
|
1736
|
-
// Toast error handled in sendFileToPeer
|
|
1737
|
-
}
|
|
1738
|
-
}
|
|
1739
|
-
|
|
1740
1740
|
async openFolderInFilesView(path: string) {
|
|
1741
1741
|
if (!this.db) {
|
|
1742
1742
|
return;
|
|
@@ -186,6 +186,11 @@ article > h2,
|
|
|
186
186
|
.pages__rendered > h1,
|
|
187
187
|
.pages__rendered > h2 {
|
|
188
188
|
margin-top: 0;
|
|
189
|
+
margin-bottom: var(--shadow-claw-article-header-margin-bottom, 1.5rem);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.pages__rendered :is(h1, h2, h3, h4) {
|
|
193
|
+
clear: both;
|
|
189
194
|
}
|
|
190
195
|
|
|
191
196
|
.pages__iframe {
|
|
@@ -219,7 +224,7 @@ article > h2,
|
|
|
219
224
|
|
|
220
225
|
.pages__dropdown-container {
|
|
221
226
|
align-items: center;
|
|
222
|
-
display: flex;
|
|
227
|
+
display: var(--shadow-claw-pages-dropdown-container-display, flex);
|
|
223
228
|
gap: 0.5rem;
|
|
224
229
|
margin-bottom: 1rem;
|
|
225
230
|
position: relative;
|
|
@@ -487,6 +492,10 @@ article > h2,
|
|
|
487
492
|
}
|
|
488
493
|
}
|
|
489
494
|
|
|
495
|
+
shadow-claw-page-header {
|
|
496
|
+
display: var(--shadow-claw-page-header-display, block);
|
|
497
|
+
}
|
|
498
|
+
|
|
490
499
|
ul {
|
|
491
500
|
line-height: 1.5;
|
|
492
501
|
}
|
package/src/core/effect.test.ts
CHANGED
|
@@ -80,6 +80,25 @@ describe("effect", () => {
|
|
|
80
80
|
expect(cleanup).toHaveBeenCalledTimes(1);
|
|
81
81
|
});
|
|
82
82
|
|
|
83
|
+
it("invokes cleanup before next execution when effect re-runs", () => {
|
|
84
|
+
const cleanup = jest.fn();
|
|
85
|
+
(globalThis as any).queueMicrotask = jest.fn((fn: any) => fn());
|
|
86
|
+
|
|
87
|
+
let runCount = 0;
|
|
88
|
+
effect(() => {
|
|
89
|
+
runCount++;
|
|
90
|
+
return cleanup as any;
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
// In effect, watcher.watch(computed) is called.
|
|
94
|
+
const lastWatched = watcherInstance.watch.mock.calls.slice(-1)[0][0];
|
|
95
|
+
watcherInstance.pending = [lastWatched];
|
|
96
|
+
watcherInstance.trigger();
|
|
97
|
+
|
|
98
|
+
expect(cleanup).toHaveBeenCalledTimes(1);
|
|
99
|
+
expect(runCount).toBe(2);
|
|
100
|
+
});
|
|
101
|
+
|
|
83
102
|
it("processes pending signals and re-watches on watcher callback", () => {
|
|
84
103
|
const pendingA: any = { get: jest.fn() };
|
|
85
104
|
const pendingB: any = { get: jest.fn() };
|
|
@@ -12,6 +12,7 @@ import type { TaskScheduler } from "../../subsystems/tools/task-scheduler.js";
|
|
|
12
12
|
import type { Router } from "../router.js";
|
|
13
13
|
import type { EventBus } from "./utils/EventBus.js";
|
|
14
14
|
import type { DirectToolCommandPolicy } from "./utils/types.js";
|
|
15
|
+
import type { InboundMessage } from "../../subsystems/channels/types.js";
|
|
15
16
|
|
|
16
17
|
export interface OrchestratorState {
|
|
17
18
|
// ── Core ──────────────────────────────────────────────────────────────────
|
|
@@ -77,7 +78,7 @@ export interface OrchestratorState {
|
|
|
77
78
|
>;
|
|
78
79
|
inFlightProviderRequestIds: Map<string, string>;
|
|
79
80
|
inFlightTriggerByGroup: Map<string, string>;
|
|
80
|
-
messageQueue:
|
|
81
|
+
messageQueue: InboundMessage[];
|
|
81
82
|
processing: boolean;
|
|
82
83
|
promptControllers: Map<string, AbortController>;
|
|
83
84
|
|