@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
package/dist/helpers.mjs
ADDED
|
@@ -0,0 +1,514 @@
|
|
|
1
|
+
import { clone, extractErrorMsg, getTimestampInTicks } from "@ibgib/helper-gib/dist/helpers/utils-helper.mjs";
|
|
2
|
+
import { Rel8n } from "@ibgib/ts-gib/dist/V1/types.mjs";
|
|
3
|
+
import { getIbAndGib, getIbGibAddr } from "@ibgib/ts-gib/dist/helper.mjs";
|
|
4
|
+
import { isPrimitive } from "@ibgib/ts-gib/dist/V1/transforms/transform-helper.mjs";
|
|
5
|
+
import { mut8 } from "@ibgib/ts-gib/dist/V1/transforms/mut8.mjs";
|
|
6
|
+
import { getSpecialConfigKey, getTjpAddr } from "@ibgib/core-gib/dist/common/other/ibgib-helper.mjs";
|
|
7
|
+
import { execInSpaceWithLocking, persistTransformResult } from "@ibgib/core-gib/dist/witness/space/space-helper.mjs";
|
|
8
|
+
import { SpecialIbGibType } from "@ibgib/core-gib/dist/common/other/other-types.mjs";
|
|
9
|
+
import { GLOBAL_LOG_A_LOT, } from "./constants.mjs";
|
|
10
|
+
const logalot = GLOBAL_LOG_A_LOT; // change this when you want to turn off verbose logging
|
|
11
|
+
export async function getTagsIbGib({ metaspace, space, }) {
|
|
12
|
+
const lc = `[${getTagsIbGib.name}]`;
|
|
13
|
+
try {
|
|
14
|
+
if (logalot) {
|
|
15
|
+
console.log(`${lc} starting... (I: 2ccb79537a75e7896bace84e6c710d25)`);
|
|
16
|
+
}
|
|
17
|
+
const tagsIbGib = await metaspace.getSpecialIbGib({ type: SpecialIbGibType.tags, space });
|
|
18
|
+
if (!tagsIbGib) {
|
|
19
|
+
throw new Error(`tagsIbGib not found in metaspace. space: ${!!space ? space.ib : 'default local user space'} (E: 4734c510a411274315c0add8f70e1925)`);
|
|
20
|
+
}
|
|
21
|
+
return tagsIbGib;
|
|
22
|
+
}
|
|
23
|
+
catch (error) {
|
|
24
|
+
console.error(`${lc} ${extractErrorMsg(error)}`);
|
|
25
|
+
throw error;
|
|
26
|
+
}
|
|
27
|
+
finally {
|
|
28
|
+
if (logalot) {
|
|
29
|
+
console.log(`${lc} complete.`);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* NOTE: This was originally written only for agents and I'm generalizing it to
|
|
35
|
+
* any "coupled" ibgib. The idea is that for local-space-specific ibgibs that
|
|
36
|
+
* are related to domain ibgibs, but where we don't want to modify the domain
|
|
37
|
+
* ibgib directly, we create this "coupled" ibgib. We then index it in a local
|
|
38
|
+
* space special (index) ibgib and associate it by tjpAddr.
|
|
39
|
+
*
|
|
40
|
+
* Generates a consistent special name for the agent index ibGib based on the
|
|
41
|
+
* domain ibGib's primitive ancestor's ib or the ibGibAddr's ib atom.
|
|
42
|
+
*
|
|
43
|
+
* RIGHT NOW I"M PRIORITIZING THE ATOM. I THINK IT ALWAYS RETURNS THE ATOM, I.E., THE FIRST SPACE-DELIMITED PIECE OF THE `ib`.
|
|
44
|
+
*
|
|
45
|
+
* I am doing this because the project ibgib actually forks from a comment
|
|
46
|
+
* ibgib, so its primitive ancestor is "comment^gib".
|
|
47
|
+
*
|
|
48
|
+
* ## notes
|
|
49
|
+
*
|
|
50
|
+
* We are trying to get a special ibgib index that maps from ibgibs (the domain)
|
|
51
|
+
* to what local agent is registered to handle that ibgib's timeline.
|
|
52
|
+
*
|
|
53
|
+
* Concretely, we're working on the project ibgibs and we need a way to get at
|
|
54
|
+
* the agent that is assigned to that project. But we can't just mut8 the
|
|
55
|
+
* project itself because this would cause issues once the project is spread out
|
|
56
|
+
* among multiple execution contexts (similar to "remotes" in git).
|
|
57
|
+
*
|
|
58
|
+
* So we will have a special ibgib registered with the local space which will
|
|
59
|
+
* act as this index that maps ibgib -> handling agent. This function helps get
|
|
60
|
+
* the *name* of that special indexing ibgib.
|
|
61
|
+
*
|
|
62
|
+
* This can be driven either by the ibgib itself, via the last primitive ancestor
|
|
63
|
+
* ibgib's address, or via the ib's atom (the first space-delimited term in the
|
|
64
|
+
* `ib` metadata).
|
|
65
|
+
*
|
|
66
|
+
* So if an ancestor is [comment^gib, specialComment^gib, specialComment
|
|
67
|
+
* abc123^ABC123.DEF456] (where the abc123 things are representative of the full
|
|
68
|
+
* hashes 64 characters long atow since we're using sha256), then the *last*
|
|
69
|
+
* primitive address is specialComment^gib.
|
|
70
|
+
*/
|
|
71
|
+
export function getIndexNameFromIbGib({ scope, ibGib, ibGibAddr, defaultNameIfError, }) {
|
|
72
|
+
const lc = `[${getIndexNameFromIbGib.name}]`;
|
|
73
|
+
try {
|
|
74
|
+
if (!ibGib && !ibGibAddr) {
|
|
75
|
+
throw new Error(`${lc} Must provide either ibGib or ibGibAddr. (E: genuuid)`);
|
|
76
|
+
}
|
|
77
|
+
if (scope.includes(' ')) {
|
|
78
|
+
console.warn(`${lc} scope includes one or more spaces. These will be converted to double underscores. (W: 1554a81454e8ae0a6858ea5dd17f8925)`);
|
|
79
|
+
scope = scope.replace(/ /g, '__');
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* note: non-alphanumerics are replaced with underscores
|
|
83
|
+
*/
|
|
84
|
+
let primitiveAncestorIb = undefined;
|
|
85
|
+
let atom = undefined;
|
|
86
|
+
/**
|
|
87
|
+
* This is what we're trying to extract. once we have this, then we can
|
|
88
|
+
* simply append our index name, e.g. `${ancestorIbOrAtom}-agent-index`
|
|
89
|
+
*/
|
|
90
|
+
let ancestorIbOrAtom = undefined;
|
|
91
|
+
if (ibGib) {
|
|
92
|
+
// go by the ibgib's full data
|
|
93
|
+
if (!ibGib.data) {
|
|
94
|
+
throw new Error(`(UNEXPECTED) ibGib.data falsy? (E: genuuid)`);
|
|
95
|
+
}
|
|
96
|
+
if (!ibGib.rel8ns) {
|
|
97
|
+
throw new Error(`(UNEXPECTED) ibGib.rel8ns falsy? (E: genuuid)`);
|
|
98
|
+
}
|
|
99
|
+
if (!ibGib.rel8ns.ancestor) {
|
|
100
|
+
throw new Error(`(UNEXPECTED) ibGib.rel8ns.ancestor falsy? (E: genuuid)`);
|
|
101
|
+
}
|
|
102
|
+
if (ibGib.rel8ns.ancestor.length === 0) {
|
|
103
|
+
throw new Error(`(UNEXPECTED) ibGib.rel8ns.ancestor.length === 0? there should be at least one ancestor (E: genuuid)`);
|
|
104
|
+
// this may turn into a warning later on down the road and return based on the ibGib's addr
|
|
105
|
+
}
|
|
106
|
+
if (ibGib && ibGibAddr) {
|
|
107
|
+
if (getIbGibAddr({ ibGib }) !== ibGibAddr) {
|
|
108
|
+
throw new Error(`(UNEXPECTED) both ibGib and ibGibAddr provided, but addr of ibGib doesn't equal ibGibAddr? (E: genuuid)`);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
// const primitiveAncestor = getPrimitiveAncestor({ ibGib });
|
|
112
|
+
const primitiveAncestorAddrs = ibGib.rel8ns.ancestor.filter(x => isPrimitive({ gib: getIbAndGib({ ibGibAddr: x }).gib }));
|
|
113
|
+
if (primitiveAncestorAddrs.length === 0) {
|
|
114
|
+
debugger; // error no primitive ancestor addrs?
|
|
115
|
+
console.error(`${lc} ibGib has no primitive ancestor addrs? Still going to work off of the ib then, which should have the atom as the first space-delimited term. (E: genuuid)`);
|
|
116
|
+
}
|
|
117
|
+
const primitiveAncestorAddr = primitiveAncestorAddrs.at(-1);
|
|
118
|
+
primitiveAncestorIb =
|
|
119
|
+
getIbAndGib({ ibGibAddr: primitiveAncestorAddr }).ib;
|
|
120
|
+
// replace ALL spaces with underscores
|
|
121
|
+
ancestorIbOrAtom = primitiveAncestorIb;
|
|
122
|
+
}
|
|
123
|
+
// get the atom from the address
|
|
124
|
+
ibGibAddr ??= getIbGibAddr({ ibGib });
|
|
125
|
+
// try to get at it from the ibGibAddr
|
|
126
|
+
const { ib } = getIbAndGib({ ibGibAddr });
|
|
127
|
+
atom = (ib.split(' ').at(0) ?? '');
|
|
128
|
+
// at this point we have a raw atom and possibly a raw primitive
|
|
129
|
+
// ancestor ib. we want to compare the two, which usually should be the
|
|
130
|
+
// same (i think?). if different, warn and return
|
|
131
|
+
atom = atom.replace(/\W/g, '_');
|
|
132
|
+
primitiveAncestorIb ??= atom;
|
|
133
|
+
primitiveAncestorIb = primitiveAncestorIb.replace(/\W/g, '_');
|
|
134
|
+
if (!primitiveAncestorIb && !atom) {
|
|
135
|
+
throw new Error(`(UNEXPECTED) both primitiveAncestorIb and atom falsy? one should be truthy at this point. (E: genuuid)`);
|
|
136
|
+
}
|
|
137
|
+
// if (primitiveAncestorIb !== atom) {
|
|
138
|
+
// // warn and do per arg
|
|
139
|
+
// console.warn(`${lc} ibGib primitive ancestor ib (${primitiveAncestorIb}) doesn't match atom (${atom}). going with ancestorIbOrAtom: ${ancestorIbOrAtom} (W: genuuid)`);
|
|
140
|
+
// }
|
|
141
|
+
ancestorIbOrAtom = atom.toLowerCase();
|
|
142
|
+
if (logalot) {
|
|
143
|
+
console.log(`${lc} ancestorIbOrAtom: ${ancestorIbOrAtom} (I: genuuid)`);
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* I forgot, this cannot be kebab-cased because we only allow \w regexp
|
|
147
|
+
* on the special ibgib name. I don't remember the reasoning for this,
|
|
148
|
+
* may be arbitrary. But for now, going to change this to underscore,
|
|
149
|
+
* even though the atom or ancestor ib may have underscores in it. Ah
|
|
150
|
+
* well.
|
|
151
|
+
*/
|
|
152
|
+
const indexName = `${ancestorIbOrAtom}_${scope}index`;
|
|
153
|
+
if (logalot) {
|
|
154
|
+
console.log(`${lc} indexName: ${indexName} (I: genuuid)`);
|
|
155
|
+
}
|
|
156
|
+
return indexName;
|
|
157
|
+
}
|
|
158
|
+
catch (error) {
|
|
159
|
+
if (!!defaultNameIfError) {
|
|
160
|
+
console.warn(`${lc} error happened but defaultNameIfError (${defaultNameIfError}) provided. So will return this value. error that was thrown: ${extractErrorMsg(error)}`);
|
|
161
|
+
return defaultNameIfError;
|
|
162
|
+
}
|
|
163
|
+
else {
|
|
164
|
+
console.error(`${lc} ${extractErrorMsg(error)}`);
|
|
165
|
+
throw error;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* NOTE: This was originally written only for agents and I'm generalizing it to
|
|
171
|
+
* any "coupled" ibgib. The idea is that for local-space-specific ibgibs that
|
|
172
|
+
* are related to domain ibgibs, but where we don't want to modify the domain
|
|
173
|
+
* ibgib directly, we create this "coupled" ibgib. We then index it in a local
|
|
174
|
+
* space special (index) ibgib and associate it by tjpAddr.
|
|
175
|
+
* Retrieves the agent ibGib associated with a domain ibGib from the special agent index ibGib.
|
|
176
|
+
*
|
|
177
|
+
* may have to change this to require the ibgib, not give an optional
|
|
178
|
+
* domainIbGibAddr
|
|
179
|
+
*/
|
|
180
|
+
export async function getLocalCoupledIbGibForDomainIbGib({ scope, ibGib, metaspace, space, skipGetLatest, }) {
|
|
181
|
+
const lc = `[${getLocalCoupledIbGibForDomainIbGib.name}]`;
|
|
182
|
+
try {
|
|
183
|
+
if (logalot) {
|
|
184
|
+
console.log(`${lc} starting... (I: f19dc86aab380fe809aef27ccc7a7425)`);
|
|
185
|
+
}
|
|
186
|
+
if (!scope) {
|
|
187
|
+
throw new Error(`scope required to be a non-empty string (E: 73e702495c38c7d8747d1cf8850af825)`);
|
|
188
|
+
}
|
|
189
|
+
if (!ibGib) {
|
|
190
|
+
throw new Error(`ibGib required (E: genuuid)`);
|
|
191
|
+
}
|
|
192
|
+
// Get the index name and domain TJP address
|
|
193
|
+
const indexSpecialIbGibType = getIndexNameFromIbGib({ scope, ibGib, });
|
|
194
|
+
const domainTjpAddr = getTjpAddr({ ibGib, defaultIfNone: 'incomingAddr' });
|
|
195
|
+
// Get the index ibGib
|
|
196
|
+
const fn = async () => {
|
|
197
|
+
const specialIndex = await metaspace.getSpecialIbGib({
|
|
198
|
+
type: indexSpecialIbGibType,
|
|
199
|
+
space,
|
|
200
|
+
initialize: false,
|
|
201
|
+
dontWarnIfNotExist: true,
|
|
202
|
+
lock: true,
|
|
203
|
+
});
|
|
204
|
+
// If the index ibGib doesn't exist, nothing is registered for this domain ibgib
|
|
205
|
+
if (!specialIndex || !specialIndex.data) {
|
|
206
|
+
if (logalot) {
|
|
207
|
+
console.log(`${lc} special ${scope} index ibGib not found for indexSpecialIbGibType (${indexSpecialIbGibType}). No coupled ibgib registered, returning undefined. (I: genuuid)`);
|
|
208
|
+
}
|
|
209
|
+
return undefined; /* <<<< returns early */
|
|
210
|
+
}
|
|
211
|
+
// Get the address from the map
|
|
212
|
+
const coupleMap = specialIndex.data.coupleMap ??
|
|
213
|
+
specialIndex.data.agentMap ??
|
|
214
|
+
{};
|
|
215
|
+
const coupledAddr = coupleMap[domainTjpAddr];
|
|
216
|
+
if (!coupledAddr) {
|
|
217
|
+
if (logalot) {
|
|
218
|
+
console.log(`${lc} No coupled ${scope} ibgib address found for domain ${domainTjpAddr} in the coupled index map. indexSpecialIbGibType: ${indexSpecialIbGibType}. returning undefined. (I: genuuid)`);
|
|
219
|
+
}
|
|
220
|
+
return undefined; /* <<<< returns early */
|
|
221
|
+
}
|
|
222
|
+
let addrToGet = skipGetLatest ?
|
|
223
|
+
coupledAddr :
|
|
224
|
+
await metaspace.getLatestAddr({ addr: coupledAddr, space }) ?? coupledAddr;
|
|
225
|
+
let resGet = await metaspace.get({
|
|
226
|
+
addrs: [addrToGet],
|
|
227
|
+
space,
|
|
228
|
+
});
|
|
229
|
+
if (resGet.errorMsg || (resGet.ibGibs ?? []).length !== 1) {
|
|
230
|
+
throw new Error(`couldn't get latest coupled ibgib (${addrToGet}) for domain ${domainTjpAddr}. (E: 8aa7b25f5cd4ebadd8bf2f8807dfe825)`);
|
|
231
|
+
}
|
|
232
|
+
return resGet.ibGibs[0];
|
|
233
|
+
};
|
|
234
|
+
const result = await execInSpaceWithLocking({
|
|
235
|
+
scope: indexSpecialIbGibType,
|
|
236
|
+
secondsValid: 180,
|
|
237
|
+
maxDelayMs: 100,
|
|
238
|
+
maxLockAttempts: 1800,
|
|
239
|
+
space,
|
|
240
|
+
callerInstanceId: lc + getTimestampInTicks(),
|
|
241
|
+
fn,
|
|
242
|
+
});
|
|
243
|
+
return result;
|
|
244
|
+
}
|
|
245
|
+
catch (error) {
|
|
246
|
+
console.error(`${lc} ${extractErrorMsg(error)}`);
|
|
247
|
+
throw error;
|
|
248
|
+
}
|
|
249
|
+
finally {
|
|
250
|
+
if (logalot) {
|
|
251
|
+
console.log(`${lc} complete.`);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Registers a domain ibGib with its associated agent ibGib in the special agent
|
|
257
|
+
* index ibGib. This creates or updates a mapping from the domain ibGib's TJP
|
|
258
|
+
* address to the agent's address.
|
|
259
|
+
*
|
|
260
|
+
* ## intent
|
|
261
|
+
*
|
|
262
|
+
* we want to rel8 ibgibs but not directly change the domain ibgib. Like if we
|
|
263
|
+
* have an ibgib that we want to collaborate on, we want a mechanism for the
|
|
264
|
+
* local space (later local user via keystone) to have settings, agents, etc.,
|
|
265
|
+
* for that domain ibgib. But each space has its own version, like a local/user
|
|
266
|
+
* settings vs. a workspace settings.
|
|
267
|
+
*
|
|
268
|
+
* So this gets/creates an index on the local space and associates the domain
|
|
269
|
+
* with the local.
|
|
270
|
+
*
|
|
271
|
+
* @example
|
|
272
|
+
* use this to couple a local agent to a domain ibgib or a local settings ibgib
|
|
273
|
+
* to a domain ibgib, that you do not want to share with others who will have
|
|
274
|
+
* their own versions.
|
|
275
|
+
*/
|
|
276
|
+
export async function coupleDomainIbGibWithLocalIbGibViaIndex({ scope, domainIbGib, localIbGib, metaspace, space, }) {
|
|
277
|
+
const lc = `[${coupleDomainIbGibWithLocalIbGibViaIndex.name}]`;
|
|
278
|
+
try {
|
|
279
|
+
if (logalot) {
|
|
280
|
+
console.log(`${lc} starting... (I: 217ae68e0c820e48f4c00409f7f14325)`);
|
|
281
|
+
}
|
|
282
|
+
const indexSpecialIbGibType = getIndexNameFromIbGib({ scope, ibGib: domainIbGib, });
|
|
283
|
+
const domainTjpAddr = getTjpAddr({ ibGib: domainIbGib });
|
|
284
|
+
const localAddr = getIbGibAddr({ ibGib: localIbGib });
|
|
285
|
+
if (!domainTjpAddr) {
|
|
286
|
+
throw new Error(`${lc} Could not get TJP address for domain ibGib. (E: 35a4e8ac291b0b85cb958e28dd812f25)`);
|
|
287
|
+
}
|
|
288
|
+
if (!localAddr) {
|
|
289
|
+
throw new Error(`${lc} Could not get address for agent ibGib. (E: 2fce1187630b45934c4155a23204d125)`);
|
|
290
|
+
}
|
|
291
|
+
const fn = async () => {
|
|
292
|
+
// Get or create the agent index ibGib
|
|
293
|
+
const agentSpecialIndex = await metaspace.getSpecialIbGib({
|
|
294
|
+
type: indexSpecialIbGibType,
|
|
295
|
+
space,
|
|
296
|
+
initialize: true,
|
|
297
|
+
dontWarnIfNotExist: true,
|
|
298
|
+
lock: false,
|
|
299
|
+
});
|
|
300
|
+
if (!agentSpecialIndex) {
|
|
301
|
+
throw new Error(`${lc} Could not get or create agent index ibGib.`);
|
|
302
|
+
}
|
|
303
|
+
// Initialize data if it doesn't exist
|
|
304
|
+
if (!agentSpecialIndex.data) {
|
|
305
|
+
throw new Error(`(UNEXPECTED) agentSpecialIndex.data falsy? (E: 74299eed147debf6398ca37e7b8d5c25)`);
|
|
306
|
+
}
|
|
307
|
+
// Get the current mapping or initialize an empty one
|
|
308
|
+
const map = agentSpecialIndex.data.coupleMap ?? agentSpecialIndex.data.agentMap;
|
|
309
|
+
const coupleMap = !!map ? clone(map) : {};
|
|
310
|
+
// Update the mapping
|
|
311
|
+
const existingMappedAgentAddr = coupleMap[domainTjpAddr];
|
|
312
|
+
if (existingMappedAgentAddr) {
|
|
313
|
+
if (existingMappedAgentAddr === localAddr) {
|
|
314
|
+
if (logalot) {
|
|
315
|
+
console.log(`${lc} domain ibGib (${domainTjpAddr}) already mapped to agent (${localAddr}). returning early (I: cb5d4dcef8cf14de7336120fb8ffef25)`);
|
|
316
|
+
}
|
|
317
|
+
return; /* <<<< returns early */
|
|
318
|
+
}
|
|
319
|
+
else {
|
|
320
|
+
console.warn(`${lc} domainTjpAddr (${domainTjpAddr}) already assigned to existingMappedAgentAddr (${existingMappedAgentAddr}). We will be changing to new localAddr (${localAddr}). (W: eb993e33f7731e570fa76f24a2d80625)`);
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
coupleMap[domainTjpAddr] = localAddr;
|
|
324
|
+
// Assign the updated map back to data Save the updated index ibGib.
|
|
325
|
+
// there is extra plumbing involved with special index ibgibs. see
|
|
326
|
+
// `rel8ToSpecialIbGib` for an example in
|
|
327
|
+
// libs/core-gib/src/witness/space/space-helper.mts
|
|
328
|
+
// await updateSpecialIndex({
|
|
329
|
+
// metaspace,
|
|
330
|
+
// type: indexSpecialIbGibType,
|
|
331
|
+
// dataToAddOrPatch: { coupleMap },
|
|
332
|
+
// space,
|
|
333
|
+
// });
|
|
334
|
+
const resNewSpecial = await mut8({
|
|
335
|
+
src: agentSpecialIndex,
|
|
336
|
+
dataToAddOrPatch: { coupleMap },
|
|
337
|
+
dna: false,
|
|
338
|
+
linkedRel8ns: [Rel8n.past],
|
|
339
|
+
nCounter: true,
|
|
340
|
+
});
|
|
341
|
+
const newSpecialIbGib = resNewSpecial.newIbGib;
|
|
342
|
+
// persist
|
|
343
|
+
await persistTransformResult({ resTransform: resNewSpecial, space });
|
|
344
|
+
// update the space ibgib which contains the special/config information
|
|
345
|
+
const configKey = getSpecialConfigKey({ type: indexSpecialIbGibType });
|
|
346
|
+
await metaspace.setConfigAddr({
|
|
347
|
+
key: configKey,
|
|
348
|
+
addr: getIbGibAddr({ ibGib: newSpecialIbGib }),
|
|
349
|
+
space,
|
|
350
|
+
});
|
|
351
|
+
await metaspace.registerNewIbGib({ ibGib: newSpecialIbGib, space, });
|
|
352
|
+
};
|
|
353
|
+
await execInSpaceWithLocking({
|
|
354
|
+
scope: indexSpecialIbGibType,
|
|
355
|
+
secondsValid: 60,
|
|
356
|
+
maxDelayMs: 100,
|
|
357
|
+
maxLockAttempts: 600,
|
|
358
|
+
space,
|
|
359
|
+
// callerInstanceId: // You might need a way to generate a unique ID for the caller
|
|
360
|
+
fn,
|
|
361
|
+
});
|
|
362
|
+
if (logalot) {
|
|
363
|
+
console.log(`${lc} Registered domain ${domainTjpAddr} with agent ${localAddr}`);
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
catch (error) {
|
|
367
|
+
console.error(`${lc} ${extractErrorMsg(error)}`);
|
|
368
|
+
throw error;
|
|
369
|
+
}
|
|
370
|
+
finally {
|
|
371
|
+
if (logalot) {
|
|
372
|
+
console.log(`${lc} complete.`);
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
/**
|
|
377
|
+
* Returns a function, that, as long as it continues to be invoked, will not
|
|
378
|
+
* be triggered. The function will be called after it stops being called for
|
|
379
|
+
* N milliseconds. If `immediate` is passed, trigger the function on the
|
|
380
|
+
* leading edge, instead of the trailing.
|
|
381
|
+
*
|
|
382
|
+
* @param func The function to debounce.
|
|
383
|
+
* @param wait The number of milliseconds to wait after the last call.
|
|
384
|
+
* @param immediate If true, trigger the function on the leading edge.
|
|
385
|
+
* @returns A debounced version of the function.
|
|
386
|
+
*/
|
|
387
|
+
export function debounce(func, wait, immediate) {
|
|
388
|
+
let timeout = null;
|
|
389
|
+
return function (...args) {
|
|
390
|
+
const context = this;
|
|
391
|
+
const later = function () {
|
|
392
|
+
timeout = null;
|
|
393
|
+
if (!immediate) {
|
|
394
|
+
func.apply(context, args);
|
|
395
|
+
}
|
|
396
|
+
};
|
|
397
|
+
const callNow = immediate && !timeout;
|
|
398
|
+
if (timeout) {
|
|
399
|
+
clearTimeout(timeout);
|
|
400
|
+
}
|
|
401
|
+
timeout = setTimeout(later, wait);
|
|
402
|
+
if (callNow) {
|
|
403
|
+
func.apply(context, args);
|
|
404
|
+
}
|
|
405
|
+
};
|
|
406
|
+
}
|
|
407
|
+
export function getMaskedSecret({ secret, countToShow }) {
|
|
408
|
+
const lc = `[${getMaskedSecret.name}]`;
|
|
409
|
+
try {
|
|
410
|
+
if (logalot) {
|
|
411
|
+
console.log(`${lc} starting... (I: 4d479c342b77f12568501c085b4b0425)`);
|
|
412
|
+
}
|
|
413
|
+
if (secret) {
|
|
414
|
+
if (countToShow > secret.length) {
|
|
415
|
+
if (secret.length === 1) {
|
|
416
|
+
console.warn(`${lc} secret is one character? (W: genuuid)`);
|
|
417
|
+
return secret; // whatever
|
|
418
|
+
}
|
|
419
|
+
else {
|
|
420
|
+
console.warn(`${lc} countToShow is longer than the entire secret! just showing the last two (W: genuuid)`);
|
|
421
|
+
return `****${secret.substring(secret.length - 2)}`;
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
else {
|
|
425
|
+
// show the last countToShow
|
|
426
|
+
const secretMasked = `****${secret.substring(secret.length - countToShow)}`;
|
|
427
|
+
return secretMasked;
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
else {
|
|
431
|
+
console.error(`${lc} secret falsy? empty? returning empty string. (E: genuuid)`);
|
|
432
|
+
return '';
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
catch (error) {
|
|
436
|
+
console.error(`${lc} ${extractErrorMsg(error)}`);
|
|
437
|
+
throw error;
|
|
438
|
+
}
|
|
439
|
+
finally {
|
|
440
|
+
if (logalot) {
|
|
441
|
+
console.log(`${lc} complete.`);
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
export function insertAt({ newItems, index, targetArray, }) {
|
|
446
|
+
const lc = `[${insertAt.name}]`;
|
|
447
|
+
try {
|
|
448
|
+
if (logalot) {
|
|
449
|
+
console.log(`${lc} starting... (I: 5fc3c84d9e08f4ee88978be8bd117a25)`);
|
|
450
|
+
}
|
|
451
|
+
if (index < 0 || index >= targetArray.length) {
|
|
452
|
+
throw new Error(`index (${index}) is out of bounds for targetArray (length ${targetArray.length}) (E: genuuid)`);
|
|
453
|
+
}
|
|
454
|
+
const arrayCopy = [...targetArray];
|
|
455
|
+
arrayCopy.splice(index, 0, ...newItems);
|
|
456
|
+
return arrayCopy;
|
|
457
|
+
}
|
|
458
|
+
catch (error) {
|
|
459
|
+
console.error(`${lc} ${extractErrorMsg(error)}`);
|
|
460
|
+
throw error;
|
|
461
|
+
}
|
|
462
|
+
finally {
|
|
463
|
+
if (logalot) {
|
|
464
|
+
console.log(`${lc} complete.`);
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
export function deleteAt({ targetArray, index, }) {
|
|
469
|
+
const lc = `[${deleteAt.name}]`;
|
|
470
|
+
try {
|
|
471
|
+
if (logalot) {
|
|
472
|
+
console.log(`${lc} starting... (I: 6f2df80039f897a0883714686af97925)`);
|
|
473
|
+
}
|
|
474
|
+
if (index < 0 || index >= targetArray.length) {
|
|
475
|
+
throw new Error(`index (${index}) is out of bounds for targetArray (length ${targetArray.length}) (E: genuuid)`);
|
|
476
|
+
}
|
|
477
|
+
const arrayCopy = [...targetArray];
|
|
478
|
+
arrayCopy.splice(index, 1);
|
|
479
|
+
return arrayCopy;
|
|
480
|
+
}
|
|
481
|
+
catch (error) {
|
|
482
|
+
console.error(`${lc} ${extractErrorMsg(error)}`);
|
|
483
|
+
throw error;
|
|
484
|
+
}
|
|
485
|
+
finally {
|
|
486
|
+
if (logalot) {
|
|
487
|
+
console.log(`${lc} complete.`);
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
export function getShortenedStringWithEllipsis({ str, maxChars, }) {
|
|
492
|
+
const lc = `[${getShortenedStringWithEllipsis.name}]`;
|
|
493
|
+
try {
|
|
494
|
+
if (logalot) {
|
|
495
|
+
console.log(`${lc} starting... (I: 228729c84d2805bc186e96c8cbc56825)`);
|
|
496
|
+
}
|
|
497
|
+
if (str.length <= maxChars) {
|
|
498
|
+
return str;
|
|
499
|
+
}
|
|
500
|
+
else {
|
|
501
|
+
return str.substring(0, maxChars - 1) + '…';
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
catch (error) {
|
|
505
|
+
console.error(`${lc} ${extractErrorMsg(error)}`);
|
|
506
|
+
throw error;
|
|
507
|
+
}
|
|
508
|
+
finally {
|
|
509
|
+
if (logalot) {
|
|
510
|
+
console.log(`${lc} complete.`);
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
//# sourceMappingURL=helpers.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.mjs","sourceRoot":"","sources":["../src/helpers.mts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AAC9G,OAAO,EAAY,KAAK,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAE1E,OAAO,E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