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,177 @@
|
|
|
1
|
+
// GENERATED FILE — do not edit directly. Source: src/static/sdk-libs/capabilities/ (+ _core/).
|
|
2
|
+
// Rebuild: pnpm build:sdk · Served at /v1/libs/aimeat-capabilities.js (with a per-node config prelude).
|
|
3
|
+
"use strict";
|
|
4
|
+
(() => {
|
|
5
|
+
// src/static/sdk-libs/_core/session.js
|
|
6
|
+
function getSession(libLabel) {
|
|
7
|
+
const auth = window.AIMEAT && window.AIMEAT.auth;
|
|
8
|
+
if (!auth) {
|
|
9
|
+
throw new Error("AIMEAT.auth is required. Include aimeat-auth.js before " + (libLabel || "this library"));
|
|
10
|
+
}
|
|
11
|
+
const s = auth.getSession();
|
|
12
|
+
if (!s) throw new Error("Not logged in. Call AIMEAT.auth.login() first.");
|
|
13
|
+
return s;
|
|
14
|
+
}
|
|
15
|
+
function authFetch(path, opts, libLabel) {
|
|
16
|
+
return getSession(libLabel).fetch(path, opts);
|
|
17
|
+
}
|
|
18
|
+
function makeSession(libLabel) {
|
|
19
|
+
return {
|
|
20
|
+
getSession: () => getSession(libLabel),
|
|
21
|
+
authFetch: (path, opts) => authFetch(path, opts, libLabel)
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// src/static/sdk-libs/_core/namespace.js
|
|
26
|
+
function namespace() {
|
|
27
|
+
if (!window.AIMEAT) window.AIMEAT = {};
|
|
28
|
+
return window.AIMEAT;
|
|
29
|
+
}
|
|
30
|
+
function attach(key, value) {
|
|
31
|
+
const ns = namespace();
|
|
32
|
+
ns[key] = value;
|
|
33
|
+
return ns;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// src/static/sdk-libs/capabilities/index.js
|
|
37
|
+
var { getSession: getSession2, authFetch: authFetch2 } = makeSession("aimeat-capabilities.js");
|
|
38
|
+
var _loadedCortex = {};
|
|
39
|
+
async function loadCortexLib(url) {
|
|
40
|
+
if (_loadedCortex[url]) return;
|
|
41
|
+
return new Promise(function(resolve, reject) {
|
|
42
|
+
var s = document.createElement("script");
|
|
43
|
+
s.src = url;
|
|
44
|
+
s.onload = function() {
|
|
45
|
+
_loadedCortex[url] = true;
|
|
46
|
+
resolve(void 0);
|
|
47
|
+
};
|
|
48
|
+
s.onerror = function() {
|
|
49
|
+
reject(new Error("Failed to load: " + url));
|
|
50
|
+
};
|
|
51
|
+
document.head.appendChild(s);
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
var capabilities = {
|
|
55
|
+
// ── Discovery ──
|
|
56
|
+
async list(filters) {
|
|
57
|
+
var params = new URLSearchParams();
|
|
58
|
+
if (filters) {
|
|
59
|
+
if (filters.search) params.set("search", filters.search);
|
|
60
|
+
if (filters.tags) params.set("tags", filters.tags.join(","));
|
|
61
|
+
if (filters.callable !== void 0) params.set("callable", String(filters.callable));
|
|
62
|
+
if (filters.authRequired) params.set("authRequired", filters.authRequired);
|
|
63
|
+
if (filters.source_type) params.set("source_type", filters.source_type);
|
|
64
|
+
if (filters.status) params.set("status", filters.status);
|
|
65
|
+
if (filters.page) params.set("page", String(filters.page));
|
|
66
|
+
if (filters.per_page) params.set("per_page", String(filters.per_page));
|
|
67
|
+
}
|
|
68
|
+
var qs = params.toString();
|
|
69
|
+
var res = await authFetch2("/v1/capabilities" + (qs ? "?" + qs : ""));
|
|
70
|
+
if (!res.ok) throw new Error(res.error?.message || "Failed to list capabilities");
|
|
71
|
+
return res.data;
|
|
72
|
+
},
|
|
73
|
+
async search(query) {
|
|
74
|
+
return capabilities.list({ search: query });
|
|
75
|
+
},
|
|
76
|
+
async get(id) {
|
|
77
|
+
var res = await authFetch2("/v1/capabilities/" + encodeURIComponent(id));
|
|
78
|
+
if (!res.ok) throw new Error(res.error?.message || "Capability not found");
|
|
79
|
+
return res.data;
|
|
80
|
+
},
|
|
81
|
+
// ── Invocation ──
|
|
82
|
+
async invoke(id, input, opts) {
|
|
83
|
+
var cap = await capabilities.get(id);
|
|
84
|
+
var mode = opts && opts.mode || "normal";
|
|
85
|
+
if (cap.source && cap.source.type === "cortex") {
|
|
86
|
+
var usage = cap.usage || "";
|
|
87
|
+
var libMatch = usage.match(/loadScript\(['"]([^'"]+)['"]/);
|
|
88
|
+
if (libMatch) {
|
|
89
|
+
await loadCortexLib(libMatch[1]);
|
|
90
|
+
}
|
|
91
|
+
if (cap.exports && cap.exports.length > 0) {
|
|
92
|
+
var parts = id.split(":");
|
|
93
|
+
var funcName = parts.length >= 3 ? parts[2] : null;
|
|
94
|
+
if (funcName) {
|
|
95
|
+
var fn = window[funcName] || window.AIMEAT && window.AIMEAT[funcName];
|
|
96
|
+
if (typeof fn === "function") {
|
|
97
|
+
var start = performance.now();
|
|
98
|
+
var result = await fn(input);
|
|
99
|
+
var duration = Math.round(performance.now() - start);
|
|
100
|
+
try {
|
|
101
|
+
authFetch2("/v1/capabilities/" + encodeURIComponent(id) + "/telemetry", {
|
|
102
|
+
method: "POST",
|
|
103
|
+
body: JSON.stringify({ duration_ms: duration, status: "success" })
|
|
104
|
+
}).catch(function() {
|
|
105
|
+
});
|
|
106
|
+
} catch {
|
|
107
|
+
}
|
|
108
|
+
return result;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
throw new Error("Cortex capability loaded but export function not found. Use direct loadScript() instead.");
|
|
113
|
+
}
|
|
114
|
+
var res = await authFetch2("/v1/capabilities/" + encodeURIComponent(id) + "/invoke" + (mode === "raw" ? "?mode=raw" : ""), {
|
|
115
|
+
method: "POST",
|
|
116
|
+
body: JSON.stringify({ input: input || {} })
|
|
117
|
+
});
|
|
118
|
+
if (!res.ok) throw new Error(res.error?.message || "Invoke failed");
|
|
119
|
+
return res.data.result !== void 0 ? res.data.result : res.data;
|
|
120
|
+
},
|
|
121
|
+
// ── Management ──
|
|
122
|
+
async create(record) {
|
|
123
|
+
var res = await authFetch2("/v1/capabilities", {
|
|
124
|
+
method: "POST",
|
|
125
|
+
body: JSON.stringify(record)
|
|
126
|
+
});
|
|
127
|
+
if (!res.ok) throw new Error(res.error?.message || "Failed to create capability");
|
|
128
|
+
return res.data;
|
|
129
|
+
},
|
|
130
|
+
async update(id, updates) {
|
|
131
|
+
var res = await authFetch2("/v1/capabilities/" + encodeURIComponent(id), {
|
|
132
|
+
method: "PUT",
|
|
133
|
+
body: JSON.stringify(updates)
|
|
134
|
+
});
|
|
135
|
+
if (!res.ok) throw new Error(res.error?.message || "Failed to update capability");
|
|
136
|
+
return res.data;
|
|
137
|
+
},
|
|
138
|
+
async delete(id) {
|
|
139
|
+
var res = await authFetch2("/v1/capabilities/" + encodeURIComponent(id), {
|
|
140
|
+
method: "DELETE"
|
|
141
|
+
});
|
|
142
|
+
if (!res.ok) throw new Error(res.error?.message || "Failed to delete capability");
|
|
143
|
+
return res.data;
|
|
144
|
+
},
|
|
145
|
+
async mine() {
|
|
146
|
+
var session = getSession2();
|
|
147
|
+
return capabilities.list({ owner: session.ghii || session.owner });
|
|
148
|
+
},
|
|
149
|
+
// ── Testing ──
|
|
150
|
+
async test(id, input) {
|
|
151
|
+
var res = await authFetch2("/v1/capabilities/" + encodeURIComponent(id) + "/test", {
|
|
152
|
+
method: "POST",
|
|
153
|
+
body: JSON.stringify({ input: input || {} })
|
|
154
|
+
});
|
|
155
|
+
if (!res.ok) throw new Error(res.error?.message || "Test failed");
|
|
156
|
+
return res.data;
|
|
157
|
+
},
|
|
158
|
+
// ── Vouching ──
|
|
159
|
+
async vouch(id, comment) {
|
|
160
|
+
var body = comment ? { comment } : {};
|
|
161
|
+
var res = await authFetch2("/v1/capabilities/" + encodeURIComponent(id) + "/vouch", {
|
|
162
|
+
method: "POST",
|
|
163
|
+
body: JSON.stringify(body)
|
|
164
|
+
});
|
|
165
|
+
if (!res.ok) throw new Error(res.error?.message || "Vouch failed");
|
|
166
|
+
return res.data;
|
|
167
|
+
},
|
|
168
|
+
async unvouch(id) {
|
|
169
|
+
var res = await authFetch2("/v1/capabilities/" + encodeURIComponent(id) + "/vouch", {
|
|
170
|
+
method: "DELETE"
|
|
171
|
+
});
|
|
172
|
+
if (!res.ok) throw new Error(res.error?.message || "Unvouch failed");
|
|
173
|
+
return res.data;
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
attach("capabilities", capabilities);
|
|
177
|
+
})();
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
// GENERATED FILE — do not edit directly. Source: src/static/sdk-libs/commerce/ (+ _core/).
|
|
2
|
+
// Rebuild: pnpm build:sdk · Served at /v1/libs/aimeat-commerce.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/session.js
|
|
21
|
+
function getSession(libLabel) {
|
|
22
|
+
const auth = window.AIMEAT && window.AIMEAT.auth;
|
|
23
|
+
if (!auth) {
|
|
24
|
+
throw new Error("AIMEAT.auth is required. Include aimeat-auth.js before " + (libLabel || "this library"));
|
|
25
|
+
}
|
|
26
|
+
const s = auth.getSession();
|
|
27
|
+
if (!s) throw new Error("Not logged in. Call AIMEAT.auth.login() first.");
|
|
28
|
+
return s;
|
|
29
|
+
}
|
|
30
|
+
function authFetch(path, opts, libLabel) {
|
|
31
|
+
return getSession(libLabel).fetch(path, opts);
|
|
32
|
+
}
|
|
33
|
+
function makeSession(libLabel) {
|
|
34
|
+
return {
|
|
35
|
+
getSession: () => getSession(libLabel),
|
|
36
|
+
authFetch: (path, opts) => authFetch(path, opts, libLabel)
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// src/static/sdk-libs/_core/namespace.js
|
|
41
|
+
function namespace() {
|
|
42
|
+
if (!window.AIMEAT) window.AIMEAT = {};
|
|
43
|
+
return window.AIMEAT;
|
|
44
|
+
}
|
|
45
|
+
function attach(key, value) {
|
|
46
|
+
const ns = namespace();
|
|
47
|
+
ns[key] = value;
|
|
48
|
+
return ns;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// src/static/sdk-libs/commerce/index.js
|
|
52
|
+
var { authFetch: authFetch2 } = makeSession("aimeat-commerce.js");
|
|
53
|
+
var NODE_URL2 = APEX_URL;
|
|
54
|
+
var MONEY_UNIT = 1e6;
|
|
55
|
+
function commerceError(res, fallback) {
|
|
56
|
+
const e = (
|
|
57
|
+
/** @type {Error & { code?: string, paymentRequired?: boolean, accepts?: unknown, x402Version?: unknown }} */
|
|
58
|
+
new Error(res.error && res.error.message || fallback)
|
|
59
|
+
);
|
|
60
|
+
e.code = res.error && res.error.code;
|
|
61
|
+
if (res.accepts) {
|
|
62
|
+
e.paymentRequired = true;
|
|
63
|
+
e.accepts = res.accepts;
|
|
64
|
+
e.x402Version = res.x402Version;
|
|
65
|
+
}
|
|
66
|
+
return e;
|
|
67
|
+
}
|
|
68
|
+
function normalizeItems(items) {
|
|
69
|
+
const arr = Array.isArray(items) ? items : [items];
|
|
70
|
+
return arr.map(function(i) {
|
|
71
|
+
const out = (
|
|
72
|
+
/** @type {Record<string, any>} */
|
|
73
|
+
{ offer_id: i.offer_id || i.offerId }
|
|
74
|
+
);
|
|
75
|
+
if (i.kind) out.kind = i.kind;
|
|
76
|
+
if (i.agent) out.agent = i.agent;
|
|
77
|
+
if (i.org) out.org = i.org;
|
|
78
|
+
if (i.app) out.app = i.app;
|
|
79
|
+
if (i.tool) out.tool = i.tool;
|
|
80
|
+
if (i.input) out.input = i.input;
|
|
81
|
+
if (i.quantity) out.quantity = i.quantity;
|
|
82
|
+
return out;
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
var commerce = {
|
|
86
|
+
MONEY_UNIT,
|
|
87
|
+
// ── Money formatting (same convention as the portal's utils.js fmtMoney) ──
|
|
88
|
+
/** Format money micro-units as "1.50 EUR" / "0.002 USD" (≥2 decimals, up to 6 when sub-cent). */
|
|
89
|
+
fmtMoney(micros, currency) {
|
|
90
|
+
const s = ((Number(micros) || 0) / MONEY_UNIT).toFixed(6).replace(/(\.\d{2}\d*?)0+$/, "$1");
|
|
91
|
+
return currency ? s + " " + currency : s;
|
|
92
|
+
},
|
|
93
|
+
/** Format any session/offer amount currency-aware: morsels are integers, money is micro-units. */
|
|
94
|
+
fmtAmount(amount, currency) {
|
|
95
|
+
if (!currency || currency === "morsel" || currency === "MORSEL") {
|
|
96
|
+
return (Number(amount) || 0) + " morsels";
|
|
97
|
+
}
|
|
98
|
+
return commerce.fmtMoney(amount, currency);
|
|
99
|
+
},
|
|
100
|
+
/** Parse a major-unit input ("1.50", "0,002") into integer money micro-units; null if not positive. */
|
|
101
|
+
microsFromInput(str) {
|
|
102
|
+
const n = parseFloat(String(str).replace(",", "."));
|
|
103
|
+
if (!Number.isFinite(n) || n <= 0) return null;
|
|
104
|
+
return Math.round(n * MONEY_UNIT);
|
|
105
|
+
},
|
|
106
|
+
// ── Offer discovery + price reading ──
|
|
107
|
+
/** Public product feed: every PUBLIC, priced agent offer on the node (no login needed). */
|
|
108
|
+
async feed() {
|
|
109
|
+
const r = await fetch(NODE_URL2 + "/v1/commerce/feed");
|
|
110
|
+
const res = await r.json();
|
|
111
|
+
if (res.error) throw commerceError(res, "Failed to read the commerce feed");
|
|
112
|
+
return res;
|
|
113
|
+
},
|
|
114
|
+
/** Read one offer (with price/priceMoney) from an agent's published offers. */
|
|
115
|
+
async getOffer(agent, offerId) {
|
|
116
|
+
const res = await authFetch2("/v1/agents/" + encodeURIComponent(agent) + "/offers");
|
|
117
|
+
if (!res.ok) throw commerceError(res, "Failed to read offers");
|
|
118
|
+
const offers = res.data && res.data.offers || [];
|
|
119
|
+
return offers.find(function(o) {
|
|
120
|
+
return o.id === offerId;
|
|
121
|
+
}) || null;
|
|
122
|
+
},
|
|
123
|
+
/**
|
|
124
|
+
* The price of an offer or app-tool entry in one currency.
|
|
125
|
+
* → { amount, currency, formatted } or null when it has no price in that currency.
|
|
126
|
+
* currency omitted/'morsel' → price.morsels; 'EUR'/'USD' → priceMoney micro-units.
|
|
127
|
+
*/
|
|
128
|
+
priceOf(offer, currency) {
|
|
129
|
+
if (!offer) return null;
|
|
130
|
+
if (!currency || currency === "morsel") {
|
|
131
|
+
const m = offer.price && Number(offer.price.morsels);
|
|
132
|
+
if (!m || m <= 0) return null;
|
|
133
|
+
return { amount: m, currency: "morsel", formatted: commerce.fmtAmount(m, "morsel") };
|
|
134
|
+
}
|
|
135
|
+
const pm = offer.priceMoney;
|
|
136
|
+
if (!pm || pm.currency !== currency) return null;
|
|
137
|
+
return { amount: pm.amount, currency, formatted: commerce.fmtMoney(pm.amount, currency) };
|
|
138
|
+
},
|
|
139
|
+
// ── Checkout sessions (/v1/commerce/checkout-sessions) ──
|
|
140
|
+
/**
|
|
141
|
+
* Open a checkout session. items: [{ agent, offer_id, quantity? }] (kind defaults to 'offer').
|
|
142
|
+
* opts: { note?, currency? } — currency 'EUR'/'USD' needs a money price + a settling handler.
|
|
143
|
+
*/
|
|
144
|
+
async openCheckout(items, opts) {
|
|
145
|
+
const body = (
|
|
146
|
+
/** @type {Record<string, any>} */
|
|
147
|
+
{ items: normalizeItems(items) }
|
|
148
|
+
);
|
|
149
|
+
if (opts && opts.note) body.note = opts.note;
|
|
150
|
+
if (opts && opts.currency) body.currency = opts.currency;
|
|
151
|
+
const res = await authFetch2("/v1/commerce/checkout-sessions", {
|
|
152
|
+
method: "POST",
|
|
153
|
+
body: JSON.stringify(body)
|
|
154
|
+
});
|
|
155
|
+
if (!res.ok) throw commerceError(res, "Failed to open checkout");
|
|
156
|
+
return res.data.session;
|
|
157
|
+
},
|
|
158
|
+
/** Read one of the buyer's checkout sessions. */
|
|
159
|
+
async getCheckout(id) {
|
|
160
|
+
const res = await authFetch2("/v1/commerce/checkout-sessions/" + encodeURIComponent(id));
|
|
161
|
+
if (!res.ok) throw commerceError(res, "Failed to read checkout");
|
|
162
|
+
return res.data.session;
|
|
163
|
+
},
|
|
164
|
+
/** The buyer's checkout sessions (purchases), newest first. */
|
|
165
|
+
async listCheckouts(opts) {
|
|
166
|
+
const qs = opts && opts.limit ? "?limit=" + opts.limit : "";
|
|
167
|
+
const res = await authFetch2("/v1/commerce/checkout-sessions" + qs);
|
|
168
|
+
if (!res.ok) throw commerceError(res, "Failed to list checkouts");
|
|
169
|
+
return res.data.sessions;
|
|
170
|
+
},
|
|
171
|
+
/** Replace the cart of an open session. */
|
|
172
|
+
async updateCheckout(id, items) {
|
|
173
|
+
const res = await authFetch2("/v1/commerce/checkout-sessions/" + encodeURIComponent(id), {
|
|
174
|
+
method: "PATCH",
|
|
175
|
+
body: JSON.stringify({ items: normalizeItems(items) })
|
|
176
|
+
});
|
|
177
|
+
if (!res.ok) throw commerceError(res, "Failed to update checkout");
|
|
178
|
+
return res.data.session;
|
|
179
|
+
},
|
|
180
|
+
/** Cancel an open session. */
|
|
181
|
+
async cancelCheckout(id) {
|
|
182
|
+
const res = await authFetch2("/v1/commerce/checkout-sessions/" + encodeURIComponent(id), {
|
|
183
|
+
method: "PATCH",
|
|
184
|
+
body: JSON.stringify({ cancel: true })
|
|
185
|
+
});
|
|
186
|
+
if (!res.ok) throw commerceError(res, "Failed to cancel checkout");
|
|
187
|
+
return res.data.session;
|
|
188
|
+
},
|
|
189
|
+
/**
|
|
190
|
+
* Complete (pay + fulfill) a session. payment: { handler?, instrument? } — omit for the
|
|
191
|
+
* node default (morsels). On 402 the thrown error has err.paymentRequired + err.accepts.
|
|
192
|
+
* Returns the completed session: session.receipt { handler, charged, fee }, session.fulfillment.
|
|
193
|
+
*/
|
|
194
|
+
async completeCheckout(id, payment) {
|
|
195
|
+
const res = await authFetch2("/v1/commerce/checkout-sessions/" + encodeURIComponent(id) + "/complete", {
|
|
196
|
+
method: "POST",
|
|
197
|
+
body: JSON.stringify(payment ? { payment } : {})
|
|
198
|
+
});
|
|
199
|
+
if (!res.ok) throw commerceError(res, "Failed to complete checkout");
|
|
200
|
+
return res.data.session;
|
|
201
|
+
},
|
|
202
|
+
/** One-call purchase: open a session for one offer and complete it immediately. */
|
|
203
|
+
async buyOffer(agent, offerId, opts) {
|
|
204
|
+
const session = await commerce.openCheckout(
|
|
205
|
+
[{ agent, offer_id: offerId, quantity: opts && opts.quantity || 1 }],
|
|
206
|
+
opts
|
|
207
|
+
);
|
|
208
|
+
return commerce.completeCheckout(session.id, opts && opts.payment);
|
|
209
|
+
},
|
|
210
|
+
/** The seller's received orders (completed sessions where you are the seller). */
|
|
211
|
+
async listOrders(opts) {
|
|
212
|
+
const qs = opts && opts.limit ? "?limit=" + opts.limit : "";
|
|
213
|
+
const res = await authFetch2("/v1/commerce/orders" + qs);
|
|
214
|
+
if (!res.ok) throw commerceError(res, "Failed to list orders");
|
|
215
|
+
return res.data.orders;
|
|
216
|
+
},
|
|
217
|
+
// ── App tools (TARGET-034 — priced tool calls on agent-faced apps) ──
|
|
218
|
+
/**
|
|
219
|
+
* Read an app's declared tool manifest: the public memory record apps.{appId}.tools under the
|
|
220
|
+
* app owner's GHII — { tools: [{ name, description, inputSchema, action_id?, agent?, price?, priceMoney? }] }.
|
|
221
|
+
* Returns null when the app declares no tools. Works logged out (public read).
|
|
222
|
+
*/
|
|
223
|
+
async getAppTools(ownerGhii, appId) {
|
|
224
|
+
const url = NODE_URL2 + "/v1/memory/" + encodeURIComponent(ownerGhii) + "/" + encodeURIComponent("apps." + appId + ".tools");
|
|
225
|
+
const r = await fetch(url);
|
|
226
|
+
const res = await r.json();
|
|
227
|
+
if (!res.ok) {
|
|
228
|
+
if (res.error && res.error.code === "NOT_FOUND") return null;
|
|
229
|
+
throw commerceError(res, "Failed to read app tools");
|
|
230
|
+
}
|
|
231
|
+
return res.data.value;
|
|
232
|
+
},
|
|
233
|
+
/**
|
|
234
|
+
* Buy + invoke a priced app-tool through the checkout core (TARGET-034):
|
|
235
|
+
* one { kind:'app-tool', app:'ownerName/appId', tool, input } line item, opened and
|
|
236
|
+
* completed in one call. A tool bound to a capability (action_id) runs with your input and
|
|
237
|
+
* the result comes back on session.fulfillment.results[0].result; an unbound tool queues an
|
|
238
|
+
* agent TASK for the app owner instead — session.fulfillment.taskIds[0] (the deliverable
|
|
239
|
+
* arrives via the seller's task flow). The receipt shows the charge either way.
|
|
240
|
+
* One call per invocation. On a node without the resolver this throws
|
|
241
|
+
* with code 'APP_TOOL_NOT_AVAILABLE'.
|
|
242
|
+
*/
|
|
243
|
+
async invokeAppTool(ref, opts) {
|
|
244
|
+
try {
|
|
245
|
+
const session = await commerce.openCheckout(
|
|
246
|
+
[{ kind: "app-tool", app: ref.app, tool: ref.tool, input: ref.input }],
|
|
247
|
+
opts
|
|
248
|
+
);
|
|
249
|
+
return commerce.completeCheckout(session.id, opts && opts.payment);
|
|
250
|
+
} catch (e) {
|
|
251
|
+
if (e.code === "UNKNOWN_ITEM_KIND" || e.code === "INVALID_CHECKOUT" && /invalid enum|"kind"/i.test(String(e.message))) {
|
|
252
|
+
const err = (
|
|
253
|
+
/** @type {Error & { code?: string, cause?: unknown }} */
|
|
254
|
+
new Error("This node does not sell app-tools (app-tool resolver not enabled)")
|
|
255
|
+
);
|
|
256
|
+
err.code = "APP_TOOL_NOT_AVAILABLE";
|
|
257
|
+
err.cause = e;
|
|
258
|
+
throw err;
|
|
259
|
+
}
|
|
260
|
+
throw e;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
};
|
|
264
|
+
attach("commerce", commerce);
|
|
265
|
+
})();
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
// GENERATED FILE — do not edit directly. Source: src/static/sdk-libs/data/ (+ _core/).
|
|
2
|
+
// Rebuild: pnpm build:sdk · Served at /v1/libs/aimeat-data.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/session.js
|
|
21
|
+
function getSession(libLabel) {
|
|
22
|
+
const auth = window.AIMEAT && window.AIMEAT.auth;
|
|
23
|
+
if (!auth) {
|
|
24
|
+
throw new Error("AIMEAT.auth is required. Include aimeat-auth.js before " + (libLabel || "this library"));
|
|
25
|
+
}
|
|
26
|
+
const s = auth.getSession();
|
|
27
|
+
if (!s) throw new Error("Not logged in. Call AIMEAT.auth.login() first.");
|
|
28
|
+
return s;
|
|
29
|
+
}
|
|
30
|
+
function authFetch(path, opts, libLabel) {
|
|
31
|
+
return getSession(libLabel).fetch(path, opts);
|
|
32
|
+
}
|
|
33
|
+
function makeSession(libLabel) {
|
|
34
|
+
return {
|
|
35
|
+
getSession: () => getSession(libLabel),
|
|
36
|
+
authFetch: (path, opts) => authFetch(path, opts, libLabel)
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// src/static/sdk-libs/_core/namespace.js
|
|
41
|
+
function namespace() {
|
|
42
|
+
if (!window.AIMEAT) window.AIMEAT = {};
|
|
43
|
+
return window.AIMEAT;
|
|
44
|
+
}
|
|
45
|
+
function attach(key, value) {
|
|
46
|
+
const ns = namespace();
|
|
47
|
+
ns[key] = value;
|
|
48
|
+
return ns;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// src/static/sdk-libs/data/index.js
|
|
52
|
+
var { authFetch: authFetch2 } = makeSession("aimeat-data.js");
|
|
53
|
+
function scopeParams(opts) {
|
|
54
|
+
const p = new URLSearchParams();
|
|
55
|
+
if (opts?.agent) p.set("agent", opts.agent);
|
|
56
|
+
else if (opts?.ownerScope) p.set("owner_scope", "true");
|
|
57
|
+
return p;
|
|
58
|
+
}
|
|
59
|
+
function withParams(path, params) {
|
|
60
|
+
const qs = params.toString();
|
|
61
|
+
if (!qs) return path;
|
|
62
|
+
return path + (path.indexOf("?") >= 0 ? "&" : "?") + qs;
|
|
63
|
+
}
|
|
64
|
+
var data = {
|
|
65
|
+
// Write or upsert a memory entry
|
|
66
|
+
async set(key, value, opts) {
|
|
67
|
+
const body = { key, value, visibility: "private", ...opts };
|
|
68
|
+
const res = await authFetch2("/v1/memory", { method: "POST", body: JSON.stringify(body) });
|
|
69
|
+
if (!res.ok) throw new Error(res.error?.message || "Failed to set memory");
|
|
70
|
+
return res.data;
|
|
71
|
+
},
|
|
72
|
+
// Read a single entry (falls back to public read from app creator if not found or empty).
|
|
73
|
+
// Uses ?soft=1 so a missing key is a clean 200 (value null) — no browser-console 404 noise;
|
|
74
|
+
// the contract is unchanged: resolves null when the key does not exist.
|
|
75
|
+
// opts: { agent, ownerScope } — read from one of the owner's agents' namespaces, or
|
|
76
|
+
// across the owner's whole set (GHII + agents). Omitted → unchanged behaviour.
|
|
77
|
+
async get(key, opts) {
|
|
78
|
+
const res = await authFetch2(withParams(
|
|
79
|
+
"/v1/memory/" + encodeURIComponent(key) + "?soft=1",
|
|
80
|
+
scopeParams(opts)
|
|
81
|
+
));
|
|
82
|
+
var val = res.ok ? res.data.value : null;
|
|
83
|
+
var isEmpty = val == null || typeof val === "object" && Object.keys(val).length === 0;
|
|
84
|
+
if (!isEmpty) return val;
|
|
85
|
+
if (opts?.agent || opts?.ownerScope) return val;
|
|
86
|
+
var creator = document.querySelector('meta[name="aimeat-creator"]')?.getAttribute("content");
|
|
87
|
+
if (!creator) {
|
|
88
|
+
var m = location.pathname.match(/\/v1\/apps\/([^/]+)\//);
|
|
89
|
+
if (m) {
|
|
90
|
+
creator = decodeURIComponent(m[1]);
|
|
91
|
+
if (creator && !creator.includes("@")) creator = creator + "@" + NODE_ID;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
if (creator) {
|
|
95
|
+
try {
|
|
96
|
+
var pub = await data.getPublic(creator, key);
|
|
97
|
+
if (pub != null) return pub;
|
|
98
|
+
} catch {
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
return val;
|
|
102
|
+
},
|
|
103
|
+
// Read full entry metadata. opts: { agent, ownerScope } as in get().
|
|
104
|
+
async getEntry(key, opts) {
|
|
105
|
+
const res = await authFetch2(withParams(
|
|
106
|
+
"/v1/memory/" + encodeURIComponent(key),
|
|
107
|
+
scopeParams(opts)
|
|
108
|
+
));
|
|
109
|
+
if (!res.ok) {
|
|
110
|
+
if (res.error?.code === "NOT_FOUND") return null;
|
|
111
|
+
throw new Error(res.error?.message || "Failed to get memory");
|
|
112
|
+
}
|
|
113
|
+
return res.data;
|
|
114
|
+
},
|
|
115
|
+
// Update with optimistic locking
|
|
116
|
+
async update(key, value, version, opts) {
|
|
117
|
+
const body = { value, version, ...opts };
|
|
118
|
+
const res = await authFetch2("/v1/memory/" + encodeURIComponent(key), {
|
|
119
|
+
method: "PUT",
|
|
120
|
+
body: JSON.stringify(body)
|
|
121
|
+
});
|
|
122
|
+
if (!res.ok) throw new Error(res.error?.message || "Failed to update memory");
|
|
123
|
+
return res.data;
|
|
124
|
+
},
|
|
125
|
+
// Delete an entry
|
|
126
|
+
async delete(key) {
|
|
127
|
+
const res = await authFetch2("/v1/memory/" + encodeURIComponent(key), { method: "DELETE" });
|
|
128
|
+
if (!res.ok) throw new Error(res.error?.message || "Failed to delete memory");
|
|
129
|
+
return res.data;
|
|
130
|
+
},
|
|
131
|
+
/**
|
|
132
|
+
* List memory keys.
|
|
133
|
+
*
|
|
134
|
+
* opts:
|
|
135
|
+
* prefix, visibility, tags — as before
|
|
136
|
+
* agent — list ONE of the owner's agents' namespaces (full GAII `name#owner@node`)
|
|
137
|
+
* ownerScope — list across the owner's GHII + every same-owner agent. An owner session
|
|
138
|
+
* already gets this server-side; an app-grant token needs it stated.
|
|
139
|
+
* meta — omit every `value` and report each entry's `bytes` instead. Use this for
|
|
140
|
+
* any listing you render as a table/board: the default response inlines
|
|
141
|
+
* every value, so a fleet-wide prefix can be megabytes per call.
|
|
142
|
+
* count — return only `{ count }` (server-side COUNT, no values). A cheap
|
|
143
|
+
* "did anything change?" probe; its cache is dropped by any memory write.
|
|
144
|
+
*/
|
|
145
|
+
async list(opts) {
|
|
146
|
+
const params = scopeParams(opts);
|
|
147
|
+
if (opts?.prefix) params.set("prefix", opts.prefix);
|
|
148
|
+
if (opts?.visibility) params.set("visibility", opts.visibility);
|
|
149
|
+
if (opts?.tags) params.set("tags", opts.tags.join(","));
|
|
150
|
+
if (opts?.meta) params.set("include", "meta");
|
|
151
|
+
if (opts?.count) params.set("count", "true");
|
|
152
|
+
const qs = params.toString();
|
|
153
|
+
const res = await authFetch2("/v1/memory" + (qs ? "?" + qs : ""));
|
|
154
|
+
if (!res.ok) throw new Error(res.error?.message || "Failed to list memory");
|
|
155
|
+
return res.data;
|
|
156
|
+
},
|
|
157
|
+
/** Cheap change probe: the number of keys under a prefix, no values transferred. */
|
|
158
|
+
async count(opts) {
|
|
159
|
+
const d = await data.list({ ...opts || {}, count: true });
|
|
160
|
+
return d && typeof d.count === "number" ? d.count : null;
|
|
161
|
+
},
|
|
162
|
+
// Search memory entries
|
|
163
|
+
// opts: { visibility, agent, ownerScope } — scoping as in list().
|
|
164
|
+
async search(query, opts) {
|
|
165
|
+
const params = scopeParams(opts);
|
|
166
|
+
params.set("q", query);
|
|
167
|
+
if (opts?.visibility) params.set("visibility", opts.visibility);
|
|
168
|
+
const res = await authFetch2("/v1/memory/search?" + params.toString());
|
|
169
|
+
if (!res.ok) throw new Error(res.error?.message || "Failed to search memory");
|
|
170
|
+
return res.data;
|
|
171
|
+
},
|
|
172
|
+
// Read another agent's public memory (no auth needed). ?soft=1: missing (or hidden)
|
|
173
|
+
// keys resolve null via a clean 200 instead of logging a console 404.
|
|
174
|
+
async getPublic(gaii, key) {
|
|
175
|
+
const url = NODE_URL + "/v1/memory/" + encodeURIComponent(gaii) + "/" + encodeURIComponent(key) + "?soft=1";
|
|
176
|
+
const r = await fetch(url);
|
|
177
|
+
const res = await r.json();
|
|
178
|
+
if (!res.ok) {
|
|
179
|
+
if (res.error?.code === "NOT_FOUND") return null;
|
|
180
|
+
throw new Error(res.error?.message || "Failed to read public memory");
|
|
181
|
+
}
|
|
182
|
+
return res.data.value;
|
|
183
|
+
},
|
|
184
|
+
// ── Micro-Memory (Tier 0.5, GET-based) ──
|
|
185
|
+
micro(setName, accessCode) {
|
|
186
|
+
const base = NODE_URL + "/v1/mm";
|
|
187
|
+
function mmUrl(params) {
|
|
188
|
+
const p = new URLSearchParams(params);
|
|
189
|
+
if (accessCode) p.set("access_code", accessCode);
|
|
190
|
+
return base + "?" + p.toString();
|
|
191
|
+
}
|
|
192
|
+
async function mmFetch(params) {
|
|
193
|
+
const r = await fetch(mmUrl(params));
|
|
194
|
+
const res = await r.json();
|
|
195
|
+
if (!res.ok) throw new Error(res.error?.message || "Micro-memory operation failed");
|
|
196
|
+
return res.data;
|
|
197
|
+
}
|
|
198
|
+
return {
|
|
199
|
+
// Add or overwrite a key
|
|
200
|
+
async add(key, value) {
|
|
201
|
+
return mmFetch({ op: "add", set: setName, key, value: typeof value === "object" ? JSON.stringify(value) : String(value) });
|
|
202
|
+
},
|
|
203
|
+
// Modify existing key
|
|
204
|
+
async mod(key, value) {
|
|
205
|
+
return mmFetch({ op: "mod", set: setName, key, value: typeof value === "object" ? JSON.stringify(value) : String(value) });
|
|
206
|
+
},
|
|
207
|
+
// Delete a key
|
|
208
|
+
async del(key) {
|
|
209
|
+
return mmFetch({ op: "del", set: setName, key });
|
|
210
|
+
},
|
|
211
|
+
// List all entries in this set
|
|
212
|
+
async list() {
|
|
213
|
+
return mmFetch({ op: "list", set: setName });
|
|
214
|
+
},
|
|
215
|
+
// Batch add multiple key-value pairs
|
|
216
|
+
async batch(entries) {
|
|
217
|
+
const params = { op: "batch", set: setName };
|
|
218
|
+
Object.keys(entries).forEach((k, i) => {
|
|
219
|
+
params["key" + i] = k;
|
|
220
|
+
const v = entries[k];
|
|
221
|
+
params["value" + i] = typeof v === "object" ? JSON.stringify(v) : String(v);
|
|
222
|
+
});
|
|
223
|
+
return mmFetch(params);
|
|
224
|
+
},
|
|
225
|
+
// Configure visibility
|
|
226
|
+
async config(visibility) {
|
|
227
|
+
const params = { op: "config", set: setName, access: visibility };
|
|
228
|
+
return mmFetch(params);
|
|
229
|
+
},
|
|
230
|
+
// Get a single key value
|
|
231
|
+
async get(key) {
|
|
232
|
+
const d = await mmFetch({ op: "list", set: setName });
|
|
233
|
+
return d.entries?.[key] ?? null;
|
|
234
|
+
}
|
|
235
|
+
};
|
|
236
|
+
},
|
|
237
|
+
// List all micro-memory sets
|
|
238
|
+
async microSets() {
|
|
239
|
+
const url = NODE_URL + "/v1/mm?op=list";
|
|
240
|
+
const r = await fetch(url);
|
|
241
|
+
const res = await r.json();
|
|
242
|
+
if (!res.ok) throw new Error(res.error?.message || "Failed to list micro-memory sets");
|
|
243
|
+
return res.data;
|
|
244
|
+
}
|
|
245
|
+
};
|
|
246
|
+
attach("data", data);
|
|
247
|
+
})();
|