@adaas/a-frame 0.1.1 → 0.1.2
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/.conf/tsconfig.browser.json +7 -1
- package/.conf/tsconfig.node.json +7 -1
- package/dist/browser/A-FrameBrowserStorageBlobs.context-CZTTvpn2.d.mts +53 -0
- package/dist/browser/A-FrameBrowserStorageBlobs.context-CaGTyatz.d.mts +40 -0
- package/dist/browser/A-FrameBrowserStorageBlobs.context-DjeEH8cn.d.mts +53 -0
- package/dist/browser/A-FrameBrowserStorageBlobs.context-vCsuTea9.d.mts +40 -0
- package/dist/browser/A-FrameBundle.types-LzfgdMiQ.d.mts +71 -0
- package/dist/browser/A-FrameChannel.component-4mTNctXL.d.mts +704 -0
- package/dist/browser/A-FrameChannel.types-BXEKJK9t.d.mts +205 -0
- package/dist/browser/A-FrameChannel.types-Ba3wgUZj.d.mts +199 -0
- package/dist/browser/A-FrameChannel.types-BfINhQZe.d.mts +145 -0
- package/dist/browser/A-FrameChannel.types-DfacgYL1.d.mts +199 -0
- package/dist/browser/A-FrameCompletion.entity-Dzy9sIa8.d.mts +72 -0
- package/dist/browser/A-FrameDefinition.entity-C1aK-gdl.d.mts +370 -0
- package/dist/browser/A-FrameDefinition.entity-CKPXsarS.d.mts +358 -0
- package/dist/browser/A-FrameDefinition.entity-yA0GsBoe.d.mts +143 -0
- package/dist/browser/A-FrameDefinition.types-BT02yAhQ.d.mts +232 -0
- package/dist/browser/A-FrameDynamicContentOperation.context-CoViNb19.d.mts +297 -0
- package/dist/browser/A-FrameDynamicContentOperation.context-Dd7Lb7X2.d.mts +266 -0
- package/dist/browser/A-FrameDynamicPatch.entity-BRuF1tqs.d.mts +29 -0
- package/dist/browser/A-FrameDynamicStructure.entity-DMvI_EPT.d.mts +210 -0
- package/dist/browser/A-FrameDynamicStructure.entity-DxkPP9mR.d.mts +235 -0
- package/dist/browser/A-FrameEnv.types-DnK-CYVk.d.mts +21 -0
- package/dist/browser/A-FrameNamespace.entity-BDg1FUgo.d.mts +136 -0
- package/dist/browser/A-FrameSchema.entity-DjYIhsoj.d.mts +141 -0
- package/dist/browser/A-FrameSegment.entity-D1xjjWvG.d.mts +161 -0
- package/dist/browser/A-FrameSegment.entity-D7Aj39Wh.d.mts +146 -0
- package/dist/browser/bundle.d.mts +6 -2
- package/dist/browser/bundle.mjs +1 -1
- package/dist/browser/bundle.mjs.map +1 -1
- package/dist/browser/channel.d.mts +51 -74
- package/dist/browser/channel.mjs +1 -2
- package/dist/browser/channel.mjs.map +1 -1
- package/dist/browser/chunk-2RNFZSBL.mjs +2 -0
- package/dist/browser/chunk-2RNFZSBL.mjs.map +1 -0
- package/dist/browser/chunk-46LRNZRG.mjs +2 -0
- package/dist/browser/chunk-46LRNZRG.mjs.map +1 -0
- package/dist/browser/chunk-52HFO3OY.mjs +2 -0
- package/dist/browser/chunk-52HFO3OY.mjs.map +1 -0
- package/dist/browser/chunk-643KGQKR.mjs +3 -0
- package/dist/browser/chunk-643KGQKR.mjs.map +1 -0
- package/dist/browser/chunk-66BBIZAM.mjs +3 -0
- package/dist/browser/chunk-66BBIZAM.mjs.map +1 -0
- package/dist/browser/chunk-6NPQURSO.mjs +2 -0
- package/dist/browser/chunk-6NPQURSO.mjs.map +1 -0
- package/dist/browser/chunk-6WAOMX7M.mjs +2 -0
- package/dist/browser/chunk-6WAOMX7M.mjs.map +1 -0
- package/dist/browser/chunk-77HU5SRQ.mjs +2 -0
- package/dist/browser/chunk-77HU5SRQ.mjs.map +1 -0
- package/dist/browser/chunk-AET6XULU.mjs +2 -0
- package/dist/browser/chunk-AET6XULU.mjs.map +1 -0
- package/dist/browser/chunk-BIBPE2GT.mjs +3 -0
- package/dist/browser/chunk-BIBPE2GT.mjs.map +1 -0
- package/dist/browser/chunk-CDJKU4DK.mjs +2 -0
- package/dist/browser/chunk-CDJKU4DK.mjs.map +1 -0
- package/dist/browser/chunk-CT67Y46H.mjs +3 -0
- package/dist/browser/chunk-CT67Y46H.mjs.map +1 -0
- package/dist/browser/chunk-EFC7OUNO.mjs +2 -0
- package/dist/browser/chunk-EFC7OUNO.mjs.map +1 -0
- package/dist/browser/chunk-EJIX7H7A.mjs +2 -0
- package/dist/browser/chunk-EJIX7H7A.mjs.map +1 -0
- package/dist/browser/chunk-FHJ5ATND.mjs +3 -0
- package/dist/browser/chunk-FHJ5ATND.mjs.map +1 -0
- package/dist/browser/chunk-FVH2EEVP.mjs +3 -0
- package/dist/browser/chunk-FVH2EEVP.mjs.map +1 -0
- package/dist/browser/chunk-G6ULYKSU.mjs +2 -0
- package/dist/browser/chunk-G6ULYKSU.mjs.map +1 -0
- package/dist/browser/chunk-G7MKGKG5.mjs +2 -0
- package/dist/browser/chunk-G7MKGKG5.mjs.map +1 -0
- package/dist/browser/chunk-GOMJPGVB.mjs +3 -0
- package/dist/browser/chunk-GOMJPGVB.mjs.map +1 -0
- package/dist/browser/chunk-INQV5UZA.mjs +2 -0
- package/dist/browser/chunk-INQV5UZA.mjs.map +1 -0
- package/dist/browser/chunk-INXPVBTZ.mjs +2 -0
- package/dist/browser/chunk-INXPVBTZ.mjs.map +1 -0
- package/dist/browser/chunk-KFMVTZ7T.mjs +2 -0
- package/dist/browser/chunk-KFMVTZ7T.mjs.map +1 -0
- package/dist/browser/chunk-LK6C7C3S.mjs +2 -0
- package/dist/browser/chunk-LK6C7C3S.mjs.map +1 -0
- package/dist/browser/chunk-LOGRQOWP.mjs +3 -0
- package/dist/browser/chunk-LOGRQOWP.mjs.map +1 -0
- package/dist/browser/chunk-LZACYSUC.mjs +3 -0
- package/dist/browser/chunk-LZACYSUC.mjs.map +1 -0
- package/dist/browser/chunk-NTOIVRX3.mjs +2 -0
- package/dist/browser/chunk-NTOIVRX3.mjs.map +1 -0
- package/dist/browser/chunk-OES2N3X7.mjs +3 -0
- package/dist/browser/chunk-OES2N3X7.mjs.map +1 -0
- package/dist/browser/chunk-OFKV5GNB.mjs +1 -1
- package/dist/browser/chunk-OFKV5GNB.mjs.map +1 -1
- package/dist/browser/chunk-OVLM5A32.mjs +3 -0
- package/dist/browser/chunk-OVLM5A32.mjs.map +1 -0
- package/dist/browser/chunk-QATIN7CO.mjs +1 -1
- package/dist/browser/chunk-QATIN7CO.mjs.map +1 -1
- package/dist/browser/chunk-QOL7CAUZ.mjs +2 -0
- package/dist/browser/chunk-QOL7CAUZ.mjs.map +1 -0
- package/dist/browser/chunk-RCB3PX4V.mjs +2 -0
- package/dist/browser/chunk-RCB3PX4V.mjs.map +1 -0
- package/dist/browser/chunk-RWQSCROK.mjs +3 -0
- package/dist/browser/chunk-RWQSCROK.mjs.map +1 -0
- package/dist/browser/chunk-TIAUMK2X.mjs +2 -0
- package/dist/browser/chunk-TIAUMK2X.mjs.map +1 -0
- package/dist/browser/chunk-TQPC5MYM.mjs +3 -0
- package/dist/browser/chunk-TQPC5MYM.mjs.map +1 -0
- package/dist/browser/chunk-UNIKTCXL.mjs +3 -0
- package/dist/browser/chunk-UNIKTCXL.mjs.map +1 -0
- package/dist/browser/chunk-UULJJ5C5.mjs +3 -0
- package/dist/browser/chunk-UULJJ5C5.mjs.map +1 -0
- package/dist/browser/chunk-VSSANMPF.mjs +2 -0
- package/dist/browser/chunk-VSSANMPF.mjs.map +1 -0
- package/dist/browser/chunk-VW2BZYNY.mjs +2 -0
- package/dist/browser/chunk-VW2BZYNY.mjs.map +1 -0
- package/dist/browser/chunk-WAXBOWM6.mjs +3 -0
- package/dist/browser/chunk-WAXBOWM6.mjs.map +1 -0
- package/dist/browser/chunk-WXCQCHAX.mjs +2 -0
- package/dist/browser/chunk-WXCQCHAX.mjs.map +1 -0
- package/dist/browser/chunk-XKKBIIZG.mjs +3 -0
- package/dist/browser/chunk-XKKBIIZG.mjs.map +1 -0
- package/dist/browser/chunk-XR7FVA5M.mjs +3 -0
- package/dist/browser/chunk-XR7FVA5M.mjs.map +1 -0
- package/dist/browser/chunk-YQJFTBGV.mjs +1 -1
- package/dist/browser/chunk-YQJFTBGV.mjs.map +1 -1
- package/dist/browser/chunk-YTAMZDWC.mjs +3 -0
- package/dist/browser/chunk-YTAMZDWC.mjs.map +1 -0
- package/dist/browser/chunk-ZEONOTRL.mjs +2 -0
- package/dist/browser/chunk-ZEONOTRL.mjs.map +1 -0
- package/dist/browser/completion.d.mts +10 -0
- package/dist/browser/completion.mjs +2 -0
- package/dist/browser/completion.mjs.map +1 -0
- package/dist/browser/core.d.mts +7 -6
- package/dist/browser/core.mjs +1 -1
- package/dist/browser/core.mjs.map +1 -1
- package/dist/browser/credentials.d.mts +74 -0
- package/dist/browser/credentials.mjs +2 -0
- package/dist/browser/credentials.mjs.map +1 -0
- package/dist/browser/definition.d.mts +3 -2
- package/dist/browser/definition.mjs +1 -1
- package/dist/browser/dynamic-content.d.mts +13 -0
- package/dist/browser/dynamic-content.mjs +2 -0
- package/dist/browser/dynamic-content.mjs.map +1 -0
- package/dist/browser/dynamic-feature.d.mts +66 -6
- package/dist/browser/dynamic-feature.mjs +3 -1
- package/dist/browser/dynamic-feature.mjs.map +1 -1
- package/dist/browser/dynamic-structure.d.mts +77 -3
- package/dist/browser/dynamic-structure.mjs +1 -1
- package/dist/browser/dynamic-structure.mjs.map +1 -1
- package/dist/browser/env.d.mts +16 -2
- package/dist/browser/env.mjs +1 -1
- package/dist/browser/frame-index.d.mts +70 -9
- package/dist/browser/frame-index.mjs +1 -1
- package/dist/browser/models.d.mts +64 -0
- package/dist/browser/models.mjs +2 -0
- package/dist/browser/models.mjs.map +1 -0
- package/dist/browser/namespace.d.mts +1 -1
- package/dist/browser/namespace.mjs +1 -1
- package/dist/browser/schema.d.mts +10 -0
- package/dist/browser/schema.mjs +2 -0
- package/dist/browser/schema.mjs.map +1 -0
- package/dist/browser/segment.d.mts +13 -0
- package/dist/browser/segment.mjs +2 -0
- package/dist/browser/segment.mjs.map +1 -0
- package/dist/browser/storage.d.mts +13 -7
- package/dist/browser/storage.mjs +1 -1
- package/dist/browser/vector.d.mts +7 -0
- package/dist/browser/vector.mjs +1 -1
- package/dist/cli.cjs +5593 -0
- package/dist/cli.cjs.map +1 -0
- package/dist/node/A-FrameChannel.component--YErPxf4.d.mts +97 -0
- package/dist/node/A-FrameChannel.component-BjgqMh1B.d.ts +97 -0
- package/dist/node/A-FrameChannel.component-C0O3TaRD.d.ts +679 -0
- package/dist/node/A-FrameChannel.component-CgBZYBz0.d.mts +379 -0
- package/dist/node/A-FrameChannel.component-CkZserv3.d.ts +97 -0
- package/dist/node/A-FrameChannel.component-DMA-3sUB.d.mts +679 -0
- package/dist/node/A-FrameChannel.component-DYV8omYR.d.ts +379 -0
- package/dist/node/A-FrameChannel.component-DwgYNfFn.d.mts +97 -0
- package/dist/node/A-FrameChannel.types-B3_xWKEO.d.mts +151 -0
- package/dist/node/A-FrameChannel.types-BGcVXTqa.d.ts +205 -0
- package/dist/node/A-FrameChannel.types-Boi8QqDK.d.mts +205 -0
- package/dist/node/A-FrameChannel.types-BsE6bNky.d.mts +205 -0
- package/dist/node/A-FrameChannel.types-C-gxXl8m.d.ts +151 -0
- package/dist/node/A-FrameChannel.types-DD2B11rf.d.ts +205 -0
- package/dist/node/A-FrameChannel.types-DYMgRiCF.d.mts +205 -0
- package/dist/node/A-FrameChannel.types-DwyZRsOy.d.ts +205 -0
- package/dist/node/A-FrameCompletion.entity-Brx11JMp.d.ts +72 -0
- package/dist/node/A-FrameCompletion.entity-Dzy9sIa8.d.mts +72 -0
- package/dist/node/A-FrameDefinition.entity-BIF0sclD.d.ts +370 -0
- package/dist/node/A-FrameDefinition.entity-Bt9ua6cn.d.ts +358 -0
- package/dist/node/A-FrameDefinition.entity-C0kzaGJ0.d.ts +143 -0
- package/dist/node/A-FrameDefinition.entity-C1aK-gdl.d.mts +370 -0
- package/dist/node/A-FrameDefinition.entity-CKPXsarS.d.mts +358 -0
- package/dist/node/A-FrameDefinition.entity-yA0GsBoe.d.mts +143 -0
- package/dist/node/A-FrameDefinition.types-BA_pLGpo.d.ts +232 -0
- package/dist/node/A-FrameDefinition.types-BT02yAhQ.d.mts +232 -0
- package/dist/node/A-FrameDynamicContentOperation.context-C_aH1gEn.d.ts +297 -0
- package/dist/node/A-FrameDynamicContentOperation.context-CoViNb19.d.mts +297 -0
- package/dist/node/A-FrameDynamicContentOperation.context-DRqH2c3o.d.ts +266 -0
- package/dist/node/A-FrameDynamicContentOperation.context-Dd7Lb7X2.d.mts +266 -0
- package/dist/node/A-FrameDynamicPatch.entity-BRuF1tqs.d.mts +29 -0
- package/dist/node/A-FrameDynamicPatch.entity-BRuF1tqs.d.ts +29 -0
- package/dist/node/A-FrameDynamicStructure.entity-BVCbolMd.d.ts +210 -0
- package/dist/node/A-FrameDynamicStructure.entity-DMvI_EPT.d.mts +210 -0
- package/dist/node/A-FrameDynamicStructure.entity-DxkPP9mR.d.mts +235 -0
- package/dist/node/A-FrameDynamicStructure.entity-DxkPP9mR.d.ts +235 -0
- package/dist/node/A-FrameLogger.component.env-node-DIDBeuiz.d.mts +114 -0
- package/dist/node/A-FrameLogger.component.env-node-DIDBeuiz.d.ts +114 -0
- package/dist/node/A-FrameNamespace.entity-BDg1FUgo.d.mts +136 -0
- package/dist/node/A-FrameNamespace.entity-HDXcLGcS.d.ts +136 -0
- package/dist/node/A-FrameSchema.entity-DjYIhsoj.d.mts +141 -0
- package/dist/node/A-FrameSchema.entity-DjYIhsoj.d.ts +141 -0
- package/dist/node/A-FrameSegment.entity-C0izuOmC.d.ts +161 -0
- package/dist/node/A-FrameSegment.entity-CMCgFCWU.d.ts +146 -0
- package/dist/node/A-FrameSegment.entity-D1xjjWvG.d.mts +161 -0
- package/dist/node/A-FrameSegment.entity-D7Aj39Wh.d.mts +146 -0
- package/dist/node/A-FrameStorage.component-BnNKzvpY.d.mts +107 -0
- package/dist/node/A-FrameStorage.component-CDztogHV.d.mts +107 -0
- package/dist/node/A-FrameStorage.component-CW0YgKDI.d.mts +107 -0
- package/dist/node/A-FrameStorage.component-D4UEkIBx.d.mts +107 -0
- package/dist/node/A-FrameStorage.component-DV_jwK6r.d.ts +107 -0
- package/dist/node/A-FrameStorage.component-Di4EvbtC.d.ts +107 -0
- package/dist/node/A-FrameStorage.component-emIH1a1M.d.ts +107 -0
- package/dist/node/A-FrameStorage.component-y-JPiIQ4.d.ts +107 -0
- package/dist/node/bundle.cjs +66 -21
- package/dist/node/bundle.cjs.map +1 -1
- package/dist/node/bundle.d.mts +88 -24
- package/dist/node/bundle.d.ts +88 -24
- package/dist/node/bundle.mjs +65 -20
- package/dist/node/bundle.mjs.map +1 -1
- package/dist/node/channel.cjs +33 -26
- package/dist/node/channel.d.mts +10 -6
- package/dist/node/channel.d.ts +10 -6
- package/dist/node/channel.mjs +13 -6
- package/dist/node/chunk-2HUSP34L.mjs +55 -0
- package/dist/node/chunk-2HUSP34L.mjs.map +1 -0
- package/dist/node/chunk-2KXGI2E5.cjs +474 -0
- package/dist/node/chunk-2KXGI2E5.cjs.map +1 -0
- package/dist/node/chunk-2OQMOIR5.mjs +170 -0
- package/dist/node/chunk-2OQMOIR5.mjs.map +1 -0
- package/dist/node/chunk-2UI7RJ4Q.mjs +207 -0
- package/dist/node/chunk-2UI7RJ4Q.mjs.map +1 -0
- package/dist/node/chunk-3SLICJ3L.cjs +265 -0
- package/dist/node/chunk-3SLICJ3L.cjs.map +1 -0
- package/dist/node/chunk-3ZDHQOIU.cjs +92 -0
- package/dist/node/chunk-3ZDHQOIU.cjs.map +1 -0
- package/dist/node/chunk-5BKCX2RO.mjs +1 -1
- package/dist/node/chunk-5BKCX2RO.mjs.map +1 -1
- package/dist/node/chunk-5NCGXLP2.mjs +6 -0
- package/dist/node/chunk-5NCGXLP2.mjs.map +1 -0
- package/dist/node/chunk-5OTXZ7BB.mjs +53 -0
- package/dist/node/chunk-5OTXZ7BB.mjs.map +1 -0
- package/dist/node/chunk-5PYIATGT.mjs +469 -0
- package/dist/node/chunk-5PYIATGT.mjs.map +1 -0
- package/dist/node/chunk-64QCZG53.cjs +57 -0
- package/dist/node/chunk-64QCZG53.cjs.map +1 -0
- package/dist/node/chunk-652OEICJ.cjs +4 -0
- package/dist/node/chunk-652OEICJ.cjs.map +1 -0
- package/dist/node/chunk-674ZX6XJ.mjs +187 -0
- package/dist/node/chunk-674ZX6XJ.mjs.map +1 -0
- package/dist/node/chunk-6ID2IXYX.mjs +6 -0
- package/dist/node/chunk-6ID2IXYX.mjs.map +1 -0
- package/dist/node/chunk-7EM3Q7HA.mjs +655 -0
- package/dist/node/chunk-7EM3Q7HA.mjs.map +1 -0
- package/dist/node/chunk-7MVVMISA.cjs +293 -0
- package/dist/node/chunk-7MVVMISA.cjs.map +1 -0
- package/dist/node/chunk-7NSLGCAZ.mjs +1395 -0
- package/dist/node/chunk-7NSLGCAZ.mjs.map +1 -0
- package/dist/node/chunk-7OLLATCC.mjs +1289 -0
- package/dist/node/chunk-7OLLATCC.mjs.map +1 -0
- package/dist/node/chunk-7SEZMRLI.cjs +183 -0
- package/dist/node/chunk-7SEZMRLI.cjs.map +1 -0
- package/dist/node/chunk-A4CVDMSV.mjs +608 -0
- package/dist/node/chunk-A4CVDMSV.mjs.map +1 -0
- package/dist/node/chunk-A7CJIUYY.cjs +4 -0
- package/dist/node/chunk-A7CJIUYY.cjs.map +1 -0
- package/dist/node/chunk-ALFFUJ2J.mjs +163 -0
- package/dist/node/chunk-ALFFUJ2J.mjs.map +1 -0
- package/dist/node/chunk-AMMQ76RJ.mjs +179 -0
- package/dist/node/chunk-AMMQ76RJ.mjs.map +1 -0
- package/dist/node/chunk-AUKWKGVA.cjs +688 -0
- package/dist/node/chunk-AUKWKGVA.cjs.map +1 -0
- package/dist/node/chunk-AY6UMDWD.cjs +270 -0
- package/dist/node/chunk-AY6UMDWD.cjs.map +1 -0
- package/dist/node/chunk-B7ZDJXD3.cjs +1 -1
- package/dist/node/chunk-B7ZDJXD3.cjs.map +1 -1
- package/dist/node/chunk-BBYOL3LM.cjs +1308 -0
- package/dist/node/chunk-BBYOL3LM.cjs.map +1 -0
- package/dist/node/chunk-BINGAHFW.cjs +1308 -0
- package/dist/node/chunk-BINGAHFW.cjs.map +1 -0
- package/dist/node/chunk-BSBY37MG.cjs +55 -0
- package/dist/node/chunk-BSBY37MG.cjs.map +1 -0
- package/dist/node/chunk-BWX7HFTH.cjs +209 -0
- package/dist/node/chunk-BWX7HFTH.cjs.map +1 -0
- package/dist/node/chunk-C37B34MH.cjs +188 -0
- package/dist/node/chunk-C37B34MH.cjs.map +1 -0
- package/dist/node/chunk-C6BBKHQG.cjs +250 -0
- package/dist/node/chunk-C6BBKHQG.cjs.map +1 -0
- package/dist/node/chunk-CLCAS67N.cjs +8 -0
- package/dist/node/chunk-CLCAS67N.cjs.map +1 -0
- package/dist/node/chunk-CNU3CRTR.mjs +43 -0
- package/dist/node/chunk-CNU3CRTR.mjs.map +1 -0
- package/dist/node/chunk-CV5FPKU6.mjs +6 -0
- package/dist/node/chunk-CV5FPKU6.mjs.map +1 -0
- package/dist/node/chunk-CZYOAFIR.mjs +129 -0
- package/dist/node/chunk-CZYOAFIR.mjs.map +1 -0
- package/dist/node/chunk-D2HTYEJZ.cjs +209 -0
- package/dist/node/chunk-D2HTYEJZ.cjs.map +1 -0
- package/dist/node/chunk-EMLZZPOT.cjs +1446 -0
- package/dist/node/chunk-EMLZZPOT.cjs.map +1 -0
- package/dist/node/chunk-EOIXXXBV.cjs +55 -0
- package/dist/node/chunk-EOIXXXBV.cjs.map +1 -0
- package/dist/node/chunk-F4UCOZW5.mjs +1 -1
- package/dist/node/chunk-F4UCOZW5.mjs.map +1 -1
- package/dist/node/chunk-F64CK4NI.mjs +53 -0
- package/dist/node/chunk-F64CK4NI.mjs.map +1 -0
- package/dist/node/chunk-FAV62EUG.cjs +35 -0
- package/dist/node/chunk-FAV62EUG.cjs.map +1 -0
- package/dist/node/chunk-GHSPKZUN.mjs +529 -0
- package/dist/node/chunk-GHSPKZUN.mjs.map +1 -0
- package/dist/node/chunk-GRNVK7DW.mjs +97 -0
- package/dist/node/chunk-GRNVK7DW.mjs.map +1 -0
- package/dist/node/chunk-H5VGRPD5.cjs +8 -0
- package/dist/node/chunk-H5VGRPD5.cjs.map +1 -0
- package/dist/node/chunk-HAMDDCPS.cjs +8 -0
- package/dist/node/chunk-HAMDDCPS.cjs.map +1 -0
- package/dist/node/chunk-HAORARSB.cjs +75 -0
- package/dist/node/chunk-HAORARSB.cjs.map +1 -0
- package/dist/node/chunk-HELNAM5Y.cjs +8 -0
- package/dist/node/chunk-HELNAM5Y.cjs.map +1 -0
- package/dist/node/chunk-HET6L5PD.mjs +530 -0
- package/dist/node/chunk-HET6L5PD.mjs.map +1 -0
- package/dist/node/chunk-HI5SEX53.mjs +264 -0
- package/dist/node/chunk-HI5SEX53.mjs.map +1 -0
- package/dist/node/chunk-HZGFXE4Q.mjs +6 -0
- package/dist/node/chunk-HZGFXE4Q.mjs.map +1 -0
- package/dist/node/chunk-IAL2NK2V.mjs +73 -0
- package/dist/node/chunk-IAL2NK2V.mjs.map +1 -0
- package/dist/node/chunk-IHELFDCW.mjs +327 -0
- package/dist/node/chunk-IHELFDCW.mjs.map +1 -0
- package/dist/node/chunk-ILD6OSYW.mjs +966 -0
- package/dist/node/chunk-ILD6OSYW.mjs.map +1 -0
- package/dist/node/chunk-IP6DFAO7.mjs +264 -0
- package/dist/node/chunk-IP6DFAO7.mjs.map +1 -0
- package/dist/node/chunk-IYEDO7OQ.cjs +276 -0
- package/dist/node/chunk-IYEDO7OQ.cjs.map +1 -0
- package/dist/node/chunk-JFPGFPQD.mjs +1413 -0
- package/dist/node/chunk-JFPGFPQD.mjs.map +1 -0
- package/dist/node/chunk-JHZGTVYF.cjs +999 -0
- package/dist/node/chunk-JHZGTVYF.cjs.map +1 -0
- package/dist/node/chunk-JN3UJBUH.mjs +608 -0
- package/dist/node/chunk-JN3UJBUH.mjs.map +1 -0
- package/dist/node/chunk-JNPDXCCN.mjs +530 -0
- package/dist/node/chunk-JNPDXCCN.mjs.map +1 -0
- package/dist/node/chunk-JQBYDEMW.mjs +1 -1
- package/dist/node/chunk-JQBYDEMW.mjs.map +1 -1
- package/dist/node/chunk-JQJ7N4NL.cjs +267 -0
- package/dist/node/chunk-JQJ7N4NL.cjs.map +1 -0
- package/dist/node/chunk-K4AJBPPY.cjs +174 -0
- package/dist/node/chunk-K4AJBPPY.cjs.map +1 -0
- package/dist/node/chunk-K7SXPJPK.cjs +131 -0
- package/dist/node/chunk-K7SXPJPK.cjs.map +1 -0
- package/dist/node/chunk-KFW4GE7H.mjs +1289 -0
- package/dist/node/chunk-KFW4GE7H.mjs.map +1 -0
- package/dist/node/chunk-KKL2DF2D.cjs +518 -0
- package/dist/node/chunk-KKL2DF2D.cjs.map +1 -0
- package/dist/node/chunk-KKMKQGTR.cjs +620 -0
- package/dist/node/chunk-KKMKQGTR.cjs.map +1 -0
- package/dist/node/chunk-KNTO7FCZ.mjs +207 -0
- package/dist/node/chunk-KNTO7FCZ.mjs.map +1 -0
- package/dist/node/chunk-KTKVW3PH.mjs +286 -0
- package/dist/node/chunk-KTKVW3PH.mjs.map +1 -0
- package/dist/node/chunk-KZPSF32W.mjs +33 -0
- package/dist/node/chunk-KZPSF32W.mjs.map +1 -0
- package/dist/node/chunk-LWKFCMA7.mjs +129 -0
- package/dist/node/chunk-LWKFCMA7.mjs.map +1 -0
- package/dist/node/chunk-M2ZSE6YJ.mjs +512 -0
- package/dist/node/chunk-M2ZSE6YJ.mjs.map +1 -0
- package/dist/node/chunk-M6DJYGDO.cjs +167 -0
- package/dist/node/chunk-M6DJYGDO.cjs.map +1 -0
- package/dist/node/chunk-MAHKDTOQ.mjs +3 -0
- package/dist/node/chunk-MAHKDTOQ.mjs.map +1 -0
- package/dist/node/chunk-MM2R2OM6.cjs +541 -0
- package/dist/node/chunk-MM2R2OM6.cjs.map +1 -0
- package/dist/node/chunk-MSOD5UQH.cjs +45 -0
- package/dist/node/chunk-MSOD5UQH.cjs.map +1 -0
- package/dist/node/chunk-MVAWR76Q.cjs +276 -0
- package/dist/node/chunk-MVAWR76Q.cjs.map +1 -0
- package/dist/node/chunk-MXUO7OR5.cjs +97 -0
- package/dist/node/chunk-MXUO7OR5.cjs.map +1 -0
- package/dist/node/chunk-N4THTV6P.cjs +131 -0
- package/dist/node/chunk-N4THTV6P.cjs.map +1 -0
- package/dist/node/chunk-NIXKAQVP.cjs +1 -1
- package/dist/node/chunk-NIXKAQVP.cjs.map +1 -1
- package/dist/node/chunk-NUPXUUPM.cjs +1428 -0
- package/dist/node/chunk-NUPXUUPM.cjs.map +1 -0
- package/dist/node/chunk-NWOUVAIS.cjs +45 -0
- package/dist/node/chunk-NWOUVAIS.cjs.map +1 -0
- package/dist/node/chunk-OK7I5OQ3.mjs +89 -0
- package/dist/node/chunk-OK7I5OQ3.mjs.map +1 -0
- package/dist/node/chunk-OMGYXCFM.mjs +248 -0
- package/dist/node/chunk-OMGYXCFM.mjs.map +1 -0
- package/dist/node/chunk-OYZAQMKD.mjs +263 -0
- package/dist/node/chunk-OYZAQMKD.mjs.map +1 -0
- package/dist/node/chunk-P2LULMNL.cjs +189 -0
- package/dist/node/chunk-P2LULMNL.cjs.map +1 -0
- package/dist/node/chunk-PABEFHCO.mjs +63 -0
- package/dist/node/chunk-PABEFHCO.mjs.map +1 -0
- package/dist/node/chunk-Q5NYJQP2.cjs +8 -0
- package/dist/node/chunk-Q5NYJQP2.cjs.map +1 -0
- package/dist/node/chunk-QCEWWJ3N.cjs +65 -0
- package/dist/node/chunk-QCEWWJ3N.cjs.map +1 -0
- package/dist/node/chunk-QW4AZ3Z2.cjs +542 -0
- package/dist/node/chunk-QW4AZ3Z2.cjs.map +1 -0
- package/dist/node/chunk-RK5WSZ5J.mjs +43 -0
- package/dist/node/chunk-RK5WSZ5J.mjs.map +1 -0
- package/dist/node/chunk-RPHYBPXT.mjs +30 -0
- package/dist/node/chunk-RPHYBPXT.mjs.map +1 -0
- package/dist/node/chunk-RVXASBMQ.mjs +273 -0
- package/dist/node/chunk-RVXASBMQ.mjs.map +1 -0
- package/dist/node/chunk-RVZTZD32.mjs +187 -0
- package/dist/node/chunk-RVZTZD32.mjs.map +1 -0
- package/dist/node/chunk-RWLKISZQ.mjs +273 -0
- package/dist/node/chunk-RWLKISZQ.mjs.map +1 -0
- package/dist/node/chunk-SESXQJDD.cjs +999 -0
- package/dist/node/chunk-SESXQJDD.cjs.map +1 -0
- package/dist/node/chunk-SKIEPTFS.mjs +6 -0
- package/dist/node/chunk-SKIEPTFS.mjs.map +1 -0
- package/dist/node/chunk-SL7FT5R5.mjs +94 -0
- package/dist/node/chunk-SL7FT5R5.mjs.map +1 -0
- package/dist/node/chunk-SXHQW74T.mjs +43 -0
- package/dist/node/chunk-SXHQW74T.mjs.map +1 -0
- package/dist/node/chunk-TEJKDVNT.cjs +620 -0
- package/dist/node/chunk-TEJKDVNT.cjs.map +1 -0
- package/dist/node/chunk-TQS5WYND.cjs +352 -0
- package/dist/node/chunk-TQS5WYND.cjs.map +1 -0
- package/dist/node/chunk-UCAWV2IG.mjs +184 -0
- package/dist/node/chunk-UCAWV2IG.mjs.map +1 -0
- package/dist/node/chunk-UDUJDEAO.cjs +189 -0
- package/dist/node/chunk-UDUJDEAO.cjs.map +1 -0
- package/dist/node/chunk-VMJDL4SS.cjs +542 -0
- package/dist/node/chunk-VMJDL4SS.cjs.map +1 -0
- package/dist/node/chunk-VNOZTB3B.cjs +8 -0
- package/dist/node/chunk-VNOZTB3B.cjs.map +1 -0
- package/dist/node/chunk-VPMBZGYR.mjs +327 -0
- package/dist/node/chunk-VPMBZGYR.mjs.map +1 -0
- package/dist/node/chunk-WEPNBKOA.mjs +6 -0
- package/dist/node/chunk-WEPNBKOA.mjs.map +1 -0
- package/dist/node/chunk-WTBRJXFG.cjs +100 -0
- package/dist/node/chunk-WTBRJXFG.cjs.map +1 -0
- package/dist/node/chunk-WXCQCHAX.mjs +3 -0
- package/dist/node/chunk-WXCQCHAX.mjs.map +1 -0
- package/dist/node/chunk-X3TRPYGV.cjs +352 -0
- package/dist/node/chunk-X3TRPYGV.cjs.map +1 -0
- package/dist/node/chunk-XFUF7SDO.cjs +1 -1
- package/dist/node/chunk-XFUF7SDO.cjs.map +1 -1
- package/dist/node/chunk-XP2EPEBM.mjs +966 -0
- package/dist/node/chunk-XP2EPEBM.mjs.map +1 -0
- package/dist/node/chunk-XPIJ6BKP.cjs +45 -0
- package/dist/node/chunk-XPIJ6BKP.cjs.map +1 -0
- package/dist/node/chunk-YRVBMP7I.cjs +542 -0
- package/dist/node/chunk-YRVBMP7I.cjs.map +1 -0
- package/dist/node/chunk-ZIHSN5EE.mjs +530 -0
- package/dist/node/chunk-ZIHSN5EE.mjs.map +1 -0
- package/dist/node/chunk-ZNQMUU7I.cjs +32 -0
- package/dist/node/chunk-ZNQMUU7I.cjs.map +1 -0
- package/dist/node/completion.cjs +23 -0
- package/dist/node/completion.cjs.map +1 -0
- package/dist/node/completion.d.mts +10 -0
- package/dist/node/completion.d.ts +10 -0
- package/dist/node/completion.mjs +6 -0
- package/dist/node/completion.mjs.map +1 -0
- package/dist/node/core.cjs +67 -38
- package/dist/node/core.cjs.map +1 -1
- package/dist/node/core.d.mts +13 -8
- package/dist/node/core.d.ts +13 -8
- package/dist/node/core.mjs +58 -29
- package/dist/node/core.mjs.map +1 -1
- package/dist/node/credentials.cjs +17 -0
- package/dist/node/credentials.cjs.map +1 -0
- package/dist/node/credentials.d.mts +74 -0
- package/dist/node/credentials.d.ts +74 -0
- package/dist/node/credentials.mjs +4 -0
- package/dist/node/credentials.mjs.map +1 -0
- package/dist/node/definition.cjs +6 -4
- package/dist/node/definition.d.mts +3 -2
- package/dist/node/definition.d.ts +3 -2
- package/dist/node/definition.mjs +4 -2
- package/dist/node/dynamic-content.cjs +30 -0
- package/dist/node/dynamic-content.cjs.map +1 -0
- package/dist/node/dynamic-content.d.mts +13 -0
- package/dist/node/dynamic-content.d.ts +13 -0
- package/dist/node/dynamic-content.mjs +9 -0
- package/dist/node/dynamic-content.mjs.map +1 -0
- package/dist/node/dynamic-feature.cjs +41 -7
- package/dist/node/dynamic-feature.cjs.map +1 -1
- package/dist/node/dynamic-feature.d.mts +66 -6
- package/dist/node/dynamic-feature.d.ts +66 -6
- package/dist/node/dynamic-feature.mjs +16 -9
- package/dist/node/dynamic-feature.mjs.map +1 -1
- package/dist/node/dynamic-structure.cjs +45 -136
- package/dist/node/dynamic-structure.cjs.map +1 -1
- package/dist/node/dynamic-structure.d.mts +77 -3
- package/dist/node/dynamic-structure.d.ts +77 -3
- package/dist/node/dynamic-structure.mjs +16 -135
- package/dist/node/dynamic-structure.mjs.map +1 -1
- package/dist/node/env.cjs +3 -3
- package/dist/node/env.d.mts +26 -0
- package/dist/node/env.d.ts +26 -0
- package/dist/node/env.mjs +2 -2
- package/dist/node/frame-index.cjs +7 -4
- package/dist/node/frame-index.d.mts +70 -9
- package/dist/node/frame-index.d.ts +70 -9
- package/dist/node/frame-index.mjs +6 -3
- package/dist/node/logger.d.mts +4 -113
- package/dist/node/logger.d.ts +4 -113
- package/dist/node/models.cjs +14 -0
- package/dist/node/models.cjs.map +1 -0
- package/dist/node/models.d.mts +64 -0
- package/dist/node/models.d.ts +64 -0
- package/dist/node/models.mjs +5 -0
- package/dist/node/models.mjs.map +1 -0
- package/dist/node/namespace.cjs +7 -5
- package/dist/node/namespace.d.mts +1 -1
- package/dist/node/namespace.d.ts +1 -1
- package/dist/node/namespace.mjs +4 -2
- package/dist/node/schema.cjs +22 -0
- package/dist/node/schema.cjs.map +1 -0
- package/dist/node/schema.d.mts +10 -0
- package/dist/node/schema.d.ts +10 -0
- package/dist/node/schema.mjs +5 -0
- package/dist/node/schema.mjs.map +1 -0
- package/dist/node/segment.cjs +25 -0
- package/dist/node/segment.cjs.map +1 -0
- package/dist/node/segment.d.mts +13 -0
- package/dist/node/segment.d.ts +13 -0
- package/dist/node/segment.mjs +8 -0
- package/dist/node/segment.mjs.map +1 -0
- package/dist/node/storage.cjs +17 -14
- package/dist/node/storage.d.mts +18 -6
- package/dist/node/storage.d.ts +18 -6
- package/dist/node/storage.mjs +11 -8
- package/dist/node/vector.cjs +2 -2
- package/dist/node/vector.d.mts +7 -0
- package/dist/node/vector.d.ts +7 -0
- package/dist/node/vector.mjs +1 -1
- package/examples/article/main.ts +358 -0
- package/examples/components.ts +660 -0
- package/examples/feature/file-system.components.ts +211 -0
- package/examples/feature/main.ts +374 -0
- package/examples/interaction/main.ts +426 -0
- package/examples/logger.ts +126 -0
- package/examples/structure/main.ts +195 -0
- package/examples/structure/renderer.ts +296 -0
- package/examples/structure/server-app.components.ts +387 -0
- package/jest.config.browser.ts +9 -0
- package/jest.config.examples.ts +49 -0
- package/jest.config.integration.ts +38 -0
- package/jest.config.ts +56 -27
- package/jest.config.unit.ts +38 -0
- package/package.json +75 -7
- package/src/index.ts +13 -0
- package/src/lib/A-Frame/A-Frame.component.env-browser.ts +14 -3
- package/src/lib/A-Frame/A-Frame.component.env-node.ts +45 -15
- package/src/lib/A-Frame/A-Frame.context.ts +9 -8
- package/src/lib/A-Frame/decorators/A-FrameDefine.decorator.ts +4 -4
- package/src/lib/A-FrameBundle/A-FrameBundle.builder.env-node.ts +95 -25
- package/src/lib/A-FrameBundle/A-FrameBundle.constants.ts +1 -1
- package/src/lib/A-FrameBundle/A-FrameBundle.types.ts +54 -13
- package/src/lib/A-FrameBundle/index.browser.ts +1 -1
- package/src/lib/A-FrameBundle/index.ts +1 -1
- package/src/lib/A-FrameCLI/A-FrameCLI.container.ts +18 -7
- package/src/lib/A-FrameChannel/A-FrameChannel.component.env-browser.ts +0 -2
- package/src/lib/A-FrameChannel/A-FrameChannel.component.env-node.ts +14 -15
- package/src/lib/A-FrameChannel/A-FrameChannel.component.ts +542 -7
- package/src/lib/A-FrameChannel/A-FrameChannel.constants.ts +2 -0
- package/src/lib/A-FrameChannel/A-FrameChannel.types.ts +65 -1
- package/src/lib/A-FrameChannel/A-FrameChannelDsgStream.entity.ts +112 -0
- package/src/lib/A-FrameChannel/A-FrameChannelStream.entity.ts +1 -0
- package/src/lib/A-FrameChannel/index.browser.ts +5 -0
- package/src/lib/A-FrameCompletion/A-FrameCompletion.constants.ts +3 -0
- package/src/lib/A-FrameCompletion/A-FrameCompletion.entity.ts +128 -0
- package/src/lib/A-FrameCompletion/A-FrameCompletion.types.ts +40 -0
- package/src/lib/A-FrameCompletion/index.ts +3 -0
- package/src/lib/A-FrameCredentials/A-FrameCredentials.constants.ts +5 -0
- package/src/lib/A-FrameCredentials/A-FrameCredentials.entity.ts +120 -0
- package/src/lib/A-FrameCredentials/A-FrameCredentials.types.ts +39 -0
- package/src/lib/A-FrameCredentials/index.ts +3 -0
- package/src/lib/A-FrameDefinition/A-FrameDefinition.entity.ts +23 -1
- package/src/lib/A-FrameDefinition/A-FrameDefinition.types.ts +34 -1
- package/src/lib/A-FrameDynamicContent/A-FrameDynamicContent.constants.ts +5 -0
- package/src/lib/A-FrameDynamicContent/A-FrameDynamicContent.entity.ts +348 -0
- package/src/lib/A-FrameDynamicContent/A-FrameDynamicContent.error.ts +10 -0
- package/src/lib/A-FrameDynamicContent/A-FrameDynamicContent.types.ts +116 -0
- package/src/lib/A-FrameDynamicContent/A-FrameDynamicContentIndex.context.ts +288 -0
- package/src/lib/A-FrameDynamicContent/A-FrameDynamicContentOperation.context.ts +26 -0
- package/src/lib/A-FrameDynamicContent/index.ts +5 -0
- package/src/lib/A-FrameDynamicFeature/A-FrameDynamicFeature.constants.ts +6 -0
- package/src/lib/A-FrameDynamicFeature/A-FrameDynamicFeature.entity.ts +253 -4
- package/src/lib/A-FrameDynamicFeature/A-FrameDynamicFeature.error.ts +11 -0
- package/src/lib/A-FrameDynamicFeature/A-FrameDynamicFeature.types.ts +188 -4
- package/src/lib/A-FrameDynamicFeature/A-FrameDynamicFeatureOperation.context.ts +33 -0
- package/src/lib/A-FrameDynamicFeature/A-FrameMethodMapIndex.context.ts +99 -0
- package/src/lib/A-FrameDynamicFeature/A-FrameMethodMapper.component.ts +182 -0
- package/src/lib/A-FrameDynamicFeature/index.ts +6 -1
- package/src/lib/A-FrameDynamicPatch/index.ts +2 -0
- package/src/lib/A-FrameDynamicStructure/A-FrameComponentMapIndex.context.ts +99 -0
- package/src/lib/A-FrameDynamicStructure/A-FrameComponentMapper.component.ts +320 -0
- package/src/lib/A-FrameDynamicStructure/A-FrameDynamicStructure.constants.ts +2 -1
- package/src/lib/A-FrameDynamicStructure/A-FrameDynamicStructure.entity.ts +240 -128
- package/src/lib/A-FrameDynamicStructure/A-FrameDynamicStructure.types.ts +183 -87
- package/src/lib/A-FrameDynamicStructure/index.ts +3 -0
- package/src/lib/A-FrameEnv/A-FrameEnv.fragment.env-browser.ts +5 -1
- package/src/lib/A-FrameEnv/A-FrameEnv.fragment.env-node.ts +23 -1
- package/src/lib/A-FrameEnv/A-FrameEnv.types.ts +12 -0
- package/src/lib/A-FrameIndex/A-FrameIndex.context.ts +63 -13
- package/src/lib/A-FrameIndex/A-FrameIndex.types.ts +53 -0
- package/src/lib/A-FrameModels/A-FrameModels.constants.ts +75 -0
- package/src/lib/A-FrameModels/index.ts +1 -0
- package/src/lib/A-FrameNamespace/A-FrameNamespace.entity.ts +10 -3
- package/src/lib/A-FrameNamespace/A-FrameNamespace.types.ts +5 -0
- package/src/lib/A-FrameSchema/A-FrameSchema.constants.ts +4 -0
- package/src/lib/A-FrameSchema/A-FrameSchema.entity.ts +154 -0
- package/src/lib/A-FrameSchema/A-FrameSchema.types.ts +88 -0
- package/src/lib/A-FrameSchema/index.ts +3 -0
- package/src/lib/A-FrameSegment/A-FrameSegment.constants.ts +12 -0
- package/src/lib/A-FrameSegment/A-FrameSegment.entity.ts +221 -0
- package/src/lib/A-FrameSegment/A-FrameSegment.types.ts +91 -0
- package/src/lib/A-FrameSegment/index.ts +3 -0
- package/src/lib/A-FrameStorage/A-FrameStorage.codec.ts +10 -4
- package/src/lib/A-FrameStorage/browser/A-FrameBrowserStorage.component.ts +21 -0
- package/src/lib/A-FrameStorage/browser/A-FrameBrowserStorageBlobs.context.ts +39 -21
- package/src/lib/A-FrameStorage/node/A-FrameNodeStorage.component.ts +124 -42
- package/src/lib/A-FrameVector/A-FrameVector.entity.ts +24 -0
- package/tests/A-Frame.browser.test.ts +167 -57
- package/tests/A-FrameDynamicContent.browser.test.ts +74 -0
- package/tests/integration/A-Frame.integration.test.ts +272 -0
- package/tests/integration/A-FrameCompletion.integration.test.ts +88 -0
- package/tests/integration/A-FrameContentMapping.integration.test.ts +261 -0
- package/tests/integration/A-FrameDefinition.integration.test.ts +154 -0
- package/tests/integration/A-FrameDynamicContent.integration.test.ts +126 -0
- package/tests/integration/A-FrameDynamicFeature.integration.test.ts +337 -0
- package/tests/integration/A-FrameDynamicStructure.integration.test.ts +264 -0
- package/tests/integration/A-FrameNamespace.integration.test.ts +109 -0
- package/tests/integration/A-FrameSchema.integration.test.ts +74 -0
- package/tests/integration/A-FrameSegment.integration.test.ts +102 -0
- package/tests/integration/A-FrameStorage.integration.test.ts +598 -0
- package/tests/jest.setup.browser.ts +1 -1
- package/tests/jest.setup.ts +4 -0
- package/tests/jest.setup.unit.ts +30 -0
- package/tests/unit/A-FrameChannel.unit.test.ts +124 -0
- package/tests/unit/A-FrameCompletion.unit.test.ts +25 -0
- package/tests/unit/A-FrameDefinition.unit.test.ts +36 -0
- package/tests/unit/A-FrameDynamicContent.unit.test.ts +28 -0
- package/tests/unit/A-FrameNamespace.unit.test.ts +35 -0
- package/tests/unit/A-FrameSchema.unit.test.ts +31 -0
- package/tests/unit/A-FrameSegment.unit.test.ts +20 -0
- package/tests/unit/mocks/MockA_FrameChannel.ts +112 -0
- package/tsconfig.browser.json +2 -0
- package/tsconfig.json +6 -0
- package/tsup.config.ts +52 -0
- package/tests/A-Frame.test.ts +0 -98
|
@@ -0,0 +1,999 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkWTBRJXFG_cjs = require('./chunk-WTBRJXFG.cjs');
|
|
4
|
+
var chunk2KXGI2E5_cjs = require('./chunk-2KXGI2E5.cjs');
|
|
5
|
+
var chunkAY6UMDWD_cjs = require('./chunk-AY6UMDWD.cjs');
|
|
6
|
+
var chunkNWOUVAIS_cjs = require('./chunk-NWOUVAIS.cjs');
|
|
7
|
+
var chunkD2HTYEJZ_cjs = require('./chunk-D2HTYEJZ.cjs');
|
|
8
|
+
var chunk7SEZMRLI_cjs = require('./chunk-7SEZMRLI.cjs');
|
|
9
|
+
var chunk3ZDHQOIU_cjs = require('./chunk-3ZDHQOIU.cjs');
|
|
10
|
+
var chunkM6DJYGDO_cjs = require('./chunk-M6DJYGDO.cjs');
|
|
11
|
+
var chunkMVAWR76Q_cjs = require('./chunk-MVAWR76Q.cjs');
|
|
12
|
+
var chunkHAORARSB_cjs = require('./chunk-HAORARSB.cjs');
|
|
13
|
+
var chunkQFHZIG7Y_cjs = require('./chunk-QFHZIG7Y.cjs');
|
|
14
|
+
var aConcept = require('@adaas/a-concept');
|
|
15
|
+
var http = require('http');
|
|
16
|
+
var https = require('https');
|
|
17
|
+
|
|
18
|
+
function _interopNamespace(e) {
|
|
19
|
+
if (e && e.__esModule) return e;
|
|
20
|
+
var n = Object.create(null);
|
|
21
|
+
if (e) {
|
|
22
|
+
Object.keys(e).forEach(function (k) {
|
|
23
|
+
if (k !== 'default') {
|
|
24
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
25
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function () { return e[k]; }
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
n.default = e;
|
|
33
|
+
return Object.freeze(n);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
var http__namespace = /*#__PURE__*/_interopNamespace(http);
|
|
37
|
+
var https__namespace = /*#__PURE__*/_interopNamespace(https);
|
|
38
|
+
|
|
39
|
+
// src/lib/A-FrameChannel/A-FrameChannel.constants.ts
|
|
40
|
+
var A_FrameFeatures = {
|
|
41
|
+
Request: "_A_FRAME_REQUEST",
|
|
42
|
+
Socket: "_A_FRAME_SOCKET",
|
|
43
|
+
Stream: "_A_FRAME_STREAM",
|
|
44
|
+
Send: "_A_FRAME_SEND"
|
|
45
|
+
};
|
|
46
|
+
var A_FrameChannelStreamStatuses = {
|
|
47
|
+
Open: "open",
|
|
48
|
+
Closed: "closed"
|
|
49
|
+
};
|
|
50
|
+
var A_FrameChannelStreamFeatures = {
|
|
51
|
+
open: "_A_FRAME_CHANNEL_STREAM_OPEN",
|
|
52
|
+
send: "_A_FRAME_CHANNEL_STREAM_SEND",
|
|
53
|
+
onEvent: "_A_FRAME_CHANNEL_STREAM_ON_EVENT",
|
|
54
|
+
onError: "_A_FRAME_CHANNEL_STREAM_ON_ERROR",
|
|
55
|
+
onComplete: "_A_FRAME_CHANNEL_STREAM_ON_COMPLETE",
|
|
56
|
+
onClose: "_A_FRAME_CHANNEL_STREAM_ON_CLOSE"
|
|
57
|
+
};
|
|
58
|
+
var A_FrameChannelSocketStatuses = {
|
|
59
|
+
Connecting: "connecting",
|
|
60
|
+
Open: "open",
|
|
61
|
+
Closed: "closed"
|
|
62
|
+
};
|
|
63
|
+
var A_FrameChannelSocketFeatures = {
|
|
64
|
+
onEvent: "_A_FRAME_CHANNEL_SOCKET_ON_EVENT",
|
|
65
|
+
onError: "_A_FRAME_CHANNEL_SOCKET_ON_ERROR",
|
|
66
|
+
onOpen: "_A_FRAME_CHANNEL_SOCKET_ON_OPEN",
|
|
67
|
+
onClose: "_A_FRAME_CHANNEL_SOCKET_ON_CLOSE"
|
|
68
|
+
};
|
|
69
|
+
var A_FrameChannelRequest = class extends aConcept.A_Fragment {
|
|
70
|
+
constructor(method, path, body) {
|
|
71
|
+
super({ name: "a-frame-channel-request" });
|
|
72
|
+
this.method = method;
|
|
73
|
+
this.path = path;
|
|
74
|
+
this.body = body;
|
|
75
|
+
}
|
|
76
|
+
complete(response) {
|
|
77
|
+
this._response = response;
|
|
78
|
+
}
|
|
79
|
+
fail(error) {
|
|
80
|
+
this._error = error;
|
|
81
|
+
}
|
|
82
|
+
get response() {
|
|
83
|
+
return this._response;
|
|
84
|
+
}
|
|
85
|
+
get error() {
|
|
86
|
+
return this._error;
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
var A_FrameChannelError = class extends aConcept.A_Error {
|
|
90
|
+
};
|
|
91
|
+
A_FrameChannelError.InvalidRequest = "InvalidRequest";
|
|
92
|
+
A_FrameChannelError.Timeout = "Timeout";
|
|
93
|
+
A_FrameChannelError.RequestFailed = "RequestFailed";
|
|
94
|
+
var A_FrameChannelEvent = class extends aConcept.A_Fragment {
|
|
95
|
+
constructor(name, data) {
|
|
96
|
+
super({ name: "a-frame-channel-event-" + name });
|
|
97
|
+
this._data = data;
|
|
98
|
+
this._eventName = name;
|
|
99
|
+
}
|
|
100
|
+
get name() {
|
|
101
|
+
return this._eventName;
|
|
102
|
+
}
|
|
103
|
+
get data() {
|
|
104
|
+
return this._data;
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
var A_FrameChannelStream = class extends aConcept.A_Entity {
|
|
108
|
+
static onEvent(name) {
|
|
109
|
+
const eventName = (name || "all") + A_FrameChannelStreamFeatures.onEvent;
|
|
110
|
+
return (target, propertyKey, descriptor) => {
|
|
111
|
+
return aConcept.A_Feature.Extend({
|
|
112
|
+
name: eventName,
|
|
113
|
+
scope: [target.constructor]
|
|
114
|
+
})(target, propertyKey, descriptor);
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* The scope of the session, Will be destroyed after the session is closed.
|
|
119
|
+
*/
|
|
120
|
+
get scope() {
|
|
121
|
+
if (!this._scope) {
|
|
122
|
+
this._scope = aConcept.A_Context.allocate(this, new aConcept.A_Scope({ name: `${this.aseid.id}-scope` }));
|
|
123
|
+
}
|
|
124
|
+
return this._scope;
|
|
125
|
+
}
|
|
126
|
+
get method() {
|
|
127
|
+
return this._method;
|
|
128
|
+
}
|
|
129
|
+
get path() {
|
|
130
|
+
return this._path;
|
|
131
|
+
}
|
|
132
|
+
get body() {
|
|
133
|
+
return this._body;
|
|
134
|
+
}
|
|
135
|
+
get status() {
|
|
136
|
+
return this._status;
|
|
137
|
+
}
|
|
138
|
+
get error() {
|
|
139
|
+
return this._error;
|
|
140
|
+
}
|
|
141
|
+
get initDate() {
|
|
142
|
+
return new Date(this._initDate);
|
|
143
|
+
}
|
|
144
|
+
complete() {
|
|
145
|
+
this._status = A_FrameChannelStreamStatuses.Closed;
|
|
146
|
+
}
|
|
147
|
+
fail(error) {
|
|
148
|
+
this._status = A_FrameChannelStreamStatuses.Closed;
|
|
149
|
+
this._error = error;
|
|
150
|
+
}
|
|
151
|
+
destroy() {
|
|
152
|
+
this.scope.destroy();
|
|
153
|
+
}
|
|
154
|
+
async open() {
|
|
155
|
+
await this.call(A_FrameChannelStreamFeatures.open);
|
|
156
|
+
}
|
|
157
|
+
async send() {
|
|
158
|
+
await this.call(A_FrameChannelStreamFeatures.send);
|
|
159
|
+
}
|
|
160
|
+
async propagate(name, data) {
|
|
161
|
+
const request = new A_FrameChannelEvent(name, data);
|
|
162
|
+
const executionScope = new aConcept.A_Scope({
|
|
163
|
+
name: "A_FrameChannelStream.propagate",
|
|
164
|
+
fragments: [request]
|
|
165
|
+
}).inherit(this.scope);
|
|
166
|
+
try {
|
|
167
|
+
const callName = (name || "all") + A_FrameChannelStreamFeatures.onEvent;
|
|
168
|
+
await this.call(callName, executionScope);
|
|
169
|
+
executionScope.destroy();
|
|
170
|
+
} catch {
|
|
171
|
+
executionScope.destroy();
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
fromNew(newEntity) {
|
|
175
|
+
this.aseid = this.generateASEID();
|
|
176
|
+
this._method = newEntity.method;
|
|
177
|
+
this._path = newEntity.path;
|
|
178
|
+
this._body = newEntity.body;
|
|
179
|
+
this._initDate = (/* @__PURE__ */ new Date()).toISOString();
|
|
180
|
+
}
|
|
181
|
+
fromJSON(serialized) {
|
|
182
|
+
this._method = serialized.method;
|
|
183
|
+
this._path = serialized.path;
|
|
184
|
+
this._body = serialized.body;
|
|
185
|
+
this._initDate = serialized.initDate;
|
|
186
|
+
}
|
|
187
|
+
toJSON() {
|
|
188
|
+
return {
|
|
189
|
+
...super.toJSON(),
|
|
190
|
+
initDate: this._initDate,
|
|
191
|
+
status: this._status,
|
|
192
|
+
error: this._error ? this._error.toJSON() : void 0,
|
|
193
|
+
method: this._method,
|
|
194
|
+
path: this._path,
|
|
195
|
+
body: this._body
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
// src/lib/A-FrameDynamicSession/A-FrameDynamicSession.constants.ts
|
|
201
|
+
var A_FrameDynamicSessionFeatures = {
|
|
202
|
+
Init: "_A_FRAME_DYNAMIC_SESSION_INIT",
|
|
203
|
+
Question: "_A_FRAME_DYNAMIC_SESSION_QUESTION",
|
|
204
|
+
Answer: "_A_FRAME_DYNAMIC_SESSION_ANSWER",
|
|
205
|
+
Destroy: "_A_FRAME_DYNAMIC_SESSION_DESTROY"
|
|
206
|
+
};
|
|
207
|
+
|
|
208
|
+
// src/lib/A-FrameDynamicSession/A-FrameDynamicSession.entity.ts
|
|
209
|
+
var A_FrameDynamicSession = class extends aConcept.A_Entity {
|
|
210
|
+
static get concept() {
|
|
211
|
+
return "a-frame";
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
*
|
|
215
|
+
*/
|
|
216
|
+
get scope() {
|
|
217
|
+
if (!this._scope) {
|
|
218
|
+
this._scope = aConcept.A_Context.allocate(this, new aConcept.A_Scope({ name: `${this.aseid.id}-scope` }));
|
|
219
|
+
}
|
|
220
|
+
return this._scope;
|
|
221
|
+
}
|
|
222
|
+
get currentTurn() {
|
|
223
|
+
return this._currentTurn;
|
|
224
|
+
}
|
|
225
|
+
get initDate() {
|
|
226
|
+
return new Date(this._initDate);
|
|
227
|
+
}
|
|
228
|
+
static onQuestion() {
|
|
229
|
+
return;
|
|
230
|
+
}
|
|
231
|
+
static onAnswer() {
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
234
|
+
fromNew(newEntity) {
|
|
235
|
+
this._turnsCount = newEntity.turnsCount || 5;
|
|
236
|
+
this._currentTurn = 0;
|
|
237
|
+
this._initDate = (/* @__PURE__ */ new Date()).toISOString();
|
|
238
|
+
}
|
|
239
|
+
fromJSON(serialized) {
|
|
240
|
+
this._turnsCount = serialized.turnsCount;
|
|
241
|
+
this._currentTurn = serialized.currentTurn;
|
|
242
|
+
this._initDate = serialized.initDate;
|
|
243
|
+
}
|
|
244
|
+
async init() {
|
|
245
|
+
await this.call(A_FrameDynamicSessionFeatures.Init);
|
|
246
|
+
}
|
|
247
|
+
async destroy(scope) {
|
|
248
|
+
await this.call(A_FrameDynamicSessionFeatures.Destroy, scope);
|
|
249
|
+
}
|
|
250
|
+
async question() {
|
|
251
|
+
this._currentTurn++;
|
|
252
|
+
await this.call(A_FrameDynamicSessionFeatures.Question);
|
|
253
|
+
}
|
|
254
|
+
async answer() {
|
|
255
|
+
await this.call(A_FrameDynamicSessionFeatures.Answer);
|
|
256
|
+
}
|
|
257
|
+
toJSON() {
|
|
258
|
+
return {
|
|
259
|
+
...super.toJSON(),
|
|
260
|
+
turnsCount: this._turnsCount,
|
|
261
|
+
currentTurn: this._currentTurn,
|
|
262
|
+
initDate: this._initDate
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
};
|
|
266
|
+
var A_FrameChannelDsgStream = class extends A_FrameChannelStream {
|
|
267
|
+
constructor() {
|
|
268
|
+
super(...arguments);
|
|
269
|
+
this._resolvedComponents = [];
|
|
270
|
+
}
|
|
271
|
+
// ── Configuration ──────────────────────────────────────────────────────
|
|
272
|
+
/**
|
|
273
|
+
* Provide the callback that sends a component-search response back to the
|
|
274
|
+
* server via HTTP POST. Must be set before the SSE stream is opened.
|
|
275
|
+
*/
|
|
276
|
+
setRespondFn(fn) {
|
|
277
|
+
this._respondFn = fn;
|
|
278
|
+
}
|
|
279
|
+
// ── Result accessor ────────────────────────────────────────────────────
|
|
280
|
+
/**
|
|
281
|
+
* Contains the resolved components after `structure_complete` is received.
|
|
282
|
+
* Empty until the server pushes the final structure.
|
|
283
|
+
*/
|
|
284
|
+
get resolvedComponents() {
|
|
285
|
+
return this._resolvedComponents;
|
|
286
|
+
}
|
|
287
|
+
async onSearchComponent(event) {
|
|
288
|
+
if (!this._respondFn) return;
|
|
289
|
+
const { requestId, vector } = event.data;
|
|
290
|
+
const queryVector = new chunkHAORARSB_cjs.A_FrameVector(vector ?? []);
|
|
291
|
+
const results = chunkD2HTYEJZ_cjs.A_FrameIndex.search(queryVector, { topK: 1 });
|
|
292
|
+
const top = results[0];
|
|
293
|
+
await this._respondFn(requestId, {
|
|
294
|
+
component: top?.record?.name ?? null,
|
|
295
|
+
score: top?.score ?? 0
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
async onStructureComplete(event) {
|
|
299
|
+
const { components } = event.data;
|
|
300
|
+
this._resolvedComponents = Array.isArray(components) ? components : [];
|
|
301
|
+
}
|
|
302
|
+
async onStructureError(event) {
|
|
303
|
+
const { message } = event.data ?? {};
|
|
304
|
+
console.error("[A_FrameChannelDsgStream] Server reported structure error:", message ?? "unknown");
|
|
305
|
+
}
|
|
306
|
+
};
|
|
307
|
+
chunkQFHZIG7Y_cjs.__decorateClass([
|
|
308
|
+
A_FrameChannelStream.onEvent("search_component"),
|
|
309
|
+
chunkQFHZIG7Y_cjs.__decorateParam(0, aConcept.A_Inject(A_FrameChannelEvent))
|
|
310
|
+
], A_FrameChannelDsgStream.prototype, "onSearchComponent", 1);
|
|
311
|
+
chunkQFHZIG7Y_cjs.__decorateClass([
|
|
312
|
+
A_FrameChannelStream.onEvent("structure_complete"),
|
|
313
|
+
chunkQFHZIG7Y_cjs.__decorateParam(0, aConcept.A_Inject(A_FrameChannelEvent))
|
|
314
|
+
], A_FrameChannelDsgStream.prototype, "onStructureComplete", 1);
|
|
315
|
+
chunkQFHZIG7Y_cjs.__decorateClass([
|
|
316
|
+
A_FrameChannelStream.onEvent("structure_error"),
|
|
317
|
+
chunkQFHZIG7Y_cjs.__decorateParam(0, aConcept.A_Inject(A_FrameChannelEvent))
|
|
318
|
+
], A_FrameChannelDsgStream.prototype, "onStructureError", 1);
|
|
319
|
+
|
|
320
|
+
// src/lib/A-FrameChannel/A-FrameChannel.component.ts
|
|
321
|
+
var A_FrameChannel = class extends aConcept.A_Component {
|
|
322
|
+
async generate(prompt) {
|
|
323
|
+
const request = new A_FrameChannelRequest("POST", "/api/v1/completions", { prompt, max_tokens: 512 });
|
|
324
|
+
const executionScope = new aConcept.A_Scope({
|
|
325
|
+
name: "A_FrameChannel.generate",
|
|
326
|
+
fragments: [request]
|
|
327
|
+
}).inherit(aConcept.A_Context.scope(this));
|
|
328
|
+
try {
|
|
329
|
+
await this.call(A_FrameFeatures.Request, executionScope);
|
|
330
|
+
executionScope.destroy();
|
|
331
|
+
return request;
|
|
332
|
+
} catch (err) {
|
|
333
|
+
executionScope.destroy();
|
|
334
|
+
throw new A_FrameChannelError({
|
|
335
|
+
title: A_FrameChannelError.RequestFailed,
|
|
336
|
+
description: `Failed to generate completion: ${err instanceof Error ? err.message : String(err)}`
|
|
337
|
+
});
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
async embed(input, options) {
|
|
341
|
+
const request = new A_FrameChannelRequest("POST", "/api/v1/embeddings", {
|
|
342
|
+
input,
|
|
343
|
+
...options?.model && { model: options.model },
|
|
344
|
+
...options?.task && { task: options.task }
|
|
345
|
+
});
|
|
346
|
+
const executionScope = new aConcept.A_Scope({
|
|
347
|
+
name: "A_FrameChannel.embed",
|
|
348
|
+
fragments: [request]
|
|
349
|
+
}).inherit(aConcept.A_Context.scope(this));
|
|
350
|
+
try {
|
|
351
|
+
await this.call(A_FrameFeatures.Request, executionScope);
|
|
352
|
+
executionScope.destroy();
|
|
353
|
+
return request;
|
|
354
|
+
} catch (err) {
|
|
355
|
+
executionScope.destroy();
|
|
356
|
+
throw new A_FrameChannelError({
|
|
357
|
+
title: A_FrameChannelError.RequestFailed,
|
|
358
|
+
description: `Failed to embed input: ${err instanceof Error ? err.message : String(err)}`
|
|
359
|
+
});
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
async getCredentials() {
|
|
363
|
+
const request = new A_FrameChannelRequest("GET", "/api/v1/credentials/me");
|
|
364
|
+
const executionScope = new aConcept.A_Scope({
|
|
365
|
+
name: "A_FrameChannel.getCredentials",
|
|
366
|
+
fragments: [request]
|
|
367
|
+
}).inherit(aConcept.A_Context.scope(this));
|
|
368
|
+
try {
|
|
369
|
+
await this.call(A_FrameFeatures.Request, executionScope);
|
|
370
|
+
executionScope.destroy();
|
|
371
|
+
return request;
|
|
372
|
+
} catch (err) {
|
|
373
|
+
executionScope.destroy();
|
|
374
|
+
throw new A_FrameChannelError({
|
|
375
|
+
title: A_FrameChannelError.RequestFailed,
|
|
376
|
+
description: `Failed to get credentials: ${err instanceof Error ? err.message : String(err)}`
|
|
377
|
+
});
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
async ping() {
|
|
381
|
+
const request = new A_FrameChannelRequest("GET", "/health");
|
|
382
|
+
const executionScope = new aConcept.A_Scope({
|
|
383
|
+
name: "A_FrameChannel.ping",
|
|
384
|
+
fragments: [request]
|
|
385
|
+
}).inherit(aConcept.A_Context.scope(this));
|
|
386
|
+
try {
|
|
387
|
+
await this.call(A_FrameFeatures.Request, executionScope);
|
|
388
|
+
executionScope.destroy();
|
|
389
|
+
return request;
|
|
390
|
+
} catch {
|
|
391
|
+
executionScope.destroy();
|
|
392
|
+
return request;
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
async embedDefinition(definition, env) {
|
|
396
|
+
const request = new A_FrameChannelRequest("POST", "/api/v1/definition/embed", {
|
|
397
|
+
definition: definition.toJSON(),
|
|
398
|
+
model: definition.requestedModel
|
|
399
|
+
});
|
|
400
|
+
const executionScope = new aConcept.A_Scope({
|
|
401
|
+
name: "A_FrameChannel.embedDefinition",
|
|
402
|
+
fragments: [request]
|
|
403
|
+
}).inherit(aConcept.A_Context.scope(this));
|
|
404
|
+
try {
|
|
405
|
+
await this.call(A_FrameFeatures.Request, executionScope);
|
|
406
|
+
executionScope.destroy();
|
|
407
|
+
const response = request.response;
|
|
408
|
+
if (!response.data || !response.data[0] || !response.data[0].embedding) {
|
|
409
|
+
throw new A_FrameChannelError({
|
|
410
|
+
title: A_FrameChannelError.InvalidRequest,
|
|
411
|
+
description: `Invalid embedding response for definition "${definition.name}"`
|
|
412
|
+
});
|
|
413
|
+
}
|
|
414
|
+
const vector = new Float32Array(response.data[0].embedding);
|
|
415
|
+
definition.hydrateFromEmbedding(vector, {
|
|
416
|
+
model: response.model,
|
|
417
|
+
dimensions: response.meta.dimensions,
|
|
418
|
+
inputCount: response.meta.input_count,
|
|
419
|
+
aFrameServerVersion: response.meta.server_version,
|
|
420
|
+
aFrameVersion: env.A_FRAME_VERSION,
|
|
421
|
+
credentialId: response.meta.credential_id,
|
|
422
|
+
date: response.date,
|
|
423
|
+
aFrameMeta: response.aFrameMeta
|
|
424
|
+
});
|
|
425
|
+
} catch (err) {
|
|
426
|
+
throw new A_FrameChannelError({
|
|
427
|
+
title: A_FrameChannelError.RequestFailed,
|
|
428
|
+
description: `Failed to embed definition "${definition.name}": ${err instanceof Error ? err.message : String(err)}`
|
|
429
|
+
});
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
async embedNamespace(namespace, env) {
|
|
433
|
+
const request = new A_FrameChannelRequest("POST", "/api/v1/namespace/embed", {
|
|
434
|
+
namespace: namespace.toJSON(),
|
|
435
|
+
model: namespace.requestedModel
|
|
436
|
+
});
|
|
437
|
+
const executionScope = new aConcept.A_Scope({
|
|
438
|
+
name: "A_FrameChannel.embedNamespace",
|
|
439
|
+
fragments: [request]
|
|
440
|
+
}).inherit(aConcept.A_Context.scope(this));
|
|
441
|
+
try {
|
|
442
|
+
await this.call(A_FrameFeatures.Request, executionScope);
|
|
443
|
+
executionScope.destroy();
|
|
444
|
+
const response = request.response;
|
|
445
|
+
if (!response.data || !response.data[0] || !response.data[0].embedding) {
|
|
446
|
+
throw new A_FrameChannelError({
|
|
447
|
+
title: A_FrameChannelError.InvalidRequest,
|
|
448
|
+
description: `Invalid embedding response for namespace "${namespace.name}"`
|
|
449
|
+
});
|
|
450
|
+
}
|
|
451
|
+
const vector = new Float32Array(response.data[0].embedding);
|
|
452
|
+
namespace.hydrateFromEmbedding(vector, {
|
|
453
|
+
model: response.model,
|
|
454
|
+
dimensions: response.meta.dimensions,
|
|
455
|
+
inputCount: response.meta.input_count,
|
|
456
|
+
aFrameServerVersion: response.meta.server_version,
|
|
457
|
+
aFrameVersion: env.A_FRAME_VERSION,
|
|
458
|
+
credentialId: response.meta.credential_id,
|
|
459
|
+
date: response.date
|
|
460
|
+
});
|
|
461
|
+
} catch (err) {
|
|
462
|
+
throw new A_FrameChannelError({
|
|
463
|
+
title: A_FrameChannelError.RequestFailed,
|
|
464
|
+
description: `Failed to embed namespace "${namespace.name}": ${err instanceof Error ? err.message : String(err)}`
|
|
465
|
+
});
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
async embedSegment(segment, env) {
|
|
469
|
+
const request = new A_FrameChannelRequest("POST", "/api/v1/segment/embed", {
|
|
470
|
+
segment: segment.toJSON(),
|
|
471
|
+
task: segment.options?.task,
|
|
472
|
+
model: segment.options?.model
|
|
473
|
+
});
|
|
474
|
+
const executionScope = new aConcept.A_Scope({
|
|
475
|
+
name: "A_FrameChannel.embedNamespace",
|
|
476
|
+
fragments: [request]
|
|
477
|
+
}).inherit(aConcept.A_Context.scope(this));
|
|
478
|
+
try {
|
|
479
|
+
await this.call(A_FrameFeatures.Request, executionScope);
|
|
480
|
+
executionScope.destroy();
|
|
481
|
+
const response = request.response;
|
|
482
|
+
if (!response.data || !response.data[0] || !response.data[0].embedding) {
|
|
483
|
+
throw new A_FrameChannelError({
|
|
484
|
+
title: A_FrameChannelError.InvalidRequest,
|
|
485
|
+
description: `Error during embed a segment: ${segment.content}`
|
|
486
|
+
});
|
|
487
|
+
}
|
|
488
|
+
const vector = new Float32Array(response.data[0].embedding);
|
|
489
|
+
segment.fromJSON({
|
|
490
|
+
aseid: segment.aseid.toString(),
|
|
491
|
+
content: segment.content,
|
|
492
|
+
hash: segment.hash,
|
|
493
|
+
embedding: vector,
|
|
494
|
+
model: response.model,
|
|
495
|
+
// dimensions: response.meta.dimensions,
|
|
496
|
+
// inputCount: response.meta.input_count,
|
|
497
|
+
aFrameServerVersion: response.meta.server_version,
|
|
498
|
+
aFrameVersion: env.A_FRAME_VERSION,
|
|
499
|
+
credentialId: response.meta.credential_id,
|
|
500
|
+
embeddedAt: response.date
|
|
501
|
+
});
|
|
502
|
+
} catch (err) {
|
|
503
|
+
throw new A_FrameChannelError({
|
|
504
|
+
title: A_FrameChannelError.RequestFailed,
|
|
505
|
+
description: `Failed to embed segment with content "${segment.content}": ${err instanceof Error ? err.message : String(err)}`
|
|
506
|
+
});
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
async generateDynamicStructure(structure, session, operation) {
|
|
510
|
+
const openRequest = new A_FrameChannelRequest(
|
|
511
|
+
"POST",
|
|
512
|
+
"/api/v1/dsg/stream/open"
|
|
513
|
+
);
|
|
514
|
+
const openScope = new aConcept.A_Scope({
|
|
515
|
+
name: "A_FrameChannel.generateDynamicStructure:open",
|
|
516
|
+
fragments: [openRequest]
|
|
517
|
+
}).inherit(aConcept.A_Context.scope(this));
|
|
518
|
+
await this.call(A_FrameFeatures.Request, openScope);
|
|
519
|
+
openScope.destroy();
|
|
520
|
+
const { channelId } = openRequest.response;
|
|
521
|
+
const channel = this;
|
|
522
|
+
const dsgStream = new A_FrameChannelDsgStream({
|
|
523
|
+
method: "GET",
|
|
524
|
+
path: `/api/v1/dsg/stream/${channelId}`
|
|
525
|
+
});
|
|
526
|
+
dsgStream.setRespondFn(async (requestId, data) => {
|
|
527
|
+
const respondRequest = new A_FrameChannelRequest(
|
|
528
|
+
"POST",
|
|
529
|
+
"/api/v1/dsg/stream/respond",
|
|
530
|
+
{ requestId, data }
|
|
531
|
+
);
|
|
532
|
+
const respondScope = new aConcept.A_Scope({
|
|
533
|
+
name: "A_FrameChannel.generateDynamicStructure:respond",
|
|
534
|
+
fragments: [respondRequest]
|
|
535
|
+
}).inherit(aConcept.A_Context.scope(channel));
|
|
536
|
+
await channel.call(A_FrameFeatures.Request, respondScope);
|
|
537
|
+
respondScope.destroy();
|
|
538
|
+
});
|
|
539
|
+
const streamScope = new aConcept.A_Scope({
|
|
540
|
+
name: "A_FrameChannel.generateDynamicStructure:stream",
|
|
541
|
+
entities: [dsgStream]
|
|
542
|
+
}).inherit(aConcept.A_Context.scope(this));
|
|
543
|
+
const streamTask = this.call(A_FrameFeatures.Stream, streamScope);
|
|
544
|
+
const generateRequest = new A_FrameChannelRequest(
|
|
545
|
+
"POST",
|
|
546
|
+
"/api/v1/dsg/structure/generate-stream",
|
|
547
|
+
{ channelId, prompt: structure.prompt }
|
|
548
|
+
);
|
|
549
|
+
const generateScope = new aConcept.A_Scope({
|
|
550
|
+
name: "A_FrameChannel.generateDynamicStructure:generate",
|
|
551
|
+
fragments: [generateRequest]
|
|
552
|
+
}).inherit(aConcept.A_Context.scope(this));
|
|
553
|
+
await this.call(A_FrameFeatures.Request, generateScope);
|
|
554
|
+
generateScope.destroy();
|
|
555
|
+
await streamTask;
|
|
556
|
+
streamScope.destroy();
|
|
557
|
+
structure.hydrateFromResolved(
|
|
558
|
+
dsgStream.resolvedComponents,
|
|
559
|
+
{ model: "sse-stream", serverVersion: "0.0.0" }
|
|
560
|
+
);
|
|
561
|
+
}
|
|
562
|
+
async generateDynamicContent(content, operation) {
|
|
563
|
+
const request = new A_FrameChannelRequest(
|
|
564
|
+
"POST",
|
|
565
|
+
"/api/v1/content/generate",
|
|
566
|
+
{
|
|
567
|
+
prompt: content.prompt,
|
|
568
|
+
model: content.modelName,
|
|
569
|
+
...content.systemPrompt !== void 0 ? { system: content.systemPrompt } : {}
|
|
570
|
+
}
|
|
571
|
+
);
|
|
572
|
+
const requestScope = new aConcept.A_Scope({
|
|
573
|
+
name: "A_FrameChannel.generateDynamicContent",
|
|
574
|
+
fragments: [request]
|
|
575
|
+
}).inherit(aConcept.A_Context.scope(this));
|
|
576
|
+
await this.call(A_FrameFeatures.Request, requestScope);
|
|
577
|
+
requestScope.destroy();
|
|
578
|
+
const resp = request.response;
|
|
579
|
+
const segments = (resp.segments ?? []).map((w) => {
|
|
580
|
+
const seg = new chunkM6DJYGDO_cjs.A_FrameSegment({ content: w.content, options: { task: "document" } });
|
|
581
|
+
if (w.embedding?.length) {
|
|
582
|
+
seg.hydrateFromEmbedding(new Float32Array(w.embedding));
|
|
583
|
+
}
|
|
584
|
+
return seg;
|
|
585
|
+
});
|
|
586
|
+
content.hydrateFromGeneration(segments, {
|
|
587
|
+
model: resp.model,
|
|
588
|
+
serverVersion: resp.meta?.server_version ?? "0.0.0"
|
|
589
|
+
});
|
|
590
|
+
}
|
|
591
|
+
async patchDynamicContent(content, operation) {
|
|
592
|
+
const { instruction, segments } = operation.params;
|
|
593
|
+
const wireIdToAseid = /* @__PURE__ */ new Map();
|
|
594
|
+
const wireSegments = segments.map((s, idx) => {
|
|
595
|
+
const wireId = `s${idx}`;
|
|
596
|
+
wireIdToAseid.set(wireId, String(s.id));
|
|
597
|
+
return {
|
|
598
|
+
id: wireId,
|
|
599
|
+
index: idx,
|
|
600
|
+
text: s.content,
|
|
601
|
+
vector: s.vector ? Array.from(s.vector.values) : void 0
|
|
602
|
+
};
|
|
603
|
+
});
|
|
604
|
+
const request = new A_FrameChannelRequest(
|
|
605
|
+
"POST",
|
|
606
|
+
"/api/v1/content/patch",
|
|
607
|
+
{
|
|
608
|
+
prompt: content.prompt,
|
|
609
|
+
segments: wireSegments,
|
|
610
|
+
instruction,
|
|
611
|
+
model: content.modelName,
|
|
612
|
+
...content.systemPrompt !== void 0 ? { system: content.systemPrompt } : {}
|
|
613
|
+
}
|
|
614
|
+
);
|
|
615
|
+
const requestScope = new aConcept.A_Scope({
|
|
616
|
+
name: "A_FrameChannel.patchDynamicContent",
|
|
617
|
+
fragments: [request]
|
|
618
|
+
}).inherit(aConcept.A_Context.scope(this));
|
|
619
|
+
await this.call(A_FrameFeatures.Request, requestScope);
|
|
620
|
+
requestScope.destroy();
|
|
621
|
+
const resp = request.response;
|
|
622
|
+
const translatedOperations = resp.operations.map((op) => ({
|
|
623
|
+
...op,
|
|
624
|
+
targetId: op.targetId ? wireIdToAseid.get(op.targetId) ?? op.targetId : op.targetId
|
|
625
|
+
}));
|
|
626
|
+
content.hydrateFromPatch(
|
|
627
|
+
{ ...resp, operations: translatedOperations },
|
|
628
|
+
{
|
|
629
|
+
model: resp.model,
|
|
630
|
+
serverVersion: resp.meta?.server_version ?? "0.0.0"
|
|
631
|
+
}
|
|
632
|
+
);
|
|
633
|
+
}
|
|
634
|
+
async generateCompletion(completion, env) {
|
|
635
|
+
const request = new A_FrameChannelRequest(
|
|
636
|
+
"POST",
|
|
637
|
+
"/api/v1/completions/generate",
|
|
638
|
+
{
|
|
639
|
+
prompt: completion.prompt,
|
|
640
|
+
options: completion.options
|
|
641
|
+
}
|
|
642
|
+
);
|
|
643
|
+
const executionScope = new aConcept.A_Scope({
|
|
644
|
+
name: "A_FrameChannel.generateCompletion",
|
|
645
|
+
fragments: [request]
|
|
646
|
+
}).inherit(aConcept.A_Context.scope(this));
|
|
647
|
+
try {
|
|
648
|
+
await this.call(A_FrameFeatures.Request, executionScope);
|
|
649
|
+
executionScope.destroy();
|
|
650
|
+
const response = request.response;
|
|
651
|
+
if (!response.text) {
|
|
652
|
+
throw new A_FrameChannelError({
|
|
653
|
+
title: A_FrameChannelError.InvalidRequest,
|
|
654
|
+
description: `Invalid completion response for prompt "${completion.prompt}"`
|
|
655
|
+
});
|
|
656
|
+
}
|
|
657
|
+
completion.hydrateFromGeneration({
|
|
658
|
+
text: response.text,
|
|
659
|
+
embedding: new Float32Array(response.embedding),
|
|
660
|
+
model: response.model,
|
|
661
|
+
date: response.date,
|
|
662
|
+
aFrameVersion: env.A_FRAME_VERSION,
|
|
663
|
+
aFrameServerVersion: response.meta.server_version
|
|
664
|
+
});
|
|
665
|
+
} catch (err) {
|
|
666
|
+
throw new A_FrameChannelError({
|
|
667
|
+
title: A_FrameChannelError.RequestFailed,
|
|
668
|
+
description: `Failed to generate completion for prompt "${completion.prompt}": ${err instanceof Error ? err.message : String(err)}`
|
|
669
|
+
});
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
async extractSchema(scheme, env) {
|
|
673
|
+
const request = new A_FrameChannelRequest(
|
|
674
|
+
"POST",
|
|
675
|
+
"/api/v1/schema/extract",
|
|
676
|
+
{
|
|
677
|
+
prompt: scheme.prompt,
|
|
678
|
+
schema: scheme.schema,
|
|
679
|
+
options: scheme.options
|
|
680
|
+
}
|
|
681
|
+
);
|
|
682
|
+
const executionScope = new aConcept.A_Scope({
|
|
683
|
+
name: "A_FrameChannel.extractSchema",
|
|
684
|
+
fragments: [request]
|
|
685
|
+
}).inherit(aConcept.A_Context.scope(this));
|
|
686
|
+
try {
|
|
687
|
+
await this.call(A_FrameFeatures.Request, executionScope);
|
|
688
|
+
executionScope.destroy();
|
|
689
|
+
const response = request.response;
|
|
690
|
+
if (!response.data) {
|
|
691
|
+
throw new A_FrameChannelError({
|
|
692
|
+
title: A_FrameChannelError.InvalidRequest,
|
|
693
|
+
description: `Invalid scheme extraction response for prompt "${scheme.prompt}"`
|
|
694
|
+
});
|
|
695
|
+
}
|
|
696
|
+
scheme.hydrateFromExtraction(response.data, {
|
|
697
|
+
model: response.model,
|
|
698
|
+
date: response.date,
|
|
699
|
+
aFrameVersion: env.A_FRAME_VERSION,
|
|
700
|
+
aFrameServerVersion: response.meta.server_version
|
|
701
|
+
});
|
|
702
|
+
} catch (err) {
|
|
703
|
+
throw new A_FrameChannelError({
|
|
704
|
+
title: A_FrameChannelError.RequestFailed,
|
|
705
|
+
description: `Failed to extract scheme for prompt "${scheme.prompt}": ${err instanceof Error ? err.message : String(err)}`
|
|
706
|
+
});
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
};
|
|
710
|
+
chunkQFHZIG7Y_cjs.__decorateClass([
|
|
711
|
+
aConcept.A_Feature.Extend({
|
|
712
|
+
name: chunkMVAWR76Q_cjs.A_FrameDefinitionFeatures.Embed,
|
|
713
|
+
scope: [chunkMVAWR76Q_cjs.A_FrameDefinition]
|
|
714
|
+
}),
|
|
715
|
+
chunkQFHZIG7Y_cjs.__decorateParam(0, aConcept.A_Inject(aConcept.A_Caller)),
|
|
716
|
+
chunkQFHZIG7Y_cjs.__decorateParam(1, aConcept.A_Inject(chunkNWOUVAIS_cjs.A_FrameEnv))
|
|
717
|
+
], A_FrameChannel.prototype, "embedDefinition", 1);
|
|
718
|
+
chunkQFHZIG7Y_cjs.__decorateClass([
|
|
719
|
+
aConcept.A_Feature.Extend({
|
|
720
|
+
name: chunk7SEZMRLI_cjs.A_FrameNamespaceFeatures.Embed,
|
|
721
|
+
scope: [chunk7SEZMRLI_cjs.A_FrameNamespace]
|
|
722
|
+
}),
|
|
723
|
+
chunkQFHZIG7Y_cjs.__decorateParam(0, aConcept.A_Inject(aConcept.A_Caller)),
|
|
724
|
+
chunkQFHZIG7Y_cjs.__decorateParam(1, aConcept.A_Inject(chunkNWOUVAIS_cjs.A_FrameEnv))
|
|
725
|
+
], A_FrameChannel.prototype, "embedNamespace", 1);
|
|
726
|
+
chunkQFHZIG7Y_cjs.__decorateClass([
|
|
727
|
+
aConcept.A_Feature.Extend({
|
|
728
|
+
name: chunkM6DJYGDO_cjs.A_FrameSegmentFeatures.Embed,
|
|
729
|
+
scope: [chunkM6DJYGDO_cjs.A_FrameSegment]
|
|
730
|
+
}),
|
|
731
|
+
chunkQFHZIG7Y_cjs.__decorateParam(0, aConcept.A_Inject(aConcept.A_Caller)),
|
|
732
|
+
chunkQFHZIG7Y_cjs.__decorateParam(1, aConcept.A_Inject(chunkNWOUVAIS_cjs.A_FrameEnv))
|
|
733
|
+
], A_FrameChannel.prototype, "embedSegment", 1);
|
|
734
|
+
chunkQFHZIG7Y_cjs.__decorateClass([
|
|
735
|
+
aConcept.A_Feature.Extend({
|
|
736
|
+
name: chunkAY6UMDWD_cjs.A_FrameDynamicStructureFeatures.Generate,
|
|
737
|
+
scope: [chunkAY6UMDWD_cjs.A_FrameDynamicStructure]
|
|
738
|
+
}),
|
|
739
|
+
chunkQFHZIG7Y_cjs.__decorateParam(0, aConcept.A_Inject(aConcept.A_Caller)),
|
|
740
|
+
chunkQFHZIG7Y_cjs.__decorateParam(1, aConcept.A_Inject(A_FrameDynamicSession)),
|
|
741
|
+
chunkQFHZIG7Y_cjs.__decorateParam(2, aConcept.A_Inject(chunkAY6UMDWD_cjs.A_FrameDynamicStructureOperation))
|
|
742
|
+
], A_FrameChannel.prototype, "generateDynamicStructure", 1);
|
|
743
|
+
chunkQFHZIG7Y_cjs.__decorateClass([
|
|
744
|
+
aConcept.A_Feature.Extend({
|
|
745
|
+
name: chunk2KXGI2E5_cjs.A_FrameDynamicContentFeatures.Generate,
|
|
746
|
+
scope: [chunk2KXGI2E5_cjs.A_FrameDynamicContent]
|
|
747
|
+
}),
|
|
748
|
+
chunkQFHZIG7Y_cjs.__decorateParam(0, aConcept.A_Inject(aConcept.A_Caller)),
|
|
749
|
+
chunkQFHZIG7Y_cjs.__decorateParam(1, aConcept.A_Inject(chunk2KXGI2E5_cjs.A_FrameDynamicContentOperation))
|
|
750
|
+
], A_FrameChannel.prototype, "generateDynamicContent", 1);
|
|
751
|
+
chunkQFHZIG7Y_cjs.__decorateClass([
|
|
752
|
+
aConcept.A_Feature.Extend({
|
|
753
|
+
name: chunk2KXGI2E5_cjs.A_FrameDynamicContentFeatures.Patch,
|
|
754
|
+
scope: [chunk2KXGI2E5_cjs.A_FrameDynamicContent]
|
|
755
|
+
}),
|
|
756
|
+
chunkQFHZIG7Y_cjs.__decorateParam(0, aConcept.A_Inject(aConcept.A_Caller)),
|
|
757
|
+
chunkQFHZIG7Y_cjs.__decorateParam(1, aConcept.A_Inject(chunk2KXGI2E5_cjs.A_FrameDynamicContentOperation))
|
|
758
|
+
], A_FrameChannel.prototype, "patchDynamicContent", 1);
|
|
759
|
+
chunkQFHZIG7Y_cjs.__decorateClass([
|
|
760
|
+
aConcept.A_Feature.Extend({
|
|
761
|
+
name: chunk3ZDHQOIU_cjs.A_FrameCompletionFeatures.Generate,
|
|
762
|
+
scope: [chunk3ZDHQOIU_cjs.A_FrameCompletion]
|
|
763
|
+
}),
|
|
764
|
+
chunkQFHZIG7Y_cjs.__decorateParam(0, aConcept.A_Inject(aConcept.A_Caller)),
|
|
765
|
+
chunkQFHZIG7Y_cjs.__decorateParam(1, aConcept.A_Inject(chunkNWOUVAIS_cjs.A_FrameEnv))
|
|
766
|
+
], A_FrameChannel.prototype, "generateCompletion", 1);
|
|
767
|
+
chunkQFHZIG7Y_cjs.__decorateClass([
|
|
768
|
+
aConcept.A_Feature.Extend({
|
|
769
|
+
name: chunkWTBRJXFG_cjs.A_FrameSchemaFeatures.Extract,
|
|
770
|
+
scope: [chunkWTBRJXFG_cjs.A_FrameSchema]
|
|
771
|
+
}),
|
|
772
|
+
chunkQFHZIG7Y_cjs.__decorateParam(0, aConcept.A_Inject(aConcept.A_Caller)),
|
|
773
|
+
chunkQFHZIG7Y_cjs.__decorateParam(1, aConcept.A_Inject(chunkNWOUVAIS_cjs.A_FrameEnv))
|
|
774
|
+
], A_FrameChannel.prototype, "extractSchema", 1);
|
|
775
|
+
var A_FrameNodeChannel = class extends A_FrameChannel {
|
|
776
|
+
async request(context, env) {
|
|
777
|
+
const url = `${env.A_FRAME_SERVER_URL}${context.path}`;
|
|
778
|
+
const parsedUrl = new URL(url);
|
|
779
|
+
const client = parsedUrl.protocol === "https:" ? https__namespace : http__namespace;
|
|
780
|
+
const payload = context.body !== void 0 ? JSON.stringify(context.body) : void 0;
|
|
781
|
+
const result = await new Promise((resolve, reject) => {
|
|
782
|
+
const req = client.request(
|
|
783
|
+
{
|
|
784
|
+
protocol: parsedUrl.protocol,
|
|
785
|
+
hostname: parsedUrl.hostname,
|
|
786
|
+
port: parsedUrl.port,
|
|
787
|
+
path: `${parsedUrl.pathname}${parsedUrl.search}`,
|
|
788
|
+
method: context.method,
|
|
789
|
+
headers: {
|
|
790
|
+
...payload ? { "Content-Type": "application/json", "Content-Length": Buffer.byteLength(payload) } : {},
|
|
791
|
+
Authorization: `Bearer ${env.A_FRAME_SERVER_API_KEY}`
|
|
792
|
+
}
|
|
793
|
+
},
|
|
794
|
+
(res) => {
|
|
795
|
+
const chunks = [];
|
|
796
|
+
res.on("data", (chunk) => chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk)));
|
|
797
|
+
res.on("end", () => {
|
|
798
|
+
const raw = Buffer.concat(chunks).toString("utf8");
|
|
799
|
+
if ((res.statusCode ?? 500) >= 400) {
|
|
800
|
+
console.error(`[A-FrameChannel] <-- ${res.statusCode} ${context.method} ${url}`);
|
|
801
|
+
reject(
|
|
802
|
+
new A_FrameChannelError({
|
|
803
|
+
title: A_FrameChannelError.RequestFailed,
|
|
804
|
+
description: `Request to ${context.path} failed with status ${res.statusCode}`
|
|
805
|
+
})
|
|
806
|
+
);
|
|
807
|
+
return;
|
|
808
|
+
}
|
|
809
|
+
if (!raw) {
|
|
810
|
+
resolve(void 0);
|
|
811
|
+
return;
|
|
812
|
+
}
|
|
813
|
+
try {
|
|
814
|
+
const parsed = JSON.parse(raw);
|
|
815
|
+
resolve(parsed);
|
|
816
|
+
} catch {
|
|
817
|
+
reject(
|
|
818
|
+
new A_FrameChannelError({
|
|
819
|
+
title: A_FrameChannelError.RequestFailed,
|
|
820
|
+
description: `Invalid JSON response from ${context.path}`
|
|
821
|
+
})
|
|
822
|
+
);
|
|
823
|
+
}
|
|
824
|
+
});
|
|
825
|
+
}
|
|
826
|
+
);
|
|
827
|
+
req.setTimeout(env.A_FRAME_REQUEST_TIMEOUT, () => {
|
|
828
|
+
console.error(`[A-FrameChannel] TIMEOUT ${context.method} ${url}`);
|
|
829
|
+
req.destroy(
|
|
830
|
+
new A_FrameChannelError({
|
|
831
|
+
title: A_FrameChannelError.Timeout,
|
|
832
|
+
description: `Request to ${context.path} timed out after ${env.A_FRAME_REQUEST_TIMEOUT}ms`
|
|
833
|
+
})
|
|
834
|
+
);
|
|
835
|
+
});
|
|
836
|
+
req.on("error", (err) => reject(err));
|
|
837
|
+
if (payload) req.write(payload);
|
|
838
|
+
req.end();
|
|
839
|
+
});
|
|
840
|
+
context.complete(result);
|
|
841
|
+
}
|
|
842
|
+
async stream(stream, env) {
|
|
843
|
+
const url = `${env.A_FRAME_SERVER_URL}${stream.path}`;
|
|
844
|
+
const parsedUrl = new URL(url);
|
|
845
|
+
const client = parsedUrl.protocol === "https:" ? https__namespace : http__namespace;
|
|
846
|
+
const payload = stream.body !== void 0 ? JSON.stringify(stream.body) : void 0;
|
|
847
|
+
await new Promise((resolve, reject) => {
|
|
848
|
+
const req = client.request(
|
|
849
|
+
{
|
|
850
|
+
protocol: parsedUrl.protocol,
|
|
851
|
+
hostname: parsedUrl.hostname,
|
|
852
|
+
port: parsedUrl.port,
|
|
853
|
+
path: `${parsedUrl.pathname}${parsedUrl.search}`,
|
|
854
|
+
method: stream.method,
|
|
855
|
+
headers: {
|
|
856
|
+
...payload ? { "Content-Type": "application/json" } : {},
|
|
857
|
+
Accept: "text/event-stream",
|
|
858
|
+
Authorization: `Bearer ${env.A_FRAME_SERVER_API_KEY}`,
|
|
859
|
+
...payload ? { "Content-Length": Buffer.byteLength(payload) } : {}
|
|
860
|
+
}
|
|
861
|
+
},
|
|
862
|
+
(res) => {
|
|
863
|
+
if ((res.statusCode ?? 500) >= 400) {
|
|
864
|
+
console.error(`[A-FrameChannel] <-- ${res.statusCode} ${stream.method} ${url}`);
|
|
865
|
+
reject(
|
|
866
|
+
new A_FrameChannelError({
|
|
867
|
+
title: A_FrameChannelError.RequestFailed,
|
|
868
|
+
description: `Stream request to ${stream.path} failed with status ${res.statusCode}`
|
|
869
|
+
})
|
|
870
|
+
);
|
|
871
|
+
return;
|
|
872
|
+
}
|
|
873
|
+
let buffer = "";
|
|
874
|
+
res.on("data", async (chunk) => {
|
|
875
|
+
buffer += Buffer.isBuffer(chunk) ? chunk.toString("utf8") : String(chunk);
|
|
876
|
+
const lines = buffer.split("\n");
|
|
877
|
+
buffer = lines.pop() || "";
|
|
878
|
+
for (const line of lines) {
|
|
879
|
+
if (!line.startsWith("data: ")) continue;
|
|
880
|
+
const data = line.slice(6).trim();
|
|
881
|
+
if (data === "[DONE]") continue;
|
|
882
|
+
try {
|
|
883
|
+
const event = JSON.parse(data);
|
|
884
|
+
await stream.propagate(event.type, event.data);
|
|
885
|
+
} catch {
|
|
886
|
+
console.error(`[A-FrameChannel] Invalid SSE payload from ${stream.path}: ${data}`);
|
|
887
|
+
}
|
|
888
|
+
}
|
|
889
|
+
});
|
|
890
|
+
res.on("end", () => {
|
|
891
|
+
resolve();
|
|
892
|
+
});
|
|
893
|
+
res.on("error", (err) => reject(err));
|
|
894
|
+
}
|
|
895
|
+
);
|
|
896
|
+
req.setTimeout(3e5, () => {
|
|
897
|
+
console.error(`[A-FrameChannel] TIMEOUT ${stream.method} ${url}`);
|
|
898
|
+
req.destroy(
|
|
899
|
+
new A_FrameChannelError({
|
|
900
|
+
title: A_FrameChannelError.Timeout,
|
|
901
|
+
description: `Stream request to ${stream.path} timed out after 300 seconds`
|
|
902
|
+
})
|
|
903
|
+
);
|
|
904
|
+
});
|
|
905
|
+
req.on("error", (err) => reject(err));
|
|
906
|
+
if (payload) req.write(payload);
|
|
907
|
+
req.end();
|
|
908
|
+
});
|
|
909
|
+
stream.complete();
|
|
910
|
+
}
|
|
911
|
+
async send(stream, event, env) {
|
|
912
|
+
const url = `${env.A_FRAME_SERVER_URL}${stream.path}/send`;
|
|
913
|
+
const parsedUrl = new URL(url);
|
|
914
|
+
const client = parsedUrl.protocol === "https:" ? https__namespace : http__namespace;
|
|
915
|
+
const payload = JSON.stringify({ type: event.name, data: event.data });
|
|
916
|
+
await new Promise((resolve, reject) => {
|
|
917
|
+
const req = client.request(
|
|
918
|
+
{
|
|
919
|
+
protocol: parsedUrl.protocol,
|
|
920
|
+
hostname: parsedUrl.hostname,
|
|
921
|
+
port: parsedUrl.port,
|
|
922
|
+
path: `${parsedUrl.pathname}${parsedUrl.search}`,
|
|
923
|
+
method: "POST",
|
|
924
|
+
headers: {
|
|
925
|
+
"Content-Type": "application/json",
|
|
926
|
+
Authorization: `Bearer ${env.A_FRAME_SERVER_API_KEY}`,
|
|
927
|
+
"Content-Length": Buffer.byteLength(payload)
|
|
928
|
+
}
|
|
929
|
+
},
|
|
930
|
+
(res) => {
|
|
931
|
+
res.resume();
|
|
932
|
+
res.on("end", () => {
|
|
933
|
+
if ((res.statusCode ?? 500) >= 400) {
|
|
934
|
+
console.error(`[A-FrameChannel] <-- ${res.statusCode} POST ${url}`);
|
|
935
|
+
reject(
|
|
936
|
+
new A_FrameChannelError({
|
|
937
|
+
title: A_FrameChannelError.RequestFailed,
|
|
938
|
+
description: `Send event "${event.name}" to ${stream.path} failed with status ${res.statusCode}`
|
|
939
|
+
})
|
|
940
|
+
);
|
|
941
|
+
return;
|
|
942
|
+
}
|
|
943
|
+
resolve();
|
|
944
|
+
});
|
|
945
|
+
}
|
|
946
|
+
);
|
|
947
|
+
req.setTimeout(15e3, () => {
|
|
948
|
+
req.destroy(
|
|
949
|
+
new A_FrameChannelError({
|
|
950
|
+
title: A_FrameChannelError.Timeout,
|
|
951
|
+
description: `Send event "${event.name}" to ${stream.path} timed out after 15 seconds`
|
|
952
|
+
})
|
|
953
|
+
);
|
|
954
|
+
});
|
|
955
|
+
req.on("error", (err) => reject(err));
|
|
956
|
+
req.write(payload);
|
|
957
|
+
req.end();
|
|
958
|
+
});
|
|
959
|
+
}
|
|
960
|
+
};
|
|
961
|
+
chunkQFHZIG7Y_cjs.__decorateClass([
|
|
962
|
+
aConcept.A_Feature.Extend({
|
|
963
|
+
name: A_FrameFeatures.Request,
|
|
964
|
+
scope: [A_FrameChannel]
|
|
965
|
+
}),
|
|
966
|
+
chunkQFHZIG7Y_cjs.__decorateParam(0, aConcept.A_Inject(A_FrameChannelRequest)),
|
|
967
|
+
chunkQFHZIG7Y_cjs.__decorateParam(1, aConcept.A_Inject(chunkNWOUVAIS_cjs.A_FrameEnv))
|
|
968
|
+
], A_FrameNodeChannel.prototype, "request", 1);
|
|
969
|
+
chunkQFHZIG7Y_cjs.__decorateClass([
|
|
970
|
+
aConcept.A_Feature.Extend({
|
|
971
|
+
name: A_FrameFeatures.Stream,
|
|
972
|
+
scope: [A_FrameChannel]
|
|
973
|
+
}),
|
|
974
|
+
chunkQFHZIG7Y_cjs.__decorateParam(0, aConcept.A_Inject(A_FrameChannelStream)),
|
|
975
|
+
chunkQFHZIG7Y_cjs.__decorateParam(1, aConcept.A_Inject(chunkNWOUVAIS_cjs.A_FrameEnv))
|
|
976
|
+
], A_FrameNodeChannel.prototype, "stream", 1);
|
|
977
|
+
chunkQFHZIG7Y_cjs.__decorateClass([
|
|
978
|
+
aConcept.A_Feature.Extend({
|
|
979
|
+
name: A_FrameFeatures.Send,
|
|
980
|
+
scope: [A_FrameChannel]
|
|
981
|
+
}),
|
|
982
|
+
chunkQFHZIG7Y_cjs.__decorateParam(0, aConcept.A_Inject(A_FrameChannelStream)),
|
|
983
|
+
chunkQFHZIG7Y_cjs.__decorateParam(1, aConcept.A_Inject(A_FrameChannelEvent)),
|
|
984
|
+
chunkQFHZIG7Y_cjs.__decorateParam(2, aConcept.A_Inject(chunkNWOUVAIS_cjs.A_FrameEnv))
|
|
985
|
+
], A_FrameNodeChannel.prototype, "send", 1);
|
|
986
|
+
|
|
987
|
+
exports.A_FrameChannel = A_FrameChannel;
|
|
988
|
+
exports.A_FrameChannelError = A_FrameChannelError;
|
|
989
|
+
exports.A_FrameChannelEvent = A_FrameChannelEvent;
|
|
990
|
+
exports.A_FrameChannelRequest = A_FrameChannelRequest;
|
|
991
|
+
exports.A_FrameChannelSocketFeatures = A_FrameChannelSocketFeatures;
|
|
992
|
+
exports.A_FrameChannelSocketStatuses = A_FrameChannelSocketStatuses;
|
|
993
|
+
exports.A_FrameChannelStream = A_FrameChannelStream;
|
|
994
|
+
exports.A_FrameChannelStreamFeatures = A_FrameChannelStreamFeatures;
|
|
995
|
+
exports.A_FrameChannelStreamStatuses = A_FrameChannelStreamStatuses;
|
|
996
|
+
exports.A_FrameFeatures = A_FrameFeatures;
|
|
997
|
+
exports.A_FrameNodeChannel = A_FrameNodeChannel;
|
|
998
|
+
//# sourceMappingURL=chunk-JHZGTVYF.cjs.map
|
|
999
|
+
//# sourceMappingURL=chunk-JHZGTVYF.cjs.map
|