@ibgib/web-gib 0.0.1
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/.ibgibignore +30 -0
- package/.vscode/ibgib-snippets.code-snippets +309 -0
- package/.vscode/launch.json +25 -0
- package/.vscode/settings.json +68 -0
- package/.vscode/tasks.json +38 -0
- package/CHANGELOG.md +427 -0
- package/README.md +66 -0
- package/dist/agent-texts/common-agent-texts.d.mts +14 -0
- package/dist/agent-texts/common-agent-texts.d.mts.map +1 -0
- package/dist/agent-texts/common-agent-texts.mjs +51 -0
- package/dist/agent-texts/common-agent-texts.mjs.map +1 -0
- package/dist/agent-texts/primary-agent-texts.d.mts +16 -0
- package/dist/agent-texts/primary-agent-texts.d.mts.map +1 -0
- package/dist/agent-texts/primary-agent-texts.mjs +27 -0
- package/dist/agent-texts/primary-agent-texts.mjs.map +1 -0
- package/dist/agent-texts/project-agent-texts.d.mts +8 -0
- package/dist/agent-texts/project-agent-texts.d.mts.map +1 -0
- package/dist/agent-texts/project-agent-texts.mjs +29 -0
- package/dist/agent-texts/project-agent-texts.mjs.map +1 -0
- package/dist/agent-texts/project-child-text-agent-texts.d.mts +5 -0
- package/dist/agent-texts/project-child-text-agent-texts.d.mts.map +1 -0
- package/dist/agent-texts/project-child-text-agent-texts.mjs +26 -0
- package/dist/agent-texts/project-child-text-agent-texts.mjs.map +1 -0
- package/dist/agent-texts/projects-agent-texts.d.mts +4 -0
- package/dist/agent-texts/projects-agent-texts.d.mts.map +1 -0
- package/dist/agent-texts/projects-agent-texts.mjs +15 -0
- package/dist/agent-texts/projects-agent-texts.mjs.map +1 -0
- package/dist/agent-texts/raw-agent-texts.d.mts +4 -0
- package/dist/agent-texts/raw-agent-texts.d.mts.map +1 -0
- package/dist/agent-texts/raw-agent-texts.mjs +17 -0
- package/dist/agent-texts/raw-agent-texts.mjs.map +1 -0
- package/dist/agent-texts/text-editor-agent-texts.d.mts +6 -0
- package/dist/agent-texts/text-editor-agent-texts.d.mts.map +1 -0
- package/dist/agent-texts/text-editor-agent-texts.mjs +19 -0
- package/dist/agent-texts/text-editor-agent-texts.mjs.map +1 -0
- package/dist/api/api-constants.d.mts +9 -0
- package/dist/api/api-constants.d.mts.map +1 -0
- package/dist/api/api-constants.mjs +9 -0
- package/dist/api/api-constants.mjs.map +1 -0
- package/dist/api/api-index.d.mts +10 -0
- package/dist/api/api-index.d.mts.map +1 -0
- package/dist/api/api-index.mjs +121 -0
- package/dist/api/api-index.mjs.map +1 -0
- package/dist/api/api-types.d.mts +36 -0
- package/dist/api/api-types.d.mts.map +1 -0
- package/dist/api/api-types.mjs +2 -0
- package/dist/api/api-types.mjs.map +1 -0
- package/dist/api/commands/chat/chat-index.d.mts +3 -0
- package/dist/api/commands/chat/chat-index.d.mts.map +1 -0
- package/dist/api/commands/chat/chat-index.mjs +9 -0
- package/dist/api/commands/chat/chat-index.mjs.map +1 -0
- package/dist/api/commands/chat/get-context-info.d.mts +71 -0
- package/dist/api/commands/chat/get-context-info.d.mts.map +1 -0
- package/dist/api/commands/chat/get-context-info.mjs +130 -0
- package/dist/api/commands/chat/get-context-info.mjs.map +1 -0
- package/dist/api/commands/chat/hello-world.d.mts +63 -0
- package/dist/api/commands/chat/hello-world.d.mts.map +1 -0
- package/dist/api/commands/chat/hello-world.mjs +132 -0
- package/dist/api/commands/chat/hello-world.mjs.map +1 -0
- package/dist/api/commands/chat/tell-user.d.mts +57 -0
- package/dist/api/commands/chat/tell-user.d.mts.map +1 -0
- package/dist/api/commands/chat/tell-user.mjs +199 -0
- package/dist/api/commands/chat/tell-user.mjs.map +1 -0
- package/dist/api/commands/command-constants.d.mts +22 -0
- package/dist/api/commands/command-constants.d.mts.map +1 -0
- package/dist/api/commands/command-constants.mjs +17 -0
- package/dist/api/commands/command-constants.mjs.map +1 -0
- package/dist/api/commands/command-helpers.d.mts +47 -0
- package/dist/api/commands/command-helpers.d.mts.map +1 -0
- package/dist/api/commands/command-helpers.mjs +76 -0
- package/dist/api/commands/command-helpers.mjs.map +1 -0
- package/dist/api/commands/command-service-v1.d.mts +28 -0
- package/dist/api/commands/command-service-v1.d.mts.map +1 -0
- package/dist/api/commands/command-service-v1.mjs +122 -0
- package/dist/api/commands/command-service-v1.mjs.map +1 -0
- package/dist/api/commands/command-service.respec.d.mts +7 -0
- package/dist/api/commands/command-service.respec.d.mts.map +1 -0
- package/dist/api/commands/command-service.respec.mjs +66 -0
- package/dist/api/commands/command-service.respec.mjs.map +1 -0
- package/dist/api/commands/command-types.d.mts +48 -0
- package/dist/api/commands/command-types.d.mts.map +1 -0
- package/dist/api/commands/command-types.mjs +12 -0
- package/dist/api/commands/command-types.mjs.map +1 -0
- package/dist/api/commands/ibgib/get-ibgibs.d.mts +94 -0
- package/dist/api/commands/ibgib/get-ibgibs.d.mts.map +1 -0
- package/dist/api/commands/ibgib/get-ibgibs.mjs +219 -0
- package/dist/api/commands/ibgib/get-ibgibs.mjs.map +1 -0
- package/dist/api/commands/ibgib/ibgib-index.d.mts +3 -0
- package/dist/api/commands/ibgib/ibgib-index.d.mts.map +1 -0
- package/dist/api/commands/ibgib/ibgib-index.mjs +7 -0
- package/dist/api/commands/ibgib/ibgib-index.mjs.map +1 -0
- package/dist/api/commands/ibgib/mut8-ibgib.d.mts +135 -0
- package/dist/api/commands/ibgib/mut8-ibgib.d.mts.map +1 -0
- package/dist/api/commands/ibgib/mut8-ibgib.mjs +318 -0
- package/dist/api/commands/ibgib/mut8-ibgib.mjs.map +1 -0
- package/dist/api/commands/templates/api-function-info.template.d.mts +73 -0
- package/dist/api/commands/templates/api-function-info.template.d.mts.map +1 -0
- package/dist/api/commands/templates/api-function-info.template.mjs +161 -0
- package/dist/api/commands/templates/api-function-info.template.mjs.map +1 -0
- package/dist/api/commands/text/text-edit.d.mts +54 -0
- package/dist/api/commands/text/text-edit.d.mts.map +1 -0
- package/dist/api/commands/text/text-edit.mjs +170 -0
- package/dist/api/commands/text/text-edit.mjs.map +1 -0
- package/dist/api/commands/text/text-index.d.mts +3 -0
- package/dist/api/commands/text/text-index.d.mts.map +1 -0
- package/dist/api/commands/text/text-index.mjs +5 -0
- package/dist/api/commands/text/text-index.mjs.map +1 -0
- package/dist/api/commands/ui/ui-index.d.mts +3 -0
- package/dist/api/commands/ui/ui-index.d.mts.map +1 -0
- package/dist/api/commands/ui/ui-index.mjs +5 -0
- package/dist/api/commands/ui/ui-index.mjs.map +1 -0
- package/dist/api/commands/ui/update-css-variables.d.mts +48 -0
- package/dist/api/commands/ui/update-css-variables.d.mts.map +1 -0
- package/dist/api/commands/ui/update-css-variables.mjs +145 -0
- package/dist/api/commands/ui/update-css-variables.mjs.map +1 -0
- package/dist/api/function-infos.web.d.mts +15 -0
- package/dist/api/function-infos.web.d.mts.map +1 -0
- package/dist/api/function-infos.web.mjs +63 -0
- package/dist/api/function-infos.web.mjs.map +1 -0
- package/dist/assumptions.respec.d.mts +2 -0
- package/dist/assumptions.respec.d.mts.map +1 -0
- package/dist/assumptions.respec.mjs +41 -0
- package/dist/assumptions.respec.mjs.map +1 -0
- package/dist/common/project/project-constants.d.mts +38 -0
- package/dist/common/project/project-constants.d.mts.map +1 -0
- package/dist/common/project/project-constants.mjs +71 -0
- package/dist/common/project/project-constants.mjs.map +1 -0
- package/dist/common/project/project-helper.d.mts +127 -0
- package/dist/common/project/project-helper.d.mts.map +1 -0
- package/dist/common/project/project-helper.mjs +683 -0
- package/dist/common/project/project-helper.mjs.map +1 -0
- package/dist/common/project/project-types.d.mts +91 -0
- package/dist/common/project/project-types.d.mts.map +1 -0
- package/dist/common/project/project-types.mjs +31 -0
- package/dist/common/project/project-types.mjs.map +1 -0
- package/dist/common/prompt-functions.web.d.mts +90 -0
- package/dist/common/prompt-functions.web.d.mts.map +1 -0
- package/dist/common/prompt-functions.web.mjs +426 -0
- package/dist/common/prompt-functions.web.mjs.map +1 -0
- package/dist/common/settings/settings-constants.d.mts +33 -0
- package/dist/common/settings/settings-constants.d.mts.map +1 -0
- package/dist/common/settings/settings-constants.mjs +54 -0
- package/dist/common/settings/settings-constants.mjs.map +1 -0
- package/dist/common/settings/settings-helpers.d.mts +59 -0
- package/dist/common/settings/settings-helpers.d.mts.map +1 -0
- package/dist/common/settings/settings-helpers.mjs +253 -0
- package/dist/common/settings/settings-helpers.mjs.map +1 -0
- package/dist/common/settings/settings-types.d.mts +118 -0
- package/dist/common/settings/settings-types.d.mts.map +1 -0
- package/dist/common/settings/settings-types.mjs +13 -0
- package/dist/common/settings/settings-types.mjs.map +1 -0
- package/dist/constants.d.mts +34 -0
- package/dist/constants.d.mts.map +1 -0
- package/dist/constants.mjs +35 -0
- package/dist/constants.mjs.map +1 -0
- package/dist/foo.d.mts +2 -0
- package/dist/foo.d.mts.map +1 -0
- package/dist/foo.mjs +19 -0
- package/dist/foo.mjs.map +1 -0
- package/dist/helpers.d.mts +137 -0
- package/dist/helpers.d.mts.map +1 -0
- package/dist/helpers.mjs +514 -0
- package/dist/helpers.mjs.map +1 -0
- package/dist/helpers.web.d.mts +324 -0
- package/dist/helpers.web.d.mts.map +1 -0
- package/dist/helpers.web.mjs +1133 -0
- package/dist/helpers.web.mjs.map +1 -0
- package/dist/helpers.web.respec.d.mts +2 -0
- package/dist/helpers.web.respec.d.mts.map +1 -0
- package/dist/helpers.web.respec.mjs +12 -0
- package/dist/helpers.web.respec.mjs.map +1 -0
- package/dist/index.d.mts +2 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +3 -0
- package/dist/index.mjs.map +1 -0
- package/dist/respec-gib.node.d.mts +2 -0
- package/dist/respec-gib.node.d.mts.map +1 -0
- package/dist/respec-gib.node.mjs +211 -0
- package/dist/respec-gib.node.mjs.map +1 -0
- package/dist/spec-helper.node.respec.d.mts +13 -0
- package/dist/spec-helper.node.respec.d.mts.map +1 -0
- package/dist/spec-helper.node.respec.mjs +50 -0
- package/dist/spec-helper.node.respec.mjs.map +1 -0
- package/dist/storage/storage-helpers.web.d.mts +108 -0
- package/dist/storage/storage-helpers.web.d.mts.map +1 -0
- package/dist/storage/storage-helpers.web.mjs +757 -0
- package/dist/storage/storage-helpers.web.mjs.map +1 -0
- package/dist/storage/storage-types.web.d.mts +30 -0
- package/dist/storage/storage-types.web.d.mts.map +1 -0
- package/dist/storage/storage-types.web.mjs +2 -0
- package/dist/storage/storage-types.web.mjs.map +1 -0
- package/dist/types.web.d.mts +42 -0
- package/dist/types.web.d.mts.map +1 -0
- package/dist/types.web.mjs +2 -0
- package/dist/types.web.mjs.map +1 -0
- package/dist/ui/component/component-types.d.mts +225 -0
- package/dist/ui/component/component-types.d.mts.map +1 -0
- package/dist/ui/component/component-types.mjs +2 -0
- package/dist/ui/component/component-types.mjs.map +1 -0
- package/dist/ui/component/ibgib-component-service.d.mts +70 -0
- package/dist/ui/component/ibgib-component-service.d.mts.map +1 -0
- package/dist/ui/component/ibgib-component-service.mjs +201 -0
- package/dist/ui/component/ibgib-component-service.mjs.map +1 -0
- package/dist/ui/component/ibgib-dynamic-component-bases.d.mts +338 -0
- package/dist/ui/component/ibgib-dynamic-component-bases.d.mts.map +1 -0
- package/dist/ui/component/ibgib-dynamic-component-bases.mjs +1304 -0
- package/dist/ui/component/ibgib-dynamic-component-bases.mjs.map +1 -0
- package/dist/ui/ui-constants.d.mts +12 -0
- package/dist/ui/ui-constants.d.mts.map +1 -0
- package/dist/ui/ui-constants.mjs +93 -0
- package/dist/ui/ui-constants.mjs.map +1 -0
- package/dist/ui/ui-helpers.d.mts +42 -0
- package/dist/ui/ui-helpers.d.mts.map +1 -0
- package/dist/ui/ui-helpers.mjs +198 -0
- package/dist/ui/ui-helpers.mjs.map +1 -0
- package/dist/ui/ui-types.d.mts +13 -0
- package/dist/ui/ui-types.d.mts.map +1 -0
- package/dist/ui/ui-types.mjs +2 -0
- package/dist/ui/ui-types.mjs.map +1 -0
- package/dist/witness/agent/agent-constants.d.mts +97 -0
- package/dist/witness/agent/agent-constants.d.mts.map +1 -0
- package/dist/witness/agent/agent-constants.mjs +98 -0
- package/dist/witness/agent/agent-constants.mjs.map +1 -0
- package/dist/witness/agent/agent-helpers.d.mts +106 -0
- package/dist/witness/agent/agent-helpers.d.mts.map +1 -0
- package/dist/witness/agent/agent-helpers.mjs +601 -0
- package/dist/witness/agent/agent-helpers.mjs.map +1 -0
- package/dist/witness/agent/agent-one-file.app.d.mts +2 -0
- package/dist/witness/agent/agent-one-file.app.d.mts.map +1 -0
- package/dist/witness/agent/agent-one-file.app.mjs +8 -0
- package/dist/witness/agent/agent-one-file.app.mjs.map +1 -0
- package/dist/witness/agent/agent-one-file.d.mts +478 -0
- package/dist/witness/agent/agent-one-file.d.mts.map +1 -0
- package/dist/witness/agent/agent-one-file.mjs +1462 -0
- package/dist/witness/agent/agent-one-file.mjs.map +1 -0
- package/dist/witness/agent/agent-types.d.mts +83 -0
- package/dist/witness/agent/agent-types.d.mts.map +1 -0
- package/dist/witness/agent/agent-types.mjs +2 -0
- package/dist/witness/agent/agent-types.mjs.map +1 -0
- package/dist/witness/agent/agents-service-v1.d.mts +99 -0
- package/dist/witness/agent/agents-service-v1.d.mts.map +1 -0
- package/dist/witness/agent/agents-service-v1.mjs +453 -0
- package/dist/witness/agent/agents-service-v1.mjs.map +1 -0
- package/dist/witness/agent/function-info/function-info-one-file.d.mts +192 -0
- package/dist/witness/agent/function-info/function-info-one-file.d.mts.map +1 -0
- package/dist/witness/agent/function-info/function-info-one-file.mjs +192 -0
- package/dist/witness/agent/function-info/function-info-one-file.mjs.map +1 -0
- package/dist/witness/agent/gemini/agent-witness-gemini-v1.d.mts +51 -0
- package/dist/witness/agent/gemini/agent-witness-gemini-v1.d.mts.map +1 -0
- package/dist/witness/agent/gemini/agent-witness-gemini-v1.mjs +928 -0
- package/dist/witness/agent/gemini/agent-witness-gemini-v1.mjs.map +1 -0
- package/dist/witness/agent/gemini/gemini-agent-factory.d.mts +27 -0
- package/dist/witness/agent/gemini/gemini-agent-factory.d.mts.map +1 -0
- package/dist/witness/agent/gemini/gemini-agent-factory.mjs +144 -0
- package/dist/witness/agent/gemini/gemini-agent-factory.mjs.map +1 -0
- package/dist/witness/agent/gemini/gemini-constants.d.mts +36 -0
- package/dist/witness/agent/gemini/gemini-constants.d.mts.map +1 -0
- package/dist/witness/agent/gemini/gemini-constants.mjs +47 -0
- package/dist/witness/agent/gemini/gemini-constants.mjs.map +1 -0
- package/dist/witness/agent/gemini/gemini-helpers.d.mts +58 -0
- package/dist/witness/agent/gemini/gemini-helpers.d.mts.map +1 -0
- package/dist/witness/agent/gemini/gemini-helpers.mjs +210 -0
- package/dist/witness/agent/gemini/gemini-helpers.mjs.map +1 -0
- package/dist/witness/agent/gemini/gemini-types.d.mts +82 -0
- package/dist/witness/agent/gemini/gemini-types.d.mts.map +1 -0
- package/dist/witness/agent/gemini/gemini-types.mjs +3 -0
- package/dist/witness/agent/gemini/gemini-types.mjs.map +1 -0
- package/dist/witness/live-proxy-ibgib/live-proxy-ibgib-one-file.d.mts +136 -0
- package/dist/witness/live-proxy-ibgib/live-proxy-ibgib-one-file.d.mts.map +1 -0
- package/dist/witness/live-proxy-ibgib/live-proxy-ibgib-one-file.mjs +334 -0
- package/dist/witness/live-proxy-ibgib/live-proxy-ibgib-one-file.mjs.map +1 -0
- package/dist/witness/space/metaspace/metaspace-webspace/metaspace-webspace-helper.d.mts +35 -0
- package/dist/witness/space/metaspace/metaspace-webspace/metaspace-webspace-helper.d.mts.map +1 -0
- package/dist/witness/space/metaspace/metaspace-webspace/metaspace-webspace-helper.mjs +267 -0
- package/dist/witness/space/metaspace/metaspace-webspace/metaspace-webspace-helper.mjs.map +1 -0
- package/dist/witness/space/metaspace/metaspace-webspace/metaspace-webspace.d.mts +134 -0
- package/dist/witness/space/metaspace/metaspace-webspace/metaspace-webspace.d.mts.map +1 -0
- package/dist/witness/space/metaspace/metaspace-webspace/metaspace-webspace.mjs +389 -0
- package/dist/witness/space/metaspace/metaspace-webspace/metaspace-webspace.mjs.map +1 -0
- package/dist/witness/space/web-filesystem-space/web-filesystem-space-constants.d.mts +2 -0
- package/dist/witness/space/web-filesystem-space/web-filesystem-space-constants.d.mts.map +1 -0
- package/dist/witness/space/web-filesystem-space/web-filesystem-space-constants.mjs +2 -0
- package/dist/witness/space/web-filesystem-space/web-filesystem-space-constants.mjs.map +1 -0
- package/dist/witness/space/web-filesystem-space/web-filesystem-space-helper.d.mts +104 -0
- package/dist/witness/space/web-filesystem-space/web-filesystem-space-helper.d.mts.map +1 -0
- package/dist/witness/space/web-filesystem-space/web-filesystem-space-helper.mjs +457 -0
- package/dist/witness/space/web-filesystem-space/web-filesystem-space-helper.mjs.map +1 -0
- package/dist/witness/space/web-filesystem-space/web-filesystem-space-types.d.mts +93 -0
- package/dist/witness/space/web-filesystem-space/web-filesystem-space-types.d.mts.map +1 -0
- package/dist/witness/space/web-filesystem-space/web-filesystem-space-types.mjs +98 -0
- package/dist/witness/space/web-filesystem-space/web-filesystem-space-types.mjs.map +1 -0
- package/dist/witness/space/web-filesystem-space/web-filesystem-space-v1.d.mts +73 -0
- package/dist/witness/space/web-filesystem-space/web-filesystem-space-v1.d.mts.map +1 -0
- package/dist/witness/space/web-filesystem-space/web-filesystem-space-v1.mjs +650 -0
- package/dist/witness/space/web-filesystem-space/web-filesystem-space-v1.mjs.map +1 -0
- package/generate-version-file.js +29 -0
- package/package.json +60 -0
- package/src/agent-texts/common-agent-texts.mts +61 -0
- package/src/agent-texts/primary-agent-texts.mts +32 -0
- package/src/agent-texts/project-agent-texts.mts +29 -0
- package/src/agent-texts/project-child-text-agent-texts.mts +30 -0
- package/src/agent-texts/projects-agent-texts.mts +17 -0
- package/src/agent-texts/raw-agent-texts.mts +18 -0
- package/src/agent-texts/text-editor-agent-texts.mts +20 -0
- package/src/api/api-constants.mts +8 -0
- package/src/api/api-index.mts +110 -0
- package/src/api/api-types.mts +36 -0
- package/src/api/commands/chat/chat-index.mts +10 -0
- package/src/api/commands/chat/get-context-info.mts +196 -0
- package/src/api/commands/chat/hello-world.mts +183 -0
- package/src/api/commands/chat/tell-user.mts +241 -0
- package/src/api/commands/command-constants.mts +17 -0
- package/src/api/commands/command-helpers.mts +105 -0
- package/src/api/commands/command-service-v1.mts +136 -0
- package/src/api/commands/command-service.respec.mts +72 -0
- package/src/api/commands/command-types.mts +71 -0
- package/src/api/commands/ibgib/get-ibgibs.mts +269 -0
- package/src/api/commands/ibgib/ibgib-index.mts +8 -0
- package/src/api/commands/ibgib/mut8-ibgib.mts +418 -0
- package/src/api/commands/templates/api-function-info.template.mts +212 -0
- package/src/api/commands/text/text-edit.mts +217 -0
- package/src/api/commands/text/text-index.mts +6 -0
- package/src/api/commands/ui/ui-index.mts +6 -0
- package/src/api/commands/ui/update-css-variables.mts +187 -0
- package/src/api/function-infos.web.mts +66 -0
- package/src/assets/fullscreen-dialog.html +18 -0
- package/src/assumptions.respec.mts +51 -0
- package/src/common/project/project-constants.mts +83 -0
- package/src/common/project/project-helper.mts +730 -0
- package/src/common/project/project-types.mts +121 -0
- package/src/common/prompt-functions.web.mts +447 -0
- package/src/common/settings/settings-constants.mts +72 -0
- package/src/common/settings/settings-helpers.mts +280 -0
- package/src/common/settings/settings-types.mts +137 -0
- package/src/constants.mts +39 -0
- package/src/foo.mts +13 -0
- package/src/helpers.mts +574 -0
- package/src/helpers.web.mts +1277 -0
- package/src/helpers.web.respec.mts +16 -0
- package/src/index.mts +3 -0
- package/src/respec-gib.node.mts +199 -0
- package/src/spec-helper.node.respec.mts +50 -0
- package/src/storage/storage-helpers.web.mts +728 -0
- package/src/storage/storage-types.web.mts +29 -0
- package/src/types.web.mts +42 -0
- package/src/ui/component/component-types.mts +241 -0
- package/src/ui/component/ibgib-component-service.mts +201 -0
- package/src/ui/component/ibgib-dynamic-component-bases.mts +1369 -0
- package/src/ui/ui-constants.mts +101 -0
- package/src/ui/ui-helpers.mts +222 -0
- package/src/ui/ui-types.mts +11 -0
- package/src/witness/agent/agent-constants.mts +122 -0
- package/src/witness/agent/agent-helpers.mts +681 -0
- package/src/witness/agent/agent-one-file.app.mts +8 -0
- package/src/witness/agent/agent-one-file.mts +1665 -0
- package/src/witness/agent/agent-types.mts +92 -0
- package/src/witness/agent/agents-service-v1.mts +482 -0
- package/src/witness/agent/function-info/function-info-one-file.mts +362 -0
- package/src/witness/agent/gemini/agent-witness-gemini-v1.mts +910 -0
- package/src/witness/agent/gemini/gemini-agent-factory.mts +135 -0
- package/src/witness/agent/gemini/gemini-constants.mts +79 -0
- package/src/witness/agent/gemini/gemini-helpers.mts +216 -0
- package/src/witness/agent/gemini/gemini-types.mts +88 -0
- package/src/witness/live-proxy-ibgib/live-proxy-ibgib-one-file.mts +321 -0
- package/src/witness/space/metaspace/metaspace-webspace/metaspace-webspace-helper.mts +290 -0
- package/src/witness/space/metaspace/metaspace-webspace/metaspace-webspace.mts +407 -0
- package/src/witness/space/web-filesystem-space/web-filesystem-space-constants.mts +1 -0
- package/src/witness/space/web-filesystem-space/web-filesystem-space-helper.mts +491 -0
- package/src/witness/space/web-filesystem-space/web-filesystem-space-types.mts +172 -0
- package/src/witness/space/web-filesystem-space/web-filesystem-space-v1.mts +670 -0
- package/tsconfig.json +17 -0
- package/tsconfig.test.json +10 -0
|
@@ -0,0 +1,407 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module metaspace-webspace driven by a web indexeddb storage substrate
|
|
3
|
+
*
|
|
4
|
+
* a metaspace is a space of spaces. it adds/removes spaces and does
|
|
5
|
+
* inter-spatial composition related things. it's similar to what people think
|
|
6
|
+
* of in terms of a node in a p2p network.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { extractErrorMsg } from '@ibgib/helper-gib/dist/helpers/utils-helper.mjs';
|
|
10
|
+
import { IbGibAddr } from '@ibgib/ts-gib/dist/types.mjs';
|
|
11
|
+
import { IbGibSpaceAny } from '@ibgib/core-gib/dist/witness/space/space-base-v1.mjs';
|
|
12
|
+
import { IbGibCacheService } from '@ibgib/core-gib/dist/common/cache/cache-types.mjs';
|
|
13
|
+
import { MetaspaceBase } from '@ibgib/core-gib/dist/witness/space/metaspace/metaspace-base.mjs';
|
|
14
|
+
import { MetaspaceFactory, MetaspaceInitializeOptions } from '@ibgib/core-gib/dist/witness/space/metaspace/metaspace-types.mjs';
|
|
15
|
+
|
|
16
|
+
import { GLOBAL_LOG_A_LOT, GLOBAL_TIMER_NAME, } from '../../../../constants.mjs';
|
|
17
|
+
import { fnCreateNewLocalSpace, fnDtoToSpace_webFilesystem } from './metaspace-webspace-helper.mjs';
|
|
18
|
+
import { WebFilesystemSpace_V1 } from '../../web-filesystem-space/web-filesystem-space-v1.mjs';
|
|
19
|
+
// import { storageCreateStoreIfNotExist, initializeStorage, storageDBExists, } from '../../../../helpers.web.mjs';
|
|
20
|
+
import { getIbGibAddr } from '@ibgib/ts-gib/dist/helper.mjs';
|
|
21
|
+
import { storageCreateStoreIfNotExist } from '../../../../storage/storage-helpers.web.mjs';
|
|
22
|
+
import { SpaceId } from '@ibgib/core-gib/dist/witness/space/space-types.mjs';
|
|
23
|
+
import { validateIbGibIntrinsically } from '@ibgib/ts-gib/dist/V1/validate-helper.mjs';
|
|
24
|
+
import { IbGib_V1 } from '@ibgib/ts-gib/dist/V1/types.mjs';
|
|
25
|
+
import { commandifyAnonFn } from '../../../../api/commands/command-helpers.mjs';
|
|
26
|
+
import { execInSpaceWithLocking } from '@ibgib/core-gib/dist/witness/space/space-helper.mjs';
|
|
27
|
+
import { SpecialIbGibType } from '@ibgib/core-gib/dist/common/other/other-types.mjs';
|
|
28
|
+
import { getGlobalDbName } from '../../../../helpers.web.mjs';
|
|
29
|
+
|
|
30
|
+
const logalot = GLOBAL_LOG_A_LOT;
|
|
31
|
+
|
|
32
|
+
const NAIVE_SPACE_CACHE: Map<IbGibAddr, IbGibSpaceAny> = new Map();
|
|
33
|
+
const ZERO_SPACE_CACHE_ADDR = 'zero_space^gib';
|
|
34
|
+
const STORES_CONFIRMED: Set<string> = new Set();
|
|
35
|
+
|
|
36
|
+
interface TempCacheEntry {
|
|
37
|
+
/**
|
|
38
|
+
* Password to the user's password.
|
|
39
|
+
*/
|
|
40
|
+
tempMetaPassword: string;
|
|
41
|
+
/**
|
|
42
|
+
* Encrypted user password
|
|
43
|
+
*/
|
|
44
|
+
encryptedPassword: string;
|
|
45
|
+
/**
|
|
46
|
+
* salt used in cached encryption.
|
|
47
|
+
*/
|
|
48
|
+
salt: string;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* All-purpose mega service (todo: which we'll need to break up!) to interact
|
|
54
|
+
* with ibgibs at the app/device level.
|
|
55
|
+
*
|
|
56
|
+
* This works with the local app user space.
|
|
57
|
+
*
|
|
58
|
+
* ## regarding special ibgibs
|
|
59
|
+
*
|
|
60
|
+
* Special ibgibs' behaviors are what hold in other apps configuration data.
|
|
61
|
+
* Of course the difference is that most special ibgibs can leverage the "on-chain"
|
|
62
|
+
* functionality of "regular" ibgibs.
|
|
63
|
+
*
|
|
64
|
+
* There are a couple meta ibgibs (which I also call "special"):
|
|
65
|
+
* * roots^gib
|
|
66
|
+
* * tracks other special root^gib ibgibs, which are like local app-level indexes.
|
|
67
|
+
* * tags^gib
|
|
68
|
+
* * tracks other special tag^gib ibgibs, which you can apply to any ibgib
|
|
69
|
+
* * latest^gib
|
|
70
|
+
* * tracks mappings between tjp -> latest ib^gib address
|
|
71
|
+
* * ephemeral (deletes past rel8ns and past ibGib frames)
|
|
72
|
+
* * ...
|
|
73
|
+
*
|
|
74
|
+
* ## regarding latest ibgibs
|
|
75
|
+
*
|
|
76
|
+
* The tjp (temporal junction point) defines atow the beginning of an ibGib
|
|
77
|
+
* timeline. it's like the birthday for an ibGib. (Or you can think if it as
|
|
78
|
+
* the id for the stream of ibgib frames in a given timeline.)
|
|
79
|
+
*
|
|
80
|
+
* The latest ibGib in that timeline is also special, because it's often what
|
|
81
|
+
* you want to work with.
|
|
82
|
+
*
|
|
83
|
+
* So ideally, when an ibgib, A, has a tjp A1, and it is updated to A2, A3, An
|
|
84
|
+
* via `mut8` and/or `rel8` transforms, that ibgib creates a single timeline.
|
|
85
|
+
* This service attempts to track the relationship between that starting tjp
|
|
86
|
+
* address and its corresponding latest frame in that timeline, i.e., A1 -> An.
|
|
87
|
+
*
|
|
88
|
+
* ### mapping persistence implementation details
|
|
89
|
+
*
|
|
90
|
+
* The latest ibGib service is backed by a special ibgib that maintains the
|
|
91
|
+
* mapping index. It does this by rel8-ing that special backing ibgib via the
|
|
92
|
+
* tjp pointer, e.g. [special latest ibgib^XXX000].rel8ns[A^TJP123] ===
|
|
93
|
+
* [A^N12345] . It does this via the ib^gib content address pointer, so this
|
|
94
|
+
* becomes a mapping from A^TJP123 to A^N12345.
|
|
95
|
+
*
|
|
96
|
+
* This backing ibGib is special (even for special ibGibs) in that:
|
|
97
|
+
* * it does not relate itself with the current root of the application
|
|
98
|
+
* * it does not maintain references to its past (i.e. rel8ns['past'] === [])
|
|
99
|
+
* * it DELETES its previous incarnation from the files service
|
|
100
|
+
*
|
|
101
|
+
* In other words, this service is meant to be as ephemeral as possible. I am
|
|
102
|
+
* keeping it as an ibGib and not some other data format (like straight in
|
|
103
|
+
* storage/some other db) because I've found this is often useful and what I end
|
|
104
|
+
* up doing anyway to leverage other ibgib behavior. For example, in the future
|
|
105
|
+
* it may be good to take snapshots, which is a simple copy operation of the
|
|
106
|
+
* file persistence.
|
|
107
|
+
*
|
|
108
|
+
* ### current naive implementation notes
|
|
109
|
+
*
|
|
110
|
+
* questions:
|
|
111
|
+
* * What do we want to do if we can't locate an ibGib record?
|
|
112
|
+
* * How/when do we want to alert the user/our own code that we've found
|
|
113
|
+
* multiple timelines for an ibGib with a tjp (usually a thing we want to
|
|
114
|
+
* avoid)?
|
|
115
|
+
* * Who do we want to notify when new ibGibs arrive?
|
|
116
|
+
* * How often do we want to check external sources for latest?
|
|
117
|
+
* * When do we get to merging ibGib timelines?
|
|
118
|
+
*
|
|
119
|
+
* This is behavior that is somewhat taken care of, e.g. in git, with the HEAD
|
|
120
|
+
* pointer for a repo. But we're talking about here basically as a metarepo or
|
|
121
|
+
* "repo of repos", and unlike git, we don't want our HEAD metadata living "off
|
|
122
|
+
* chain" (outside of the DLT itself that it's modifying). So eventually, what
|
|
123
|
+
* we want is just like what we want with ALL ibGibs: perspective. From "the
|
|
124
|
+
* app"'s perspective, the latest is mapped. But really, apps can't view slices
|
|
125
|
+
* of ibGib graphs in all sorts of interesting ways and still be productive &
|
|
126
|
+
* beneficial to the ecosystem as a whole.
|
|
127
|
+
*/
|
|
128
|
+
export class Metaspace_Webspace extends MetaspaceBase {
|
|
129
|
+
|
|
130
|
+
// we won't get an object back, only a DTO ibGib essentially
|
|
131
|
+
protected lc: string = `[${Metaspace_Webspace.name}]`;
|
|
132
|
+
|
|
133
|
+
get zeroSpace(): IbGibSpaceAny {
|
|
134
|
+
const lc = `[${this.lc}][get zeroSpace]`;
|
|
135
|
+
if (NAIVE_SPACE_CACHE.has(ZERO_SPACE_CACHE_ADDR)) {
|
|
136
|
+
return NAIVE_SPACE_CACHE.get(ZERO_SPACE_CACHE_ADDR)!;
|
|
137
|
+
} else if (this.metaspaceFactory.fnZeroSpaceFactory) {
|
|
138
|
+
const zeroSpace = this.metaspaceFactory.fnZeroSpaceFactory();
|
|
139
|
+
NAIVE_SPACE_CACHE.set(ZERO_SPACE_CACHE_ADDR, zeroSpace);
|
|
140
|
+
return zeroSpace;
|
|
141
|
+
} else {
|
|
142
|
+
throw new Error(`${lc} (UNEXPECTED) this.metaspaceFactory.fnZeroSpaceFactory falsy. not initialized? (E: 9e6c6954dacd868b18c9f34a71e63523)`);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
constructor(
|
|
147
|
+
// public modalController: ModalController,
|
|
148
|
+
// public alertController: AlertController,
|
|
149
|
+
protected cacheSvc: IbGibCacheService | undefined,
|
|
150
|
+
// private latestCacheSvc: IonicStorageLatestIbgibCacheService,
|
|
151
|
+
) {
|
|
152
|
+
super(cacheSvc);
|
|
153
|
+
const lc = `${this.lc}[ctor]`;
|
|
154
|
+
if (logalot) {
|
|
155
|
+
console.log(`${lc}${GLOBAL_TIMER_NAME}`);
|
|
156
|
+
console.timeLog(GLOBAL_TIMER_NAME);
|
|
157
|
+
console.log(`${lc} created. (I: 5690dc2ebf774df3a442bd463dee7455)`);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
protected async initializeMetaspaceFactory({ metaspaceFactory }: {
|
|
163
|
+
metaspaceFactory: MetaspaceFactory,
|
|
164
|
+
}): Promise<void> {
|
|
165
|
+
const lc = `[${this.initializeMetaspaceFactory.name}]`;
|
|
166
|
+
try {
|
|
167
|
+
if (logalot) { console.log(`${lc} starting... (I: 5a29670439ac47634dcdfe25225c8223)`); }
|
|
168
|
+
|
|
169
|
+
await super.initializeMetaspaceFactory({ metaspaceFactory });
|
|
170
|
+
|
|
171
|
+
metaspaceFactory.fnDefaultLocalSpaceFactory ??= async (opts) => {
|
|
172
|
+
const createdSpace = await fnCreateNewLocalSpace(opts);
|
|
173
|
+
if (!createdSpace) { throw new Error(`(UNEXPECTED) createdSpace undefined? (E: 21258175efdd1a9cb1f9fc8ab59e0324)`); }
|
|
174
|
+
if (!createdSpace.data?.uuid) { throw new Error(`(UNEXPECTED) createdSpace.data.uuid undefined? (E: 0a6c44c078d9e21e92f703adbc995c24)`); }
|
|
175
|
+
|
|
176
|
+
// ensure the local space exists in storage (db & store)
|
|
177
|
+
const storeNameForSpace = createdSpace.data.uuid;
|
|
178
|
+
await storageCreateStoreIfNotExist({
|
|
179
|
+
dbName: getGlobalDbName(),
|
|
180
|
+
storeName: storeNameForSpace,
|
|
181
|
+
logalot,
|
|
182
|
+
});
|
|
183
|
+
|
|
184
|
+
// cache newly created space
|
|
185
|
+
const spaceAddr = getIbGibAddr({ ibGib: createdSpace });
|
|
186
|
+
NAIVE_SPACE_CACHE.set(spaceAddr, createdSpace);
|
|
187
|
+
|
|
188
|
+
// return it
|
|
189
|
+
return createdSpace;
|
|
190
|
+
};
|
|
191
|
+
metaspaceFactory.fnDtoToSpace ??= async (spaceDto) => {
|
|
192
|
+
// first ensure that the store exists in IndexedDB
|
|
193
|
+
const storeNameForSpace = spaceDto.data?.uuid;
|
|
194
|
+
if (!storeNameForSpace) { throw new Error(`spaceDto.data?.uuid falsy? (E: b73bded9ebede92b8ef53b8d05dca225)`); }
|
|
195
|
+
if (!STORES_CONFIRMED.has(storeNameForSpace)) {
|
|
196
|
+
await storageCreateStoreIfNotExist({
|
|
197
|
+
dbName: getGlobalDbName(),
|
|
198
|
+
storeName: storeNameForSpace,
|
|
199
|
+
logalot,
|
|
200
|
+
});
|
|
201
|
+
STORES_CONFIRMED.add(storeNameForSpace);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
// get the space from cache if available, else create it
|
|
205
|
+
|
|
206
|
+
const spaceAddr = getIbGibAddr({ ibGib: spaceDto });
|
|
207
|
+
let resSpace = NAIVE_SPACE_CACHE.get(spaceAddr);
|
|
208
|
+
resSpace = undefined; // testing bug
|
|
209
|
+
if (!resSpace) {
|
|
210
|
+
resSpace = await fnDtoToSpace_webFilesystem(spaceDto);
|
|
211
|
+
if (!resSpace.data?.uuid) { throw new Error(`(UNEXPECTED) resCreateNewSpace.data.uuid undefined? (E: f1e0e75f02b607b349b4102a8c8f7724)`); }
|
|
212
|
+
NAIVE_SPACE_CACHE.set(spaceAddr, resSpace);
|
|
213
|
+
}
|
|
214
|
+
return resSpace;
|
|
215
|
+
};
|
|
216
|
+
|
|
217
|
+
this.metaspaceFactory.fnZeroSpaceFactory ??= () => {
|
|
218
|
+
// default to web space
|
|
219
|
+
const zeroSpace = new WebFilesystemSpace_V1(/*initialData*/ undefined, /*initialRel8ns*/ undefined);
|
|
220
|
+
zeroSpace.gib = 'gib';
|
|
221
|
+
return zeroSpace;
|
|
222
|
+
}
|
|
223
|
+
} catch (error) {
|
|
224
|
+
console.error(`${lc} ${extractErrorMsg(error)}`);
|
|
225
|
+
throw error;
|
|
226
|
+
} finally {
|
|
227
|
+
if (logalot) { console.log(`${lc} complete.`); }
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
override async initialize(args: MetaspaceInitializeOptions): Promise<void> {
|
|
232
|
+
const lc = `${this.lc}[${this.initialize.name}]`;
|
|
233
|
+
|
|
234
|
+
// const {
|
|
235
|
+
// spaceName,
|
|
236
|
+
// metaspaceFactory,
|
|
237
|
+
// getFnAlert, getFnPrompt, getFnPromptPassword,
|
|
238
|
+
// } = args;
|
|
239
|
+
await this.initializeZeroSpace();
|
|
240
|
+
await super.initialize(args);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
async initializeZeroSpace(): Promise<void> {
|
|
244
|
+
const lc = `[${this.initializeZeroSpace.name}]`;
|
|
245
|
+
try {
|
|
246
|
+
if (logalot) { console.log(`${lc} starting... (I: a3364e9601c70c8163e67868e5d67723)`); }
|
|
247
|
+
|
|
248
|
+
// make sure the db and store exist for the zero space.
|
|
249
|
+
|
|
250
|
+
// I'll reuse storagePut to ensure the store exists for the zero space?
|
|
251
|
+
|
|
252
|
+
// is this initilizeStorage necessary with the initialization as
|
|
253
|
+
// referenced in the proceeding code with storageCreateStoreIfNotExist?
|
|
254
|
+
|
|
255
|
+
// await initializeStorage({
|
|
256
|
+
// dbName: BLANK_GIB_DB_NAME,
|
|
257
|
+
// storeName: ZERO_SPACE_ID,
|
|
258
|
+
// logalot,
|
|
259
|
+
// });
|
|
260
|
+
|
|
261
|
+
if (logalot) { console.log(`${lc} we are assuming zero space storage is initialized in indexed db. atow (03/2025), this is done in initBlankGibStorage in index.mts (I: cb1dd69b21efc2fc366956349e865125)`); }
|
|
262
|
+
// this is now done in initBlankGibStorage in index.mts
|
|
263
|
+
// await storageCreateStoreIfNotExist({
|
|
264
|
+
// dbName: BLANK_GIB_DB_NAME,
|
|
265
|
+
// storeName: ZERO_SPACE_ID,
|
|
266
|
+
// logalot,
|
|
267
|
+
// });
|
|
268
|
+
|
|
269
|
+
} catch (error) {
|
|
270
|
+
console.error(`${lc} ${extractErrorMsg(error)}`);
|
|
271
|
+
throw error;
|
|
272
|
+
} finally {
|
|
273
|
+
if (logalot) { console.log(`${lc} complete.`); }
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* I'm overriding this to troubleshoot figuring out why the space is
|
|
279
|
+
* becoming invalid.
|
|
280
|
+
*/
|
|
281
|
+
override async getLocalUserSpace({ lock, localSpaceId, }: { lock?: boolean; localSpaceId?: SpaceId; }): Promise<IbGibSpaceAny | undefined> {
|
|
282
|
+
const lc = `${this.lc}[${this.getLocalUserSpace.name}]`;
|
|
283
|
+
try {
|
|
284
|
+
if (logalot) { console.log(`${lc} starting... (I: e68ae7f617e4a1af026ab1ac1c52f425)`); }
|
|
285
|
+
const space = await super.getLocalUserSpace({ lock, localSpaceId });
|
|
286
|
+
if (!space) {
|
|
287
|
+
console.error(`(UNEXPECTED) local user space falsy? NOTE: This error is just logged, not thrown as I don't know if this is always improper behavior. (E: 3c7cac40d11b26c3fd95183d06ffc225)`);
|
|
288
|
+
return space; /* <<<< returns early */
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
const errors = await validateIbGibIntrinsically({ ibGib: space }) ?? [];
|
|
292
|
+
if (errors.length > 0) {
|
|
293
|
+
// debugger; // space is invalid intrinsically? I'm putting this here to try to troubleshoot how this is coming to be.
|
|
294
|
+
console.error(`(UNEXPECTED) local user space is invalid intrinsically? when did this happen? (E: df5c8e62c204a6972e364fa33d9b7725)`);
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
return space;
|
|
298
|
+
} catch (error) {
|
|
299
|
+
console.error(`${lc} ${extractErrorMsg(error)}`);
|
|
300
|
+
throw error;
|
|
301
|
+
} finally {
|
|
302
|
+
if (logalot) { console.log(`${lc} complete.`); }
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* overriding to try to execute serially via commanding architecture.
|
|
308
|
+
*
|
|
309
|
+
* just wraps super call with {@link commandifyAnonFn}.
|
|
310
|
+
*
|
|
311
|
+
* @see {@link commandifyAnonFn}
|
|
312
|
+
*/
|
|
313
|
+
override async rel8ToCurrentRoot(opts: { ibGib: IbGib_V1; linked?: boolean; rel8nName?: string; space?: IbGibSpaceAny; }): Promise<void> {
|
|
314
|
+
const lc = `${this.lc}[${this.rel8ToCurrentRoot.name}]`;
|
|
315
|
+
try {
|
|
316
|
+
if (logalot) { console.log(`${lc} starting... (I: 0f999532d51b1ad2084ed30670297125)`); }
|
|
317
|
+
|
|
318
|
+
// const cmd = commandifyAnonFn<any>({
|
|
319
|
+
// fn: () => {
|
|
320
|
+
const space = opts.space ?? await this.getLocalUserSpace({});
|
|
321
|
+
if (!space) { throw new Error(`(UNEXPECTED) space falsy and couldn't get default local user space? (E: e8b63af1b0fb692c4761fe9627eaf525)`); }
|
|
322
|
+
await execInSpaceWithLocking({
|
|
323
|
+
fn: async () => {
|
|
324
|
+
const lc = `${this.lc}[${this.rel8ToCurrentRoot.name}]`;
|
|
325
|
+
try {
|
|
326
|
+
if (logalot) { console.log(`${lc} starting... (I: 5444c70bd93b13b59ef9cd06ee72d825)`); }
|
|
327
|
+
|
|
328
|
+
return super.rel8ToCurrentRoot(opts);
|
|
329
|
+
|
|
330
|
+
} catch (error) {
|
|
331
|
+
console.error(`${lc} ${extractErrorMsg(error)}`);
|
|
332
|
+
throw error;
|
|
333
|
+
} finally {
|
|
334
|
+
if (logalot) { console.log(`${lc} complete.`); }
|
|
335
|
+
}
|
|
336
|
+
},
|
|
337
|
+
scope: lc,
|
|
338
|
+
secondsValid: 60,
|
|
339
|
+
maxDelayMs: 100,
|
|
340
|
+
maxLockAttempts: 600, // 60 seconds worth
|
|
341
|
+
space,
|
|
342
|
+
callerInstanceId: this.instanceId,
|
|
343
|
+
});
|
|
344
|
+
|
|
345
|
+
// debugger; // before viacmd?
|
|
346
|
+
// const result = cmd.fnViaCmd();
|
|
347
|
+
// debugger; // after viacmd?
|
|
348
|
+
// return result;
|
|
349
|
+
} catch (error) {
|
|
350
|
+
console.error(`${lc} ${extractErrorMsg(error)}`);
|
|
351
|
+
throw error;
|
|
352
|
+
} finally {
|
|
353
|
+
if (logalot) { console.log(`${lc} complete.`); }
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
override async rel8ToSpecialIbGib(opts: {
|
|
359
|
+
type: SpecialIbGibType;
|
|
360
|
+
rel8nName: string;
|
|
361
|
+
ibGibsToRel8?: IbGib_V1[];
|
|
362
|
+
ibGibsToUnRel8?: IbGib_V1[];
|
|
363
|
+
linked?: boolean;
|
|
364
|
+
severPast?: boolean;
|
|
365
|
+
deletePreviousSpecialIbGib?: boolean;
|
|
366
|
+
space?: IbGibSpaceAny;
|
|
367
|
+
}): Promise<IbGibAddr> {
|
|
368
|
+
const lc = `${this.lc}[${this.rel8ToSpecialIbGib.name}]`;
|
|
369
|
+
try {
|
|
370
|
+
if (logalot) { console.log(`${lc} starting... (I: 906d2e553f163405f3238f141ed6fb25)`); }
|
|
371
|
+
// const { type, rel8nName, ibGibsToRel8, ibGibsToUnRel8, linked, severPast, deletePreviousSpecialIbGib, space, } = opts;
|
|
372
|
+
|
|
373
|
+
const space = opts.space ?? await this.getLocalUserSpace({});
|
|
374
|
+
if (!space) { throw new Error(`(UNEXPECTED) space falsy and couldn't get default local user space? (E: 3c587503d08aa8b8cda25bb7064bf125)`); }
|
|
375
|
+
const result = await execInSpaceWithLocking({
|
|
376
|
+
fn: async () => {
|
|
377
|
+
const lc = `${this.lc}[${this.rel8ToCurrentRoot.name}]`;
|
|
378
|
+
try {
|
|
379
|
+
if (logalot) { console.log(`${lc} starting... (I: 3b9f44934d88196bc3d0087cadd23125)`); }
|
|
380
|
+
|
|
381
|
+
return super.rel8ToSpecialIbGib(opts);
|
|
382
|
+
|
|
383
|
+
} catch (error) {
|
|
384
|
+
console.error(`${lc} ${extractErrorMsg(error)}`);
|
|
385
|
+
throw error;
|
|
386
|
+
} finally {
|
|
387
|
+
if (logalot) { console.log(`${lc} complete.`); }
|
|
388
|
+
}
|
|
389
|
+
},
|
|
390
|
+
scope: lc,
|
|
391
|
+
secondsValid: 60,
|
|
392
|
+
maxDelayMs: 100,
|
|
393
|
+
maxLockAttempts: 600, // 60 seconds worth
|
|
394
|
+
space,
|
|
395
|
+
callerInstanceId: this.instanceId,
|
|
396
|
+
});
|
|
397
|
+
|
|
398
|
+
return result;
|
|
399
|
+
} catch (error) {
|
|
400
|
+
console.error(`${lc} ${extractErrorMsg(error)}`);
|
|
401
|
+
throw error;
|
|
402
|
+
} finally {
|
|
403
|
+
if (logalot) { console.log(`${lc} complete.`); }
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const INDEXED_DB_LONG_PATH_LENGTH = 9999999999999;
|