@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,362 @@
|
|
|
1
|
+
import {
|
|
2
|
+
extractErrorMsg, getTimestamp, getTimestampInTicks,
|
|
3
|
+
} from '@ibgib/helper-gib/dist/helpers/utils-helper.mjs';
|
|
4
|
+
import { UUID_REGEXP } from '@ibgib/helper-gib/dist/constants.mjs';
|
|
5
|
+
import { Ib, TransformResult } from '@ibgib/ts-gib/dist/types.mjs';
|
|
6
|
+
import { IbGibData_V1, IbGibRel8ns_V1, IbGib_V1 } from '@ibgib/ts-gib/dist/V1/types.mjs';
|
|
7
|
+
import { Factory_V1 } from '@ibgib/ts-gib/dist/V1/factory.mjs';
|
|
8
|
+
import { getIbGibAddr } from '@ibgib/ts-gib/dist/helper.mjs';
|
|
9
|
+
import { IbGibSpaceAny } from '@ibgib/core-gib/dist/witness/space/space-base-v1.mjs';
|
|
10
|
+
import { MetaspaceService } from '@ibgib/core-gib/dist/witness/space/metaspace/metaspace-types.mjs';
|
|
11
|
+
import { getTimestampInfo } from '@ibgib/core-gib/dist/common/other/ibgib-helper.mjs';
|
|
12
|
+
|
|
13
|
+
import { GLOBAL_LOG_A_LOT } from '../../../constants.mjs';
|
|
14
|
+
import { AgentAPI } from '../agent-types.mjs';
|
|
15
|
+
|
|
16
|
+
const logalot = GLOBAL_LOG_A_LOT;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* used as a rel8nName to link a Function Call Request (FCR) comment ibgib to
|
|
20
|
+
* the actual function call info ibgibs that represent each FCR.
|
|
21
|
+
*/
|
|
22
|
+
export const FUNCTION_INFO_REL8N_NAME = 'function_info';
|
|
23
|
+
|
|
24
|
+
export const FUNCTION_INFO_ATOM = 'function_info';
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* @interface FunctionInfoIbInfo - Type for parsed function info ib.
|
|
28
|
+
* Used by parseFunctionInfoIb
|
|
29
|
+
*/
|
|
30
|
+
export interface FunctionInfoIbInfo {
|
|
31
|
+
atom: string;
|
|
32
|
+
timestampInTicks: string;
|
|
33
|
+
model: string;
|
|
34
|
+
api: AgentAPI;
|
|
35
|
+
agentId: string;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* builds the function info ibgib's ib based on given {@link data}
|
|
40
|
+
* @see {@link parseFunctionInfoIb}
|
|
41
|
+
*/
|
|
42
|
+
export function getFunctionInfoIb({
|
|
43
|
+
data,
|
|
44
|
+
}: {
|
|
45
|
+
/** function info data, should be valid */
|
|
46
|
+
data: FunctionInfoData_V1,
|
|
47
|
+
}): string {
|
|
48
|
+
const lc = `[${getFunctionInfoIb.name}]`;
|
|
49
|
+
const { model, api, agentId, timestamp, } = data;
|
|
50
|
+
if (!model) { throw new Error(`${lc} data.model falsy (E: 6f47a28c0a8a45d794149c83e8f27e25)`); }
|
|
51
|
+
if (!api) { throw new Error(`${lc} data.api falsy (E: a0a812508a952a87c619d38084b7e325)`); }
|
|
52
|
+
if (!agentId) { throw new Error(`${lc} data.agentId falsy (E: ac35c1592c458e2c0e5908f6a9a3e525)`); }
|
|
53
|
+
const timestampInTicks = getTimestampInTicks(timestamp);
|
|
54
|
+
const fields: string[] = [model, api, agentId, timestampInTicks];
|
|
55
|
+
if (fields.some(x => x.includes(' '))) { throw new Error(`invalid data. ib must not contain spaces (E: 36a56e4685163848458be06f51d4ad25)`); }
|
|
56
|
+
|
|
57
|
+
return [
|
|
58
|
+
FUNCTION_INFO_ATOM,
|
|
59
|
+
timestampInTicks,
|
|
60
|
+
model,
|
|
61
|
+
api,
|
|
62
|
+
agentId,
|
|
63
|
+
].join(' ');
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* @returns parsed info from an ib
|
|
68
|
+
* @see {@link getFunctionInfoIb}
|
|
69
|
+
*/
|
|
70
|
+
export function parseFunctionInfoIb({
|
|
71
|
+
ib,
|
|
72
|
+
}: {
|
|
73
|
+
ib: Ib,
|
|
74
|
+
}): FunctionInfoIbInfo {
|
|
75
|
+
const lc = `[${parseFunctionInfoIb.name}]`;
|
|
76
|
+
/** getFunctionInfoIb must match parseFunctionInfoIb. If this array changes, change the other one. */
|
|
77
|
+
const [
|
|
78
|
+
atom,
|
|
79
|
+
timestampInTicks,
|
|
80
|
+
model,
|
|
81
|
+
api,
|
|
82
|
+
agentId,
|
|
83
|
+
] = ib.split(' ');
|
|
84
|
+
if (atom !== FUNCTION_INFO_ATOM) { throw new Error(`invalid ib. first term expected to e an atom: ${FUNCTION_INFO_ATOM} (E: 3c01d42035d2e32c4bfd5c1bf363f725)`); }
|
|
85
|
+
|
|
86
|
+
return { atom, timestampInTicks, model, api: api as AgentAPI, agentId };
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Validates a `FunctionInfoIb` and returns a list of any errors.
|
|
91
|
+
*
|
|
92
|
+
* @param {object} arg - Options for validating the `ib`.
|
|
93
|
+
* @param {string} arg.ib - `ib` to validate.
|
|
94
|
+
* @returns {string[]} - list of validation errors or an empty array if valid.
|
|
95
|
+
*/
|
|
96
|
+
export function validateFunctionInfoIb({
|
|
97
|
+
ib,
|
|
98
|
+
}: {
|
|
99
|
+
ib: Ib,
|
|
100
|
+
}): string[] {
|
|
101
|
+
const lc = `[${validateFunctionInfoIb.name}]`;
|
|
102
|
+
try {
|
|
103
|
+
if (logalot) { console.log(`${lc} starting...`); }
|
|
104
|
+
|
|
105
|
+
const errors: string[] = [];
|
|
106
|
+
let parsed: FunctionInfoIbInfo;
|
|
107
|
+
|
|
108
|
+
try {
|
|
109
|
+
parsed = parseFunctionInfoIb({ ib });
|
|
110
|
+
} catch (error: any) {
|
|
111
|
+
errors.push(`${lc} error parsing ib: ${extractErrorMsg(error)} (E: a1c09537f9f6485427c30b74d27c9a25)`);
|
|
112
|
+
return errors; /* <<<< returns early if parsing fails */
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
const {
|
|
116
|
+
atom,
|
|
117
|
+
timestampInTicks,
|
|
118
|
+
model,
|
|
119
|
+
api,
|
|
120
|
+
agentId,
|
|
121
|
+
} = parsed;
|
|
122
|
+
|
|
123
|
+
if (atom !== FUNCTION_INFO_ATOM) {
|
|
124
|
+
errors.push(`${lc} invalid ib. atom is expected to be FUNCTION_INFO_ATOM: ${FUNCTION_INFO_ATOM} (E: a9812bffc18f44418aa091fb0ed260bd)`)
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// timestampInTicks
|
|
128
|
+
if (timestampInTicks === 'undefined') {
|
|
129
|
+
// this happens when it's a binary ibgib or just doesn't have a timestamp in the data map
|
|
130
|
+
errors.push(`invalid ib. timestampInTicks is falsy (E: 0985656eb2084046a43845a8f9d47d25)`)
|
|
131
|
+
} else {
|
|
132
|
+
const timestampInfo = getTimestampInfo({ timestamp: timestampInTicks });
|
|
133
|
+
if (!timestampInfo.valid) {
|
|
134
|
+
errors.push(`invalid ib. pieces[3] should be valid timestampInTicks. emsg: (${timestampInfo.emsg}) (E: 06dae01d66f54f54b71d9c920c730840)`);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
if (!model) {
|
|
138
|
+
errors.push(`invalid ib. model is falsy (E: 654678f3a1e86f0c9811b8a3749d4e25)`);
|
|
139
|
+
}
|
|
140
|
+
if (!api) {
|
|
141
|
+
errors.push(`invalid ib. api is falsy (E: a20c879391850c9396e13f27e8469025)`);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
if (agentId) {
|
|
145
|
+
if (!agentId.match(UUID_REGEXP)) {
|
|
146
|
+
errors.push(`invalid ib. agentId does not match expected UUID_REGEXP: ${UUID_REGEXP} (E: 3e7a70c28190777178693150563d6725)`)
|
|
147
|
+
}
|
|
148
|
+
} else {
|
|
149
|
+
errors.push(`invalid ib. agentId is falsy (E: 9b5c4d2f74698557e2c1173947e35e25)`);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
return errors;
|
|
153
|
+
} catch (error) {
|
|
154
|
+
console.error(`${lc} ${extractErrorMsg(error)}`);
|
|
155
|
+
throw error;
|
|
156
|
+
} finally {
|
|
157
|
+
if (logalot) { console.log(`${lc} complete.`); }
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Information required when creating an info ibgib.
|
|
163
|
+
*
|
|
164
|
+
* ATOW (01/2025) Note that this does NOT save the ibgib in any spaces.
|
|
165
|
+
*/
|
|
166
|
+
export interface CreateFunctionInfoIbGibArgs {
|
|
167
|
+
/**
|
|
168
|
+
* raw string of the function call requested by the model.
|
|
169
|
+
*/
|
|
170
|
+
fnRawRequest: string;
|
|
171
|
+
/**
|
|
172
|
+
* which api (e.g. 'gemini') was used when generating the function call
|
|
173
|
+
* request.
|
|
174
|
+
* @see {@link model}
|
|
175
|
+
* @see {@link FunctionInfoData_V1.api}
|
|
176
|
+
*/
|
|
177
|
+
api: AgentAPI;
|
|
178
|
+
/**
|
|
179
|
+
* model that generated the request
|
|
180
|
+
* @see {@link api}
|
|
181
|
+
* @see {@link FunctionInfoData_V1.model}
|
|
182
|
+
*/
|
|
183
|
+
model: string;
|
|
184
|
+
/**
|
|
185
|
+
* id of the agent that this will be associated with
|
|
186
|
+
*/
|
|
187
|
+
agentId: string;
|
|
188
|
+
/**
|
|
189
|
+
* name of the function.
|
|
190
|
+
*
|
|
191
|
+
* in gemini, this should be provided easily and we shouldn't need a regex for it.
|
|
192
|
+
*/
|
|
193
|
+
fnName: string;
|
|
194
|
+
/**
|
|
195
|
+
* parsed args from the raw request string
|
|
196
|
+
*/
|
|
197
|
+
fnArgs: any;
|
|
198
|
+
/**
|
|
199
|
+
* the result of a successful functionImpl, otherwise undefined.
|
|
200
|
+
* @see {@link FunctionInfoData_V1.fnResult}
|
|
201
|
+
*/
|
|
202
|
+
fnResult?: any;
|
|
203
|
+
/**
|
|
204
|
+
* flag that indicates if the function completed successfully.
|
|
205
|
+
* @see {@link FunctionInfoData_V1.fnComplete}
|
|
206
|
+
*/
|
|
207
|
+
fnComplete?: boolean;
|
|
208
|
+
/**
|
|
209
|
+
* This is the error msg if there was an error actually parsing the raw
|
|
210
|
+
* function info.
|
|
211
|
+
* @see {@link execErrorMsg}
|
|
212
|
+
*/
|
|
213
|
+
parseErrorMsg?: string;
|
|
214
|
+
/**
|
|
215
|
+
* This is the error msg if there was an error actually executing the
|
|
216
|
+
* function.
|
|
217
|
+
* @see {@link parseErrorMsg}
|
|
218
|
+
*/
|
|
219
|
+
execErrorMsg?: string;
|
|
220
|
+
/**
|
|
221
|
+
* corresponds to whether or not the model wanted to be notified upon function completion/error.
|
|
222
|
+
* @see {@link FunctionInfoData_V1.repromptWithResult}
|
|
223
|
+
*/
|
|
224
|
+
repromptWithResult?: boolean;
|
|
225
|
+
/**
|
|
226
|
+
* should we save the newly created ibgib and its dependency graph?
|
|
227
|
+
* @see {@link metaspace}
|
|
228
|
+
*/
|
|
229
|
+
saveInSpace?: boolean;
|
|
230
|
+
/**
|
|
231
|
+
* if {@link saveInSpace}, this is the required metaspace to handle saving.
|
|
232
|
+
* @see {@link space}
|
|
233
|
+
*/
|
|
234
|
+
metaspace?: MetaspaceService;
|
|
235
|
+
/**
|
|
236
|
+
* if {@link saveInSpace}, this is the required space in which to save.
|
|
237
|
+
* @see {@link metaspace}
|
|
238
|
+
*/
|
|
239
|
+
space?: IbGibSpaceAny;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Creates a new FunctionInfoIbGib_V1 object.
|
|
244
|
+
*
|
|
245
|
+
* @param {object} arg - Arguments for creating the new ibgib
|
|
246
|
+
* @returns {Promise<FunctionInfoIbGib_V1>} A promise that resolves to the new FunctionInfoIbGib_V1 object.
|
|
247
|
+
* @throws {Error} If there is an error during ibgib creation.
|
|
248
|
+
*/
|
|
249
|
+
export async function createFunctionInfoIbGib(arg: CreateFunctionInfoIbGibArgs): Promise<TransformResult<FunctionInfoIbGib_V1>> {
|
|
250
|
+
const lc = `[${createFunctionInfoIbGib.name}]`;
|
|
251
|
+
try {
|
|
252
|
+
if (logalot) { console.log(`${lc} starting... (I: f4c9f0810a4d877f676297f6e6a96825)`); }
|
|
253
|
+
let {
|
|
254
|
+
fnRawRequest, api, model, agentId,
|
|
255
|
+
fnName, fnArgs,
|
|
256
|
+
fnResult, fnComplete,
|
|
257
|
+
parseErrorMsg, execErrorMsg,
|
|
258
|
+
repromptWithResult,
|
|
259
|
+
saveInSpace, metaspace, space,
|
|
260
|
+
} = arg;
|
|
261
|
+
|
|
262
|
+
const date = new Date();
|
|
263
|
+
const data: FunctionInfoData_V1 = {
|
|
264
|
+
name: model,
|
|
265
|
+
timestamp: getTimestamp(date),
|
|
266
|
+
timestampMs: date.getMilliseconds(),
|
|
267
|
+
agentId,
|
|
268
|
+
api, model,
|
|
269
|
+
fnRawRequest,
|
|
270
|
+
fnName, fnArgs,
|
|
271
|
+
fnResult, fnComplete,
|
|
272
|
+
repromptWithResult,
|
|
273
|
+
};
|
|
274
|
+
if (parseErrorMsg) { data.parseErrorMsg = parseErrorMsg };
|
|
275
|
+
if (execErrorMsg) { data.execErrorMsg = execErrorMsg };
|
|
276
|
+
const ib = getFunctionInfoIb({ data });
|
|
277
|
+
|
|
278
|
+
const resFunctionInfo = await Factory_V1.firstGen({
|
|
279
|
+
ib,
|
|
280
|
+
parentIbGib: Factory_V1.primitive({ ib: FUNCTION_INFO_ATOM }),
|
|
281
|
+
data,
|
|
282
|
+
nCounter: true, dna: true,
|
|
283
|
+
tjp: { uuid: true, }, // no timestamp because we're doing that manually
|
|
284
|
+
}) as TransformResult<FunctionInfoIbGib_V1>;
|
|
285
|
+
if (logalot) { console.log(`${lc} created functionInfoIbGib (I: e50d2e17f43312d4f4739899306bb725)`); }
|
|
286
|
+
|
|
287
|
+
if (saveInSpace) {
|
|
288
|
+
if (!metaspace) { throw new Error(`${lc} metaspace must be provided if saveInSpace is set to true (E: e74b76b00124d5874a6c5404e794b725)`); }
|
|
289
|
+
if (!space) { throw new Error(`${lc} space must be provided if saveInSpace is set to true (E: f3d5f1695a52707114117f72d932a025)`); }
|
|
290
|
+
await metaspace.persistTransformResult({ resTransform: resFunctionInfo, space });
|
|
291
|
+
if (logalot) { console.log(`${lc} persisted resFunctionInfo (${getIbGibAddr({ ibGib: resFunctionInfo.newIbGib })}) to space ${space.data?.uuid} (I: aa98e877d3b34e0d2a3b7711f8f27e25)`); }
|
|
292
|
+
await metaspace.registerNewIbGib({ ibGib: resFunctionInfo.newIbGib, space });
|
|
293
|
+
if (logalot) { console.log(`${lc} registered new function info ibgib (${getIbGibAddr({ ibGib: resFunctionInfo.newIbGib })}) with metaspace (I: aa98e877d3b34e0d2a3b7711f8f27e25)`); }
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
return resFunctionInfo;
|
|
297
|
+
} catch (error) {
|
|
298
|
+
console.error(`${lc} ${extractErrorMsg(error)}`);
|
|
299
|
+
throw error;
|
|
300
|
+
} finally {
|
|
301
|
+
if (logalot) { console.log(`${lc} complete.`); }
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* @interface FunctionInfoData_V1
|
|
307
|
+
* Data interface for a function call.
|
|
308
|
+
*/
|
|
309
|
+
export interface FunctionInfoData_V1 extends IbGibData_V1 {
|
|
310
|
+
/**
|
|
311
|
+
* which model generated this function request.
|
|
312
|
+
*/
|
|
313
|
+
model: string;
|
|
314
|
+
/**
|
|
315
|
+
* Which api was used to generate this function request.
|
|
316
|
+
*/
|
|
317
|
+
api: AgentAPI;
|
|
318
|
+
/**
|
|
319
|
+
* This is the raw JSON string that was returned from the LLM function call
|
|
320
|
+
*/
|
|
321
|
+
fnRawRequest: string;
|
|
322
|
+
/**
|
|
323
|
+
* name of the function.
|
|
324
|
+
*
|
|
325
|
+
* in gemini, this should be provided easily and we shouldn't need a regex for it.
|
|
326
|
+
*/
|
|
327
|
+
fnName: string;
|
|
328
|
+
/**
|
|
329
|
+
* parsed args from the raw request string
|
|
330
|
+
*/
|
|
331
|
+
fnArgs: any;
|
|
332
|
+
/**
|
|
333
|
+
* The results of the called function. If the function implementation called
|
|
334
|
+
* returns void/Promise<void> then this should remain undefined.
|
|
335
|
+
*/
|
|
336
|
+
fnResult?: any;
|
|
337
|
+
/**
|
|
338
|
+
* Was the functionImpl completed without issue? If it returned void, this
|
|
339
|
+
* should be set to true, but this may be used for other workflows in the
|
|
340
|
+
* future.
|
|
341
|
+
*/
|
|
342
|
+
fnComplete?: boolean;
|
|
343
|
+
/**
|
|
344
|
+
* Is the function call request intended to have its result reprompted to the model
|
|
345
|
+
* upon function completion or error?
|
|
346
|
+
*/
|
|
347
|
+
repromptWithResult?: boolean;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* @interface FunctionInfoRel8ns_V1 - Rel8ns interface for function info ibgibs.
|
|
352
|
+
* Extends {@link IbGibRel8ns_V1}
|
|
353
|
+
*/
|
|
354
|
+
export interface FunctionInfoRel8ns_V1 extends IbGibRel8ns_V1 {
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* @interface FunctionInfoIbGib_V1 - Interface for ibgibs of individual function calls.
|
|
359
|
+
* Extends {@link IbGib_V1} with {@link FunctionInfoData_V1} and {@link FunctionInfoRel8ns_V1}
|
|
360
|
+
*/
|
|
361
|
+
export interface FunctionInfoIbGib_V1 extends IbGib_V1<FunctionInfoData_V1, FunctionInfoRel8ns_V1> {
|
|
362
|
+
}
|