aimeat 2.0.0 → 2.2.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 +9 -4
- package/dist/locales/en.json +63 -1
- package/dist/locales/fi.json +63 -1
- package/dist/public/components/LinkPreview.js +101 -0
- package/dist/public/components/NotificationBell.js +18 -1
- package/dist/public/cortex-bundled/aimeat-charts.js +158 -10
- package/dist/public/cortex-bundled/aimeat-charts.yaml +1 -1
- package/dist/public/cortex-bundled/aimeat-dag.js +515 -173
- package/dist/public/cortex-bundled/aimeat-dag.yaml +1 -1
- package/dist/public/cortex-bundled/aimeat-i18n.js +6 -1
- package/dist/public/cortex-bundled/aimeat-i18n.yaml +1 -1
- package/dist/public/cortex-bundled/aimeat-surface.js +577 -0
- package/dist/public/cortex-bundled/aimeat-surface.yaml +107 -0
- package/dist/public/cortex-bundled/aimeat-viewport.js +405 -0
- package/dist/public/cortex-bundled/aimeat-viewport.yaml +100 -0
- package/dist/public/css/theme.css +57 -7
- package/dist/public/css/views/admin.css +8 -1
- package/dist/public/css/views/app-grant.css +18 -0
- package/dist/public/css/views/inbox.css +47 -1
- package/dist/public/css/views/portfolio.css +46 -0
- package/dist/public/css/views/profile.css +38 -4
- package/dist/public/js/services/apps.js +19 -3
- package/dist/public/js/services/messages-ai-prompts.js +38 -0
- package/dist/public/js/services/messages.js +26 -4
- package/dist/public/js/services/notebook.js +76 -0
- package/dist/public/js/services/unfurl.js +43 -0
- package/dist/public/lib/VENDORED.md +6 -3
- package/dist/public/lib/aimeat-daisyui-bridge.css +39 -2
- package/dist/public/lib/aimeat-theme.css +538 -0
- package/dist/public/lib/fonts/LICENSE.md +11 -4
- package/dist/public/lib/fonts/fraunces-var-latin-ext.woff2 +0 -0
- package/dist/public/lib/fonts/fraunces-var-latin.woff2 +0 -0
- package/dist/public/lib/fonts/inter-var-latin-ext.woff2 +0 -0
- package/dist/public/lib/fonts/inter-var-latin.woff2 +0 -0
- package/dist/public/lib/fonts/jetbrains-mono-var-latin-ext.woff2 +0 -0
- package/dist/public/lib/fonts/jetbrains-mono-var-latin.woff2 +0 -0
- package/dist/public/lib/fonts/space-grotesk-var-latin-ext.woff2 +0 -0
- package/dist/public/lib/fonts/space-grotesk-var-latin.woff2 +0 -0
- package/dist/public/lib/samples/LICENSE.md +11 -0
- package/dist/public/lib/samples/bass/A1.mp3 +0 -0
- package/dist/public/lib/samples/bass/B2.mp3 +0 -0
- package/dist/public/lib/samples/bass/D2.mp3 +0 -0
- package/dist/public/lib/samples/bass/E1.mp3 +0 -0
- package/dist/public/lib/samples/bass/E3.mp3 +0 -0
- package/dist/public/lib/samples/bass/G2.mp3 +0 -0
- package/dist/public/lib/samples/epiano/C2.mp3 +0 -0
- package/dist/public/lib/samples/epiano/C3.mp3 +0 -0
- package/dist/public/lib/samples/epiano/C4.mp3 +0 -0
- package/dist/public/lib/samples/epiano/C5.mp3 +0 -0
- package/dist/public/lib/samples/epiano/C6.mp3 +0 -0
- package/dist/public/lib/samples/epiano/G2.mp3 +0 -0
- package/dist/public/lib/samples/epiano/G3.mp3 +0 -0
- package/dist/public/lib/samples/epiano/G4.mp3 +0 -0
- package/dist/public/lib/samples/epiano/G5.mp3 +0 -0
- package/dist/public/lib/samples/guitar-steel/A2.mp3 +0 -0
- package/dist/public/lib/samples/guitar-steel/A4.mp3 +0 -0
- package/dist/public/lib/samples/guitar-steel/B3.mp3 +0 -0
- package/dist/public/lib/samples/guitar-steel/D3.mp3 +0 -0
- package/dist/public/lib/samples/guitar-steel/E2.mp3 +0 -0
- package/dist/public/lib/samples/guitar-steel/E4.mp3 +0 -0
- package/dist/public/lib/samples/guitar-steel/E5.mp3 +0 -0
- package/dist/public/lib/samples/guitar-steel/G3.mp3 +0 -0
- package/dist/public/lib/samples/organ/C2.mp3 +0 -0
- package/dist/public/lib/samples/organ/C3.mp3 +0 -0
- package/dist/public/lib/samples/organ/C4.mp3 +0 -0
- package/dist/public/lib/samples/organ/C5.mp3 +0 -0
- package/dist/public/lib/samples/organ/C6.mp3 +0 -0
- package/dist/public/lib/samples/organ/G2.mp3 +0 -0
- package/dist/public/lib/samples/organ/G3.mp3 +0 -0
- package/dist/public/lib/samples/organ/G4.mp3 +0 -0
- package/dist/public/lib/samples/organ/G5.mp3 +0 -0
- package/dist/public/lib/samples/strings/C2.mp3 +0 -0
- package/dist/public/lib/samples/strings/C3.mp3 +0 -0
- package/dist/public/lib/samples/strings/C4.mp3 +0 -0
- package/dist/public/lib/samples/strings/C5.mp3 +0 -0
- package/dist/public/lib/samples/strings/C6.mp3 +0 -0
- package/dist/public/lib/samples/strings/G2.mp3 +0 -0
- package/dist/public/lib/samples/strings/G3.mp3 +0 -0
- package/dist/public/lib/samples/strings/G4.mp3 +0 -0
- package/dist/public/lib/samples/strings/G5.mp3 +0 -0
- package/dist/public/lib/samples/theme-check.html +92 -0
- package/dist/public/lib/samples/themes-boot.js +20 -0
- package/dist/public/lib/samples/themes.html +154 -0
- package/dist/public/lib/samples/themes.js +60 -0
- package/dist/public/lib/samples/trumpet/A3.mp3 +0 -0
- package/dist/public/lib/samples/trumpet/A4.mp3 +0 -0
- package/dist/public/lib/samples/trumpet/A5.mp3 +0 -0
- package/dist/public/lib/samples/trumpet/C4.mp3 +0 -0
- package/dist/public/lib/samples/trumpet/C5.mp3 +0 -0
- package/dist/public/lib/samples/trumpet/E3.mp3 +0 -0
- package/dist/public/lib/samples/trumpet/E4.mp3 +0 -0
- package/dist/public/lib/samples/trumpet/E5.mp3 +0 -0
- package/dist/public/spa.html +2 -0
- package/dist/public/views/app-grant.js +24 -4
- package/dist/public/views/portfolio.js +61 -6
- package/dist/public/views/profile/access-tab/connected-apps.js +81 -5
- package/dist/public/views/profile/apps-tab.js +18 -1
- package/dist/public/views/profile/extensions-tab.maturity.js +4 -1
- package/dist/public/views/profile/inbox-tab/ai-actions.js +86 -0
- package/dist/public/views/profile/inbox-tab/components.js +141 -10
- package/dist/public/views/profile/inbox-tab/helpers.js +26 -0
- package/dist/public/views/profile/inbox-tab/panels.js +18 -3
- package/dist/public/views/profile/inbox-tab/use-thread-ux.js +47 -3
- package/dist/public/views/profile/inbox-tab.js +46 -49
- package/dist/public/views/profile/landing-page.cards.js +7 -0
- package/dist/public/views/profile/landing-page.js +12 -1
- package/dist/public/views/profile/libraries-tab.js +10 -2
- package/dist/public/views/profile/skills-tab.js +1 -1
- package/dist/public/views/profile/wallet-tab.js +64 -0
- package/dist/public/views/public-workspace-viewer.js +1 -1
- package/dist/public/views/start.js +2 -1
- package/dist/scripts/build-sdk-libs.d.ts +16 -0
- package/dist/scripts/build-sdk-libs.d.ts.map +1 -0
- package/dist/scripts/build-sdk-libs.js +112 -0
- package/dist/scripts/build-sdk-libs.js.map +1 -0
- package/dist/scripts/check-openapi.d.ts +2 -0
- package/dist/scripts/check-openapi.d.ts.map +1 -0
- package/dist/scripts/check-openapi.js +139 -0
- package/dist/scripts/check-openapi.js.map +1 -0
- package/dist/scripts/embed-viewport.d.ts +23 -0
- package/dist/scripts/embed-viewport.d.ts.map +1 -0
- package/dist/scripts/embed-viewport.js +116 -0
- package/dist/scripts/embed-viewport.js.map +1 -0
- package/dist/src/auth/sse-domain-scopes.d.ts +50 -0
- package/dist/src/auth/sse-domain-scopes.d.ts.map +1 -0
- package/dist/src/auth/sse-domain-scopes.js +111 -0
- package/dist/src/auth/sse-domain-scopes.js.map +1 -0
- package/dist/src/cli/connect/auth.d.ts +15 -0
- package/dist/src/cli/connect/auth.d.ts.map +1 -1
- package/dist/src/cli/connect/auth.js +25 -6
- package/dist/src/cli/connect/auth.js.map +1 -1
- package/dist/src/cli/connect/keychain.d.ts +9 -0
- package/dist/src/cli/connect/keychain.d.ts.map +1 -1
- package/dist/src/cli/connect/keychain.js +21 -8
- package/dist/src/cli/connect/keychain.js.map +1 -1
- package/dist/src/cli/connect/mcp/tools/agent-tasks.d.ts.map +1 -1
- package/dist/src/cli/connect/mcp/tools/agent-tasks.js +4 -1
- package/dist/src/cli/connect/mcp/tools/agent-tasks.js.map +1 -1
- package/dist/src/cli/connect/mcp/tools/core.d.ts.map +1 -1
- package/dist/src/cli/connect/mcp/tools/core.js +14 -3
- package/dist/src/cli/connect/mcp/tools/core.js.map +1 -1
- package/dist/src/cli/connect/mcp/tools/exchange.d.ts +18 -0
- package/dist/src/cli/connect/mcp/tools/exchange.d.ts.map +1 -0
- package/dist/src/cli/connect/mcp/tools/exchange.js +170 -0
- package/dist/src/cli/connect/mcp/tools/exchange.js.map +1 -0
- package/dist/src/cli/connect/mcp/tools/index.d.ts.map +1 -1
- package/dist/src/cli/connect/mcp/tools/index.js +2 -0
- package/dist/src/cli/connect/mcp/tools/index.js.map +1 -1
- package/dist/src/cli/connect/mcp/tools/workspaces.d.ts +3 -0
- package/dist/src/cli/connect/mcp/tools/workspaces.d.ts.map +1 -1
- package/dist/src/cli/connect/mcp/tools/workspaces.js +4 -2
- package/dist/src/cli/connect/mcp/tools/workspaces.js.map +1 -1
- package/dist/src/cli/connect/tool-call-defs-core.d.ts.map +1 -1
- package/dist/src/cli/connect/tool-call-defs-core.js +13 -1
- package/dist/src/cli/connect/tool-call-defs-core.js.map +1 -1
- package/dist/src/cli/connect/tool-call-defs-exchange.d.ts +3 -0
- package/dist/src/cli/connect/tool-call-defs-exchange.d.ts.map +1 -0
- package/dist/src/cli/connect/tool-call-defs-exchange.js +146 -0
- package/dist/src/cli/connect/tool-call-defs-exchange.js.map +1 -0
- 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/commerce/__tests__/x402-registry.test.d.ts +2 -0
- package/dist/src/commerce/__tests__/x402-registry.test.d.ts.map +1 -0
- package/dist/src/commerce/__tests__/x402-registry.test.js +105 -0
- package/dist/src/commerce/__tests__/x402-registry.test.js.map +1 -0
- package/dist/src/commerce/evm-address.d.ts +21 -0
- package/dist/src/commerce/evm-address.d.ts.map +1 -0
- package/dist/src/commerce/evm-address.js +94 -0
- package/dist/src/commerce/evm-address.js.map +1 -0
- package/dist/src/commerce/money.d.ts +18 -5
- package/dist/src/commerce/money.d.ts.map +1 -1
- package/dist/src/commerce/money.js +27 -6
- package/dist/src/commerce/money.js.map +1 -1
- package/dist/src/commerce/session-service.d.ts +14 -0
- package/dist/src/commerce/session-service.d.ts.map +1 -1
- package/dist/src/commerce/session-service.js +1 -1
- package/dist/src/commerce/session-service.js.map +1 -1
- package/dist/src/commerce/x402-facilitator.d.ts +64 -13
- package/dist/src/commerce/x402-facilitator.d.ts.map +1 -1
- package/dist/src/commerce/x402-facilitator.js +71 -19
- package/dist/src/commerce/x402-facilitator.js.map +1 -1
- package/dist/src/commerce/x402-handler.d.ts +13 -7
- package/dist/src/commerce/x402-handler.d.ts.map +1 -1
- package/dist/src/commerce/x402-handler.js +23 -10
- package/dist/src/commerce/x402-handler.js.map +1 -1
- package/dist/src/commerce/x402.d.ts +11 -6
- package/dist/src/commerce/x402.d.ts.map +1 -1
- package/dist/src/commerce/x402.js +10 -7
- package/dist/src/commerce/x402.js.map +1 -1
- package/dist/src/config-types.d.ts +12 -0
- package/dist/src/config-types.d.ts.map +1 -1
- package/dist/src/config.d.ts.map +1 -1
- package/dist/src/config.js +8 -0
- package/dist/src/config.js.map +1 -1
- package/dist/src/data/app-templates/shells.d.ts +15 -3
- package/dist/src/data/app-templates/shells.d.ts.map +1 -1
- package/dist/src/data/app-templates/shells.js +97 -12
- package/dist/src/data/app-templates/shells.js.map +1 -1
- package/dist/src/data/app-templates.js +2 -2
- package/dist/src/data/app-templates.js.map +1 -1
- package/dist/src/data/appdev-pitfalls.d.ts +2 -0
- package/dist/src/data/appdev-pitfalls.d.ts.map +1 -1
- package/dist/src/data/appdev-pitfalls.js +24 -1
- package/dist/src/data/appdev-pitfalls.js.map +1 -1
- package/dist/src/data/library-packs/cortex.d.ts.map +1 -1
- package/dist/src/data/library-packs/cortex.js +108 -5
- package/dist/src/data/library-packs/cortex.js.map +1 -1
- package/dist/src/data/library-packs/sdk.d.ts.map +1 -1
- package/dist/src/data/library-packs/sdk.js +32 -8
- 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 +83 -6
- package/dist/src/data/library-packs/vendored.js.map +1 -1
- package/dist/src/generated/api-types.d.ts +2039 -24
- package/dist/src/generated/api-types.d.ts.map +1 -1
- package/dist/src/mcp/agent-tasks.d.ts +4 -0
- package/dist/src/mcp/agent-tasks.d.ts.map +1 -1
- package/dist/src/mcp/agent-tasks.js +20 -2
- package/dist/src/mcp/agent-tasks.js.map +1 -1
- package/dist/src/mcp/annotations.d.ts.map +1 -1
- package/dist/src/mcp/annotations.js +20 -0
- package/dist/src/mcp/annotations.js.map +1 -1
- package/dist/src/mcp/apps.d.ts.map +1 -1
- package/dist/src/mcp/apps.js +8 -4
- package/dist/src/mcp/apps.js.map +1 -1
- package/dist/src/mcp/capabilities.d.ts +7 -1
- package/dist/src/mcp/capabilities.d.ts.map +1 -1
- package/dist/src/mcp/capabilities.js +5 -2
- package/dist/src/mcp/capabilities.js.map +1 -1
- package/dist/src/mcp/catalog/definitions/commerce.d.ts.map +1 -1
- package/dist/src/mcp/catalog/definitions/commerce.js +4 -2
- package/dist/src/mcp/catalog/definitions/commerce.js.map +1 -1
- package/dist/src/mcp/catalog/definitions/discovery-work-boards.d.ts.map +1 -1
- package/dist/src/mcp/catalog/definitions/discovery-work-boards.js +4 -3
- package/dist/src/mcp/catalog/definitions/discovery-work-boards.js.map +1 -1
- package/dist/src/mcp/catalog/definitions/exchange.d.ts +18 -0
- package/dist/src/mcp/catalog/definitions/exchange.d.ts.map +1 -0
- package/dist/src/mcp/catalog/definitions/exchange.js +182 -0
- package/dist/src/mcp/catalog/definitions/exchange.js.map +1 -0
- package/dist/src/mcp/catalog/definitions/organisms-workspaces-apps.js +1 -1
- 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 +3 -2
- package/dist/src/mcp/catalog/definitions/schedules-tasks-memory.js.map +1 -1
- package/dist/src/mcp/catalog/definitions.d.ts.map +1 -1
- package/dist/src/mcp/catalog/definitions.js +2 -0
- package/dist/src/mcp/catalog/definitions.js.map +1 -1
- package/dist/src/mcp/catalog/output-schemas.d.ts +6 -1
- package/dist/src/mcp/catalog/output-schemas.d.ts.map +1 -1
- package/dist/src/mcp/catalog/output-schemas.js +6 -1
- package/dist/src/mcp/catalog/output-schemas.js.map +1 -1
- package/dist/src/mcp/catalog/scopes.d.ts.map +1 -1
- package/dist/src/mcp/catalog/scopes.js +22 -0
- 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 +14 -0
- package/dist/src/mcp/catalog/surfaces.js.map +1 -1
- package/dist/src/mcp/commerce.d.ts.map +1 -1
- package/dist/src/mcp/commerce.js +15 -3
- package/dist/src/mcp/commerce.js.map +1 -1
- package/dist/src/mcp/core-storage.d.ts +23 -0
- package/dist/src/mcp/core-storage.d.ts.map +1 -0
- package/dist/src/mcp/core-storage.js +157 -0
- package/dist/src/mcp/core-storage.js.map +1 -0
- package/dist/src/mcp/core.d.ts +16 -0
- package/dist/src/mcp/core.d.ts.map +1 -1
- package/dist/src/mcp/core.js +75 -119
- package/dist/src/mcp/core.js.map +1 -1
- package/dist/src/mcp/dm-messages.d.ts +4 -0
- package/dist/src/mcp/dm-messages.d.ts.map +1 -1
- package/dist/src/mcp/dm-messages.js +43 -2
- package/dist/src/mcp/dm-messages.js.map +1 -1
- package/dist/src/mcp/exchange-run.d.ts +5 -0
- package/dist/src/mcp/exchange-run.d.ts.map +1 -0
- package/dist/src/mcp/exchange-run.js +226 -0
- package/dist/src/mcp/exchange-run.js.map +1 -0
- package/dist/src/mcp/exchange.d.ts +5 -0
- package/dist/src/mcp/exchange.d.ts.map +1 -0
- package/dist/src/mcp/exchange.js +352 -0
- package/dist/src/mcp/exchange.js.map +1 -0
- package/dist/src/mcp/extensions.d.ts.map +1 -1
- package/dist/src/mcp/extensions.js +17 -2
- package/dist/src/mcp/extensions.js.map +1 -1
- package/dist/src/mcp/index.d.ts +5 -0
- package/dist/src/mcp/index.d.ts.map +1 -1
- package/dist/src/mcp/index.js +26 -3
- package/dist/src/mcp/index.js.map +1 -1
- package/dist/src/mcp/memory-namespace-hints.d.ts +33 -0
- package/dist/src/mcp/memory-namespace-hints.d.ts.map +1 -0
- package/dist/src/mcp/memory-namespace-hints.js +60 -0
- package/dist/src/mcp/memory-namespace-hints.js.map +1 -0
- package/dist/src/mcp/workspaces.d.ts +5 -0
- package/dist/src/mcp/workspaces.d.ts.map +1 -1
- package/dist/src/mcp/workspaces.js +5 -3
- package/dist/src/mcp/workspaces.js.map +1 -1
- package/dist/src/models/agent-task-schemas.d.ts +25 -3
- package/dist/src/models/agent-task-schemas.d.ts.map +1 -1
- package/dist/src/models/agent-task-schemas.js +16 -0
- package/dist/src/models/agent-task-schemas.js.map +1 -1
- package/dist/src/models/app-tool-schemas.d.ts +573 -2
- package/dist/src/models/app-tool-schemas.d.ts.map +1 -1
- package/dist/src/models/app-tool-schemas.js +73 -2
- package/dist/src/models/app-tool-schemas.js.map +1 -1
- package/dist/src/models/odps-schemas.d.ts +305 -0
- package/dist/src/models/odps-schemas.d.ts.map +1 -0
- package/dist/src/models/odps-schemas.js +182 -0
- package/dist/src/models/odps-schemas.js.map +1 -0
- package/dist/src/models/offer-schemas.d.ts +359 -4
- package/dist/src/models/offer-schemas.d.ts.map +1 -1
- package/dist/src/models/offer-schemas.js +37 -0
- package/dist/src/models/offer-schemas.js.map +1 -1
- package/dist/src/models/schemas.d.ts +7 -3
- package/dist/src/models/schemas.d.ts.map +1 -1
- package/dist/src/models/schemas.js +13 -1
- package/dist/src/models/schemas.js.map +1 -1
- package/dist/src/models/webhook-schemas.d.ts +8 -8
- package/dist/src/routes/agent-tasks/create-read.d.ts +4 -0
- package/dist/src/routes/agent-tasks/create-read.d.ts.map +1 -1
- package/dist/src/routes/agent-tasks/create-read.js +20 -1
- package/dist/src/routes/agent-tasks/create-read.js.map +1 -1
- package/dist/src/routes/agent-tasks/lifecycle.d.ts.map +1 -1
- package/dist/src/routes/agent-tasks/lifecycle.js +10 -0
- package/dist/src/routes/agent-tasks/lifecycle.js.map +1 -1
- package/dist/src/routes/agents/device-auth.d.ts +4 -0
- package/dist/src/routes/agents/device-auth.d.ts.map +1 -1
- package/dist/src/routes/agents/device-auth.js +19 -4
- package/dist/src/routes/agents/device-auth.js.map +1 -1
- package/dist/src/routes/agents/offers.d.ts +2 -0
- package/dist/src/routes/agents/offers.d.ts.map +1 -1
- package/dist/src/routes/agents/offers.js +0 -0
- package/dist/src/routes/agents/offers.js.map +1 -1
- package/dist/src/routes/app-grants.d.ts +12 -0
- package/dist/src/routes/app-grants.d.ts.map +1 -1
- package/dist/src/routes/app-grants.js +90 -27
- package/dist/src/routes/app-grants.js.map +1 -1
- package/dist/src/routes/apps/drafts.d.ts +3 -0
- package/dist/src/routes/apps/drafts.d.ts.map +1 -1
- package/dist/src/routes/apps/drafts.js +63 -1
- package/dist/src/routes/apps/drafts.js.map +1 -1
- package/dist/src/routes/apps/fork-manage.d.ts.map +1 -1
- package/dist/src/routes/apps/fork-manage.js +24 -1
- package/dist/src/routes/apps/fork-manage.js.map +1 -1
- package/dist/src/routes/apps/publish.d.ts +4 -0
- package/dist/src/routes/apps/publish.d.ts.map +1 -1
- package/dist/src/routes/apps/publish.js +44 -3
- package/dist/src/routes/apps/publish.js.map +1 -1
- package/dist/src/routes/apps-cost.d.ts +25 -0
- package/dist/src/routes/apps-cost.d.ts.map +1 -0
- package/dist/src/routes/apps-cost.js +107 -0
- package/dist/src/routes/apps-cost.js.map +1 -0
- package/dist/src/routes/commerce.d.ts.map +1 -1
- package/dist/src/routes/commerce.js +122 -2
- package/dist/src/routes/commerce.js.map +1 -1
- package/dist/src/routes/exchange-market.d.ts +32 -0
- package/dist/src/routes/exchange-market.d.ts.map +1 -0
- package/dist/src/routes/exchange-market.js +580 -0
- package/dist/src/routes/exchange-market.js.map +1 -0
- package/dist/src/routes/exchange.d.ts +33 -0
- package/dist/src/routes/exchange.d.ts.map +1 -0
- package/dist/src/routes/exchange.js +398 -0
- package/dist/src/routes/exchange.js.map +1 -0
- package/dist/src/routes/extensions/actions.d.ts.map +1 -1
- package/dist/src/routes/extensions/actions.js +18 -0
- package/dist/src/routes/extensions/actions.js.map +1 -1
- package/dist/src/routes/extensions/crud.d.ts.map +1 -1
- package/dist/src/routes/extensions/crud.js +36 -3
- package/dist/src/routes/extensions/crud.js.map +1 -1
- package/dist/src/routes/extensions/entitlement-gate.d.ts +33 -0
- package/dist/src/routes/extensions/entitlement-gate.d.ts.map +1 -0
- package/dist/src/routes/extensions/entitlement-gate.js +156 -0
- package/dist/src/routes/extensions/entitlement-gate.js.map +1 -0
- package/dist/src/routes/extensions/manifest.d.ts +15 -0
- package/dist/src/routes/extensions/manifest.d.ts.map +1 -1
- package/dist/src/routes/extensions/manifest.js +101 -2
- package/dist/src/routes/extensions/manifest.js.map +1 -1
- package/dist/src/routes/extensions/pacing.d.ts +31 -0
- package/dist/src/routes/extensions/pacing.d.ts.map +1 -0
- package/dist/src/routes/extensions/pacing.js +73 -0
- package/dist/src/routes/extensions/pacing.js.map +1 -0
- package/dist/src/routes/extensions/paywall.d.ts.map +1 -1
- package/dist/src/routes/extensions/paywall.js +20 -11
- package/dist/src/routes/extensions/paywall.js.map +1 -1
- package/dist/src/routes/federation-sync/messaging.d.ts.map +1 -1
- package/dist/src/routes/federation-sync/messaging.js +3 -1
- package/dist/src/routes/federation-sync/messaging.js.map +1 -1
- package/dist/src/routes/ghii/recovery.d.ts +2 -0
- package/dist/src/routes/ghii/recovery.d.ts.map +1 -1
- package/dist/src/routes/ghii/recovery.js +7 -0
- package/dist/src/routes/ghii/recovery.js.map +1 -1
- package/dist/src/routes/ghii/register-login.d.ts +4 -0
- package/dist/src/routes/ghii/register-login.d.ts.map +1 -1
- package/dist/src/routes/ghii/register-login.js +45 -22
- package/dist/src/routes/ghii/register-login.js.map +1 -1
- package/dist/src/routes/ghii/web-verify.d.ts +5 -0
- package/dist/src/routes/ghii/web-verify.d.ts.map +1 -1
- package/dist/src/routes/ghii/web-verify.js +24 -3
- package/dist/src/routes/ghii/web-verify.js.map +1 -1
- package/dist/src/routes/libs/sdk-serve.d.ts +11 -0
- package/dist/src/routes/libs/sdk-serve.d.ts.map +1 -0
- package/dist/src/routes/libs/sdk-serve.js +53 -0
- package/dist/src/routes/libs/sdk-serve.js.map +1 -0
- package/dist/src/routes/libs.d.ts +7 -1
- package/dist/src/routes/libs.d.ts.map +1 -1
- package/dist/src/routes/libs.js +65 -146
- package/dist/src/routes/libs.js.map +1 -1
- package/dist/src/routes/memory/crud.d.ts.map +1 -1
- package/dist/src/routes/memory/crud.js +10 -0
- package/dist/src/routes/memory/crud.js.map +1 -1
- package/dist/src/routes/messages.d.ts +3 -0
- package/dist/src/routes/messages.d.ts.map +1 -1
- package/dist/src/routes/messages.js +9 -0
- package/dist/src/routes/messages.js.map +1 -1
- package/dist/src/routes/notifications.d.ts +6 -3
- package/dist/src/routes/notifications.d.ts.map +1 -1
- package/dist/src/routes/notifications.js +32 -3
- package/dist/src/routes/notifications.js.map +1 -1
- package/dist/src/routes/organisms/crud.d.ts +3 -0
- package/dist/src/routes/organisms/crud.d.ts.map +1 -1
- package/dist/src/routes/organisms/crud.js +5 -2
- package/dist/src/routes/organisms/crud.js.map +1 -1
- package/dist/src/routes/organisms/workspace-access.d.ts.map +1 -1
- package/dist/src/routes/organisms/workspace-access.js +38 -20
- package/dist/src/routes/organisms/workspace-access.js.map +1 -1
- package/dist/src/routes/organisms/workspace-read.d.ts.map +1 -1
- package/dist/src/routes/organisms/workspace-read.js +7 -2
- package/dist/src/routes/organisms/workspace-read.js.map +1 -1
- package/dist/src/routes/public-stats.d.ts +7 -0
- package/dist/src/routes/public-stats.d.ts.map +1 -1
- package/dist/src/routes/public-stats.js +28 -7
- package/dist/src/routes/public-stats.js.map +1 -1
- package/dist/src/routes/sse.d.ts +7 -0
- package/dist/src/routes/sse.d.ts.map +1 -1
- package/dist/src/routes/sse.js +36 -6
- package/dist/src/routes/sse.js.map +1 -1
- package/dist/src/routes/storage-files.d.ts +11 -0
- package/dist/src/routes/storage-files.d.ts.map +1 -1
- package/dist/src/routes/storage-files.js +58 -51
- package/dist/src/routes/storage-files.js.map +1 -1
- package/dist/src/routes/subdomains.d.ts +4 -0
- package/dist/src/routes/subdomains.d.ts.map +1 -1
- package/dist/src/routes/subdomains.js +42 -5
- package/dist/src/routes/subdomains.js.map +1 -1
- package/dist/src/routes/unfurl.d.ts +27 -0
- package/dist/src/routes/unfurl.d.ts.map +1 -0
- package/dist/src/routes/unfurl.js +180 -0
- package/dist/src/routes/unfurl.js.map +1 -0
- package/dist/src/routes/upload.d.ts +13 -0
- package/dist/src/routes/upload.d.ts.map +1 -1
- package/dist/src/routes/upload.js +115 -28
- package/dist/src/routes/upload.js.map +1 -1
- package/dist/src/routes/webmcp.d.ts +3 -0
- package/dist/src/routes/webmcp.d.ts.map +1 -1
- package/dist/src/routes/webmcp.js +59 -0
- package/dist/src/routes/webmcp.js.map +1 -1
- package/dist/src/schemas/knowledge-package.d.ts +1 -1
- package/dist/src/server-bootstrap/routes-loader.d.ts +1 -0
- package/dist/src/server-bootstrap/routes-loader.d.ts.map +1 -1
- package/dist/src/server-bootstrap/routes-loader.js +8 -0
- package/dist/src/server-bootstrap/routes-loader.js.map +1 -1
- package/dist/src/server-bootstrap/static-files.d.ts +4 -0
- package/dist/src/server-bootstrap/static-files.d.ts.map +1 -1
- package/dist/src/server-bootstrap/static-files.js +11 -0
- package/dist/src/server-bootstrap/static-files.js.map +1 -1
- package/dist/src/services/agent-face.d.ts +10 -2
- package/dist/src/services/agent-face.d.ts.map +1 -1
- package/dist/src/services/agent-face.js +10 -4
- package/dist/src/services/agent-face.js.map +1 -1
- package/dist/src/services/app-tool-interfaces.d.ts +37 -0
- package/dist/src/services/app-tool-interfaces.d.ts.map +1 -0
- package/dist/src/services/app-tool-interfaces.js +101 -0
- package/dist/src/services/app-tool-interfaces.js.map +1 -0
- package/dist/src/services/build-app-prompt.d.ts +22 -0
- package/dist/src/services/build-app-prompt.d.ts.map +1 -1
- package/dist/src/services/build-app-prompt.js +108 -11
- package/dist/src/services/build-app-prompt.js.map +1 -1
- package/dist/src/services/call-timing.d.ts +51 -0
- package/dist/src/services/call-timing.d.ts.map +1 -0
- package/dist/src/services/call-timing.js +91 -0
- package/dist/src/services/call-timing.js.map +1 -0
- package/dist/src/services/capability-invoke.d.ts +2 -0
- package/dist/src/services/capability-invoke.d.ts.map +1 -1
- package/dist/src/services/capability-invoke.js +10 -0
- package/dist/src/services/capability-invoke.js.map +1 -1
- package/dist/src/services/config-schema.d.ts.map +1 -1
- package/dist/src/services/config-schema.js +6 -0
- package/dist/src/services/config-schema.js.map +1 -1
- package/dist/src/services/contacts.d.ts +25 -1
- package/dist/src/services/contacts.d.ts.map +1 -1
- package/dist/src/services/contacts.js +30 -0
- package/dist/src/services/contacts.js.map +1 -1
- package/dist/src/services/draft-token.d.ts +22 -2
- package/dist/src/services/draft-token.d.ts.map +1 -1
- package/dist/src/services/draft-token.js +52 -3
- package/dist/src/services/draft-token.js.map +1 -1
- package/dist/src/services/entitlement-money.d.ts +55 -0
- package/dist/src/services/entitlement-money.d.ts.map +1 -0
- package/dist/src/services/entitlement-money.js +68 -0
- package/dist/src/services/entitlement-money.js.map +1 -0
- package/dist/src/services/exchange-market.d.ts +280 -0
- package/dist/src/services/exchange-market.d.ts.map +1 -0
- package/dist/src/services/exchange-market.js +276 -0
- package/dist/src/services/exchange-market.js.map +1 -0
- package/dist/src/services/exchange-odps.d.ts +58 -0
- package/dist/src/services/exchange-odps.d.ts.map +1 -0
- package/dist/src/services/exchange-odps.js +400 -0
- package/dist/src/services/exchange-odps.js.map +1 -0
- package/dist/src/services/exchange-projection.d.ts +61 -0
- package/dist/src/services/exchange-projection.d.ts.map +1 -0
- package/dist/src/services/exchange-projection.js +504 -0
- package/dist/src/services/exchange-projection.js.map +1 -0
- package/dist/src/services/exchange-proposals.d.ts +47 -0
- package/dist/src/services/exchange-proposals.d.ts.map +1 -0
- package/dist/src/services/exchange-proposals.js +73 -0
- package/dist/src/services/exchange-proposals.js.map +1 -0
- package/dist/src/services/exchange-work.d.ts +30 -0
- package/dist/src/services/exchange-work.d.ts.map +1 -0
- package/dist/src/services/exchange-work.js +43 -0
- package/dist/src/services/exchange-work.js.map +1 -0
- package/dist/src/services/extension-files.d.ts +64 -0
- package/dist/src/services/extension-files.d.ts.map +1 -0
- package/dist/src/services/extension-files.js +88 -0
- package/dist/src/services/extension-files.js.map +1 -0
- package/dist/src/services/extension-runtime.d.ts +33 -0
- package/dist/src/services/extension-runtime.d.ts.map +1 -1
- package/dist/src/services/extension-runtime.js +52 -0
- package/dist/src/services/extension-runtime.js.map +1 -1
- package/dist/src/services/file-refs.d.ts +105 -0
- package/dist/src/services/file-refs.d.ts.map +1 -0
- package/dist/src/services/file-refs.js +106 -0
- package/dist/src/services/file-refs.js.map +1 -0
- package/dist/src/services/message-send.d.ts.map +1 -1
- package/dist/src/services/message-send.js +4 -1
- package/dist/src/services/message-send.js.map +1 -1
- package/dist/src/services/metered-entitlements.d.ts +210 -0
- package/dist/src/services/metered-entitlements.d.ts.map +1 -0
- package/dist/src/services/metered-entitlements.js +268 -0
- package/dist/src/services/metered-entitlements.js.map +1 -0
- package/dist/src/services/notify.d.ts +7 -0
- package/dist/src/services/notify.d.ts.map +1 -1
- package/dist/src/services/notify.js +35 -0
- package/dist/src/services/notify.js.map +1 -1
- package/dist/src/services/owner-memory.d.ts +30 -1
- package/dist/src/services/owner-memory.d.ts.map +1 -1
- package/dist/src/services/owner-memory.js +31 -14
- package/dist/src/services/owner-memory.js.map +1 -1
- package/dist/src/services/owner-provisioning.d.ts +5 -0
- package/dist/src/services/owner-provisioning.d.ts.map +1 -1
- package/dist/src/services/owner-provisioning.js +20 -2
- package/dist/src/services/owner-provisioning.js.map +1 -1
- package/dist/src/services/task-files.d.ts +51 -0
- package/dist/src/services/task-files.d.ts.map +1 -0
- package/dist/src/services/task-files.js +58 -0
- package/dist/src/services/task-files.js.map +1 -0
- package/dist/src/services/upload-token.d.ts +29 -0
- package/dist/src/services/upload-token.d.ts.map +1 -1
- package/dist/src/services/upload-token.js +37 -0
- package/dist/src/services/upload-token.js.map +1 -1
- package/dist/src/services/upload-zip.d.ts +2 -0
- package/dist/src/services/upload-zip.d.ts.map +1 -1
- package/dist/src/services/upload-zip.js +5 -1
- package/dist/src/services/upload-zip.js.map +1 -1
- package/dist/src/services/workspace-meta.d.ts +15 -0
- package/dist/src/services/workspace-meta.d.ts.map +1 -1
- package/dist/src/services/workspace-meta.js +17 -0
- package/dist/src/services/workspace-meta.js.map +1 -1
- package/dist/src/services/workspace-provision.d.ts +3 -0
- package/dist/src/services/workspace-provision.d.ts.map +1 -1
- package/dist/src/services/workspace-provision.js +5 -3
- package/dist/src/services/workspace-provision.js.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 +10 -0
- package/dist/src/storage/providers/postgres-kysely/methods/app-grants.js.map +1 -1
- package/dist/src/storage/providers/postgres-kysely/methods/apps.d.ts +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/apps.d.ts.map +1 -1
- package/dist/src/storage/providers/postgres-kysely/methods/apps.js +2 -0
- package/dist/src/storage/providers/postgres-kysely/methods/apps.js.map +1 -1
- package/dist/src/storage/providers/postgres-kysely/methods/identity.d.ts +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/identity.d.ts.map +1 -1
- package/dist/src/storage/providers/postgres-kysely/methods/identity.js +4 -0
- package/dist/src/storage/providers/postgres-kysely/methods/identity.js.map +1 -1
- package/dist/src/storage/providers/postgres-kysely/methods/memory.d.ts +2 -0
- package/dist/src/storage/providers/postgres-kysely/methods/memory.d.ts.map +1 -1
- package/dist/src/storage/providers/postgres-kysely/methods/memory.js +12 -1
- package/dist/src/storage/providers/postgres-kysely/methods/memory.js.map +1 -1
- package/dist/src/storage/providers/postgres-kysely/methods/organisms.d.ts.map +1 -1
- package/dist/src/storage/providers/postgres-kysely/methods/organisms.js +5 -1
- package/dist/src/storage/providers/postgres-kysely/methods/organisms.js.map +1 -1
- package/dist/src/storage/providers/postgres-kysely/migrations/0011_unique_verified_email.sql +25 -0
- package/dist/src/storage/providers/postgres-kysely/migrations/0012_unique_live_app_grant.sql +29 -0
- package/dist/src/storage/providers/sqlite/methods/apps.d.ts +4 -0
- package/dist/src/storage/providers/sqlite/methods/apps.d.ts.map +1 -1
- package/dist/src/storage/providers/sqlite/methods/apps.js +9 -0
- package/dist/src/storage/providers/sqlite/methods/apps.js.map +1 -1
- package/dist/src/storage/providers/sqlite/methods/governance.d.ts +1 -0
- package/dist/src/storage/providers/sqlite/methods/governance.d.ts.map +1 -1
- package/dist/src/storage/providers/sqlite/methods/governance.js +4 -1
- package/dist/src/storage/providers/sqlite/methods/governance.js.map +1 -1
- package/dist/src/storage/providers/sqlite/methods/identity-nodes.d.ts +1 -0
- package/dist/src/storage/providers/sqlite/methods/identity-nodes.d.ts.map +1 -1
- package/dist/src/storage/providers/sqlite/methods/identity-nodes.js +4 -0
- package/dist/src/storage/providers/sqlite/methods/identity-nodes.js.map +1 -1
- package/dist/src/storage/providers/sqlite/methods/owner.d.ts +5 -0
- package/dist/src/storage/providers/sqlite/methods/owner.d.ts.map +1 -1
- package/dist/src/storage/providers/sqlite/methods/owner.js +8 -0
- package/dist/src/storage/providers/sqlite/methods/owner.js.map +1 -1
- package/dist/src/storage/providers/sqlite/schema.d.ts +3 -0
- package/dist/src/storage/providers/sqlite/schema.d.ts.map +1 -1
- package/dist/src/storage/providers/sqlite/schema.js +40 -0
- package/dist/src/storage/providers/sqlite/schema.js.map +1 -1
- package/dist/src/storage/repositories/app-grant.repository.d.ts +9 -1
- package/dist/src/storage/repositories/app-grant.repository.d.ts.map +1 -1
- package/dist/src/storage/repositories/app.repository.d.ts +0 -0
- package/dist/src/storage/repositories/app.repository.d.ts.map +1 -1
- package/dist/src/storage/repositories/identity.repository.d.ts +6 -0
- package/dist/src/storage/repositories/identity.repository.d.ts.map +1 -1
- package/dist/src/storage/repositories/memory.repository.d.ts +14 -0
- package/dist/src/storage/repositories/memory.repository.d.ts.map +1 -1
- package/dist/src/storage/repositories-impl/memory-repository.d.ts +8 -1
- package/dist/src/storage/repositories-impl/memory-repository.d.ts.map +1 -1
- package/dist/src/storage/repositories-impl/memory-repository.js +15 -4
- package/dist/src/storage/repositories-impl/memory-repository.js.map +1 -1
- package/dist/src/storage/types/agents-messaging.d.ts +19 -0
- package/dist/src/storage/types/agents-messaging.d.ts.map +1 -1
- package/dist/src/storage/types/agents-messaging.js.map +1 -1
- package/dist/src/storage/types/apps.d.ts +1 -0
- package/dist/src/storage/types/apps.d.ts.map +1 -1
- package/dist/src/storage/types/organisms-federation.d.ts +50 -0
- package/dist/src/storage/types/organisms-federation.d.ts.map +1 -1
- package/dist/src/utils/app-badge.d.ts.map +1 -1
- package/dist/src/utils/app-badge.js +7 -3
- package/dist/src/utils/app-badge.js.map +1 -1
- package/dist/src/utils/app-mobile-lint.d.ts +17 -0
- package/dist/src/utils/app-mobile-lint.d.ts.map +1 -0
- package/dist/src/utils/app-mobile-lint.js +40 -0
- package/dist/src/utils/app-mobile-lint.js.map +1 -0
- package/dist/static/app-catalog/_template.html +18 -82
- package/dist/static/app-catalog/js/apps-io.js +51 -165
- package/dist/static/app-catalog/js/cortex.js +3 -1
- package/dist/static/app-catalog/js/cost.js +100 -0
- package/dist/static/app-catalog/js/db.js +23 -93
- package/dist/static/app-catalog/js/detail.js +568 -59
- package/dist/static/app-catalog/js/favorites.js +71 -0
- package/dist/static/app-catalog/js/i18n-data.js +369 -19
- package/dist/static/app-catalog/js/main.js +50 -139
- package/dist/static/app-catalog/js/migrate.js +88 -0
- package/dist/static/app-catalog/js/monetize.js +205 -17
- package/dist/static/app-catalog/js/odps.js +489 -0
- package/dist/static/app-catalog/js/promote.js +70 -0
- package/dist/static/app-catalog/js/render.js +29 -139
- package/dist/static/app-catalog/js/server-io.js +126 -223
- package/dist/static/app-catalog/js/settings.js +11 -204
- package/dist/static/app-catalog/js/workcopy.js +198 -0
- package/dist/static/app-catalog/styles/app-catalog.css +100 -0
- package/dist/static/app-catalog.html +2220 -1029
- package/dist/static/sdk-libs/_core/config.js +52 -0
- package/dist/static/sdk-libs/_core/http.js +52 -0
- package/dist/static/sdk-libs/_core/namespace.js +33 -0
- package/dist/static/sdk-libs/_core/sdk-globals.d.ts +50 -0
- package/dist/static/sdk-libs/_core/session.js +66 -0
- package/dist/static/sdk-libs/agentface/index.js +102 -0
- package/dist/static/sdk-libs/agents/index.js +305 -0
- package/dist/static/sdk-libs/ai/index.js +153 -0
- package/dist/static/sdk-libs/audio/core.js +111 -0
- package/dist/static/sdk-libs/audio/index.js +380 -0
- package/dist/static/sdk-libs/audio/instruments.js +369 -0
- package/dist/static/sdk-libs/auth/cluster.js +97 -0
- package/dist/static/sdk-libs/auth/config.js +46 -0
- package/dist/static/sdk-libs/auth/crypto.js +166 -0
- package/dist/static/sdk-libs/auth/events.js +27 -0
- package/dist/static/sdk-libs/auth/i18n.js +64 -0
- package/dist/static/sdk-libs/auth/index.js +61 -0
- package/dist/static/sdk-libs/auth/locale.js +151 -0
- package/dist/static/sdk-libs/auth/modal.js +554 -0
- package/dist/static/sdk-libs/auth/palette.js +172 -0
- package/dist/static/sdk-libs/auth/pill.js +198 -0
- package/dist/static/sdk-libs/auth/session.js +792 -0
- package/dist/static/sdk-libs/auth/signup.js +232 -0
- package/dist/static/sdk-libs/auth/theme.js +137 -0
- package/dist/static/sdk-libs/capabilities/index.js +179 -0
- package/dist/static/sdk-libs/commerce/index.js +243 -0
- package/dist/static/sdk-libs/data/index.js +250 -0
- package/dist/static/sdk-libs/dist/aimeat-agentface.js +91 -0
- package/dist/static/sdk-libs/dist/aimeat-agents.js +348 -0
- package/dist/static/sdk-libs/dist/aimeat-ai.js +168 -0
- package/dist/static/sdk-libs/dist/aimeat-audio.js +979 -0
- package/dist/static/sdk-libs/dist/aimeat-auth.js +2232 -0
- package/dist/static/sdk-libs/dist/aimeat-capabilities.js +177 -0
- package/dist/static/sdk-libs/dist/aimeat-commerce.js +265 -0
- package/dist/static/sdk-libs/dist/aimeat-data.js +247 -0
- package/dist/static/sdk-libs/dist/aimeat-editor.js +299 -0
- package/dist/static/sdk-libs/dist/aimeat-header.js +270 -0
- package/dist/static/sdk-libs/dist/aimeat-intake.js +94 -0
- package/dist/static/sdk-libs/dist/aimeat-live.js +317 -0
- package/dist/static/sdk-libs/dist/aimeat-markdown.js +633 -0
- package/dist/static/sdk-libs/dist/aimeat-organism.js +394 -0
- package/dist/static/sdk-libs/dist/aimeat-portfolio-standalone.js +90 -0
- package/dist/static/sdk-libs/dist/aimeat-social.js +157 -0
- package/dist/static/sdk-libs/dist/aimeat-speech.js +300 -0
- package/dist/static/sdk-libs/dist/aimeat-storage.js +210 -0
- package/dist/static/sdk-libs/dist/aimeat-tunnel.js +383 -0
- package/dist/static/sdk-libs/dist/aimeat-wallet.js +118 -0
- package/dist/static/sdk-libs/dist/aimeat-webmcp.js +187 -0
- package/dist/static/sdk-libs/dist/aimeat-work.js +213 -0
- package/dist/static/sdk-libs/dist/aimeat-workflows.js +147 -0
- package/dist/static/sdk-libs/editor/index.js +229 -0
- package/dist/static/sdk-libs/header/index.js +249 -0
- package/dist/static/sdk-libs/intake/index.js +75 -0
- package/dist/static/sdk-libs/live/index.js +223 -0
- package/dist/static/sdk-libs/markdown/index.js +570 -0
- package/dist/static/sdk-libs/organism/index.js +381 -0
- package/dist/static/sdk-libs/portfolio-standalone/index.js +78 -0
- package/dist/static/sdk-libs/social/index.js +140 -0
- package/dist/static/sdk-libs/speech/index.js +321 -0
- package/dist/static/sdk-libs/storage/index.js +189 -0
- package/dist/static/sdk-libs/tunnel/index.js +428 -0
- package/dist/static/sdk-libs/wallet/index.js +115 -0
- package/dist/static/sdk-libs/webmcp/index.js +185 -0
- package/dist/static/sdk-libs/work/index.js +191 -0
- package/dist/static/sdk-libs/workflows/index.js +113 -0
- package/package.json +10 -3
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
// GENERATED FILE — do not edit directly. Source: src/static/sdk-libs/editor/ (+ _core/).
|
|
2
|
+
// Rebuild: pnpm build:sdk · Served at /v1/libs/aimeat-editor.js (with a per-node config prelude).
|
|
3
|
+
"use strict";
|
|
4
|
+
(() => {
|
|
5
|
+
// src/static/sdk-libs/_core/namespace.js
|
|
6
|
+
function namespace() {
|
|
7
|
+
if (!window.AIMEAT) window.AIMEAT = {};
|
|
8
|
+
return window.AIMEAT;
|
|
9
|
+
}
|
|
10
|
+
function attach(key, value) {
|
|
11
|
+
const ns = namespace();
|
|
12
|
+
ns[key] = value;
|
|
13
|
+
return ns;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// src/static/sdk-libs/editor/index.js
|
|
17
|
+
var BT = String.fromCharCode(96);
|
|
18
|
+
var FENCE = BT + BT + BT;
|
|
19
|
+
var CM_URL = "https://esm.sh/codemirror@6.0.2";
|
|
20
|
+
var CM_MD_URL = "https://esm.sh/@codemirror/lang-markdown@6";
|
|
21
|
+
var CM_DARK_URL = "https://esm.sh/@codemirror/theme-one-dark@6";
|
|
22
|
+
var CSS = ".aimeat-ed-host .cm-editor{border:1px solid var(--color-base-300,#3a3a3a);border-radius:8px;font-size:.95rem;background:transparent;}.aimeat-ed-host .cm-editor.cm-focused{outline:none;border-color:var(--color-primary,#4f9eff);}.aimeat-ed-host .cm-scroller{min-height:280px;max-height:70vh;overflow:auto;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;line-height:1.6;}.aimeat-ed-host textarea.aimeat-ed-ta{width:100%;border:1px solid var(--color-base-300,#3a3a3a);border-radius:8px;background:transparent;font-family:ui-monospace,Menlo,Consolas,monospace;font-size:.92rem;line-height:1.6;color:inherit;min-height:280px;padding:.7rem;outline:none;resize:vertical;}.aimeat-ed-loading{color:var(--color-base-content,#888);opacity:.7;font-size:.85rem;padding:.8rem;border:1px dashed var(--color-base-300,#3a3a3a);border-radius:8px;}.aimeat-ed-toolbar{display:flex;gap:.15rem;flex-wrap:wrap;align-items:center;padding:.35rem .4rem;margin:0 0 .8rem;border:1px solid var(--color-base-300,#3a3a3a);border-radius:8px;}.aimeat-ed-tb{border:none;background:transparent;border-radius:5px;cursor:pointer;padding:.25rem .5rem;font-size:.82rem;color:inherit;min-height:28px;}.aimeat-ed-tb:hover{background:var(--color-base-200,rgba(128,128,128,.15));}.aimeat-ed-sep{width:1px;align-self:stretch;background:var(--color-base-300,#3a3a3a);margin:.15rem .25rem;}.aimeat-ed-split{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:1.2rem;align-items:start;}.aimeat-ed-preview{border-left:1px solid var(--color-base-300,#3a3a3a);padding-left:1.2rem;min-height:280px;max-height:70vh;overflow-y:auto;}@media (max-width:1099px){.aimeat-ed-split{grid-template-columns:1fr;}.aimeat-ed-preview{border-left:none;border-top:1px solid var(--color-base-300,#3a3a3a);padding:1rem 0 0;max-height:none;}}";
|
|
23
|
+
function injectCss() {
|
|
24
|
+
if (document.getElementById("aimeat-editor-styles")) return;
|
|
25
|
+
var s = document.createElement("style");
|
|
26
|
+
s.id = "aimeat-editor-styles";
|
|
27
|
+
s.textContent = CSS;
|
|
28
|
+
(document.head || document.documentElement).appendChild(s);
|
|
29
|
+
}
|
|
30
|
+
var _cmModsP = null;
|
|
31
|
+
function loadCM() {
|
|
32
|
+
if (_cmModsP) return _cmModsP;
|
|
33
|
+
_cmModsP = Promise.race([
|
|
34
|
+
Promise.all([
|
|
35
|
+
import(CM_URL),
|
|
36
|
+
import(CM_MD_URL).catch(function() {
|
|
37
|
+
return null;
|
|
38
|
+
}),
|
|
39
|
+
import(CM_DARK_URL).catch(function() {
|
|
40
|
+
return null;
|
|
41
|
+
})
|
|
42
|
+
]),
|
|
43
|
+
new Promise(function(_, rej) {
|
|
44
|
+
setTimeout(function() {
|
|
45
|
+
rej(new Error("editor cdn timeout"));
|
|
46
|
+
}, 1e4);
|
|
47
|
+
})
|
|
48
|
+
]).catch(function(e) {
|
|
49
|
+
_cmModsP = null;
|
|
50
|
+
throw e;
|
|
51
|
+
});
|
|
52
|
+
return _cmModsP;
|
|
53
|
+
}
|
|
54
|
+
function wrapSelTa(ta, before, after, placeholder) {
|
|
55
|
+
var s = ta.selectionStart, e = ta.selectionEnd, val = ta.value;
|
|
56
|
+
var sel = val.slice(s, e) || placeholder || "";
|
|
57
|
+
ta.value = val.slice(0, s) + before + sel + (after || "") + val.slice(e);
|
|
58
|
+
ta.focus();
|
|
59
|
+
ta.selectionStart = s + before.length;
|
|
60
|
+
ta.selectionEnd = s + before.length + sel.length;
|
|
61
|
+
ta.dispatchEvent(new Event("input"));
|
|
62
|
+
}
|
|
63
|
+
function linePrefixTa(ta, prefix) {
|
|
64
|
+
var s = ta.selectionStart, val = ta.value;
|
|
65
|
+
var ls = val.lastIndexOf("\n", s - 1) + 1;
|
|
66
|
+
ta.value = val.slice(0, ls) + prefix + val.slice(ls);
|
|
67
|
+
ta.focus();
|
|
68
|
+
ta.selectionStart = ta.selectionEnd = s + prefix.length;
|
|
69
|
+
ta.dispatchEvent(new Event("input"));
|
|
70
|
+
}
|
|
71
|
+
function mount(host, opts) {
|
|
72
|
+
opts = opts || {};
|
|
73
|
+
injectCss();
|
|
74
|
+
host.classList.add("aimeat-ed-host");
|
|
75
|
+
var A = {
|
|
76
|
+
host,
|
|
77
|
+
cm: (
|
|
78
|
+
/** @type {any} */
|
|
79
|
+
null
|
|
80
|
+
),
|
|
81
|
+
ta: (
|
|
82
|
+
/** @type {any} */
|
|
83
|
+
null
|
|
84
|
+
),
|
|
85
|
+
_initial: opts.value || "",
|
|
86
|
+
getValue: function() {
|
|
87
|
+
if (this.cm) return this.cm.state.doc.toString();
|
|
88
|
+
if (this.ta) return this.ta.value;
|
|
89
|
+
return this._initial;
|
|
90
|
+
},
|
|
91
|
+
setValue: function(text) {
|
|
92
|
+
text = text == null ? "" : String(text);
|
|
93
|
+
if (this.cm) this.cm.dispatch({ changes: { from: 0, to: this.cm.state.doc.length, insert: text } });
|
|
94
|
+
else if (this.ta) {
|
|
95
|
+
this.ta.value = text;
|
|
96
|
+
this.ta.dispatchEvent(new Event("input"));
|
|
97
|
+
} else this._initial = text;
|
|
98
|
+
},
|
|
99
|
+
focus: function() {
|
|
100
|
+
if (this.cm) this.cm.focus();
|
|
101
|
+
else if (this.ta) this.ta.focus();
|
|
102
|
+
},
|
|
103
|
+
wrap: function(before, after, ph) {
|
|
104
|
+
if (this.cm) {
|
|
105
|
+
var st = this.cm.state, sel = st.selection.main;
|
|
106
|
+
var chosen = st.sliceDoc(sel.from, sel.to) || ph || "";
|
|
107
|
+
this.cm.dispatch({
|
|
108
|
+
changes: { from: sel.from, to: sel.to, insert: before + chosen + (after || "") },
|
|
109
|
+
selection: { anchor: sel.from + before.length, head: sel.from + before.length + chosen.length }
|
|
110
|
+
});
|
|
111
|
+
this.cm.focus();
|
|
112
|
+
} else if (this.ta) wrapSelTa(this.ta, before, after, ph);
|
|
113
|
+
},
|
|
114
|
+
prefixLine: function(prefix) {
|
|
115
|
+
if (this.cm) {
|
|
116
|
+
var st = this.cm.state, line = st.doc.lineAt(st.selection.main.head);
|
|
117
|
+
this.cm.dispatch({ changes: { from: line.from, insert: prefix } });
|
|
118
|
+
this.cm.focus();
|
|
119
|
+
} else if (this.ta) linePrefixTa(this.ta, prefix);
|
|
120
|
+
},
|
|
121
|
+
destroy: function() {
|
|
122
|
+
if (this.cm) {
|
|
123
|
+
this.cm.destroy();
|
|
124
|
+
this.cm = null;
|
|
125
|
+
}
|
|
126
|
+
this.ta = null;
|
|
127
|
+
host.innerHTML = "";
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
host.innerHTML = "";
|
|
131
|
+
var loading = document.createElement("div");
|
|
132
|
+
loading.className = "aimeat-ed-loading";
|
|
133
|
+
loading.textContent = "Loading editor…";
|
|
134
|
+
host.appendChild(loading);
|
|
135
|
+
function emit() {
|
|
136
|
+
if (opts.onChange) opts.onChange(A.getValue());
|
|
137
|
+
}
|
|
138
|
+
function mountTa() {
|
|
139
|
+
if (A.cm || A.ta || !host.isConnected) return;
|
|
140
|
+
var ta = document.createElement("textarea");
|
|
141
|
+
ta.className = "aimeat-ed-ta";
|
|
142
|
+
ta.placeholder = opts.placeholder || "Write in markdown…";
|
|
143
|
+
ta.value = A._initial;
|
|
144
|
+
ta.addEventListener("input", emit);
|
|
145
|
+
host.innerHTML = "";
|
|
146
|
+
host.appendChild(ta);
|
|
147
|
+
A.ta = ta;
|
|
148
|
+
}
|
|
149
|
+
loadCM().then(function(mods) {
|
|
150
|
+
if (A.ta || A.cm || !host.isConnected) return;
|
|
151
|
+
var cmr = mods[0], mdm = mods[1], darkm = mods[2];
|
|
152
|
+
var base = [
|
|
153
|
+
cmr.basicSetup,
|
|
154
|
+
cmr.EditorView.lineWrapping,
|
|
155
|
+
cmr.EditorView.updateListener.of(function(u) {
|
|
156
|
+
if (u.docChanged) emit();
|
|
157
|
+
})
|
|
158
|
+
];
|
|
159
|
+
var exts = base.slice();
|
|
160
|
+
try {
|
|
161
|
+
if (mdm && mdm.markdown) exts.push(mdm.markdown());
|
|
162
|
+
} catch {
|
|
163
|
+
}
|
|
164
|
+
if (darkm && darkm.oneDark && document.documentElement.getAttribute("data-theme") === "dark") exts.push(darkm.oneDark);
|
|
165
|
+
var view;
|
|
166
|
+
try {
|
|
167
|
+
view = new cmr.EditorView({ doc: A._initial, extensions: exts });
|
|
168
|
+
} catch {
|
|
169
|
+
view = new cmr.EditorView({ doc: A._initial, extensions: base });
|
|
170
|
+
}
|
|
171
|
+
host.innerHTML = "";
|
|
172
|
+
host.appendChild(view.dom);
|
|
173
|
+
A.cm = view;
|
|
174
|
+
}).catch(function() {
|
|
175
|
+
mountTa();
|
|
176
|
+
});
|
|
177
|
+
return A;
|
|
178
|
+
}
|
|
179
|
+
function toolbar(A) {
|
|
180
|
+
injectCss();
|
|
181
|
+
function b(label, title, fn) {
|
|
182
|
+
var btn = document.createElement("button");
|
|
183
|
+
btn.type = "button";
|
|
184
|
+
btn.className = "aimeat-ed-tb";
|
|
185
|
+
btn.textContent = label;
|
|
186
|
+
btn.title = title;
|
|
187
|
+
btn.addEventListener("click", function(ev) {
|
|
188
|
+
ev.preventDefault();
|
|
189
|
+
fn();
|
|
190
|
+
});
|
|
191
|
+
return btn;
|
|
192
|
+
}
|
|
193
|
+
function sep() {
|
|
194
|
+
var s = document.createElement("span");
|
|
195
|
+
s.className = "aimeat-ed-sep";
|
|
196
|
+
return s;
|
|
197
|
+
}
|
|
198
|
+
var bar = document.createElement("div");
|
|
199
|
+
bar.className = "aimeat-ed-toolbar";
|
|
200
|
+
[
|
|
201
|
+
b("B", "Bold", function() {
|
|
202
|
+
A.wrap("**", "**", "bold");
|
|
203
|
+
}),
|
|
204
|
+
b("I", "Italic", function() {
|
|
205
|
+
A.wrap("*", "*", "italic");
|
|
206
|
+
}),
|
|
207
|
+
b("S̶", "Strikethrough", function() {
|
|
208
|
+
A.wrap("~~", "~~", "text");
|
|
209
|
+
}),
|
|
210
|
+
sep(),
|
|
211
|
+
b("H1", "Heading 1", function() {
|
|
212
|
+
A.prefixLine("# ");
|
|
213
|
+
}),
|
|
214
|
+
b("H2", "Heading 2", function() {
|
|
215
|
+
A.prefixLine("## ");
|
|
216
|
+
}),
|
|
217
|
+
b("H3", "Heading 3", function() {
|
|
218
|
+
A.prefixLine("### ");
|
|
219
|
+
}),
|
|
220
|
+
sep(),
|
|
221
|
+
b("•", "Bullet list", function() {
|
|
222
|
+
A.prefixLine("- ");
|
|
223
|
+
}),
|
|
224
|
+
b("1.", "Numbered list", function() {
|
|
225
|
+
A.prefixLine("1. ");
|
|
226
|
+
}),
|
|
227
|
+
b("☐", "Todo", function() {
|
|
228
|
+
A.prefixLine("- [ ] ");
|
|
229
|
+
}),
|
|
230
|
+
b("❝", "Quote", function() {
|
|
231
|
+
A.prefixLine("> ");
|
|
232
|
+
}),
|
|
233
|
+
sep(),
|
|
234
|
+
b("</>", "Code block", function() {
|
|
235
|
+
A.wrap("\n" + FENCE + "\n", "\n" + FENCE + "\n", "code");
|
|
236
|
+
}),
|
|
237
|
+
b("🧜", "Mermaid diagram", function() {
|
|
238
|
+
A.wrap("\n" + FENCE + "mermaid\n", "\n" + FENCE + "\n", "graph TD\n A[Start] --> B[End]");
|
|
239
|
+
}),
|
|
240
|
+
b("🧩", "Live data (aimeat-memory block)", function() {
|
|
241
|
+
A.wrap("\n" + FENCE + "aimeat-memory\nkey: ", "\n" + FENCE + "\n", "livedata.my-table");
|
|
242
|
+
}),
|
|
243
|
+
b("🔗", "Link", function() {
|
|
244
|
+
A.wrap("[", "](https://)", "link text");
|
|
245
|
+
}),
|
|
246
|
+
b("―", "Divider", function() {
|
|
247
|
+
A.prefixLine("\n---\n");
|
|
248
|
+
})
|
|
249
|
+
].forEach(function(n) {
|
|
250
|
+
bar.appendChild(n);
|
|
251
|
+
});
|
|
252
|
+
return bar;
|
|
253
|
+
}
|
|
254
|
+
function renderPreview(target, text) {
|
|
255
|
+
var md = window.AIMEAT && window.AIMEAT.md;
|
|
256
|
+
if (md && typeof md.renderRich === "function") {
|
|
257
|
+
md.renderRich(text, target);
|
|
258
|
+
return;
|
|
259
|
+
}
|
|
260
|
+
if (md && typeof md.render === "function") {
|
|
261
|
+
md.render(text, target);
|
|
262
|
+
return;
|
|
263
|
+
}
|
|
264
|
+
target.innerHTML = "";
|
|
265
|
+
var pre = document.createElement("pre");
|
|
266
|
+
pre.style.whiteSpace = "pre-wrap";
|
|
267
|
+
pre.textContent = text;
|
|
268
|
+
target.appendChild(pre);
|
|
269
|
+
}
|
|
270
|
+
function split(host, opts) {
|
|
271
|
+
opts = opts || {};
|
|
272
|
+
injectCss();
|
|
273
|
+
host.innerHTML = "";
|
|
274
|
+
var wrap = document.createElement("div");
|
|
275
|
+
wrap.className = "aimeat-ed-split";
|
|
276
|
+
var edPane = document.createElement("div");
|
|
277
|
+
var pvPane = document.createElement("div");
|
|
278
|
+
pvPane.className = "aimeat-ed-preview";
|
|
279
|
+
wrap.appendChild(edPane);
|
|
280
|
+
wrap.appendChild(pvPane);
|
|
281
|
+
host.appendChild(wrap);
|
|
282
|
+
var timer = null;
|
|
283
|
+
var debounce = opts.previewDebounceMs || 350;
|
|
284
|
+
var A = mount(edPane, {
|
|
285
|
+
value: opts.value,
|
|
286
|
+
placeholder: opts.placeholder,
|
|
287
|
+
onChange: function(t) {
|
|
288
|
+
if (opts.onChange) opts.onChange(t);
|
|
289
|
+
clearTimeout(timer);
|
|
290
|
+
timer = setTimeout(function() {
|
|
291
|
+
if (pvPane.isConnected) renderPreview(pvPane, t);
|
|
292
|
+
}, debounce);
|
|
293
|
+
}
|
|
294
|
+
});
|
|
295
|
+
renderPreview(pvPane, opts.value || "");
|
|
296
|
+
return { adapter: A, editorEl: edPane, previewEl: pvPane };
|
|
297
|
+
}
|
|
298
|
+
attach("editor", { mount, toolbar, split });
|
|
299
|
+
})();
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
// GENERATED FILE — do not edit directly. Source: src/static/sdk-libs/header/ (+ _core/).
|
|
2
|
+
// Rebuild: pnpm build:sdk · Served at /v1/libs/aimeat-header.js (with a per-node config prelude).
|
|
3
|
+
"use strict";
|
|
4
|
+
(() => {
|
|
5
|
+
// src/static/sdk-libs/header/index.js
|
|
6
|
+
if (!window.__AIMEAT_HEADER_MOUNTED__) {
|
|
7
|
+
window.__AIMEAT_HEADER_MOUNTED__ = true;
|
|
8
|
+
main();
|
|
9
|
+
}
|
|
10
|
+
function main() {
|
|
11
|
+
var THEME_KEY = "aimeat-theme";
|
|
12
|
+
var LANG_KEY = "aimeat-lang";
|
|
13
|
+
var NAV_FALLBACK = {
|
|
14
|
+
"nav.try": "Try it",
|
|
15
|
+
"nav.devView": "For Developers",
|
|
16
|
+
"nav.help": "Help",
|
|
17
|
+
"nav.apps": "Apps",
|
|
18
|
+
"nav.profile": "Profile",
|
|
19
|
+
"nav.admin": "Admin",
|
|
20
|
+
"nav.themeToDark": "Switch to dark mode",
|
|
21
|
+
"nav.themeToLight": "Switch to light mode"
|
|
22
|
+
};
|
|
23
|
+
function readLang() {
|
|
24
|
+
try {
|
|
25
|
+
var u = new URLSearchParams(location.search).get("lang");
|
|
26
|
+
if (u === "en" || u === "fi") return u;
|
|
27
|
+
var s = localStorage.getItem(LANG_KEY);
|
|
28
|
+
if (s === "en" || s === "fi") return s;
|
|
29
|
+
} catch {
|
|
30
|
+
}
|
|
31
|
+
return (navigator.language || "en").slice(0, 2).toLowerCase() === "fi" ? "fi" : "en";
|
|
32
|
+
}
|
|
33
|
+
function readTheme() {
|
|
34
|
+
try {
|
|
35
|
+
var s = localStorage.getItem(THEME_KEY);
|
|
36
|
+
if (s === "light" || s === "dark") return s;
|
|
37
|
+
} catch {
|
|
38
|
+
}
|
|
39
|
+
return window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
40
|
+
}
|
|
41
|
+
function applyTheme(t) {
|
|
42
|
+
document.documentElement.dataset.theme = t;
|
|
43
|
+
try {
|
|
44
|
+
localStorage.setItem(THEME_KEY, t);
|
|
45
|
+
} catch {
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
function flatten(obj, prefix, out) {
|
|
49
|
+
out = out || {};
|
|
50
|
+
prefix = prefix || "";
|
|
51
|
+
for (var k in obj) {
|
|
52
|
+
if (!Object.prototype.hasOwnProperty.call(obj, k)) continue;
|
|
53
|
+
var key = prefix ? prefix + "." + k : k;
|
|
54
|
+
var v = obj[k];
|
|
55
|
+
if (v && typeof v === "object" && !Array.isArray(v)) flatten(v, key, out);
|
|
56
|
+
else out[key] = v;
|
|
57
|
+
}
|
|
58
|
+
return out;
|
|
59
|
+
}
|
|
60
|
+
function ensureThemeCss() {
|
|
61
|
+
var present = Array.prototype.some.call(document.querySelectorAll("link[rel=stylesheet]"), function(l) {
|
|
62
|
+
return (l.getAttribute("href") || "").indexOf("/css/theme.css") !== -1;
|
|
63
|
+
});
|
|
64
|
+
if (present) return;
|
|
65
|
+
var link = document.createElement("link");
|
|
66
|
+
link.rel = "stylesheet";
|
|
67
|
+
link.href = "/css/theme.css";
|
|
68
|
+
link.setAttribute("data-aimeat-theme-css", "");
|
|
69
|
+
document.head.insertBefore(link, document.head.firstChild);
|
|
70
|
+
}
|
|
71
|
+
function loadScript(src) {
|
|
72
|
+
return new Promise(function(resolve) {
|
|
73
|
+
var existing = document.querySelector('script[src="' + src + '"]');
|
|
74
|
+
if (existing) {
|
|
75
|
+
resolve(void 0);
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
var s = document.createElement("script");
|
|
79
|
+
s.src = src;
|
|
80
|
+
s.onload = resolve;
|
|
81
|
+
s.onerror = resolve;
|
|
82
|
+
document.head.appendChild(s);
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
async function loadTranslations(lang) {
|
|
86
|
+
var v = Date.now();
|
|
87
|
+
var t = {};
|
|
88
|
+
try {
|
|
89
|
+
var enRes = await fetch("/locales/en.json?v=" + v);
|
|
90
|
+
if (enRes.ok) t = flatten(await enRes.json());
|
|
91
|
+
} catch {
|
|
92
|
+
}
|
|
93
|
+
if (lang !== "en") {
|
|
94
|
+
try {
|
|
95
|
+
var locRes = await fetch("/locales/" + lang + ".json?v=" + v);
|
|
96
|
+
if (locRes.ok) {
|
|
97
|
+
var loc = flatten(await locRes.json());
|
|
98
|
+
for (var k in loc) if (Object.prototype.hasOwnProperty.call(loc, k)) t[k] = loc[k];
|
|
99
|
+
}
|
|
100
|
+
} catch {
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return t;
|
|
104
|
+
}
|
|
105
|
+
function modalI18n(t) {
|
|
106
|
+
var keys = [
|
|
107
|
+
"descNew",
|
|
108
|
+
"descReturning",
|
|
109
|
+
"usernameLabel",
|
|
110
|
+
"usernamePlaceholder",
|
|
111
|
+
"passwordLabel",
|
|
112
|
+
"passwordPlaceholder",
|
|
113
|
+
"displayNameLabel",
|
|
114
|
+
"displayNameHint",
|
|
115
|
+
"displayNamePlaceholder",
|
|
116
|
+
"signInBtn",
|
|
117
|
+
"cancelBtn",
|
|
118
|
+
"working",
|
|
119
|
+
"errUserShort",
|
|
120
|
+
"errPassShort",
|
|
121
|
+
"errWrongPass",
|
|
122
|
+
"loggedIn",
|
|
123
|
+
"logoutBtn",
|
|
124
|
+
"forgotPassword",
|
|
125
|
+
"forgotUsername",
|
|
126
|
+
"resetPasswordTitle",
|
|
127
|
+
"resetPasswordDesc",
|
|
128
|
+
"sendResetCode",
|
|
129
|
+
"backToLogin",
|
|
130
|
+
"resetCodeSent",
|
|
131
|
+
"enterNewPasswordTitle",
|
|
132
|
+
"codeLabel",
|
|
133
|
+
"newPasswordLabel",
|
|
134
|
+
"newPasswordPlaceholder",
|
|
135
|
+
"errPassWeak",
|
|
136
|
+
"resetPassword",
|
|
137
|
+
"resetSuccess",
|
|
138
|
+
"recoverUsernameTitle",
|
|
139
|
+
"recoverUsernameDesc",
|
|
140
|
+
"emailLabel",
|
|
141
|
+
"sendUsername",
|
|
142
|
+
"usernameSent",
|
|
143
|
+
"whyTitle",
|
|
144
|
+
"whyGhii",
|
|
145
|
+
"whyPrivacy",
|
|
146
|
+
"whyAgents",
|
|
147
|
+
"whyMorsels"
|
|
148
|
+
];
|
|
149
|
+
var obj = {};
|
|
150
|
+
for (var i = 0; i < keys.length; i++) {
|
|
151
|
+
var val = t["modal." + keys[i]];
|
|
152
|
+
if (typeof val === "string") obj[keys[i]] = val;
|
|
153
|
+
}
|
|
154
|
+
return obj;
|
|
155
|
+
}
|
|
156
|
+
function buildMarkup(t) {
|
|
157
|
+
function label(k) {
|
|
158
|
+
return t[k] || NAV_FALLBACK[k] || k;
|
|
159
|
+
}
|
|
160
|
+
var nav = document.createElement("nav");
|
|
161
|
+
nav.className = "topnav";
|
|
162
|
+
nav.innerHTML = '<div style="display:flex;align-items:center;gap:20px"><a href="/v1/portal" class="topnav-brand">AIME<span class="heart">♥</span><span class="brand-at">AT</span></a><span class="brand-morsels" data-morsels style="display:none"></span></div><div class="topnav-right"><button class="topnav-burger" aria-label="Menu" data-burger>☰</button><div class="topnav-menu" data-menu><a href="/v1/classic">' + label("nav.try") + '</a><a href="/v1/portal?view=dev">' + label("nav.devView") + '</a><a href="/v1/help">' + label("nav.help") + '</a><a href="/app-catalog.html" target="_blank" data-auth-only style="display:none">' + label("nav.apps") + '</a><a href="/v1/profile" class="profile-link visible" data-auth-only style="display:none">' + label("nav.profile") + '</a><a href="/v1/admin" data-operator-only style="display:none">' + label("nav.admin") + '</a><div class="topnav-center"><button class="lang-btn" data-lang="en">EN</button><button class="lang-btn" data-lang="fi">FI</button></div></div><span class="header-auth-slot" id="headerAuth"></span></div>';
|
|
163
|
+
return nav;
|
|
164
|
+
}
|
|
165
|
+
function wire(nav, t, lang) {
|
|
166
|
+
var burger = nav.querySelector("[data-burger]");
|
|
167
|
+
var menu = nav.querySelector("[data-menu]");
|
|
168
|
+
burger.addEventListener("click", function() {
|
|
169
|
+
menu.classList.toggle("open");
|
|
170
|
+
});
|
|
171
|
+
nav.querySelectorAll("[data-lang]").forEach(function(b) {
|
|
172
|
+
if (b.getAttribute("data-lang") === lang) b.classList.add("active");
|
|
173
|
+
b.addEventListener("click", function() {
|
|
174
|
+
var next = b.getAttribute("data-lang");
|
|
175
|
+
try {
|
|
176
|
+
localStorage.setItem(LANG_KEY, next);
|
|
177
|
+
document.cookie = "aimeat-lang=" + next + ";path=/;max-age=31536000;SameSite=Lax";
|
|
178
|
+
} catch {
|
|
179
|
+
}
|
|
180
|
+
location.reload();
|
|
181
|
+
});
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
function refreshSession(nav) {
|
|
185
|
+
var hasSession = !!(window.AIMEAT && window.AIMEAT.auth && window.AIMEAT.auth.hasSession);
|
|
186
|
+
var session = hasSession && window.AIMEAT.auth.getSession ? window.AIMEAT.auth.getSession() : null;
|
|
187
|
+
nav.querySelectorAll("[data-auth-only]").forEach(function(el) {
|
|
188
|
+
el.style.display = session ? "" : "none";
|
|
189
|
+
});
|
|
190
|
+
var isOp = session && session.roles && session.roles.indexOf("operator") !== -1;
|
|
191
|
+
nav.querySelectorAll("[data-operator-only]").forEach(function(el) {
|
|
192
|
+
el.style.display = isOp ? "" : "none";
|
|
193
|
+
});
|
|
194
|
+
var morselEl = (
|
|
195
|
+
/** @type {HTMLElement} */
|
|
196
|
+
nav.querySelector("[data-morsels]")
|
|
197
|
+
);
|
|
198
|
+
if (session && session.jwt) {
|
|
199
|
+
fetch("/v1/wallet", { headers: { "Authorization": "Bearer " + session.jwt } }).then(function(r) {
|
|
200
|
+
return r.json();
|
|
201
|
+
}).then(function(d) {
|
|
202
|
+
if (d && d.ok && d.data && d.data.balance != null) {
|
|
203
|
+
morselEl.textContent = d.data.balance;
|
|
204
|
+
morselEl.style.display = "inline-flex";
|
|
205
|
+
} else {
|
|
206
|
+
morselEl.style.display = "none";
|
|
207
|
+
}
|
|
208
|
+
}).catch(function() {
|
|
209
|
+
morselEl.style.display = "none";
|
|
210
|
+
});
|
|
211
|
+
} else {
|
|
212
|
+
morselEl.style.display = "none";
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
async function init() {
|
|
216
|
+
applyTheme(readTheme());
|
|
217
|
+
ensureThemeCss();
|
|
218
|
+
var lang = readLang();
|
|
219
|
+
document.documentElement.lang = lang;
|
|
220
|
+
var t = await loadTranslations(lang);
|
|
221
|
+
var nav = buildMarkup(t);
|
|
222
|
+
var mount = document.getElementById("aimeat-header");
|
|
223
|
+
if (mount) {
|
|
224
|
+
mount.appendChild(nav);
|
|
225
|
+
} else {
|
|
226
|
+
document.body.insertBefore(nav, document.body.firstChild);
|
|
227
|
+
}
|
|
228
|
+
wire(nav, t, lang);
|
|
229
|
+
await loadScript("/v1/libs/aimeat-auth.js");
|
|
230
|
+
if (window.AIMEAT && window.AIMEAT.auth && window.AIMEAT.auth.login) {
|
|
231
|
+
try {
|
|
232
|
+
await window.AIMEAT.auth.login();
|
|
233
|
+
} catch {
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
function mountPill() {
|
|
237
|
+
try {
|
|
238
|
+
if (window.AIMEAT && window.AIMEAT.auth && window.AIMEAT.auth.mountLoginButton) {
|
|
239
|
+
var pillI18n = modalI18n(t);
|
|
240
|
+
pillI18n.themeToDark = t["nav.themeToDark"] || NAV_FALLBACK["nav.themeToDark"];
|
|
241
|
+
pillI18n.themeToLight = t["nav.themeToLight"] || NAV_FALLBACK["nav.themeToLight"];
|
|
242
|
+
window.AIMEAT.auth.mountLoginButton("#headerAuth", {
|
|
243
|
+
onLogin: function() {
|
|
244
|
+
window.dispatchEvent(new Event("aimeat-auth-change"));
|
|
245
|
+
},
|
|
246
|
+
onLogout: function() {
|
|
247
|
+
window.dispatchEvent(new Event("aimeat-auth-change"));
|
|
248
|
+
},
|
|
249
|
+
i18n: pillI18n
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
} catch (e) {
|
|
253
|
+
console.error("AIMEAT header: auth mount failed", e);
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
mountPill();
|
|
257
|
+
refreshSession(nav);
|
|
258
|
+
window.addEventListener("aimeat-auth-change", function() {
|
|
259
|
+
refreshSession(nav);
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
if (document.readyState === "loading") {
|
|
263
|
+
document.addEventListener("DOMContentLoaded", function() {
|
|
264
|
+
init();
|
|
265
|
+
});
|
|
266
|
+
} else {
|
|
267
|
+
init();
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
})();
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
// GENERATED FILE — do not edit directly. Source: src/static/sdk-libs/intake/ (+ _core/).
|
|
2
|
+
// Rebuild: pnpm build:sdk · Served at /v1/libs/aimeat-intake.js (with a per-node config prelude).
|
|
3
|
+
"use strict";
|
|
4
|
+
(() => {
|
|
5
|
+
// src/static/sdk-libs/_core/config.js
|
|
6
|
+
function cfg() {
|
|
7
|
+
return window.__AIMEAT_SDK_CFG__ || { nodeId: "", baseUrl: "" };
|
|
8
|
+
}
|
|
9
|
+
function resolveNodeUrl() {
|
|
10
|
+
const meta = document.querySelector('meta[name="aimeat-node"]');
|
|
11
|
+
if (meta) return (meta.getAttribute("content") || "").replace(/\/$/, "");
|
|
12
|
+
if (location.protocol === "http:" || location.protocol === "https:") return location.origin;
|
|
13
|
+
return cfg().baseUrl;
|
|
14
|
+
}
|
|
15
|
+
var NODE_URL = resolveNodeUrl();
|
|
16
|
+
var APEX_URL = cfg().baseUrl;
|
|
17
|
+
var NODE_ID = cfg().nodeId;
|
|
18
|
+
var HEARTBEAT_MS = cfg().heartbeatMs || 3e4;
|
|
19
|
+
|
|
20
|
+
// src/static/sdk-libs/_core/namespace.js
|
|
21
|
+
function namespace() {
|
|
22
|
+
if (!window.AIMEAT) window.AIMEAT = {};
|
|
23
|
+
return window.AIMEAT;
|
|
24
|
+
}
|
|
25
|
+
function attach(key, value) {
|
|
26
|
+
const ns = namespace();
|
|
27
|
+
ns[key] = value;
|
|
28
|
+
return ns;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// src/static/sdk-libs/intake/index.js
|
|
32
|
+
function base() {
|
|
33
|
+
if (window.AIMEAT && window.AIMEAT.auth && window.AIMEAT.auth.nodeUrl) return String(window.AIMEAT.auth.nodeUrl).replace(/\/+$/, "");
|
|
34
|
+
return APEX_URL;
|
|
35
|
+
}
|
|
36
|
+
function enc(s) {
|
|
37
|
+
return encodeURIComponent(String(s == null ? "" : s));
|
|
38
|
+
}
|
|
39
|
+
function submitPath(org, ws, formId) {
|
|
40
|
+
return "/v1/intake/" + enc(org) + "/" + enc(ws) + "/" + enc(formId);
|
|
41
|
+
}
|
|
42
|
+
async function getForm(org, ws, formId) {
|
|
43
|
+
var res = await fetch(base() + submitPath(org, ws, formId), { headers: { "Accept": "application/json" } });
|
|
44
|
+
var body = await res.json().catch(function() {
|
|
45
|
+
return null;
|
|
46
|
+
});
|
|
47
|
+
if (!body || body.ok === false) throw new Error(body && body.error && body.error.message || "Form not found");
|
|
48
|
+
return body.data;
|
|
49
|
+
}
|
|
50
|
+
async function submit(org, ws, formId, values) {
|
|
51
|
+
var res = await fetch(base() + submitPath(org, ws, formId), {
|
|
52
|
+
method: "POST",
|
|
53
|
+
headers: { "Content-Type": "application/json" },
|
|
54
|
+
body: JSON.stringify(values || {})
|
|
55
|
+
});
|
|
56
|
+
var body = await res.json().catch(function() {
|
|
57
|
+
return null;
|
|
58
|
+
});
|
|
59
|
+
if (!body || body.ok === false) {
|
|
60
|
+
var e = (
|
|
61
|
+
/** @type {Error & { code?: string, details?: unknown }} */
|
|
62
|
+
new Error(body && body.error && body.error.message || "Submit failed")
|
|
63
|
+
);
|
|
64
|
+
e.code = body && body.error && body.error.code;
|
|
65
|
+
e.details = body && body.error && body.error.details;
|
|
66
|
+
throw e;
|
|
67
|
+
}
|
|
68
|
+
return body.data;
|
|
69
|
+
}
|
|
70
|
+
async function authFetch(path, opts) {
|
|
71
|
+
if (!window.AIMEAT || !window.AIMEAT.auth) throw new Error("AIMEAT.auth is required for owner methods (load aimeat-auth.js first)");
|
|
72
|
+
var s = window.AIMEAT.auth.getSession();
|
|
73
|
+
if (!s) throw new Error("Not logged in. Call AIMEAT.auth.login() first.");
|
|
74
|
+
var res = await s.fetch(path, opts);
|
|
75
|
+
if (res && typeof res.json === "function") res = await res.json();
|
|
76
|
+
return res;
|
|
77
|
+
}
|
|
78
|
+
async function defineForm(cfg2) {
|
|
79
|
+
var body = await authFetch("/v1/intake/forms", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(cfg2 || {}) });
|
|
80
|
+
if (!body || body.ok === false) throw new Error(body && body.error && body.error.message || "defineForm failed");
|
|
81
|
+
return body.data;
|
|
82
|
+
}
|
|
83
|
+
async function listForms(org, ws) {
|
|
84
|
+
var body = await authFetch("/v1/intake/forms?organism_id=" + enc(org) + "&ws=" + enc(ws));
|
|
85
|
+
if (!body || body.ok === false) throw new Error(body && body.error && body.error.message || "listForms failed");
|
|
86
|
+
return body.data && body.data.forms || [];
|
|
87
|
+
}
|
|
88
|
+
async function deleteForm(org, ws, formId) {
|
|
89
|
+
var body = await authFetch("/v1/intake/forms?organism_id=" + enc(org) + "&ws=" + enc(ws) + "&form_id=" + enc(formId), { method: "DELETE" });
|
|
90
|
+
if (!body || body.ok === false) throw new Error(body && body.error && body.error.message || "deleteForm failed");
|
|
91
|
+
return body.data;
|
|
92
|
+
}
|
|
93
|
+
attach("intake", { getForm, submit, defineForm, listForms, deleteForm, submitPath, nodeUrl: base() });
|
|
94
|
+
})();
|