@adaas/a-frame 0.0.22 → 0.0.23
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 +13 -0
- package/.conf/tsconfig.node.json +14 -0
- package/.env.example +12 -0
- package/dist/browser/A-FrameBrowserStorageBlobs.context-OEQr85oq.d.mts +40 -0
- package/dist/browser/A-FrameBundle.types-DaaUvViw.d.mts +33 -0
- package/dist/browser/A-FrameChannel.types-DWOEUs28.d.mts +142 -0
- package/dist/browser/A-FrameDefinition.entity-DWGN_Ujr.d.mts +329 -0
- package/dist/browser/A-FrameDynamicStructure.entity-DaBgSRCR.d.mts +188 -0
- package/dist/browser/A-FrameLogger.component.env-browser-BIPAP4oQ.d.mts +112 -0
- package/dist/browser/A-FrameNamespace.entity-rCm1AavP.d.mts +125 -0
- package/dist/browser/bundle.d.mts +8 -0
- package/dist/browser/bundle.mjs +2 -0
- package/dist/browser/bundle.mjs.map +1 -0
- package/dist/browser/channel.d.mts +165 -0
- package/dist/browser/channel.mjs +3 -0
- package/dist/browser/channel.mjs.map +1 -0
- package/dist/browser/chunk-5TTVFB3G.mjs +2 -0
- package/dist/browser/chunk-5TTVFB3G.mjs.map +1 -0
- package/dist/browser/chunk-AYN7KUQT.mjs +3 -0
- package/dist/browser/chunk-AYN7KUQT.mjs.map +1 -0
- package/dist/browser/chunk-DMGQW3AO.mjs +2 -0
- package/dist/browser/chunk-DMGQW3AO.mjs.map +1 -0
- package/dist/browser/chunk-G66IL2DR.mjs +2 -0
- package/dist/browser/chunk-G66IL2DR.mjs.map +1 -0
- package/dist/browser/chunk-H6OZP4ZV.mjs +2 -0
- package/dist/browser/chunk-H6OZP4ZV.mjs.map +1 -0
- package/dist/browser/chunk-INS7RO3B.mjs +2 -0
- package/dist/browser/chunk-INS7RO3B.mjs.map +1 -0
- package/dist/browser/chunk-K4MZY4ME.mjs +2 -0
- package/dist/browser/chunk-K4MZY4ME.mjs.map +1 -0
- package/dist/browser/chunk-OFKV5GNB.mjs +3 -0
- package/dist/browser/chunk-OFKV5GNB.mjs.map +1 -0
- package/dist/browser/chunk-QATIN7CO.mjs +3 -0
- package/dist/browser/chunk-QATIN7CO.mjs.map +1 -0
- package/dist/browser/chunk-QBBQ37P3.mjs +2 -0
- package/dist/browser/chunk-QBBQ37P3.mjs.map +1 -0
- package/dist/browser/chunk-VDVJWU5T.mjs +2 -0
- package/dist/browser/chunk-VDVJWU5T.mjs.map +1 -0
- package/dist/browser/chunk-X3C4I6YJ.mjs +2 -0
- package/dist/browser/chunk-X3C4I6YJ.mjs.map +1 -0
- package/dist/browser/chunk-ZVCTU2DN.mjs +3 -0
- package/dist/browser/chunk-ZVCTU2DN.mjs.map +1 -0
- package/dist/browser/core.d.mts +97 -0
- package/dist/browser/core.mjs +2 -0
- package/dist/browser/core.mjs.map +1 -0
- package/dist/browser/crypto.d.mts +35 -0
- package/dist/browser/crypto.mjs +2 -0
- package/dist/browser/crypto.mjs.map +1 -0
- package/dist/browser/definition.d.mts +13 -0
- package/dist/browser/definition.mjs +2 -0
- package/dist/browser/definition.mjs.map +1 -0
- package/dist/browser/dynamic-feature.d.mts +10 -0
- package/dist/browser/dynamic-feature.mjs +2 -0
- package/dist/browser/dynamic-feature.mjs.map +1 -0
- package/dist/browser/dynamic-structure.d.mts +12 -0
- package/dist/browser/dynamic-structure.mjs +2 -0
- package/dist/browser/dynamic-structure.mjs.map +1 -0
- package/dist/browser/env.d.mts +2 -0
- package/dist/browser/env.mjs +2 -0
- package/dist/browser/env.mjs.map +1 -0
- package/dist/browser/frame-index.d.mts +95 -0
- package/dist/browser/frame-index.mjs +2 -0
- package/dist/browser/frame-index.mjs.map +1 -0
- package/dist/browser/index.browser-CZlhzfSP.d.mts +22 -0
- package/dist/browser/index.d.mts +1 -144
- package/dist/browser/index.mjs +1 -1
- package/dist/browser/index.mjs.map +1 -1
- package/dist/browser/logger.d.mts +41 -0
- package/dist/browser/logger.mjs +2 -0
- package/dist/browser/logger.mjs.map +1 -0
- package/dist/browser/namespace.d.mts +13 -0
- package/dist/browser/namespace.mjs +2 -0
- package/dist/browser/namespace.mjs.map +1 -0
- package/dist/browser/storage.d.mts +194 -0
- package/dist/browser/storage.mjs +2 -0
- package/dist/browser/storage.mjs.map +1 -0
- package/dist/browser/vector.d.mts +15 -0
- package/dist/browser/vector.mjs +2 -0
- package/dist/browser/vector.mjs.map +1 -0
- package/dist/index.cjs +0 -0
- package/dist/node/A-FrameChannel.component-BfBcs734.d.ts +62 -0
- package/dist/node/A-FrameChannel.component-NNKcFViw.d.mts +62 -0
- package/dist/node/A-FrameChannel.types-DQF-IiRq.d.mts +146 -0
- package/dist/node/A-FrameChannel.types-DQF-IiRq.d.ts +146 -0
- package/dist/node/A-FrameDefinition.entity-CAUOdEvU.d.ts +329 -0
- package/dist/node/A-FrameDefinition.entity-DWGN_Ujr.d.mts +329 -0
- package/dist/node/A-FrameDynamicStructure.entity-DaBgSRCR.d.mts +188 -0
- package/dist/node/A-FrameDynamicStructure.entity-DaBgSRCR.d.ts +188 -0
- package/dist/node/A-FrameNamespace.entity-D3fZBGDx.d.ts +125 -0
- package/dist/node/A-FrameNamespace.entity-rCm1AavP.d.mts +125 -0
- package/dist/node/A-FrameStorage.component-BYjHfHJJ.d.mts +107 -0
- package/dist/node/A-FrameStorage.component-CT01fs-t.d.ts +107 -0
- package/dist/node/bundle.cjs +101 -0
- package/dist/node/bundle.cjs.map +1 -0
- package/dist/node/bundle.d.mts +69 -0
- package/dist/node/bundle.d.ts +69 -0
- package/dist/node/bundle.mjs +76 -0
- package/dist/node/bundle.mjs.map +1 -0
- package/dist/node/channel.cjs +60 -0
- package/dist/node/channel.cjs.map +1 -0
- package/dist/node/channel.d.mts +61 -0
- package/dist/node/channel.d.ts +61 -0
- package/dist/node/channel.mjs +11 -0
- package/dist/node/channel.mjs.map +1 -0
- package/dist/node/chunk-3LOMGNWA.cjs +8 -0
- package/dist/node/chunk-3LOMGNWA.cjs.map +1 -0
- package/dist/node/chunk-3ONWH75E.mjs +257 -0
- package/dist/node/chunk-3ONWH75E.mjs.map +1 -0
- package/dist/node/chunk-3TD2PEDZ.mjs +53 -0
- package/dist/node/chunk-3TD2PEDZ.mjs.map +1 -0
- package/dist/node/chunk-442DXGOD.mjs +16 -0
- package/dist/node/chunk-442DXGOD.mjs.map +1 -0
- package/dist/node/chunk-6EFXNUL4.mjs +6 -0
- package/dist/node/chunk-6EFXNUL4.mjs.map +1 -0
- package/dist/node/chunk-7A6XGT5J.cjs +541 -0
- package/dist/node/chunk-7A6XGT5J.cjs.map +1 -0
- package/dist/node/chunk-AOQRXZPC.mjs +207 -0
- package/dist/node/chunk-AOQRXZPC.mjs.map +1 -0
- package/dist/node/chunk-APRYHBEF.mjs +171 -0
- package/dist/node/chunk-APRYHBEF.mjs.map +1 -0
- package/dist/node/chunk-B7BXP7K4.mjs +253 -0
- package/dist/node/chunk-B7BXP7K4.mjs.map +1 -0
- package/dist/node/chunk-B7ZDJXD3.cjs +35 -0
- package/dist/node/chunk-B7ZDJXD3.cjs.map +1 -0
- package/dist/node/chunk-CP6JHUU6.cjs +541 -0
- package/dist/node/chunk-CP6JHUU6.cjs.map +1 -0
- package/dist/node/chunk-DDCEMKBP.mjs +655 -0
- package/dist/node/chunk-DDCEMKBP.mjs.map +1 -0
- package/dist/node/chunk-DMY44VUG.mjs +655 -0
- package/dist/node/chunk-DMY44VUG.mjs.map +1 -0
- package/dist/node/chunk-F4UCOZW5.mjs +33 -0
- package/dist/node/chunk-F4UCOZW5.mjs.map +1 -0
- package/dist/node/chunk-GBTFMT3K.cjs +256 -0
- package/dist/node/chunk-GBTFMT3K.cjs.map +1 -0
- package/dist/node/chunk-GNVXVK2B.cjs +8 -0
- package/dist/node/chunk-GNVXVK2B.cjs.map +1 -0
- package/dist/node/chunk-IIVYTS5M.mjs +239 -0
- package/dist/node/chunk-IIVYTS5M.mjs.map +1 -0
- package/dist/node/chunk-JQBYDEMW.mjs +33 -0
- package/dist/node/chunk-JQBYDEMW.mjs.map +1 -0
- package/dist/node/chunk-K4MZY4ME.mjs +3 -0
- package/dist/node/chunk-K4MZY4ME.mjs.map +1 -0
- package/dist/node/chunk-KK64VLZN.cjs +4 -0
- package/dist/node/chunk-KK64VLZN.cjs.map +1 -0
- package/dist/node/chunk-KLG6HKFU.cjs +175 -0
- package/dist/node/chunk-KLG6HKFU.cjs.map +1 -0
- package/dist/node/chunk-LJIZ47HO.cjs +688 -0
- package/dist/node/chunk-LJIZ47HO.cjs.map +1 -0
- package/dist/node/chunk-NIXKAQVP.cjs +35 -0
- package/dist/node/chunk-NIXKAQVP.cjs.map +1 -0
- package/dist/node/chunk-OI76LHVT.mjs +21 -0
- package/dist/node/chunk-OI76LHVT.mjs.map +1 -0
- package/dist/node/chunk-OJGCQNAH.mjs +529 -0
- package/dist/node/chunk-OJGCQNAH.mjs.map +1 -0
- package/dist/node/chunk-QFHZIG7Y.cjs +25 -0
- package/dist/node/chunk-QFHZIG7Y.cjs.map +1 -0
- package/dist/node/chunk-QFUZVN4Y.cjs +259 -0
- package/dist/node/chunk-QFUZVN4Y.cjs.map +1 -0
- package/dist/node/chunk-RRLTGGM7.cjs +209 -0
- package/dist/node/chunk-RRLTGGM7.cjs.map +1 -0
- package/dist/node/chunk-TO4BPKCY.mjs +6 -0
- package/dist/node/chunk-TO4BPKCY.mjs.map +1 -0
- package/dist/node/chunk-UKKCN7CQ.cjs +688 -0
- package/dist/node/chunk-UKKCN7CQ.cjs.map +1 -0
- package/dist/node/chunk-UPA7VN4R.mjs +153 -0
- package/dist/node/chunk-UPA7VN4R.mjs.map +1 -0
- package/dist/node/chunk-UTJ7CVVB.cjs +248 -0
- package/dist/node/chunk-UTJ7CVVB.cjs.map +1 -0
- package/dist/node/chunk-YVX4W6SI.cjs +155 -0
- package/dist/node/chunk-YVX4W6SI.cjs.map +1 -0
- package/dist/node/chunk-YWWGJ6EJ.cjs +55 -0
- package/dist/node/chunk-YWWGJ6EJ.cjs.map +1 -0
- package/dist/node/chunk-Z4HUCRK2.mjs +529 -0
- package/dist/node/chunk-Z4HUCRK2.mjs.map +1 -0
- package/dist/node/chunk-ZM2RLVVH.cjs +18 -0
- package/dist/node/chunk-ZM2RLVVH.cjs.map +1 -0
- package/dist/node/core.cjs +261 -0
- package/dist/node/core.cjs.map +1 -0
- package/dist/node/core.d.mts +76 -0
- package/dist/node/core.d.ts +76 -0
- package/dist/node/core.mjs +250 -0
- package/dist/node/core.mjs.map +1 -0
- package/dist/node/crypto.cjs +13 -0
- package/dist/node/crypto.cjs.map +1 -0
- package/dist/node/crypto.d.mts +44 -0
- package/dist/node/crypto.d.ts +44 -0
- package/dist/node/crypto.mjs +4 -0
- package/dist/node/crypto.mjs.map +1 -0
- package/dist/node/definition.cjs +19 -0
- package/dist/node/definition.cjs.map +1 -0
- package/dist/node/definition.d.mts +13 -0
- package/dist/node/definition.d.ts +13 -0
- package/dist/node/definition.mjs +6 -0
- package/dist/node/definition.mjs.map +1 -0
- package/dist/node/dynamic-feature.cjs +14 -0
- package/dist/node/dynamic-feature.cjs.map +1 -0
- package/dist/node/dynamic-feature.d.mts +10 -0
- package/dist/node/dynamic-feature.d.ts +10 -0
- package/dist/node/dynamic-feature.mjs +12 -0
- package/dist/node/dynamic-feature.mjs.map +1 -0
- package/dist/node/dynamic-structure.cjs +143 -0
- package/dist/node/dynamic-structure.cjs.map +1 -0
- package/dist/node/dynamic-structure.d.mts +12 -0
- package/dist/node/dynamic-structure.d.ts +12 -0
- package/dist/node/dynamic-structure.mjs +138 -0
- package/dist/node/dynamic-structure.mjs.map +1 -0
- package/dist/node/env.cjs +14 -0
- package/dist/node/env.cjs.map +1 -0
- package/dist/node/env.d.mts +22 -0
- package/dist/node/env.d.ts +22 -0
- package/dist/node/env.mjs +5 -0
- package/dist/node/env.mjs.map +1 -0
- package/dist/node/frame-index.cjs +16 -0
- package/dist/node/frame-index.cjs.map +1 -0
- package/dist/node/frame-index.d.mts +95 -0
- package/dist/node/frame-index.d.ts +95 -0
- package/dist/node/frame-index.mjs +7 -0
- package/dist/node/frame-index.mjs.map +1 -0
- package/dist/node/index.cjs +0 -288
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.d.mts +1 -144
- package/dist/node/index.d.ts +1 -144
- package/dist/node/index.mjs +0 -284
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/logger.cjs +41 -0
- package/dist/node/logger.cjs.map +1 -0
- package/dist/node/logger.d.mts +150 -0
- package/dist/node/logger.d.ts +150 -0
- package/dist/node/logger.mjs +4 -0
- package/dist/node/logger.mjs.map +1 -0
- package/dist/node/namespace.cjs +24 -0
- package/dist/node/namespace.cjs.map +1 -0
- package/dist/node/namespace.d.mts +13 -0
- package/dist/node/namespace.d.ts +13 -0
- package/dist/node/namespace.mjs +7 -0
- package/dist/node/namespace.mjs.map +1 -0
- package/dist/node/storage.cjs +42 -0
- package/dist/node/storage.cjs.map +1 -0
- package/dist/node/storage.d.mts +110 -0
- package/dist/node/storage.d.ts +110 -0
- package/dist/node/storage.mjs +13 -0
- package/dist/node/storage.mjs.map +1 -0
- package/dist/node/vector.cjs +13 -0
- package/dist/node/vector.cjs.map +1 -0
- package/dist/node/vector.d.mts +15 -0
- package/dist/node/vector.d.ts +15 -0
- package/dist/node/vector.mjs +4 -0
- package/dist/node/vector.mjs.map +1 -0
- package/jest.config.browser.ts +41 -0
- package/jest.config.ts +18 -8
- package/package.json +125 -13
- package/{index.ts → src/concept.ts} +5 -2
- package/src/helpers/Hash.helper.ts +14 -0
- package/src/index.ts +0 -24
- package/src/lib/A-Frame/A-Frame.component.env-browser.ts +124 -0
- package/src/lib/A-Frame/A-Frame.component.env-node.ts +106 -0
- package/src/lib/A-Frame/A-Frame.component.ts +62 -0
- package/src/lib/A-Frame/A-Frame.context.ts +40 -0
- package/src/lib/{components/Index.component.ts/Index.error.ts → A-Frame/A-Frame.error.ts} +1 -1
- package/src/lib/{components/Index.component.ts/Index.guard.ts → A-Frame/A-Frame.guard.ts} +9 -6
- package/src/lib/A-Frame/A-Frame.meta.ts +27 -0
- package/src/lib/{components/Index.component.ts/Index.types.ts → A-Frame/A-Frame.types.ts} +52 -17
- package/src/lib/A-Frame/decorators/A-FrameDefine.decorator.ts +104 -0
- package/src/lib/A-Frame/decorators/A-FrameNamespace.decorator.ts +33 -0
- package/src/lib/A-Frame/index.browser.ts +10 -0
- package/src/lib/A-Frame/index.ts +10 -0
- package/src/lib/A-FrameBundle/A-FrameBundle.builder.env-node.ts +95 -0
- package/src/lib/A-FrameBundle/A-FrameBundle.constants.ts +5 -0
- package/src/lib/A-FrameBundle/A-FrameBundle.types.ts +31 -0
- package/src/lib/A-FrameBundle/index.browser.ts +6 -0
- package/src/lib/A-FrameBundle/index.ts +7 -0
- package/src/lib/A-FrameCLI/A-FrameCLI.container.ts +333 -0
- package/src/lib/A-FrameChannel/A-FrameChannel.component.env-browser.ts +63 -0
- package/src/lib/A-FrameChannel/A-FrameChannel.component.env-node.ts +586 -0
- package/src/lib/A-FrameChannel/A-FrameChannel.component.ts +273 -0
- package/src/lib/A-FrameChannel/A-FrameChannel.constants.ts +39 -0
- package/src/lib/A-FrameChannel/A-FrameChannel.error.ts +10 -0
- package/src/lib/A-FrameChannel/A-FrameChannel.types.ts +143 -0
- package/src/lib/A-FrameChannel/A-FrameChannelEvent.context.ts +28 -0
- package/src/lib/A-FrameChannel/A-FrameChannelRequest.context.ts +36 -0
- package/src/lib/A-FrameChannel/A-FrameChannelSocket.entity.ts +189 -0
- package/src/lib/A-FrameChannel/A-FrameChannelStream.entity.ts +144 -0
- package/src/lib/A-FrameChannel/index.browser.ts +3 -0
- package/src/lib/A-FrameChannel/index.ts +10 -0
- package/src/lib/A-FrameCrypto/A-FrameCrypto.component.env-browser.ts +123 -0
- package/src/lib/A-FrameCrypto/A-FrameCrypto.component.env-node.ts +204 -0
- package/src/lib/A-FrameCrypto/index.browser.ts +1 -0
- package/src/lib/A-FrameCrypto/index.ts +1 -0
- package/src/lib/A-FrameDefinition/A-FrameDefinition.constants.ts +8 -0
- package/src/lib/A-FrameDefinition/A-FrameDefinition.entity.ts +290 -0
- package/src/lib/A-FrameDefinition/A-FrameDefinition.types.ts +109 -0
- package/src/lib/A-FrameDefinition/index.ts +3 -0
- package/src/lib/A-FrameDynamicFeature/A-FrameDynamicFeature.entity.ts +13 -0
- package/src/lib/A-FrameDynamicFeature/A-FrameDynamicFeature.types.ts +10 -0
- package/src/lib/A-FrameDynamicFeature/index.ts +2 -0
- package/src/lib/A-FrameDynamicPatch/A-FrameDynamicPatch.entity.ts +38 -0
- package/src/lib/A-FrameDynamicPatch/A-FrameDynamicPatch.types.ts +20 -0
- package/src/lib/A-FrameDynamicSession/A-FrameDynamicSession.constants.ts +9 -0
- package/src/lib/A-FrameDynamicSession/A-FrameDynamicSession.entity.ts +91 -0
- package/src/lib/A-FrameDynamicSession/A-FrameDynamicSession.types.ts +18 -0
- package/src/lib/A-FrameDynamicStructure/A-FrameDynamicStructure.constants.ts +13 -0
- package/src/lib/A-FrameDynamicStructure/A-FrameDynamicStructure.entity.ts +187 -0
- package/src/lib/A-FrameDynamicStructure/A-FrameDynamicStructure.error.ts +13 -0
- package/src/lib/A-FrameDynamicStructure/A-FrameDynamicStructure.types.ts +128 -0
- package/src/lib/A-FrameDynamicStructure/A-FrameDynamicStructureOperation.context.ts +32 -0
- package/src/lib/A-FrameDynamicStructure/index.ts +5 -0
- package/src/lib/A-FrameEnv/A-FrameEnv.fragment.env-browser.ts +31 -0
- package/src/lib/A-FrameEnv/A-FrameEnv.fragment.env-node.ts +39 -0
- package/src/lib/A-FrameEnv/A-FrameEnv.types.ts +7 -0
- package/src/lib/A-FrameEnv/index.browser.ts +1 -0
- package/src/lib/A-FrameEnv/index.ts +1 -0
- package/src/lib/A-FrameIndex/A-FrameIndex.context.ts +321 -0
- package/src/lib/A-FrameIndex/A-FrameIndex.types.ts +63 -0
- package/src/lib/A-FrameIndex/index.browser.ts +3 -0
- package/src/lib/A-FrameIndex/index.ts +3 -0
- package/src/lib/A-FrameLogger/A-FrameLogger.component.env-browser.ts +99 -0
- package/src/lib/A-FrameLogger/A-FrameLogger.component.env-node.ts +129 -0
- package/src/lib/A-FrameLogger/A-FrameLogger.component.ts +123 -0
- package/src/lib/A-FrameLogger/A-FrameLogger.constants.ts +66 -0
- package/src/lib/A-FrameLogger/A-FrameLogger.types.ts +67 -0
- package/src/lib/A-FrameLogger/index.browser.ts +4 -0
- package/src/lib/A-FrameLogger/index.ts +4 -0
- package/src/lib/A-FrameNamespace/A-FrameNamespace.constants.ts +12 -0
- package/src/lib/A-FrameNamespace/A-FrameNamespace.entity.ts +211 -0
- package/src/lib/A-FrameNamespace/A-FrameNamespace.types.ts +72 -0
- package/src/lib/A-FrameNamespace/index.ts +3 -0
- package/src/lib/A-FrameStorage/A-FrameStorage.codec.ts +338 -0
- package/src/lib/A-FrameStorage/A-FrameStorage.component.ts +191 -0
- package/src/lib/A-FrameStorage/A-FrameStorage.constants.ts +11 -0
- package/src/lib/A-FrameStorage/A-FrameStorage.error.ts +13 -0
- package/src/lib/A-FrameStorage/A-FrameStorage.types.ts +98 -0
- package/src/lib/A-FrameStorage/A-FrameStorageOperation.context.ts +59 -0
- package/src/lib/A-FrameStorage/browser/A-FrameBrowserStorage.component.ts +312 -0
- package/src/lib/A-FrameStorage/browser/A-FrameBrowserStorageBlobs.context.ts +77 -0
- package/src/lib/A-FrameStorage/index.browser.ts +11 -0
- package/src/lib/A-FrameStorage/index.ts +10 -0
- package/src/lib/A-FrameStorage/node/A-FrameNodeStorage.component.ts +464 -0
- package/src/lib/A-FrameStorage/server/A-FrameServerStorage.component.ts +177 -0
- package/src/lib/{entities/A_FrameVector/A_FrameVector.entity.ts → A-FrameVector/A-FrameVector.entity.ts} +10 -0
- package/src/lib/A-FrameVector/index.ts +3 -0
- package/tests/A-Frame.browser.test.ts +94 -0
- package/tests/A-Frame.test.ts +73 -68
- package/tests/jest.browser-environment.js +30 -0
- package/tests/jest.polyfills.browser.ts +13 -0
- package/tests/jest.setup.browser.ts +33 -0
- package/tsconfig.browser.json +54 -0
- package/tsconfig.json +16 -0
- package/tsup.config.ts +32 -2
- package/src/lib/components/Builder.component.ts/Builder.component.ts +0 -0
- package/src/lib/components/Index.component.ts/Index.component.ts +0 -79
- package/src/lib/components/Index.component.ts/Index.constants.ts +0 -0
- package/src/lib/components/Index.component.ts/Index.meta.ts +0 -28
- package/src/lib/components/Index.component.ts/IndexConfigurations.meta.ts +0 -78
- package/src/lib/components/Index.component.ts/decorators/IndexComponent.decorator.ts +0 -97
- package/src/lib/components/Index.component.ts/decorators/IndexDescribe.decorator.ts +0 -59
- package/src/lib/components/Index.component.ts/decorators/IndexNamespace.decorator.ts +0 -57
- package/src/lib/components/Search/A_FrameSearch.component.ts +0 -66
- package/src/lib/containers/CLI.container.ts +0 -27
- package/src/lib/entities/Namespace/Namespace.entity.ts +0 -8
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import { A_TYPES__Entity_Serialized, A_Fragment, A_TYPES__Ctor, A_Component, A_Container, A_Entity } from '@adaas/a-concept';
|
|
2
|
+
|
|
3
|
+
type A_FrameDynamicPatch_Init = {
|
|
4
|
+
version: number;
|
|
5
|
+
timestamp: number;
|
|
6
|
+
reason: string;
|
|
7
|
+
encoded: string;
|
|
8
|
+
delta: number;
|
|
9
|
+
};
|
|
10
|
+
type A_FrameDynamicPatch_Serialized = {
|
|
11
|
+
version: number;
|
|
12
|
+
timestamp: number;
|
|
13
|
+
reason: string;
|
|
14
|
+
encoded: string;
|
|
15
|
+
delta: number;
|
|
16
|
+
} & A_TYPES__Entity_Serialized;
|
|
17
|
+
|
|
18
|
+
declare const A_FrameDynamicStructureFeatures: {
|
|
19
|
+
readonly Load: "_A_FRAME_DYNAMIC_STRUCTURE_LOAD";
|
|
20
|
+
readonly Update: "_A_FRAME_DYNAMIC_STRUCTURE_UPDATE";
|
|
21
|
+
readonly Generate: "_A_FRAME_DYNAMIC_STRUCTURE_GENERATE";
|
|
22
|
+
};
|
|
23
|
+
declare const A_FrameDynamicStructureEvents: {
|
|
24
|
+
readonly Updated: "_A_FRAME_DYNAMIC_STRUCTURE_UPDATED";
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
declare class A_FrameDynamicStructureOperation<_InputParams = any> extends A_Fragment {
|
|
28
|
+
protected _meta: Map<string, any>;
|
|
29
|
+
constructor(params?: _InputParams);
|
|
30
|
+
get params(): _InputParams;
|
|
31
|
+
get(key: string): any;
|
|
32
|
+
set(key: string, value: any): void;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
type DynamicStructureDefaultBasesNames = 'A_Component' | 'A_Container' | 'A_Fragment';
|
|
36
|
+
type BaseClassName = DynamicStructureDefaultBasesNames | A_TYPES__Ctor<A_Component | A_Fragment | A_Container>;
|
|
37
|
+
type A_FrameDynamicStructure_Init = {
|
|
38
|
+
/** The goal / initial prompt driving structure generation */
|
|
39
|
+
prompt: string;
|
|
40
|
+
/** Which model to use for content generation */
|
|
41
|
+
model: string;
|
|
42
|
+
/** Only include components whose base class is in this list (empty = allow all) */
|
|
43
|
+
includeBases?: Array<BaseClassName | A_TYPES__Ctor<A_Component | A_Fragment | A_Container>>;
|
|
44
|
+
/** Exclude components whose base class is in this list */
|
|
45
|
+
excludeBases?: Array<string | A_TYPES__Ctor<A_Component | A_Fragment | A_Container>>;
|
|
46
|
+
/** Explicit list of component names to enable (subset of registry) */
|
|
47
|
+
enabledComponents?: Array<string | A_TYPES__Ctor<A_Component | A_Fragment | A_Container>>;
|
|
48
|
+
/** Rendering context hint passed to content generator */
|
|
49
|
+
context?: string;
|
|
50
|
+
/** Free-form hint about required prop types (forwarded to content generator) */
|
|
51
|
+
metaHint?: string;
|
|
52
|
+
};
|
|
53
|
+
type A_FrameDynamicStructure_Serialized = {
|
|
54
|
+
name: string;
|
|
55
|
+
description?: string;
|
|
56
|
+
metadata?: Record<string, any>;
|
|
57
|
+
history: Array<A_FrameDynamicPatch_Serialized>;
|
|
58
|
+
} & A_TYPES__Entity_Serialized;
|
|
59
|
+
type A_FrameDynamicStructureListener = (context: A_FrameDynamicStructureOperation) => void;
|
|
60
|
+
type A_FrameDynamicStructureResolvedComponent<P extends Record<string, any> = Record<string, any>> = {
|
|
61
|
+
component: string;
|
|
62
|
+
score: number;
|
|
63
|
+
meta: P;
|
|
64
|
+
};
|
|
65
|
+
type A_FrameDynamicStructureFeatureNames = typeof A_FrameDynamicStructureFeatures[keyof typeof A_FrameDynamicStructureFeatures];
|
|
66
|
+
type A_FrameDynamicStructureEventNames = typeof A_FrameDynamicStructureEvents[keyof typeof A_FrameDynamicStructureEvents];
|
|
67
|
+
type A_FrameDynamicStructureDefinitionEntity = {
|
|
68
|
+
/**
|
|
69
|
+
* The prompt is the text that describes the element (component, container, fragment or entity) that is needed in the structure based on input prompt
|
|
70
|
+
*
|
|
71
|
+
*
|
|
72
|
+
* e.g. "A component that allows to search for something", "A container that runs a web server", "A fragment that stores user settings", "An entity that represents a user session", etc.
|
|
73
|
+
*
|
|
74
|
+
* [!] Note, prompt should also contain the name of the element if it's possible, to make it easier to understand and use in the structure generation.
|
|
75
|
+
*/
|
|
76
|
+
prompt: string;
|
|
77
|
+
/**
|
|
78
|
+
* The string set of params that is necessary to the particular element (component, container, fragment or entity) that is needed in the structure based on input prompt.
|
|
79
|
+
* Those parameters should be presented in the string manner and then mapped to the actual params in the structure generation process, to make it easier to understand and use in the structure generation.
|
|
80
|
+
*
|
|
81
|
+
* e.g. "props: {query: string, resultsCount: number}", "constructorParams: {port: number}", "state: {isLoggedIn: boolean}", "ASEID", etc. or simply text: "Stores user with id=12345 and name=John Doe" if it's hard to define the params in a structured way.
|
|
82
|
+
*
|
|
83
|
+
* [!] Params are applicable only for stateful components like Fragment, or Entity. Since components are stateless they can only rely on params in their methods received by @A_Inject(SomeFragment) someFragment: SomeFragment, where SomeFragment has state defined by params. And also for containers, since they can have constructor params and also rely on params of their components and fragments.
|
|
84
|
+
*
|
|
85
|
+
*
|
|
86
|
+
*/
|
|
87
|
+
params?: string;
|
|
88
|
+
};
|
|
89
|
+
type A_FrameDynamicStructureDefinition = {
|
|
90
|
+
/**
|
|
91
|
+
* A set of containers that the structure is needed based on input prompt
|
|
92
|
+
*
|
|
93
|
+
* Where container is an instance of inherited class from A_Container that should be running independently and may have own components, fragments and entities.
|
|
94
|
+
*
|
|
95
|
+
* e.g. HTTPServerContainer, WebWorker, AppContainer, etc.
|
|
96
|
+
*
|
|
97
|
+
* [!] Note: should be presented only if initial query allows to have a container, and should be included only if necessary.
|
|
98
|
+
*
|
|
99
|
+
*/
|
|
100
|
+
containers: Array<A_FrameDynamicStructureDefinitionEntity & {
|
|
101
|
+
components: Array<A_FrameDynamicStructureDefinitionEntity>;
|
|
102
|
+
fragments: Array<A_FrameDynamicStructureDefinitionEntity>;
|
|
103
|
+
entities: Array<A_FrameDynamicStructureDefinitionEntity>;
|
|
104
|
+
}>;
|
|
105
|
+
/**
|
|
106
|
+
* A set of components that the structure is needed based on input prompt
|
|
107
|
+
*
|
|
108
|
+
* Where Component is a constructor class from A_Component that allows to define something that is stateless, has methods and features and can be injected as a dependency in other components, fragments or containers.
|
|
109
|
+
*
|
|
110
|
+
* e.g. SearchComponent, SettingsComponent, ButtonComponent, SectionComponent, etc.
|
|
111
|
+
*
|
|
112
|
+
* [!] Note: should be presented only if initial query allows to have a component, and should be included only if necessary.
|
|
113
|
+
*/
|
|
114
|
+
components: Array<A_FrameDynamicStructureDefinitionEntity>;
|
|
115
|
+
/**
|
|
116
|
+
* A set of Context Fragments that the structure is needed based on input prompt
|
|
117
|
+
*
|
|
118
|
+
* Where Fragment is an instance of inherited class from A_Fragment that allows to define something that has state and can be injected as a dependency in other components, fragments or containers.
|
|
119
|
+
*
|
|
120
|
+
* e.g. Settings, State, Store, etc.
|
|
121
|
+
*
|
|
122
|
+
* [!] Note: should be presented only if initial query allows to have a fragment, and should be included only if necessary.
|
|
123
|
+
*/
|
|
124
|
+
fragments: Array<A_FrameDynamicStructureDefinitionEntity>;
|
|
125
|
+
/**
|
|
126
|
+
* A set of Entities that the structure is needed based on input prompt
|
|
127
|
+
*
|
|
128
|
+
* Where Entity is a A_Entity or a constructor of A_Entity that allows to define something that has ID(ASEID) and can be injected as a dependency in other components, fragments or containers.
|
|
129
|
+
*
|
|
130
|
+
* e.g. Session, User, Conversation, etc.
|
|
131
|
+
*
|
|
132
|
+
* [!] Note: should be presented only if initial query allows to have an entity, and should be included only if necessary.
|
|
133
|
+
*/
|
|
134
|
+
entities: Array<A_FrameDynamicStructureDefinitionEntity>;
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
declare class A_FrameDynamicPatch extends A_Entity<A_FrameDynamicPatch_Init, A_FrameDynamicPatch_Serialized> {
|
|
138
|
+
static get concept(): string;
|
|
139
|
+
version: number;
|
|
140
|
+
timestamp: number;
|
|
141
|
+
reason: string;
|
|
142
|
+
encoded: string;
|
|
143
|
+
delta: number;
|
|
144
|
+
fromNew(options: A_FrameDynamicPatch_Init): void;
|
|
145
|
+
toJSON(): A_FrameDynamicPatch_Serialized;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
declare class A_FrameDynamicStructure extends A_Entity<A_FrameDynamicStructure_Init, A_FrameDynamicStructure_Serialized> {
|
|
149
|
+
static get concept(): string;
|
|
150
|
+
prompt: string;
|
|
151
|
+
createdAt: number;
|
|
152
|
+
private model;
|
|
153
|
+
private context;
|
|
154
|
+
private metaHint;
|
|
155
|
+
private includeBases;
|
|
156
|
+
private excludeBases;
|
|
157
|
+
private enabledComponents;
|
|
158
|
+
private _components;
|
|
159
|
+
private _history;
|
|
160
|
+
private _version;
|
|
161
|
+
private listeners;
|
|
162
|
+
fromNew(options: A_FrameDynamicStructure_Init): void;
|
|
163
|
+
/** The current resolved component list (output of the last generate or patch). */
|
|
164
|
+
get components(): ReadonlyArray<A_FrameDynamicStructureResolvedComponent>;
|
|
165
|
+
/** Immutable patch history. */
|
|
166
|
+
get history(): ReadonlyArray<A_FrameDynamicPatch>;
|
|
167
|
+
/** Current schema version (increments with each patch). */
|
|
168
|
+
get version(): number;
|
|
169
|
+
/**
|
|
170
|
+
* Run the full generation pipeline:
|
|
171
|
+
* content generation → structure mapping → encode → patch
|
|
172
|
+
*
|
|
173
|
+
* @returns The resolved component list.
|
|
174
|
+
*/
|
|
175
|
+
generate(): Promise<void>;
|
|
176
|
+
patch(prompt: string): Promise<void>;
|
|
177
|
+
/**
|
|
178
|
+
* Restore the component list to a specific version from history.
|
|
179
|
+
* Creates a new patch entry so the revert itself is tracked.
|
|
180
|
+
*/
|
|
181
|
+
revertTo(version: number): this;
|
|
182
|
+
toJSON(): A_FrameDynamicStructure_Serialized;
|
|
183
|
+
subscribe(feature: A_FrameDynamicStructureEventNames, listener: A_FrameDynamicStructureListener): void;
|
|
184
|
+
unsubscribe(feature: A_FrameDynamicStructureEventNames, listener: A_FrameDynamicStructureListener): void;
|
|
185
|
+
emit(stage: A_FrameDynamicStructureEventNames, context: any): void;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export { A_FrameDynamicStructure as A, type BaseClassName as B, type DynamicStructureDefaultBasesNames as D, type A_FrameDynamicStructureDefinition as a, type A_FrameDynamicStructureDefinitionEntity as b, type A_FrameDynamicStructureEventNames as c, A_FrameDynamicStructureEvents as d, type A_FrameDynamicStructureFeatureNames as e, A_FrameDynamicStructureFeatures as f, type A_FrameDynamicStructureListener as g, type A_FrameDynamicStructureResolvedComponent as h, type A_FrameDynamicStructure_Init as i, type A_FrameDynamicStructure_Serialized as j, A_FrameDynamicStructureOperation as k };
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { A_TYPES__Entity_Serialized, A_Entity, A_Scope } from '@adaas/a-concept';
|
|
2
|
+
import { A_FrameVector } from './vector.js';
|
|
3
|
+
|
|
4
|
+
type A_FrameNamespace_Init = {
|
|
5
|
+
/** Unique identifier / slug for the namespace (e.g. "math", "finance/options") */
|
|
6
|
+
name: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
metadata?: Record<string, any>;
|
|
9
|
+
};
|
|
10
|
+
type A_FrameNamespace_Serialized = {
|
|
11
|
+
hash: string;
|
|
12
|
+
name: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
metadata?: Record<string, unknown>;
|
|
15
|
+
embedding?: Float32Array;
|
|
16
|
+
embeddedAt: number;
|
|
17
|
+
embeddingModel?: string;
|
|
18
|
+
credentialId?: string;
|
|
19
|
+
aFrameVersion?: string;
|
|
20
|
+
aFrameServerVersion?: string;
|
|
21
|
+
} & A_TYPES__Entity_Serialized;
|
|
22
|
+
type A_FrameNamespace_Record = {
|
|
23
|
+
/** SHA-256 hex of the namespace name — acts as stable identity key */
|
|
24
|
+
hash: string;
|
|
25
|
+
/** Namespace name / slug */
|
|
26
|
+
name: string;
|
|
27
|
+
description?: string;
|
|
28
|
+
metadata?: Record<string, unknown>;
|
|
29
|
+
embedding: Float32Array;
|
|
30
|
+
embeddedAt: number;
|
|
31
|
+
/** Name of the embedding model used to produce the vector */
|
|
32
|
+
embeddingModel?: string;
|
|
33
|
+
/** ID of the server credential (API key) used during embedding */
|
|
34
|
+
credentialId?: string;
|
|
35
|
+
/** Version of @adaas/a-frame that produced this record */
|
|
36
|
+
aFrameVersion?: string;
|
|
37
|
+
/** Version of adaas-a-frame-mcp that produced the vector */
|
|
38
|
+
aFrameServerVersion?: string;
|
|
39
|
+
};
|
|
40
|
+
type A_FrameNamespace_EmbeddingMeta = {
|
|
41
|
+
model?: string;
|
|
42
|
+
date: string;
|
|
43
|
+
dimensions: number;
|
|
44
|
+
inputCount: number;
|
|
45
|
+
credentialId?: string | null;
|
|
46
|
+
aFrameVersion?: string;
|
|
47
|
+
aFrameServerVersion?: string;
|
|
48
|
+
};
|
|
49
|
+
type A_FrameNamespace_SearchResult = {
|
|
50
|
+
name: string;
|
|
51
|
+
score: number;
|
|
52
|
+
hash: string;
|
|
53
|
+
description?: string;
|
|
54
|
+
metadata?: Record<string, unknown>;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
declare class A_FrameNamespace extends A_Entity<A_FrameNamespace_Init, A_FrameNamespace_Serialized> {
|
|
58
|
+
static get concept(): string;
|
|
59
|
+
protected _name: string;
|
|
60
|
+
protected _hash: string;
|
|
61
|
+
protected _description?: string;
|
|
62
|
+
protected _metadata?: Record<string, any>;
|
|
63
|
+
protected _vector?: A_FrameVector;
|
|
64
|
+
protected _embeddedAt?: number;
|
|
65
|
+
protected _embeddingModel?: string;
|
|
66
|
+
protected _credentialId?: string;
|
|
67
|
+
protected _aFrameVersion?: string;
|
|
68
|
+
protected _aFrameServerVersion?: string;
|
|
69
|
+
get id(): string;
|
|
70
|
+
get name(): string;
|
|
71
|
+
get hash(): string;
|
|
72
|
+
get description(): string | undefined;
|
|
73
|
+
get metadata(): Record<string, any>;
|
|
74
|
+
get vector(): A_FrameVector | undefined;
|
|
75
|
+
get embedding(): Float32Array | null;
|
|
76
|
+
get aFrameServerVersion(): string | undefined;
|
|
77
|
+
get aFrameVersion(): string | undefined;
|
|
78
|
+
get isEmbed(): boolean;
|
|
79
|
+
/**
|
|
80
|
+
* Saves Namespace to storage. The actual implementation of saving is handled by the A_FrameNamespaceFeatures.Save feature, which can be implemented by the environment to persist the definition to a database, file system, or other storage mechanism.
|
|
81
|
+
*
|
|
82
|
+
* @param scope
|
|
83
|
+
* @returns
|
|
84
|
+
*/
|
|
85
|
+
save(scope?: A_Scope): Promise<void> | void;
|
|
86
|
+
/**
|
|
87
|
+
* Deletes the namespace from storage. The actual implementation of deletion is handled by the A_FrameNamespaceFeatures.Destroy feature, which can be implemented by the environment to remove the namespace from the database, file system, or other storage mechanism.
|
|
88
|
+
*
|
|
89
|
+
* @param scope
|
|
90
|
+
* @returns
|
|
91
|
+
*/
|
|
92
|
+
destroy(scope?: A_Scope): Promise<void> | void;
|
|
93
|
+
/**
|
|
94
|
+
* Loads the namespace from storage. The actual implementation of loading is handled by the A_FrameNamespaceFeatures.Load feature, which can be implemented by the environment to retrieve the namespace from the database, file system, or other storage mechanism and populate the entity's properties accordingly.
|
|
95
|
+
*
|
|
96
|
+
* @param scope
|
|
97
|
+
* @returns
|
|
98
|
+
*/
|
|
99
|
+
load(scope?: A_Scope): Promise<void>;
|
|
100
|
+
/**
|
|
101
|
+
* Updates the definition's properties. This can be used to modify the source code, description, metadata, or namespace of the definition. After updating, you may want to call `embed()` again to refresh the embedding based on the new content.
|
|
102
|
+
*
|
|
103
|
+
* @param updates
|
|
104
|
+
*/
|
|
105
|
+
update(updates: Partial<Pick<A_FrameNamespace, 'name' | 'description' | 'metadata'>>): void;
|
|
106
|
+
/**
|
|
107
|
+
* Generates an embedding vector for the namespace using the A_FrameNamespaceFeatures.Embed feature. This typically involves sending the namespace's content (name + description) to an embedding model and storing the resulting vector in the entity. Once embedded, the namespace can be searched using its vector representation.
|
|
108
|
+
*
|
|
109
|
+
* @param scope
|
|
110
|
+
* @returns
|
|
111
|
+
*/
|
|
112
|
+
embed(scope?: A_Scope): Promise<void> | void;
|
|
113
|
+
fromNew(init: A_FrameNamespace_Init): void;
|
|
114
|
+
fromJSON(serialized: A_FrameNamespace_Serialized): void;
|
|
115
|
+
toJSON(): A_FrameNamespace_Serialized;
|
|
116
|
+
hydrateFromRecord(record: A_FrameNamespace_Record): void;
|
|
117
|
+
hydrateFromEmbedding(embedding: Float32Array, meta?: A_FrameNamespace_EmbeddingMeta): void;
|
|
118
|
+
/**
|
|
119
|
+
* Build the text string sent to the embedding model.
|
|
120
|
+
* Uses name + description so the vector captures semantic intent.
|
|
121
|
+
*/
|
|
122
|
+
toString(): string;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export { A_FrameNamespace as A, type A_FrameNamespace_EmbeddingMeta as a, type A_FrameNamespace_Init as b, type A_FrameNamespace_Record as c, type A_FrameNamespace_SearchResult as d, type A_FrameNamespace_Serialized as e };
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { A_TYPES__Entity_Serialized, A_Entity, A_Scope } from '@adaas/a-concept';
|
|
2
|
+
import { A_FrameVector } from './vector.mjs';
|
|
3
|
+
|
|
4
|
+
type A_FrameNamespace_Init = {
|
|
5
|
+
/** Unique identifier / slug for the namespace (e.g. "math", "finance/options") */
|
|
6
|
+
name: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
metadata?: Record<string, any>;
|
|
9
|
+
};
|
|
10
|
+
type A_FrameNamespace_Serialized = {
|
|
11
|
+
hash: string;
|
|
12
|
+
name: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
metadata?: Record<string, unknown>;
|
|
15
|
+
embedding?: Float32Array;
|
|
16
|
+
embeddedAt: number;
|
|
17
|
+
embeddingModel?: string;
|
|
18
|
+
credentialId?: string;
|
|
19
|
+
aFrameVersion?: string;
|
|
20
|
+
aFrameServerVersion?: string;
|
|
21
|
+
} & A_TYPES__Entity_Serialized;
|
|
22
|
+
type A_FrameNamespace_Record = {
|
|
23
|
+
/** SHA-256 hex of the namespace name — acts as stable identity key */
|
|
24
|
+
hash: string;
|
|
25
|
+
/** Namespace name / slug */
|
|
26
|
+
name: string;
|
|
27
|
+
description?: string;
|
|
28
|
+
metadata?: Record<string, unknown>;
|
|
29
|
+
embedding: Float32Array;
|
|
30
|
+
embeddedAt: number;
|
|
31
|
+
/** Name of the embedding model used to produce the vector */
|
|
32
|
+
embeddingModel?: string;
|
|
33
|
+
/** ID of the server credential (API key) used during embedding */
|
|
34
|
+
credentialId?: string;
|
|
35
|
+
/** Version of @adaas/a-frame that produced this record */
|
|
36
|
+
aFrameVersion?: string;
|
|
37
|
+
/** Version of adaas-a-frame-mcp that produced the vector */
|
|
38
|
+
aFrameServerVersion?: string;
|
|
39
|
+
};
|
|
40
|
+
type A_FrameNamespace_EmbeddingMeta = {
|
|
41
|
+
model?: string;
|
|
42
|
+
date: string;
|
|
43
|
+
dimensions: number;
|
|
44
|
+
inputCount: number;
|
|
45
|
+
credentialId?: string | null;
|
|
46
|
+
aFrameVersion?: string;
|
|
47
|
+
aFrameServerVersion?: string;
|
|
48
|
+
};
|
|
49
|
+
type A_FrameNamespace_SearchResult = {
|
|
50
|
+
name: string;
|
|
51
|
+
score: number;
|
|
52
|
+
hash: string;
|
|
53
|
+
description?: string;
|
|
54
|
+
metadata?: Record<string, unknown>;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
declare class A_FrameNamespace extends A_Entity<A_FrameNamespace_Init, A_FrameNamespace_Serialized> {
|
|
58
|
+
static get concept(): string;
|
|
59
|
+
protected _name: string;
|
|
60
|
+
protected _hash: string;
|
|
61
|
+
protected _description?: string;
|
|
62
|
+
protected _metadata?: Record<string, any>;
|
|
63
|
+
protected _vector?: A_FrameVector;
|
|
64
|
+
protected _embeddedAt?: number;
|
|
65
|
+
protected _embeddingModel?: string;
|
|
66
|
+
protected _credentialId?: string;
|
|
67
|
+
protected _aFrameVersion?: string;
|
|
68
|
+
protected _aFrameServerVersion?: string;
|
|
69
|
+
get id(): string;
|
|
70
|
+
get name(): string;
|
|
71
|
+
get hash(): string;
|
|
72
|
+
get description(): string | undefined;
|
|
73
|
+
get metadata(): Record<string, any>;
|
|
74
|
+
get vector(): A_FrameVector | undefined;
|
|
75
|
+
get embedding(): Float32Array | null;
|
|
76
|
+
get aFrameServerVersion(): string | undefined;
|
|
77
|
+
get aFrameVersion(): string | undefined;
|
|
78
|
+
get isEmbed(): boolean;
|
|
79
|
+
/**
|
|
80
|
+
* Saves Namespace to storage. The actual implementation of saving is handled by the A_FrameNamespaceFeatures.Save feature, which can be implemented by the environment to persist the definition to a database, file system, or other storage mechanism.
|
|
81
|
+
*
|
|
82
|
+
* @param scope
|
|
83
|
+
* @returns
|
|
84
|
+
*/
|
|
85
|
+
save(scope?: A_Scope): Promise<void> | void;
|
|
86
|
+
/**
|
|
87
|
+
* Deletes the namespace from storage. The actual implementation of deletion is handled by the A_FrameNamespaceFeatures.Destroy feature, which can be implemented by the environment to remove the namespace from the database, file system, or other storage mechanism.
|
|
88
|
+
*
|
|
89
|
+
* @param scope
|
|
90
|
+
* @returns
|
|
91
|
+
*/
|
|
92
|
+
destroy(scope?: A_Scope): Promise<void> | void;
|
|
93
|
+
/**
|
|
94
|
+
* Loads the namespace from storage. The actual implementation of loading is handled by the A_FrameNamespaceFeatures.Load feature, which can be implemented by the environment to retrieve the namespace from the database, file system, or other storage mechanism and populate the entity's properties accordingly.
|
|
95
|
+
*
|
|
96
|
+
* @param scope
|
|
97
|
+
* @returns
|
|
98
|
+
*/
|
|
99
|
+
load(scope?: A_Scope): Promise<void>;
|
|
100
|
+
/**
|
|
101
|
+
* Updates the definition's properties. This can be used to modify the source code, description, metadata, or namespace of the definition. After updating, you may want to call `embed()` again to refresh the embedding based on the new content.
|
|
102
|
+
*
|
|
103
|
+
* @param updates
|
|
104
|
+
*/
|
|
105
|
+
update(updates: Partial<Pick<A_FrameNamespace, 'name' | 'description' | 'metadata'>>): void;
|
|
106
|
+
/**
|
|
107
|
+
* Generates an embedding vector for the namespace using the A_FrameNamespaceFeatures.Embed feature. This typically involves sending the namespace's content (name + description) to an embedding model and storing the resulting vector in the entity. Once embedded, the namespace can be searched using its vector representation.
|
|
108
|
+
*
|
|
109
|
+
* @param scope
|
|
110
|
+
* @returns
|
|
111
|
+
*/
|
|
112
|
+
embed(scope?: A_Scope): Promise<void> | void;
|
|
113
|
+
fromNew(init: A_FrameNamespace_Init): void;
|
|
114
|
+
fromJSON(serialized: A_FrameNamespace_Serialized): void;
|
|
115
|
+
toJSON(): A_FrameNamespace_Serialized;
|
|
116
|
+
hydrateFromRecord(record: A_FrameNamespace_Record): void;
|
|
117
|
+
hydrateFromEmbedding(embedding: Float32Array, meta?: A_FrameNamespace_EmbeddingMeta): void;
|
|
118
|
+
/**
|
|
119
|
+
* Build the text string sent to the embedding model.
|
|
120
|
+
* Uses name + description so the vector captures semantic intent.
|
|
121
|
+
*/
|
|
122
|
+
toString(): string;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export { A_FrameNamespace as A, type A_FrameNamespace_EmbeddingMeta as a, type A_FrameNamespace_Init as b, type A_FrameNamespace_Record as c, type A_FrameNamespace_SearchResult as d, type A_FrameNamespace_Serialized as e };
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { A_Fragment, A_Error, A_Component } from '@adaas/a-concept';
|
|
2
|
+
import { A as A_FrameChannelRequest, c as A_Frame_CredentialResponse } from './A-FrameChannel.types-DQF-IiRq.mjs';
|
|
3
|
+
import { e as A_FrameNamespace_Serialized } from './A-FrameNamespace.entity-rCm1AavP.mjs';
|
|
4
|
+
import { c as A_FrameDefinition_Serialized } from './A-FrameDefinition.entity-DWGN_Ujr.mjs';
|
|
5
|
+
|
|
6
|
+
declare class A_FrameContext extends A_Fragment {
|
|
7
|
+
private credentials?;
|
|
8
|
+
constructor();
|
|
9
|
+
get encryptionKey(): string | undefined;
|
|
10
|
+
get serverVersion(): string | undefined;
|
|
11
|
+
isAuthenticated(): boolean;
|
|
12
|
+
setCredentials(credentials: A_FrameChannelRequest<A_Frame_CredentialResponse>): void;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
declare class A_FrameStorageOperation<_ParamsType = any, _ResultType = any> extends A_Fragment {
|
|
16
|
+
protected _result?: _ResultType;
|
|
17
|
+
protected _error?: A_Error;
|
|
18
|
+
protected _params: _ParamsType;
|
|
19
|
+
constructor(params: _ParamsType);
|
|
20
|
+
/**
|
|
21
|
+
* If the operation succeeded, this will contain the result data. If the operation failed, this will be undefined.
|
|
22
|
+
*/
|
|
23
|
+
get result(): _ResultType | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* If the operation failed, this will contain an error object with details about the failure. If the operation succeeded, this will be undefined.
|
|
26
|
+
*/
|
|
27
|
+
get error(): A_Error | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Parameters used to execute the operation, e.g. definitionId and namespaceId for a saveDefinition operation.
|
|
30
|
+
*/
|
|
31
|
+
get params(): _ParamsType;
|
|
32
|
+
/**
|
|
33
|
+
* Marks the operation as completed successfully with the given result. This will set the `result` property and leave `error` as undefined.
|
|
34
|
+
*
|
|
35
|
+
* @param result
|
|
36
|
+
*/
|
|
37
|
+
complete(result: _ResultType): void;
|
|
38
|
+
/**
|
|
39
|
+
* Marks the operation as failed with the given error. This will set the `error` property and leave `result` as undefined.
|
|
40
|
+
*
|
|
41
|
+
* @param error
|
|
42
|
+
*/
|
|
43
|
+
fail(error: A_Error): void;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
interface IA_FrameStorage {
|
|
47
|
+
saveDefinitions(definitions: Array<A_FrameDefinition_Serialized>): Promise<A_FrameStorageSaveDefinitionOperationResult>;
|
|
48
|
+
loadDefinitions(namespaceId: string, definitionId: string): Promise<A_FrameStorageLoadDefinitionsOperationResult>;
|
|
49
|
+
destroyDefinitions(namespaceId: string, definitionId: string): Promise<A_FrameStorageDestroyDefinitionsOperationResult>;
|
|
50
|
+
saveNamespaces(namespaces: A_FrameNamespace_Serialized[]): Promise<A_FrameStorageSaveNamespaceOperationResult>;
|
|
51
|
+
loadNamespaces(): Promise<A_FrameStorageLoadNamespacesOperationResult>;
|
|
52
|
+
destroyNamespaces(namespaceId: string): Promise<A_FrameStorageDestroyNamespacesOperationResult>;
|
|
53
|
+
}
|
|
54
|
+
type A_FrameStorageSaveDefinitionOperationParams = {
|
|
55
|
+
records: A_FrameDefinition_Serialized[];
|
|
56
|
+
};
|
|
57
|
+
type A_FrameStorageSaveDefinitionOperationResult = {
|
|
58
|
+
saved: number;
|
|
59
|
+
};
|
|
60
|
+
type A_FrameStorageLoadDefinitionsOperationParams = {
|
|
61
|
+
namespaceId: string;
|
|
62
|
+
};
|
|
63
|
+
type A_FrameStorageLoadDefinitionsOperationResult = {
|
|
64
|
+
records?: A_FrameDefinition_Serialized[];
|
|
65
|
+
};
|
|
66
|
+
type A_FrameStorageDestroyDefinitionsOperationParams = {
|
|
67
|
+
namespaceId: string;
|
|
68
|
+
definitionId: string;
|
|
69
|
+
};
|
|
70
|
+
type A_FrameStorageDestroyDefinitionsOperationResult = {
|
|
71
|
+
records: Array<A_FrameDefinition_Serialized>;
|
|
72
|
+
};
|
|
73
|
+
type A_FrameStorageSaveDefinitionOperation = A_FrameStorageOperation<A_FrameStorageSaveDefinitionOperationParams, A_FrameStorageSaveDefinitionOperationResult>;
|
|
74
|
+
type A_FrameStorageLoadDefinitionsOperation = A_FrameStorageOperation<A_FrameStorageLoadDefinitionsOperationParams, A_FrameStorageLoadDefinitionsOperationResult>;
|
|
75
|
+
type A_FrameStorageDestroyDefinitionsOperation = A_FrameStorageOperation<A_FrameStorageDestroyDefinitionsOperationParams, A_FrameStorageDestroyDefinitionsOperationResult>;
|
|
76
|
+
type A_FrameStorageSaveNamespaceOperationParams = {
|
|
77
|
+
records: A_FrameNamespace_Serialized[];
|
|
78
|
+
};
|
|
79
|
+
type A_FrameStorageSaveNamespaceOperationResult = {
|
|
80
|
+
success: boolean;
|
|
81
|
+
};
|
|
82
|
+
type A_FrameStorageLoadNamespacesOperationParams = {
|
|
83
|
+
namespaces?: string[];
|
|
84
|
+
};
|
|
85
|
+
type A_FrameStorageLoadNamespacesOperationResult = {
|
|
86
|
+
records: A_FrameNamespace_Serialized[];
|
|
87
|
+
};
|
|
88
|
+
type A_FrameStorageDestroyNamespacesOperationParams = {
|
|
89
|
+
namespaces: string[];
|
|
90
|
+
};
|
|
91
|
+
type A_FrameStorageDestroyNamespacesOperationResult = {
|
|
92
|
+
success: boolean;
|
|
93
|
+
};
|
|
94
|
+
type A_FrameStorageSaveNamespaceOperation = A_FrameStorageOperation<A_FrameStorageSaveNamespaceOperationParams, A_FrameStorageSaveNamespaceOperationResult>;
|
|
95
|
+
type A_FrameStorageLoadNamespacesOperation = A_FrameStorageOperation<A_FrameStorageLoadNamespacesOperationParams, A_FrameStorageLoadNamespacesOperationResult>;
|
|
96
|
+
type A_FrameStorageDestroyNamespacesOperation = A_FrameStorageOperation<A_FrameStorageDestroyNamespacesOperationParams, A_FrameStorageDestroyNamespacesOperationResult>;
|
|
97
|
+
|
|
98
|
+
declare class A_FrameStorage extends A_Component {
|
|
99
|
+
saveDefinitions(definitions: Array<A_FrameDefinition_Serialized>): Promise<A_FrameStorageSaveDefinitionOperation>;
|
|
100
|
+
loadDefinitions(namespaceId: string, definitionId: string): Promise<A_FrameStorageLoadDefinitionsOperation>;
|
|
101
|
+
destroyDefinitions(namespaceId: string, definitionId: string): Promise<A_FrameStorageDestroyDefinitionsOperation>;
|
|
102
|
+
saveNamespaces(namespaces: A_FrameNamespace_Serialized[]): Promise<A_FrameStorageSaveNamespaceOperation>;
|
|
103
|
+
loadNamespaces(namespaceIds: string[]): Promise<A_FrameStorageLoadNamespacesOperation>;
|
|
104
|
+
destroyNamespaces(namespacesIds: string[]): Promise<A_FrameStorageDestroyNamespacesOperation>;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export { A_FrameStorage as A, type IA_FrameStorage as I, A_FrameContext as a, type A_FrameStorageSaveDefinitionOperation as b, type A_FrameStorageLoadDefinitionsOperation as c, type A_FrameStorageDestroyDefinitionsOperation as d, type A_FrameStorageSaveNamespaceOperation as e, type A_FrameStorageLoadNamespacesOperation as f, type A_FrameStorageDestroyNamespacesOperation as g, type A_FrameStorageDestroyDefinitionsOperationParams as h, type A_FrameStorageDestroyDefinitionsOperationResult as i, type A_FrameStorageDestroyNamespacesOperationParams as j, type A_FrameStorageDestroyNamespacesOperationResult as k, type A_FrameStorageLoadDefinitionsOperationParams as l, type A_FrameStorageLoadDefinitionsOperationResult as m, type A_FrameStorageLoadNamespacesOperationParams as n, type A_FrameStorageLoadNamespacesOperationResult as o, A_FrameStorageOperation as p, type A_FrameStorageSaveDefinitionOperationParams as q, type A_FrameStorageSaveDefinitionOperationResult as r, type A_FrameStorageSaveNamespaceOperationParams as s, type A_FrameStorageSaveNamespaceOperationResult as t };
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { A_Fragment, A_Error, A_Component } from '@adaas/a-concept';
|
|
2
|
+
import { A as A_FrameChannelRequest, c as A_Frame_CredentialResponse } from './A-FrameChannel.types-DQF-IiRq.js';
|
|
3
|
+
import { e as A_FrameNamespace_Serialized } from './A-FrameNamespace.entity-D3fZBGDx.js';
|
|
4
|
+
import { c as A_FrameDefinition_Serialized } from './A-FrameDefinition.entity-CAUOdEvU.js';
|
|
5
|
+
|
|
6
|
+
declare class A_FrameContext extends A_Fragment {
|
|
7
|
+
private credentials?;
|
|
8
|
+
constructor();
|
|
9
|
+
get encryptionKey(): string | undefined;
|
|
10
|
+
get serverVersion(): string | undefined;
|
|
11
|
+
isAuthenticated(): boolean;
|
|
12
|
+
setCredentials(credentials: A_FrameChannelRequest<A_Frame_CredentialResponse>): void;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
declare class A_FrameStorageOperation<_ParamsType = any, _ResultType = any> extends A_Fragment {
|
|
16
|
+
protected _result?: _ResultType;
|
|
17
|
+
protected _error?: A_Error;
|
|
18
|
+
protected _params: _ParamsType;
|
|
19
|
+
constructor(params: _ParamsType);
|
|
20
|
+
/**
|
|
21
|
+
* If the operation succeeded, this will contain the result data. If the operation failed, this will be undefined.
|
|
22
|
+
*/
|
|
23
|
+
get result(): _ResultType | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* If the operation failed, this will contain an error object with details about the failure. If the operation succeeded, this will be undefined.
|
|
26
|
+
*/
|
|
27
|
+
get error(): A_Error | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Parameters used to execute the operation, e.g. definitionId and namespaceId for a saveDefinition operation.
|
|
30
|
+
*/
|
|
31
|
+
get params(): _ParamsType;
|
|
32
|
+
/**
|
|
33
|
+
* Marks the operation as completed successfully with the given result. This will set the `result` property and leave `error` as undefined.
|
|
34
|
+
*
|
|
35
|
+
* @param result
|
|
36
|
+
*/
|
|
37
|
+
complete(result: _ResultType): void;
|
|
38
|
+
/**
|
|
39
|
+
* Marks the operation as failed with the given error. This will set the `error` property and leave `result` as undefined.
|
|
40
|
+
*
|
|
41
|
+
* @param error
|
|
42
|
+
*/
|
|
43
|
+
fail(error: A_Error): void;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
interface IA_FrameStorage {
|
|
47
|
+
saveDefinitions(definitions: Array<A_FrameDefinition_Serialized>): Promise<A_FrameStorageSaveDefinitionOperationResult>;
|
|
48
|
+
loadDefinitions(namespaceId: string, definitionId: string): Promise<A_FrameStorageLoadDefinitionsOperationResult>;
|
|
49
|
+
destroyDefinitions(namespaceId: string, definitionId: string): Promise<A_FrameStorageDestroyDefinitionsOperationResult>;
|
|
50
|
+
saveNamespaces(namespaces: A_FrameNamespace_Serialized[]): Promise<A_FrameStorageSaveNamespaceOperationResult>;
|
|
51
|
+
loadNamespaces(): Promise<A_FrameStorageLoadNamespacesOperationResult>;
|
|
52
|
+
destroyNamespaces(namespaceId: string): Promise<A_FrameStorageDestroyNamespacesOperationResult>;
|
|
53
|
+
}
|
|
54
|
+
type A_FrameStorageSaveDefinitionOperationParams = {
|
|
55
|
+
records: A_FrameDefinition_Serialized[];
|
|
56
|
+
};
|
|
57
|
+
type A_FrameStorageSaveDefinitionOperationResult = {
|
|
58
|
+
saved: number;
|
|
59
|
+
};
|
|
60
|
+
type A_FrameStorageLoadDefinitionsOperationParams = {
|
|
61
|
+
namespaceId: string;
|
|
62
|
+
};
|
|
63
|
+
type A_FrameStorageLoadDefinitionsOperationResult = {
|
|
64
|
+
records?: A_FrameDefinition_Serialized[];
|
|
65
|
+
};
|
|
66
|
+
type A_FrameStorageDestroyDefinitionsOperationParams = {
|
|
67
|
+
namespaceId: string;
|
|
68
|
+
definitionId: string;
|
|
69
|
+
};
|
|
70
|
+
type A_FrameStorageDestroyDefinitionsOperationResult = {
|
|
71
|
+
records: Array<A_FrameDefinition_Serialized>;
|
|
72
|
+
};
|
|
73
|
+
type A_FrameStorageSaveDefinitionOperation = A_FrameStorageOperation<A_FrameStorageSaveDefinitionOperationParams, A_FrameStorageSaveDefinitionOperationResult>;
|
|
74
|
+
type A_FrameStorageLoadDefinitionsOperation = A_FrameStorageOperation<A_FrameStorageLoadDefinitionsOperationParams, A_FrameStorageLoadDefinitionsOperationResult>;
|
|
75
|
+
type A_FrameStorageDestroyDefinitionsOperation = A_FrameStorageOperation<A_FrameStorageDestroyDefinitionsOperationParams, A_FrameStorageDestroyDefinitionsOperationResult>;
|
|
76
|
+
type A_FrameStorageSaveNamespaceOperationParams = {
|
|
77
|
+
records: A_FrameNamespace_Serialized[];
|
|
78
|
+
};
|
|
79
|
+
type A_FrameStorageSaveNamespaceOperationResult = {
|
|
80
|
+
success: boolean;
|
|
81
|
+
};
|
|
82
|
+
type A_FrameStorageLoadNamespacesOperationParams = {
|
|
83
|
+
namespaces?: string[];
|
|
84
|
+
};
|
|
85
|
+
type A_FrameStorageLoadNamespacesOperationResult = {
|
|
86
|
+
records: A_FrameNamespace_Serialized[];
|
|
87
|
+
};
|
|
88
|
+
type A_FrameStorageDestroyNamespacesOperationParams = {
|
|
89
|
+
namespaces: string[];
|
|
90
|
+
};
|
|
91
|
+
type A_FrameStorageDestroyNamespacesOperationResult = {
|
|
92
|
+
success: boolean;
|
|
93
|
+
};
|
|
94
|
+
type A_FrameStorageSaveNamespaceOperation = A_FrameStorageOperation<A_FrameStorageSaveNamespaceOperationParams, A_FrameStorageSaveNamespaceOperationResult>;
|
|
95
|
+
type A_FrameStorageLoadNamespacesOperation = A_FrameStorageOperation<A_FrameStorageLoadNamespacesOperationParams, A_FrameStorageLoadNamespacesOperationResult>;
|
|
96
|
+
type A_FrameStorageDestroyNamespacesOperation = A_FrameStorageOperation<A_FrameStorageDestroyNamespacesOperationParams, A_FrameStorageDestroyNamespacesOperationResult>;
|
|
97
|
+
|
|
98
|
+
declare class A_FrameStorage extends A_Component {
|
|
99
|
+
saveDefinitions(definitions: Array<A_FrameDefinition_Serialized>): Promise<A_FrameStorageSaveDefinitionOperation>;
|
|
100
|
+
loadDefinitions(namespaceId: string, definitionId: string): Promise<A_FrameStorageLoadDefinitionsOperation>;
|
|
101
|
+
destroyDefinitions(namespaceId: string, definitionId: string): Promise<A_FrameStorageDestroyDefinitionsOperation>;
|
|
102
|
+
saveNamespaces(namespaces: A_FrameNamespace_Serialized[]): Promise<A_FrameStorageSaveNamespaceOperation>;
|
|
103
|
+
loadNamespaces(namespaceIds: string[]): Promise<A_FrameStorageLoadNamespacesOperation>;
|
|
104
|
+
destroyNamespaces(namespacesIds: string[]): Promise<A_FrameStorageDestroyNamespacesOperation>;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export { A_FrameStorage as A, type IA_FrameStorage as I, A_FrameContext as a, type A_FrameStorageSaveDefinitionOperation as b, type A_FrameStorageLoadDefinitionsOperation as c, type A_FrameStorageDestroyDefinitionsOperation as d, type A_FrameStorageSaveNamespaceOperation as e, type A_FrameStorageLoadNamespacesOperation as f, type A_FrameStorageDestroyNamespacesOperation as g, type A_FrameStorageDestroyDefinitionsOperationParams as h, type A_FrameStorageDestroyDefinitionsOperationResult as i, type A_FrameStorageDestroyNamespacesOperationParams as j, type A_FrameStorageDestroyNamespacesOperationResult as k, type A_FrameStorageLoadDefinitionsOperationParams as l, type A_FrameStorageLoadDefinitionsOperationResult as m, type A_FrameStorageLoadNamespacesOperationParams as n, type A_FrameStorageLoadNamespacesOperationResult as o, A_FrameStorageOperation as p, type A_FrameStorageSaveDefinitionOperationParams as q, type A_FrameStorageSaveDefinitionOperationResult as r, type A_FrameStorageSaveNamespaceOperationParams as s, type A_FrameStorageSaveNamespaceOperationResult as t };
|