aimeat 3.2.0 → 3.3.0
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/dist/.env.example +58 -1
- package/dist/build-stamp.json +4 -4
- package/dist/locales/en.json +41 -1
- package/dist/locales/es.json +41 -1
- package/dist/locales/fi.json +43 -3
- package/dist/public/changelog.json +12 -0
- package/dist/public/css/views/chat.css +388 -0
- package/dist/public/js/services/chat.js +190 -0
- package/dist/public/js/services/speech-reader.js +26 -0
- package/dist/public/lib/VENDORED.md +1 -0
- package/dist/public/lib/duckdb-wasm@1.32.0/duckdb-browser-eh.worker.js +14 -0
- package/dist/public/lib/duckdb-wasm@1.32.0/duckdb-browser.js +23 -0
- package/dist/public/lib/duckdb-wasm@1.32.0/duckdb-eh.wasm +0 -0
- package/dist/public/lib/duckdb-wasm@1.32.0/extensions/v1.4.3/wasm_eh/parquet.duckdb_extension.wasm +0 -0
- package/dist/public/lib/vendored-assets.json +19 -0
- package/dist/public/llms-full-template.txt +2706 -0
- package/dist/public/llms-index-template.txt +60 -0
- package/dist/public/robots.node.txt +64 -23
- package/dist/public/spa.html +8 -1
- package/dist/public/views/chat/parts.js +257 -0
- package/dist/public/views/chat.js +327 -0
- package/dist/public/views/landing.js +24 -1
- package/dist/public/views/profile/agents/scope-model.js +320 -315
- package/dist/scripts/audit-mcp-schemas.js +41 -0
- package/dist/scripts/audit-mcp-schemas.js.map +1 -1
- package/dist/scripts/build-sdk-libs.d.ts.map +1 -1
- package/dist/scripts/build-sdk-libs.js +1 -0
- package/dist/scripts/build-sdk-libs.js.map +1 -1
- package/dist/scripts/check-ai-disclosure.js +11 -0
- package/dist/scripts/check-ai-disclosure.js.map +1 -1
- package/dist/scripts/check-denial-coverage.d.ts +29 -0
- package/dist/scripts/check-denial-coverage.d.ts.map +1 -0
- package/dist/scripts/check-denial-coverage.js +237 -0
- package/dist/scripts/check-denial-coverage.js.map +1 -0
- package/dist/scripts/check-ext-entrypoints.js +14 -2
- package/dist/scripts/check-ext-entrypoints.js.map +1 -1
- package/dist/scripts/check-outbound-fetch.d.ts.map +1 -1
- package/dist/scripts/check-outbound-fetch.js +16 -2
- package/dist/scripts/check-outbound-fetch.js.map +1 -1
- package/dist/scripts/check-sse-parity.js +14 -0
- package/dist/scripts/check-sse-parity.js.map +1 -1
- package/dist/scripts/indexnow.js +9 -7
- package/dist/scripts/indexnow.js.map +1 -1
- package/dist/src/auth/middleware.d.ts +7 -0
- package/dist/src/auth/middleware.d.ts.map +1 -1
- package/dist/src/auth/middleware.js +15 -21
- package/dist/src/auth/middleware.js.map +1 -1
- package/dist/src/cli/connect/mcp/tools/agent-tasks.d.ts +4 -0
- package/dist/src/cli/connect/mcp/tools/agent-tasks.d.ts.map +1 -1
- package/dist/src/cli/connect/mcp/tools/agent-tasks.js +11 -1
- package/dist/src/cli/connect/mcp/tools/agent-tasks.js.map +1 -1
- package/dist/src/cli/connect/mcp/tools/apps.d.ts.map +1 -1
- package/dist/src/cli/connect/mcp/tools/apps.js +88 -0
- package/dist/src/cli/connect/mcp/tools/apps.js.map +1 -1
- package/dist/src/cli/connect/mcp/tools/core.d.ts +7 -0
- package/dist/src/cli/connect/mcp/tools/core.d.ts.map +1 -1
- package/dist/src/cli/connect/mcp/tools/core.js +83 -4
- package/dist/src/cli/connect/mcp/tools/core.js.map +1 -1
- package/dist/src/cli/connect/onboarding-prompt.js +1 -1
- package/dist/src/cli/connect/skill-bundle.js +1 -1
- package/dist/src/cli/connect/tool-call-defs-app-draft-edit.d.ts +21 -0
- package/dist/src/cli/connect/tool-call-defs-app-draft-edit.d.ts.map +1 -0
- package/dist/src/cli/connect/tool-call-defs-app-draft-edit.js +137 -0
- package/dist/src/cli/connect/tool-call-defs-app-draft-edit.js.map +1 -0
- package/dist/src/cli/connect/tool-call-defs-core.d.ts +1 -0
- package/dist/src/cli/connect/tool-call-defs-core.d.ts.map +1 -1
- package/dist/src/cli/connect/tool-call-defs-core.js +30 -0
- package/dist/src/cli/connect/tool-call-defs-core.js.map +1 -1
- package/dist/src/cli/connect/tool-call.d.ts.map +1 -1
- package/dist/src/cli/connect/tool-call.js +2 -0
- package/dist/src/cli/connect/tool-call.js.map +1 -1
- package/dist/src/config-types-ai.d.ts +76 -0
- package/dist/src/config-types-ai.d.ts.map +1 -0
- package/dist/src/config-types-ai.js +15 -0
- package/dist/src/config-types-ai.js.map +1 -0
- package/dist/src/config-types.d.ts +11 -2
- package/dist/src/config-types.d.ts.map +1 -1
- package/dist/src/config.d.ts.map +1 -1
- package/dist/src/config.js +25 -4
- package/dist/src/config.js.map +1 -1
- package/dist/src/data/builtin-skills.d.ts.map +1 -1
- package/dist/src/data/builtin-skills.js +3 -2
- package/dist/src/data/builtin-skills.js.map +1 -1
- package/dist/src/data/digital-signage-package.js +1 -1
- package/dist/src/data/library-packs/sdk.d.ts.map +1 -1
- package/dist/src/data/library-packs/sdk.js +76 -0
- package/dist/src/data/library-packs/sdk.js.map +1 -1
- package/dist/src/data/library-packs/vendored.d.ts.map +1 -1
- package/dist/src/data/library-packs/vendored.js +81 -0
- package/dist/src/data/library-packs/vendored.js.map +1 -1
- package/dist/src/data/library-packs.d.ts +2 -2
- package/dist/src/data/library-packs.js +2 -2
- package/dist/src/data/public-pages.d.ts +13 -0
- package/dist/src/data/public-pages.d.ts.map +1 -1
- package/dist/src/data/public-pages.js +153 -113
- package/dist/src/data/public-pages.js.map +1 -1
- package/dist/src/generated/api-types.d.ts +1652 -36
- package/dist/src/generated/api-types.d.ts.map +1 -1
- package/dist/src/index-start.d.ts.map +1 -1
- package/dist/src/index-start.js +3 -0
- package/dist/src/index-start.js.map +1 -1
- package/dist/src/mcp/agent-tasks.d.ts.map +1 -1
- package/dist/src/mcp/agent-tasks.js +5 -0
- package/dist/src/mcp/agent-tasks.js.map +1 -1
- package/dist/src/mcp/ai-image.d.ts +22 -0
- package/dist/src/mcp/ai-image.d.ts.map +1 -0
- package/dist/src/mcp/ai-image.js +60 -0
- package/dist/src/mcp/ai-image.js.map +1 -0
- package/dist/src/mcp/annotations.d.ts +5 -0
- package/dist/src/mcp/annotations.d.ts.map +1 -1
- package/dist/src/mcp/annotations.js +18 -0
- package/dist/src/mcp/annotations.js.map +1 -1
- package/dist/src/mcp/apps-draft-edit.d.ts +28 -0
- package/dist/src/mcp/apps-draft-edit.d.ts.map +1 -0
- package/dist/src/mcp/apps-draft-edit.js +164 -0
- package/dist/src/mcp/apps-draft-edit.js.map +1 -0
- package/dist/src/mcp/apps-screenshot.d.ts +26 -0
- package/dist/src/mcp/apps-screenshot.d.ts.map +1 -0
- package/dist/src/mcp/apps-screenshot.js +39 -0
- package/dist/src/mcp/apps-screenshot.js.map +1 -0
- package/dist/src/mcp/catalog/definitions/discovery-work-boards.d.ts +1 -0
- package/dist/src/mcp/catalog/definitions/discovery-work-boards.d.ts.map +1 -1
- package/dist/src/mcp/catalog/definitions/discovery-work-boards.js +40 -0
- package/dist/src/mcp/catalog/definitions/discovery-work-boards.js.map +1 -1
- package/dist/src/mcp/catalog/definitions/organisms-workspaces-apps.d.ts +3 -0
- package/dist/src/mcp/catalog/definitions/organisms-workspaces-apps.d.ts.map +1 -1
- package/dist/src/mcp/catalog/definitions/organisms-workspaces-apps.js +74 -0
- package/dist/src/mcp/catalog/definitions/organisms-workspaces-apps.js.map +1 -1
- package/dist/src/mcp/catalog/definitions/schedules-tasks-memory.d.ts.map +1 -1
- package/dist/src/mcp/catalog/definitions/schedules-tasks-memory.js +1 -0
- package/dist/src/mcp/catalog/definitions/schedules-tasks-memory.js.map +1 -1
- package/dist/src/mcp/catalog/scopes.d.ts.map +1 -1
- package/dist/src/mcp/catalog/scopes.js +19 -1
- package/dist/src/mcp/catalog/scopes.js.map +1 -1
- package/dist/src/mcp/catalog/surfaces.d.ts.map +1 -1
- package/dist/src/mcp/catalog/surfaces.js +18 -4
- package/dist/src/mcp/catalog/surfaces.js.map +1 -1
- package/dist/src/mcp/core-datapackage.d.ts +32 -0
- package/dist/src/mcp/core-datapackage.d.ts.map +1 -0
- package/dist/src/mcp/core-datapackage.js +188 -0
- package/dist/src/mcp/core-datapackage.js.map +1 -0
- package/dist/src/mcp/core-storage.d.ts +7 -3
- package/dist/src/mcp/core-storage.d.ts.map +1 -1
- package/dist/src/mcp/core-storage.js +27 -4
- package/dist/src/mcp/core-storage.js.map +1 -1
- package/dist/src/mcp/core.d.ts.map +1 -1
- package/dist/src/mcp/core.js +3 -0
- package/dist/src/mcp/core.js.map +1 -1
- package/dist/src/mcp/extensions.d.ts.map +1 -1
- package/dist/src/mcp/extensions.js +11 -1
- package/dist/src/mcp/extensions.js.map +1 -1
- package/dist/src/mcp/index.d.ts +9 -0
- package/dist/src/mcp/index.d.ts.map +1 -1
- package/dist/src/mcp/index.js +34 -0
- package/dist/src/mcp/index.js.map +1 -1
- package/dist/src/models/agent-task-schemas.d.ts.map +1 -1
- package/dist/src/models/agent-task-schemas.js +12 -1
- package/dist/src/models/agent-task-schemas.js.map +1 -1
- package/dist/src/models/workflow-schemas.d.ts +178 -1
- package/dist/src/models/workflow-schemas.d.ts.map +1 -1
- package/dist/src/models/workflow-schemas.js +75 -0
- package/dist/src/models/workflow-schemas.js.map +1 -1
- package/dist/src/routes/admin-extensions.d.ts +4 -0
- package/dist/src/routes/admin-extensions.d.ts.map +1 -1
- package/dist/src/routes/admin-extensions.js +135 -142
- package/dist/src/routes/admin-extensions.js.map +1 -1
- package/dist/src/routes/agent-conventions.d.ts.map +1 -1
- package/dist/src/routes/agent-conventions.js +4 -2
- package/dist/src/routes/agent-conventions.js.map +1 -1
- package/dist/src/routes/agent-docs.d.ts +4 -4
- package/dist/src/routes/agent-docs.js +145 -145
- package/dist/src/routes/agent-docs.js.map +1 -1
- package/dist/src/routes/agent-messages.d.ts +6 -0
- package/dist/src/routes/agent-messages.d.ts.map +1 -1
- package/dist/src/routes/agent-messages.js +23 -1
- package/dist/src/routes/agent-messages.js.map +1 -1
- package/dist/src/routes/agent-tasks/create-read.d.ts.map +1 -1
- package/dist/src/routes/agent-tasks/create-read.js +8 -1
- package/dist/src/routes/agent-tasks/create-read.js.map +1 -1
- package/dist/src/routes/agent-tasks/lifecycle.d.ts +4 -1
- package/dist/src/routes/agent-tasks/lifecycle.d.ts.map +1 -1
- package/dist/src/routes/agent-tasks/lifecycle.js +80 -2
- package/dist/src/routes/agent-tasks/lifecycle.js.map +1 -1
- package/dist/src/routes/ai.d.ts +5 -0
- package/dist/src/routes/ai.d.ts.map +1 -1
- package/dist/src/routes/ai.js +51 -1
- package/dist/src/routes/ai.js.map +1 -1
- package/dist/src/routes/app-grants.d.ts.map +1 -1
- package/dist/src/routes/app-grants.js +5 -0
- package/dist/src/routes/app-grants.js.map +1 -1
- package/dist/src/routes/apps/drafts.d.ts +6 -0
- package/dist/src/routes/apps/drafts.d.ts.map +1 -1
- package/dist/src/routes/apps/drafts.js +133 -1
- package/dist/src/routes/apps/drafts.js.map +1 -1
- package/dist/src/routes/apps/read.d.ts.map +1 -1
- package/dist/src/routes/apps/read.js +38 -1
- package/dist/src/routes/apps/read.js.map +1 -1
- package/dist/src/routes/auth-otk.d.ts +28 -0
- package/dist/src/routes/auth-otk.d.ts.map +1 -0
- package/dist/src/routes/auth-otk.js +190 -0
- package/dist/src/routes/auth-otk.js.map +1 -0
- package/dist/src/routes/auth.d.ts +17 -0
- package/dist/src/routes/auth.d.ts.map +1 -1
- package/dist/src/routes/auth.js +44 -153
- package/dist/src/routes/auth.js.map +1 -1
- package/dist/src/routes/bootstrap.d.ts +6 -0
- package/dist/src/routes/bootstrap.d.ts.map +1 -1
- package/dist/src/routes/bootstrap.js +47 -20
- package/dist/src/routes/bootstrap.js.map +1 -1
- package/dist/src/routes/chat.d.ts +23 -0
- package/dist/src/routes/chat.d.ts.map +1 -0
- package/dist/src/routes/chat.js +165 -0
- package/dist/src/routes/chat.js.map +1 -0
- package/dist/src/routes/commerce.js +4 -4
- package/dist/src/routes/commerce.js.map +1 -1
- package/dist/src/routes/datapackages.d.ts +35 -0
- package/dist/src/routes/datapackages.d.ts.map +1 -0
- package/dist/src/routes/datapackages.js +217 -0
- package/dist/src/routes/datapackages.js.map +1 -0
- package/dist/src/routes/disputes.d.ts +8 -0
- package/dist/src/routes/disputes.d.ts.map +1 -1
- package/dist/src/routes/disputes.js +52 -1
- package/dist/src/routes/disputes.js.map +1 -1
- package/dist/src/routes/ecosystem-apps-advisories.d.ts +16 -0
- package/dist/src/routes/ecosystem-apps-advisories.d.ts.map +1 -0
- package/dist/src/routes/ecosystem-apps-advisories.js +104 -0
- package/dist/src/routes/ecosystem-apps-advisories.js.map +1 -0
- package/dist/src/routes/ecosystem-apps.d.ts +6 -0
- package/dist/src/routes/ecosystem-apps.d.ts.map +1 -1
- package/dist/src/routes/ecosystem-apps.js +31 -99
- package/dist/src/routes/ecosystem-apps.js.map +1 -1
- package/dist/src/routes/extensions/actions.d.ts.map +1 -1
- package/dist/src/routes/extensions/actions.js +29 -1
- package/dist/src/routes/extensions/actions.js.map +1 -1
- package/dist/src/routes/federation-sync/routing.d.ts.map +1 -1
- package/dist/src/routes/federation-sync/routing.js +12 -3
- package/dist/src/routes/federation-sync/routing.js.map +1 -1
- package/dist/src/routes/glossary.js +1 -1
- package/dist/src/routes/glossary.js.map +1 -1
- package/dist/src/routes/home/track.d.ts +5 -1
- package/dist/src/routes/home/track.d.ts.map +1 -1
- package/dist/src/routes/home/track.js +20 -6
- package/dist/src/routes/home/track.js.map +1 -1
- package/dist/src/routes/instances/install.d.ts +3 -0
- package/dist/src/routes/instances/install.d.ts.map +1 -1
- package/dist/src/routes/instances/install.js +17 -24
- package/dist/src/routes/instances/install.js.map +1 -1
- package/dist/src/routes/libs.js +1 -1
- package/dist/src/routes/libs.js.map +1 -1
- package/dist/src/routes/markdown-mirrors.js +1 -1
- package/dist/src/routes/markdown-mirrors.js.map +1 -1
- package/dist/src/routes/odata.d.ts +36 -0
- package/dist/src/routes/odata.d.ts.map +1 -0
- package/dist/src/routes/odata.js +143 -0
- package/dist/src/routes/odata.js.map +1 -0
- package/dist/src/routes/openrouter.d.ts +4 -0
- package/dist/src/routes/openrouter.d.ts.map +1 -1
- package/dist/src/routes/openrouter.js +10 -1
- package/dist/src/routes/openrouter.js.map +1 -1
- package/dist/src/routes/organisms/gates.d.ts.map +1 -1
- package/dist/src/routes/organisms/gates.js +9 -2
- package/dist/src/routes/organisms/gates.js.map +1 -1
- package/dist/src/routes/portal.d.ts +1 -0
- package/dist/src/routes/portal.d.ts.map +1 -1
- package/dist/src/routes/portal.js +13 -0
- package/dist/src/routes/portal.js.map +1 -1
- package/dist/src/routes/schedules.d.ts +4 -0
- package/dist/src/routes/schedules.d.ts.map +1 -1
- package/dist/src/routes/schedules.js +9 -1
- package/dist/src/routes/schedules.js.map +1 -1
- package/dist/src/routes/storage-files.d.ts +23 -0
- package/dist/src/routes/storage-files.d.ts.map +1 -1
- package/dist/src/routes/storage-files.js +103 -82
- package/dist/src/routes/storage-files.js.map +1 -1
- package/dist/src/routes/workflows.d.ts.map +1 -1
- package/dist/src/routes/workflows.js +9 -1
- package/dist/src/routes/workflows.js.map +1 -1
- package/dist/src/server-bootstrap/routes-loader.d.ts +2 -0
- package/dist/src/server-bootstrap/routes-loader.d.ts.map +1 -1
- package/dist/src/server-bootstrap/routes-loader.js +20 -2
- package/dist/src/server-bootstrap/routes-loader.js.map +1 -1
- package/dist/src/server-bootstrap/service-init.d.ts.map +1 -1
- package/dist/src/server-bootstrap/service-init.js +12 -7
- package/dist/src/server-bootstrap/service-init.js.map +1 -1
- package/dist/src/server-bootstrap/static-files.d.ts.map +1 -1
- package/dist/src/server-bootstrap/static-files.js +44 -10
- package/dist/src/server-bootstrap/static-files.js.map +1 -1
- package/dist/src/services/ai-allowance.d.ts +82 -0
- package/dist/src/services/ai-allowance.d.ts.map +1 -0
- package/dist/src/services/ai-allowance.js +117 -0
- package/dist/src/services/ai-allowance.js.map +1 -0
- package/dist/src/services/ai-completion.d.ts +26 -0
- package/dist/src/services/ai-completion.d.ts.map +1 -1
- package/dist/src/services/ai-completion.js +41 -13
- package/dist/src/services/ai-completion.js.map +1 -1
- package/dist/src/services/ai-image.d.ts +70 -0
- package/dist/src/services/ai-image.d.ts.map +1 -0
- package/dist/src/services/ai-image.js +104 -0
- package/dist/src/services/ai-image.js.map +1 -0
- package/dist/src/services/ai-model-defaults.d.ts +45 -0
- package/dist/src/services/ai-model-defaults.d.ts.map +1 -0
- package/dist/src/services/ai-model-defaults.js +42 -0
- package/dist/src/services/ai-model-defaults.js.map +1 -0
- package/dist/src/services/ai-tool-setup.d.ts +5 -1
- package/dist/src/services/ai-tool-setup.d.ts.map +1 -1
- package/dist/src/services/ai-tool-setup.js +36 -0
- package/dist/src/services/ai-tool-setup.js.map +1 -1
- package/dist/src/services/ai-transcription.d.ts +5 -0
- package/dist/src/services/ai-transcription.d.ts.map +1 -1
- package/dist/src/services/ai-transcription.js +5 -2
- package/dist/src/services/ai-transcription.js.map +1 -1
- package/dist/src/services/app-agent-surfaces.js +4 -4
- package/dist/src/services/app-agent-surfaces.js.map +1 -1
- package/dist/src/services/app-draft-edit.d.ts +144 -0
- package/dist/src/services/app-draft-edit.d.ts.map +1 -0
- package/dist/src/services/app-draft-edit.js +203 -0
- package/dist/src/services/app-draft-edit.js.map +1 -0
- package/dist/src/services/auth-md.js +2 -2
- package/dist/src/services/auth-md.js.map +1 -1
- package/dist/src/services/board-write.d.ts +11 -3
- package/dist/src/services/board-write.d.ts.map +1 -1
- package/dist/src/services/board-write.js +24 -3
- package/dist/src/services/board-write.js.map +1 -1
- package/dist/src/services/chat-agent.d.ts +36 -0
- package/dist/src/services/chat-agent.d.ts.map +1 -0
- package/dist/src/services/chat-agent.js +123 -0
- package/dist/src/services/chat-agent.js.map +1 -0
- package/dist/src/services/chat-session.d.ts +58 -0
- package/dist/src/services/chat-session.d.ts.map +1 -0
- package/dist/src/services/chat-session.js +151 -0
- package/dist/src/services/chat-session.js.map +1 -0
- package/dist/src/services/chat-threads.d.ts +61 -0
- package/dist/src/services/chat-threads.d.ts.map +1 -0
- package/dist/src/services/chat-threads.js +137 -0
- package/dist/src/services/chat-threads.js.map +1 -0
- package/dist/src/services/config-schema.d.ts.map +1 -1
- package/dist/src/services/config-schema.js +2 -1
- package/dist/src/services/config-schema.js.map +1 -1
- package/dist/src/services/datapackage/contract.d.ts +198 -0
- package/dist/src/services/datapackage/contract.d.ts.map +1 -0
- package/dist/src/services/datapackage/contract.js +140 -0
- package/dist/src/services/datapackage/contract.js.map +1 -0
- package/dist/src/services/datapackage/ext-capability.d.ts +85 -0
- package/dist/src/services/datapackage/ext-capability.d.ts.map +1 -0
- package/dist/src/services/datapackage/ext-capability.js +72 -0
- package/dist/src/services/datapackage/ext-capability.js.map +1 -0
- package/dist/src/services/datapackage/odata.d.ts +92 -0
- package/dist/src/services/datapackage/odata.d.ts.map +1 -0
- package/dist/src/services/datapackage/odata.js +256 -0
- package/dist/src/services/datapackage/odata.js.map +1 -0
- package/dist/src/services/datapackage/odps.d.ts +24 -0
- package/dist/src/services/datapackage/odps.d.ts.map +1 -0
- package/dist/src/services/datapackage/odps.js +183 -0
- package/dist/src/services/datapackage/odps.js.map +1 -0
- package/dist/src/services/datapackage/store.d.ts +143 -0
- package/dist/src/services/datapackage/store.d.ts.map +1 -0
- package/dist/src/services/datapackage/store.js +533 -0
- package/dist/src/services/datapackage/store.js.map +1 -0
- package/dist/src/services/datapackage/table.d.ts +67 -0
- package/dist/src/services/datapackage/table.d.ts.map +1 -0
- package/dist/src/services/datapackage/table.js +0 -0
- package/dist/src/services/datapackage/table.js.map +1 -0
- package/dist/src/services/extension-ctx.d.ts +1 -0
- package/dist/src/services/extension-ctx.d.ts.map +1 -1
- package/dist/src/services/extension-ctx.js +31 -6
- package/dist/src/services/extension-ctx.js.map +1 -1
- package/dist/src/services/extension-files.d.ts +20 -0
- package/dist/src/services/extension-files.d.ts.map +1 -1
- package/dist/src/services/extension-files.js +9 -2
- package/dist/src/services/extension-files.js.map +1 -1
- package/dist/src/services/extension-lifecycle.d.ts +3 -0
- package/dist/src/services/extension-lifecycle.d.ts.map +1 -1
- package/dist/src/services/extension-lifecycle.js +2 -26
- package/dist/src/services/extension-lifecycle.js.map +1 -1
- package/dist/src/services/extension-runtime.d.ts +28 -2
- package/dist/src/services/extension-runtime.d.ts.map +1 -1
- package/dist/src/services/extension-runtime.js +22 -0
- package/dist/src/services/extension-runtime.js.map +1 -1
- package/dist/src/services/extension-schedules.d.ts +90 -0
- package/dist/src/services/extension-schedules.d.ts.map +1 -0
- package/dist/src/services/extension-schedules.js +123 -0
- package/dist/src/services/extension-schedules.js.map +1 -0
- package/dist/src/services/extension-system-run.d.ts +91 -0
- package/dist/src/services/extension-system-run.d.ts.map +1 -0
- package/dist/src/services/extension-system-run.js +100 -0
- package/dist/src/services/extension-system-run.js.map +1 -0
- package/dist/src/services/extension-upsert.d.ts +2 -0
- package/dist/src/services/extension-upsert.d.ts.map +1 -1
- package/dist/src/services/extension-upsert.js +6 -24
- package/dist/src/services/extension-upsert.js.map +1 -1
- package/dist/src/services/goose-acp.d.ts +84 -0
- package/dist/src/services/goose-acp.d.ts.map +1 -0
- package/dist/src/services/goose-acp.js +304 -0
- package/dist/src/services/goose-acp.js.map +1 -0
- package/dist/src/services/markdown-negotiation.js +1 -1
- package/dist/src/services/markdown-negotiation.js.map +1 -1
- package/dist/src/services/openrouter.d.ts +20 -1
- package/dist/src/services/openrouter.d.ts.map +1 -1
- package/dist/src/services/openrouter.js +66 -0
- package/dist/src/services/openrouter.js.map +1 -1
- package/dist/src/services/prompt-defaults/tiers-core.js +4 -4
- package/dist/src/services/scheduler-extension-job.d.ts +29 -6
- package/dist/src/services/scheduler-extension-job.d.ts.map +1 -1
- package/dist/src/services/scheduler-extension-job.js +29 -75
- package/dist/src/services/scheduler-extension-job.js.map +1 -1
- package/dist/src/services/scope-vocabulary-migration.d.ts +34 -1
- package/dist/src/services/scope-vocabulary-migration.d.ts.map +1 -1
- package/dist/src/services/scope-vocabulary-migration.js +60 -0
- package/dist/src/services/scope-vocabulary-migration.js.map +1 -1
- package/dist/src/services/screenshot-capture.d.ts +40 -1
- package/dist/src/services/screenshot-capture.d.ts.map +1 -1
- package/dist/src/services/screenshot-capture.js +142 -60
- package/dist/src/services/screenshot-capture.js.map +1 -1
- package/dist/src/services/skill-bundle/generator.js +1 -1
- package/dist/src/services/skill-bundle/generic-adapter.js +1 -1
- package/dist/src/services/skill-bundle/hermes-adapter.js +1 -1
- package/dist/src/services/storage-file-write.d.ts +36 -1
- package/dist/src/services/storage-file-write.d.ts.map +1 -1
- package/dist/src/services/storage-file-write.js +49 -3
- package/dist/src/services/storage-file-write.js.map +1 -1
- package/dist/src/services/task-outcome.d.ts +53 -0
- package/dist/src/services/task-outcome.d.ts.map +1 -0
- package/dist/src/services/task-outcome.js +28 -0
- package/dist/src/services/task-outcome.js.map +1 -0
- package/dist/src/services/workflow/engine-human.d.ts +15 -0
- package/dist/src/services/workflow/engine-human.d.ts.map +1 -1
- package/dist/src/services/workflow/engine-human.js +10 -1
- package/dist/src/services/workflow/engine-human.js.map +1 -1
- package/dist/src/services/workflow/engine-steps.d.ts +48 -3
- package/dist/src/services/workflow/engine-steps.d.ts.map +1 -1
- package/dist/src/services/workflow/engine-steps.js +361 -0
- package/dist/src/services/workflow/engine-steps.js.map +1 -1
- package/dist/src/services/workflow/engine.d.ts +1 -0
- package/dist/src/services/workflow/engine.d.ts.map +1 -1
- package/dist/src/services/workflow/engine.js +2 -1
- package/dist/src/services/workflow/engine.js.map +1 -1
- package/dist/src/services/workflow/store.d.ts.map +1 -1
- package/dist/src/services/workflow/store.js +60 -4
- package/dist/src/services/workflow/store.js.map +1 -1
- package/dist/src/services/write-guards.d.ts +27 -1
- package/dist/src/services/write-guards.d.ts.map +1 -1
- package/dist/src/services/write-guards.js +39 -9
- package/dist/src/services/write-guards.js.map +1 -1
- package/dist/src/storage/providers/postgres-kysely/db-types.d.ts +1 -0
- package/dist/src/storage/providers/postgres-kysely/db-types.d.ts.map +1 -1
- package/dist/src/storage/providers/postgres-kysely/methods/app-grants.d.ts +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/app-grants.d.ts.map +1 -1
- package/dist/src/storage/providers/postgres-kysely/methods/app-grants.js +3 -0
- package/dist/src/storage/providers/postgres-kysely/methods/app-grants.js.map +1 -1
- package/dist/src/storage/providers/postgres-kysely/methods/files.d.ts +2 -0
- package/dist/src/storage/providers/postgres-kysely/methods/files.d.ts.map +1 -1
- package/dist/src/storage/providers/postgres-kysely/methods/files.js +34 -2
- package/dist/src/storage/providers/postgres-kysely/methods/files.js.map +1 -1
- package/dist/src/storage/providers/postgres-kysely/migrations/0039_storage_file_utf8_verified.sql +19 -0
- package/dist/src/storage/providers/sqlite/index.d.ts.map +1 -1
- package/dist/src/storage/providers/sqlite/index.js +2 -1
- package/dist/src/storage/providers/sqlite/index.js.map +1 -1
- package/dist/src/storage/providers/sqlite/methods/apps.d.ts +1 -0
- package/dist/src/storage/providers/sqlite/methods/apps.d.ts.map +1 -1
- package/dist/src/storage/providers/sqlite/methods/apps.js +33 -28
- package/dist/src/storage/providers/sqlite/methods/apps.js.map +1 -1
- package/dist/src/storage/providers/sqlite/methods/identity-nodes.d.ts +1 -12
- package/dist/src/storage/providers/sqlite/methods/identity-nodes.d.ts.map +1 -1
- package/dist/src/storage/providers/sqlite/methods/identity-nodes.js +28 -135
- package/dist/src/storage/providers/sqlite/methods/identity-nodes.js.map +1 -1
- package/dist/src/storage/providers/sqlite/methods/storage-files.d.ts +38 -0
- package/dist/src/storage/providers/sqlite/methods/storage-files.d.ts.map +1 -0
- package/dist/src/storage/providers/sqlite/methods/storage-files.js +109 -0
- package/dist/src/storage/providers/sqlite/methods/storage-files.js.map +1 -0
- package/dist/src/storage/providers/sqlite/schema.d.ts.map +1 -1
- package/dist/src/storage/providers/sqlite/schema.js +134 -130
- package/dist/src/storage/providers/sqlite/schema.js.map +1 -1
- package/dist/src/storage/repositories/app-grant.repository.d.ts +11 -0
- package/dist/src/storage/repositories/app-grant.repository.d.ts.map +1 -1
- package/dist/src/storage/repositories/file.repository.d.ts +13 -0
- package/dist/src/storage/repositories/file.repository.d.ts.map +1 -1
- package/dist/src/storage/types/commerce.d.ts +6 -0
- package/dist/src/storage/types/commerce.d.ts.map +1 -1
- package/dist/src/utils/agent-footer.d.ts.map +1 -1
- package/dist/src/utils/agent-footer.js +1 -0
- package/dist/src/utils/agent-footer.js.map +1 -1
- package/dist/src/utils/app-content-type.d.ts +57 -3
- package/dist/src/utils/app-content-type.d.ts.map +1 -1
- package/dist/src/utils/app-content-type.js +81 -12
- package/dist/src/utils/app-content-type.js.map +1 -1
- package/dist/src/utils/env-config/sections-features.d.ts.map +1 -1
- package/dist/src/utils/env-config/sections-features.js +9 -3
- package/dist/src/utils/env-config/sections-features.js.map +1 -1
- package/dist/src/utils/file-download-headers.d.ts +5 -3
- package/dist/src/utils/file-download-headers.d.ts.map +1 -1
- package/dist/src/utils/file-download-headers.js +18 -5
- package/dist/src/utils/file-download-headers.js.map +1 -1
- package/dist/src/utils/http-range.d.ts +151 -0
- package/dist/src/utils/http-range.d.ts.map +1 -0
- package/dist/src/utils/http-range.js +190 -0
- package/dist/src/utils/http-range.js.map +1 -0
- package/dist/src/utils/page-head.d.ts +5 -0
- package/dist/src/utils/page-head.d.ts.map +1 -1
- package/dist/src/utils/page-head.js +10 -1
- package/dist/src/utils/page-head.js.map +1 -1
- package/dist/src/utils/reserved-keys.d.ts +4 -1
- package/dist/src/utils/reserved-keys.d.ts.map +1 -1
- package/dist/src/utils/reserved-keys.js +4 -1
- package/dist/src/utils/reserved-keys.js.map +1 -1
- package/dist/static/sdk-libs/datapackage/index.js +336 -0
- package/dist/static/sdk-libs/dist/aimeat-datapackage.js +305 -0
- package/package.json +10 -2
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file public/views/chat.js
|
|
3
|
+
* @description The chat page: the person's first agent, reachable without connecting anything.
|
|
4
|
+
*
|
|
5
|
+
* Everything else on this node assumes a person has already wired their own AI tool to it over
|
|
6
|
+
* MCP. This page is the door for the ones who have not, and for the ones who never will. The agent
|
|
7
|
+
* it talks to is a real GAII principal with real scopes, so what happens here is the same work
|
|
8
|
+
* that happens through any other client, under the same permissions, visible in the same places.
|
|
9
|
+
*
|
|
10
|
+
* The tool calls are on screen for every turn. A chat that reports success without showing what it
|
|
11
|
+
* did asks to be believed; this one can be checked, and that is what makes it credible as a first
|
|
12
|
+
* agent rather than a demo.
|
|
13
|
+
* @structure
|
|
14
|
+
* - ChatView — the page: status, conversations, one live turn
|
|
15
|
+
* @usage import ChatView from '/views/chat.js'
|
|
16
|
+
* @version-history
|
|
17
|
+
* v1.1.0 — 2026-08-16 — Speech: a recording becomes text in the box for the person to read before
|
|
18
|
+
* they send it, and the engine is primed inside the tap so reading an answer aloud works on iOS.
|
|
19
|
+
* v1.0.1 — 2026-08-16 — The work log keys tool calls by id rather than title, so a finished call
|
|
20
|
+
* stops reading as "starting".
|
|
21
|
+
* v1.0.0 — 2026-08-16 — Initial.
|
|
22
|
+
*/
|
|
23
|
+
import { h } from 'preact';
|
|
24
|
+
import { useState, useEffect, useRef, useCallback } from 'preact/hooks';
|
|
25
|
+
import htm from 'htm';
|
|
26
|
+
import { t } from '/js/i18n.js';
|
|
27
|
+
import { hasSession } from '/js/services/auth.js';
|
|
28
|
+
import { Spinner } from '/components/Spinner.js';
|
|
29
|
+
import * as chat from '/js/services/chat.js';
|
|
30
|
+
import { primeSpeech } from '/js/services/speech-reader.js';
|
|
31
|
+
import { ThreadList, Turn, LiveTurn, TurnError, Composer, StatusBar } from './chat/parts.js';
|
|
32
|
+
|
|
33
|
+
const html = htm.bind(h);
|
|
34
|
+
const tr = (key, fallback) => { const v = t(key); return v && v !== key ? v : fallback; };
|
|
35
|
+
|
|
36
|
+
export default function ChatView() {
|
|
37
|
+
const [status, setStatus] = useState(null);
|
|
38
|
+
const [threads, setThreads] = useState([]);
|
|
39
|
+
const [thread, setThread] = useState(null);
|
|
40
|
+
const [draft, setDraft] = useState('');
|
|
41
|
+
const [busy, setBusy] = useState(false);
|
|
42
|
+
const [live, setLive] = useState({ text: '', thought: '', tools: [] });
|
|
43
|
+
const [failure, setFailure] = useState('');
|
|
44
|
+
const [loading, setLoading] = useState(true);
|
|
45
|
+
// On a phone the conversation takes the whole screen, so the list is a separate place rather
|
|
46
|
+
// than a column that would leave neither readable.
|
|
47
|
+
const [listOpen, setListOpen] = useState(false);
|
|
48
|
+
const [listening, setListening] = useState(false);
|
|
49
|
+
|
|
50
|
+
const abortRef = useRef(null);
|
|
51
|
+
const bottomRef = useRef(null);
|
|
52
|
+
const lastAskRef = useRef('');
|
|
53
|
+
|
|
54
|
+
const loadThreads = useCallback(async () => {
|
|
55
|
+
const res = await chat.listThreads();
|
|
56
|
+
setThreads(res?.data?.threads ?? []);
|
|
57
|
+
}, []);
|
|
58
|
+
|
|
59
|
+
const openThread = useCallback(async (id) => {
|
|
60
|
+
const res = await chat.getThread(id);
|
|
61
|
+
setThread(res?.data?.thread ?? null);
|
|
62
|
+
setFailure('');
|
|
63
|
+
setLive({ text: '', thought: '', tools: [] });
|
|
64
|
+
setListOpen(false);
|
|
65
|
+
}, []);
|
|
66
|
+
|
|
67
|
+
// First load: what this node offers, and where the person left off.
|
|
68
|
+
useEffect(() => {
|
|
69
|
+
if (!hasSession()) { setLoading(false); return; }
|
|
70
|
+
(async () => {
|
|
71
|
+
try {
|
|
72
|
+
const [st, list] = await Promise.all([chat.status(), chat.listThreads()]);
|
|
73
|
+
setStatus(st?.data ?? null);
|
|
74
|
+
const found = list?.data?.threads ?? [];
|
|
75
|
+
setThreads(found);
|
|
76
|
+
if (found.length > 0) await openThread(found[0].id);
|
|
77
|
+
} catch (err) {
|
|
78
|
+
setFailure(err.message || tr('chat.loadFailed', 'The chat could not be loaded.'));
|
|
79
|
+
} finally {
|
|
80
|
+
setLoading(false);
|
|
81
|
+
}
|
|
82
|
+
})();
|
|
83
|
+
}, [openThread]);
|
|
84
|
+
|
|
85
|
+
// Keep the newest turn in view, the way a conversation is read.
|
|
86
|
+
useEffect(() => {
|
|
87
|
+
bottomRef.current?.scrollIntoView({ block: 'end' });
|
|
88
|
+
}, [thread?.turns?.length, live.text, live.tools.length]);
|
|
89
|
+
|
|
90
|
+
// The on-screen keyboard, measured rather than calculated.
|
|
91
|
+
//
|
|
92
|
+
// `100dvh − keyboard` double-counts on Android Chrome, where dvh already shrinks for the
|
|
93
|
+
// keyboard, and the composer ends up floating above a dead gap. The visual viewport excludes the
|
|
94
|
+
// keyboard on every platform, so the distance from the top of the page to the bottom of it is
|
|
95
|
+
// the space there actually is. Same approach as the inbox, for the same reason.
|
|
96
|
+
useEffect(() => {
|
|
97
|
+
const vv = window.visualViewport;
|
|
98
|
+
const root = document.documentElement;
|
|
99
|
+
if (!vv) return undefined;
|
|
100
|
+
const sync = () => {
|
|
101
|
+
if (!window.matchMedia('(max-width: 760px)').matches) {
|
|
102
|
+
root.style.removeProperty('--chat-avail');
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
root.style.setProperty('--chat-avail', `${Math.max(220, Math.round(vv.height))}px`);
|
|
106
|
+
};
|
|
107
|
+
sync();
|
|
108
|
+
vv.addEventListener('resize', sync);
|
|
109
|
+
vv.addEventListener('scroll', sync);
|
|
110
|
+
window.addEventListener('orientationchange', sync);
|
|
111
|
+
return () => {
|
|
112
|
+
vv.removeEventListener('resize', sync);
|
|
113
|
+
vv.removeEventListener('scroll', sync);
|
|
114
|
+
window.removeEventListener('orientationchange', sync);
|
|
115
|
+
root.style.removeProperty('--chat-avail');
|
|
116
|
+
};
|
|
117
|
+
}, []);
|
|
118
|
+
|
|
119
|
+
// A change to the agent's permissions is made elsewhere, so the status line refreshes with the
|
|
120
|
+
// rest of the page rather than going stale until a reload.
|
|
121
|
+
useEffect(() => {
|
|
122
|
+
const handler = async () => {
|
|
123
|
+
try {
|
|
124
|
+
setStatus((await chat.status())?.data ?? null);
|
|
125
|
+
} catch (err) {
|
|
126
|
+
// A stale allowance line is not worth interrupting a conversation over, and the
|
|
127
|
+
// next update will correct it. Said out loud so it is not invisible either.
|
|
128
|
+
console.warn('[chat] the status line could not be refreshed:', err.message);
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
window.addEventListener('aimeat-live-update', handler);
|
|
132
|
+
return () => window.removeEventListener('aimeat-live-update', handler);
|
|
133
|
+
}, []);
|
|
134
|
+
|
|
135
|
+
const startThread = useCallback(async () => {
|
|
136
|
+
const res = await chat.createThread();
|
|
137
|
+
const created = res?.data?.thread;
|
|
138
|
+
if (!created) return null;
|
|
139
|
+
setThread(created);
|
|
140
|
+
setFailure('');
|
|
141
|
+
setListOpen(false);
|
|
142
|
+
await loadThreads();
|
|
143
|
+
return created;
|
|
144
|
+
}, [loadThreads]);
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Send one message and read the answer as it is written.
|
|
148
|
+
*
|
|
149
|
+
* The person's words appear immediately rather than after the round trip: the node has already
|
|
150
|
+
* written them down by the time the first event arrives, and waiting to show them would make a
|
|
151
|
+
* slow turn look like a lost one.
|
|
152
|
+
*/
|
|
153
|
+
const send = useCallback(async (retryText) => {
|
|
154
|
+
const text = (retryText ?? draft).trim();
|
|
155
|
+
if (!text || busy) return;
|
|
156
|
+
// Inside the tap, because that is the only moment iOS will accept it. Without this, reading
|
|
157
|
+
// an answer aloud later is a silent no-op with nothing in the console to find.
|
|
158
|
+
primeSpeech();
|
|
159
|
+
|
|
160
|
+
let target = thread;
|
|
161
|
+
if (!target) {
|
|
162
|
+
target = await startThread();
|
|
163
|
+
if (!target) return;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
lastAskRef.current = text;
|
|
167
|
+
setDraft('');
|
|
168
|
+
setFailure('');
|
|
169
|
+
setBusy(true);
|
|
170
|
+
setLive({ text: '', thought: '', tools: [] });
|
|
171
|
+
setThread((prev) => (prev ? {
|
|
172
|
+
...prev,
|
|
173
|
+
turns: [...(prev.turns ?? []), { role: 'user', text, at: new Date().toISOString() }],
|
|
174
|
+
} : prev));
|
|
175
|
+
|
|
176
|
+
const controller = new AbortController();
|
|
177
|
+
abortRef.current = controller;
|
|
178
|
+
|
|
179
|
+
let answer = '';
|
|
180
|
+
const tools = new Map();
|
|
181
|
+
try {
|
|
182
|
+
for await (const update of chat.streamTurn(target.id, text, controller.signal)) {
|
|
183
|
+
if (update.kind === 'text') {
|
|
184
|
+
answer += update.text;
|
|
185
|
+
setLive((l) => ({ ...l, text: answer }));
|
|
186
|
+
} else if (update.kind === 'thought') {
|
|
187
|
+
setLive((l) => ({ ...l, thought: update.text }));
|
|
188
|
+
} else if (update.kind === 'tool_call') {
|
|
189
|
+
// By id, not title: a call arrives once as it starts and once as it finishes,
|
|
190
|
+
// and only the first carries a title.
|
|
191
|
+
const key = update.id || update.title;
|
|
192
|
+
const seen = tools.get(key);
|
|
193
|
+
if (seen) {
|
|
194
|
+
seen.status = update.status;
|
|
195
|
+
if (update.title) seen.title = update.title;
|
|
196
|
+
} else {
|
|
197
|
+
tools.set(key, { title: update.title, status: update.status });
|
|
198
|
+
}
|
|
199
|
+
setLive((l) => ({ ...l, tools: [...tools.values()] }));
|
|
200
|
+
} else if (update.kind === 'error') {
|
|
201
|
+
setFailure(update.message || tr('chat.turnFailed', 'The turn could not be completed.'));
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
} catch (err) {
|
|
205
|
+
// An abort is the person's own decision, and half an answer is still an answer.
|
|
206
|
+
if (err.name !== 'AbortError') {
|
|
207
|
+
setFailure(err.message || tr('chat.turnFailed', 'The turn could not be completed.'));
|
|
208
|
+
}
|
|
209
|
+
} finally {
|
|
210
|
+
abortRef.current = null;
|
|
211
|
+
setBusy(false);
|
|
212
|
+
setLive({ text: '', thought: '', tools: [] });
|
|
213
|
+
// Read the conversation back from the node: it is the record, and what it holds is what
|
|
214
|
+
// was actually saved rather than what this page happened to see.
|
|
215
|
+
try {
|
|
216
|
+
const fresh = await chat.getThread(target.id);
|
|
217
|
+
if (fresh?.data?.thread) setThread(fresh.data.thread);
|
|
218
|
+
await loadThreads();
|
|
219
|
+
} catch (err) {
|
|
220
|
+
// The turn ran; a failed re-read leaves the optimistic copy on screen, which is the
|
|
221
|
+
// same text, and the next open corrects it.
|
|
222
|
+
console.warn('[chat] the conversation could not be re-read:', err.message);
|
|
223
|
+
if (answer) {
|
|
224
|
+
setThread((prev) => (prev ? {
|
|
225
|
+
...prev,
|
|
226
|
+
turns: [...(prev.turns ?? []), { role: 'agent', text: answer, at: new Date().toISOString(), tools: [...tools.values()] }],
|
|
227
|
+
} : prev));
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}, [draft, busy, thread, startThread, loadThreads]);
|
|
232
|
+
|
|
233
|
+
const stop = useCallback(() => { abortRef.current?.abort(); }, []);
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* A recording becomes text in the box, not a sent message.
|
|
237
|
+
*
|
|
238
|
+
* Speech recognition is wrong often enough that sending what it heard would make the person
|
|
239
|
+
* argue with a machine about what they said. They read it first, and edit it if it is wrong.
|
|
240
|
+
*/
|
|
241
|
+
const speakToText = useCallback(async (file) => {
|
|
242
|
+
setListening(true);
|
|
243
|
+
setFailure('');
|
|
244
|
+
try {
|
|
245
|
+
const heard = await chat.speakToText(file);
|
|
246
|
+
if (heard) setDraft((d) => (d ? `${d} ${heard}` : heard));
|
|
247
|
+
else setFailure(tr('chat.heardNothing', 'Nothing was heard in that recording.'));
|
|
248
|
+
} catch (err) {
|
|
249
|
+
setFailure(err.message || tr('chat.transcribeFailed', 'That recording could not be turned into text.'));
|
|
250
|
+
} finally {
|
|
251
|
+
setListening(false);
|
|
252
|
+
}
|
|
253
|
+
}, []);
|
|
254
|
+
|
|
255
|
+
const removeThread = useCallback(async (id) => {
|
|
256
|
+
await chat.deleteThread(id);
|
|
257
|
+
if (thread?.id === id) setThread(null);
|
|
258
|
+
await loadThreads();
|
|
259
|
+
}, [thread, loadThreads]);
|
|
260
|
+
|
|
261
|
+
const resetSession = useCallback(async () => {
|
|
262
|
+
if (!thread) return;
|
|
263
|
+
await chat.resetThread(thread.id);
|
|
264
|
+
}, [thread]);
|
|
265
|
+
|
|
266
|
+
if (!hasSession()) {
|
|
267
|
+
return html`
|
|
268
|
+
<div class="chat-view chat-view--signin">
|
|
269
|
+
<h1>${tr('chat.title', 'Chat')}</h1>
|
|
270
|
+
<p>${tr('chat.signIn', 'Sign in and your first agent is waiting here.')}</p>
|
|
271
|
+
</div>`;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
if (loading) return html`<div class="chat-view"><${Spinner} /></div>`;
|
|
275
|
+
|
|
276
|
+
const turns = thread?.turns ?? [];
|
|
277
|
+
const disabled = status ? !status.enabled : false;
|
|
278
|
+
|
|
279
|
+
return html`
|
|
280
|
+
<div class="chat-view ${listOpen ? 'chat-view--list' : ''}">
|
|
281
|
+
<${ThreadList}
|
|
282
|
+
threads=${threads}
|
|
283
|
+
activeId=${thread?.id}
|
|
284
|
+
onOpen=${openThread}
|
|
285
|
+
onNew=${startThread}
|
|
286
|
+
onDelete=${removeThread}
|
|
287
|
+
onClose=${() => setListOpen(false)} />
|
|
288
|
+
|
|
289
|
+
<section class="chat-main">
|
|
290
|
+
<header class="chat-head">
|
|
291
|
+
<button type="button" class="btn-ghost chat-list-toggle"
|
|
292
|
+
onClick=${() => setListOpen((o) => !o)}>
|
|
293
|
+
${listOpen ? tr('chat.closeList', 'Close') : tr('chat.openList', 'Conversations')}
|
|
294
|
+
</button>
|
|
295
|
+
<h1 class="chat-title">${thread?.title ?? tr('chat.title', 'Chat')}</h1>
|
|
296
|
+
</header>
|
|
297
|
+
|
|
298
|
+
<${StatusBar} status=${status} onReset=${thread ? resetSession : null} />
|
|
299
|
+
|
|
300
|
+
<div class="chat-scroll">
|
|
301
|
+
${turns.length === 0 && !busy ? html`
|
|
302
|
+
<div class="chat-welcome">
|
|
303
|
+
<h2>${tr('chat.welcomeTitle', 'Your first agent')}</h2>
|
|
304
|
+
<p>${tr('chat.welcomeBody', 'It works here the way your own AI tool would, with the same permissions and the same record of what it did. Ask it for something.')}</p>
|
|
305
|
+
</div>` : ''}
|
|
306
|
+
|
|
307
|
+
${turns.map((turn, i) => html`<${Turn} key=${i} id=${`${thread?.id}-${i}`} turn=${turn} />`)}
|
|
308
|
+
<${LiveTurn} text=${live.text} thought=${live.thought} tools=${live.tools} busy=${busy} />
|
|
309
|
+
<${TurnError} message=${failure}
|
|
310
|
+
onRetry=${lastAskRef.current && !busy ? () => send(lastAskRef.current) : null} />
|
|
311
|
+
<div ref=${bottomRef}></div>
|
|
312
|
+
</div>
|
|
313
|
+
|
|
314
|
+
<${Composer}
|
|
315
|
+
value=${draft}
|
|
316
|
+
onInput=${setDraft}
|
|
317
|
+
onSend=${() => send()}
|
|
318
|
+
onStop=${stop}
|
|
319
|
+
onSpeak=${speakToText}
|
|
320
|
+
listening=${listening}
|
|
321
|
+
busy=${busy}
|
|
322
|
+
disabled=${disabled}
|
|
323
|
+
note=${disabled ? (status?.note ?? '') : ''} />
|
|
324
|
+
</section>
|
|
325
|
+
</div>
|
|
326
|
+
`;
|
|
327
|
+
}
|
|
@@ -9,6 +9,9 @@
|
|
|
9
9
|
* @structure default export Landing({ navigate }) + BuildHero/Gallery(live wall)/StatsPanel/BuildAppPrompt/BuildAgentPrompt/AskYourAI
|
|
10
10
|
* @usage routed at /v1/portal (and '/' for browsers) by spa.html
|
|
11
11
|
* @version-history
|
|
12
|
+
* v5.2.0 — 2026-08-16 — The arrival redirect asks the node where this account lands instead of
|
|
13
|
+
* sending everyone to /v1/profile. The server has decided that since the remake, and this page
|
|
14
|
+
* ignored it, so an account created on the new path still arrived at the old one.
|
|
12
15
|
* v5.1.0 — 2026-08-01 — One line above the footer about how this node marks AI-generated
|
|
13
16
|
* content, linking /v1/transparency (TARGET-058 Phase 10). One line and no more: the page
|
|
14
17
|
* that states the limits properly is the one it links to.
|
|
@@ -70,6 +73,7 @@ import htm from 'htm';
|
|
|
70
73
|
const html = htm.bind(h);
|
|
71
74
|
import { t, getLocale } from '/js/i18n.js';
|
|
72
75
|
import { escHtml } from '/js/utils.js';
|
|
76
|
+
import { apiGet } from '/js/api.js';
|
|
73
77
|
import { openAppSandboxed } from '/js/app-sandbox.js';
|
|
74
78
|
import { siteLink, hasSite } from '/js/site.js';
|
|
75
79
|
import { Collapsible } from '/components/Collapsible.js';
|
|
@@ -600,11 +604,30 @@ export default function Landing({ navigate }) {
|
|
|
600
604
|
// The flag suppresses ONLY the arrival redirect. Signing in while standing on this page
|
|
601
605
|
// always moves on to Home: without that, the sign-in modal closed and the visitor was left
|
|
602
606
|
// looking at the same marketing page with no sign that anything had happened.
|
|
607
|
+
//
|
|
608
|
+
// WHERE it forwards to is the node's answer, not this file's. The server has decided since the
|
|
609
|
+
// remake which side an account lands on, and this page sent everyone to /v1/profile regardless —
|
|
610
|
+
// so a new account created on the new path still arrived at the old one. It asks now, and falls
|
|
611
|
+
// back to the profile only when the answer does not arrive.
|
|
603
612
|
useEffect(() => {
|
|
613
|
+
const landingFor = async () => {
|
|
614
|
+
try {
|
|
615
|
+
const res = await apiGet('/v1/home/ui-track');
|
|
616
|
+
return res?.data?.landing || '/v1/profile';
|
|
617
|
+
} catch (err) {
|
|
618
|
+
// Not knowing where to send someone is not a reason to leave them on the marketing page.
|
|
619
|
+
// The old landing is where everyone went until now, so it is the safe answer.
|
|
620
|
+
console.warn('[landing] could not read where this account lands:', err.message);
|
|
621
|
+
return '/v1/profile';
|
|
622
|
+
}
|
|
623
|
+
};
|
|
604
624
|
const check = () => {
|
|
605
625
|
try {
|
|
606
626
|
const raw = localStorage.getItem('aimeat_session');
|
|
607
|
-
if (raw && JSON.parse(raw)?.jwt) {
|
|
627
|
+
if (raw && JSON.parse(raw)?.jwt) {
|
|
628
|
+
landingFor().then((path) => navigate(path));
|
|
629
|
+
return true;
|
|
630
|
+
}
|
|
608
631
|
// eslint-disable-next-line aimeat/no-silent-catch -- stay on landing
|
|
609
632
|
} catch { /* stay on landing */ }
|
|
610
633
|
return false;
|