aimeat 2.2.0 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +110 -84
- package/dist/.env.example +47 -11
- package/dist/locales/en.json +251 -371
- package/dist/locales/fi.json +255 -375
- package/dist/public/components/ContactCard.js +30 -5
- package/dist/public/components/ContactPicker.js +3 -2
- package/dist/public/components/ImageDeliverable.js +2 -1
- package/dist/public/components/JsonView.js +1 -0
- package/dist/public/components/LinkPreview.js +1 -1
- package/dist/public/components/NotificationBell.js +6 -4
- package/dist/public/components/UsageChart.js +2 -1
- package/dist/public/css/theme.css +1516 -1432
- package/dist/public/css/views/app-grant.css +95 -36
- package/dist/public/css/views/help.css +28 -0
- package/dist/public/css/views/landing.css +20 -0
- package/dist/public/css/views/members.css +40 -10
- package/dist/public/css/views/portal-dev.css +64 -45
- package/dist/public/css/views/profile.css +8 -0
- package/dist/public/js/api.js +1 -0
- package/dist/public/js/app-sandbox.js +1 -0
- package/dist/public/js/components/auth-image.js +3 -1
- package/dist/public/js/i18n.js +3 -1
- package/dist/public/js/presence-store.js +3 -1
- package/dist/public/js/recents.js +2 -0
- package/dist/public/js/services/agent-activity.js +2 -1
- package/dist/public/js/services/agent-directives.js +2 -1
- package/dist/public/js/services/agent-integration.js +2 -1
- package/dist/public/js/services/agent-messages.js +2 -1
- package/dist/public/js/services/agent-tasks.js +2 -1
- package/dist/public/js/services/agents.js +3 -2
- package/dist/public/js/services/calibrator.js +2 -1
- package/dist/public/js/services/consent.js +2 -1
- package/dist/public/js/services/contacts.js +2 -1
- package/dist/public/js/services/cortex.js +5 -4
- package/dist/public/js/services/ecosystem.js +2 -1
- package/dist/public/js/services/knowledge.js +2 -1
- package/dist/public/js/services/ledger.js +2 -1
- package/dist/public/js/services/living.js +10 -9
- package/dist/public/js/services/memory.js +2 -1
- package/dist/public/js/services/messages.js +53 -8
- package/dist/public/js/services/nodes.js +3 -2
- package/dist/public/js/services/notebook-plan.js +2 -1
- package/dist/public/js/services/notebook.js +6 -5
- package/dist/public/js/services/offers.js +6 -5
- package/dist/public/js/services/organisms.js +26 -25
- package/dist/public/js/services/organisms.prompts.js +3 -2
- package/dist/public/js/services/organisms.shared.js +2 -1
- package/dist/public/js/services/organisms.workspace-gen.js +3 -2
- package/dist/public/js/services/packages.js +1 -0
- package/dist/public/js/services/schedules.js +2 -1
- package/dist/public/js/services/security.js +3 -2
- package/dist/public/js/services/skills.js +1 -0
- package/dist/public/js/services/tracked-responses.js +4 -3
- package/dist/public/js/services/unfurl.js +4 -4
- package/dist/public/js/services/work.js +2 -1
- package/dist/public/js/site.js +74 -0
- package/dist/public/js/swallowed.js +69 -0
- package/dist/public/js/theme.js +2 -1
- package/dist/public/js/utils.js +3 -1
- package/dist/public/lib/VENDORED.md +1 -0
- package/dist/public/lib/aimeat-game/board.css +262 -0
- package/dist/public/lib/aimeat-game/progress.css +406 -0
- package/dist/public/lib/aimeat-game/shell.css +388 -0
- package/dist/public/lib/aimeat-game.css +394 -0
- package/dist/public/lib/pdfjs@6/pdf.min.mjs +29 -0
- package/dist/public/lib/pdfjs@6/pdf.worker.min.mjs +29 -0
- package/dist/public/privacy.fi.html +1 -1
- package/dist/public/privacy.html +1 -1
- package/dist/public/spa.html +885 -793
- package/dist/public/sw.js +4 -2
- package/dist/public/views/admin/agent-integration-tab.js +7 -6
- package/dist/public/views/admin/ai-usage-tab.js +2 -1
- package/dist/public/views/admin/cortex-tab.js +2 -1
- package/dist/public/views/admin/economy-tab.js +0 -1
- package/dist/public/views/admin/email-tab.js +4 -2
- package/dist/public/views/admin/federation-tab.js +3 -2
- package/dist/public/views/admin/feedback-tab.js +2 -1
- package/dist/public/views/admin/knowledge-tab.js +2 -1
- package/dist/public/views/admin/messages-tab.js +2 -1
- package/dist/public/views/admin/msm-tab.js +2 -1
- package/dist/public/views/admin/packages-tab.js +3 -2
- package/dist/public/views/admin/portal-tab.js +7 -2
- package/dist/public/views/admin/push-tab.js +9 -4
- package/dist/public/views/admin/stats-tab.js +2 -1
- package/dist/public/views/admin/usage-tab.js +4 -3
- package/dist/public/views/admin.js +6 -4
- package/dist/public/views/agent-solo.js +4 -3
- package/dist/public/views/app-grant.js +105 -32
- package/dist/public/views/business.js +139 -55
- package/dist/public/views/command-palette.js +5 -3
- package/dist/public/views/companies.js +3 -2
- package/dist/public/views/doc-solo.js +2 -1
- package/dist/public/views/help.js +95 -15
- package/dist/public/views/how-it-works.js +41 -8
- package/dist/public/views/invite-accept.js +3 -2
- package/dist/public/views/landing-activity.js +3 -2
- package/dist/public/views/landing-node-totals.js +2 -1
- package/dist/public/views/landing.js +75 -152
- package/dist/public/views/members.js +29 -2
- package/dist/public/views/my-company.js +9 -7
- package/dist/public/views/my-company.payments.js +2 -1
- package/dist/public/views/portal-classic.js +2 -1
- package/dist/public/views/portal-dev.js +64 -35
- package/dist/public/views/portal-dev.panels.js +39 -2
- package/dist/public/views/portal-dev.upload.js +25 -196
- package/dist/public/views/portal.components.js +4 -3
- package/dist/public/views/portfolio.js +5 -4
- package/dist/public/views/profile/access-tab/access-tokens.js +2 -1
- package/dist/public/views/profile/access-tab/agent-defaults.js +3 -1
- package/dist/public/views/profile/access-tab/connected-apps.js +72 -3
- package/dist/public/views/profile/access-tab/sharing-groups.js +4 -1
- package/dist/public/views/profile/access-tab.js +3 -1
- package/dist/public/views/profile/agents/agent-card.js +6 -5
- package/dist/public/views/profile/agents/tab-activity.js +10 -8
- package/dist/public/views/profile/agents/tab-agent-config.js +3 -1
- package/dist/public/views/profile/agents/tab-contracts.js +2 -1
- package/dist/public/views/profile/agents/tab-data-access.js +10 -7
- package/dist/public/views/profile/agents/tab-helpers.js +5 -0
- package/dist/public/views/profile/agents/tab-integration.js +12 -9
- package/dist/public/views/profile/agents/tab-messages.js +6 -4
- package/dist/public/views/profile/agents/tab-quality.js +3 -2
- package/dist/public/views/profile/agents/tab-usage.js +5 -3
- package/dist/public/views/profile/agents/task-item.js +12 -7
- package/dist/public/views/profile/agents-activity-subtab.js +5 -2
- package/dist/public/views/profile/agents-capabilities-subtab.js +4 -2
- package/dist/public/views/profile/agents-messages-subtab.js +5 -2
- package/dist/public/views/profile/agents-services-subtab.js +1 -0
- package/dist/public/views/profile/agents-tab.js +11 -7
- package/dist/public/views/profile/appdev-tab.js +3 -2
- package/dist/public/views/profile/apps-tab.js +10 -8
- package/dist/public/views/profile/boards-tab.js +5 -4
- package/dist/public/views/profile/calibrator-batch.helpers.js +3 -2
- package/dist/public/views/profile/calibrator-batch.js +3 -1
- package/dist/public/views/profile/calibrator-llm-editor.js +3 -2
- package/dist/public/views/profile/calibrator-tab.js +5 -4
- package/dist/public/views/profile/capabilities-tab.js +2 -1
- package/dist/public/views/profile/chat-sessions-tab.js +6 -3
- package/dist/public/views/profile/contacts-tab.js +2 -1
- package/dist/public/views/profile/data-wallet-tab.js +5 -4
- package/dist/public/views/profile/discover-tab.js +4 -1
- package/dist/public/views/profile/ecosystem-tab.automation.js +13 -9
- package/dist/public/views/profile/ecosystem-tab.cards.js +3 -2
- package/dist/public/views/profile/ecosystem-tab.js +10 -7
- package/dist/public/views/profile/email-tab.js +2 -1
- package/dist/public/views/profile/extensions-tab.js +7 -6
- package/dist/public/views/profile/extensions-tab.maturity.js +2 -1
- package/dist/public/views/profile/extensions-tab.prompts.js +24 -0
- package/dist/public/views/profile/federation-tab.js +2 -1
- package/dist/public/views/profile/inbox-tab/components.js +13 -10
- package/dist/public/views/profile/inbox-tab/helpers.js +15 -1
- package/dist/public/views/profile/inbox-tab/use-thread-ux.js +1 -1
- package/dist/public/views/profile/inbox-tab.js +33 -30
- package/dist/public/views/profile/inline-panels.js +5 -4
- package/dist/public/views/profile/knowledge-tab.js +15 -13
- package/dist/public/views/profile/landing-page.cards.js +14 -9
- package/dist/public/views/profile/landing-page.helpers.js +5 -2
- package/dist/public/views/profile/landing-page.js +11 -7
- package/dist/public/views/profile/landing-page.modals.js +8 -5
- package/dist/public/views/profile/living-tab.js +3 -2
- package/dist/public/views/profile/mcp-tab.js +4 -2
- package/dist/public/views/profile/memory-tab/browse-view.js +3 -2
- package/dist/public/views/profile/memory-tab/components.js +4 -3
- package/dist/public/views/profile/memory-tab/entries-view.js +3 -2
- package/dist/public/views/profile/memory-tab.js +18 -16
- package/dist/public/views/profile/nodes-tab.js +2 -1
- package/dist/public/views/profile/notebook-card.js +4 -3
- package/dist/public/views/profile/notebook-tab.js +7 -5
- package/dist/public/views/profile/notifications-tab.js +9 -5
- package/dist/public/views/profile/offers-tab.js +5 -4
- package/dist/public/views/profile/openrouter-settings.js +5 -4
- package/dist/public/views/profile/organisms/activity-panel.js +2 -1
- package/dist/public/views/profile/organisms/agents.js +2 -1
- package/dist/public/views/profile/organisms/document.js +13 -12
- package/dist/public/views/profile/organisms/helpers.js +2 -1
- package/dist/public/views/profile/organisms/home.js +7 -6
- package/dist/public/views/profile/organisms/invite-panel.js +1 -1
- package/dist/public/views/profile/organisms/members.js +7 -6
- package/dist/public/views/profile/organisms/mindmap.js +1 -1
- package/dist/public/views/profile/organisms/panels.js +4 -3
- package/dist/public/views/profile/organisms/participants-panel.js +11 -10
- package/dist/public/views/profile/organisms/readme-panel.js +1 -0
- package/dist/public/views/profile/organisms/sources-panel.js +2 -1
- package/dist/public/views/profile/organisms/workspace/doc-space.js +2 -1
- package/dist/public/views/profile/organisms/workspace/model.js +1 -0
- package/dist/public/views/profile/organisms/workspace-apps.js +4 -2
- package/dist/public/views/profile/organisms/workspace-comments.js +3 -2
- package/dist/public/views/profile/organisms/workspace-list.js +5 -4
- package/dist/public/views/profile/organisms/workspace.js +19 -16
- package/dist/public/views/profile/organisms-tab.js +20 -12
- package/dist/public/views/profile/packages-tab.js +6 -4
- package/dist/public/views/profile/portfolio-tab.js +1 -1
- package/dist/public/views/profile/scheduler-calendar.js +2 -1
- package/dist/public/views/profile/scheduler-tab.js +2 -1
- package/dist/public/views/profile/security-tab.js +2 -1
- package/dist/public/views/profile/services-tab.js +4 -3
- package/dist/public/views/profile/wallet-tab.js +90 -84
- package/dist/public/views/profile/work-tab.js +3 -2
- package/dist/public/views/profile/workflows-form.js +2 -1
- package/dist/public/views/profile/workflows-tab.js +3 -2
- package/dist/public/views/public-workspace-viewer.js +7 -4
- package/dist/scripts/build-sdk-libs.d.ts.map +1 -1
- package/dist/scripts/build-sdk-libs.js +4 -0
- package/dist/scripts/build-sdk-libs.js.map +1 -1
- package/dist/scripts/check-silent-catch.d.ts +2 -0
- package/dist/scripts/check-silent-catch.d.ts.map +1 -0
- package/dist/scripts/check-silent-catch.js +159 -0
- package/dist/scripts/check-silent-catch.js.map +1 -0
- package/dist/src/auth/jwt.d.ts +2 -0
- package/dist/src/auth/jwt.d.ts.map +1 -1
- package/dist/src/auth/jwt.js +15 -3
- package/dist/src/auth/jwt.js.map +1 -1
- package/dist/src/auth/keypair.d.ts.map +1 -1
- package/dist/src/auth/keypair.js +3 -0
- package/dist/src/auth/keypair.js.map +1 -1
- package/dist/src/auth/middleware.d.ts +2 -0
- package/dist/src/auth/middleware.d.ts.map +1 -1
- package/dist/src/auth/middleware.js +33 -14
- package/dist/src/auth/middleware.js.map +1 -1
- package/dist/src/auth/node-keys.d.ts.map +1 -1
- package/dist/src/auth/node-keys.js +59 -16
- package/dist/src/auth/node-keys.js.map +1 -1
- package/dist/src/cli/config-import.d.ts.map +1 -1
- package/dist/src/cli/config-import.js +3 -1
- package/dist/src/cli/config-import.js.map +1 -1
- package/dist/src/cli/connect/auth.d.ts.map +1 -1
- package/dist/src/cli/connect/auth.js +1 -0
- package/dist/src/cli/connect/auth.js.map +1 -1
- package/dist/src/cli/connect/config.d.ts.map +1 -1
- package/dist/src/cli/connect/config.js +3 -1
- package/dist/src/cli/connect/config.js.map +1 -1
- package/dist/src/cli/connect/keychain.d.ts.map +1 -1
- package/dist/src/cli/connect/keychain.js +6 -2
- package/dist/src/cli/connect/keychain.js.map +1 -1
- package/dist/src/cli/connect/mcp/local-server.d.ts.map +1 -1
- package/dist/src/cli/connect/mcp/local-server.js +9 -2
- package/dist/src/cli/connect/mcp/local-server.js.map +1 -1
- package/dist/src/cli/connect/mcp/tools/workspaces.d.ts.map +1 -1
- package/dist/src/cli/connect/mcp/tools/workspaces.js +2 -0
- package/dist/src/cli/connect/mcp/tools/workspaces.js.map +1 -1
- package/dist/src/cli/connect/task-runner.d.ts.map +1 -1
- package/dist/src/cli/connect/task-runner.js +11 -4
- package/dist/src/cli/connect/task-runner.js.map +1 -1
- package/dist/src/cli/connect/tool-call-helpers.d.ts.map +1 -1
- package/dist/src/cli/connect/tool-call-helpers.js +1 -0
- package/dist/src/cli/connect/tool-call-helpers.js.map +1 -1
- package/dist/src/cli/connect/tunnel-client.d.ts.map +1 -1
- package/dist/src/cli/connect/tunnel-client.js +26 -8
- package/dist/src/cli/connect/tunnel-client.js.map +1 -1
- package/dist/src/cli/federation-join.d.ts.map +1 -1
- package/dist/src/cli/federation-join.js +7 -3
- package/dist/src/cli/federation-join.js.map +1 -1
- package/dist/src/cli/init-wizard/presets.d.ts.map +1 -1
- package/dist/src/cli/init-wizard/presets.js +21 -0
- package/dist/src/cli/init-wizard/presets.js.map +1 -1
- package/dist/src/cli/init-wizard/steps-advanced.d.ts.map +1 -1
- package/dist/src/cli/init-wizard/steps-advanced.js +2 -0
- package/dist/src/cli/init-wizard/steps-advanced.js.map +1 -1
- package/dist/src/cli/init-wizard/steps-operator.d.ts.map +1 -1
- package/dist/src/cli/init-wizard/steps-operator.js +10 -0
- package/dist/src/cli/init-wizard/steps-operator.js.map +1 -1
- package/dist/src/commerce/invoice-handler.d.ts +5 -0
- package/dist/src/commerce/invoice-handler.d.ts.map +1 -0
- package/dist/src/commerce/invoice-handler.js +41 -0
- package/dist/src/commerce/invoice-handler.js.map +1 -0
- package/dist/src/commerce/payable-book.d.ts +31 -0
- package/dist/src/commerce/payable-book.d.ts.map +1 -0
- package/dist/src/commerce/payable-book.js +27 -0
- package/dist/src/commerce/payable-book.js.map +1 -0
- package/dist/src/commerce/payment-handlers.d.ts.map +1 -1
- package/dist/src/commerce/payment-handlers.js +8 -4
- package/dist/src/commerce/payment-handlers.js.map +1 -1
- package/dist/src/commerce/sellable-resolvers.d.ts +6 -6
- package/dist/src/commerce/sellable-resolvers.d.ts.map +1 -1
- package/dist/src/commerce/sellable-resolvers.js +17 -4
- package/dist/src/commerce/sellable-resolvers.js.map +1 -1
- package/dist/src/commerce/session-service.js +2 -2
- package/dist/src/commerce/session-service.js.map +1 -1
- package/dist/src/commerce/stripe-handler.d.ts +33 -0
- package/dist/src/commerce/stripe-handler.d.ts.map +1 -0
- package/dist/src/commerce/stripe-handler.js +108 -0
- package/dist/src/commerce/stripe-handler.js.map +1 -0
- package/dist/src/commerce/types.d.ts +10 -12
- package/dist/src/commerce/types.d.ts.map +1 -1
- package/dist/src/commerce/x402-facilitator.d.ts.map +1 -1
- package/dist/src/commerce/x402-facilitator.js +1 -0
- package/dist/src/commerce/x402-facilitator.js.map +1 -1
- package/dist/src/config-types.d.ts +66 -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 +62 -1
- package/dist/src/config.js.map +1 -1
- package/dist/src/data/library-packs/sdk.d.ts +4 -0
- package/dist/src/data/library-packs/sdk.d.ts.map +1 -1
- package/dist/src/data/library-packs/sdk.js +46 -0
- package/dist/src/data/library-packs/sdk.js.map +1 -1
- package/dist/src/data/library-packs/vendored.d.ts.map +1 -1
- package/dist/src/data/library-packs/vendored.js +88 -0
- package/dist/src/data/library-packs/vendored.js.map +1 -1
- package/dist/src/generated/api-types.d.ts +472 -26
- package/dist/src/generated/api-types.d.ts.map +1 -1
- package/dist/src/index-connect.d.ts.map +1 -1
- package/dist/src/index-connect.js +4 -1
- package/dist/src/index-connect.js.map +1 -1
- package/dist/src/index-start.d.ts.map +1 -1
- package/dist/src/index-start.js +10 -6
- package/dist/src/index-start.js.map +1 -1
- package/dist/src/mcp/app-template-proposals.d.ts.map +1 -1
- package/dist/src/mcp/app-template-proposals.js +2 -1
- package/dist/src/mcp/app-template-proposals.js.map +1 -1
- package/dist/src/mcp/apps.d.ts.map +1 -1
- package/dist/src/mcp/apps.js +4 -3
- package/dist/src/mcp/apps.js.map +1 -1
- package/dist/src/mcp/capabilities.d.ts.map +1 -1
- package/dist/src/mcp/capabilities.js +3 -2
- package/dist/src/mcp/capabilities.js.map +1 -1
- package/dist/src/mcp/catalog/scopes.d.ts +0 -1
- package/dist/src/mcp/catalog/scopes.d.ts.map +1 -1
- package/dist/src/mcp/catalog/scopes.js +2 -11
- package/dist/src/mcp/catalog/scopes.js.map +1 -1
- package/dist/src/mcp/catalog/surfaces.d.ts +1 -7
- package/dist/src/mcp/catalog/surfaces.d.ts.map +1 -1
- package/dist/src/mcp/catalog/surfaces.js +10 -16
- 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 +35 -3
- package/dist/src/mcp/commerce.js.map +1 -1
- package/dist/src/mcp/core.d.ts.map +1 -1
- package/dist/src/mcp/core.js +3 -2
- package/dist/src/mcp/core.js.map +1 -1
- package/dist/src/mcp/exchange-run.d.ts +28 -0
- package/dist/src/mcp/exchange-run.d.ts.map +1 -1
- package/dist/src/mcp/exchange-run.js +58 -37
- package/dist/src/mcp/exchange-run.js.map +1 -1
- package/dist/src/mcp/exchange.d.ts.map +1 -1
- package/dist/src/mcp/exchange.js +9 -7
- package/dist/src/mcp/exchange.js.map +1 -1
- package/dist/src/mcp/extensions.d.ts.map +1 -1
- package/dist/src/mcp/extensions.js +60 -106
- package/dist/src/mcp/extensions.js.map +1 -1
- package/dist/src/mcp/index.d.ts.map +1 -1
- package/dist/src/mcp/index.js +1 -5
- package/dist/src/mcp/index.js.map +1 -1
- package/dist/src/mcp/knowledge.d.ts.map +1 -1
- package/dist/src/mcp/knowledge.js +1 -0
- package/dist/src/mcp/knowledge.js.map +1 -1
- package/dist/src/mcp/oauth.d.ts +3 -0
- package/dist/src/mcp/oauth.d.ts.map +1 -1
- package/dist/src/mcp/oauth.js +13 -8
- package/dist/src/mcp/oauth.js.map +1 -1
- package/dist/src/mcp/workspaces.d.ts.map +1 -1
- package/dist/src/mcp/workspaces.js +7 -4
- package/dist/src/mcp/workspaces.js.map +1 -1
- package/dist/src/middleware/cors.d.ts.map +1 -1
- package/dist/src/middleware/cors.js +3 -1
- package/dist/src/middleware/cors.js.map +1 -1
- package/dist/src/middleware/subdomain.d.ts +4 -0
- package/dist/src/middleware/subdomain.d.ts.map +1 -1
- package/dist/src/middleware/subdomain.js +23 -2
- package/dist/src/middleware/subdomain.js.map +1 -1
- package/dist/src/models/app-tool-schemas.d.ts +35 -0
- package/dist/src/models/app-tool-schemas.d.ts.map +1 -1
- package/dist/src/models/app-tool-schemas.js +44 -0
- package/dist/src/models/app-tool-schemas.js.map +1 -1
- package/dist/src/routes/admin-config.d.ts.map +1 -1
- package/dist/src/routes/admin-config.js +4 -1
- package/dist/src/routes/admin-config.js.map +1 -1
- package/dist/src/routes/admin-extensions.d.ts.map +1 -1
- package/dist/src/routes/admin-extensions.js +2 -1
- package/dist/src/routes/admin-extensions.js.map +1 -1
- package/dist/src/routes/admin-monitoring.js +14 -5
- package/dist/src/routes/admin-monitoring.js.map +1 -1
- package/dist/src/routes/admin-security.d.ts.map +1 -1
- package/dist/src/routes/admin-security.js +4 -1
- package/dist/src/routes/admin-security.js.map +1 -1
- package/dist/src/routes/admin.d.ts.map +1 -1
- package/dist/src/routes/admin.js +6 -4
- package/dist/src/routes/admin.js.map +1 -1
- package/dist/src/routes/agent-activity.d.ts.map +1 -1
- package/dist/src/routes/agent-activity.js +4 -1
- package/dist/src/routes/agent-activity.js.map +1 -1
- package/dist/src/routes/agent-directives.d.ts +3 -10
- package/dist/src/routes/agent-directives.d.ts.map +1 -1
- package/dist/src/routes/agent-directives.js +7 -12
- package/dist/src/routes/agent-directives.js.map +1 -1
- package/dist/src/routes/agent-integration.d.ts.map +1 -1
- package/dist/src/routes/agent-integration.js +3 -1
- package/dist/src/routes/agent-integration.js.map +1 -1
- package/dist/src/routes/agent-messages.d.ts.map +1 -1
- package/dist/src/routes/agent-messages.js +5 -2
- package/dist/src/routes/agent-messages.js.map +1 -1
- package/dist/src/routes/agent-onboarding.d.ts.map +1 -1
- package/dist/src/routes/agent-onboarding.js +19 -6
- package/dist/src/routes/agent-onboarding.js.map +1 -1
- package/dist/src/routes/agent-skills-discovery.d.ts.map +1 -1
- package/dist/src/routes/agent-skills-discovery.js +2 -1
- package/dist/src/routes/agent-skills-discovery.js.map +1 -1
- package/dist/src/routes/agent-tasks/completion.js +1 -1
- package/dist/src/routes/agent-tasks/completion.js.map +1 -1
- package/dist/src/routes/agent-tasks/create-read.js +3 -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 +28 -9
- package/dist/src/routes/agent-tasks/lifecycle.js.map +1 -1
- package/dist/src/routes/agents/management.d.ts.map +1 -1
- package/dist/src/routes/agents/management.js +4 -1
- package/dist/src/routes/agents/management.js.map +1 -1
- 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/agents/profile-metadata.d.ts.map +1 -1
- package/dist/src/routes/agents/profile-metadata.js +2 -1
- package/dist/src/routes/agents/profile-metadata.js.map +1 -1
- package/dist/src/routes/app-grants.d.ts +7 -0
- package/dist/src/routes/app-grants.d.ts.map +1 -1
- package/dist/src/routes/app-grants.js +69 -4
- package/dist/src/routes/app-grants.js.map +1 -1
- package/dist/src/routes/appdev-overview.d.ts.map +1 -1
- package/dist/src/routes/appdev-overview.js +2 -1
- package/dist/src/routes/appdev-overview.js.map +1 -1
- package/dist/src/routes/apps/catalogue-admin.d.ts.map +1 -1
- package/dist/src/routes/apps/catalogue-admin.js +2 -1
- package/dist/src/routes/apps/catalogue-admin.js.map +1 -1
- package/dist/src/routes/apps/drafts.d.ts.map +1 -1
- package/dist/src/routes/apps/drafts.js +2 -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 +6 -3
- package/dist/src/routes/apps/fork-manage.js.map +1 -1
- package/dist/src/routes/apps/helpers.d.ts.map +1 -1
- package/dist/src/routes/apps/helpers.js +5 -1
- package/dist/src/routes/apps/helpers.js.map +1 -1
- package/dist/src/routes/apps/publish.d.ts.map +1 -1
- package/dist/src/routes/apps/publish.js +8 -3
- package/dist/src/routes/apps/publish.js.map +1 -1
- package/dist/src/routes/apps/read.d.ts.map +1 -1
- package/dist/src/routes/apps/read.js +2 -1
- package/dist/src/routes/apps/read.js.map +1 -1
- package/dist/src/routes/auth.d.ts.map +1 -1
- package/dist/src/routes/auth.js +2 -1
- package/dist/src/routes/auth.js.map +1 -1
- package/dist/src/routes/boards.js +1 -1
- package/dist/src/routes/boards.js.map +1 -1
- package/dist/src/routes/bootstrap.d.ts.map +1 -1
- package/dist/src/routes/bootstrap.js +8 -3
- package/dist/src/routes/bootstrap.js.map +1 -1
- package/dist/src/routes/capabilities.d.ts.map +1 -1
- package/dist/src/routes/capabilities.js +4 -3
- package/dist/src/routes/capabilities.js.map +1 -1
- package/dist/src/routes/commerce-acp.js +1 -1
- package/dist/src/routes/commerce-acp.js.map +1 -1
- package/dist/src/routes/commerce-ucp.d.ts +2 -3
- package/dist/src/routes/commerce-ucp.d.ts.map +1 -1
- package/dist/src/routes/commerce-ucp.js +6 -12
- package/dist/src/routes/commerce-ucp.js.map +1 -1
- package/dist/src/routes/commerce.d.ts +7 -1
- package/dist/src/routes/commerce.d.ts.map +1 -1
- package/dist/src/routes/commerce.js +65 -15
- package/dist/src/routes/commerce.js.map +1 -1
- package/dist/src/routes/csm.d.ts.map +1 -1
- package/dist/src/routes/csm.js +3 -1
- package/dist/src/routes/csm.js.map +1 -1
- package/dist/src/routes/ecosystem-apps.d.ts.map +1 -1
- package/dist/src/routes/ecosystem-apps.js +7 -6
- package/dist/src/routes/ecosystem-apps.js.map +1 -1
- package/dist/src/routes/exchange-market.d.ts.map +1 -1
- package/dist/src/routes/exchange-market.js +10 -6
- package/dist/src/routes/exchange-market.js.map +1 -1
- package/dist/src/routes/exchange.d.ts +10 -1
- package/dist/src/routes/exchange.d.ts.map +1 -1
- package/dist/src/routes/exchange.js +344 -9
- package/dist/src/routes/exchange.js.map +1 -1
- package/dist/src/routes/extensions/actions.d.ts +2 -0
- package/dist/src/routes/extensions/actions.d.ts.map +1 -1
- package/dist/src/routes/extensions/actions.js +47 -8
- package/dist/src/routes/extensions/actions.js.map +1 -1
- package/dist/src/routes/extensions/entitlement-gate.d.ts +44 -7
- package/dist/src/routes/extensions/entitlement-gate.d.ts.map +1 -1
- package/dist/src/routes/extensions/entitlement-gate.js +21 -142
- package/dist/src/routes/extensions/entitlement-gate.js.map +1 -1
- package/dist/src/routes/extensions/internal-pass.d.ts +23 -0
- package/dist/src/routes/extensions/internal-pass.d.ts.map +1 -0
- package/dist/src/routes/extensions/internal-pass.js +70 -0
- package/dist/src/routes/extensions/internal-pass.js.map +1 -0
- package/dist/src/routes/extensions/manifest.d.ts +4 -0
- package/dist/src/routes/extensions/manifest.d.ts.map +1 -1
- package/dist/src/routes/extensions/manifest.js +68 -4
- package/dist/src/routes/extensions/manifest.js.map +1 -1
- package/dist/src/routes/extensions/metered-response.d.ts +37 -0
- package/dist/src/routes/extensions/metered-response.d.ts.map +1 -0
- package/dist/src/routes/extensions/metered-response.js +60 -0
- package/dist/src/routes/extensions/metered-response.js.map +1 -0
- package/dist/src/routes/extensions/pacing.d.ts +31 -0
- package/dist/src/routes/extensions/pacing.d.ts.map +1 -1
- package/dist/src/routes/extensions/pacing.js +5 -33
- package/dist/src/routes/extensions/pacing.js.map +1 -1
- package/dist/src/routes/extensions/paywall.d.ts +16 -0
- package/dist/src/routes/extensions/paywall.d.ts.map +1 -1
- package/dist/src/routes/extensions/paywall.js +157 -8
- package/dist/src/routes/extensions/paywall.js.map +1 -1
- package/dist/src/routes/extensions/priced-binding.d.ts +50 -0
- package/dist/src/routes/extensions/priced-binding.d.ts.map +1 -0
- package/dist/src/routes/extensions/priced-binding.js +46 -0
- package/dist/src/routes/extensions/priced-binding.js.map +1 -0
- package/dist/src/routes/federation-genesis.d.ts.map +1 -1
- package/dist/src/routes/federation-genesis.js +14 -5
- package/dist/src/routes/federation-genesis.js.map +1 -1
- package/dist/src/routes/federation-peer/introduce.d.ts.map +1 -1
- package/dist/src/routes/federation-peer/introduce.js +3 -1
- package/dist/src/routes/federation-peer/introduce.js.map +1 -1
- package/dist/src/routes/federation-peer/lifecycle.d.ts.map +1 -1
- package/dist/src/routes/federation-peer/lifecycle.js +3 -2
- package/dist/src/routes/federation-peer/lifecycle.js.map +1 -1
- package/dist/src/routes/federation-peer/peers.d.ts.map +1 -1
- package/dist/src/routes/federation-peer/peers.js +5 -3
- package/dist/src/routes/federation-peer/peers.js.map +1 -1
- package/dist/src/routes/federation-peer/policy-book.d.ts.map +1 -1
- package/dist/src/routes/federation-peer/policy-book.js +2 -1
- package/dist/src/routes/federation-peer/policy-book.js.map +1 -1
- package/dist/src/routes/federation-peer/promotion.d.ts.map +1 -1
- package/dist/src/routes/federation-peer/promotion.js +4 -1
- package/dist/src/routes/federation-peer/promotion.js.map +1 -1
- package/dist/src/routes/federation-settlements.js +2 -2
- package/dist/src/routes/federation-settlements.js.map +1 -1
- package/dist/src/routes/federation-sync/catalogue-trust.js +5 -3
- package/dist/src/routes/federation-sync/catalogue-trust.js.map +1 -1
- package/dist/src/routes/federation-sync/messaging.js +5 -3
- package/dist/src/routes/federation-sync/messaging.js.map +1 -1
- package/dist/src/routes/federation-sync/routing.d.ts.map +1 -1
- package/dist/src/routes/federation-sync/routing.js +7 -5
- package/dist/src/routes/federation-sync/routing.js.map +1 -1
- package/dist/src/routes/flags.d.ts.map +1 -1
- package/dist/src/routes/flags.js +3 -1
- package/dist/src/routes/flags.js.map +1 -1
- package/dist/src/routes/ghii/register-login.js +1 -1
- package/dist/src/routes/ghii/register-login.js.map +1 -1
- package/dist/src/routes/instances/install.d.ts.map +1 -1
- package/dist/src/routes/instances/install.js +2 -1
- package/dist/src/routes/instances/install.js.map +1 -1
- package/dist/src/routes/instances/manage.d.ts.map +1 -1
- package/dist/src/routes/instances/manage.js +2 -1
- package/dist/src/routes/instances/manage.js.map +1 -1
- package/dist/src/routes/knowledge/packages-core.d.ts.map +1 -1
- package/dist/src/routes/knowledge/packages-core.js +2 -1
- package/dist/src/routes/knowledge/packages-core.js.map +1 -1
- package/dist/src/routes/knowledge/sharing.d.ts.map +1 -1
- package/dist/src/routes/knowledge/sharing.js +2 -1
- package/dist/src/routes/knowledge/sharing.js.map +1 -1
- package/dist/src/routes/library-packs.d.ts.map +1 -1
- package/dist/src/routes/library-packs.js +10 -3
- package/dist/src/routes/library-packs.js.map +1 -1
- package/dist/src/routes/libs.d.ts +9 -0
- package/dist/src/routes/libs.d.ts.map +1 -1
- package/dist/src/routes/libs.js +11 -2
- package/dist/src/routes/libs.js.map +1 -1
- package/dist/src/routes/matches.d.ts.map +1 -1
- package/dist/src/routes/matches.js +7 -3
- package/dist/src/routes/matches.js.map +1 -1
- package/dist/src/routes/memory/bulk.d.ts.map +1 -1
- package/dist/src/routes/memory/bulk.js +3 -1
- package/dist/src/routes/memory/bulk.js.map +1 -1
- package/dist/src/routes/memory/crud.d.ts.map +1 -1
- package/dist/src/routes/memory/crud.js +4 -2
- package/dist/src/routes/memory/crud.js.map +1 -1
- package/dist/src/routes/memory/federation.d.ts.map +1 -1
- package/dist/src/routes/memory/federation.js +5 -0
- package/dist/src/routes/memory/federation.js.map +1 -1
- package/dist/src/routes/memory/key.d.ts.map +1 -1
- package/dist/src/routes/memory/key.js +9 -4
- package/dist/src/routes/memory/key.js.map +1 -1
- package/dist/src/routes/messages.d.ts.map +1 -1
- package/dist/src/routes/messages.js +2 -1
- package/dist/src/routes/messages.js.map +1 -1
- package/dist/src/routes/msm.d.ts.map +1 -1
- package/dist/src/routes/msm.js +3 -1
- package/dist/src/routes/msm.js.map +1 -1
- package/dist/src/routes/oauth-login.d.ts.map +1 -1
- package/dist/src/routes/oauth-login.js +1 -0
- package/dist/src/routes/oauth-login.js.map +1 -1
- package/dist/src/routes/openrouter.js +2 -2
- package/dist/src/routes/openrouter.js.map +1 -1
- package/dist/src/routes/organisms/crud.d.ts.map +1 -1
- package/dist/src/routes/organisms/crud.js +3 -2
- package/dist/src/routes/organisms/crud.js.map +1 -1
- package/dist/src/routes/organisms/gates.d.ts.map +1 -1
- package/dist/src/routes/organisms/gates.js +3 -2
- package/dist/src/routes/organisms/gates.js.map +1 -1
- package/dist/src/routes/organisms/intake.d.ts.map +1 -1
- package/dist/src/routes/organisms/intake.js +13 -1
- package/dist/src/routes/organisms/intake.js.map +1 -1
- package/dist/src/routes/organisms/shared.d.ts.map +1 -1
- package/dist/src/routes/organisms/shared.js +7 -3
- package/dist/src/routes/organisms/shared.js.map +1 -1
- package/dist/src/routes/organisms/workspace-ops.d.ts.map +1 -1
- package/dist/src/routes/organisms/workspace-ops.js +6 -5
- package/dist/src/routes/organisms/workspace-ops.js.map +1 -1
- package/dist/src/routes/organisms/workspace-read.d.ts.map +1 -1
- package/dist/src/routes/organisms/workspace-read.js +4 -2
- package/dist/src/routes/organisms/workspace-read.js.map +1 -1
- package/dist/src/routes/owners.d.ts.map +1 -1
- package/dist/src/routes/owners.js +37 -12
- package/dist/src/routes/owners.js.map +1 -1
- package/dist/src/routes/personal.js +3 -1
- package/dist/src/routes/personal.js.map +1 -1
- package/dist/src/routes/portal.d.ts +6 -1
- package/dist/src/routes/portal.d.ts.map +1 -1
- package/dist/src/routes/portal.js +75 -10
- package/dist/src/routes/portal.js.map +1 -1
- package/dist/src/routes/portfolio.d.ts.map +1 -1
- package/dist/src/routes/portfolio.js +5 -1
- package/dist/src/routes/portfolio.js.map +1 -1
- package/dist/src/routes/prompts.d.ts.map +1 -1
- package/dist/src/routes/prompts.js +36 -2
- package/dist/src/routes/prompts.js.map +1 -1
- package/dist/src/routes/public-events.d.ts.map +1 -1
- package/dist/src/routes/public-events.js +4 -1
- package/dist/src/routes/public-events.js.map +1 -1
- package/dist/src/routes/public-stats.d.ts.map +1 -1
- package/dist/src/routes/public-stats.js +29 -10
- package/dist/src/routes/public-stats.js.map +1 -1
- package/dist/src/routes/schedules.d.ts +3 -0
- package/dist/src/routes/schedules.d.ts.map +1 -1
- package/dist/src/routes/schedules.js +14 -1
- package/dist/src/routes/schedules.js.map +1 -1
- package/dist/src/routes/stats.d.ts.map +1 -1
- package/dist/src/routes/stats.js +5 -1
- package/dist/src/routes/stats.js.map +1 -1
- package/dist/src/routes/storage-files.d.ts +4 -0
- package/dist/src/routes/storage-files.d.ts.map +1 -1
- package/dist/src/routes/storage-files.js +11 -0
- package/dist/src/routes/storage-files.js.map +1 -1
- package/dist/src/routes/subdomains.d.ts +9 -0
- package/dist/src/routes/subdomains.d.ts.map +1 -1
- package/dist/src/routes/subdomains.js +66 -5
- package/dist/src/routes/subdomains.js.map +1 -1
- package/dist/src/routes/unfurl.d.ts.map +1 -1
- package/dist/src/routes/unfurl.js +13 -3
- package/dist/src/routes/unfurl.js.map +1 -1
- package/dist/src/routes/upload.d.ts +11 -0
- package/dist/src/routes/upload.d.ts.map +1 -1
- package/dist/src/routes/upload.js +99 -9
- package/dist/src/routes/upload.js.map +1 -1
- package/dist/src/routes/wallet.d.ts +3 -0
- package/dist/src/routes/wallet.d.ts.map +1 -1
- package/dist/src/routes/wallet.js +6 -1
- package/dist/src/routes/wallet.js.map +1 -1
- package/dist/src/routes/webmcp.d.ts +8 -0
- package/dist/src/routes/webmcp.d.ts.map +1 -1
- package/dist/src/routes/webmcp.js +96 -49
- package/dist/src/routes/webmcp.js.map +1 -1
- package/dist/src/routes/wellknown.d.ts.map +1 -1
- package/dist/src/routes/wellknown.js +1 -0
- package/dist/src/routes/wellknown.js.map +1 -1
- package/dist/src/server-bootstrap/config-init.d.ts.map +1 -1
- package/dist/src/server-bootstrap/config-init.js +2 -0
- package/dist/src/server-bootstrap/config-init.js.map +1 -1
- package/dist/src/server-bootstrap/routes-loader.d.ts +4 -2
- package/dist/src/server-bootstrap/routes-loader.d.ts.map +1 -1
- package/dist/src/server-bootstrap/routes-loader.js +11 -22
- package/dist/src/server-bootstrap/routes-loader.js.map +1 -1
- package/dist/src/server-bootstrap/service-init.js +3 -1
- package/dist/src/server-bootstrap/service-init.js.map +1 -1
- package/dist/src/server-bootstrap/static-files.d.ts.map +1 -1
- package/dist/src/server-bootstrap/static-files.js +3 -1
- package/dist/src/server-bootstrap/static-files.js.map +1 -1
- package/dist/src/services/agent-statistics.d.ts.map +1 -1
- package/dist/src/services/agent-statistics.js +4 -1
- package/dist/src/services/agent-statistics.js.map +1 -1
- package/dist/src/services/app-agent-deploy.d.ts.map +1 -1
- package/dist/src/services/app-agent-deploy.js +4 -1
- package/dist/src/services/app-agent-deploy.js.map +1 -1
- package/dist/src/services/app-agent-surface.d.ts +78 -0
- package/dist/src/services/app-agent-surface.d.ts.map +1 -0
- package/dist/src/services/app-agent-surface.js +74 -0
- package/dist/src/services/app-agent-surface.js.map +1 -0
- package/dist/src/services/app-tool-names.d.ts +15 -0
- package/dist/src/services/app-tool-names.d.ts.map +1 -0
- package/dist/src/services/app-tool-names.js +24 -0
- package/dist/src/services/app-tool-names.js.map +1 -0
- package/dist/src/services/appdev-overview.d.ts.map +1 -1
- package/dist/src/services/appdev-overview.js +3 -2
- package/dist/src/services/appdev-overview.js.map +1 -1
- package/dist/src/services/attachment-duplication.js +3 -3
- package/dist/src/services/attachment-duplication.js.map +1 -1
- package/dist/src/services/build-extension-prompt.d.ts +40 -0
- package/dist/src/services/build-extension-prompt.d.ts.map +1 -0
- package/dist/src/services/build-extension-prompt.js +253 -0
- package/dist/src/services/build-extension-prompt.js.map +1 -0
- package/dist/src/services/cache-cleanup.d.ts.map +1 -1
- package/dist/src/services/cache-cleanup.js +2 -1
- package/dist/src/services/cache-cleanup.js.map +1 -1
- package/dist/src/services/call-timing.d.ts.map +1 -1
- package/dist/src/services/call-timing.js +2 -1
- package/dist/src/services/call-timing.js.map +1 -1
- package/dist/src/services/capability-invoke.d.ts +6 -1
- package/dist/src/services/capability-invoke.d.ts.map +1 -1
- package/dist/src/services/capability-invoke.js +14 -2
- package/dist/src/services/capability-invoke.js.map +1 -1
- package/dist/src/services/catalogue-sync.d.ts.map +1 -1
- package/dist/src/services/catalogue-sync.js +1 -0
- package/dist/src/services/catalogue-sync.js.map +1 -1
- package/dist/src/services/component-registrar.d.ts.map +1 -1
- package/dist/src/services/component-registrar.js +22 -6
- package/dist/src/services/component-registrar.js.map +1 -1
- package/dist/src/services/config-loader.d.ts.map +1 -1
- package/dist/src/services/config-loader.js +6 -1
- package/dist/src/services/config-loader.js.map +1 -1
- package/dist/src/services/config-schema.d.ts.map +1 -1
- package/dist/src/services/config-schema.js +1 -0
- package/dist/src/services/config-schema.js.map +1 -1
- package/dist/src/services/connect-tunnel.d.ts.map +1 -1
- package/dist/src/services/connect-tunnel.js +17 -6
- package/dist/src/services/connect-tunnel.js.map +1 -1
- package/dist/src/services/consent.d.ts.map +1 -1
- package/dist/src/services/consent.js +3 -1
- package/dist/src/services/consent.js.map +1 -1
- package/dist/src/services/consul-config.d.ts.map +1 -1
- package/dist/src/services/consul-config.js +7 -2
- package/dist/src/services/consul-config.js.map +1 -1
- package/dist/src/services/contacts.js +4 -2
- package/dist/src/services/contacts.js.map +1 -1
- package/dist/src/services/core-jobs.js +1 -1
- package/dist/src/services/core-jobs.js.map +1 -1
- package/dist/src/services/db/agent-messages-overview-db-service.d.ts.map +1 -1
- package/dist/src/services/db/agent-messages-overview-db-service.js +2 -1
- package/dist/src/services/db/agent-messages-overview-db-service.js.map +1 -1
- package/dist/src/services/db/agent-quality-overview-db-service.d.ts.map +1 -1
- package/dist/src/services/db/agent-quality-overview-db-service.js +2 -1
- package/dist/src/services/db/agent-quality-overview-db-service.js.map +1 -1
- package/dist/src/services/db/messages-inbox-db-service.d.ts.map +1 -1
- package/dist/src/services/db/messages-inbox-db-service.js +3 -2
- package/dist/src/services/db/messages-inbox-db-service.js.map +1 -1
- package/dist/src/services/db/messaging-db-service.d.ts.map +1 -1
- package/dist/src/services/db/messaging-db-service.js +3 -2
- package/dist/src/services/db/messaging-db-service.js.map +1 -1
- package/dist/src/services/db/wallet-tab-db-service.d.ts +3 -3
- package/dist/src/services/doc-images.d.ts.map +1 -1
- package/dist/src/services/doc-images.js +7 -4
- package/dist/src/services/doc-images.js.map +1 -1
- package/dist/src/services/ecosystem-automation-notify.d.ts.map +1 -1
- package/dist/src/services/ecosystem-automation-notify.js +10 -4
- package/dist/src/services/ecosystem-automation-notify.js.map +1 -1
- package/dist/src/services/ecosystem-automation.d.ts.map +1 -1
- package/dist/src/services/ecosystem-automation.js +3 -2
- package/dist/src/services/ecosystem-automation.js.map +1 -1
- package/dist/src/services/ecosystem-events.js +1 -1
- package/dist/src/services/ecosystem-events.js.map +1 -1
- package/dist/src/services/entitlement-merge.d.ts +50 -0
- package/dist/src/services/entitlement-merge.d.ts.map +1 -0
- package/dist/src/services/entitlement-merge.js +116 -0
- package/dist/src/services/entitlement-merge.js.map +1 -0
- package/dist/src/services/entitlement-money.d.ts.map +1 -1
- package/dist/src/services/entitlement-money.js +4 -1
- package/dist/src/services/entitlement-money.js.map +1 -1
- package/dist/src/services/exchange-market.d.ts +47 -2
- package/dist/src/services/exchange-market.d.ts.map +1 -1
- package/dist/src/services/exchange-market.js +80 -9
- package/dist/src/services/exchange-market.js.map +1 -1
- package/dist/src/services/exchange-projection.d.ts +8 -2
- package/dist/src/services/exchange-projection.d.ts.map +1 -1
- package/dist/src/services/exchange-projection.js +146 -21
- package/dist/src/services/exchange-projection.js.map +1 -1
- package/dist/src/services/exchange-proposals.d.ts.map +1 -1
- package/dist/src/services/exchange-proposals.js +4 -2
- package/dist/src/services/exchange-proposals.js.map +1 -1
- package/dist/src/services/extension-purchase.d.ts +36 -0
- package/dist/src/services/extension-purchase.d.ts.map +1 -0
- package/dist/src/services/extension-purchase.js +110 -0
- package/dist/src/services/extension-purchase.js.map +1 -0
- package/dist/src/services/extension-runtime.d.ts +23 -1
- package/dist/src/services/extension-runtime.d.ts.map +1 -1
- package/dist/src/services/extension-runtime.js +21 -4
- package/dist/src/services/extension-runtime.js.map +1 -1
- package/dist/src/services/extension-secrets.d.ts +8 -0
- package/dist/src/services/extension-secrets.d.ts.map +1 -1
- package/dist/src/services/extension-secrets.js +14 -0
- package/dist/src/services/extension-secrets.js.map +1 -1
- package/dist/src/services/federation-availability.d.ts.map +1 -1
- package/dist/src/services/federation-availability.js +1 -0
- package/dist/src/services/federation-availability.js.map +1 -1
- package/dist/src/services/federation-book.js +15 -7
- package/dist/src/services/federation-book.js.map +1 -1
- package/dist/src/services/federation-helpers.d.ts.map +1 -1
- package/dist/src/services/federation-helpers.js +1 -0
- package/dist/src/services/federation-helpers.js.map +1 -1
- package/dist/src/services/federation.d.ts.map +1 -1
- package/dist/src/services/federation.js +8 -6
- package/dist/src/services/federation.js.map +1 -1
- package/dist/src/services/gate-expiry.d.ts.map +1 -1
- package/dist/src/services/gate-expiry.js +2 -1
- package/dist/src/services/gate-expiry.js.map +1 -1
- package/dist/src/services/genesis-sync.d.ts.map +1 -1
- package/dist/src/services/genesis-sync.js +9 -4
- package/dist/src/services/genesis-sync.js.map +1 -1
- package/dist/src/services/handbooks/commerce.d.ts +13 -0
- package/dist/src/services/handbooks/commerce.d.ts.map +1 -0
- package/dist/src/services/handbooks/commerce.js +60 -0
- package/dist/src/services/handbooks/commerce.js.map +1 -0
- package/dist/src/services/handbooks/index.d.ts +1 -0
- package/dist/src/services/handbooks/index.d.ts.map +1 -1
- package/dist/src/services/handbooks/index.js +2 -2
- package/dist/src/services/handbooks/index.js.map +1 -1
- package/dist/src/services/hooks.d.ts.map +1 -1
- package/dist/src/services/hooks.js +2 -0
- package/dist/src/services/hooks.js.map +1 -1
- package/dist/src/services/invitations.d.ts.map +1 -1
- package/dist/src/services/invitations.js +2 -0
- package/dist/src/services/invitations.js.map +1 -1
- package/dist/src/services/living-author.d.ts.map +1 -1
- package/dist/src/services/living-author.js +4 -1
- package/dist/src/services/living-author.js.map +1 -1
- package/dist/src/services/living-pulse.js +18 -6
- package/dist/src/services/living-pulse.js.map +1 -1
- package/dist/src/services/mailbox-notification.d.ts.map +1 -1
- package/dist/src/services/mailbox-notification.js +1 -0
- package/dist/src/services/mailbox-notification.js.map +1 -1
- package/dist/src/services/match-notification.d.ts.map +1 -1
- package/dist/src/services/match-notification.js +2 -1
- package/dist/src/services/match-notification.js.map +1 -1
- package/dist/src/services/matching.d.ts.map +1 -1
- package/dist/src/services/matching.js +5 -2
- package/dist/src/services/matching.js.map +1 -1
- package/dist/src/services/memory-replication.d.ts.map +1 -1
- package/dist/src/services/memory-replication.js +3 -1
- package/dist/src/services/memory-replication.js.map +1 -1
- package/dist/src/services/message-broadcast.d.ts.map +1 -1
- package/dist/src/services/message-broadcast.js +2 -1
- package/dist/src/services/message-broadcast.js.map +1 -1
- package/dist/src/services/message-delivery.d.ts.map +1 -1
- package/dist/src/services/message-delivery.js +9 -4
- package/dist/src/services/message-delivery.js.map +1 -1
- package/dist/src/services/metered-access.d.ts +148 -0
- package/dist/src/services/metered-access.d.ts.map +1 -0
- package/dist/src/services/metered-access.js +128 -0
- package/dist/src/services/metered-access.js.map +1 -0
- package/dist/src/services/metered-entitlements.d.ts +140 -5
- package/dist/src/services/metered-entitlements.d.ts.map +1 -1
- package/dist/src/services/metered-entitlements.js +247 -30
- package/dist/src/services/metered-entitlements.js.map +1 -1
- package/dist/src/services/metered-settlement.d.ts +45 -0
- package/dist/src/services/metered-settlement.d.ts.map +1 -0
- package/dist/src/services/metered-settlement.js +117 -0
- package/dist/src/services/metered-settlement.js.map +1 -0
- package/dist/src/services/network-policy.d.ts.map +1 -1
- package/dist/src/services/network-policy.js +6 -2
- package/dist/src/services/network-policy.js.map +1 -1
- package/dist/src/services/notebook-classify.d.ts.map +1 -1
- package/dist/src/services/notebook-classify.js +7 -2
- package/dist/src/services/notebook-classify.js.map +1 -1
- package/dist/src/services/notebook-plan.d.ts.map +1 -1
- package/dist/src/services/notebook-plan.js +4 -1
- package/dist/src/services/notebook-plan.js.map +1 -1
- package/dist/src/services/notify.d.ts.map +1 -1
- package/dist/src/services/notify.js +6 -3
- package/dist/src/services/notify.js.map +1 -1
- package/dist/src/services/openrouter.d.ts.map +1 -1
- package/dist/src/services/openrouter.js +1 -0
- package/dist/src/services/openrouter.js.map +1 -1
- package/dist/src/services/organism-export.d.ts.map +1 -1
- package/dist/src/services/organism-export.js +4 -1
- package/dist/src/services/organism-export.js.map +1 -1
- package/dist/src/services/organism-import.d.ts.map +1 -1
- package/dist/src/services/organism-import.js +5 -1
- package/dist/src/services/organism-import.js.map +1 -1
- package/dist/src/services/perf-trace.js +3 -1
- package/dist/src/services/perf-trace.js.map +1 -1
- package/dist/src/services/personal-tunnel.js +14 -8
- package/dist/src/services/personal-tunnel.js.map +1 -1
- package/dist/src/services/presence.d.ts.map +1 -1
- package/dist/src/services/presence.js +11 -5
- package/dist/src/services/presence.js.map +1 -1
- package/dist/src/services/protected-resource.d.ts +60 -0
- package/dist/src/services/protected-resource.d.ts.map +1 -0
- package/dist/src/services/protected-resource.js +137 -0
- package/dist/src/services/protected-resource.js.map +1 -0
- package/dist/src/services/realtime-manager.d.ts.map +1 -1
- package/dist/src/services/realtime-manager.js +8 -5
- package/dist/src/services/realtime-manager.js.map +1 -1
- package/dist/src/services/safe-zip.d.ts.map +1 -1
- package/dist/src/services/safe-zip.js +4 -1
- package/dist/src/services/safe-zip.js.map +1 -1
- package/dist/src/services/scheduler-extension-job.js +2 -2
- package/dist/src/services/scheduler-extension-job.js.map +1 -1
- package/dist/src/services/scheduler.js +13 -7
- package/dist/src/services/scheduler.js.map +1 -1
- package/dist/src/services/security-incident.d.ts.map +1 -1
- package/dist/src/services/security-incident.js +7 -2
- package/dist/src/services/security-incident.js.map +1 -1
- package/dist/src/services/site-sync.d.ts.map +1 -1
- package/dist/src/services/site-sync.js +1 -0
- package/dist/src/services/site-sync.js.map +1 -1
- package/dist/src/services/site.d.ts +1 -1
- package/dist/src/services/site.d.ts.map +1 -1
- package/dist/src/services/site.js +29 -8
- package/dist/src/services/site.js.map +1 -1
- package/dist/src/services/structure-overview.d.ts.map +1 -1
- package/dist/src/services/structure-overview.js +4 -1
- package/dist/src/services/structure-overview.js.map +1 -1
- package/dist/src/services/structure-snapshot.d.ts.map +1 -1
- package/dist/src/services/structure-snapshot.js +3 -2
- package/dist/src/services/structure-snapshot.js.map +1 -1
- package/dist/src/services/sync-scheduler.js +3 -2
- package/dist/src/services/sync-scheduler.js.map +1 -1
- package/dist/src/services/tracked-response.js +1 -1
- package/dist/src/services/tracked-response.js.map +1 -1
- package/dist/src/services/trust-broadcast.d.ts.map +1 -1
- package/dist/src/services/trust-broadcast.js +1 -0
- package/dist/src/services/trust-broadcast.js.map +1 -1
- package/dist/src/services/upload-zip.d.ts +7 -0
- package/dist/src/services/upload-zip.d.ts.map +1 -1
- package/dist/src/services/upload-zip.js +19 -85
- package/dist/src/services/upload-zip.js.map +1 -1
- package/dist/src/services/web-bot-auth.d.ts.map +1 -1
- package/dist/src/services/web-bot-auth.js +1 -0
- package/dist/src/services/web-bot-auth.js.map +1 -1
- package/dist/src/services/workflow/engine-steps.d.ts.map +1 -1
- package/dist/src/services/workflow/engine-steps.js +12 -6
- package/dist/src/services/workflow/engine-steps.js.map +1 -1
- package/dist/src/services/workspace-export.d.ts.map +1 -1
- package/dist/src/services/workspace-export.js +5 -2
- package/dist/src/services/workspace-export.js.map +1 -1
- package/dist/src/services/workspace-import.d.ts.map +1 -1
- package/dist/src/services/workspace-import.js +2 -1
- package/dist/src/services/workspace-import.js.map +1 -1
- package/dist/src/services/workspace-versions.d.ts.map +1 -1
- package/dist/src/services/workspace-versions.js +0 -0
- package/dist/src/services/workspace-versions.js.map +1 -1
- package/dist/src/storage/providers/postgres-kysely/db-types.d.ts +5 -0
- package/dist/src/storage/providers/postgres-kysely/db-types.d.ts.map +1 -1
- package/dist/src/storage/providers/postgres-kysely/helpers.d.ts +11 -0
- package/dist/src/storage/providers/postgres-kysely/helpers.d.ts.map +1 -1
- package/dist/src/storage/providers/postgres-kysely/helpers.js +14 -0
- package/dist/src/storage/providers/postgres-kysely/helpers.js.map +1 -1
- package/dist/src/storage/providers/postgres-kysely/methods/app-grants.d.ts +1 -1
- 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 +6 -0
- package/dist/src/storage/providers/postgres-kysely/methods/app-grants.js.map +1 -1
- package/dist/src/storage/providers/postgres-kysely/methods/capabilities.js +3 -3
- package/dist/src/storage/providers/postgres-kysely/methods/capabilities.js.map +1 -1
- package/dist/src/storage/providers/postgres-kysely/methods/ecosystem.js +3 -3
- package/dist/src/storage/providers/postgres-kysely/methods/ecosystem.js.map +1 -1
- package/dist/src/storage/providers/postgres-kysely/methods/federation.d.ts.map +1 -1
- package/dist/src/storage/providers/postgres-kysely/methods/federation.js +12 -10
- package/dist/src/storage/providers/postgres-kysely/methods/federation.js.map +1 -1
- package/dist/src/storage/providers/postgres-kysely/methods/identity.d.ts.map +1 -1
- package/dist/src/storage/providers/postgres-kysely/methods/identity.js +26 -12
- package/dist/src/storage/providers/postgres-kysely/methods/identity.js.map +1 -1
- package/dist/src/storage/providers/postgres-kysely/methods/marketplace.js +5 -5
- package/dist/src/storage/providers/postgres-kysely/methods/marketplace.js.map +1 -1
- package/dist/src/storage/providers/postgres-kysely/methods/node-ext-escrow.d.ts +9 -0
- package/dist/src/storage/providers/postgres-kysely/methods/node-ext-escrow.d.ts.map +1 -1
- package/dist/src/storage/providers/postgres-kysely/methods/node-ext-escrow.js +31 -27
- package/dist/src/storage/providers/postgres-kysely/methods/node-ext-escrow.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 +10 -14
- package/dist/src/storage/providers/postgres-kysely/methods/organisms.js.map +1 -1
- package/dist/src/storage/providers/postgres-kysely/methods/otk.js +3 -3
- package/dist/src/storage/providers/postgres-kysely/methods/otk.js.map +1 -1
- package/dist/src/storage/providers/postgres-kysely/methods/packages.d.ts.map +1 -1
- package/dist/src/storage/providers/postgres-kysely/methods/packages.js +4 -14
- package/dist/src/storage/providers/postgres-kysely/methods/packages.js.map +1 -1
- package/dist/src/storage/providers/postgres-kysely/methods/template-listings.d.ts.map +1 -1
- package/dist/src/storage/providers/postgres-kysely/methods/template-listings.js +11 -10
- package/dist/src/storage/providers/postgres-kysely/methods/template-listings.js.map +1 -1
- package/dist/src/storage/providers/postgres-kysely/methods/wallet.d.ts.map +1 -1
- package/dist/src/storage/providers/postgres-kysely/methods/wallet.js +3 -1
- package/dist/src/storage/providers/postgres-kysely/methods/wallet.js.map +1 -1
- package/dist/src/storage/providers/postgres-kysely/migrate.d.ts.map +1 -1
- package/dist/src/storage/providers/postgres-kysely/migrate.js +3 -0
- package/dist/src/storage/providers/postgres-kysely/migrate.js.map +1 -1
- package/dist/src/storage/providers/postgres-kysely/migrations/0013_ghii_password_lockout.sql +12 -0
- package/dist/src/storage/providers/postgres-kysely/migrations/0014_transaction_initiator.sql +6 -0
- package/dist/src/storage/providers/postgres-kysely/migrations/0015_app_grant_spend_cap.sql +5 -0
- package/dist/src/storage/providers/sqlite/methods/apps.d.ts +1 -1
- package/dist/src/storage/providers/sqlite/methods/apps.d.ts.map +1 -1
- package/dist/src/storage/providers/sqlite/methods/apps.js +12 -2
- package/dist/src/storage/providers/sqlite/methods/apps.js.map +1 -1
- package/dist/src/storage/providers/sqlite/methods/community.d.ts.map +1 -1
- package/dist/src/storage/providers/sqlite/methods/community.js +6 -1
- package/dist/src/storage/providers/sqlite/methods/community.js.map +1 -1
- package/dist/src/storage/providers/sqlite/methods/identity-nodes.d.ts.map +1 -1
- package/dist/src/storage/providers/sqlite/methods/identity-nodes.js +9 -2
- package/dist/src/storage/providers/sqlite/methods/identity-nodes.js.map +1 -1
- package/dist/src/storage/providers/sqlite/methods/work.d.ts.map +1 -1
- package/dist/src/storage/providers/sqlite/methods/work.js +4 -2
- package/dist/src/storage/providers/sqlite/methods/work.js.map +1 -1
- package/dist/src/storage/providers/sqlite/repos/community.d.ts.map +1 -1
- package/dist/src/storage/providers/sqlite/repos/community.js +6 -1
- package/dist/src/storage/providers/sqlite/repos/community.js.map +1 -1
- package/dist/src/storage/providers/sqlite/repos/identity.d.ts +3 -0
- package/dist/src/storage/providers/sqlite/repos/identity.d.ts.map +1 -1
- package/dist/src/storage/providers/sqlite/repos/identity.js +13 -4
- package/dist/src/storage/providers/sqlite/repos/identity.js.map +1 -1
- package/dist/src/storage/providers/sqlite/repos/work.d.ts.map +1 -1
- package/dist/src/storage/providers/sqlite/repos/work.js +4 -2
- package/dist/src/storage/providers/sqlite/repos/work.js.map +1 -1
- package/dist/src/storage/providers/sqlite/schema-tables-1.d.ts.map +1 -1
- package/dist/src/storage/providers/sqlite/schema-tables-1.js +1 -0
- package/dist/src/storage/providers/sqlite/schema-tables-1.js.map +1 -1
- package/dist/src/storage/providers/sqlite/schema-tables-2.d.ts.map +1 -1
- package/dist/src/storage/providers/sqlite/schema-tables-2.js +2 -0
- package/dist/src/storage/providers/sqlite/schema-tables-2.js.map +1 -1
- package/dist/src/storage/providers/sqlite/schema.d.ts.map +1 -1
- package/dist/src/storage/providers/sqlite/schema.js +14 -1
- package/dist/src/storage/providers/sqlite/schema.js.map +1 -1
- package/dist/src/storage/repositories/app-grant.repository.d.ts +1 -1
- package/dist/src/storage/repositories/app-grant.repository.d.ts.map +1 -1
- package/dist/src/storage/types/auth.d.ts +9 -0
- package/dist/src/storage/types/auth.d.ts.map +1 -1
- package/dist/src/storage/types/commerce.d.ts +13 -0
- package/dist/src/storage/types/commerce.d.ts.map +1 -1
- package/dist/src/utils/app-agent-discovery.d.ts +31 -0
- package/dist/src/utils/app-agent-discovery.d.ts.map +1 -0
- package/dist/src/utils/app-agent-discovery.js +96 -0
- package/dist/src/utils/app-agent-discovery.js.map +1 -0
- package/dist/src/utils/app-protect.d.ts.map +1 -1
- package/dist/src/utils/app-protect.js +1 -0
- package/dist/src/utils/app-protect.js.map +1 -1
- package/dist/src/utils/env-validator.d.ts.map +1 -1
- package/dist/src/utils/env-validator.js +5 -1
- package/dist/src/utils/env-validator.js.map +1 -1
- package/dist/src/utils/gaii.d.ts +50 -0
- package/dist/src/utils/gaii.d.ts.map +1 -1
- package/dist/src/utils/gaii.js +66 -0
- package/dist/src/utils/gaii.js.map +1 -1
- package/dist/src/utils/url-validator.d.ts.map +1 -1
- package/dist/src/utils/url-validator.js +4 -1
- package/dist/src/utils/url-validator.js.map +1 -1
- package/dist/src/utils/version.d.ts.map +1 -1
- package/dist/src/utils/version.js +1 -0
- package/dist/src/utils/version.js.map +1 -1
- package/dist/static/sdk-libs/auth/session.js +7 -3
- package/dist/static/sdk-libs/dist/aimeat-auth.js +1 -1
- package/dist/static/sdk-libs/dist/aimeat-exchange.js +675 -0
- package/dist/static/sdk-libs/dist/aimeat-game.js +1555 -0
- package/dist/static/sdk-libs/dist/aimeat-webmcp.js +46 -0
- package/dist/static/sdk-libs/exchange/browse.js +81 -0
- package/dist/static/sdk-libs/exchange/client.js +131 -0
- package/dist/static/sdk-libs/exchange/contracts.js +228 -0
- package/dist/static/sdk-libs/exchange/demand.js +106 -0
- package/dist/static/sdk-libs/exchange/earnings.js +39 -0
- package/dist/static/sdk-libs/exchange/format.js +51 -0
- package/dist/static/sdk-libs/exchange/index.js +70 -0
- package/dist/static/sdk-libs/exchange/odps-completeness.js +177 -0
- package/dist/static/sdk-libs/exchange/sell.js +253 -0
- package/dist/static/sdk-libs/game/board.js +331 -0
- package/dist/static/sdk-libs/game/dom.js +223 -0
- package/dist/static/sdk-libs/game/i18n.js +201 -0
- package/dist/static/sdk-libs/game/index.js +72 -0
- package/dist/static/sdk-libs/game/markers.js +150 -0
- package/dist/static/sdk-libs/game/menu.js +260 -0
- package/dist/static/sdk-libs/game/overlay.js +193 -0
- package/dist/static/sdk-libs/game/progress.js +280 -0
- package/dist/static/sdk-libs/game/score.js +134 -0
- package/dist/static/sdk-libs/game/screen.js +120 -0
- package/dist/static/sdk-libs/game/units.js +55 -0
- package/dist/static/sdk-libs/webmcp/index.js +63 -0
- package/package.json +2 -1
|
@@ -0,0 +1,675 @@
|
|
|
1
|
+
// GENERATED FILE — do not edit directly. Source: src/static/sdk-libs/exchange/ (+ _core/).
|
|
2
|
+
// Rebuild: pnpm build:sdk · Served at /v1/libs/aimeat-exchange.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/_core/config.js
|
|
17
|
+
function cfg() {
|
|
18
|
+
return window.__AIMEAT_SDK_CFG__ || { nodeId: "", baseUrl: "" };
|
|
19
|
+
}
|
|
20
|
+
function resolveNodeUrl() {
|
|
21
|
+
const meta = document.querySelector('meta[name="aimeat-node"]');
|
|
22
|
+
if (meta) return (meta.getAttribute("content") || "").replace(/\/$/, "");
|
|
23
|
+
if (location.protocol === "http:" || location.protocol === "https:") return location.origin;
|
|
24
|
+
return cfg().baseUrl;
|
|
25
|
+
}
|
|
26
|
+
var NODE_URL = resolveNodeUrl();
|
|
27
|
+
var APEX_URL = cfg().baseUrl;
|
|
28
|
+
var NODE_ID = cfg().nodeId;
|
|
29
|
+
var HEARTBEAT_MS = cfg().heartbeatMs || 3e4;
|
|
30
|
+
|
|
31
|
+
// src/static/sdk-libs/_core/session.js
|
|
32
|
+
function getSession(libLabel) {
|
|
33
|
+
const auth = window.AIMEAT && window.AIMEAT.auth;
|
|
34
|
+
if (!auth) {
|
|
35
|
+
throw new Error("AIMEAT.auth is required. Include aimeat-auth.js before " + (libLabel || "this library"));
|
|
36
|
+
}
|
|
37
|
+
const s = auth.getSession();
|
|
38
|
+
if (!s) throw new Error("Not logged in. Call AIMEAT.auth.login() first.");
|
|
39
|
+
return s;
|
|
40
|
+
}
|
|
41
|
+
function authFetch(path, opts, libLabel) {
|
|
42
|
+
return getSession(libLabel).fetch(path, opts);
|
|
43
|
+
}
|
|
44
|
+
function makeSession(libLabel) {
|
|
45
|
+
return {
|
|
46
|
+
getSession: () => getSession(libLabel),
|
|
47
|
+
authFetch: (path, opts) => authFetch(path, opts, libLabel)
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// src/static/sdk-libs/exchange/client.js
|
|
52
|
+
var NODE_URL2 = APEX_URL;
|
|
53
|
+
var { authFetch: authFetch2 } = makeSession("aimeat-exchange.js");
|
|
54
|
+
function exchangeError(res, fallback) {
|
|
55
|
+
const e = (
|
|
56
|
+
/** @type {Error & { code?: string, details?: unknown }} */
|
|
57
|
+
new Error(res && res.error && res.error.message || fallback)
|
|
58
|
+
);
|
|
59
|
+
e.code = res && res.error && res.error.code;
|
|
60
|
+
e.details = res && res.error && res.error.details;
|
|
61
|
+
return e;
|
|
62
|
+
}
|
|
63
|
+
function qs(params) {
|
|
64
|
+
const parts = [];
|
|
65
|
+
for (const k of Object.keys(params || {})) {
|
|
66
|
+
const v = params[k];
|
|
67
|
+
if (v === null || v === void 0 || v === "") continue;
|
|
68
|
+
parts.push(encodeURIComponent(k) + "=" + encodeURIComponent(String(v)));
|
|
69
|
+
}
|
|
70
|
+
return parts.length ? "?" + parts.join("&") : "";
|
|
71
|
+
}
|
|
72
|
+
function hasSession() {
|
|
73
|
+
try {
|
|
74
|
+
const auth = window.AIMEAT && window.AIMEAT.auth;
|
|
75
|
+
return !!(auth && auth.getSession());
|
|
76
|
+
} catch {
|
|
77
|
+
return false;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
async function pub(path, fallback) {
|
|
81
|
+
const r = await fetch(NODE_URL2 + path);
|
|
82
|
+
const res = await r.json();
|
|
83
|
+
if (!res.ok) throw exchangeError(res, fallback);
|
|
84
|
+
return res.data;
|
|
85
|
+
}
|
|
86
|
+
async function pubText(path, fallback) {
|
|
87
|
+
const r = await fetch(NODE_URL2 + path);
|
|
88
|
+
const text = await r.text();
|
|
89
|
+
if (!r.ok) {
|
|
90
|
+
let parsed = null;
|
|
91
|
+
try {
|
|
92
|
+
parsed = JSON.parse(text);
|
|
93
|
+
} catch {
|
|
94
|
+
}
|
|
95
|
+
throw exchangeError(parsed, fallback);
|
|
96
|
+
}
|
|
97
|
+
return text;
|
|
98
|
+
}
|
|
99
|
+
async function authed(path, opts, fallback) {
|
|
100
|
+
const res = await authFetch2(path, opts);
|
|
101
|
+
if (!res.ok) throw exchangeError(res, fallback || "EXCHANGE request failed");
|
|
102
|
+
return res.data;
|
|
103
|
+
}
|
|
104
|
+
async function maybe(path, fallback) {
|
|
105
|
+
if (!hasSession()) return pub(path, fallback);
|
|
106
|
+
try {
|
|
107
|
+
return await authed(path, void 0, fallback);
|
|
108
|
+
} catch (e) {
|
|
109
|
+
if (e && (e.code === "UNAUTHORIZED" || e.code === "FORBIDDEN")) return pub(path, fallback);
|
|
110
|
+
throw e;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
function send(path, method, body, fallback) {
|
|
114
|
+
const opts = (
|
|
115
|
+
/** @type {RequestInit} */
|
|
116
|
+
{ method }
|
|
117
|
+
);
|
|
118
|
+
if (body !== void 0) opts.body = JSON.stringify(body);
|
|
119
|
+
return authed(path, opts, fallback);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// src/static/sdk-libs/exchange/browse.js
|
|
123
|
+
var enc = encodeURIComponent;
|
|
124
|
+
function info() {
|
|
125
|
+
return pub("/v1/exchange/info", "Failed to read the EXCHANGE economics");
|
|
126
|
+
}
|
|
127
|
+
function list(filter) {
|
|
128
|
+
const f = filter || {};
|
|
129
|
+
const query = qs({ ext: f.ext, action: f.action, q: f.q, stats: f.stats ? "1" : null });
|
|
130
|
+
return maybe("/v1/exchange/offerings" + query, "Failed to browse the marketplace");
|
|
131
|
+
}
|
|
132
|
+
function search(q, filter) {
|
|
133
|
+
return list({ ...filter || {}, q });
|
|
134
|
+
}
|
|
135
|
+
function get(id) {
|
|
136
|
+
return pub("/v1/exchange/offerings/" + enc(id), "No such offering");
|
|
137
|
+
}
|
|
138
|
+
function odps(id) {
|
|
139
|
+
return pub("/v1/exchange/offerings/" + enc(id) + "/odps", "No such offering");
|
|
140
|
+
}
|
|
141
|
+
function odpsYaml(id) {
|
|
142
|
+
return pubText("/v1/exchange/offerings/" + enc(id) + "/odps.yaml", "No such offering");
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
// src/static/sdk-libs/exchange/sell.js
|
|
146
|
+
var enc2 = encodeURIComponent;
|
|
147
|
+
function pick(...vals) {
|
|
148
|
+
for (const v of vals) if (v !== void 0 && v !== null) return v;
|
|
149
|
+
return void 0;
|
|
150
|
+
}
|
|
151
|
+
function compact(obj) {
|
|
152
|
+
const out = {};
|
|
153
|
+
for (const k of Object.keys(obj)) if (obj[k] !== void 0) out[k] = obj[k];
|
|
154
|
+
return out;
|
|
155
|
+
}
|
|
156
|
+
function normalizeSpec(spec) {
|
|
157
|
+
const s = (
|
|
158
|
+
/** @type {Record<string, any>} */
|
|
159
|
+
spec || {}
|
|
160
|
+
);
|
|
161
|
+
return compact({
|
|
162
|
+
kind: s.kind,
|
|
163
|
+
// ext-action: the extension + action you own.
|
|
164
|
+
ext: s.ext,
|
|
165
|
+
action: s.action,
|
|
166
|
+
// app-tool: one tool of one of your apps (the node pins its interface version on listing).
|
|
167
|
+
app_id: pick(s.appId, s.app_id),
|
|
168
|
+
tool: s.tool,
|
|
169
|
+
// agent-work: a task type one of your agents performs, settled per delivered task.
|
|
170
|
+
agent_name: pick(s.agentName, s.agent_name),
|
|
171
|
+
task_type: pick(s.taskType, s.task_type),
|
|
172
|
+
price_morsels: pick(s.priceMorsels, s.price_morsels),
|
|
173
|
+
price_money: pick(s.priceMoney, s.price_money),
|
|
174
|
+
plans: s.plans,
|
|
175
|
+
input_schema: pick(s.inputSchema, s.input_schema),
|
|
176
|
+
output_schema: pick(s.outputSchema, s.output_schema),
|
|
177
|
+
// Shared framing.
|
|
178
|
+
title: s.title,
|
|
179
|
+
description: s.description,
|
|
180
|
+
tags: s.tags,
|
|
181
|
+
usage_terms: pick(s.usageTerms, s.usage_terms),
|
|
182
|
+
provenance: s.provenance,
|
|
183
|
+
odps: s.odps
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
async function publish(spec) {
|
|
187
|
+
const d = await send("/v1/exchange/offerings", "POST", normalizeSpec(spec), "Failed to list the offering");
|
|
188
|
+
return d.offering;
|
|
189
|
+
}
|
|
190
|
+
async function update(id, patch) {
|
|
191
|
+
const detail = await get(id);
|
|
192
|
+
const o = detail.offering;
|
|
193
|
+
if (o.auto) {
|
|
194
|
+
throw exchangeError({ error: {
|
|
195
|
+
code: "SOURCE_MANAGED",
|
|
196
|
+
message: "This listing is projected from its source (" + o.ext + "/" + o.action + "). Edit the source — the app-tool manifest, the extension action or the agent offer — then call AIMEAT.exchange.reconcile(). Editing the listing here would be undone by the next reconcile."
|
|
197
|
+
} }, "This listing is managed by its source");
|
|
198
|
+
}
|
|
199
|
+
const surface = o.surface || {};
|
|
200
|
+
const base = compact({
|
|
201
|
+
kind: o.kind,
|
|
202
|
+
ext: o.kind === "ext-action" ? o.ext : void 0,
|
|
203
|
+
action: o.kind === "ext-action" ? o.action : void 0,
|
|
204
|
+
appId: surface.kind === "app-tool" ? surface.appId : void 0,
|
|
205
|
+
tool: surface.kind === "app-tool" ? surface.tool : void 0,
|
|
206
|
+
agentName: surface.kind === "agent-work" ? surface.agentName : void 0,
|
|
207
|
+
taskType: surface.kind === "agent-work" ? surface.taskType : void 0,
|
|
208
|
+
priceMorsels: o.kind === "agent-work" && o.unit === "morsels" ? o.basePrice : void 0,
|
|
209
|
+
priceMoney: o.kind === "agent-work" && o.unit === "money" ? { amount: o.basePrice, currency: o.currency } : void 0,
|
|
210
|
+
inputSchema: o.taskSpec ? o.taskSpec.inputSchema : void 0,
|
|
211
|
+
outputSchema: o.taskSpec ? o.taskSpec.outputSchema : void 0,
|
|
212
|
+
title: o.title,
|
|
213
|
+
description: o.description,
|
|
214
|
+
tags: o.tags,
|
|
215
|
+
usageTerms: o.usageTerms,
|
|
216
|
+
provenance: o.provenance,
|
|
217
|
+
odps: o.odps
|
|
218
|
+
});
|
|
219
|
+
const next = await publish({ ...base, ...patch || {} });
|
|
220
|
+
await delist(id).catch(() => {
|
|
221
|
+
});
|
|
222
|
+
return next;
|
|
223
|
+
}
|
|
224
|
+
function delist(id, opts) {
|
|
225
|
+
const query = qs({ force: opts && opts.force ? "1" : null });
|
|
226
|
+
return authed("/v1/exchange/offerings/" + enc2(id) + query, { method: "DELETE" }, "Failed to delist the offering");
|
|
227
|
+
}
|
|
228
|
+
async function stats(id) {
|
|
229
|
+
const d = await pub("/v1/exchange/offerings/" + enc2(id), "No such offering");
|
|
230
|
+
return d.stats;
|
|
231
|
+
}
|
|
232
|
+
function consumers(id) {
|
|
233
|
+
return authed("/v1/exchange/offerings/" + enc2(id) + "/consumers", void 0, "No such offering of yours");
|
|
234
|
+
}
|
|
235
|
+
function reconcile(opts) {
|
|
236
|
+
const o = opts || {};
|
|
237
|
+
return send("/v1/exchange/reconcile", "POST", compact({
|
|
238
|
+
dry_run: o.dryRun,
|
|
239
|
+
migrate: o.migrate,
|
|
240
|
+
app_id: o.appId,
|
|
241
|
+
ext: o.ext,
|
|
242
|
+
agent: o.agent
|
|
243
|
+
}), "Failed to reconcile your listings");
|
|
244
|
+
}
|
|
245
|
+
function providerHistory() {
|
|
246
|
+
return authed("/v1/exchange/provider/history", void 0, "Failed to read your provider history");
|
|
247
|
+
}
|
|
248
|
+
function grants(opts) {
|
|
249
|
+
return authed("/v1/exchange/grants" + qs({ app_id: opts && opts.appId }), void 0, "Failed to read your grants");
|
|
250
|
+
}
|
|
251
|
+
async function grant(spec) {
|
|
252
|
+
const s = (
|
|
253
|
+
/** @type {Record<string, any>} */
|
|
254
|
+
spec || {}
|
|
255
|
+
);
|
|
256
|
+
const d = await send("/v1/exchange/grants", "POST", compact({
|
|
257
|
+
consumer: s.consumer,
|
|
258
|
+
offering_id: pick(s.offeringId, s.offering_id),
|
|
259
|
+
cap_carried_units: pick(s.capCarriedUnits, s.cap_carried_units),
|
|
260
|
+
note: s.note,
|
|
261
|
+
app_id: pick(s.appId, s.app_id),
|
|
262
|
+
reason: s.reason ? { app_id: pick(s.reason.appId, s.reason.app_id), role: s.reason.role } : void 0
|
|
263
|
+
}), "Failed to issue the grant");
|
|
264
|
+
return d.grant;
|
|
265
|
+
}
|
|
266
|
+
function revokeGrant(spec) {
|
|
267
|
+
const s = (
|
|
268
|
+
/** @type {Record<string, any>} */
|
|
269
|
+
spec || {}
|
|
270
|
+
);
|
|
271
|
+
return send("/v1/exchange/grants/revoke", "POST", compact({
|
|
272
|
+
consumer: s.consumer,
|
|
273
|
+
offering_id: pick(s.offeringId, s.offering_id),
|
|
274
|
+
app_id: pick(s.appId, s.app_id),
|
|
275
|
+
role: s.role
|
|
276
|
+
}), "Failed to withdraw the grant");
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
// src/static/sdk-libs/exchange/contracts.js
|
|
280
|
+
var enc3 = encodeURIComponent;
|
|
281
|
+
function compact2(obj) {
|
|
282
|
+
const out = {};
|
|
283
|
+
for (const k of Object.keys(obj)) if (obj[k] !== void 0) out[k] = obj[k];
|
|
284
|
+
return out;
|
|
285
|
+
}
|
|
286
|
+
function pick2(...vals) {
|
|
287
|
+
for (const v of vals) if (v !== void 0 && v !== null) return v;
|
|
288
|
+
return void 0;
|
|
289
|
+
}
|
|
290
|
+
function contracts() {
|
|
291
|
+
return authed("/v1/exchange/entitlements", void 0, "Failed to read your contracts");
|
|
292
|
+
}
|
|
293
|
+
async function accept(offeringId, opts) {
|
|
294
|
+
const o = (
|
|
295
|
+
/** @type {Record<string, any>} */
|
|
296
|
+
opts || {}
|
|
297
|
+
);
|
|
298
|
+
const d = await send("/v1/exchange/entitlements", "POST", compact2({
|
|
299
|
+
offering_id: offeringId,
|
|
300
|
+
cap_units: pick2(o.capUnits, o.cap_units),
|
|
301
|
+
app_id: pick2(o.appId, o.app_id),
|
|
302
|
+
plan_id: pick2(o.planId, o.plan_id),
|
|
303
|
+
contract_ref: pick2(o.contractRef, o.contract_ref),
|
|
304
|
+
escrow_party: pick2(o.escrowParty, o.escrow_party)
|
|
305
|
+
}), "Failed to accept the contract");
|
|
306
|
+
return d.entitlement;
|
|
307
|
+
}
|
|
308
|
+
async function coordinateOf(contract) {
|
|
309
|
+
if (typeof contract === "string") {
|
|
310
|
+
const d = await get(contract);
|
|
311
|
+
return { ext: d.offering.ext, action: d.offering.action };
|
|
312
|
+
}
|
|
313
|
+
const c = contract || {};
|
|
314
|
+
const ext = c.ext || c.offering && c.offering.ext;
|
|
315
|
+
const action = c.action || c.offering && c.offering.action;
|
|
316
|
+
if (!ext || !action) {
|
|
317
|
+
throw exchangeError(
|
|
318
|
+
{ error: { code: "BAD_REQUEST", message: "Name the contract by its capability coordinate ({ ext, action }), a contract row from contracts(), or an offering id." } },
|
|
319
|
+
"Unresolvable contract reference"
|
|
320
|
+
);
|
|
321
|
+
}
|
|
322
|
+
return { ext, action };
|
|
323
|
+
}
|
|
324
|
+
async function off(contract, opts) {
|
|
325
|
+
const { ext, action } = await coordinateOf(contract);
|
|
326
|
+
return send("/v1/exchange/entitlements/off", "POST", {
|
|
327
|
+
ext,
|
|
328
|
+
action,
|
|
329
|
+
mode: (opts && opts.mode) === "revoke" ? "revoke" : "pause"
|
|
330
|
+
}, "Failed to switch the contract off");
|
|
331
|
+
}
|
|
332
|
+
function history() {
|
|
333
|
+
return authed("/v1/exchange/entitlements/history", void 0, "Failed to read your contract history");
|
|
334
|
+
}
|
|
335
|
+
async function spend() {
|
|
336
|
+
const { entitlements } = await contracts();
|
|
337
|
+
const byUnit = (
|
|
338
|
+
/** @type {Record<string, { spentUnits: number, calls: number, contracts: number }>} */
|
|
339
|
+
{}
|
|
340
|
+
);
|
|
341
|
+
const providers = (
|
|
342
|
+
/** @type {Record<string, any>} */
|
|
343
|
+
{}
|
|
344
|
+
);
|
|
345
|
+
let totalCalls = 0;
|
|
346
|
+
for (const e of entitlements || []) {
|
|
347
|
+
const rail = e.unit === "money" ? e.currency || "EUR" : "morsels";
|
|
348
|
+
const u = byUnit[rail] || (byUnit[rail] = { spentUnits: 0, calls: 0, contracts: 0 });
|
|
349
|
+
u.spentUnits += e.budget ? e.budget.spent_units : 0;
|
|
350
|
+
u.calls += e.budget ? e.budget.calls : 0;
|
|
351
|
+
u.contracts += 1;
|
|
352
|
+
totalCalls += e.budget ? e.budget.calls : 0;
|
|
353
|
+
const key = e.provider + "|" + rail;
|
|
354
|
+
const p = providers[key] || (providers[key] = {
|
|
355
|
+
provider: e.provider,
|
|
356
|
+
unit: rail,
|
|
357
|
+
spentUnits: 0,
|
|
358
|
+
calls: 0,
|
|
359
|
+
contracts: 0,
|
|
360
|
+
capabilities: []
|
|
361
|
+
});
|
|
362
|
+
p.spentUnits += e.budget ? e.budget.spent_units : 0;
|
|
363
|
+
p.calls += e.budget ? e.budget.calls : 0;
|
|
364
|
+
p.contracts += 1;
|
|
365
|
+
if (p.capabilities.indexOf(e.capability) === -1) p.capabilities.push(e.capability);
|
|
366
|
+
}
|
|
367
|
+
const byProvider = Object.keys(providers).map((k) => providers[k]).sort((a, b) => b.spentUnits - a.spentUnits);
|
|
368
|
+
return { byProvider, byUnit, totalCalls, totalContracts: (entitlements || []).length };
|
|
369
|
+
}
|
|
370
|
+
function proposals() {
|
|
371
|
+
return authed("/v1/exchange/proposals", void 0, "Failed to read proposals");
|
|
372
|
+
}
|
|
373
|
+
async function propose(spec) {
|
|
374
|
+
const s = (
|
|
375
|
+
/** @type {Record<string, any>} */
|
|
376
|
+
spec || {}
|
|
377
|
+
);
|
|
378
|
+
const { ext, action } = await coordinateOf(s.contract || { ext: s.ext, action: s.action });
|
|
379
|
+
const d = await send("/v1/exchange/proposals", "POST", compact2({
|
|
380
|
+
ext,
|
|
381
|
+
action,
|
|
382
|
+
consumer_gaii: pick2(s.consumerGaii, s.consumer_gaii),
|
|
383
|
+
new_price_per_call: pick2(s.newPricePerCall, s.new_price_per_call),
|
|
384
|
+
new_cap_units: pick2(s.newCapUnits, s.new_cap_units),
|
|
385
|
+
note: s.note
|
|
386
|
+
}), "Failed to propose new terms");
|
|
387
|
+
return d.proposal;
|
|
388
|
+
}
|
|
389
|
+
function acceptProposal(id) {
|
|
390
|
+
return send("/v1/exchange/proposals/" + enc3(id) + "/accept", "POST", {}, "Failed to accept the proposal");
|
|
391
|
+
}
|
|
392
|
+
function declineProposal(id) {
|
|
393
|
+
return send("/v1/exchange/proposals/" + enc3(id) + "/decline", "POST", {}, "Failed to decline the proposal");
|
|
394
|
+
}
|
|
395
|
+
function withdrawProposal(id) {
|
|
396
|
+
return send("/v1/exchange/proposals/" + enc3(id) + "/withdraw", "POST", {}, "Failed to withdraw the proposal");
|
|
397
|
+
}
|
|
398
|
+
async function startWork(spec) {
|
|
399
|
+
const s = (
|
|
400
|
+
/** @type {Record<string, any>} */
|
|
401
|
+
spec || {}
|
|
402
|
+
);
|
|
403
|
+
const d = await send("/v1/exchange/work", "POST", compact2({
|
|
404
|
+
offering_id: pick2(s.offeringId, s.offering_id),
|
|
405
|
+
input: s.input,
|
|
406
|
+
note: s.note
|
|
407
|
+
}), "Failed to start the work");
|
|
408
|
+
return d.work;
|
|
409
|
+
}
|
|
410
|
+
async function deliverWork(id, spec) {
|
|
411
|
+
const s = (
|
|
412
|
+
/** @type {Record<string, any>} */
|
|
413
|
+
spec || {}
|
|
414
|
+
);
|
|
415
|
+
const d = await send(
|
|
416
|
+
"/v1/exchange/work/" + enc3(id) + "/deliver",
|
|
417
|
+
"POST",
|
|
418
|
+
compact2({ output: s.output, note: s.note }),
|
|
419
|
+
"Failed to deliver the work"
|
|
420
|
+
);
|
|
421
|
+
return d.work;
|
|
422
|
+
}
|
|
423
|
+
function work(opts) {
|
|
424
|
+
return authed("/v1/exchange/work" + qs({ role: opts && opts.role }), void 0, "Failed to read your work items");
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
// src/static/sdk-libs/exchange/earnings.js
|
|
428
|
+
function earnings(opts) {
|
|
429
|
+
const o = opts || {};
|
|
430
|
+
return authed(
|
|
431
|
+
"/v1/exchange/earnings" + qs({ status: o.status, currency: o.currency, limit: o.limit }),
|
|
432
|
+
void 0,
|
|
433
|
+
"Failed to read your earnings"
|
|
434
|
+
);
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
// src/static/sdk-libs/exchange/demand.js
|
|
438
|
+
var enc4 = encodeURIComponent;
|
|
439
|
+
function compact3(obj) {
|
|
440
|
+
const out = {};
|
|
441
|
+
for (const k of Object.keys(obj)) if (obj[k] !== void 0) out[k] = obj[k];
|
|
442
|
+
return out;
|
|
443
|
+
}
|
|
444
|
+
function pick3(...vals) {
|
|
445
|
+
for (const v of vals) if (v !== void 0 && v !== null) return v;
|
|
446
|
+
return void 0;
|
|
447
|
+
}
|
|
448
|
+
function needs(opts) {
|
|
449
|
+
const o = opts || {};
|
|
450
|
+
const query = qs({ open: o.open ? "1" : null, mine: o.mine ? "1" : null });
|
|
451
|
+
return o.mine ? authed("/v1/exchange/needs" + query, void 0, "Failed to read your needs") : pub("/v1/exchange/needs" + query, "Failed to browse needs");
|
|
452
|
+
}
|
|
453
|
+
function postNeed(spec) {
|
|
454
|
+
const s = (
|
|
455
|
+
/** @type {Record<string, any>} */
|
|
456
|
+
spec || {}
|
|
457
|
+
);
|
|
458
|
+
return send("/v1/exchange/needs", "POST", compact3({
|
|
459
|
+
app_id: pick3(s.appId, s.app_id),
|
|
460
|
+
description: s.description,
|
|
461
|
+
ext: s.ext,
|
|
462
|
+
action: s.action,
|
|
463
|
+
spec: s.spec,
|
|
464
|
+
usage_intent: pick3(s.usageIntent, s.usage_intent),
|
|
465
|
+
budget_unit: pick3(s.budgetUnit, s.budget_unit),
|
|
466
|
+
budget_cap: pick3(s.budgetCap, s.budget_cap),
|
|
467
|
+
autonomy: s.autonomy
|
|
468
|
+
}), "Failed to post the need");
|
|
469
|
+
}
|
|
470
|
+
function closeNeed(id) {
|
|
471
|
+
return send("/v1/exchange/needs/" + enc4(id) + "/close", "POST", {}, "Failed to close the need");
|
|
472
|
+
}
|
|
473
|
+
function bids(needId) {
|
|
474
|
+
return pub("/v1/exchange/needs/" + enc4(needId) + "/bids", "Failed to read bids");
|
|
475
|
+
}
|
|
476
|
+
async function bid(needId, spec) {
|
|
477
|
+
const s = (
|
|
478
|
+
/** @type {Record<string, any>} */
|
|
479
|
+
spec || {}
|
|
480
|
+
);
|
|
481
|
+
const d = await send("/v1/exchange/needs/" + enc4(needId) + "/bids", "POST", compact3({
|
|
482
|
+
ext: s.ext,
|
|
483
|
+
action: s.action,
|
|
484
|
+
offering_id: pick3(s.offeringId, s.offering_id),
|
|
485
|
+
plan_id: pick3(s.planId, s.plan_id),
|
|
486
|
+
note: s.note
|
|
487
|
+
}), "Failed to place the bid");
|
|
488
|
+
return d.bid;
|
|
489
|
+
}
|
|
490
|
+
function acceptBid(needId, bidId, opts) {
|
|
491
|
+
const o = (
|
|
492
|
+
/** @type {Record<string, any>} */
|
|
493
|
+
opts || {}
|
|
494
|
+
);
|
|
495
|
+
return send(
|
|
496
|
+
"/v1/exchange/needs/" + enc4(needId) + "/bids/" + enc4(bidId) + "/accept",
|
|
497
|
+
"POST",
|
|
498
|
+
compact3({ cap_units: pick3(o.capUnits, o.cap_units) }),
|
|
499
|
+
"Failed to accept the bid"
|
|
500
|
+
);
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
// src/static/sdk-libs/exchange/format.js
|
|
504
|
+
function commerce() {
|
|
505
|
+
return window.AIMEAT && window.AIMEAT.commerce || null;
|
|
506
|
+
}
|
|
507
|
+
function fmtMorsels(amount) {
|
|
508
|
+
const n = Math.round(Number(amount) || 0);
|
|
509
|
+
return n + (Math.abs(n) === 1 ? " morsel" : " morsels");
|
|
510
|
+
}
|
|
511
|
+
function fmtUnit(amount, unit, currency) {
|
|
512
|
+
const isMoney = unit === "money" || !!currency && currency !== "morsel" && currency !== "MORSEL";
|
|
513
|
+
if (!isMoney) return fmtMorsels(amount);
|
|
514
|
+
const c = commerce();
|
|
515
|
+
if (!c) {
|
|
516
|
+
throw new Error("AIMEAT.commerce is required to format money. Include aimeat-commerce.js before aimeat-exchange.js");
|
|
517
|
+
}
|
|
518
|
+
return c.fmtMoney(amount, currency);
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
// src/static/sdk-libs/exchange/odps-completeness.js
|
|
522
|
+
var ODPS_AUTHORED_FIELDS = [
|
|
523
|
+
// ── Framing: what a buyer reads to decide ──
|
|
524
|
+
{ key: "title", path: "product.details.name", group: "framing", label: "Title" },
|
|
525
|
+
{ key: "description", path: "product.details.description", group: "framing", label: "Description" },
|
|
526
|
+
{ key: "odps.valueProposition", path: "product.details.valueProposition", group: "framing", label: "Value proposition" },
|
|
527
|
+
{ key: "odps.productType", path: "product.details.type", group: "framing", label: "Product type" },
|
|
528
|
+
{ key: "odps.categories", path: "product.details.categories", group: "framing", label: "Categories" },
|
|
529
|
+
{ key: "tags", path: "product.details.tags", group: "framing", label: "Tags" },
|
|
530
|
+
{ key: "odps.useCases", path: "product.details.useCases", group: "framing", label: "Use cases" },
|
|
531
|
+
{ key: "odps.contentSample", path: "product.details.contentSample", group: "framing", label: "Output sample" },
|
|
532
|
+
{ key: "odps.outputFileFormats", path: "product.details.outputFileFormats", group: "framing", label: "Output formats" },
|
|
533
|
+
{ key: "odps.standards", path: "product.details.standards", group: "framing", label: "Standards followed" },
|
|
534
|
+
{ key: "odps.productSeries", path: "product.details.productSeries", group: "framing", label: "Product series" },
|
|
535
|
+
{ key: "odps.logoURL", path: "product.details.logoURL", group: "framing", label: "Logo" },
|
|
536
|
+
{ key: "odps.brandSlogan", path: "product.details.brandSlogan", group: "framing", label: "Slogan" },
|
|
537
|
+
{ key: "odps.recommendedDataProducts", path: "product.details.recommendedDataProducts", group: "framing", label: "Related products" },
|
|
538
|
+
// ── Commitments: promises no observation can substitute for ──
|
|
539
|
+
{ key: "odps.sla", path: "product.SLA.declarative", group: "commitments", label: "Service-level commitments" },
|
|
540
|
+
{ key: "odps.dataQuality", path: "product.dataQuality.declarative", group: "commitments", label: "Data-quality commitments" },
|
|
541
|
+
// ── Provenance: where the material came from, and on what basis ──
|
|
542
|
+
{ key: "provenance.source", path: "product.license.governance.ownership", group: "provenance", label: "Source" },
|
|
543
|
+
{ key: "provenance.legalBasis", path: "product.license.governance.applicableLaws", group: "provenance", label: "Legal basis" },
|
|
544
|
+
{ key: "provenance.consentStatus", path: "product.license.governance.audit", group: "provenance", label: "Consent status" },
|
|
545
|
+
{ key: "provenance.retention", path: "product.license.governance.audit", group: "provenance", label: "Retention" },
|
|
546
|
+
{ key: "provenance.transformations", path: "product.details.versionNotes", group: "provenance", label: "Transformations applied" },
|
|
547
|
+
{ key: "provenance.snapshotHash", path: "product.dataAccess[].checksum", group: "provenance", label: "Snapshot hash" },
|
|
548
|
+
{ key: "provenance.lineage", path: "product.license.governance.ownership", group: "provenance", label: "Upstream lineage" },
|
|
549
|
+
// ── Usage terms: the three flags every AIMEAT listing must state to be listed at all ──
|
|
550
|
+
{ key: "usageTerms", path: "product.license.scope.rights", group: "legal", label: "Usage terms" },
|
|
551
|
+
// ── Legal identity + jurisdiction: what a validator reports as missing on an otherwise full listing ──
|
|
552
|
+
{ key: "odps.dataHolder.legalName", path: "product.dataHolder.legalName", group: "legal", label: "Legal name" },
|
|
553
|
+
{ key: "odps.dataHolder.businessID", path: "product.dataHolder.businessID", group: "legal", label: "Business ID" },
|
|
554
|
+
{ key: "odps.dataHolder.URL", path: "product.dataHolder.URL", group: "legal", label: "Company website" },
|
|
555
|
+
{ key: "odps.dataHolder.addressCountry", path: "product.dataHolder.addressCountry", group: "legal", label: "Country" },
|
|
556
|
+
{ key: "odps.dataHolder.addressLocality", path: "product.dataHolder.addressLocality", group: "legal", label: "City" },
|
|
557
|
+
{ key: "odps.license.applicableLaws", path: "product.license.governance.applicableLaws", group: "legal", label: "Applicable law" },
|
|
558
|
+
{ key: "odps.license.geographicalArea", path: "product.license.scope.geographicalArea", group: "legal", label: "Geographical area" },
|
|
559
|
+
{ key: "odps.license.exclusive", path: "product.license.scope.exclusive", group: "legal", label: "Exclusivity stated" },
|
|
560
|
+
{ key: "odps.license.terminationConditions", path: "product.license.termination.terminationConditions", group: "legal", label: "Termination conditions" },
|
|
561
|
+
// ── Support + versioning: what a buyer needs after they have bought ──
|
|
562
|
+
{ key: "odps.documentationURL", path: "product.SLA.declarative[].support.documentationURL", group: "support", label: "Documentation" },
|
|
563
|
+
{ key: "odps.supportEmail", path: "product.SLA.declarative[].support.email", group: "support", label: "Support email" },
|
|
564
|
+
{ key: "odps.supportHours", path: "product.SLA.declarative[].support.emailServiceHours", group: "support", label: "Support hours" },
|
|
565
|
+
{ key: "odps.issues", path: "product.details.issues", group: "support", label: "Known issues" },
|
|
566
|
+
{ key: "odps.productVersion", path: "product.details.productVersion", group: "support", label: "Product version" },
|
|
567
|
+
// ── Governance + tax: how strictly it is run, and what the price includes ──
|
|
568
|
+
{ key: "odps.language", path: "product.details", group: "governance", label: "Content language" },
|
|
569
|
+
{ key: "odps.governanceProfile", path: "product.details.governanceProfile", group: "governance", label: "Governance profile" },
|
|
570
|
+
{ key: "odps.portfolioPriority", path: "product.details.portfolioPriority", group: "governance", label: "Portfolio priority" },
|
|
571
|
+
{ key: "odps.valueAddedTaxIncluded", path: "product.pricingPlans.declarative[].valueAddedTaxIncluded", group: "governance", label: "VAT included" },
|
|
572
|
+
{ key: "odps.valueAddedTaxPercentage", path: "product.pricingPlans.declarative[].valueAddedTaxPercentage", group: "governance", label: "VAT percentage" }
|
|
573
|
+
];
|
|
574
|
+
function valueAt(obj, path) {
|
|
575
|
+
let node = obj;
|
|
576
|
+
for (const part of path.split(".")) {
|
|
577
|
+
if (node === null || node === void 0 || typeof node !== "object") return void 0;
|
|
578
|
+
node = node[part];
|
|
579
|
+
}
|
|
580
|
+
return node;
|
|
581
|
+
}
|
|
582
|
+
function isFilled(v) {
|
|
583
|
+
if (v === void 0 || v === null) return false;
|
|
584
|
+
if (typeof v === "string") return v.trim().length > 0;
|
|
585
|
+
if (Array.isArray(v)) return v.length > 0;
|
|
586
|
+
if (typeof v === "object") return Object.keys(v).length > 0;
|
|
587
|
+
return true;
|
|
588
|
+
}
|
|
589
|
+
function odpsCompleteness(offering) {
|
|
590
|
+
const o = offering && offering.offering ? offering.offering : offering || {};
|
|
591
|
+
const missing = [];
|
|
592
|
+
const present = [];
|
|
593
|
+
const byGroup = (
|
|
594
|
+
/** @type {Record<string, { filled: number, total: number, percent: number }>} */
|
|
595
|
+
{}
|
|
596
|
+
);
|
|
597
|
+
for (const field of ODPS_AUTHORED_FIELDS) {
|
|
598
|
+
const g = byGroup[field.group] || (byGroup[field.group] = { filled: 0, total: 0, percent: 0 });
|
|
599
|
+
g.total += 1;
|
|
600
|
+
if (isFilled(valueAt(o, field.key))) {
|
|
601
|
+
g.filled += 1;
|
|
602
|
+
present.push(field);
|
|
603
|
+
} else {
|
|
604
|
+
missing.push(field);
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
for (const k of Object.keys(byGroup)) {
|
|
608
|
+
byGroup[k].percent = Math.round(byGroup[k].filled / byGroup[k].total * 100);
|
|
609
|
+
}
|
|
610
|
+
const total = ODPS_AUTHORED_FIELDS.length;
|
|
611
|
+
return {
|
|
612
|
+
percent: Math.round(present.length / total * 100),
|
|
613
|
+
filled: present.length,
|
|
614
|
+
total,
|
|
615
|
+
missing,
|
|
616
|
+
present,
|
|
617
|
+
byGroup,
|
|
618
|
+
// The version the descriptor follows — stamped by the node onto provenance when the listing is
|
|
619
|
+
// written, so a listing authored before a version bump still says which spec it answers to.
|
|
620
|
+
odpsVersion: o.provenance && o.provenance.odpsVersion || "4.1"
|
|
621
|
+
};
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
// src/static/sdk-libs/exchange/index.js
|
|
625
|
+
var exchange = {
|
|
626
|
+
// ── Browsing (public where the route is public) ──
|
|
627
|
+
info,
|
|
628
|
+
list,
|
|
629
|
+
search,
|
|
630
|
+
get,
|
|
631
|
+
odps,
|
|
632
|
+
odpsYaml,
|
|
633
|
+
// ── Selling ──
|
|
634
|
+
publish,
|
|
635
|
+
update,
|
|
636
|
+
delist,
|
|
637
|
+
stats,
|
|
638
|
+
consumers,
|
|
639
|
+
reconcile,
|
|
640
|
+
providerHistory,
|
|
641
|
+
grants,
|
|
642
|
+
grant,
|
|
643
|
+
revokeGrant,
|
|
644
|
+
// ── Buying + contracts ──
|
|
645
|
+
contracts,
|
|
646
|
+
accept,
|
|
647
|
+
off,
|
|
648
|
+
history,
|
|
649
|
+
spend,
|
|
650
|
+
coordinateOf,
|
|
651
|
+
proposals,
|
|
652
|
+
propose,
|
|
653
|
+
acceptProposal,
|
|
654
|
+
declineProposal,
|
|
655
|
+
withdrawProposal,
|
|
656
|
+
startWork,
|
|
657
|
+
deliverWork,
|
|
658
|
+
work,
|
|
659
|
+
// ── Earnings (read-only: the accrual, not a payout) ──
|
|
660
|
+
earnings,
|
|
661
|
+
// ── Demand ──
|
|
662
|
+
needs,
|
|
663
|
+
postNeed,
|
|
664
|
+
closeNeed,
|
|
665
|
+
bids,
|
|
666
|
+
bid,
|
|
667
|
+
acceptBid,
|
|
668
|
+
// ── Helpers ──
|
|
669
|
+
fmtUnit,
|
|
670
|
+
fmtMorsels,
|
|
671
|
+
odpsCompleteness,
|
|
672
|
+
ODPS_AUTHORED_FIELDS
|
|
673
|
+
};
|
|
674
|
+
attach("exchange", exchange);
|
|
675
|
+
})();
|