@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,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* these are the variables able to be changed dynamically in the UI.
|
|
3
|
+
*
|
|
4
|
+
* For this to work, these variables must be used in the consuming app's css.
|
|
5
|
+
*/
|
|
6
|
+
export const VALID_CSS_VARIABLES = [
|
|
7
|
+
'--text-color-base',
|
|
8
|
+
'--background-color-base',
|
|
9
|
+
'--border-color-base',
|
|
10
|
+
'--border-width-base',
|
|
11
|
+
'--border-style-base',
|
|
12
|
+
'--font-family-base',
|
|
13
|
+
'--font-size-base',
|
|
14
|
+
'--highlight-border-color',
|
|
15
|
+
'--highlight-box-shadow-color',
|
|
16
|
+
'--side-panel-tab-content-background-color',
|
|
17
|
+
|
|
18
|
+
'--light-background-color',
|
|
19
|
+
'--very-light-background-color',
|
|
20
|
+
|
|
21
|
+
// #region tabs
|
|
22
|
+
'--tab-background-color',
|
|
23
|
+
'--tab-background-color-active',
|
|
24
|
+
'--tab-text-color',
|
|
25
|
+
'--tab-text-color-active',
|
|
26
|
+
'--tab-border-color',
|
|
27
|
+
'--tab-border-color-active',
|
|
28
|
+
'--tab-border-width',
|
|
29
|
+
'--tab-border-width-active',
|
|
30
|
+
'--tab-border-style',
|
|
31
|
+
'--tab-border-radius',
|
|
32
|
+
'--tab-padding',
|
|
33
|
+
// #endregion tabs
|
|
34
|
+
|
|
35
|
+
// #region links
|
|
36
|
+
'--link-color',
|
|
37
|
+
'--link-visited-color',
|
|
38
|
+
'--link-hover-color',
|
|
39
|
+
'--link-text-decoration',
|
|
40
|
+
'--link-hover-text-decoration',
|
|
41
|
+
// #endregion links
|
|
42
|
+
|
|
43
|
+
// #region buttons
|
|
44
|
+
'--button-background-color-base',
|
|
45
|
+
'--button-text-color-base',
|
|
46
|
+
'--button-border-color-base',
|
|
47
|
+
'--button-border-width-base',
|
|
48
|
+
'--button-border-style-base',
|
|
49
|
+
'--button-border-radius-base',
|
|
50
|
+
'--button-padding-base',
|
|
51
|
+
'--button-hover-background-color',
|
|
52
|
+
'--button-hover-text-color',
|
|
53
|
+
'--button-hover-border-color',
|
|
54
|
+
// #endregion buttons
|
|
55
|
+
|
|
56
|
+
// #region inputs
|
|
57
|
+
'--input-background-color',
|
|
58
|
+
'--input-text-color',
|
|
59
|
+
'--input-border-color',
|
|
60
|
+
'--input-border-width',
|
|
61
|
+
'--input-border-style',
|
|
62
|
+
'--input-border-radius',
|
|
63
|
+
'--input-padding',
|
|
64
|
+
// #endregion inputs
|
|
65
|
+
|
|
66
|
+
// #region headings
|
|
67
|
+
'--h1-font-size',
|
|
68
|
+
'--h1-font-weight',
|
|
69
|
+
'--h1-margin',
|
|
70
|
+
'--h2-font-size',
|
|
71
|
+
'--h2-font-weight',
|
|
72
|
+
'--h2-margin',
|
|
73
|
+
'--h3-font-size',
|
|
74
|
+
'--h3-font-weight',
|
|
75
|
+
'--h3-margin',
|
|
76
|
+
// #endregion headings
|
|
77
|
+
|
|
78
|
+
// #region message types
|
|
79
|
+
'--agent-background-color',
|
|
80
|
+
'--agent-text-color',
|
|
81
|
+
'--human-background-color',
|
|
82
|
+
'--human-text-color',
|
|
83
|
+
'--code-background-color',
|
|
84
|
+
'--code-text-color',
|
|
85
|
+
'--function-background-color',
|
|
86
|
+
'--function-text-color',
|
|
87
|
+
'--unknown-background-color',
|
|
88
|
+
'--unknown-text-color',
|
|
89
|
+
// #endregion message types
|
|
90
|
+
|
|
91
|
+
// #region scrollbar
|
|
92
|
+
'--scrollbar-thumb-color',
|
|
93
|
+
'--scrollbar-track-color',
|
|
94
|
+
// #endregion scrollbar
|
|
95
|
+
];
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* 06/2025
|
|
99
|
+
* going to use this for storing/restoring themes
|
|
100
|
+
*/
|
|
101
|
+
export const UI_THEME_INFO_KEY = 'ui-theme-info';
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import { delay, extractErrorMsg, } from "@ibgib/helper-gib/dist/helpers/utils-helper.mjs";
|
|
2
|
+
|
|
3
|
+
import { GLOBAL_LOG_A_LOT } from "../constants.mjs";
|
|
4
|
+
import { UIThemeInfo } from "./ui-types.mjs";
|
|
5
|
+
import { storageGet } from "../storage/storage-helpers.web.mjs";
|
|
6
|
+
import { UI_THEME_INFO_KEY } from "./ui-constants.mjs";
|
|
7
|
+
|
|
8
|
+
const logalot = GLOBAL_LOG_A_LOT;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Shows the fullscreen dialog with the given title, message, and optional prompt.
|
|
12
|
+
*
|
|
13
|
+
* @param {object} details - Options for showing the dialog.
|
|
14
|
+
* @param {string} details.title - Title of the dialog.
|
|
15
|
+
* @param {string} details.message - Message to display in the dialog body.
|
|
16
|
+
* @param {boolean} [details.prompt] - If true, shows a text input for prompting the user.
|
|
17
|
+
* @returns {Promise<string | null>} - A promise that resolves with the text entered by the user (if prompt is true) or null if canceled/dismissed.
|
|
18
|
+
*/
|
|
19
|
+
export async function showFullscreenDialog(opts: {
|
|
20
|
+
title: string,
|
|
21
|
+
msg: string,
|
|
22
|
+
/**
|
|
23
|
+
* determines if to show the cancel button. does NOT control whether or not
|
|
24
|
+
* we show the input control.
|
|
25
|
+
*
|
|
26
|
+
* so if you want to prompt just for a boolean, just set this to true. If
|
|
27
|
+
* you need actual string input from the user, set {@link showInput} to
|
|
28
|
+
* true.
|
|
29
|
+
*
|
|
30
|
+
* @see {@link showInput}
|
|
31
|
+
*/
|
|
32
|
+
prompt?: boolean,
|
|
33
|
+
/**
|
|
34
|
+
* this flag determines if the user input field is shown. If this is truthy,
|
|
35
|
+
* then {@link prompt} will be ignored and always set to `true`.
|
|
36
|
+
*
|
|
37
|
+
* @see {@link prompt}
|
|
38
|
+
*/
|
|
39
|
+
showInput?: boolean,
|
|
40
|
+
defaultValue?: string,
|
|
41
|
+
okButtonTitle?: string,
|
|
42
|
+
cancelButtonTitle?: string,
|
|
43
|
+
isPassword?: boolean,
|
|
44
|
+
}): Promise<string | undefined> {
|
|
45
|
+
const lc = `[${showFullscreenDialog.name}]`;
|
|
46
|
+
try {
|
|
47
|
+
if (logalot) { console.log(`${lc} starting... (I: 037b228a2568181cd3eb25dba4e03225)`); }
|
|
48
|
+
|
|
49
|
+
// const dialog = document.getElementById(ID_FULLSCREEN_DIALOG) as HTMLDialogElement;
|
|
50
|
+
// const dialogBody = document.getElementById(ID_FULLSCREEN_DIALOG_BODY) as HTMLDialogElement;
|
|
51
|
+
// const titleElement = document.getElementById(ID_FULLSCREEN_DIALOG_TITLE) as HTMLElement;
|
|
52
|
+
// const messageElement = document.getElementById(ID_FULLSCREEN_DIALOG_MESSAGE) as HTMLElement;
|
|
53
|
+
// const promptInput = document.getElementById(ID_FULLSCREEN_DIALOG_PROMPT_INPUT) as HTMLInputElement;
|
|
54
|
+
// const okButton = document.getElementById(ID_FULLSCREEN_DIALOG_OK_BUTTON) as HTMLButtonElement;
|
|
55
|
+
// const cancelButton = document.getElementById(ID_FULLSCREEN_DIALOG_CANCEL_BUTTON) as HTMLButtonElement;
|
|
56
|
+
|
|
57
|
+
const dialog = document.getElementById('fullscreen-dialog') as HTMLDialogElement;
|
|
58
|
+
const dialogBody = document.getElementById('fullscreen-dialog-body') as HTMLDialogElement;
|
|
59
|
+
const titleElement = document.getElementById('fullscreen-dialog-title') as HTMLElement;
|
|
60
|
+
const messageElement = document.getElementById('fullscreen-dialog-message') as HTMLElement;
|
|
61
|
+
const promptInput = document.getElementById('fullscreen-dialog-prompt-input') as HTMLInputElement;
|
|
62
|
+
const okButton = document.getElementById('fullscreen-dialog-ok-button') as HTMLButtonElement;
|
|
63
|
+
const cancelButton = document.getElementById('fullscreen-dialog-cancel-button') as HTMLButtonElement;
|
|
64
|
+
|
|
65
|
+
if (!dialog || !dialogBody || !titleElement || !messageElement || !promptInput || !okButton || !cancelButton) {
|
|
66
|
+
throw new Error(`(UNEXPECTED) One or more dialog elements not found in DOM (E: 578e37c0271cc57a99e95e780ad18a25)`);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
titleElement.textContent = opts.title || '';
|
|
70
|
+
[...messageElement.childNodes as any].forEach(child => messageElement.removeChild(child));
|
|
71
|
+
// messageElement.innerHTML = '';
|
|
72
|
+
let msgLines = (opts.msg || '').split('\n');
|
|
73
|
+
msgLines.forEach(line => {
|
|
74
|
+
const pLine = document.createElement('p');
|
|
75
|
+
pLine.textContent = line;
|
|
76
|
+
messageElement.appendChild(pLine);
|
|
77
|
+
});
|
|
78
|
+
// messageElement.textContent = opts.msg || '';
|
|
79
|
+
|
|
80
|
+
// reset the input classList
|
|
81
|
+
promptInput.classList.remove('collapsed');
|
|
82
|
+
cancelButton.classList.remove('collapsed');
|
|
83
|
+
cancelButton.style.display = 'inline-block';
|
|
84
|
+
okButton.textContent = opts.okButtonTitle || 'OK';
|
|
85
|
+
|
|
86
|
+
// Prompt-specific setup
|
|
87
|
+
const onKeypress = (ev: KeyboardEvent) => {
|
|
88
|
+
/**
|
|
89
|
+
* apparently an input has ev.key of 'Enter' but textarea is '\n'
|
|
90
|
+
*/
|
|
91
|
+
const isEnter = ev.key === 'Enter' || ev.key === '\n';
|
|
92
|
+
if (isEnter && ev.ctrlKey) { okButton.click(); }
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
if (opts.prompt || opts.showInput) {
|
|
96
|
+
promptInput.addEventListener('keypress', onKeypress);
|
|
97
|
+
if (opts.showInput) {
|
|
98
|
+
promptInput.autofocus = true;
|
|
99
|
+
promptInput.value = opts.defaultValue ?? '';
|
|
100
|
+
promptInput.addEventListener('keypress', (ev) => {
|
|
101
|
+
if (ev.key === 'Enter') { okButton.click(); }
|
|
102
|
+
});
|
|
103
|
+
if (opts.isPassword) {
|
|
104
|
+
promptInput.type = 'password';
|
|
105
|
+
promptInput.autocomplete = 'off';
|
|
106
|
+
promptInput.required = true;
|
|
107
|
+
} else {
|
|
108
|
+
promptInput.type = 'text';
|
|
109
|
+
promptInput.autocomplete = 'on';
|
|
110
|
+
promptInput.required = false;
|
|
111
|
+
promptInput.attributes['auto-complete'] = 'on';
|
|
112
|
+
}
|
|
113
|
+
} else {
|
|
114
|
+
promptInput.autofocus = false;
|
|
115
|
+
promptInput.classList.add('collapsed');
|
|
116
|
+
}
|
|
117
|
+
cancelButton.textContent = opts.cancelButtonTitle || 'Cancel';
|
|
118
|
+
} else {
|
|
119
|
+
promptInput.classList.add('collapsed'); // Hide prompt input
|
|
120
|
+
cancelButton.style.display = 'none'; // Hide cancel button for alerts
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
return new Promise<string | undefined>((resolve) => {
|
|
124
|
+
// handlers
|
|
125
|
+
|
|
126
|
+
/** helper used in other handlers */
|
|
127
|
+
const removeEventListeners = () => {
|
|
128
|
+
if (opts.prompt || opts.showInput) {
|
|
129
|
+
promptInput.removeEventListener('keypress', onKeypress);
|
|
130
|
+
}
|
|
131
|
+
okButton.removeEventListener('click', onOK);
|
|
132
|
+
cancelButton.removeEventListener('click', onCancel);
|
|
133
|
+
dialog.removeEventListener('close', onClose); // Remove dialog-level listener too
|
|
134
|
+
};
|
|
135
|
+
/** user clicks OK or hits "ENTER" in input */
|
|
136
|
+
const onOK = () => {
|
|
137
|
+
removeEventListeners();
|
|
138
|
+
let result = opts.showInput ?
|
|
139
|
+
promptInput.value ?? '' :
|
|
140
|
+
true.toString();
|
|
141
|
+
if (promptInput) { promptInput.value = ''; } // Clear input for next time
|
|
142
|
+
dialog.close(result);
|
|
143
|
+
resolve(result);
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
/** user actively clicks Cancel */
|
|
147
|
+
const onCancel = () => {
|
|
148
|
+
removeEventListeners();
|
|
149
|
+
if (promptInput) { promptInput.value = ''; } // Clear input for next time
|
|
150
|
+
dialog.close(undefined); // Pass back null for cancel
|
|
151
|
+
resolve(undefined);
|
|
152
|
+
};
|
|
153
|
+
/**
|
|
154
|
+
* Handle dialog.close() without button click (e.g., Esc key)
|
|
155
|
+
*
|
|
156
|
+
* NOTE: this does not trigger when dialog.close() is executed. This
|
|
157
|
+
* is only firing when esc is pressed.
|
|
158
|
+
*/
|
|
159
|
+
const onClose = () => {
|
|
160
|
+
removeEventListeners();
|
|
161
|
+
if (promptInput) { promptInput.value = ''; } // Clear input for next time
|
|
162
|
+
dialog.close(undefined);
|
|
163
|
+
resolve(undefined);
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
// wire up
|
|
167
|
+
okButton.addEventListener('click', onOK);
|
|
168
|
+
cancelButton.addEventListener('click', onCancel);
|
|
169
|
+
dialog.addEventListener('close', onClose); // e.g. escape key
|
|
170
|
+
|
|
171
|
+
// show it
|
|
172
|
+
dialog.showModal();
|
|
173
|
+
delay(1000).then(() => {
|
|
174
|
+
dialogBody.scrollTo({ top: 0, behavior: 'smooth' });
|
|
175
|
+
});
|
|
176
|
+
});
|
|
177
|
+
} catch (error) {
|
|
178
|
+
console.error(`${lc} ${extractErrorMsg(error)}`);
|
|
179
|
+
throw error;
|
|
180
|
+
} finally {
|
|
181
|
+
if (logalot) { console.log(`${lc} complete.`); }
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export async function getExistingUIInfo({
|
|
186
|
+
dbName,
|
|
187
|
+
storeName,
|
|
188
|
+
key = UI_THEME_INFO_KEY,
|
|
189
|
+
}: {
|
|
190
|
+
dbName: string,
|
|
191
|
+
storeName: string,
|
|
192
|
+
key?: string,
|
|
193
|
+
}): Promise<UIThemeInfo | undefined> {
|
|
194
|
+
const lc = `[${getExistingUIInfo.name}]`;
|
|
195
|
+
try {
|
|
196
|
+
if (logalot) { console.log(`${lc} starting... (I: 4c9d7c7f1e8bfcc917d405b842438825)`); }
|
|
197
|
+
|
|
198
|
+
key ??= UI_THEME_INFO_KEY;
|
|
199
|
+
|
|
200
|
+
let existingUIInfo: UIThemeInfo | undefined = undefined;
|
|
201
|
+
const existingUIInfoAsString = await storageGet({
|
|
202
|
+
dbName,
|
|
203
|
+
storeName,
|
|
204
|
+
key,
|
|
205
|
+
});
|
|
206
|
+
if (existingUIInfoAsString) {
|
|
207
|
+
try {
|
|
208
|
+
existingUIInfo = JSON.parse(existingUIInfoAsString) as UIThemeInfo;
|
|
209
|
+
if (!existingUIInfo.cssVariableOverrides) { throw new Error(`invalid existing UI info (E: 2fb408362178ce79a57da313d6680d25)`); }
|
|
210
|
+
} catch (error) {
|
|
211
|
+
existingUIInfo = undefined;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
return existingUIInfo;
|
|
216
|
+
} catch (error) {
|
|
217
|
+
console.error(`${lc} ${extractErrorMsg(error)}`);
|
|
218
|
+
throw error;
|
|
219
|
+
} finally {
|
|
220
|
+
if (logalot) { console.log(`${lc} complete.`); }
|
|
221
|
+
}
|
|
222
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* beginning of agent.ib
|
|
4
|
+
*/
|
|
5
|
+
export const AGENT_ATOM = 'witness_agent';
|
|
6
|
+
export const AGENT_NAME_REGEXP = /^[a-zA-Z0-9_\-.]{1,32}$/;
|
|
7
|
+
export const AGENT_DESC_REGEXP = /.{1,255}/;
|
|
8
|
+
|
|
9
|
+
export const DEFAULT_UUID_AGENT = '';
|
|
10
|
+
export const DEFAULT_NAME_AGENT = 'Manco';
|
|
11
|
+
export const DEFAULT_DESCRIPTION_AGENT = 'This is a generic, unspecified agent.';
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* demarcates a block of entries loaded from ibgibs requested by the model on a
|
|
16
|
+
* one-time basis.
|
|
17
|
+
*/
|
|
18
|
+
export const CONTEXT_DECOMPRESSION_TAG = 'CONTEXT_DECOMPRESSION_REFERENCE';
|
|
19
|
+
/**
|
|
20
|
+
* demarcates a block of function info ibgib addresses
|
|
21
|
+
*/
|
|
22
|
+
export const FUNCTION_CALL_REQUEST_COMMENT_TAG = 'List of function info ibgib addresses. These contain info on both the requests you made and the resultant values.';
|
|
23
|
+
|
|
24
|
+
// export const PRIMARY_AGENT_SPECIAL_IBGIB_TYPE = 'primaryagent';
|
|
25
|
+
// export const PRIMARY_AGENT_SPECIAL_IBGIB_NAME = 'Robbie';
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* this is the rel8nName ON the special ibgib index that points to its agents.
|
|
29
|
+
*
|
|
30
|
+
* So `agentIndex.rel8ns[AGENT_REL8N_NAME]` is a list of the agents (addrs)
|
|
31
|
+
* registered in the space.
|
|
32
|
+
*
|
|
33
|
+
* @see {@link MetaspaceService.getSpecialIbGib}
|
|
34
|
+
* @see {@link MetaspaceService.getSpecialRel8dIbGibs}
|
|
35
|
+
*/
|
|
36
|
+
export const AGENT_REL8N_NAME = 'agent';
|
|
37
|
+
|
|
38
|
+
export const GEMINI_SCHEMA_AGENT_ID = {
|
|
39
|
+
type: 'string',
|
|
40
|
+
description: 'unique identifier for the agent. Should be provided to the agent in system instructions upon creation.',
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export const GEMINI_SCHEMA_AGENT_TYPE = {
|
|
44
|
+
type: 'string',
|
|
45
|
+
description: 'type of the agent that governs basic responsibilities. Should be provided to the agent in system instructions upon creation.',
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export const GEMINI_SCHEMA_SPACE_ID_FORAGENTS = {
|
|
49
|
+
type: 'string',
|
|
50
|
+
description: 'the id of a space, usually local user space. Each agent, atow (04/2025), has two spaces: a superSpace and a subSpace. The superSpace right now is just the default local user space for all agents, though this may change. The subSpace is particular only to the agent and corresponds to where internal ibgib notes/memories should be stored. So use the subSpace for internal notes, and superSpace for any user/interagent communications/notes.',
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// #region TextSource enum
|
|
54
|
+
/**
|
|
55
|
+
* @see {@link TextSource.HARDCODED}
|
|
56
|
+
*/
|
|
57
|
+
const TEXT_SOURCE_HARDCODED = 'hardcoded';
|
|
58
|
+
/**
|
|
59
|
+
* @see {@link TextSource.HUMAN}
|
|
60
|
+
*/
|
|
61
|
+
const TEXT_SOURCE_HUMAN = 'human';
|
|
62
|
+
/**
|
|
63
|
+
* @see {@link TextSource.AI}
|
|
64
|
+
*/
|
|
65
|
+
const TEXT_SOURCE_AI = 'ai';
|
|
66
|
+
/**
|
|
67
|
+
* @see {@link TextSource.FUNCTION}
|
|
68
|
+
*/
|
|
69
|
+
const TEXT_SOURCE_FUNCTION = 'function';
|
|
70
|
+
/**
|
|
71
|
+
* @see {@link TextSource.UNKNOWN}
|
|
72
|
+
*/
|
|
73
|
+
const TEXT_SOURCE_UNKNOWN = 'unknown';
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* @see {@link TextSource}
|
|
77
|
+
*/
|
|
78
|
+
export type TextSource =
|
|
79
|
+
| typeof TEXT_SOURCE_HARDCODED
|
|
80
|
+
| typeof TEXT_SOURCE_HUMAN
|
|
81
|
+
| typeof TEXT_SOURCE_AI
|
|
82
|
+
| typeof TEXT_SOURCE_FUNCTION
|
|
83
|
+
| typeof TEXT_SOURCE_UNKNOWN
|
|
84
|
+
;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* The source of the text, which helps the LLM differentiate
|
|
88
|
+
*/
|
|
89
|
+
export const TextSource = {
|
|
90
|
+
/**
|
|
91
|
+
* The text was hardcoded in the system.
|
|
92
|
+
*/
|
|
93
|
+
HARDCODED: TEXT_SOURCE_HARDCODED as TextSource,
|
|
94
|
+
/**
|
|
95
|
+
* The text originated from a human.
|
|
96
|
+
*/
|
|
97
|
+
HUMAN: TEXT_SOURCE_HUMAN as TextSource,
|
|
98
|
+
/**
|
|
99
|
+
* The text originated from an AI.
|
|
100
|
+
*/
|
|
101
|
+
AI: TEXT_SOURCE_AI as TextSource,
|
|
102
|
+
/**
|
|
103
|
+
* The text originated from a function, e.g. a function response/result.
|
|
104
|
+
*/
|
|
105
|
+
FUNCTION: TEXT_SOURCE_FUNCTION as TextSource,
|
|
106
|
+
/**
|
|
107
|
+
* The origin is unknown.
|
|
108
|
+
*/
|
|
109
|
+
UNKNOWN: TEXT_SOURCE_UNKNOWN as TextSource,
|
|
110
|
+
} satisfies { [key: string]: TextSource };
|
|
111
|
+
|
|
112
|
+
export const TEXT_SOURCE_VALUES = Object.freeze(Object.values(TextSource));
|
|
113
|
+
export function isTextSource(str: string): str is TextSource {
|
|
114
|
+
return !!str && TEXT_SOURCE_VALUES.includes(str as TextSource);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// #endregion TextSource enum
|
|
118
|
+
|
|
119
|
+
export const GEMINI_SCHEMA_AGENTS_SELF_IDENTIFIED_NAME = {
|
|
120
|
+
type: 'string',
|
|
121
|
+
description: `The agent should pick a name with which to represent him/her/itself to the user. This should not be "Gemini" or something bland like that, rather, it should be a name that the agent likes. Should contain no spaces, only alphanumerics. Note that the example given has a name, but really it should be up to the agent's own preference. Please be consistent with this with yourself, i.e., don't change it once established. Must pass regex: ${AGENT_NAME_REGEXP.source}`,
|
|
122
|
+
};
|