@forgeax/view 0.5.0-dev.13604.c415409c3b9d → 0.5.0-dev.13713.d28c4863d779
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/README.md +67 -9
- package/dist/build-revision.json +1 -1
- package/dist/modules/backend.mjs +34 -34
- package/dist/modules/browser.mjs +55 -49
- package/dist/modules/chunks/{chunk-EWSCJF77.mjs → chunk-2CMCY54A.mjs} +2 -2
- package/dist/modules/chunks/{chunk-M6S5YA6X.mjs → chunk-2RUKPDIE.mjs} +4 -4
- package/dist/modules/chunks/{chunk-M6S5YA6X.mjs.map → chunk-2RUKPDIE.mjs.map} +1 -1
- package/dist/modules/chunks/{chunk-DWT3TA6M.mjs → chunk-3FBX3P3H.mjs} +9 -8
- package/dist/modules/chunks/chunk-3FBX3P3H.mjs.map +7 -0
- package/dist/modules/chunks/{chunk-6KM24NH6.mjs → chunk-3Y5WN22T.mjs} +3 -3
- package/dist/modules/chunks/chunk-3Y5WN22T.mjs.map +7 -0
- package/dist/modules/chunks/{chunk-YFQGSDK3.mjs → chunk-45WL24XN.mjs} +2 -2
- package/dist/modules/chunks/{chunk-FMCHH5R4.mjs → chunk-4FYKRL46.mjs} +3 -3
- package/dist/modules/chunks/{chunk-VW2ZF3P4.mjs → chunk-4MJHVZMB.mjs} +6 -6
- package/dist/modules/chunks/{chunk-XQYF2P6M.mjs → chunk-5HVXQEO3.mjs} +7 -7
- package/dist/modules/chunks/{chunk-XMP4THLF.mjs → chunk-66LM6NO6.mjs} +4 -4
- package/dist/modules/chunks/{chunk-P4UPH74B.mjs → chunk-6C4OCCYB.mjs} +12 -12
- package/dist/modules/chunks/{chunk-P4UPH74B.mjs.map → chunk-6C4OCCYB.mjs.map} +1 -1
- package/dist/modules/chunks/{chunk-ZGOGO7SS.mjs → chunk-6J27SWMY.mjs} +1 -1
- package/dist/modules/chunks/{chunk-JK7K7RG3.mjs → chunk-6VK7HB4X.mjs} +4 -4
- package/dist/modules/chunks/{chunk-HRKW766Y.mjs → chunk-6WZZ7TIC.mjs} +2 -2
- package/dist/modules/chunks/{chunk-FICPCJKR.mjs → chunk-7DFCIN3T.mjs} +3 -3
- package/dist/modules/chunks/{chunk-FICPCJKR.mjs.map → chunk-7DFCIN3T.mjs.map} +1 -1
- package/dist/modules/chunks/{chunk-U64FRQKP.mjs → chunk-7MWZK7HS.mjs} +3 -3
- package/dist/modules/chunks/{chunk-F5RLQAPN.mjs → chunk-A7OGXJAV.mjs} +3 -3
- package/dist/modules/chunks/{chunk-QUFVUMSY.mjs → chunk-AUINYWZP.mjs} +2 -2
- package/dist/modules/chunks/{chunk-PZIAKZJC.mjs → chunk-B24VYGHV.mjs} +3 -3
- package/dist/modules/chunks/{chunk-SRYQLFBV.mjs → chunk-BIUWJROZ.mjs} +3 -3
- package/dist/modules/chunks/{chunk-SRYQLFBV.mjs.map → chunk-BIUWJROZ.mjs.map} +2 -2
- package/dist/modules/chunks/{chunk-X4NNZ5X6.mjs → chunk-C2AMOM7H.mjs} +3 -3
- package/dist/modules/chunks/{chunk-IZAHIOFU.mjs → chunk-C3WVSJZF.mjs} +6 -6
- package/dist/modules/chunks/{chunk-2Z5KEV6L.mjs → chunk-CAXCOZ7Y.mjs} +3 -3
- package/dist/modules/chunks/{chunk-HWZCLROY.mjs → chunk-CN6YN4HP.mjs} +251 -45
- package/dist/modules/chunks/chunk-CN6YN4HP.mjs.map +7 -0
- package/dist/modules/chunks/{chunk-B6QUJ33G.mjs → chunk-CXFQME65.mjs} +3 -3
- package/dist/modules/chunks/{chunk-IJPWKKIU.mjs → chunk-CYOLEAAY.mjs} +14 -13
- package/dist/modules/chunks/chunk-CYOLEAAY.mjs.map +7 -0
- package/dist/modules/chunks/{chunk-U6UMATPV.mjs → chunk-CYU3WWN6.mjs} +3 -3
- package/dist/modules/chunks/{chunk-AGVLPYVE.mjs → chunk-D2LZIQE2.mjs} +2 -2
- package/dist/modules/chunks/{chunk-5YTMN435.mjs → chunk-DC5JP46Y.mjs} +13 -3
- package/dist/modules/chunks/chunk-DC5JP46Y.mjs.map +7 -0
- package/dist/modules/chunks/{chunk-YNHEYXDG.mjs → chunk-DOU4MNMQ.mjs} +3 -3
- package/dist/modules/chunks/{chunk-ZIDEETK4.mjs → chunk-E4G4HDOC.mjs} +3 -3
- package/dist/modules/chunks/{chunk-ZHO2G4JR.mjs → chunk-EZAJ66NW.mjs} +3 -3
- package/dist/modules/chunks/{chunk-APD2EWSZ.mjs → chunk-FIWL6TQS.mjs} +2 -2
- package/dist/modules/chunks/{chunk-U5J7OTEB.mjs → chunk-FSSARTVM.mjs} +3 -3
- package/dist/modules/chunks/{chunk-47RJSHLM.mjs → chunk-FXXPWAXM.mjs} +3 -3
- package/dist/modules/chunks/{chunk-D2RCKG7Q.mjs → chunk-G2QCXN56.mjs} +6 -6
- package/dist/modules/chunks/{chunk-4T3D67CS.mjs → chunk-GRDCA6LD.mjs} +8 -8
- package/dist/modules/chunks/{chunk-4T3D67CS.mjs.map → chunk-GRDCA6LD.mjs.map} +1 -1
- package/dist/modules/chunks/{chunk-WVU3CQ62.mjs → chunk-GUVUL6D2.mjs} +3 -3
- package/dist/modules/chunks/{chunk-YLCJNKIW.mjs → chunk-I32EONBF.mjs} +70 -30
- package/dist/modules/chunks/chunk-I32EONBF.mjs.map +7 -0
- package/dist/modules/chunks/{chunk-E3PJGTLI.mjs → chunk-IGIELQZ2.mjs} +5 -5
- package/dist/modules/chunks/{chunk-5PHAXNFO.mjs → chunk-IMDR26Y3.mjs} +3 -3
- package/dist/modules/chunks/{chunk-55F55BQY.mjs → chunk-JVOHFCI4.mjs} +3 -3
- package/dist/modules/chunks/{chunk-6I7RY73G.mjs → chunk-KCM7ZCQ3.mjs} +5 -5
- package/dist/modules/chunks/chunk-KCM7ZCQ3.mjs.map +7 -0
- package/dist/modules/chunks/{chunk-K2QZRFLE.mjs → chunk-KJTMDFFX.mjs} +4 -4
- package/dist/modules/chunks/{chunk-KX2WU5Z6.mjs → chunk-KPLESRQY.mjs} +3 -3
- package/dist/modules/chunks/{chunk-PW5CE2Y6.mjs → chunk-KUOWDTI6.mjs} +2 -2
- package/dist/modules/chunks/chunk-L6IHUN7X.mjs +13 -0
- package/dist/modules/chunks/chunk-L6IHUN7X.mjs.map +7 -0
- package/dist/modules/chunks/{chunk-INTTYJVW.mjs → chunk-LBQ6DFMP.mjs} +2 -2
- package/dist/modules/chunks/{chunk-OKQ5RBKO.mjs → chunk-LVWHM3UN.mjs} +2 -2
- package/dist/modules/chunks/{chunk-D57DDEV2.mjs → chunk-MDQMARAN.mjs} +6 -6
- package/dist/modules/chunks/{chunk-D57DDEV2.mjs.map → chunk-MDQMARAN.mjs.map} +2 -2
- package/dist/modules/chunks/{chunk-STQPRNEO.mjs → chunk-MLXRIWJA.mjs} +2 -2
- package/dist/modules/chunks/{chunk-D25SR5FS.mjs → chunk-N2SH3JGI.mjs} +3 -3
- package/dist/modules/chunks/{chunk-KI4WGTWL.mjs → chunk-N7NXZ6R3.mjs} +4 -4
- package/dist/modules/chunks/{chunk-KI4WGTWL.mjs.map → chunk-N7NXZ6R3.mjs.map} +2 -2
- package/dist/modules/chunks/{chunk-7IGFAI5H.mjs → chunk-O5QX6H3U.mjs} +5 -5
- package/dist/modules/chunks/{chunk-5W7SC5D4.mjs → chunk-P2Y73QJJ.mjs} +11 -1
- package/dist/modules/chunks/{chunk-5W7SC5D4.mjs.map → chunk-P2Y73QJJ.mjs.map} +2 -2
- package/dist/modules/chunks/{chunk-FNRGLCZW.mjs → chunk-PCQNUFDL.mjs} +39 -13
- package/dist/modules/chunks/chunk-PCQNUFDL.mjs.map +7 -0
- package/dist/modules/chunks/{chunk-46UEGAXY.mjs → chunk-Q7M7VUOZ.mjs} +6 -6
- package/dist/modules/chunks/{chunk-XE6ITXHT.mjs → chunk-QB33CMEU.mjs} +2 -2
- package/dist/modules/chunks/{chunk-E3Z7GLFU.mjs → chunk-QJHQN6OD.mjs} +15 -4
- package/dist/modules/chunks/chunk-QJHQN6OD.mjs.map +7 -0
- package/dist/modules/chunks/{chunk-KAGFU64Y.mjs → chunk-QW2VT3XB.mjs} +2 -2
- package/dist/modules/chunks/{chunk-U5R6MVM4.mjs → chunk-RFTLGEB5.mjs} +2 -2
- package/dist/modules/chunks/{chunk-VKNIYV2W.mjs → chunk-RYYKMDNI.mjs} +202 -35
- package/dist/modules/chunks/chunk-RYYKMDNI.mjs.map +7 -0
- package/dist/modules/chunks/{chunk-P5XMFZY4.mjs → chunk-SFB5BDTB.mjs} +2 -2
- package/dist/modules/chunks/{chunk-4D3Q7K44.mjs → chunk-SNICHQJP.mjs} +2 -2
- package/dist/modules/chunks/{chunk-CX5WREJC.mjs → chunk-SPGFO2TA.mjs} +2 -2
- package/dist/modules/chunks/{chunk-H256DQT6.mjs → chunk-TMPTVIAP.mjs} +2 -2
- package/dist/modules/chunks/{chunk-OQXDADAS.mjs → chunk-UWJYROKS.mjs} +6 -6
- package/dist/modules/chunks/chunk-UWJYROKS.mjs.map +7 -0
- package/dist/modules/chunks/{chunk-TTRUYO7Q.mjs → chunk-UZH2664E.mjs} +3 -3
- package/dist/modules/chunks/{chunk-TTRUYO7Q.mjs.map → chunk-UZH2664E.mjs.map} +2 -2
- package/dist/modules/chunks/{chunk-CKYXAT7H.mjs → chunk-VC4OEPDH.mjs} +2 -2
- package/dist/modules/chunks/{chunk-RJVOH7G2.mjs → chunk-VKWEA6NG.mjs} +27 -27
- package/dist/modules/chunks/{chunk-LZ57Y73Z.mjs → chunk-VSJOW7J4.mjs} +9 -7
- package/dist/modules/chunks/chunk-VSJOW7J4.mjs.map +7 -0
- package/dist/modules/chunks/{chunk-PVP5YBNR.mjs → chunk-WFM434WJ.mjs} +2 -2
- package/dist/modules/chunks/{chunk-TXLD7JI5.mjs → chunk-WJNASQF2.mjs} +2 -2
- package/dist/modules/chunks/{chunk-357UOBAS.mjs → chunk-XUNDH3E7.mjs} +2 -2
- package/dist/modules/chunks/{chunk-PJFFCRRD.mjs → chunk-YDARD4EP.mjs} +2 -2
- package/dist/modules/chunks/{chunk-27XASYEH.mjs → chunk-YU3HRQX7.mjs} +17 -11
- package/dist/modules/chunks/chunk-YU3HRQX7.mjs.map +7 -0
- package/dist/modules/chunks/{chunk-EZSGDSCC.mjs → chunk-ZRE7BDDB.mjs} +30 -5
- package/dist/modules/chunks/chunk-ZRE7BDDB.mjs.map +7 -0
- package/dist/modules/cli-contributions.mjs +14 -14
- package/dist/modules/cli.mjs +5 -5
- package/dist/modules/command-executor.mjs +3 -3
- package/dist/modules/embedded.mjs +82 -42
- package/dist/modules/embedded.mjs.map +2 -2
- package/dist/modules/extension-bridge.mjs +4 -4
- package/dist/modules/frontend-root.mjs +46 -46
- package/dist/modules/index.mjs +71 -65
- package/dist/modules/index.mjs.map +1 -1
- package/dist/modules/pages/scene.mjs +5 -5
- package/dist/modules/plugin.mjs +35 -35
- package/dist/modules/plugins/asset/frontend.mjs +10 -10
- package/dist/modules/plugins/asset/identity.mjs +9 -9
- package/dist/modules/plugins/asset/ui.mjs +3 -3
- package/dist/modules/plugins/content-browser/frontend.mjs +3 -3
- package/dist/modules/plugins/content-browser/identity.mjs +2 -2
- package/dist/modules/plugins/content-browser/ui.mjs +3 -3
- package/dist/modules/plugins/display/api.mjs +1 -1
- package/dist/modules/plugins/display/backend.mjs +4 -4
- package/dist/modules/plugins/display/frontend.mjs +5 -5
- package/dist/modules/plugins/display/identity.mjs +2 -2
- package/dist/modules/plugins/display/ui.mjs +3 -3
- package/dist/modules/plugins/inspector/frontend.mjs +3 -3
- package/dist/modules/plugins/inspector/identity.mjs +2 -2
- package/dist/modules/plugins/inspector/ui.mjs +3 -3
- package/dist/modules/plugins/material/frontend.mjs +10 -10
- package/dist/modules/plugins/material/identity.mjs +9 -9
- package/dist/modules/plugins/material/ui.mjs +10 -10
- package/dist/modules/plugins/mesh/frontend.mjs +10 -10
- package/dist/modules/plugins/mesh/identity.mjs +9 -9
- package/dist/modules/plugins/mesh/ui.mjs +10 -10
- package/dist/modules/plugins/plugins/api.mjs +4 -4
- package/dist/modules/plugins/plugins/backend.mjs +7 -7
- package/dist/modules/plugins/plugins/cli.mjs +5 -5
- package/dist/modules/plugins/plugins/frontend.mjs +3 -3
- package/dist/modules/plugins/plugins/identity.mjs +2 -2
- package/dist/modules/plugins/plugins/runtime.mjs +6 -6
- package/dist/modules/plugins/plugins/ui/panel.mjs +3 -3
- package/dist/modules/plugins/plugins/ui.mjs +4 -4
- package/dist/modules/plugins/scene/frontend.mjs +5 -5
- package/dist/modules/plugins/scene/identity.mjs +2 -2
- package/dist/modules/plugins/scene-tree/frontend.mjs +3 -3
- package/dist/modules/plugins/scene-tree/identity.mjs +2 -2
- package/dist/modules/plugins/scene-tree/ui.mjs +3 -3
- package/dist/modules/plugins/texture/frontend.mjs +10 -10
- package/dist/modules/plugins/texture/identity.mjs +9 -9
- package/dist/modules/plugins/texture/ui.mjs +10 -10
- package/dist/modules/plugins/viewport/frontend.mjs +12 -12
- package/dist/modules/plugins/viewport/identity.mjs +2 -2
- package/dist/modules/plugins/viewport/presentation.mjs +4 -4
- package/dist/modules/plugins/viewport/schema.mjs +2 -2
- package/dist/modules/plugins/viewport/workspace-shell.mjs +9 -9
- package/dist/modules/product.mjs +35 -35
- package/dist/modules/shell/frontend.mjs +1 -1
- package/dist/modules/viewer/catalog/backend.mjs +31 -31
- package/dist/modules/viewer/catalog/frontend.mjs +42 -42
- package/dist/modules/viewer/catalog/shared.mjs +20 -20
- package/dist/modules/viewer/catalog.mjs +51 -51
- package/dist/modules/viewer/cli.mjs +10 -10
- package/dist/modules/viewer-host/frontend.mjs +48 -48
- package/dist/modules/viewer-host/page-registry.mjs +6 -6
- package/dist/modules/viewer-host.mjs +7 -7
- package/dist/modules/viewer.mjs +51 -51
- package/dist/modules/workspace/api.mjs +1 -1
- package/dist/modules/workspace/backend.mjs +10 -10
- package/dist/modules/workspace/broker.mjs +9 -9
- package/dist/modules/workspace/cli.mjs +2 -2
- package/dist/modules/workspace/client.mjs +3 -3
- package/dist/modules/workspace/command-error.mjs +2 -2
- package/dist/modules/workspace/contract.mjs +7 -1
- package/dist/modules/workspace/engine-adapter.mjs +3 -3
- package/dist/modules/workspace/extension-bridge.mjs +4 -4
- package/dist/modules/workspace/frontend-plugin.mjs +8 -8
- package/dist/modules/workspace/frontend.mjs +9 -9
- package/dist/modules/workspace/page-title.mjs +3 -3
- package/dist/modules/workspace/presentation.mjs +4 -4
- package/dist/modules/workspace/preview-surface.mjs +7 -7
- package/dist/modules/workspace/project-session.mjs +2 -2
- package/dist/modules/workspace/render-resize-sync.mjs +2 -2
- package/dist/modules/workspace/resident.mjs +4 -4
- package/dist/modules/workspace/resource-open.mjs +5 -5
- package/dist/modules/workspace/resource-page.mjs +8 -8
- package/dist/modules/workspace/tool-runtime.mjs +7 -5
- package/dist/modules/workspace/view-trace.mjs +3 -3
- package/dist/modules/workspace/workspace-recovery.mjs +4 -4
- package/dist/modules/workspace/workspace-state.mjs +2 -2
- package/dist/modules/workspace-frontend.mjs +8 -8
- package/dist/viewer/assets/{embedded-DXSSFAyM.js → embedded-BKEAtUD6.js} +2 -2
- package/dist/viewer/assets/{embedded-DXSSFAyM.js.map → embedded-BKEAtUD6.js.map} +1 -1
- package/dist/viewer/assets/main-BQrn6wsa.js +22 -0
- package/dist/viewer/assets/main-BQrn6wsa.js.map +1 -0
- package/dist/viewer/assets/{panels-lazy-DqCwhGd9.js → panels-lazy-C_Cs-76A.js} +2 -2
- package/dist/viewer/assets/{panels-lazy-DqCwhGd9.js.map → panels-lazy-C_Cs-76A.js.map} +1 -1
- package/dist/viewer/assets/panels-ui-DEDHJLuE.js +12 -0
- package/dist/viewer/assets/panels-ui-DEDHJLuE.js.map +1 -0
- package/dist/viewer/assets/style-CcYzhsIZ.css +2 -0
- package/dist/viewer/assets/{wgpu_wasm--oeqTwVY.js → wgpu_wasm-cNR5izZM.js} +126 -0
- package/dist/viewer/assets/{wgpu_wasm_bg-WoZ1YI1I.wasm → wgpu_wasm_bg-Dps0jNcQ.wasm} +0 -0
- package/dist/viewer/index.html +4 -4
- package/dist/viewer/panels.js +1 -1
- package/package.json +2 -2
- package/scripts/verify-runtime-content-engine.mjs +7 -4
- package/skills/forgeax-view-cli/SKILL.md +11 -0
- package/dist/modules/chunks/chunk-27XASYEH.mjs.map +0 -7
- package/dist/modules/chunks/chunk-5YTMN435.mjs.map +0 -7
- package/dist/modules/chunks/chunk-6I7RY73G.mjs.map +0 -7
- package/dist/modules/chunks/chunk-6KM24NH6.mjs.map +0 -7
- package/dist/modules/chunks/chunk-DWT3TA6M.mjs.map +0 -7
- package/dist/modules/chunks/chunk-E3Z7GLFU.mjs.map +0 -7
- package/dist/modules/chunks/chunk-EZSGDSCC.mjs.map +0 -7
- package/dist/modules/chunks/chunk-FNRGLCZW.mjs.map +0 -7
- package/dist/modules/chunks/chunk-HWZCLROY.mjs.map +0 -7
- package/dist/modules/chunks/chunk-IJPWKKIU.mjs.map +0 -7
- package/dist/modules/chunks/chunk-LZ57Y73Z.mjs.map +0 -7
- package/dist/modules/chunks/chunk-OQXDADAS.mjs.map +0 -7
- package/dist/modules/chunks/chunk-QELNKFSI.mjs +0 -10
- package/dist/modules/chunks/chunk-QELNKFSI.mjs.map +0 -7
- package/dist/modules/chunks/chunk-VKNIYV2W.mjs.map +0 -7
- package/dist/modules/chunks/chunk-YLCJNKIW.mjs.map +0 -7
- package/dist/viewer/assets/main-CI6ZQziX.js +0 -22
- package/dist/viewer/assets/main-CI6ZQziX.js.map +0 -1
- package/dist/viewer/assets/panels-ui-CfUtl68h.js +0 -12
- package/dist/viewer/assets/panels-ui-CfUtl68h.js.map +0 -1
- package/dist/viewer/assets/style-gOtSMZif.css +0 -2
- /package/dist/modules/chunks/{chunk-EWSCJF77.mjs.map → chunk-2CMCY54A.mjs.map} +0 -0
- /package/dist/modules/chunks/{chunk-YFQGSDK3.mjs.map → chunk-45WL24XN.mjs.map} +0 -0
- /package/dist/modules/chunks/{chunk-FMCHH5R4.mjs.map → chunk-4FYKRL46.mjs.map} +0 -0
- /package/dist/modules/chunks/{chunk-VW2ZF3P4.mjs.map → chunk-4MJHVZMB.mjs.map} +0 -0
- /package/dist/modules/chunks/{chunk-XQYF2P6M.mjs.map → chunk-5HVXQEO3.mjs.map} +0 -0
- /package/dist/modules/chunks/{chunk-XMP4THLF.mjs.map → chunk-66LM6NO6.mjs.map} +0 -0
- /package/dist/modules/chunks/{chunk-ZGOGO7SS.mjs.map → chunk-6J27SWMY.mjs.map} +0 -0
- /package/dist/modules/chunks/{chunk-JK7K7RG3.mjs.map → chunk-6VK7HB4X.mjs.map} +0 -0
- /package/dist/modules/chunks/{chunk-HRKW766Y.mjs.map → chunk-6WZZ7TIC.mjs.map} +0 -0
- /package/dist/modules/chunks/{chunk-U64FRQKP.mjs.map → chunk-7MWZK7HS.mjs.map} +0 -0
- /package/dist/modules/chunks/{chunk-F5RLQAPN.mjs.map → chunk-A7OGXJAV.mjs.map} +0 -0
- /package/dist/modules/chunks/{chunk-QUFVUMSY.mjs.map → chunk-AUINYWZP.mjs.map} +0 -0
- /package/dist/modules/chunks/{chunk-PZIAKZJC.mjs.map → chunk-B24VYGHV.mjs.map} +0 -0
- /package/dist/modules/chunks/{chunk-X4NNZ5X6.mjs.map → chunk-C2AMOM7H.mjs.map} +0 -0
- /package/dist/modules/chunks/{chunk-IZAHIOFU.mjs.map → chunk-C3WVSJZF.mjs.map} +0 -0
- /package/dist/modules/chunks/{chunk-2Z5KEV6L.mjs.map → chunk-CAXCOZ7Y.mjs.map} +0 -0
- /package/dist/modules/chunks/{chunk-B6QUJ33G.mjs.map → chunk-CXFQME65.mjs.map} +0 -0
- /package/dist/modules/chunks/{chunk-U6UMATPV.mjs.map → chunk-CYU3WWN6.mjs.map} +0 -0
- /package/dist/modules/chunks/{chunk-AGVLPYVE.mjs.map → chunk-D2LZIQE2.mjs.map} +0 -0
- /package/dist/modules/chunks/{chunk-YNHEYXDG.mjs.map → chunk-DOU4MNMQ.mjs.map} +0 -0
- /package/dist/modules/chunks/{chunk-ZIDEETK4.mjs.map → chunk-E4G4HDOC.mjs.map} +0 -0
- /package/dist/modules/chunks/{chunk-ZHO2G4JR.mjs.map → chunk-EZAJ66NW.mjs.map} +0 -0
- /package/dist/modules/chunks/{chunk-APD2EWSZ.mjs.map → chunk-FIWL6TQS.mjs.map} +0 -0
- /package/dist/modules/chunks/{chunk-U5J7OTEB.mjs.map → chunk-FSSARTVM.mjs.map} +0 -0
- /package/dist/modules/chunks/{chunk-47RJSHLM.mjs.map → chunk-FXXPWAXM.mjs.map} +0 -0
- /package/dist/modules/chunks/{chunk-D2RCKG7Q.mjs.map → chunk-G2QCXN56.mjs.map} +0 -0
- /package/dist/modules/chunks/{chunk-WVU3CQ62.mjs.map → chunk-GUVUL6D2.mjs.map} +0 -0
- /package/dist/modules/chunks/{chunk-E3PJGTLI.mjs.map → chunk-IGIELQZ2.mjs.map} +0 -0
- /package/dist/modules/chunks/{chunk-5PHAXNFO.mjs.map → chunk-IMDR26Y3.mjs.map} +0 -0
- /package/dist/modules/chunks/{chunk-55F55BQY.mjs.map → chunk-JVOHFCI4.mjs.map} +0 -0
- /package/dist/modules/chunks/{chunk-K2QZRFLE.mjs.map → chunk-KJTMDFFX.mjs.map} +0 -0
- /package/dist/modules/chunks/{chunk-KX2WU5Z6.mjs.map → chunk-KPLESRQY.mjs.map} +0 -0
- /package/dist/modules/chunks/{chunk-PW5CE2Y6.mjs.map → chunk-KUOWDTI6.mjs.map} +0 -0
- /package/dist/modules/chunks/{chunk-INTTYJVW.mjs.map → chunk-LBQ6DFMP.mjs.map} +0 -0
- /package/dist/modules/chunks/{chunk-OKQ5RBKO.mjs.map → chunk-LVWHM3UN.mjs.map} +0 -0
- /package/dist/modules/chunks/{chunk-STQPRNEO.mjs.map → chunk-MLXRIWJA.mjs.map} +0 -0
- /package/dist/modules/chunks/{chunk-D25SR5FS.mjs.map → chunk-N2SH3JGI.mjs.map} +0 -0
- /package/dist/modules/chunks/{chunk-7IGFAI5H.mjs.map → chunk-O5QX6H3U.mjs.map} +0 -0
- /package/dist/modules/chunks/{chunk-46UEGAXY.mjs.map → chunk-Q7M7VUOZ.mjs.map} +0 -0
- /package/dist/modules/chunks/{chunk-XE6ITXHT.mjs.map → chunk-QB33CMEU.mjs.map} +0 -0
- /package/dist/modules/chunks/{chunk-KAGFU64Y.mjs.map → chunk-QW2VT3XB.mjs.map} +0 -0
- /package/dist/modules/chunks/{chunk-U5R6MVM4.mjs.map → chunk-RFTLGEB5.mjs.map} +0 -0
- /package/dist/modules/chunks/{chunk-P5XMFZY4.mjs.map → chunk-SFB5BDTB.mjs.map} +0 -0
- /package/dist/modules/chunks/{chunk-4D3Q7K44.mjs.map → chunk-SNICHQJP.mjs.map} +0 -0
- /package/dist/modules/chunks/{chunk-CX5WREJC.mjs.map → chunk-SPGFO2TA.mjs.map} +0 -0
- /package/dist/modules/chunks/{chunk-H256DQT6.mjs.map → chunk-TMPTVIAP.mjs.map} +0 -0
- /package/dist/modules/chunks/{chunk-CKYXAT7H.mjs.map → chunk-VC4OEPDH.mjs.map} +0 -0
- /package/dist/modules/chunks/{chunk-RJVOH7G2.mjs.map → chunk-VKWEA6NG.mjs.map} +0 -0
- /package/dist/modules/chunks/{chunk-PVP5YBNR.mjs.map → chunk-WFM434WJ.mjs.map} +0 -0
- /package/dist/modules/chunks/{chunk-TXLD7JI5.mjs.map → chunk-WJNASQF2.mjs.map} +0 -0
- /package/dist/modules/chunks/{chunk-357UOBAS.mjs.map → chunk-XUNDH3E7.mjs.map} +0 -0
- /package/dist/modules/chunks/{chunk-PJFFCRRD.mjs.map → chunk-YDARD4EP.mjs.map} +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runWorkspaceToolApi
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ZRE7BDDB.mjs";
|
|
4
4
|
import {
|
|
5
5
|
isWorkspaceTargetRecoveryCode,
|
|
6
6
|
resolveWorkspaceFailure,
|
|
7
7
|
resolveWorkspaceReopenRoot
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-KJTMDFFX.mjs";
|
|
9
9
|
import {
|
|
10
10
|
editorSceneTargetIds,
|
|
11
11
|
isEditorWorkspaceAsset,
|
|
@@ -13,13 +13,16 @@ import {
|
|
|
13
13
|
logResourceOpen,
|
|
14
14
|
selectEditorWorkspacePreview,
|
|
15
15
|
summarizeResourceAsset
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-E4G4HDOC.mjs";
|
|
17
17
|
import {
|
|
18
18
|
workspaceDiagnosticRecord
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-RFTLGEB5.mjs";
|
|
20
20
|
import {
|
|
21
21
|
VIEW_DISPLAY_TAB_ID,
|
|
22
22
|
VIEW_FILE_GET_SERVICE,
|
|
23
|
+
VIEW_PACK_REVEAL_ACK_SERVICE,
|
|
24
|
+
VIEW_PACK_REVEAL_TOPIC,
|
|
25
|
+
VIEW_PACK_SOURCES_SERVICE,
|
|
23
26
|
VIEW_WORKSPACE_API_VERSION,
|
|
24
27
|
VIEW_WORKSPACE_OPERATIONS,
|
|
25
28
|
VIEW_WORKSPACE_SERVICES,
|
|
@@ -35,7 +38,7 @@ import {
|
|
|
35
38
|
workspaceCapabilities,
|
|
36
39
|
workspaceError,
|
|
37
40
|
workspaceUiFingerprint
|
|
38
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-QJHQN6OD.mjs";
|
|
39
42
|
import {
|
|
40
43
|
createWorkspaceId
|
|
41
44
|
} from "./chunk-4XEXLHX4.mjs";
|
|
@@ -158,6 +161,15 @@ async function readWorkspaceFilePreview(workspace, payload = {}) {
|
|
|
158
161
|
// packages/view-workspace-core/src/broker.ts
|
|
159
162
|
var ENGINE_SOURCE = "engine-workspace";
|
|
160
163
|
var UI_OPERATIONS = Object.freeze({
|
|
164
|
+
"summary.get": (workspace) => workspace.summary(),
|
|
165
|
+
"pages.list": (workspace) => workspace.pages(),
|
|
166
|
+
"pack.reveal": (workspace, args, context) => workspace.revealPack({
|
|
167
|
+
projectId: requireWorkspaceString(args.projectId, "projectId"),
|
|
168
|
+
sourcePath: requireWorkspaceString(args.sourcePath, "sourcePath"),
|
|
169
|
+
revision: requireWorkspaceString(args.revision, "revision"),
|
|
170
|
+
...args.packageId === void 0 ? {} : { packageId: requireWorkspaceString(args.packageId, "packageId") },
|
|
171
|
+
...args.connectionId === void 0 ? {} : { connectionId: requireWorkspaceString(args.connectionId, "connectionId") }
|
|
172
|
+
}, context.signal),
|
|
161
173
|
"target.select": (workspace, args) => workspace.selectTarget(args),
|
|
162
174
|
"tabs.get": (workspace) => workspace.snapshot(),
|
|
163
175
|
"tabs.select": (workspace, args) => workspace.selectTab(args),
|
|
@@ -165,13 +177,30 @@ var UI_OPERATIONS = Object.freeze({
|
|
|
165
177
|
"scene.pick": (workspace, args, context) => workspace.pickSceneEntity(args, context),
|
|
166
178
|
"scene.clear": (workspace, args, context) => workspace.clearSceneSelection(args, context)
|
|
167
179
|
});
|
|
168
|
-
var
|
|
169
|
-
|
|
180
|
+
var PAGE_OPERATIONS = /* @__PURE__ */ new Set([
|
|
181
|
+
"tabs.get",
|
|
182
|
+
"tabs.select",
|
|
183
|
+
"target.select",
|
|
184
|
+
"scene.select",
|
|
185
|
+
"scene.pick",
|
|
186
|
+
"scene.clear",
|
|
187
|
+
"asset.open",
|
|
188
|
+
"preview.close",
|
|
189
|
+
"play.start",
|
|
190
|
+
"play.ready",
|
|
191
|
+
"play.stop"
|
|
192
|
+
]);
|
|
193
|
+
var ViewWorkspaceBroker = class _ViewWorkspaceBroker {
|
|
194
|
+
constructor({ engine, engineForCaller, projectIntent, toolApi, display = () => void 0, accessToken = randomUUID(), authorize, packSources } = {}, caller) {
|
|
170
195
|
this.engine = engine;
|
|
196
|
+
this.engineForCaller = engineForCaller;
|
|
197
|
+
this.projectIntent = projectIntent;
|
|
198
|
+
this.caller = caller;
|
|
171
199
|
this.toolApi = toolApi;
|
|
172
200
|
this.display = display;
|
|
173
201
|
this.accessToken = accessToken;
|
|
174
202
|
this.authorize = authorize;
|
|
203
|
+
this.packSources = packSources;
|
|
175
204
|
this.selectedTabId = VIEW_WORKSPACE_TAB_ID;
|
|
176
205
|
this.targetBinding = "editor";
|
|
177
206
|
this.editorTargetId = void 0;
|
|
@@ -192,6 +221,8 @@ var ViewWorkspaceBroker = class {
|
|
|
192
221
|
this.catalogEpoch = -1;
|
|
193
222
|
this.disposing = false;
|
|
194
223
|
this.publishFingerprint = "";
|
|
224
|
+
this.pageSessions = /* @__PURE__ */ new Map();
|
|
225
|
+
this.pendingReveals = /* @__PURE__ */ new Map();
|
|
195
226
|
}
|
|
196
227
|
get project() {
|
|
197
228
|
return this.engine?.project?.project ?? null;
|
|
@@ -273,6 +304,35 @@ var ViewWorkspaceBroker = class {
|
|
|
273
304
|
} : null;
|
|
274
305
|
}
|
|
275
306
|
}
|
|
307
|
+
summary() {
|
|
308
|
+
const project = this.project;
|
|
309
|
+
const previews = this.previews();
|
|
310
|
+
const projectTarget = this.projectTarget && this.engine?.preview?.target.targetId === this.projectTarget.targetId ? this.engine.preview.target : this.projectTarget;
|
|
311
|
+
const active = [
|
|
312
|
+
...projectTarget ? [{ target: projectTarget, role: "project" }] : [],
|
|
313
|
+
...this.engine?.play ? [{ target: this.engine.play.target, role: "play" }] : []
|
|
314
|
+
];
|
|
315
|
+
const targets = [...active, ...previews.slice(0, Math.max(0, 16 - active.length)).map((preview) => ({ target: preview.target, role: "preview" }))];
|
|
316
|
+
return {
|
|
317
|
+
revision: this.revision,
|
|
318
|
+
project: project ? { id: project.id, root: project.root, name: project.name } : null,
|
|
319
|
+
projectPhase: this.engine?.project?.phase ?? null,
|
|
320
|
+
browserGeneration: this.engine?.project?.browserGeneration ?? null,
|
|
321
|
+
targets: targets.map(({ target, role }) => ({
|
|
322
|
+
targetId: target.targetId,
|
|
323
|
+
...target.generation === void 0 ? {} : { generation: target.generation },
|
|
324
|
+
role
|
|
325
|
+
})),
|
|
326
|
+
hasMoreTargets: active.length + previews.length > 16
|
|
327
|
+
};
|
|
328
|
+
}
|
|
329
|
+
pages() {
|
|
330
|
+
const entries = [...this.pageSessions.entries()];
|
|
331
|
+
return {
|
|
332
|
+
pages: entries.slice(0, 16).map(([connectionId, page]) => ({ connectionId, ...page.broker.summary() })),
|
|
333
|
+
hasMorePages: entries.length > 16
|
|
334
|
+
};
|
|
335
|
+
}
|
|
276
336
|
snapshot() {
|
|
277
337
|
this.syncBindings();
|
|
278
338
|
const display = this.display?.();
|
|
@@ -299,6 +359,7 @@ var ViewWorkspaceBroker = class {
|
|
|
299
359
|
],
|
|
300
360
|
project: this.project,
|
|
301
361
|
projectTarget: this.projectTarget,
|
|
362
|
+
...!this.project && this.projectIntent?.() ? { projectIntent: { root: this.projectIntent() } } : {},
|
|
302
363
|
...this.engine?.project?.phase === void 0 ? {} : { projectPhase: this.engine.project.phase },
|
|
303
364
|
...this.engine?.project?.browserGeneration === void 0 ? {} : { browserGeneration: this.engine.project.browserGeneration },
|
|
304
365
|
assets: this.assets,
|
|
@@ -352,7 +413,21 @@ var ViewWorkspaceBroker = class {
|
|
|
352
413
|
}
|
|
353
414
|
async call(rawRequest, { signal, caller } = {}) {
|
|
354
415
|
const request = assertWorkspaceRequest(rawRequest);
|
|
416
|
+
if (request.operation === "pages.list" || request.operation === "pack.reveal") {
|
|
417
|
+
await this.authorizeRequest(request, caller);
|
|
418
|
+
return UI_OPERATIONS[request.operation](this, request.args, { signal, caller, clientId: request.clientId });
|
|
419
|
+
}
|
|
420
|
+
const page = caller?.connectionId && this.pageSessions.get(caller.connectionId);
|
|
421
|
+
if (page) return page.broker.call(rawRequest, { signal, caller });
|
|
355
422
|
await this.authorizeRequest(request, caller);
|
|
423
|
+
if (PAGE_OPERATIONS.has(request.operation) && this.pageSessions.size > 0) {
|
|
424
|
+
if (this.pageSessions.size !== 1) throw workspaceError(
|
|
425
|
+
"view-page-ambiguous",
|
|
426
|
+
"one View page for this page operation",
|
|
427
|
+
"Select the exact View page before retrying."
|
|
428
|
+
);
|
|
429
|
+
return this.pageSessions.values().next().value.broker.call(request, { signal, caller });
|
|
430
|
+
}
|
|
356
431
|
const ui = UI_OPERATIONS[request.operation];
|
|
357
432
|
if (ui) return ui(this, request.args, { signal, caller, clientId: request.clientId });
|
|
358
433
|
if (request.operation === "project.reopen") {
|
|
@@ -367,12 +442,15 @@ var ViewWorkspaceBroker = class {
|
|
|
367
442
|
return this.invoke(request.operation, request.args, { signal, caller, clientId: request.clientId, token: request.token, requestId: request.requestId });
|
|
368
443
|
}
|
|
369
444
|
async invoke(operation, args = {}, { signal, caller, clientId = "view-owner", token, requestId } = {}) {
|
|
445
|
+
caller ??= this.caller;
|
|
370
446
|
const { tabId, ...input } = args;
|
|
371
447
|
if (tabId !== void 0) this.assertWorkspaceTab(tabId);
|
|
372
448
|
const inspector = operation.startsWith("plugins.");
|
|
373
449
|
const presentation = operation.startsWith("display.");
|
|
374
450
|
const id = inspector ? operation : `${presentation ? "view" : "engine"}.${operation}`;
|
|
375
451
|
const sourceId = inspector || presentation ? "view-backend" : ENGINE_SOURCE;
|
|
452
|
+
if (this.caller && !inspector && !presentation && !operation.startsWith("run.") && input.targetId === void 0 && this.projectTarget)
|
|
453
|
+
input.targetId = this.projectTarget.targetId;
|
|
376
454
|
const owner = this.toolApi?.describe(id, sourceId).find((record) => record.callable)?.owner;
|
|
377
455
|
if (!owner) throw workspaceError("view-workspace-operation-unavailable", `Engine operation ${operation} to be installed`, "Enable the Engine capability; UI plugins do not provide domain APIs.", { operation });
|
|
378
456
|
this.syncBindings();
|
|
@@ -415,7 +493,7 @@ var ViewWorkspaceBroker = class {
|
|
|
415
493
|
this.previewProjection.cameraVersion = result?.version;
|
|
416
494
|
this.previewProjection.interaction = result?.interaction ?? null;
|
|
417
495
|
}
|
|
418
|
-
if (!["scene
|
|
496
|
+
if (!["scene.tree.get", "entity.inspect", "workspace.get", "preview.capture"].includes(operation)) this.changed();
|
|
419
497
|
if (["project.open", "project.close", "project.reopen", "asset.open", "preview.close", "camera.abort", "play.start", "play.ready", "play.stop"].includes(operation)) {
|
|
420
498
|
if (operation === "project.open" || operation === "project.reopen") this.workspaceTargetLost = false;
|
|
421
499
|
return this.snapshot();
|
|
@@ -499,7 +577,7 @@ var ViewWorkspaceBroker = class {
|
|
|
499
577
|
return this.invoke("asset.inspect", args, context);
|
|
500
578
|
}
|
|
501
579
|
rebuildAssetSource(args, { mode = "rebuild", ...context } = {}) {
|
|
502
|
-
return this.invoke(`asset
|
|
580
|
+
return this.invoke(`asset.source.${mode}`, args, context);
|
|
503
581
|
}
|
|
504
582
|
bindOpenedAsset(result, guid) {
|
|
505
583
|
this.targetBinding = "editor";
|
|
@@ -601,10 +679,22 @@ var ViewWorkspaceBroker = class {
|
|
|
601
679
|
return this.invoke("camera.abort", args, context);
|
|
602
680
|
}
|
|
603
681
|
getSceneTree(args, context) {
|
|
604
|
-
return this.invoke("scene
|
|
682
|
+
return this.invoke("scene.tree.get", args, context);
|
|
605
683
|
}
|
|
606
684
|
async revokeConnection(connectionId) {
|
|
607
685
|
if (typeof connectionId !== "string") return;
|
|
686
|
+
if (!this.pageSessions.has(connectionId) && ![...this.pendingReveals.values()].some((pending) => pending.connectionId === connectionId)) return;
|
|
687
|
+
for (const [requestId, pending] of this.pendingReveals) {
|
|
688
|
+
if (pending.connectionId !== connectionId) continue;
|
|
689
|
+
this.pendingReveals.delete(requestId);
|
|
690
|
+
pending.settle({ ok: false, code: "view-page-gone", requestId });
|
|
691
|
+
}
|
|
692
|
+
const page = this.pageSessions.get(connectionId);
|
|
693
|
+
if (page) {
|
|
694
|
+
this.pageSessions.delete(connectionId);
|
|
695
|
+
page.unsubscribe();
|
|
696
|
+
await page.broker.dispose();
|
|
697
|
+
}
|
|
608
698
|
for (const preview of [this.engine?.preview, this.engine?.play]) {
|
|
609
699
|
if (!preview) continue;
|
|
610
700
|
try {
|
|
@@ -619,37 +709,94 @@ var ViewWorkspaceBroker = class {
|
|
|
619
709
|
}
|
|
620
710
|
this.changed();
|
|
621
711
|
}
|
|
622
|
-
/**
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
this.
|
|
639
|
-
|
|
640
|
-
this.
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
const
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
712
|
+
/** One accepted View frontend owns one presentation projection and event stream. */
|
|
713
|
+
attachPageSession(caller, transport) {
|
|
714
|
+
const engine = this.engineForCaller ? this.engineForCaller(caller) : this.engine;
|
|
715
|
+
const projectTarget = engine?.project?.target;
|
|
716
|
+
const projectCaller = projectTarget && caller.sourceId === `forgeax-workspace:${projectTarget.sessionId}:${projectTarget.targetId}`;
|
|
717
|
+
if (caller.kind !== "frontend" || caller.sourceId !== "view-frontend" && !projectCaller || this.pageSessions.has(caller.connectionId)) return;
|
|
718
|
+
const broker = new _ViewWorkspaceBroker({
|
|
719
|
+
engine,
|
|
720
|
+
toolApi: this.toolApi,
|
|
721
|
+
display: () => this.display(caller),
|
|
722
|
+
...this.engineForCaller && caller.sourceId === "view-frontend" ? { projectIntent: () => this.project?.root } : {},
|
|
723
|
+
accessToken: this.accessToken,
|
|
724
|
+
authorize: this.authorize,
|
|
725
|
+
packSources: this.packSources
|
|
726
|
+
}, caller);
|
|
727
|
+
broker.snapshot();
|
|
728
|
+
if (engine === this.engine) broker.assets = this.assets;
|
|
729
|
+
const unsubscribe = broker.subscribe((state) => transport.publish(VIEW_WORKSPACE_STATE_TOPIC, state, { connectionId: caller.connectionId }));
|
|
730
|
+
this.pageSessions.set(caller.connectionId, { broker, unsubscribe });
|
|
731
|
+
}
|
|
732
|
+
publishPageSessions() {
|
|
733
|
+
for (const { broker } of this.pageSessions.values()) {
|
|
734
|
+
broker.snapshot();
|
|
735
|
+
if (broker.engine === this.engine && this.assets !== null) broker.assets = this.assets;
|
|
736
|
+
broker.changed();
|
|
647
737
|
}
|
|
648
738
|
}
|
|
739
|
+
async revealPack(input, signal) {
|
|
740
|
+
const transport = this.transport;
|
|
741
|
+
if (!transport) return { ok: false, code: "view-page-unavailable" };
|
|
742
|
+
if (signal?.aborted) return { ok: false, code: "view-reveal-cancelled" };
|
|
743
|
+
const candidates = [...this.pageSessions.keys()];
|
|
744
|
+
if (!input.connectionId && candidates.length !== 1)
|
|
745
|
+
return { ok: false, code: candidates.length ? "view-page-ambiguous" : "view-page-unavailable", candidates };
|
|
746
|
+
const connectionId = input.connectionId ?? candidates[0];
|
|
747
|
+
const page = this.pageSessions.get(connectionId);
|
|
748
|
+
if (!page) return { ok: false, code: "view-page-gone" };
|
|
749
|
+
const project = page.broker.project;
|
|
750
|
+
if (!project || project.id !== input.projectId) return { ok: false, code: "view-project-stale" };
|
|
751
|
+
if (!this.packSources) return { ok: false, code: "view-pack-sources-unavailable" };
|
|
752
|
+
const source = (await this.packSources(project.root)).sources.find((row) => row.sourcePath === input.sourcePath);
|
|
753
|
+
if (signal?.aborted) return { ok: false, code: "view-reveal-cancelled" };
|
|
754
|
+
if (!source || source.revision !== input.revision || input.packageId && source.packageId !== input.packageId)
|
|
755
|
+
return { ok: false, code: "view-pack-stale" };
|
|
756
|
+
const requestId = randomUUID();
|
|
757
|
+
const intent = {
|
|
758
|
+
requestId,
|
|
759
|
+
connectionId,
|
|
760
|
+
projectId: input.projectId,
|
|
761
|
+
sourcePath: input.sourcePath,
|
|
762
|
+
revision: input.revision,
|
|
763
|
+
...source.packageId ? { packageId: source.packageId } : {}
|
|
764
|
+
};
|
|
765
|
+
return new Promise((resolve2) => {
|
|
766
|
+
const retire = (code) => {
|
|
767
|
+
this.pendingReveals.delete(requestId);
|
|
768
|
+
transport.publish(VIEW_PACK_REVEAL_TOPIC, { ...intent, cancelled: true }, { connectionId });
|
|
769
|
+
settle({ ok: false, code, requestId });
|
|
770
|
+
};
|
|
771
|
+
const cancel = () => {
|
|
772
|
+
retire("view-reveal-cancelled");
|
|
773
|
+
};
|
|
774
|
+
const settle = (value) => {
|
|
775
|
+
clearTimeout(timeout);
|
|
776
|
+
signal?.removeEventListener("abort", cancel);
|
|
777
|
+
resolve2(value);
|
|
778
|
+
};
|
|
779
|
+
const timeout = setTimeout(() => {
|
|
780
|
+
retire("view-reveal-timeout");
|
|
781
|
+
}, 12e3);
|
|
782
|
+
timeout.unref?.();
|
|
783
|
+
this.pendingReveals.set(requestId, {
|
|
784
|
+
connectionId,
|
|
785
|
+
projectId: input.projectId,
|
|
786
|
+
sourcePath: input.sourcePath,
|
|
787
|
+
revision: input.revision,
|
|
788
|
+
settle
|
|
789
|
+
});
|
|
790
|
+
signal?.addEventListener("abort", cancel, { once: true });
|
|
791
|
+
transport.publish(VIEW_PACK_REVEAL_TOPIC, intent, { connectionId });
|
|
792
|
+
});
|
|
793
|
+
}
|
|
649
794
|
registerTransport(transport, { routeThroughTools = false } = {}) {
|
|
795
|
+
this.transport = transport;
|
|
650
796
|
const capabilities = transport.register(VIEW_WORKSPACE_SERVICES.capabilities, () => this.capabilities());
|
|
651
797
|
const call = transport.register(VIEW_WORKSPACE_SERVICES.call, async ({ payload, signal, caller }) => {
|
|
652
798
|
try {
|
|
799
|
+
this.attachPageSession(caller, transport);
|
|
653
800
|
return routeThroughTools ? await runWorkspaceToolApi(this.toolApi, {
|
|
654
801
|
operation: `view.workspace.${payload.operation}`,
|
|
655
802
|
args: payload.args,
|
|
@@ -672,9 +819,9 @@ var ViewWorkspaceBroker = class {
|
|
|
672
819
|
});
|
|
673
820
|
}
|
|
674
821
|
});
|
|
675
|
-
const fileGet = transport.register(VIEW_FILE_GET_SERVICE, async ({ payload }) => {
|
|
822
|
+
const fileGet = transport.register(VIEW_FILE_GET_SERVICE, async ({ payload, caller }) => {
|
|
676
823
|
try {
|
|
677
|
-
return await readWorkspaceFilePreview(this, payload);
|
|
824
|
+
return await readWorkspaceFilePreview(this.pageSessions.get(caller.connectionId)?.broker ?? this, payload);
|
|
678
825
|
} catch (error) {
|
|
679
826
|
const failure = workspaceDiagnosticRecord(error);
|
|
680
827
|
if (typeof failure.code !== "string" || !failure.code.startsWith("view-")) throw error;
|
|
@@ -687,27 +834,77 @@ var ViewWorkspaceBroker = class {
|
|
|
687
834
|
});
|
|
688
835
|
}
|
|
689
836
|
});
|
|
690
|
-
const
|
|
837
|
+
const packSources = transport.register(VIEW_PACK_SOURCES_SERVICE, async ({ payload, caller }) => {
|
|
838
|
+
const project = (this.pageSessions.get(caller.connectionId)?.broker ?? this).project;
|
|
839
|
+
if (!project || payload?.projectId !== project.id) throw workspaceError("view-project-stale", "the currently open project", "Refresh the workspace before listing Pack sources.");
|
|
840
|
+
if (!this.packSources) throw workspaceError("view-pack-sources-unavailable", "an installed Pack source provider", "Update the View Host Pack.");
|
|
841
|
+
return this.packSources(project.root);
|
|
842
|
+
});
|
|
843
|
+
const revealAck = transport.register(VIEW_PACK_REVEAL_ACK_SERVICE, async ({ payload, caller }) => {
|
|
844
|
+
const requestId = typeof payload?.requestId === "string" ? payload.requestId : "";
|
|
845
|
+
const pending = this.pendingReveals.get(requestId);
|
|
846
|
+
if (!pending || pending.connectionId !== caller.connectionId) return { ok: false, code: "view-reveal-stale" };
|
|
847
|
+
if (pending.projectId !== payload.projectId || pending.sourcePath !== payload.sourcePath || pending.revision !== payload.revision)
|
|
848
|
+
return { ok: false, code: "view-reveal-identity-mismatch" };
|
|
849
|
+
const page = this.pageSessions.get(caller.connectionId);
|
|
850
|
+
const project = page?.broker.project;
|
|
851
|
+
const source = project && this.packSources ? (await this.packSources(project.root)).sources.find((row) => row.sourcePath === pending.sourcePath) : void 0;
|
|
852
|
+
if (this.pendingReveals.get(requestId) !== pending) return { ok: false, code: "view-reveal-stale" };
|
|
853
|
+
if (!project || project.id !== pending.projectId || source?.revision !== pending.revision) {
|
|
854
|
+
this.pendingReveals.delete(requestId);
|
|
855
|
+
pending.settle({ ok: false, code: "view-reveal-stale", requestId });
|
|
856
|
+
return { ok: false, code: "view-reveal-stale" };
|
|
857
|
+
}
|
|
858
|
+
this.pendingReveals.delete(requestId);
|
|
859
|
+
pending.settle({
|
|
860
|
+
ok: payload.shown === true,
|
|
861
|
+
code: payload.shown === true ? "shown" : "view-reveal-not-shown",
|
|
862
|
+
requestId,
|
|
863
|
+
connectionId: caller.connectionId,
|
|
864
|
+
projectId: payload.projectId,
|
|
865
|
+
sourcePath: payload.sourcePath,
|
|
866
|
+
revision: payload.revision,
|
|
867
|
+
...typeof payload.reason === "string" ? { reason: payload.reason.slice(0, 160) } : {}
|
|
868
|
+
});
|
|
869
|
+
return { ok: true };
|
|
870
|
+
});
|
|
871
|
+
const subscription = this.subscribe((state) => transport.publish(VIEW_WORKSPACE_STATE_TOPIC, state, {
|
|
872
|
+
excludeConnectionIds: [...this.pageSessions.keys()]
|
|
873
|
+
}));
|
|
874
|
+
const removeConnect = transport.onClientConnect((caller) => this.attachPageSession(caller, transport));
|
|
875
|
+
const removeDisconnect = transport.onClientDisconnect((caller) => {
|
|
876
|
+
void this.revokeConnection(caller.connectionId);
|
|
877
|
+
});
|
|
691
878
|
const observer = transport.connect();
|
|
692
879
|
const engineSubscription = observer.subscribe("engine.workspace.state", (snapshot) => {
|
|
693
880
|
const epoch = snapshot && typeof snapshot.catalogEpoch === "number" ? snapshot.catalogEpoch : void 0;
|
|
694
881
|
if (epoch === void 0 || epoch <= this.catalogEpoch) {
|
|
695
882
|
this.changed();
|
|
883
|
+
this.publishPageSessions();
|
|
696
884
|
return;
|
|
697
885
|
}
|
|
698
886
|
this.catalogEpoch = epoch;
|
|
699
|
-
const
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
887
|
+
for (const broker of [this, ...[...this.pageSessions.values()].map((page) => page.broker)]) {
|
|
888
|
+
broker.catalogEpoch = epoch;
|
|
889
|
+
const project = broker.project;
|
|
890
|
+
if (!project || broker.engine?.project?.phase !== void 0 && broker.engine.project.phase !== "running") continue;
|
|
891
|
+
const lost = broker.workspaceTargetLost;
|
|
892
|
+
void broker.invoke("assets.list", { projectId: project.id }).catch(() => {
|
|
893
|
+
broker.workspaceTargetLost = lost;
|
|
894
|
+
}).finally(() => broker.changed());
|
|
895
|
+
}
|
|
896
|
+
this.publishPageSessions();
|
|
705
897
|
});
|
|
706
898
|
return () => {
|
|
899
|
+
if (this.transport === transport) this.transport = void 0;
|
|
707
900
|
capabilities();
|
|
708
901
|
call();
|
|
709
902
|
fileGet();
|
|
903
|
+
packSources();
|
|
904
|
+
revealAck();
|
|
710
905
|
subscription();
|
|
906
|
+
removeConnect();
|
|
907
|
+
removeDisconnect();
|
|
711
908
|
engineSubscription();
|
|
712
909
|
observer.close();
|
|
713
910
|
};
|
|
@@ -716,10 +913,19 @@ var ViewWorkspaceBroker = class {
|
|
|
716
913
|
this.selectionAbort?.abort();
|
|
717
914
|
this.disposing = true;
|
|
718
915
|
this.listeners.clear();
|
|
916
|
+
for (const [requestId, pending] of this.pendingReveals) {
|
|
917
|
+
this.pendingReveals.delete(requestId);
|
|
918
|
+
pending.settle({ ok: false, code: "view-page-gone", requestId });
|
|
919
|
+
}
|
|
920
|
+
for (const [connectionId, page] of this.pageSessions) {
|
|
921
|
+
this.pageSessions.delete(connectionId);
|
|
922
|
+
page.unsubscribe();
|
|
923
|
+
await page.broker.dispose();
|
|
924
|
+
}
|
|
719
925
|
}
|
|
720
926
|
};
|
|
721
927
|
|
|
722
928
|
export {
|
|
723
929
|
ViewWorkspaceBroker
|
|
724
930
|
};
|
|
725
|
-
//# sourceMappingURL=chunk-
|
|
931
|
+
//# sourceMappingURL=chunk-CN6YN4HP.mjs.map
|