@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,329 @@
|
|
|
1
|
+
import { A_TYPES__Container_Constructor, A_TYPES__Entity_Constructor, A_TYPES__Component_Constructor, A_TYPES__Fragment_Constructor, A_Component, A_Container, A_Entity, A_Fragment, A_TYPES__Entity_Serialized, A_Dependency, A_Scope } from '@adaas/a-concept';
|
|
2
|
+
import { A as A_FrameNamespace } from './A-FrameNamespace.entity-rCm1AavP.mjs';
|
|
3
|
+
import { A_FrameVector } from './vector.mjs';
|
|
4
|
+
|
|
5
|
+
type A_FrameOptions = {
|
|
6
|
+
namespace?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
};
|
|
9
|
+
type A_FrameDefineOptions<T extends Record<string, any> = Record<string, any>> = {
|
|
10
|
+
/**
|
|
11
|
+
* The description of the Method or Class to be indexed. Uses for the better explanation and retrieval strategy
|
|
12
|
+
*/
|
|
13
|
+
description?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Define Namespace to separate and group together related components, entities and containers.
|
|
16
|
+
*
|
|
17
|
+
* [!] Namespace is a hard separation between groups.
|
|
18
|
+
*/
|
|
19
|
+
namespace?: string | A_FrameNamespace;
|
|
20
|
+
/***
|
|
21
|
+
* Optional parameters that can be used to store any additional information about the component, entity or container.
|
|
22
|
+
* This information can be used for the better retrieval strategy or for the better explanation of the component, entity or container.
|
|
23
|
+
*/
|
|
24
|
+
metadata?: T;
|
|
25
|
+
/**
|
|
26
|
+
* Can add a custom way of explaining the component, entity or container, so it can be used in the better retrieval strategy.
|
|
27
|
+
*/
|
|
28
|
+
examples?: string[];
|
|
29
|
+
};
|
|
30
|
+
type A_FrameMetaTarget = A_TYPES__Container_Constructor | A_TYPES__Entity_Constructor | A_TYPES__Component_Constructor | A_TYPES__Fragment_Constructor;
|
|
31
|
+
/**
|
|
32
|
+
* Indicates a type of Feature Define decorator
|
|
33
|
+
*/
|
|
34
|
+
type A_FrameDecoratorDescriptor = TypedPropertyDescriptor<(...args: any[]) => any> | TypedPropertyDescriptor<(...args: any[]) => any> | TypedPropertyDescriptor<(...args: any[]) => Promise<any>> | TypedPropertyDescriptor<(...args: any[]) => Promise<any>>;
|
|
35
|
+
/**
|
|
36
|
+
* Describes a target where Feature Define decorator can be applied
|
|
37
|
+
*
|
|
38
|
+
* [!] The feature can be defined on Container, Entity, Component or Command
|
|
39
|
+
*/
|
|
40
|
+
type A_FrameDecoratorTarget = A_FrameMetaTarget | A_Component | A_Container | A_Entity | A_Fragment;
|
|
41
|
+
/**
|
|
42
|
+
* Targets types that can be indexed
|
|
43
|
+
*/
|
|
44
|
+
declare enum A_FrameTargetType {
|
|
45
|
+
COMPONENT = "component",
|
|
46
|
+
ENTITY = "entity",
|
|
47
|
+
CONTAINER = "container",
|
|
48
|
+
FRAGMENT = "fragment",
|
|
49
|
+
METHOD = "method"
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* A type of Meta information stored by Index decorator
|
|
53
|
+
* This information is used by A-Context to build a proper index structure
|
|
54
|
+
*/
|
|
55
|
+
type A_FrameDecoratorMeta = {
|
|
56
|
+
/**
|
|
57
|
+
* Component name
|
|
58
|
+
*/
|
|
59
|
+
name: string;
|
|
60
|
+
/**
|
|
61
|
+
* Component description
|
|
62
|
+
*/
|
|
63
|
+
description?: string;
|
|
64
|
+
/**
|
|
65
|
+
* Type of the component
|
|
66
|
+
*/
|
|
67
|
+
type: A_FrameTargetType;
|
|
68
|
+
/**
|
|
69
|
+
* Namespace for the component
|
|
70
|
+
*/
|
|
71
|
+
namespace?: string | A_FrameNamespace;
|
|
72
|
+
/**
|
|
73
|
+
* Constructor reference
|
|
74
|
+
*/
|
|
75
|
+
constructor: A_FrameDecoratorTarget;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Indicates a type of Feature Define decorator
|
|
79
|
+
*/
|
|
80
|
+
type A_FrameNamespaceDecoratorDescriptor = TypedPropertyDescriptor<(...args: any[]) => any> | TypedPropertyDescriptor<(...args: any[]) => any> | TypedPropertyDescriptor<(...args: any[]) => Promise<any>> | TypedPropertyDescriptor<(...args: any[]) => Promise<any>>;
|
|
81
|
+
/**
|
|
82
|
+
* Describes a target where Feature Define decorator can be applied
|
|
83
|
+
*
|
|
84
|
+
* [!] The feature can be defined on Container, Entity, Component or Command
|
|
85
|
+
*/
|
|
86
|
+
type A_FrameNamespaceDecoratorTarget = A_Container | A_Entity | A_Component | A_Fragment | A_TYPES__Fragment_Constructor | A_TYPES__Component_Constructor | A_TYPES__Container_Constructor | A_TYPES__Entity_Constructor;
|
|
87
|
+
type A_FrameIndexMetaType = {
|
|
88
|
+
namespaces: string;
|
|
89
|
+
descriptions: string;
|
|
90
|
+
type: string;
|
|
91
|
+
name: string;
|
|
92
|
+
methods: Map<string, A_FrameIndexMetaMethodMeta>;
|
|
93
|
+
};
|
|
94
|
+
type A_FrameIndexMetaMethodMeta = {
|
|
95
|
+
name: string;
|
|
96
|
+
description?: string;
|
|
97
|
+
methodName: string;
|
|
98
|
+
};
|
|
99
|
+
type A_FrameNamespaceOptions = {
|
|
100
|
+
/**
|
|
101
|
+
* Must have UNIQUE name of the Namespace. This is used for the indexing and retrieval strategy. It should be descriptive and concise.
|
|
102
|
+
*/
|
|
103
|
+
name: string;
|
|
104
|
+
/**
|
|
105
|
+
* The description of the Namespace to be indexed. Uses for the better explanation and retrieval strategy
|
|
106
|
+
*/
|
|
107
|
+
description?: string;
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
type A_FrameDefinition_Init = {
|
|
111
|
+
/**
|
|
112
|
+
* Name of the Component/Fragment/Entity or method, provided automatically by the decorator.
|
|
113
|
+
*/
|
|
114
|
+
name: string;
|
|
115
|
+
/**
|
|
116
|
+
* Information where this Definition relates to Container/Component/Fragment/Entity
|
|
117
|
+
*/
|
|
118
|
+
dependency: string;
|
|
119
|
+
/**
|
|
120
|
+
* The Description that explains the purpose and functionality of the defined feature. This should provide enough context for someone to understand what the feature does and when to use it, without needing to read the source code.
|
|
121
|
+
*/
|
|
122
|
+
description?: string;
|
|
123
|
+
/**
|
|
124
|
+
* An optional metadata object that can contain any additional information about the defined feature. This can include things like parameter types for methods, expected props for components, or any other relevant details that don't fit into the description or source fields.
|
|
125
|
+
*/
|
|
126
|
+
namespace: A_FrameNamespace;
|
|
127
|
+
/**
|
|
128
|
+
* The source code or implementation details of the defined feature. For a component, this would be the component's code; for a method, it would be the method's implementation, etc.
|
|
129
|
+
*/
|
|
130
|
+
source: string;
|
|
131
|
+
/**
|
|
132
|
+
* The type of the defined feature, indicating whether it's a component, entity, container, fragment, or method. This is used for categorization and search filtering in the index.
|
|
133
|
+
*/
|
|
134
|
+
type: A_FrameTargetType;
|
|
135
|
+
/**
|
|
136
|
+
* Optional metadata object that can contain any additional information about the defined feature. This can include things like parameter types for methods, expected props for components, or any other relevant details that don't fit into the description or source fields.
|
|
137
|
+
*/
|
|
138
|
+
metadata?: Record<string, any>;
|
|
139
|
+
};
|
|
140
|
+
type A_FrameDefinition_Serialized = {
|
|
141
|
+
/**
|
|
142
|
+
* Name of the Component/Fragment/Entity or method, provided automatically by the decorator.
|
|
143
|
+
*/
|
|
144
|
+
name: string;
|
|
145
|
+
/**
|
|
146
|
+
* Information where this Definition relates to Container/Component/Fragment/Entity
|
|
147
|
+
*/
|
|
148
|
+
description?: string;
|
|
149
|
+
/**
|
|
150
|
+
* Namespace ID or name that this definition belongs to. This is used for grouping related definitions together in the index and can be used as a filter during search.
|
|
151
|
+
*/
|
|
152
|
+
source?: string;
|
|
153
|
+
/**
|
|
154
|
+
* A state indicating the last status of embeddings applied
|
|
155
|
+
*/
|
|
156
|
+
hash: string;
|
|
157
|
+
/**
|
|
158
|
+
* Type of the definition (component, entity, container, fragment or method)
|
|
159
|
+
*/
|
|
160
|
+
type: A_FrameTargetType;
|
|
161
|
+
/**
|
|
162
|
+
* Optional metadata object that can contain any additional information about the defined feature. This can include things like parameter types for methods, expected props for components, or any other relevant details that don't fit into the description or source fields.
|
|
163
|
+
*/
|
|
164
|
+
metadata?: Record<string, unknown>;
|
|
165
|
+
/**
|
|
166
|
+
* Namespace ID or name that this definition belongs to. This is used for grouping related definitions together in the index and can be used as a filter during search.
|
|
167
|
+
*/
|
|
168
|
+
namespace: string;
|
|
169
|
+
/**
|
|
170
|
+
* An Float32Array representing the embedding vector for this definition, if it has been generated and stored. This can be used for similarity search and retrieval in the index.
|
|
171
|
+
*/
|
|
172
|
+
embedding?: Float32Array;
|
|
173
|
+
/**
|
|
174
|
+
* ISO timestamp string of when the embedding was generated. This can be used for cache invalidation or tracking when the data was last updated.
|
|
175
|
+
*/
|
|
176
|
+
date: string;
|
|
177
|
+
/**
|
|
178
|
+
* Name of the model used in the request
|
|
179
|
+
*/
|
|
180
|
+
model: string;
|
|
181
|
+
/**
|
|
182
|
+
* ID of the server credential (API key) used during embedding
|
|
183
|
+
*/
|
|
184
|
+
credentialId: string;
|
|
185
|
+
/**
|
|
186
|
+
* Version of @adaas/a-frame that produced this record
|
|
187
|
+
*/
|
|
188
|
+
aFrameVersion: string;
|
|
189
|
+
/**
|
|
190
|
+
* Version of adaas-a-frame-mcp (embed-server) that produced the vector
|
|
191
|
+
*/
|
|
192
|
+
aFrameServerVersion: string;
|
|
193
|
+
} & A_TYPES__Entity_Serialized;
|
|
194
|
+
type A_FrameDefinition_EmbeddingMeta = {
|
|
195
|
+
model: string;
|
|
196
|
+
dimensions: number;
|
|
197
|
+
inputCount: number;
|
|
198
|
+
date: string;
|
|
199
|
+
credentialId: string;
|
|
200
|
+
aFrameVersion: string;
|
|
201
|
+
aFrameServerVersion: string;
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
declare class A_FrameDefinition extends A_Entity<A_FrameDefinition_Init, A_FrameDefinition_Serialized> {
|
|
205
|
+
static get concept(): string;
|
|
206
|
+
protected _name: string;
|
|
207
|
+
protected _type: A_FrameTargetType;
|
|
208
|
+
protected _source: string;
|
|
209
|
+
protected _dependency: string;
|
|
210
|
+
protected _description?: string;
|
|
211
|
+
protected _namespace: A_FrameNamespace;
|
|
212
|
+
protected _metadata?: Record<string, any>;
|
|
213
|
+
protected _vector?: A_FrameVector;
|
|
214
|
+
/**
|
|
215
|
+
* Common properties for all definition types (component, entity, container, fragment, method
|
|
216
|
+
*/
|
|
217
|
+
protected _hash: string;
|
|
218
|
+
protected _date?: string;
|
|
219
|
+
protected _model: string;
|
|
220
|
+
protected _credentialId: string;
|
|
221
|
+
protected _aFrameVersion: string;
|
|
222
|
+
protected _aFrameServerVersion: string;
|
|
223
|
+
/**
|
|
224
|
+
* Definition Identifier from ASEID unique name
|
|
225
|
+
*/
|
|
226
|
+
get id(): string;
|
|
227
|
+
/**
|
|
228
|
+
* The type of the definition target (component, entity, container, fragment, or method)
|
|
229
|
+
*/
|
|
230
|
+
get type(): A_FrameTargetType;
|
|
231
|
+
/**
|
|
232
|
+
* The name of the defined feature (e.g. "MyComponent", "myMethod", etc.)
|
|
233
|
+
*/
|
|
234
|
+
get name(): string;
|
|
235
|
+
/**
|
|
236
|
+
* Description that explains the purpose of the defined feature, its inputs/outputs, or any other relevant information.
|
|
237
|
+
*/
|
|
238
|
+
get description(): string | undefined;
|
|
239
|
+
get dependency(): A_Dependency;
|
|
240
|
+
/**
|
|
241
|
+
* The original source code string that implements the defined feature. This is the main content that gets embedded and indexed for search.
|
|
242
|
+
*/
|
|
243
|
+
get source(): string;
|
|
244
|
+
/**
|
|
245
|
+
* The vector embedding representing the definition's source and metadata. This is populated after embedding and is used for similarity search in the index.
|
|
246
|
+
*/
|
|
247
|
+
get vector(): A_FrameVector | undefined;
|
|
248
|
+
/**
|
|
249
|
+
* Namespace to which this definition belongs. Used for scoping search and organizing definitions. If not specified, defaults to the global namespace.
|
|
250
|
+
*/
|
|
251
|
+
get namespace(): A_FrameNamespace;
|
|
252
|
+
/**
|
|
253
|
+
* Additional metadata about the definition, stored as key-value pairs. This can include any relevant information that doesn't fit into the other properties but may be useful for search or organization.
|
|
254
|
+
*/
|
|
255
|
+
get metadata(): Record<string, any>;
|
|
256
|
+
/**
|
|
257
|
+
* A unique hash string computed from the definition's name, source, description, and metadata. This is used to identify identical definitions and avoid duplicates in the index.
|
|
258
|
+
*/
|
|
259
|
+
get hash(): string;
|
|
260
|
+
/**
|
|
261
|
+
* The timestamp (in milliseconds since epoch) when the definition was embedded. This is used for tracking the freshness of the embedding and can be useful for re-embedding stale definitions.
|
|
262
|
+
*/
|
|
263
|
+
get date(): string | undefined;
|
|
264
|
+
/**
|
|
265
|
+
* The name of the embedding model used to produce the vector. This is important for understanding the characteristics of the embedding and for debugging purposes.
|
|
266
|
+
*/
|
|
267
|
+
get model(): string;
|
|
268
|
+
/**
|
|
269
|
+
* ID of the server credential (API key) used during embedding. This is useful for auditing and debugging embedding operations, especially when multiple credentials are in use.
|
|
270
|
+
*/
|
|
271
|
+
get credentialId(): string | undefined;
|
|
272
|
+
/**
|
|
273
|
+
* Version of @adaas/a-frame that produced this record. This helps track compatibility and understand which version of the library was used to create the definition.
|
|
274
|
+
*/
|
|
275
|
+
get aFrameVersion(): string | undefined;
|
|
276
|
+
/**
|
|
277
|
+
* Version of a-frame-server that produced the vector. This is useful for debugging embedding issues and ensuring compatibility between the library and the embed server.
|
|
278
|
+
*/
|
|
279
|
+
get aFrameServerVersion(): string | undefined;
|
|
280
|
+
get isEmbed(): boolean;
|
|
281
|
+
/**
|
|
282
|
+
* Saves the definition to storage. The actual implementation of saving is handled by the A_FrameDefinitionFeatures.Save feature, which can be implemented by the environment (e.g. browser, Node.js) to persist the definition in a database, file system, or other storage mechanism.
|
|
283
|
+
*
|
|
284
|
+
* @param scope
|
|
285
|
+
* @returns
|
|
286
|
+
*/
|
|
287
|
+
save(scope?: A_Scope): Promise<void> | void;
|
|
288
|
+
/**
|
|
289
|
+
* Deletes the definition from storage. The actual implementation of deletion is handled by the A_FrameDefinitionFeatures.Destroy feature, which can be implemented by the environment to remove the definition from the database, file system, or other storage mechanism.
|
|
290
|
+
*
|
|
291
|
+
* @param scope
|
|
292
|
+
* @returns
|
|
293
|
+
*/
|
|
294
|
+
destroy(scope?: A_Scope): Promise<void> | void;
|
|
295
|
+
/**
|
|
296
|
+
* Loads the definition from storage. The actual implementation of loading is handled by the A_FrameDefinitionFeatures.Load feature, which can be implemented by the environment to retrieve the definition from the database, file system, or other storage mechanism and populate the entity's properties accordingly.
|
|
297
|
+
*
|
|
298
|
+
* @param scope
|
|
299
|
+
* @returns
|
|
300
|
+
*/
|
|
301
|
+
load(scope?: A_Scope): Promise<void> | void;
|
|
302
|
+
/**
|
|
303
|
+
* 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.
|
|
304
|
+
*
|
|
305
|
+
* @param updates
|
|
306
|
+
*/
|
|
307
|
+
update(updates: Partial<Pick<A_FrameDefinition, 'source' | 'description' | 'metadata' | 'namespace'>>): void;
|
|
308
|
+
/**
|
|
309
|
+
* Generates the embedding for the definition's source and metadata.
|
|
310
|
+
*
|
|
311
|
+
* @param scope
|
|
312
|
+
* @returns
|
|
313
|
+
*/
|
|
314
|
+
embed(scope?: A_Scope): Promise<void> | void;
|
|
315
|
+
fromNew(newEntity: A_FrameDefinition_Init): void;
|
|
316
|
+
fromJSON(serialized: A_FrameDefinition_Serialized): void;
|
|
317
|
+
toJSON(): A_FrameDefinition_Serialized;
|
|
318
|
+
/** Populate the vector from a pre-existing storage record */
|
|
319
|
+
/** Populate the vector from a freshly-fetched embedding */
|
|
320
|
+
hydrateFromEmbedding(embedding: Float32Array, meta?: A_FrameDefinition_EmbeddingMeta): void;
|
|
321
|
+
/**
|
|
322
|
+
* Build the text string sent to the embedding model.
|
|
323
|
+
* Concatenates name + description + source so the resulting
|
|
324
|
+
* vector captures both intent and implementation.
|
|
325
|
+
*/
|
|
326
|
+
toString(): string;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
export { A_FrameDefinition as A, type A_FrameDefinition_EmbeddingMeta as a, type A_FrameDefinition_Init as b, type A_FrameDefinition_Serialized as c, type A_FrameDefineOptions as d, type A_FrameNamespaceOptions as e, type A_FrameDecoratorTarget as f, type A_FrameDecoratorDescriptor as g, type A_FrameDecoratorMeta as h, type A_FrameIndexMetaMethodMeta as i, type A_FrameIndexMetaType as j, type A_FrameMetaTarget as k, type A_FrameNamespaceDecoratorDescriptor as l, type A_FrameNamespaceDecoratorTarget as m, type A_FrameOptions as n, A_FrameTargetType as o };
|
|
@@ -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 };
|