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
|
@@ -2,24 +2,20 @@
|
|
|
2
2
|
* @file settings.js
|
|
3
3
|
* @description App-catalog settings + chrome that isn't a core feature block: the light/dark THEME
|
|
4
4
|
* (applyTheme/toggleTheme/getThemePref), the Settings modal (openSettings/saveSettings + config
|
|
5
|
-
* sync to/from the node), the Help overlay
|
|
6
|
-
*
|
|
7
|
-
* calls are injected via initSettings(deps). Carved from main.js.
|
|
8
|
-
* @usage import { initSettings, applyTheme, openSettings, exportBackup } from './settings.js'; initSettings({...})
|
|
5
|
+
* sync to/from the node), and the Help overlay. Uses the shared modules by import.
|
|
6
|
+
* @usage import { initSettings, applyTheme, openSettings } from './settings.js'; initSettings({...})
|
|
9
7
|
* @version-history
|
|
10
8
|
* v1.0.0 — 2026-07-10 — Initial extraction (TARGET-021 Aalto 3 modularization, phase 9).
|
|
9
|
+
* v2.0.0 — 2026-07-20 — Server-only cutover: drop the local-catalog JSON export/import, the
|
|
10
|
+
* duplicate-cleanup, and Clear-all (all local-store features); initSettings is now a no-op.
|
|
11
11
|
*/
|
|
12
|
-
import { escapeHtml, sourceLabel } from './util.js';
|
|
13
|
-
import { getAllApps, saveApp, deleteApp, openDB } from './db.js';
|
|
14
12
|
import { showConfirm, closeConfirm, showNotice, dismissNotice } from './ui.js';
|
|
15
13
|
import { loadConfig, saveConfig } from './config.js';
|
|
16
14
|
import { t, getLang } from './i18n.js';
|
|
17
15
|
|
|
18
|
-
//
|
|
19
|
-
|
|
20
|
-
export function initSettings(
|
|
21
|
-
({ generateId, renderApps, loadPublishedApps } = deps);
|
|
22
|
-
}
|
|
16
|
+
// Kept for call-site stability (main.js still calls initSettings): server-only settings no longer
|
|
17
|
+
// need any injected main-local fns, so this is now a no-op.
|
|
18
|
+
export function initSettings() {}
|
|
23
19
|
|
|
24
20
|
// ── Theme ────────────────────────────────────────
|
|
25
21
|
|
|
@@ -179,192 +175,9 @@ function closeHelp() { document.getElementById('help-overlay').hidden = true; }
|
|
|
179
175
|
// Confirm dialog + toast notices → ui.js (showConfirm/closeConfirm/showNotice/dismissNotice),
|
|
180
176
|
// imported at the top. The OK/Cancel buttons are wired to closeConfirm() in bootstrap below.
|
|
181
177
|
|
|
182
|
-
//
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
getAllApps().then(function (apps) {
|
|
186
|
-
var config = loadConfig();
|
|
187
|
-
var backup = {
|
|
188
|
-
version: 1,
|
|
189
|
-
exportedAt: new Date().toISOString(),
|
|
190
|
-
config: config,
|
|
191
|
-
apps: apps
|
|
192
|
-
};
|
|
193
|
-
var json = JSON.stringify(backup, null, 2);
|
|
194
|
-
var blob = new Blob([json], { type: 'application/json' });
|
|
195
|
-
var url = URL.createObjectURL(blob);
|
|
196
|
-
var a = document.createElement('a');
|
|
197
|
-
a.href = url;
|
|
198
|
-
a.download = 'app-catalog-backup-' + new Date().toISOString().slice(0, 10) + '.json';
|
|
199
|
-
document.body.appendChild(a);
|
|
200
|
-
a.click();
|
|
201
|
-
document.body.removeChild(a);
|
|
202
|
-
URL.revokeObjectURL(url);
|
|
203
|
-
});
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
// Identity key for duplicate detection: a published app is the same app
|
|
207
|
-
// regardless of its local id; unpublished ones match by name + content size.
|
|
208
|
-
function localAppKey(a) {
|
|
209
|
-
if (a.publishedFilename) return 'pf:' + a.publishedFilename;
|
|
210
|
-
return 'nm:' + (a.name || '') + '|' + (a.blob ? a.blob.length : (a.url || ''));
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
// Parsed JSON backup awaiting user selection: { backup, rows: [{app, isDup}] }
|
|
214
|
-
var jsonImportState = null;
|
|
215
|
-
|
|
216
|
-
function handleImportBackup(file) {
|
|
217
|
-
if (!file) return;
|
|
218
|
-
var reader = new FileReader();
|
|
219
|
-
reader.onload = function () {
|
|
220
|
-
var backup;
|
|
221
|
-
try {
|
|
222
|
-
backup = JSON.parse(reader.result);
|
|
223
|
-
} catch (e) {
|
|
224
|
-
showNotice('Failed to parse backup file: ' + (e.message || e));
|
|
225
|
-
return;
|
|
226
|
-
}
|
|
227
|
-
if (!backup.apps || !Array.isArray(backup.apps)) {
|
|
228
|
-
showNotice('Invalid backup file: missing apps array');
|
|
229
|
-
return;
|
|
230
|
-
}
|
|
231
|
-
// Inspect-before-write: compare against the current catalog and let the
|
|
232
|
-
// user choose. Duplicates default to unchecked — nothing is imported
|
|
233
|
-
// (and no setting is changed) without an explicit selection.
|
|
234
|
-
getAllApps().then(function (existing) {
|
|
235
|
-
var existingKeys = {};
|
|
236
|
-
existing.forEach(function (a) { existingKeys[localAppKey(a)] = true; });
|
|
237
|
-
jsonImportState = {
|
|
238
|
-
backup: backup,
|
|
239
|
-
rows: backup.apps.map(function (a) {
|
|
240
|
-
return { app: a, isDup: !!existingKeys[localAppKey(a)] };
|
|
241
|
-
}),
|
|
242
|
-
};
|
|
243
|
-
renderJsonImportModal();
|
|
244
|
-
});
|
|
245
|
-
};
|
|
246
|
-
reader.readAsText(file);
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
function renderJsonImportModal() {
|
|
250
|
-
var rows = jsonImportState.rows;
|
|
251
|
-
var body = document.getElementById('json-import-body');
|
|
252
|
-
var html = '<p style="font-size:.8rem;color:var(--text-muted);margin:4px 0 8px">' + t('jsonImport.desc') + '</p>' +
|
|
253
|
-
'<div class="backup-toolbar-row"><div>' +
|
|
254
|
-
'<button class="backup-link-btn" onclick="window._launcher.jsonImportSelectAll(true)">' + t('backup.selectAll') + '</button> / ' +
|
|
255
|
-
'<button class="backup-link-btn" onclick="window._launcher.jsonImportSelectAll(false)">' + t('backup.selectNone') + '</button>' +
|
|
256
|
-
'</div></div>' +
|
|
257
|
-
'<table class="backup-table"><tbody>';
|
|
258
|
-
for (var i = 0; i < rows.length; i++) {
|
|
259
|
-
var a = rows[i].app;
|
|
260
|
-
html +=
|
|
261
|
-
'<tr>' +
|
|
262
|
-
'<td><input type="checkbox" class="json-import-cb" data-i="' + i + '"' + (rows[i].isDup ? '' : ' checked') + '/></td>' +
|
|
263
|
-
'<td>' + escapeHtml(a.name || a.publishedFilename || 'Untitled') +
|
|
264
|
-
(a.publishedFilename ? '<div class="mono-cell">' + escapeHtml(a.publishedFilename) + '</div>' : '') + '</td>' +
|
|
265
|
-
'<td>' + sourceLabel(a.source) + '</td>' +
|
|
266
|
-
'<td>' + (rows[i].isDup
|
|
267
|
-
? '<span class="backup-status-badge backup-status-exists">' + t('jsonImport.statusDup') + '</span>'
|
|
268
|
-
: '<span class="backup-status-badge backup-status-new">' + t('backup.statusNew') + '</span>') + '</td>' +
|
|
269
|
-
'</tr>';
|
|
270
|
-
}
|
|
271
|
-
html += '</tbody></table>';
|
|
272
|
-
if (jsonImportState.backup.config && typeof jsonImportState.backup.config === 'object') {
|
|
273
|
-
html += '<label style="display:flex;align-items:center;gap:8px;margin-top:10px;font-size:.85rem">' +
|
|
274
|
-
'<input type="checkbox" id="json-import-config"/> ' + t('jsonImport.config') + '</label>';
|
|
275
|
-
}
|
|
276
|
-
body.innerHTML = html;
|
|
277
|
-
document.getElementById('json-import-status').textContent = '';
|
|
278
|
-
document.getElementById('json-import-btn').style.display = '';
|
|
279
|
-
document.getElementById('json-import-overlay').hidden = false;
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
function jsonImportSelectAll(checked) {
|
|
283
|
-
document.querySelectorAll('.json-import-cb').forEach(function (b) { b.checked = checked; });
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
function submitJsonImport() {
|
|
287
|
-
var statusEl = document.getElementById('json-import-status');
|
|
288
|
-
var selected = [];
|
|
289
|
-
document.querySelectorAll('.json-import-cb').forEach(function (b) {
|
|
290
|
-
if (b.checked) selected.push(jsonImportState.rows[parseInt(b.getAttribute('data-i'), 10)].app);
|
|
291
|
-
});
|
|
292
|
-
var configCb = document.getElementById('json-import-config');
|
|
293
|
-
var importConfig = !!(configCb && configCb.checked);
|
|
294
|
-
if (selected.length === 0 && !importConfig) {
|
|
295
|
-
statusEl.style.color = '#ef4444';
|
|
296
|
-
statusEl.textContent = t('backup.nothingSelected');
|
|
297
|
-
return;
|
|
298
|
-
}
|
|
299
|
-
if (importConfig) {
|
|
300
|
-
var merged = Object.assign({}, loadConfig(), jsonImportState.backup.config);
|
|
301
|
-
saveConfig(merged);
|
|
302
|
-
applyTheme(merged.theme);
|
|
303
|
-
}
|
|
304
|
-
Promise.all(selected.map(function (a) {
|
|
305
|
-
var app = Object.assign({}, a);
|
|
306
|
-
app.id = generateId(); // new id — the source backup may collide with existing ids
|
|
307
|
-
return saveApp(app);
|
|
308
|
-
})).then(function () {
|
|
309
|
-
statusEl.style.color = '#34d399';
|
|
310
|
-
statusEl.textContent = '✔ ' + t('jsonImport.done') + ': ' + selected.length;
|
|
311
|
-
document.getElementById('json-import-btn').style.display = 'none';
|
|
312
|
-
renderApps();
|
|
313
|
-
loadPublishedApps();
|
|
314
|
-
});
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
// ── Remove duplicate apps (cleanup after legacy blind imports) ──
|
|
318
|
-
|
|
319
|
-
function removeDuplicateApps() {
|
|
320
|
-
getAllApps().then(async function (apps) {
|
|
321
|
-
var groups = {};
|
|
322
|
-
apps.forEach(function (a) {
|
|
323
|
-
var k = localAppKey(a);
|
|
324
|
-
(groups[k] = groups[k] || []).push(a);
|
|
325
|
-
});
|
|
326
|
-
var toDelete = [];
|
|
327
|
-
Object.keys(groups).forEach(function (k) {
|
|
328
|
-
var g = groups[k];
|
|
329
|
-
if (g.length < 2) return;
|
|
330
|
-
// Keep the best copy: favorites first, then the earliest added
|
|
331
|
-
g.sort(function (x, y) {
|
|
332
|
-
if (!!y.favorite !== !!x.favorite) return (y.favorite ? 1 : 0) - (x.favorite ? 1 : 0);
|
|
333
|
-
return (x.addedAt || '') < (y.addedAt || '') ? -1 : 1;
|
|
334
|
-
});
|
|
335
|
-
toDelete = toDelete.concat(g.slice(1));
|
|
336
|
-
});
|
|
337
|
-
if (toDelete.length === 0) { showNotice(t('dedup.none')); return; }
|
|
338
|
-
if (!(await showConfirm(t('dedup.confirm') + ' ' + toDelete.length))) return;
|
|
339
|
-
Promise.all(toDelete.map(function (a) { return deleteApp(a.id); })).then(function () {
|
|
340
|
-
renderApps();
|
|
341
|
-
loadPublishedApps();
|
|
342
|
-
showNotice(t('dedup.done') + ': ' + toDelete.length);
|
|
343
|
-
});
|
|
344
|
-
});
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
// ── Clear All Data ──────────────────────────────
|
|
348
|
-
|
|
349
|
-
async function clearAllData() {
|
|
350
|
-
if (!(await showConfirm(t('confirm.clearAll1')))) return;
|
|
351
|
-
if (!(await showConfirm(t('confirm.clearAll2')))) return;
|
|
352
|
-
|
|
353
|
-
openDB().then(function (db) {
|
|
354
|
-
return new Promise(function (resolve, reject) {
|
|
355
|
-
var tx = db.transaction(STORE_NAME, 'readwrite');
|
|
356
|
-
tx.objectStore(STORE_NAME).clear();
|
|
357
|
-
tx.oncomplete = function () { resolve(); };
|
|
358
|
-
tx.onerror = function () { reject(tx.error); };
|
|
359
|
-
});
|
|
360
|
-
}).then(function () {
|
|
361
|
-
localStorage.removeItem('appLauncherConfig');
|
|
362
|
-
applyTheme('dark');
|
|
363
|
-
renderApps();
|
|
364
|
-
document.getElementById('settings-overlay').hidden = true;
|
|
365
|
-
showNotice('All data cleared');
|
|
366
|
-
});
|
|
367
|
-
}
|
|
178
|
+
// Export / Import of a LOCAL JSON catalog was removed with the server-only cutover — there is no
|
|
179
|
+
// browser-local catalog to back up. Server apps + extensions are exported via the ZIP backup
|
|
180
|
+
// (💾 menu → /v1/apps/backup) in server-io.js, which is unaffected.
|
|
368
181
|
|
|
369
182
|
export {
|
|
370
183
|
applyTheme,
|
|
@@ -377,11 +190,5 @@ export {
|
|
|
377
190
|
loadConfigFromServer,
|
|
378
191
|
closeSettings,
|
|
379
192
|
openHelp,
|
|
380
|
-
closeHelp
|
|
381
|
-
exportBackup,
|
|
382
|
-
handleImportBackup,
|
|
383
|
-
jsonImportSelectAll,
|
|
384
|
-
submitJsonImport,
|
|
385
|
-
removeDuplicateApps,
|
|
386
|
-
clearAllData
|
|
193
|
+
closeHelp
|
|
387
194
|
};
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file workcopy.js
|
|
3
|
+
* @description The working-copy model behind the app-catalog edit loop. ONE persistent working copy
|
|
4
|
+
* per app — the server draft slot (PUT /v1/apps/:owner/:file/draft, TARGET-030) — plus a rolling
|
|
5
|
+
* history of CHECKPOINTS: the bytes each save replaced, kept as per-owner memory records via the
|
|
6
|
+
* generic /v1/memory API. Before this module the catalog's "Save" only overwrote a transient
|
|
7
|
+
* in-memory blob (db.js is server-only, no browser persistence): it survived neither a reload nor
|
|
8
|
+
* the next save, which is exactly why editing felt like editing the same version forever. Saving
|
|
9
|
+
* now (a) checkpoints the previous bytes and (b) persists the new bytes server-side, so nothing is
|
|
10
|
+
* lost, the work can be tested on a real origin, and publishing stays the separate, deliberate step.
|
|
11
|
+
* @structure
|
|
12
|
+
* - slugFor(owner, filename) → memory-key slug for one app
|
|
13
|
+
* - loadCheckpoints / getCheckpoints → the app's checkpoint index (newest first)
|
|
14
|
+
* - saveWorkingCopy({...}) → checkpoint the replaced bytes + PUT the server draft
|
|
15
|
+
* - readCheckpoint / deleteCheckpoint → restore or prune one checkpoint
|
|
16
|
+
* - discardWorkingCopy → drop the server draft slot
|
|
17
|
+
* @usage import { saveWorkingCopy, loadCheckpoints, getCheckpoints, readCheckpoint } from './workcopy.js'
|
|
18
|
+
* @version-history
|
|
19
|
+
* v1.0.0 — 2026-07-25 — Initial (TARGET-048): persistent working copy + checkpoint history, so
|
|
20
|
+
* local edits stop vanishing and "saved" stops meaning "kept only until you reload".
|
|
21
|
+
*/
|
|
22
|
+
import { loadConfig } from './config.js';
|
|
23
|
+
import { getCortexOwnerToken } from './cortex.js';
|
|
24
|
+
|
|
25
|
+
// How many checkpoints to keep per app. Each checkpoint is a full HTML snapshot in its OWN memory
|
|
26
|
+
// record (the node caps a single memory value at ~1 MB, so they must not share one document), and
|
|
27
|
+
// they count against the owner's memory quota — hence a small rolling window, oldest pruned first.
|
|
28
|
+
const MAX_CHECKPOINTS = 8;
|
|
29
|
+
const PREFIX = 'app-catalog.wc';
|
|
30
|
+
|
|
31
|
+
// slug -> checkpoint index array (newest first). Mirrors the server doc so the detail view can
|
|
32
|
+
// render synchronously between loads.
|
|
33
|
+
let cache = {};
|
|
34
|
+
|
|
35
|
+
function base() { return (loadConfig().aimeatUrl || '').replace(/\/+$/, ''); }
|
|
36
|
+
function tok() { return getCortexOwnerToken(); }
|
|
37
|
+
|
|
38
|
+
/** Stable, key-safe slug for one app's checkpoint records. */
|
|
39
|
+
export function slugFor(owner, filename) {
|
|
40
|
+
return (String(owner || '') + '-' + String(filename || ''))
|
|
41
|
+
.replace(/[^a-zA-Z0-9]+/g, '-')
|
|
42
|
+
.replace(/^-+|-+$/g, '')
|
|
43
|
+
.toLowerCase()
|
|
44
|
+
.slice(0, 80);
|
|
45
|
+
}
|
|
46
|
+
function indexKey(slug) { return PREFIX + '.' + slug; }
|
|
47
|
+
function bodyKey(slug, id) { return PREFIX + '.' + slug + '.b' + id; }
|
|
48
|
+
|
|
49
|
+
function memGet(key) {
|
|
50
|
+
var b = base(), token = tok();
|
|
51
|
+
if (!b || !token) return Promise.resolve(null);
|
|
52
|
+
return fetch(b + '/v1/memory/' + encodeURIComponent(key), { headers: { 'Authorization': 'Bearer ' + token } })
|
|
53
|
+
.then(function (r) { return r.ok ? r.json() : null; })
|
|
54
|
+
.then(function (j) { return (j && j.data && j.data.value) || null; })
|
|
55
|
+
.catch(function () { return null; });
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function memPut(key, value) {
|
|
59
|
+
var b = base(), token = tok();
|
|
60
|
+
if (!b || !token) return Promise.reject(new Error('not signed in'));
|
|
61
|
+
return fetch(b + '/v1/memory', {
|
|
62
|
+
method: 'POST',
|
|
63
|
+
headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer ' + token },
|
|
64
|
+
body: JSON.stringify({ key: key, value: value, visibility: 'private' }),
|
|
65
|
+
}).then(function (r) {
|
|
66
|
+
return r.json().then(function (j) {
|
|
67
|
+
if (!r.ok || (j && j.ok === false)) throw new Error((j && j.error && j.error.message) || ('HTTP ' + r.status));
|
|
68
|
+
return j;
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// Best-effort: a failed prune only leaves an orphan body record the index no longer points at.
|
|
74
|
+
function memDelete(key) {
|
|
75
|
+
var b = base(), token = tok();
|
|
76
|
+
if (!b || !token) return Promise.resolve();
|
|
77
|
+
return fetch(b + '/v1/memory/' + encodeURIComponent(key), {
|
|
78
|
+
method: 'DELETE',
|
|
79
|
+
headers: { 'Authorization': 'Bearer ' + token },
|
|
80
|
+
}).catch(function () { /* orphan record is harmless */ });
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/** The cached checkpoint index for an app (newest first). Empty until loadCheckpoints resolves. */
|
|
84
|
+
export function getCheckpoints(owner, filename) {
|
|
85
|
+
return cache[slugFor(owner, filename)] || [];
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/** Fetch the app's checkpoint index. Logged out / none yet → []. Never rejects. */
|
|
89
|
+
export function loadCheckpoints(owner, filename) {
|
|
90
|
+
var slug = slugFor(owner, filename);
|
|
91
|
+
return memGet(indexKey(slug)).then(function (v) {
|
|
92
|
+
var items = (v && Array.isArray(v.items)) ? v.items : [];
|
|
93
|
+
cache[slug] = items;
|
|
94
|
+
return items;
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// Store `b64` as a new checkpoint, newest first, pruning past MAX_CHECKPOINTS. The body goes in its
|
|
99
|
+
// own record so one snapshot never blows the per-value size cap.
|
|
100
|
+
function pushCheckpoint(slug, b64, note) {
|
|
101
|
+
var id = String(Date.now());
|
|
102
|
+
return memPut(bodyKey(slug, id), { html: b64 }).then(function () {
|
|
103
|
+
var entry = {
|
|
104
|
+
id: id,
|
|
105
|
+
at: new Date().toISOString(),
|
|
106
|
+
note: String(note || '').slice(0, 160),
|
|
107
|
+
size: Math.round(b64.length * 0.75),
|
|
108
|
+
};
|
|
109
|
+
var all = [entry].concat(cache[slug] || []);
|
|
110
|
+
var keep = all.slice(0, MAX_CHECKPOINTS);
|
|
111
|
+
var prune = all.slice(MAX_CHECKPOINTS);
|
|
112
|
+
cache[slug] = keep;
|
|
113
|
+
return memPut(indexKey(slug), { version: 1, updatedAt: entry.at, items: keep })
|
|
114
|
+
.then(function () {
|
|
115
|
+
return Promise.all(prune.map(function (p) { return memDelete(bodyKey(slug, p.id)); }));
|
|
116
|
+
})
|
|
117
|
+
.then(function () { return entry; });
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Read the saved working copy back (base64), or null when there is none. Essential after a reload:
|
|
123
|
+
* without it the catalog can only re-fetch the LIVE bytes, and would then show the published app
|
|
124
|
+
* while calling it your working copy — and overwrite the real one on the next save.
|
|
125
|
+
*/
|
|
126
|
+
export function getDraft(owner, filename) {
|
|
127
|
+
var b = base(), token = tok();
|
|
128
|
+
if (!b || !token) return Promise.resolve(null);
|
|
129
|
+
return fetch(b + '/v1/apps/' + encodeURIComponent(owner) + '/' + encodeURIComponent(filename) + '/draft', {
|
|
130
|
+
headers: { 'Authorization': 'Bearer ' + token },
|
|
131
|
+
})
|
|
132
|
+
.then(function (r) { return r.ok ? r.json() : null; })
|
|
133
|
+
.then(function (j) { return (j && j.data && typeof j.data.content === 'string') ? j.data : null; })
|
|
134
|
+
.catch(function () { return null; });
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/** PUT the bytes into the app's server draft slot (the persistent working copy). */
|
|
138
|
+
export function putDraft(owner, filename, b64) {
|
|
139
|
+
var b = base(), token = tok();
|
|
140
|
+
if (!b || !token) return Promise.reject(new Error('not signed in'));
|
|
141
|
+
return fetch(b + '/v1/apps/' + encodeURIComponent(owner) + '/' + encodeURIComponent(filename) + '/draft', {
|
|
142
|
+
method: 'PUT',
|
|
143
|
+
headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer ' + token },
|
|
144
|
+
body: JSON.stringify({ content: b64 }),
|
|
145
|
+
}).then(function (r) {
|
|
146
|
+
return r.json().then(function (j) {
|
|
147
|
+
if (!j.ok) throw new Error((j.error && (j.error.message || j.error.code)) || ('HTTP ' + r.status));
|
|
148
|
+
return j.data;
|
|
149
|
+
});
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/** Discard the server draft slot (the live app is untouched). Idempotent. */
|
|
154
|
+
export function discardWorkingCopy(owner, filename) {
|
|
155
|
+
var b = base(), token = tok();
|
|
156
|
+
if (!b || !token) return Promise.resolve();
|
|
157
|
+
return fetch(b + '/v1/apps/' + encodeURIComponent(owner) + '/' + encodeURIComponent(filename) + '/draft', {
|
|
158
|
+
method: 'DELETE',
|
|
159
|
+
headers: { 'Authorization': 'Bearer ' + token },
|
|
160
|
+
}).catch(function () { /* nothing to discard */ });
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Save new bytes as the app's working copy.
|
|
165
|
+
* opts = { owner, filename, previousB64, nextB64, note }
|
|
166
|
+
* The bytes being REPLACED (previousB64) become a checkpoint first — so the state you are leaving
|
|
167
|
+
* is always recoverable — then the new bytes are persisted to the server draft slot.
|
|
168
|
+
* Resolves to { checkpointed: bool, draft }.
|
|
169
|
+
*/
|
|
170
|
+
export function saveWorkingCopy(opts) {
|
|
171
|
+
var owner = opts.owner, filename = opts.filename;
|
|
172
|
+
var slug = slugFor(owner, filename);
|
|
173
|
+
var shouldCheckpoint = !!opts.previousB64 && opts.previousB64 !== opts.nextB64;
|
|
174
|
+
var chain = shouldCheckpoint
|
|
175
|
+
? pushCheckpoint(slug, opts.previousB64, opts.note).catch(function () { return null; })
|
|
176
|
+
: Promise.resolve(null);
|
|
177
|
+
return chain.then(function (entry) {
|
|
178
|
+
return putDraft(owner, filename, opts.nextB64).then(function (draft) {
|
|
179
|
+
return { checkpointed: !!entry, draft: draft };
|
|
180
|
+
});
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/** Read one checkpoint's stored HTML (base64). Missing/expired → null. */
|
|
185
|
+
export function readCheckpoint(owner, filename, id) {
|
|
186
|
+
return memGet(bodyKey(slugFor(owner, filename), id)).then(function (v) {
|
|
187
|
+
return (v && typeof v.html === 'string') ? v.html : null;
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/** Remove one checkpoint from the index and delete its body record. */
|
|
192
|
+
export function deleteCheckpoint(owner, filename, id) {
|
|
193
|
+
var slug = slugFor(owner, filename);
|
|
194
|
+
var items = (cache[slug] || []).filter(function (c) { return c.id !== id; });
|
|
195
|
+
cache[slug] = items;
|
|
196
|
+
return memPut(indexKey(slug), { version: 1, updatedAt: new Date().toISOString(), items: items })
|
|
197
|
+
.then(function () { return memDelete(bodyKey(slug, id)); });
|
|
198
|
+
}
|
|
@@ -591,6 +591,53 @@
|
|
|
591
591
|
opacity: 1;
|
|
592
592
|
}
|
|
593
593
|
|
|
594
|
+
/* ── Server-backed favourite toggle (⭐ on any app / published card) ─── */
|
|
595
|
+
.fav-toggle {
|
|
596
|
+
position: absolute;
|
|
597
|
+
top: 6px;
|
|
598
|
+
left: 8px;
|
|
599
|
+
background: none;
|
|
600
|
+
border: none;
|
|
601
|
+
cursor: pointer;
|
|
602
|
+
font-size: 1rem;
|
|
603
|
+
line-height: 1;
|
|
604
|
+
padding: 2px;
|
|
605
|
+
opacity: .5;
|
|
606
|
+
transition: opacity var(--transition), transform var(--transition);
|
|
607
|
+
z-index: 2;
|
|
608
|
+
}
|
|
609
|
+
.fav-toggle:hover { opacity: 1; transform: scale(1.15); }
|
|
610
|
+
.fav-toggle.on { opacity: 1; }
|
|
611
|
+
.published-card { position: relative; }
|
|
612
|
+
.published-card .fav-toggle { left: auto; right: 8px; top: 8px; }
|
|
613
|
+
/* Library/community cards already own the top-LEFT corner with the Listed/Unlisted badge, so
|
|
614
|
+
the star sits top-RIGHT instead of on top of it. Keep clear of the ⋮ menu button, which only
|
|
615
|
+
local cards render: :has() pulls the star back to the edge when there is no menu. Where
|
|
616
|
+
:has() is unsupported that selector is simply dropped and the star keeps the wider offset —
|
|
617
|
+
a little gap, never an overlap. */
|
|
618
|
+
.app-card .fav-toggle { left: auto; right: 40px; top: 6px; }
|
|
619
|
+
.app-card:not(:has(.card-menu-btn)) .fav-toggle { right: 8px; }
|
|
620
|
+
.fav-section-title {
|
|
621
|
+
font-size: 1rem;
|
|
622
|
+
font-weight: 700;
|
|
623
|
+
color: var(--text);
|
|
624
|
+
display: flex;
|
|
625
|
+
align-items: center;
|
|
626
|
+
gap: 8px;
|
|
627
|
+
margin: 0 0 .6rem;
|
|
628
|
+
}
|
|
629
|
+
.fav-section-count { opacity: .6; font-weight: 400; }
|
|
630
|
+
|
|
631
|
+
/* "Promoted" badge in the detail Promote section */
|
|
632
|
+
.dtl-badge-on {
|
|
633
|
+
font-size: .7rem;
|
|
634
|
+
font-weight: 600;
|
|
635
|
+
color: #34d399;
|
|
636
|
+
border: 1px solid #34d399;
|
|
637
|
+
border-radius: 10px;
|
|
638
|
+
padding: 1px 8px;
|
|
639
|
+
}
|
|
640
|
+
|
|
594
641
|
/* ── Card Menu Button ─────────────────────────────── */
|
|
595
642
|
|
|
596
643
|
.card-menu-btn {
|
|
@@ -1104,6 +1151,33 @@
|
|
|
1104
1151
|
.dtl-sync.diff { background: rgba(245,158,11,.14); color: #f59e0b; }
|
|
1105
1152
|
.dtl-sync.none { background: var(--bg-subtle); color: var(--text-muted); }
|
|
1106
1153
|
|
|
1154
|
+
/* ── Working copy → published lifecycle band (TARGET-048) ──────────────────
|
|
1155
|
+
Replaces the old two-number STATUS card: two labelled stops that say, in plain words, who
|
|
1156
|
+
can see what. The active stop is highlighted so "where is my work" is answerable at a glance. */
|
|
1157
|
+
.wc-row { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
|
|
1158
|
+
.wc-band { flex: 1; min-width: 240px; display: flex; align-items: stretch; gap: 10px; flex-wrap: wrap; }
|
|
1159
|
+
.wc-stop {
|
|
1160
|
+
display: flex; flex-direction: column; gap: 2px;
|
|
1161
|
+
padding: 10px 12px; border-radius: 10px;
|
|
1162
|
+
border: 1px solid var(--border-subtle); background: var(--bg-subtle);
|
|
1163
|
+
min-width: 150px; flex: 1;
|
|
1164
|
+
}
|
|
1165
|
+
.wc-stop.is-active { border-color: rgba(245, 158, 11, .55); background: rgba(245, 158, 11, .10); }
|
|
1166
|
+
.wc-stop.is-live { border-color: rgba(52, 211, 153, .45); background: rgba(52, 211, 153, .10); }
|
|
1167
|
+
.wc-stop-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
|
|
1168
|
+
.wc-stop-val { font-size: .95rem; font-weight: 700; color: var(--text); }
|
|
1169
|
+
.wc-stop-note { font-size: .75rem; color: var(--text-muted); }
|
|
1170
|
+
.wc-arrow { align-self: center; color: var(--text-muted); font-size: 1.1rem; }
|
|
1171
|
+
.wc-explain { font-size: .88rem; color: var(--text); line-height: 1.5; margin: 12px 0 10px; }
|
|
1172
|
+
.wc-size { font-size: .75rem; color: var(--text-muted); margin: 8px 0 0; }
|
|
1173
|
+
.wc-muted { color: var(--text-muted); font-size: .85rem; }
|
|
1174
|
+
/* One-line reminder of what the three verbs do — shown under both button rows so the source
|
|
1175
|
+
editor and the AI loop explain themselves identically. */
|
|
1176
|
+
.wc-verbs-hint { font-size: .78rem; color: var(--text-muted); line-height: 1.45; margin: 10px 0 0; }
|
|
1177
|
+
.wc-proposal-head { margin: 0 0 8px; }
|
|
1178
|
+
.wc-ckpt-when { display: block; font-size: .85rem; font-weight: 600; color: var(--text); }
|
|
1179
|
+
.wc-ckpt-note { display: block; font-size: .78rem; color: var(--text-muted); }
|
|
1180
|
+
|
|
1107
1181
|
.dtl-meta-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
|
|
1108
1182
|
.dtl-meta-item .dtl-meta-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
|
|
1109
1183
|
.dtl-meta-item .dtl-meta-val { font-size: .9rem; color: var(--text); word-break: break-word; }
|
|
@@ -2146,3 +2220,29 @@
|
|
|
2146
2220
|
.aga-deploy-btn { white-space: nowrap; }
|
|
2147
2221
|
.aga-btn-sm { padding: 2px 10px; font-size: .75rem; margin-left: auto; }
|
|
2148
2222
|
.published-card-badgerow .pcb-agent { cursor: default; }
|
|
2223
|
+
|
|
2224
|
+
/* ── EXCHANGE & ODPS (app detail) ──────────────────────────────────────────────
|
|
2225
|
+
The app-level marketplace status plus the ODPS authoring forms (app defaults and the per-tool
|
|
2226
|
+
descriptor). Themed through the same variables as the rest of the detail view; the attestation
|
|
2227
|
+
block is set apart on purpose, because those fields are legal promises rather than marketing copy. */
|
|
2228
|
+
.od-status { font-size: .86rem; font-weight: 600; padding: 6px 10px; border-radius: 8px; display: inline-block; }
|
|
2229
|
+
.od-status-on { background: rgba(52,211,153,.12); color: #34d399; }
|
|
2230
|
+
.od-status-none { background: var(--bg-subtle); color: var(--text-muted); }
|
|
2231
|
+
.od-note { margin: 6px 0 8px; }
|
|
2232
|
+
.od-muted { color: var(--text-muted); font-size: .85rem; }
|
|
2233
|
+
.od-actions { margin-top: 10px; }
|
|
2234
|
+
.od-form { margin-top: 10px; }
|
|
2235
|
+
.od-input { margin: 4px 0 8px; }
|
|
2236
|
+
.od-grid { display: flex; gap: 10px; flex-wrap: wrap; }
|
|
2237
|
+
.od-col { flex: 1; min-width: 150px; }
|
|
2238
|
+
.od-col-narrow { flex: 0 0 110px; min-width: 90px; }
|
|
2239
|
+
.od-attest { border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; margin: 8px 0; background: var(--bg-subtle); }
|
|
2240
|
+
.od-attest-head { font-weight: 600; margin-bottom: 2px; }
|
|
2241
|
+
.od-tool-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 8px 0 4px; }
|
|
2242
|
+
.od-link { font-size: .8rem; color: var(--accent); text-decoration: none; }
|
|
2243
|
+
.od-link:hover { text-decoration: underline; }
|
|
2244
|
+
.od-blocked { flex-basis: 100%; font-size: .8rem; color: #f59e0b; margin-top: 4px; }
|
|
2245
|
+
.od-ok { color: #34d399; }
|
|
2246
|
+
.od-err { color: var(--accent); }
|
|
2247
|
+
/* Measured delivery time offered as the basis for a commitment (never as the commitment itself). */
|
|
2248
|
+
.od-measured { font-size: 12px; color: var(--text-muted); margin: 4px 0 8px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
|