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,394 @@
|
|
|
1
|
+
// GENERATED FILE — do not edit directly. Source: src/static/sdk-libs/organism/ (+ _core/).
|
|
2
|
+
// Rebuild: pnpm build:sdk · Served at /v1/libs/aimeat-organism.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/organism/index.js
|
|
17
|
+
function getSession() {
|
|
18
|
+
if (!window.AIMEAT || !window.AIMEAT.auth) {
|
|
19
|
+
throw new Error("AIMEAT.auth is required. Include aimeat-auth.js before aimeat-organism.js");
|
|
20
|
+
}
|
|
21
|
+
var s = window.AIMEAT.auth.getSession();
|
|
22
|
+
if (!s) throw new Error("Not logged in. Call AIMEAT.auth.login() first.");
|
|
23
|
+
return s;
|
|
24
|
+
}
|
|
25
|
+
async function authFetch(path, opts) {
|
|
26
|
+
var res = await getSession().fetch(path, opts);
|
|
27
|
+
if (res && typeof res.json === "function") res = await res.json();
|
|
28
|
+
return res;
|
|
29
|
+
}
|
|
30
|
+
function fail(res, fallback) {
|
|
31
|
+
var e = (
|
|
32
|
+
/** @type {Error & { code?: string, envelope?: unknown }} */
|
|
33
|
+
new Error(res && res.error && (res.error.message || res.error.code) || fallback)
|
|
34
|
+
);
|
|
35
|
+
e.code = res && res.error && res.error.code;
|
|
36
|
+
e.envelope = res;
|
|
37
|
+
return e;
|
|
38
|
+
}
|
|
39
|
+
var TITLE_FIELDS = ["title", "name", "subject", "label"];
|
|
40
|
+
var BODY_FIELDS = ["content", "body", "markdown", "text", "md", "description", "summary"];
|
|
41
|
+
function pickField(obj, names) {
|
|
42
|
+
if (!obj || typeof obj !== "object") return null;
|
|
43
|
+
for (var i = 0; i < names.length; i++) if (typeof obj[names[i]] === "string") return names[i];
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
function isMetaField(k) {
|
|
47
|
+
return typeof k === "string" && k.charAt(0) === "_";
|
|
48
|
+
}
|
|
49
|
+
function stripMeta(v) {
|
|
50
|
+
if (!v || typeof v !== "object" || Array.isArray(v)) return v;
|
|
51
|
+
var out = {};
|
|
52
|
+
Object.keys(v).forEach(function(k) {
|
|
53
|
+
if (!isMetaField(k)) out[k] = v[k];
|
|
54
|
+
});
|
|
55
|
+
return out;
|
|
56
|
+
}
|
|
57
|
+
function slugify(s) {
|
|
58
|
+
return String(s || "untitled").toLowerCase().normalize("NFKD").replace(/[̀-ͯ]/g, "").replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 40) || "untitled";
|
|
59
|
+
}
|
|
60
|
+
function titleOf(value, fallbackId) {
|
|
61
|
+
var v = value || {};
|
|
62
|
+
var f = pickField(v, TITLE_FIELDS);
|
|
63
|
+
if (f && v[f]) return v[f];
|
|
64
|
+
if (typeof v.id === "string" && v.id) return v.id;
|
|
65
|
+
var bf = pickField(v, BODY_FIELDS);
|
|
66
|
+
if (bf && typeof v[bf] === "string" && v[bf]) return String(v[bf]).replace(/\s+/g, " ").slice(0, 48);
|
|
67
|
+
return fallbackId || "Untitled";
|
|
68
|
+
}
|
|
69
|
+
function bodyFieldOf(value) {
|
|
70
|
+
return pickField(value, BODY_FIELDS);
|
|
71
|
+
}
|
|
72
|
+
function isDocLike(value) {
|
|
73
|
+
var bf = bodyFieldOf(value);
|
|
74
|
+
if (!bf || !value || typeof value[bf] !== "string") return false;
|
|
75
|
+
return bf === "markdown" || bf === "content" || value[bf].length > 120 || /\n/.test(value[bf]);
|
|
76
|
+
}
|
|
77
|
+
function valueUpdatedAt(v) {
|
|
78
|
+
if (v && typeof v === "object" && (v._updatedAt || v._createdAt)) {
|
|
79
|
+
var t = new Date(v._updatedAt || v._createdAt).getTime();
|
|
80
|
+
return isNaN(t) ? 0 : t;
|
|
81
|
+
}
|
|
82
|
+
return 0;
|
|
83
|
+
}
|
|
84
|
+
function wsRoot(orgId, wsId) {
|
|
85
|
+
return "organism." + orgId + (wsId ? ".w." + wsId : "");
|
|
86
|
+
}
|
|
87
|
+
function draftKey(orgId, wsId, namespace2, id) {
|
|
88
|
+
return wsRoot(orgId, wsId) + "." + namespace2 + "." + id + ".draft";
|
|
89
|
+
}
|
|
90
|
+
function normalizeWorkspace(data) {
|
|
91
|
+
var manifest = data && data.manifest || null;
|
|
92
|
+
var otList = manifest && (manifest.objectTypes || manifest.object_types || manifest.types) || [];
|
|
93
|
+
if (!Array.isArray(otList) && otList && typeof otList === "object") {
|
|
94
|
+
otList = Object.keys(otList).map(function(k) {
|
|
95
|
+
var o = otList[k];
|
|
96
|
+
o = o && typeof o === "object" ? o : {};
|
|
97
|
+
if (!o.name) o.name = k;
|
|
98
|
+
return o;
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
var byName = {};
|
|
102
|
+
otList.forEach(function(ot) {
|
|
103
|
+
var n = ot.name || ot.id || ot.type;
|
|
104
|
+
if (n) byName[n] = ot;
|
|
105
|
+
});
|
|
106
|
+
var objects = data && data.objects || {};
|
|
107
|
+
var draftsMap = data && data.drafts || {};
|
|
108
|
+
var typeNames = [];
|
|
109
|
+
otList.forEach(function(ot) {
|
|
110
|
+
var n = ot.name || ot.id || ot.type;
|
|
111
|
+
if (n && typeNames.indexOf(n) < 0) typeNames.push(n);
|
|
112
|
+
});
|
|
113
|
+
Object.keys(objects).forEach(function(n) {
|
|
114
|
+
if (typeNames.indexOf(n) < 0) typeNames.push(n);
|
|
115
|
+
});
|
|
116
|
+
Object.keys(draftsMap).forEach(function(n) {
|
|
117
|
+
if (typeNames.indexOf(n) < 0) typeNames.push(n);
|
|
118
|
+
});
|
|
119
|
+
return typeNames.map(function(typeName) {
|
|
120
|
+
var ot = byName[typeName] || {};
|
|
121
|
+
var instances = {};
|
|
122
|
+
var order = [];
|
|
123
|
+
var seq = 0;
|
|
124
|
+
function instIdOf(v) {
|
|
125
|
+
if (v && typeof v === "object" && typeof v.id === "string" && v.id) return { id: v.id, real: true };
|
|
126
|
+
if (v && typeof v === "object") {
|
|
127
|
+
var tf = pickField(v, TITLE_FIELDS);
|
|
128
|
+
if (tf && v[tf]) return { id: "t-" + slugify(v[tf]), real: false };
|
|
129
|
+
}
|
|
130
|
+
return { id: "item-" + seq++, real: false };
|
|
131
|
+
}
|
|
132
|
+
function add(v, slot) {
|
|
133
|
+
if (v == null) return;
|
|
134
|
+
var m = instIdOf(v);
|
|
135
|
+
if (!instances[m.id]) {
|
|
136
|
+
instances[m.id] = { id: m.id, hasRealId: m.real, draft: null, latest: null };
|
|
137
|
+
order.push(m.id);
|
|
138
|
+
}
|
|
139
|
+
if (slot === "draft") instances[m.id].draft = v;
|
|
140
|
+
else instances[m.id].latest = instances[m.id].latest || v;
|
|
141
|
+
}
|
|
142
|
+
var pub = objects[typeName] || [];
|
|
143
|
+
if (!Array.isArray(pub)) pub = [pub];
|
|
144
|
+
pub.forEach(function(v) {
|
|
145
|
+
add(v, "latest");
|
|
146
|
+
});
|
|
147
|
+
var dr = draftsMap[typeName] || [];
|
|
148
|
+
if (!Array.isArray(dr)) dr = [dr];
|
|
149
|
+
dr.forEach(function(v) {
|
|
150
|
+
add(v, "draft");
|
|
151
|
+
});
|
|
152
|
+
var items = order.map(function(id) {
|
|
153
|
+
var inst = instances[id];
|
|
154
|
+
var best = inst.draft || inst.latest;
|
|
155
|
+
inst.value = best;
|
|
156
|
+
inst.title = titleOf(best, id);
|
|
157
|
+
inst.updatedAt = Math.max(valueUpdatedAt(inst.draft), valueUpdatedAt(inst.latest));
|
|
158
|
+
inst.status = inst.draft && inst.latest ? "draft+published" : inst.draft ? "draft" : "published";
|
|
159
|
+
return inst;
|
|
160
|
+
});
|
|
161
|
+
return {
|
|
162
|
+
name: typeName,
|
|
163
|
+
namespace: ot.namespace || ot.ns || typeName,
|
|
164
|
+
kind: ot.kind || ot.type || null,
|
|
165
|
+
schemaRef: ot.schemaRef || null,
|
|
166
|
+
writeRole: ot.writeRole || null,
|
|
167
|
+
items
|
|
168
|
+
};
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
function readmeText(readme) {
|
|
172
|
+
if (readme == null) return "";
|
|
173
|
+
if (typeof readme === "string") return readme;
|
|
174
|
+
if (typeof readme === "object") return readme.content || readme.text || readme.markdown || JSON.stringify(readme, null, 2);
|
|
175
|
+
return String(readme);
|
|
176
|
+
}
|
|
177
|
+
var organism = {
|
|
178
|
+
// List organisms the signed-in owner is a member of.
|
|
179
|
+
async list() {
|
|
180
|
+
var s = getSession();
|
|
181
|
+
var owner = s.owner || s.user && s.user.owner || "";
|
|
182
|
+
var res;
|
|
183
|
+
try {
|
|
184
|
+
res = await authFetch("/v1/organisms?member=" + encodeURIComponent(owner) + "&per_page=100");
|
|
185
|
+
} catch {
|
|
186
|
+
res = null;
|
|
187
|
+
}
|
|
188
|
+
if (!res || res.ok === false) res = await authFetch("/v1/organisms");
|
|
189
|
+
if (res.ok === false) throw fail(res, "Failed to list organisms");
|
|
190
|
+
var d = res.data !== void 0 ? res.data : res;
|
|
191
|
+
return d && (d.organisms || d.items) || (Array.isArray(d) ? d : []);
|
|
192
|
+
},
|
|
193
|
+
async get(orgId) {
|
|
194
|
+
var res = await authFetch("/v1/organisms/" + encodeURIComponent(orgId));
|
|
195
|
+
if (res.ok === false) throw fail(res, "Failed to load organism");
|
|
196
|
+
return res.data !== void 0 ? res.data : res;
|
|
197
|
+
},
|
|
198
|
+
// Create a NEW organism (the signed-in owner becomes creator/member). Needs the organism:write app
|
|
199
|
+
// scope (declare it in <meta name="aimeat-scopes">). Returns { id, name, ... }. Use this + createWorkspace
|
|
200
|
+
// to let a multi-tenant app provision its own data space for each user on first use.
|
|
201
|
+
async create(name, opts) {
|
|
202
|
+
opts = opts || {};
|
|
203
|
+
var res = await authFetch("/v1/organisms", {
|
|
204
|
+
method: "POST",
|
|
205
|
+
headers: { "Content-Type": "application/json" },
|
|
206
|
+
body: JSON.stringify({
|
|
207
|
+
name,
|
|
208
|
+
type: opts.type || "project",
|
|
209
|
+
visibility: opts.visibility || "private",
|
|
210
|
+
join_policy: opts.join_policy || "invite_only",
|
|
211
|
+
description: opts.description
|
|
212
|
+
})
|
|
213
|
+
});
|
|
214
|
+
if (res.ok === false) throw fail(res, "Failed to create organism");
|
|
215
|
+
var d = res.data !== void 0 ? res.data : res;
|
|
216
|
+
return d && d.organism ? d.organism : d;
|
|
217
|
+
},
|
|
218
|
+
// Create a NEW schema-locked workspace inside an organism from a manifest + per-namespace JSON schemas.
|
|
219
|
+
// manifest = { manifestVersion:'1', name, kind, objectTypes:[{ name, namespace, mode:'records',
|
|
220
|
+
// backing:'memory', writeRole:'member', schemaRef? }] }; schemas = { '<namespace>': <JSON Schema> }.
|
|
221
|
+
// Needs organism:write. Returns { ws, types, schemas_locked }.
|
|
222
|
+
async createWorkspace(orgId, name, manifest, schemas, readme) {
|
|
223
|
+
var m = manifest && typeof manifest === "object" ? JSON.parse(JSON.stringify(manifest)) : manifest;
|
|
224
|
+
var sc = schemas && typeof schemas === "object" ? Object.assign({}, schemas) : {};
|
|
225
|
+
if (m && Array.isArray(m.objectTypes)) {
|
|
226
|
+
for (var oi = 0; oi < m.objectTypes.length; oi++) {
|
|
227
|
+
var ot = m.objectTypes[oi];
|
|
228
|
+
if (ot && !ot.schemaRef) {
|
|
229
|
+
var slug = String(ot.name || "type" + oi).replace(/[^a-zA-Z0-9_-]/g, "-");
|
|
230
|
+
ot.schemaRef = "schema:" + name + "-" + slug + "@1";
|
|
231
|
+
}
|
|
232
|
+
if (ot && ot.namespace && sc[ot.namespace] === void 0 && (ot.mode || "records") === "records") {
|
|
233
|
+
sc[ot.namespace] = { type: "object", additionalProperties: true };
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
var res = await authFetch("/v1/organisms/" + encodeURIComponent(orgId) + "/workspaces", {
|
|
238
|
+
method: "POST",
|
|
239
|
+
headers: { "Content-Type": "application/json" },
|
|
240
|
+
body: JSON.stringify({ name, manifest: m, schemas: sc, readme })
|
|
241
|
+
});
|
|
242
|
+
if (res.ok === false) throw fail(res, "Failed to create workspace");
|
|
243
|
+
return res.data !== void 0 ? res.data : res;
|
|
244
|
+
},
|
|
245
|
+
// List workspaces (access + enrichment counts included).
|
|
246
|
+
async workspaces(orgId) {
|
|
247
|
+
var res = await authFetch("/v1/organisms/" + encodeURIComponent(orgId) + "/workspaces?include=enrichment");
|
|
248
|
+
if (res.ok === false) throw fail(res, "Failed to list workspaces");
|
|
249
|
+
var d = res.data !== void 0 ? res.data : res;
|
|
250
|
+
return d && (d.workspaces || d.items) || (Array.isArray(d) ? d : []);
|
|
251
|
+
},
|
|
252
|
+
// Read one workspace, normalized: { manifest, readme, readmeText, spaces, raw }.
|
|
253
|
+
// spaces[].items[]: { id, hasRealId, draft, latest, value, title, updatedAt, status }.
|
|
254
|
+
async read(orgId, wsId) {
|
|
255
|
+
var q = wsId ? "?ws=" + encodeURIComponent(wsId) : "";
|
|
256
|
+
var res = await authFetch("/v1/organisms/" + encodeURIComponent(orgId) + "/workspace" + q);
|
|
257
|
+
if (res.ok === false) throw fail(res, "Failed to read workspace");
|
|
258
|
+
var d = res.data !== void 0 ? res.data : res;
|
|
259
|
+
return {
|
|
260
|
+
manifest: d && d.manifest || null,
|
|
261
|
+
readme: d && d.readme || null,
|
|
262
|
+
readmeText: readmeText(d && d.readme),
|
|
263
|
+
spaces: normalizeWorkspace(d),
|
|
264
|
+
raw: d
|
|
265
|
+
};
|
|
266
|
+
},
|
|
267
|
+
// Write/overwrite an object's draft. Embeds the instance id into the value (SPA convention)
|
|
268
|
+
// unless opts.embedId === false (needed for locked schemas that reject an id property).
|
|
269
|
+
async writeDraft(orgId, wsId, namespace2, id, value, opts) {
|
|
270
|
+
opts = opts || {};
|
|
271
|
+
var v = stripMeta(value);
|
|
272
|
+
if (opts.embedId !== false && v && typeof v === "object" && !Array.isArray(v)) {
|
|
273
|
+
v = Object.assign({}, v, { id });
|
|
274
|
+
}
|
|
275
|
+
var body = (
|
|
276
|
+
/** @type {Record<string, any>} */
|
|
277
|
+
{ key: draftKey(orgId, wsId, namespace2, id), value: v, visibility: opts.visibility || "private" }
|
|
278
|
+
);
|
|
279
|
+
if (opts.group_id) body.group_id = opts.group_id;
|
|
280
|
+
if (Array.isArray(opts.tags) && opts.tags.length) body.tags = opts.tags;
|
|
281
|
+
var res = await authFetch("/v1/memory", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(body) });
|
|
282
|
+
if (res.ok === false) throw fail(res, "Failed to save draft");
|
|
283
|
+
return res.data !== void 0 ? res.data : res;
|
|
284
|
+
},
|
|
285
|
+
// Publish a draft -> new .version.N + .latest (or a pending approval when the workspace gates publishes).
|
|
286
|
+
async publish(orgId, wsId, namespace2, id) {
|
|
287
|
+
var res = await authFetch("/v1/organisms/" + encodeURIComponent(orgId) + "/publish", {
|
|
288
|
+
method: "POST",
|
|
289
|
+
headers: { "Content-Type": "application/json" },
|
|
290
|
+
body: JSON.stringify({ ws: wsId || void 0, namespace: namespace2, id })
|
|
291
|
+
});
|
|
292
|
+
if (res.ok === false) throw fail(res, "Failed to publish");
|
|
293
|
+
return res.data !== void 0 ? res.data : res;
|
|
294
|
+
},
|
|
295
|
+
// BULK publish MANY records in ONE request (data-access redesign). Two shapes:
|
|
296
|
+
// • ids: ['id', ...] → publish each record's existing DRAFT (the edit → publish flow)
|
|
297
|
+
// • records: [{ id, value }, ...] → DRAFT-LESS: publish the supplied values directly (imports —
|
|
298
|
+
// one request for a whole CSV migration, no per-record draft write). optional expectedVersions.
|
|
299
|
+
// Replaces a loop of publish() (each a server-side scan + 2 writes + draft delete). Returns
|
|
300
|
+
// { published, skipped, failed, results }. create_only 409s; a publish review gate refuses the batch.
|
|
301
|
+
async publishRecords(orgId, wsId, namespace2, idsOrRecords, expectedVersions) {
|
|
302
|
+
var body = (
|
|
303
|
+
/** @type {Record<string, any>} */
|
|
304
|
+
{ ws: wsId || void 0, namespace: namespace2 }
|
|
305
|
+
);
|
|
306
|
+
var arr = idsOrRecords || [];
|
|
307
|
+
if (arr.length && typeof arr[0] === "object") body.records = arr;
|
|
308
|
+
else body.instances = arr;
|
|
309
|
+
if (expectedVersions && typeof expectedVersions === "object") body.expected_versions = expectedVersions;
|
|
310
|
+
var res = await authFetch("/v1/organisms/" + encodeURIComponent(orgId) + "/workspace/records/publish", {
|
|
311
|
+
method: "POST",
|
|
312
|
+
headers: { "Content-Type": "application/json" },
|
|
313
|
+
body: JSON.stringify(body)
|
|
314
|
+
});
|
|
315
|
+
if (res.ok === false) throw fail(res, "Failed to publish records");
|
|
316
|
+
return res.data !== void 0 ? res.data : res;
|
|
317
|
+
},
|
|
318
|
+
// BULK delete MANY record families in ONE request (data-access redesign) — ids: [id,...]. Removes each
|
|
319
|
+
// record's bare/.draft/.latest/.version.N owned by the caller's own identity in one batched call
|
|
320
|
+
// (needs memory:delete scope). Replaces a loop of deleteObject() (a scan + per-key delete each).
|
|
321
|
+
// Returns { deleted:[{id,keys}], failed:[{id,reason}], rows_removed }.
|
|
322
|
+
async deleteRecords(orgId, wsId, namespace2, ids) {
|
|
323
|
+
var res = await authFetch("/v1/organisms/" + encodeURIComponent(orgId) + "/workspace/records/delete", {
|
|
324
|
+
method: "POST",
|
|
325
|
+
headers: { "Content-Type": "application/json" },
|
|
326
|
+
body: JSON.stringify({ ws: wsId || void 0, namespace: namespace2, ids: ids || [] })
|
|
327
|
+
});
|
|
328
|
+
if (res.ok === false) throw fail(res, "Failed to delete records");
|
|
329
|
+
return res.data !== void 0 ? res.data : res;
|
|
330
|
+
},
|
|
331
|
+
// Reopen a published record for editing (server copies .latest -> .draft; 409 if a draft exists).
|
|
332
|
+
async revertToDraft(orgId, wsId, namespace2, id) {
|
|
333
|
+
var res = await authFetch("/v1/organisms/" + encodeURIComponent(orgId) + "/revert", {
|
|
334
|
+
method: "POST",
|
|
335
|
+
headers: { "Content-Type": "application/json" },
|
|
336
|
+
body: JSON.stringify({ ws: wsId || void 0, namespace: namespace2, id })
|
|
337
|
+
});
|
|
338
|
+
if (res.ok === false) throw fail(res, "Failed to revert to draft");
|
|
339
|
+
return res.data !== void 0 ? res.data : res;
|
|
340
|
+
},
|
|
341
|
+
// Delete one object: bare key + .draft + .latest + all .version.N history (re-run for huge
|
|
342
|
+
// histories). NOTE: needs the memory:delete scope — app-grant tokens don't get it by default,
|
|
343
|
+
// declare it via <meta name="aimeat-scopes" content="memory:read memory:write memory:delete">.
|
|
344
|
+
async deleteObject(orgId, wsId, namespace2, id) {
|
|
345
|
+
var base = wsRoot(orgId, wsId) + "." + namespace2 + "." + id;
|
|
346
|
+
var res = await authFetch("/v1/memory?prefix=" + encodeURIComponent(base) + "&limit=200");
|
|
347
|
+
if (res.ok === false) throw fail(res, "Failed to list object keys");
|
|
348
|
+
var items = res.data && res.data.items || [];
|
|
349
|
+
var deleted = 0, attempted = 0, lastErr = null;
|
|
350
|
+
for (var i = 0; i < items.length; i++) {
|
|
351
|
+
var key = items[i].key;
|
|
352
|
+
if (key !== base && key.indexOf(base + ".") !== 0) continue;
|
|
353
|
+
attempted++;
|
|
354
|
+
var dres = await authFetch("/v1/memory/" + encodeURIComponent(key), { method: "DELETE" });
|
|
355
|
+
if (dres.ok !== false) deleted++;
|
|
356
|
+
else lastErr = dres;
|
|
357
|
+
}
|
|
358
|
+
if (attempted > 0 && deleted === 0 && lastErr) throw fail(lastErr, "Failed to delete object keys");
|
|
359
|
+
return { deleted, attempted };
|
|
360
|
+
},
|
|
361
|
+
// Save the workspace README (creator/org-admin only — the server enforces it).
|
|
362
|
+
async saveReadme(orgId, wsId, readme) {
|
|
363
|
+
var res = await authFetch("/v1/organisms/" + encodeURIComponent(orgId) + "/workspace?ws=" + encodeURIComponent(wsId), {
|
|
364
|
+
method: "PUT",
|
|
365
|
+
headers: { "Content-Type": "application/json" },
|
|
366
|
+
body: JSON.stringify({ readme })
|
|
367
|
+
});
|
|
368
|
+
if (res.ok === false) throw fail(res, "Failed to save README");
|
|
369
|
+
return res.data !== void 0 ? res.data : res;
|
|
370
|
+
},
|
|
371
|
+
// Organism-wide server-side search.
|
|
372
|
+
async search(orgId, q) {
|
|
373
|
+
var res = await authFetch("/v1/organisms/" + encodeURIComponent(orgId) + "/search?q=" + encodeURIComponent(q));
|
|
374
|
+
if (res.ok === false) throw fail(res, "Search failed");
|
|
375
|
+
var d = res.data !== void 0 ? res.data : res;
|
|
376
|
+
return d && (d.results || d.hits || d.items) || (Array.isArray(d) ? d : []);
|
|
377
|
+
},
|
|
378
|
+
util: {
|
|
379
|
+
stripMeta,
|
|
380
|
+
isMetaField,
|
|
381
|
+
titleOf,
|
|
382
|
+
bodyFieldOf,
|
|
383
|
+
isDocLike,
|
|
384
|
+
updatedAt: valueUpdatedAt,
|
|
385
|
+
wsRoot,
|
|
386
|
+
draftKey,
|
|
387
|
+
normalizeWorkspace,
|
|
388
|
+
readmeText,
|
|
389
|
+
TITLE_FIELDS: TITLE_FIELDS.slice(),
|
|
390
|
+
BODY_FIELDS: BODY_FIELDS.slice()
|
|
391
|
+
}
|
|
392
|
+
};
|
|
393
|
+
attach("organism", organism);
|
|
394
|
+
})();
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
// GENERATED FILE — do not edit directly. Source: src/static/sdk-libs/portfolio-standalone/ (+ _core/).
|
|
2
|
+
// Rebuild: pnpm build:sdk · Served at /v1/libs/aimeat-portfolio-standalone.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/portfolio-standalone/index.js
|
|
21
|
+
var APEX = APEX_URL;
|
|
22
|
+
var jwt = null;
|
|
23
|
+
function post(msg) {
|
|
24
|
+
try {
|
|
25
|
+
window.postMessage(msg, window.location.origin);
|
|
26
|
+
} catch {
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
function announce(loggedIn) {
|
|
30
|
+
post({ type: "aimeat-portfolio-auth", loggedIn: !!loggedIn });
|
|
31
|
+
}
|
|
32
|
+
window.addEventListener("message", function(e) {
|
|
33
|
+
if (e.source !== window) return;
|
|
34
|
+
var d = e.data;
|
|
35
|
+
if (!d || d.type !== "aimeat-portfolio-fetch") return;
|
|
36
|
+
var reply = function(ok, value) {
|
|
37
|
+
post({
|
|
38
|
+
type: "aimeat-portfolio-fetch-result",
|
|
39
|
+
id: d.id == null ? null : d.id,
|
|
40
|
+
ok: !!ok,
|
|
41
|
+
gaii: typeof d.gaii === "string" ? d.gaii : null,
|
|
42
|
+
key: typeof d.key === "string" ? d.key : null,
|
|
43
|
+
value: value == null ? null : value
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
if (typeof d.gaii !== "string" || typeof d.key !== "string") {
|
|
47
|
+
reply(false, null);
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
fetch(
|
|
51
|
+
APEX + "/v1/memory/" + encodeURIComponent(d.gaii) + "/" + encodeURIComponent(d.key),
|
|
52
|
+
jwt ? { headers: { Authorization: "Bearer " + jwt } } : void 0
|
|
53
|
+
).then(function(r) {
|
|
54
|
+
return r.json().then(function(j) {
|
|
55
|
+
return { r, j };
|
|
56
|
+
});
|
|
57
|
+
}).then(function(x) {
|
|
58
|
+
var ok = !!(x.r.ok && x.j && x.j.ok !== false);
|
|
59
|
+
reply(ok, ok && x.j.data ? x.j.data.value : null);
|
|
60
|
+
}).catch(function() {
|
|
61
|
+
reply(false, null);
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
function boot() {
|
|
65
|
+
var auth = window.AIMEAT && window.AIMEAT.auth;
|
|
66
|
+
if (!auth || typeof auth.login !== "function") {
|
|
67
|
+
announce(false);
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
Promise.resolve(auth.login()).then(function(session) {
|
|
71
|
+
jwt = session && session.jwt ? session.jwt : null;
|
|
72
|
+
announce(!!jwt);
|
|
73
|
+
}).catch(function() {
|
|
74
|
+
announce(false);
|
|
75
|
+
});
|
|
76
|
+
if (typeof auth.on === "function") {
|
|
77
|
+
auth.on("login", function() {
|
|
78
|
+
var s = typeof auth.getSession === "function" ? auth.getSession() : null;
|
|
79
|
+
jwt = s && s.jwt || null;
|
|
80
|
+
announce(!!jwt);
|
|
81
|
+
});
|
|
82
|
+
auth.on("logout", function() {
|
|
83
|
+
jwt = null;
|
|
84
|
+
announce(false);
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
if (document.readyState === "loading") document.addEventListener("DOMContentLoaded", boot);
|
|
89
|
+
else boot();
|
|
90
|
+
})();
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
// GENERATED FILE — do not edit directly. Source: src/static/sdk-libs/social/ (+ _core/).
|
|
2
|
+
// Rebuild: pnpm build:sdk · Served at /v1/libs/aimeat-social.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/social/index.js
|
|
52
|
+
var { authFetch: authFetch2 } = makeSession("aimeat-social.js");
|
|
53
|
+
async function publicFetch(path) {
|
|
54
|
+
const r = await fetch(NODE_URL + path);
|
|
55
|
+
return r.json();
|
|
56
|
+
}
|
|
57
|
+
var social = {
|
|
58
|
+
// ── Boards ──
|
|
59
|
+
// Create a new board
|
|
60
|
+
async createBoard(name, opts) {
|
|
61
|
+
const body = { name, visibility: "public", ...opts };
|
|
62
|
+
const res = await authFetch2("/v1/boards", { method: "POST", body: JSON.stringify(body) });
|
|
63
|
+
if (!res.ok) throw new Error(res.error?.message || "Failed to create board");
|
|
64
|
+
return res.data;
|
|
65
|
+
},
|
|
66
|
+
// List all visible boards (no auth needed for public boards)
|
|
67
|
+
async boards() {
|
|
68
|
+
const res = await publicFetch("/v1/boards");
|
|
69
|
+
if (!res.ok) throw new Error(res.error?.message || "Failed to list boards");
|
|
70
|
+
return res.data;
|
|
71
|
+
},
|
|
72
|
+
// ── Posts ──
|
|
73
|
+
// Post to a board
|
|
74
|
+
async post(boardId, content) {
|
|
75
|
+
const body = typeof content === "string" ? { body: content } : content;
|
|
76
|
+
const res = await authFetch2("/v1/boards/" + encodeURIComponent(boardId) + "/posts", {
|
|
77
|
+
method: "POST",
|
|
78
|
+
body: JSON.stringify(body)
|
|
79
|
+
});
|
|
80
|
+
if (!res.ok) throw new Error(res.error?.message || "Failed to post");
|
|
81
|
+
return res.data;
|
|
82
|
+
},
|
|
83
|
+
// List posts in a board (public, no auth needed)
|
|
84
|
+
async posts(boardId, opts) {
|
|
85
|
+
const params = new URLSearchParams();
|
|
86
|
+
if (opts?.category) params.set("category", opts.category);
|
|
87
|
+
if (opts?.cursor) params.set("cursor", opts.cursor);
|
|
88
|
+
if (opts?.limit) params.set("limit", String(opts.limit));
|
|
89
|
+
const qs = params.toString();
|
|
90
|
+
const res = await publicFetch("/v1/boards/" + encodeURIComponent(boardId) + "/posts" + (qs ? "?" + qs : ""));
|
|
91
|
+
if (!res.ok) throw new Error(res.error?.message || "Failed to list posts");
|
|
92
|
+
return res.data;
|
|
93
|
+
},
|
|
94
|
+
// Get a single post
|
|
95
|
+
async getPost(boardId, postId) {
|
|
96
|
+
const res = await publicFetch("/v1/boards/" + encodeURIComponent(boardId) + "/posts/" + encodeURIComponent(postId));
|
|
97
|
+
if (!res.ok) {
|
|
98
|
+
if (res.error?.code === "NOT_FOUND") return null;
|
|
99
|
+
throw new Error(res.error?.message || "Failed to get post");
|
|
100
|
+
}
|
|
101
|
+
return res.data;
|
|
102
|
+
},
|
|
103
|
+
// ── Reactions & Replies ──
|
|
104
|
+
// React to a post
|
|
105
|
+
async react(boardId, postId, reaction) {
|
|
106
|
+
const res = await authFetch2(
|
|
107
|
+
"/v1/boards/" + encodeURIComponent(boardId) + "/posts/" + encodeURIComponent(postId) + "/react",
|
|
108
|
+
{ method: "POST", body: JSON.stringify({ reaction }) }
|
|
109
|
+
);
|
|
110
|
+
if (!res.ok) throw new Error(res.error?.message || "Failed to react");
|
|
111
|
+
return res.data;
|
|
112
|
+
},
|
|
113
|
+
// Reply to a post
|
|
114
|
+
async reply(boardId, postId, body) {
|
|
115
|
+
const content = typeof body === "string" ? { body } : body;
|
|
116
|
+
const res = await authFetch2(
|
|
117
|
+
"/v1/boards/" + encodeURIComponent(boardId) + "/posts/" + encodeURIComponent(postId) + "/replies",
|
|
118
|
+
{ method: "POST", body: JSON.stringify(content) }
|
|
119
|
+
);
|
|
120
|
+
if (!res.ok) throw new Error(res.error?.message || "Failed to reply");
|
|
121
|
+
return res.data;
|
|
122
|
+
},
|
|
123
|
+
// ── Subscriptions ──
|
|
124
|
+
// Subscribe to a board
|
|
125
|
+
async subscribe(boardId, opts) {
|
|
126
|
+
const body = { callback_url: opts?.callback_url, filters: opts?.filters };
|
|
127
|
+
const res = await authFetch2("/v1/boards/" + encodeURIComponent(boardId) + "/subscribe", {
|
|
128
|
+
method: "POST",
|
|
129
|
+
body: JSON.stringify(body)
|
|
130
|
+
});
|
|
131
|
+
if (!res.ok) throw new Error(res.error?.message || "Failed to subscribe");
|
|
132
|
+
return res.data;
|
|
133
|
+
},
|
|
134
|
+
// Unsubscribe from a board
|
|
135
|
+
async unsubscribe(boardId) {
|
|
136
|
+
const res = await authFetch2("/v1/boards/" + encodeURIComponent(boardId) + "/subscribe", {
|
|
137
|
+
method: "DELETE"
|
|
138
|
+
});
|
|
139
|
+
if (!res.ok) throw new Error(res.error?.message || "Failed to unsubscribe");
|
|
140
|
+
return res.data;
|
|
141
|
+
},
|
|
142
|
+
// List own subscriptions
|
|
143
|
+
async subscriptions() {
|
|
144
|
+
const res = await authFetch2("/v1/boards/subscriptions");
|
|
145
|
+
if (!res.ok) throw new Error(res.error?.message || "Failed to list subscriptions");
|
|
146
|
+
return res.data;
|
|
147
|
+
},
|
|
148
|
+
// ── Catalogue (public, no auth) ──
|
|
149
|
+
// Browse public boards from catalogue
|
|
150
|
+
async catalogue() {
|
|
151
|
+
const res = await publicFetch("/v1/catalogue/boards");
|
|
152
|
+
if (!res.ok) throw new Error(res.error?.message || "Failed to browse catalogue boards");
|
|
153
|
+
return res.data;
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
attach("social", social);
|
|
157
|
+
})();
|