aimeat 1.40.1 → 2.1.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 +24 -15
- package/dist/.env.example +528 -495
- package/dist/locales/en.json +349 -298
- package/dist/locales/fi.json +349 -298
- package/dist/public/components/ContactPicker.js +145 -0
- package/dist/public/components/EmptyState.js +22 -7
- package/dist/public/components/LinkPreview.js +101 -0
- package/dist/public/components/NotificationBell.js +110 -8
- package/dist/public/cortex-bundled/aimeat-dag.js +553 -0
- package/dist/public/cortex-bundled/aimeat-dag.yaml +77 -0
- package/dist/public/cortex-bundled/aimeat-flow.js +225 -0
- package/dist/public/cortex-bundled/aimeat-flow.yaml +101 -0
- package/dist/public/cortex-bundled/aimeat-ui-motion.js +323 -0
- package/dist/public/cortex-bundled/aimeat-ui-motion.yaml +86 -0
- package/dist/public/css/components/contact-picker.css +26 -0
- package/dist/public/css/theme.css +109 -9
- package/dist/public/css/views/admin.css +59 -2
- package/dist/public/css/views/agents-detail.css +78 -14
- package/dist/public/css/views/app-grant.css +18 -0
- package/dist/public/css/views/capabilities.css +2 -0
- package/dist/public/css/views/companies.css +0 -1
- package/dist/public/css/views/inbox.css +188 -7
- package/dist/public/css/views/landing.css +2 -0
- package/dist/public/css/views/members.css +0 -1
- package/dist/public/css/views/my-company.css +5 -5
- package/dist/public/css/views/offers.css +0 -3
- package/dist/public/css/views/portal-dev.css +49 -0
- package/dist/public/css/views/portfolio.css +46 -0
- package/dist/public/css/views/profile.css +200 -17
- package/dist/public/css/views/public-knowledge-viewer.css +0 -17
- package/dist/public/css/views/scheduler.css +37 -1
- package/dist/public/css/views/workflows.css +1 -1
- package/dist/public/js/services/admin.js +10 -0
- package/dist/public/js/services/agent-activity.js +15 -0
- package/dist/public/js/services/agent-directives.js +14 -0
- package/dist/public/js/services/agent-integration.js +15 -0
- package/dist/public/js/services/agent-messages.js +14 -0
- package/dist/public/js/services/agent-tasks.js +14 -0
- package/dist/public/js/services/appdev.js +67 -0
- package/dist/public/js/services/apps.js +47 -3
- package/dist/public/js/services/calibrator.js +14 -1
- package/dist/public/js/services/consent.js +17 -0
- package/dist/public/js/services/contacts.js +47 -0
- package/dist/public/js/services/ecosystem.js +14 -0
- package/dist/public/js/services/generator.js +71 -35
- package/dist/public/js/services/knowledge.js +14 -0
- package/dist/public/js/services/ledger.js +18 -0
- package/dist/public/js/services/living.js +14 -0
- package/dist/public/js/services/messages-ai-prompts.js +38 -0
- package/dist/public/js/services/messages.js +33 -5
- package/dist/public/js/services/notebook.js +76 -0
- package/dist/public/js/services/organisms.js +48 -4
- package/dist/public/js/services/schedules.js +19 -2
- package/dist/public/js/services/security.js +14 -0
- package/dist/public/js/services/unfurl.js +43 -0
- package/dist/public/js/services/work.js +14 -0
- package/dist/public/lib/VENDORED.md +77 -0
- package/dist/public/lib/drawflow@0.min.css +1 -0
- package/dist/public/lib/drawflow@0.min.js +1 -0
- package/dist/public/lib/fonts/LICENSE.md +13 -0
- package/dist/public/lib/fonts/baloo2-latin-ext.woff2 +0 -0
- package/dist/public/lib/fonts/baloo2-latin.woff2 +0 -0
- package/dist/public/lib/fonts/bangers-latin-ext.woff2 +0 -0
- package/dist/public/lib/fonts/bangers-latin.woff2 +0 -0
- package/dist/public/lib/fonts.css +51 -0
- package/dist/public/lib/p5@1.min.js +2 -0
- package/dist/public/lib/phaser@3.min.js +1 -0
- package/dist/public/lib/pixi-unsafe-eval@8.min.js +22 -0
- package/dist/public/lib/pixi@8.min.js +2329 -0
- package/dist/public/lib/realtime.js +120 -3
- package/dist/public/lib/samples/LICENSE.md +31 -8
- package/dist/public/lib/samples/bass/A1.mp3 +0 -0
- package/dist/public/lib/samples/bass/B2.mp3 +0 -0
- package/dist/public/lib/samples/bass/D2.mp3 +0 -0
- package/dist/public/lib/samples/bass/E1.mp3 +0 -0
- package/dist/public/lib/samples/bass/E3.mp3 +0 -0
- package/dist/public/lib/samples/bass/G2.mp3 +0 -0
- package/dist/public/lib/samples/drums/clap.mp3 +0 -0
- package/dist/public/lib/samples/drums/cowbell.mp3 +0 -0
- package/dist/public/lib/samples/drums/crash.mp3 +0 -0
- package/dist/public/lib/samples/drums/hihat-open.mp3 +0 -0
- package/dist/public/lib/samples/drums/hihat.mp3 +0 -0
- package/dist/public/lib/samples/drums/kick.mp3 +0 -0
- package/dist/public/lib/samples/drums/ride.mp3 +0 -0
- package/dist/public/lib/samples/drums/snare.mp3 +0 -0
- package/dist/public/lib/samples/drums/tom-high.mp3 +0 -0
- package/dist/public/lib/samples/drums/tom-low.mp3 +0 -0
- package/dist/public/lib/samples/drums/tom-mid.mp3 +0 -0
- package/dist/public/lib/samples/epiano/C2.mp3 +0 -0
- package/dist/public/lib/samples/epiano/C3.mp3 +0 -0
- package/dist/public/lib/samples/epiano/C4.mp3 +0 -0
- package/dist/public/lib/samples/epiano/C5.mp3 +0 -0
- package/dist/public/lib/samples/epiano/C6.mp3 +0 -0
- package/dist/public/lib/samples/epiano/G2.mp3 +0 -0
- package/dist/public/lib/samples/epiano/G3.mp3 +0 -0
- package/dist/public/lib/samples/epiano/G4.mp3 +0 -0
- package/dist/public/lib/samples/epiano/G5.mp3 +0 -0
- package/dist/public/lib/samples/flute/A4.mp3 +0 -0
- package/dist/public/lib/samples/flute/A5.mp3 +0 -0
- package/dist/public/lib/samples/flute/C4.mp3 +0 -0
- package/dist/public/lib/samples/flute/C5.mp3 +0 -0
- package/dist/public/lib/samples/flute/C6.mp3 +0 -0
- package/dist/public/lib/samples/flute/E4.mp3 +0 -0
- package/dist/public/lib/samples/flute/E5.mp3 +0 -0
- package/dist/public/lib/samples/guitar/A2.mp3 +0 -0
- package/dist/public/lib/samples/guitar/A4.mp3 +0 -0
- package/dist/public/lib/samples/guitar/B3.mp3 +0 -0
- package/dist/public/lib/samples/guitar/D3.mp3 +0 -0
- package/dist/public/lib/samples/guitar/E2.mp3 +0 -0
- package/dist/public/lib/samples/guitar/E4.mp3 +0 -0
- package/dist/public/lib/samples/guitar/E5.mp3 +0 -0
- package/dist/public/lib/samples/guitar/G3.mp3 +0 -0
- package/dist/public/lib/samples/guitar-el/A2.mp3 +0 -0
- package/dist/public/lib/samples/guitar-el/A4.mp3 +0 -0
- package/dist/public/lib/samples/guitar-el/B3.mp3 +0 -0
- package/dist/public/lib/samples/guitar-el/D3.mp3 +0 -0
- package/dist/public/lib/samples/guitar-el/E2.mp3 +0 -0
- package/dist/public/lib/samples/guitar-el/E4.mp3 +0 -0
- package/dist/public/lib/samples/guitar-el/E5.mp3 +0 -0
- package/dist/public/lib/samples/guitar-el/G3.mp3 +0 -0
- package/dist/public/lib/samples/guitar-steel/A2.mp3 +0 -0
- package/dist/public/lib/samples/guitar-steel/A4.mp3 +0 -0
- package/dist/public/lib/samples/guitar-steel/B3.mp3 +0 -0
- package/dist/public/lib/samples/guitar-steel/D3.mp3 +0 -0
- package/dist/public/lib/samples/guitar-steel/E2.mp3 +0 -0
- package/dist/public/lib/samples/guitar-steel/E4.mp3 +0 -0
- package/dist/public/lib/samples/guitar-steel/E5.mp3 +0 -0
- package/dist/public/lib/samples/guitar-steel/G3.mp3 +0 -0
- package/dist/public/lib/samples/organ/C2.mp3 +0 -0
- package/dist/public/lib/samples/organ/C3.mp3 +0 -0
- package/dist/public/lib/samples/organ/C4.mp3 +0 -0
- package/dist/public/lib/samples/organ/C5.mp3 +0 -0
- package/dist/public/lib/samples/organ/C6.mp3 +0 -0
- package/dist/public/lib/samples/organ/G2.mp3 +0 -0
- package/dist/public/lib/samples/organ/G3.mp3 +0 -0
- package/dist/public/lib/samples/organ/G4.mp3 +0 -0
- package/dist/public/lib/samples/organ/G5.mp3 +0 -0
- package/dist/public/lib/samples/strings/C2.mp3 +0 -0
- package/dist/public/lib/samples/strings/C3.mp3 +0 -0
- package/dist/public/lib/samples/strings/C4.mp3 +0 -0
- package/dist/public/lib/samples/strings/C5.mp3 +0 -0
- package/dist/public/lib/samples/strings/C6.mp3 +0 -0
- package/dist/public/lib/samples/strings/G2.mp3 +0 -0
- package/dist/public/lib/samples/strings/G3.mp3 +0 -0
- package/dist/public/lib/samples/strings/G4.mp3 +0 -0
- package/dist/public/lib/samples/strings/G5.mp3 +0 -0
- package/dist/public/lib/samples/trumpet/A3.mp3 +0 -0
- package/dist/public/lib/samples/trumpet/A4.mp3 +0 -0
- package/dist/public/lib/samples/trumpet/A5.mp3 +0 -0
- package/dist/public/lib/samples/trumpet/C4.mp3 +0 -0
- package/dist/public/lib/samples/trumpet/C5.mp3 +0 -0
- package/dist/public/lib/samples/trumpet/E3.mp3 +0 -0
- package/dist/public/lib/samples/trumpet/E4.mp3 +0 -0
- package/dist/public/lib/samples/trumpet/E5.mp3 +0 -0
- package/dist/public/llms-template.txt +42 -21
- package/dist/public/spa.html +42 -34
- package/dist/public/style-testbed.html +0 -2
- package/dist/public/sw.js +23 -4
- package/dist/public/views/_template.js +21 -8
- package/dist/public/views/admin/cortex-tab.js +2 -2
- package/dist/public/views/admin/database-tab.js +140 -0
- package/dist/public/views/admin/feedback-tab.js +162 -0
- package/dist/public/views/admin/owners-tab.js +19 -29
- package/dist/public/views/admin/push-tab.js +2 -2
- package/dist/public/views/admin/services-tab.js +4 -4
- package/dist/public/views/admin/shared.js +9 -3
- package/dist/public/views/admin/sharing-groups-tab.js +13 -25
- package/dist/public/views/admin/stats-tab.js +33 -33
- package/dist/public/views/admin.js +52 -49
- package/dist/public/views/app-grant.js +24 -4
- package/dist/public/views/companies.js +9 -7
- package/dist/public/views/help.js +2 -1
- package/dist/public/views/invite-accept.js +64 -19
- package/dist/public/views/landing.js +41 -8
- package/dist/public/views/members.js +4 -2
- package/dist/public/views/my-company.js +27 -77
- package/dist/public/views/my-company.payments.js +177 -0
- package/dist/public/views/portal-classic.js +0 -4
- package/dist/public/views/portal-dev.js +11 -0
- package/dist/public/views/portal-dev.panels.js +52 -58
- package/dist/public/views/portal.components.js +18 -36
- package/dist/public/views/portal.prompts.js +9 -10
- package/dist/public/views/portfolio.js +61 -6
- package/dist/public/views/profile/access-tab/access-tokens.js +3 -3
- package/dist/public/views/profile/access-tab/agent-defaults.js +3 -3
- package/dist/public/views/profile/access-tab/connected-apps.js +5 -3
- package/dist/public/views/profile/access-tab/sharing-groups.js +8 -7
- package/dist/public/views/profile/access-tab.js +26 -10
- package/dist/public/views/profile/agents/agent-card.js +16 -5
- package/dist/public/views/profile/agents/tab-activity.js +27 -9
- package/dist/public/views/profile/agents/tab-agent-config.js +4 -1
- package/dist/public/views/profile/agents/tab-contracts.js +11 -3
- package/dist/public/views/profile/agents/tab-data-access.js +36 -20
- package/dist/public/views/profile/agents/tab-directives.js +2 -1
- package/dist/public/views/profile/agents/tab-integration.js +46 -23
- package/dist/public/views/profile/agents/tab-messages.js +37 -6
- package/dist/public/views/profile/agents/tab-quality.js +32 -8
- package/dist/public/views/profile/agents/tab-schedules.js +15 -10
- package/dist/public/views/profile/agents/tab-usage.js +19 -8
- package/dist/public/views/profile/agents-capabilities-subtab.js +3 -3
- package/dist/public/views/profile/agents-tab.js +11 -1
- package/dist/public/views/profile/appdev-tab.js +275 -0
- package/dist/public/views/profile/apps-tab.js +248 -2
- package/dist/public/views/profile/calibrator-batch.js +2 -2
- package/dist/public/views/profile/calibrator-tab.js +69 -37
- package/dist/public/views/profile/capabilities-tab.js +24 -13
- package/dist/public/views/profile/contacts-tab.js +139 -0
- package/dist/public/views/profile/data-wallet-tab.js +37 -18
- package/dist/public/views/profile/discover-tab.js +2 -1
- package/dist/public/views/profile/ecosystem-tab.automation.js +21 -7
- package/dist/public/views/profile/extensions-tab.js +4 -2
- package/dist/public/views/profile/extensions-tab.maturity.js +40 -0
- package/dist/public/views/profile/generator-dashboard/DebugPanel.js +16 -9
- package/dist/public/views/profile/generator-dashboard/use-dashboard-core.js +46 -26
- package/dist/public/views/profile/generator-dashboard/use-edit-mode.js +29 -25
- package/dist/public/views/profile/generator-dashboard/use-test-execution.js +14 -14
- package/dist/public/views/profile/generator-detail.ai.js +21 -0
- package/dist/public/views/profile/generator-detail.js +59 -26
- package/dist/public/views/profile/generator-detail.results.js +1 -1
- package/dist/public/views/profile/generator-settings.js +51 -47
- package/dist/public/views/profile/generator-tab.js +28 -7
- package/dist/public/views/profile/inbox-tab/ai-actions.js +86 -0
- package/dist/public/views/profile/inbox-tab/components.js +229 -14
- package/dist/public/views/profile/inbox-tab/helpers.js +38 -0
- package/dist/public/views/profile/inbox-tab/panels.js +51 -6
- package/dist/public/views/profile/inbox-tab/use-thread-ux.js +121 -0
- package/dist/public/views/profile/inbox-tab.js +134 -90
- package/dist/public/views/profile/knowledge-tab.helpers.js +20 -0
- package/dist/public/views/profile/knowledge-tab.js +31 -28
- package/dist/public/views/profile/landing-page.cards.js +66 -46
- package/dist/public/views/profile/landing-page.js +18 -6
- package/dist/public/views/profile/landing-page.modals.js +5 -2
- package/dist/public/views/profile/libraries-tab.js +196 -0
- package/dist/public/views/profile/living-tab.js +11 -0
- package/dist/public/views/profile/memory-tab.js +45 -4
- package/dist/public/views/profile/node-stats-tab.js +29 -24
- package/dist/public/views/profile/notebook-card.js +1 -1
- package/dist/public/views/profile/notebook-tab.js +20 -1
- package/dist/public/views/profile/offers-tab.js +2 -1
- package/dist/public/views/profile/openrouter-settings.js +613 -0
- package/dist/public/views/profile/organisms/invite-panel.js +254 -0
- package/dist/public/views/profile/organisms/members.js +110 -177
- package/dist/public/views/profile/organisms/participants-panel.js +6 -2
- package/dist/public/views/profile/organisms/skills-panel.js +2 -1
- package/dist/public/views/profile/organisms/workspace/generator.js +1 -1
- package/dist/public/views/profile/organisms-tab.js +24 -16
- package/dist/public/views/profile/packages-tab.js +28 -38
- package/dist/public/views/profile/scheduler-calendar.js +72 -4
- package/dist/public/views/profile/scheduler-tab.js +16 -5
- package/dist/public/views/profile/security-tab.js +44 -44
- package/dist/public/views/profile/skills-tab.js +4 -3
- package/dist/public/views/profile/wallet-tab.js +34 -7
- package/dist/public/views/profile/work-tab.js +10 -1
- package/dist/public/views/profile/workflows-tab.js +3 -2
- package/dist/public/views/profile.js +38 -44
- package/dist/public/views/public-knowledge-viewer.js +6 -7
- package/dist/public/views/public-workspace-viewer.js +1 -1
- package/dist/public/views/start-flows.js +16 -0
- package/dist/public/views/start.js +2 -1
- package/dist/scripts/aeb-ledger.d.ts +2 -0
- package/dist/scripts/aeb-ledger.d.ts.map +1 -0
- package/dist/scripts/aeb-ledger.js +28 -0
- package/dist/scripts/aeb-ledger.js.map +1 -0
- package/dist/scripts/aeb-prove.d.ts +2 -0
- package/dist/scripts/aeb-prove.d.ts.map +1 -0
- package/dist/scripts/aeb-prove.js +124 -0
- package/dist/scripts/aeb-prove.js.map +1 -0
- package/dist/scripts/archive-stale-versions.js +1 -59
- package/dist/scripts/archive-stale-versions.js.map +1 -1
- package/dist/scripts/audit-mcp-tools.d.ts +1 -0
- package/dist/scripts/audit-mcp-tools.d.ts.map +1 -1
- package/dist/scripts/audit-mcp-tools.js +25 -0
- package/dist/scripts/audit-mcp-tools.js.map +1 -1
- package/dist/scripts/build-sdk-libs.d.ts +16 -0
- package/dist/scripts/build-sdk-libs.d.ts.map +1 -0
- package/dist/scripts/build-sdk-libs.js +112 -0
- package/dist/scripts/build-sdk-libs.js.map +1 -0
- package/dist/scripts/consent-audit-prune.js +5 -58
- package/dist/scripts/consent-audit-prune.js.map +1 -1
- package/dist/scripts/db-reset.d.ts +3 -3
- package/dist/scripts/db-reset.js +21 -62
- package/dist/scripts/db-reset.js.map +1 -1
- package/dist/scripts/kill-port.js +25 -5
- package/dist/scripts/kill-port.js.map +1 -1
- package/dist/scripts/kill-test-servers.d.ts +3 -0
- package/dist/scripts/kill-test-servers.d.ts.map +1 -0
- package/dist/scripts/kill-test-servers.js +84 -0
- package/dist/scripts/kill-test-servers.js.map +1 -0
- package/dist/scripts/migrate-to-postgres-kysely.d.ts +2 -0
- package/dist/scripts/migrate-to-postgres-kysely.d.ts.map +1 -0
- package/dist/scripts/migrate-to-postgres-kysely.js +194 -0
- package/dist/scripts/migrate-to-postgres-kysely.js.map +1 -0
- package/dist/scripts/reassign-apps.js +1 -1
- package/dist/scripts/telemetry-prune.d.ts +2 -1
- package/dist/scripts/telemetry-prune.d.ts.map +1 -1
- package/dist/scripts/telemetry-prune.js +7 -58
- package/dist/scripts/telemetry-prune.js.map +1 -1
- package/dist/src/auth/middleware.d.ts +9 -0
- package/dist/src/auth/middleware.d.ts.map +1 -1
- package/dist/src/auth/middleware.js +31 -0
- package/dist/src/auth/middleware.js.map +1 -1
- package/dist/src/cli/config-import.js +2 -2
- package/dist/src/cli/config-import.js.map +1 -1
- package/dist/src/cli/connect/auth.d.ts +15 -0
- package/dist/src/cli/connect/auth.d.ts.map +1 -1
- package/dist/src/cli/connect/auth.js +25 -6
- package/dist/src/cli/connect/auth.js.map +1 -1
- package/dist/src/cli/connect/keychain.d.ts +9 -0
- package/dist/src/cli/connect/keychain.d.ts.map +1 -1
- package/dist/src/cli/connect/keychain.js +21 -8
- package/dist/src/cli/connect/keychain.js.map +1 -1
- package/dist/src/cli/connect/mcp/tools/agent-management.d.ts +2 -0
- package/dist/src/cli/connect/mcp/tools/agent-management.d.ts.map +1 -1
- package/dist/src/cli/connect/mcp/tools/agent-management.js +8 -0
- package/dist/src/cli/connect/mcp/tools/agent-management.js.map +1 -1
- package/dist/src/cli/connect/mcp/tools/appdev.d.ts +17 -0
- package/dist/src/cli/connect/mcp/tools/appdev.d.ts.map +1 -0
- package/dist/src/cli/connect/mcp/tools/appdev.js +123 -0
- package/dist/src/cli/connect/mcp/tools/appdev.js.map +1 -0
- package/dist/src/cli/connect/mcp/tools/apps.d.ts +3 -1
- package/dist/src/cli/connect/mcp/tools/apps.d.ts.map +1 -1
- package/dist/src/cli/connect/mcp/tools/apps.js +49 -1
- package/dist/src/cli/connect/mcp/tools/apps.js.map +1 -1
- package/dist/src/cli/connect/mcp/tools/commerce.d.ts +16 -0
- package/dist/src/cli/connect/mcp/tools/commerce.d.ts.map +1 -0
- package/dist/src/cli/connect/mcp/tools/commerce.js +102 -0
- package/dist/src/cli/connect/mcp/tools/commerce.js.map +1 -0
- package/dist/src/cli/connect/mcp/tools/contacts.d.ts +13 -0
- package/dist/src/cli/connect/mcp/tools/contacts.d.ts.map +1 -0
- package/dist/src/cli/connect/mcp/tools/contacts.js +35 -0
- package/dist/src/cli/connect/mcp/tools/contacts.js.map +1 -0
- package/dist/src/cli/connect/mcp/tools/dm-messages.d.ts +3 -0
- package/dist/src/cli/connect/mcp/tools/dm-messages.d.ts.map +1 -1
- package/dist/src/cli/connect/mcp/tools/dm-messages.js +24 -0
- package/dist/src/cli/connect/mcp/tools/dm-messages.js.map +1 -1
- package/dist/src/cli/connect/mcp/tools/exchange.d.ts +18 -0
- package/dist/src/cli/connect/mcp/tools/exchange.d.ts.map +1 -0
- package/dist/src/cli/connect/mcp/tools/exchange.js +170 -0
- package/dist/src/cli/connect/mcp/tools/exchange.js.map +1 -0
- package/dist/src/cli/connect/mcp/tools/feedback.d.ts +14 -0
- package/dist/src/cli/connect/mcp/tools/feedback.d.ts.map +1 -0
- package/dist/src/cli/connect/mcp/tools/feedback.js +29 -0
- package/dist/src/cli/connect/mcp/tools/feedback.js.map +1 -0
- package/dist/src/cli/connect/mcp/tools/index.d.ts.map +1 -1
- package/dist/src/cli/connect/mcp/tools/index.js +12 -0
- package/dist/src/cli/connect/mcp/tools/index.js.map +1 -1
- package/dist/src/cli/connect/mcp/tools/onboarding.d.ts.map +1 -1
- package/dist/src/cli/connect/mcp/tools/onboarding.js +4 -1
- package/dist/src/cli/connect/mcp/tools/onboarding.js.map +1 -1
- package/dist/src/cli/connect/mcp/tools/operator.d.ts +18 -0
- package/dist/src/cli/connect/mcp/tools/operator.d.ts.map +1 -0
- package/dist/src/cli/connect/mcp/tools/operator.js +65 -0
- package/dist/src/cli/connect/mcp/tools/operator.js.map +1 -0
- package/dist/src/cli/connect/mcp/tools/organisms.d.ts +2 -0
- package/dist/src/cli/connect/mcp/tools/organisms.d.ts.map +1 -1
- package/dist/src/cli/connect/mcp/tools/organisms.js +101 -2
- package/dist/src/cli/connect/mcp/tools/organisms.js.map +1 -1
- package/dist/src/cli/connect/mcp/tools/workflows.d.ts +1 -0
- package/dist/src/cli/connect/mcp/tools/workflows.d.ts.map +1 -1
- package/dist/src/cli/connect/mcp/tools/workflows.js +13 -0
- package/dist/src/cli/connect/mcp/tools/workflows.js.map +1 -1
- package/dist/src/cli/connect/tool-call-defs-agent.d.ts +6 -0
- package/dist/src/cli/connect/tool-call-defs-agent.d.ts.map +1 -1
- package/dist/src/cli/connect/tool-call-defs-agent.js +126 -0
- package/dist/src/cli/connect/tool-call-defs-agent.js.map +1 -1
- package/dist/src/cli/connect/tool-call-defs-apps.d.ts +4 -0
- package/dist/src/cli/connect/tool-call-defs-apps.d.ts.map +1 -1
- package/dist/src/cli/connect/tool-call-defs-apps.js +379 -1
- package/dist/src/cli/connect/tool-call-defs-apps.js.map +1 -1
- package/dist/src/cli/connect/tool-call-defs-exchange.d.ts +3 -0
- package/dist/src/cli/connect/tool-call-defs-exchange.d.ts.map +1 -0
- package/dist/src/cli/connect/tool-call-defs-exchange.js +146 -0
- package/dist/src/cli/connect/tool-call-defs-exchange.js.map +1 -0
- package/dist/src/cli/connect/tool-call-defs-organism.d.ts.map +1 -1
- package/dist/src/cli/connect/tool-call-defs-organism.js +46 -1
- package/dist/src/cli/connect/tool-call-defs-organism.js.map +1 -1
- package/dist/src/cli/connect/tool-call.d.ts.map +1 -1
- package/dist/src/cli/connect/tool-call.js +2 -0
- package/dist/src/cli/connect/tool-call.js.map +1 -1
- package/dist/src/cli/init-wizard/generate.js +2 -2
- package/dist/src/cli/init-wizard/generate.js.map +1 -1
- package/dist/src/cli/init-wizard/helpers.d.ts +1 -1
- package/dist/src/cli/init-wizard/helpers.d.ts.map +1 -1
- package/dist/src/cli/init-wizard/helpers.js +2 -5
- package/dist/src/cli/init-wizard/helpers.js.map +1 -1
- package/dist/src/cli/init-wizard/presets.d.ts.map +1 -1
- package/dist/src/cli/init-wizard/presets.js +0 -1
- package/dist/src/cli/init-wizard/presets.js.map +1 -1
- package/dist/src/cli/init-wizard/steps-core.d.ts.map +1 -1
- package/dist/src/cli/init-wizard/steps-core.js +7 -11
- package/dist/src/cli/init-wizard/steps-core.js.map +1 -1
- package/dist/src/commerce/sellable-resolvers.d.ts +11 -1
- package/dist/src/commerce/sellable-resolvers.d.ts.map +1 -1
- package/dist/src/commerce/sellable-resolvers.js +55 -0
- package/dist/src/commerce/sellable-resolvers.js.map +1 -1
- package/dist/src/commerce/session-service.d.ts +14 -0
- package/dist/src/commerce/session-service.d.ts.map +1 -1
- package/dist/src/commerce/session-service.js +1 -1
- package/dist/src/commerce/session-service.js.map +1 -1
- package/dist/src/commerce/test-money-handler.d.ts +5 -0
- package/dist/src/commerce/test-money-handler.d.ts.map +1 -0
- package/dist/src/commerce/test-money-handler.js +27 -0
- package/dist/src/commerce/test-money-handler.js.map +1 -0
- package/dist/src/commerce/x402-facilitator.d.ts +113 -0
- package/dist/src/commerce/x402-facilitator.d.ts.map +1 -0
- package/dist/src/commerce/x402-facilitator.js +143 -0
- package/dist/src/commerce/x402-facilitator.js.map +1 -0
- package/dist/src/commerce/x402-handler.d.ts +35 -0
- package/dist/src/commerce/x402-handler.d.ts.map +1 -0
- package/dist/src/commerce/x402-handler.js +54 -0
- package/dist/src/commerce/x402-handler.js.map +1 -0
- package/dist/src/commerce/x402.d.ts +32 -8
- package/dist/src/commerce/x402.d.ts.map +1 -1
- package/dist/src/commerce/x402.js +41 -9
- package/dist/src/commerce/x402.js.map +1 -1
- package/dist/src/config-types.d.ts +21 -2
- package/dist/src/config-types.d.ts.map +1 -1
- package/dist/src/config.d.ts.map +1 -1
- package/dist/src/config.js +27 -5
- package/dist/src/config.js.map +1 -1
- package/dist/src/data/app-templates/components.d.ts +13 -1
- package/dist/src/data/app-templates/components.d.ts.map +1 -1
- package/dist/src/data/app-templates/components.js +149 -1
- package/dist/src/data/app-templates/components.js.map +1 -1
- package/dist/src/data/app-templates/shells.d.ts +7 -3
- package/dist/src/data/app-templates/shells.d.ts.map +1 -1
- package/dist/src/data/app-templates/shells.js +10 -6
- package/dist/src/data/app-templates/shells.js.map +1 -1
- package/dist/src/data/app-templates.d.ts +13 -0
- package/dist/src/data/app-templates.d.ts.map +1 -1
- package/dist/src/data/app-templates.js +39 -1
- package/dist/src/data/app-templates.js.map +1 -1
- package/dist/src/data/appdev-pitfalls.d.ts +58 -0
- package/dist/src/data/appdev-pitfalls.d.ts.map +1 -0
- package/dist/src/data/appdev-pitfalls.js +365 -0
- package/dist/src/data/appdev-pitfalls.js.map +1 -0
- package/dist/src/data/builtin-skills.d.ts +6 -0
- package/dist/src/data/builtin-skills.d.ts.map +1 -1
- package/dist/src/data/builtin-skills.js +151 -0
- package/dist/src/data/builtin-skills.js.map +1 -1
- package/dist/src/data/library-packs/cortex.d.ts +18 -0
- package/dist/src/data/library-packs/cortex.d.ts.map +1 -0
- package/dist/src/data/library-packs/cortex.js +339 -0
- package/dist/src/data/library-packs/cortex.js.map +1 -0
- package/dist/src/data/library-packs/sdk.d.ts +16 -0
- package/dist/src/data/library-packs/sdk.d.ts.map +1 -0
- package/dist/src/data/library-packs/sdk.js +439 -0
- package/dist/src/data/library-packs/sdk.js.map +1 -0
- package/dist/src/data/library-packs/vendored.d.ts +21 -0
- package/dist/src/data/library-packs/vendored.d.ts.map +1 -0
- package/dist/src/data/library-packs/vendored.js +381 -0
- package/dist/src/data/library-packs/vendored.js.map +1 -0
- package/dist/src/data/library-packs.d.ts +151 -0
- package/dist/src/data/library-packs.d.ts.map +1 -0
- package/dist/src/data/library-packs.js +169 -0
- package/dist/src/data/library-packs.js.map +1 -0
- package/dist/src/generated/api-types.d.ts +30401 -17751
- package/dist/src/generated/api-types.d.ts.map +1 -1
- package/dist/src/index-help.d.ts +1 -1
- package/dist/src/index-help.d.ts.map +1 -1
- package/dist/src/index-help.js +3 -3
- package/dist/src/mcp/agent-onboarding.d.ts.map +1 -1
- package/dist/src/mcp/agent-onboarding.js +8 -2
- package/dist/src/mcp/agent-onboarding.js.map +1 -1
- package/dist/src/mcp/annotations.d.ts +1 -0
- package/dist/src/mcp/annotations.d.ts.map +1 -1
- package/dist/src/mcp/annotations.js +44 -0
- package/dist/src/mcp/annotations.js.map +1 -1
- package/dist/src/mcp/app-template-proposals.d.ts +17 -0
- package/dist/src/mcp/app-template-proposals.d.ts.map +1 -0
- package/dist/src/mcp/app-template-proposals.js +94 -0
- package/dist/src/mcp/app-template-proposals.js.map +1 -0
- package/dist/src/mcp/appdev-pitfalls.d.ts +22 -0
- package/dist/src/mcp/appdev-pitfalls.d.ts.map +1 -0
- package/dist/src/mcp/appdev-pitfalls.js +208 -0
- package/dist/src/mcp/appdev-pitfalls.js.map +1 -0
- package/dist/src/mcp/appdev-proofs.d.ts +21 -0
- package/dist/src/mcp/appdev-proofs.d.ts.map +1 -0
- package/dist/src/mcp/appdev-proofs.js +103 -0
- package/dist/src/mcp/appdev-proofs.js.map +1 -0
- package/dist/src/mcp/appdev-research.d.ts +17 -0
- package/dist/src/mcp/appdev-research.d.ts.map +1 -0
- package/dist/src/mcp/appdev-research.js +27 -0
- package/dist/src/mcp/appdev-research.js.map +1 -0
- package/dist/src/mcp/apps.d.ts +6 -0
- package/dist/src/mcp/apps.d.ts.map +1 -1
- package/dist/src/mcp/apps.js +64 -5
- package/dist/src/mcp/apps.js.map +1 -1
- package/dist/src/mcp/catalog/definitions/agent-messaging.d.ts.map +1 -1
- package/dist/src/mcp/catalog/definitions/agent-messaging.js +38 -0
- package/dist/src/mcp/catalog/definitions/agent-messaging.js.map +1 -1
- package/dist/src/mcp/catalog/definitions/capabilities-groups-skills.d.ts +2 -0
- package/dist/src/mcp/catalog/definitions/capabilities-groups-skills.d.ts.map +1 -1
- package/dist/src/mcp/catalog/definitions/capabilities-groups-skills.js +139 -5
- package/dist/src/mcp/catalog/definitions/capabilities-groups-skills.js.map +1 -1
- package/dist/src/mcp/catalog/definitions/exchange.d.ts +18 -0
- package/dist/src/mcp/catalog/definitions/exchange.d.ts.map +1 -0
- package/dist/src/mcp/catalog/definitions/exchange.js +182 -0
- package/dist/src/mcp/catalog/definitions/exchange.js.map +1 -0
- package/dist/src/mcp/catalog/definitions/organisms-workspaces-apps.d.ts.map +1 -1
- package/dist/src/mcp/catalog/definitions/organisms-workspaces-apps.js +41 -3
- package/dist/src/mcp/catalog/definitions/organisms-workspaces-apps.js.map +1 -1
- package/dist/src/mcp/catalog/definitions/schedules-tasks-memory.d.ts.map +1 -1
- package/dist/src/mcp/catalog/definitions/schedules-tasks-memory.js +20 -0
- package/dist/src/mcp/catalog/definitions/schedules-tasks-memory.js.map +1 -1
- package/dist/src/mcp/catalog/definitions.d.ts.map +1 -1
- package/dist/src/mcp/catalog/definitions.js +2 -0
- package/dist/src/mcp/catalog/definitions.js.map +1 -1
- package/dist/src/mcp/catalog/scopes.d.ts +1 -0
- package/dist/src/mcp/catalog/scopes.d.ts.map +1 -1
- package/dist/src/mcp/catalog/scopes.js +40 -0
- package/dist/src/mcp/catalog/scopes.js.map +1 -1
- package/dist/src/mcp/catalog/surfaces.d.ts.map +1 -1
- package/dist/src/mcp/catalog/surfaces.js +31 -4
- package/dist/src/mcp/catalog/surfaces.js.map +1 -1
- package/dist/src/mcp/catalogue.d.ts +1 -0
- package/dist/src/mcp/catalogue.d.ts.map +1 -1
- package/dist/src/mcp/catalogue.js +10 -2
- package/dist/src/mcp/catalogue.js.map +1 -1
- package/dist/src/mcp/commerce.js +1 -1
- package/dist/src/mcp/commerce.js.map +1 -1
- package/dist/src/mcp/contacts.d.ts +19 -0
- package/dist/src/mcp/contacts.d.ts.map +1 -0
- package/dist/src/mcp/contacts.js +58 -0
- package/dist/src/mcp/contacts.js.map +1 -0
- package/dist/src/mcp/core-admin.js +1 -1
- package/dist/src/mcp/core-admin.js.map +1 -1
- package/dist/src/mcp/exchange-run.d.ts +5 -0
- package/dist/src/mcp/exchange-run.d.ts.map +1 -0
- package/dist/src/mcp/exchange-run.js +226 -0
- package/dist/src/mcp/exchange-run.js.map +1 -0
- package/dist/src/mcp/exchange.d.ts +5 -0
- package/dist/src/mcp/exchange.d.ts.map +1 -0
- package/dist/src/mcp/exchange.js +351 -0
- package/dist/src/mcp/exchange.js.map +1 -0
- package/dist/src/mcp/extensions.d.ts +4 -0
- package/dist/src/mcp/extensions.d.ts.map +1 -1
- package/dist/src/mcp/extensions.js +85 -12
- package/dist/src/mcp/extensions.js.map +1 -1
- package/dist/src/mcp/feedback.d.ts +20 -0
- package/dist/src/mcp/feedback.d.ts.map +1 -0
- package/dist/src/mcp/feedback.js +61 -0
- package/dist/src/mcp/feedback.js.map +1 -0
- package/dist/src/mcp/index.d.ts +1 -0
- package/dist/src/mcp/index.d.ts.map +1 -1
- package/dist/src/mcp/index.js +19 -2
- package/dist/src/mcp/index.js.map +1 -1
- package/dist/src/mcp/knowledge.d.ts +4 -0
- package/dist/src/mcp/knowledge.d.ts.map +1 -1
- package/dist/src/mcp/knowledge.js +39 -22
- package/dist/src/mcp/knowledge.js.map +1 -1
- package/dist/src/mcp/organisms-name-invites.d.ts +18 -0
- package/dist/src/mcp/organisms-name-invites.d.ts.map +1 -0
- package/dist/src/mcp/organisms-name-invites.js +143 -0
- package/dist/src/mcp/organisms-name-invites.js.map +1 -0
- package/dist/src/mcp/organisms.d.ts +3 -0
- package/dist/src/mcp/organisms.d.ts.map +1 -1
- package/dist/src/mcp/organisms.js +12 -86
- package/dist/src/mcp/organisms.js.map +1 -1
- package/dist/src/mcp/workflows.d.ts +2 -0
- package/dist/src/mcp/workflows.d.ts.map +1 -1
- package/dist/src/mcp/workflows.js +43 -3
- package/dist/src/mcp/workflows.js.map +1 -1
- package/dist/src/mcp/workspaces.d.ts +4 -0
- package/dist/src/mcp/workspaces.d.ts.map +1 -1
- package/dist/src/mcp/workspaces.js +15 -12
- package/dist/src/mcp/workspaces.js.map +1 -1
- package/dist/src/middleware/workspace-access.d.ts +3 -0
- package/dist/src/middleware/workspace-access.d.ts.map +1 -1
- package/dist/src/middleware/workspace-access.js +7 -3
- package/dist/src/middleware/workspace-access.js.map +1 -1
- package/dist/src/models/agent-onboarding-schemas.d.ts +2 -0
- package/dist/src/models/agent-onboarding-schemas.d.ts.map +1 -1
- package/dist/src/models/agent-onboarding-schemas.js +5 -0
- package/dist/src/models/agent-onboarding-schemas.js.map +1 -1
- package/dist/src/models/app-tool-schemas.d.ts +55 -1
- package/dist/src/models/app-tool-schemas.d.ts.map +1 -1
- package/dist/src/models/app-tool-schemas.js +20 -1
- package/dist/src/models/app-tool-schemas.js.map +1 -1
- package/dist/src/models/contribution-proof.d.ts +29 -0
- package/dist/src/models/contribution-proof.d.ts.map +1 -0
- package/dist/src/models/contribution-proof.js +23 -0
- package/dist/src/models/contribution-proof.js.map +1 -0
- package/dist/src/models/crew-def-schemas.d.ts +114 -0
- package/dist/src/models/crew-def-schemas.d.ts.map +1 -0
- package/dist/src/models/crew-def-schemas.js +140 -0
- package/dist/src/models/crew-def-schemas.js.map +1 -0
- package/dist/src/models/offer-schemas.d.ts +2 -2
- package/dist/src/models/schemas.d.ts +1 -0
- package/dist/src/models/schemas.d.ts.map +1 -1
- package/dist/src/models/schemas.js +3 -0
- package/dist/src/models/schemas.js.map +1 -1
- package/dist/src/models/workflow-schemas.d.ts +69 -1
- package/dist/src/models/workflow-schemas.d.ts.map +1 -1
- package/dist/src/models/workflow-schemas.js +26 -0
- package/dist/src/models/workflow-schemas.js.map +1 -1
- package/dist/src/routes/access-tokens.d.ts +2 -0
- package/dist/src/routes/access-tokens.d.ts.map +1 -1
- package/dist/src/routes/access-tokens.js +15 -0
- package/dist/src/routes/access-tokens.js.map +1 -1
- package/dist/src/routes/admin-config.js +1 -1
- package/dist/src/routes/admin-config.js.map +1 -1
- package/dist/src/routes/admin-maintenance.d.ts +3 -0
- package/dist/src/routes/admin-maintenance.d.ts.map +1 -1
- package/dist/src/routes/admin-maintenance.js +20 -0
- package/dist/src/routes/admin-maintenance.js.map +1 -1
- package/dist/src/routes/admin-storage-stats.d.ts +17 -0
- package/dist/src/routes/admin-storage-stats.d.ts.map +1 -0
- package/dist/src/routes/admin-storage-stats.js +56 -0
- package/dist/src/routes/admin-storage-stats.js.map +1 -0
- package/dist/src/routes/admin.d.ts +1 -0
- package/dist/src/routes/admin.d.ts.map +1 -1
- package/dist/src/routes/admin.js +10 -12
- package/dist/src/routes/admin.js.map +1 -1
- package/dist/src/routes/agent-activity.d.ts +6 -0
- package/dist/src/routes/agent-activity.d.ts.map +1 -1
- package/dist/src/routes/agent-activity.js +57 -0
- package/dist/src/routes/agent-activity.js.map +1 -1
- package/dist/src/routes/agent-directives.d.ts.map +1 -1
- package/dist/src/routes/agent-directives.js +30 -0
- package/dist/src/routes/agent-directives.js.map +1 -1
- package/dist/src/routes/agent-messages.d.ts +2 -0
- package/dist/src/routes/agent-messages.d.ts.map +1 -1
- package/dist/src/routes/agent-messages.js +18 -0
- package/dist/src/routes/agent-messages.js.map +1 -1
- package/dist/src/routes/agent-onboarding.d.ts +16 -0
- package/dist/src/routes/agent-onboarding.d.ts.map +1 -1
- package/dist/src/routes/agent-onboarding.js +6 -1
- package/dist/src/routes/agent-onboarding.js.map +1 -1
- package/dist/src/routes/agent-webhook.d.ts +3 -0
- package/dist/src/routes/agent-webhook.d.ts.map +1 -1
- package/dist/src/routes/agent-webhook.js +28 -0
- package/dist/src/routes/agent-webhook.js.map +1 -1
- package/dist/src/routes/agents/device-auth.d.ts +10 -0
- package/dist/src/routes/agents/device-auth.d.ts.map +1 -1
- package/dist/src/routes/agents/device-auth.js +241 -139
- package/dist/src/routes/agents/device-auth.js.map +1 -1
- package/dist/src/routes/agents/offers.d.ts +4 -0
- package/dist/src/routes/agents/offers.d.ts.map +1 -1
- package/dist/src/routes/agents/offers.js +0 -0
- package/dist/src/routes/agents/offers.js.map +1 -1
- package/dist/src/routes/agents/profile-metadata.d.ts +3 -0
- package/dist/src/routes/agents/profile-metadata.d.ts.map +1 -1
- package/dist/src/routes/agents/profile-metadata.js +23 -10
- package/dist/src/routes/agents/profile-metadata.js.map +1 -1
- package/dist/src/routes/app-grants.d.ts +6 -0
- package/dist/src/routes/app-grants.d.ts.map +1 -1
- package/dist/src/routes/app-grants.js +37 -2
- package/dist/src/routes/app-grants.js.map +1 -1
- package/dist/src/routes/appdev-overview.d.ts +17 -0
- package/dist/src/routes/appdev-overview.d.ts.map +1 -0
- package/dist/src/routes/appdev-overview.js +75 -0
- package/dist/src/routes/appdev-overview.js.map +1 -0
- package/dist/src/routes/appdev-pitfalls.d.ts +20 -0
- package/dist/src/routes/appdev-pitfalls.d.ts.map +1 -0
- package/dist/src/routes/appdev-pitfalls.js +103 -0
- package/dist/src/routes/appdev-pitfalls.js.map +1 -0
- package/dist/src/routes/appeals.d.ts +1 -0
- package/dist/src/routes/appeals.d.ts.map +1 -1
- package/dist/src/routes/appeals.js +3 -1
- package/dist/src/routes/appeals.js.map +1 -1
- package/dist/src/routes/apps/agents-deploy.d.ts +24 -0
- package/dist/src/routes/apps/agents-deploy.d.ts.map +1 -0
- package/dist/src/routes/apps/agents-deploy.js +214 -0
- package/dist/src/routes/apps/agents-deploy.js.map +1 -0
- package/dist/src/routes/apps/catalogue-admin.d.ts +5 -0
- package/dist/src/routes/apps/catalogue-admin.d.ts.map +1 -1
- package/dist/src/routes/apps/catalogue-admin.js +34 -10
- package/dist/src/routes/apps/catalogue-admin.js.map +1 -1
- package/dist/src/routes/apps/drafts.d.ts +2 -0
- package/dist/src/routes/apps/drafts.d.ts.map +1 -1
- package/dist/src/routes/apps/drafts.js +4 -0
- package/dist/src/routes/apps/drafts.js.map +1 -1
- package/dist/src/routes/apps/fork-manage.d.ts +3 -1
- package/dist/src/routes/apps/fork-manage.d.ts.map +1 -1
- package/dist/src/routes/apps/fork-manage.js +50 -1
- package/dist/src/routes/apps/fork-manage.js.map +1 -1
- package/dist/src/routes/apps/publish.d.ts +7 -0
- package/dist/src/routes/apps/publish.d.ts.map +1 -1
- package/dist/src/routes/apps/publish.js +69 -1
- package/dist/src/routes/apps/publish.js.map +1 -1
- package/dist/src/routes/apps-cost.d.ts +25 -0
- package/dist/src/routes/apps-cost.d.ts.map +1 -0
- package/dist/src/routes/apps-cost.js +107 -0
- package/dist/src/routes/apps-cost.js.map +1 -0
- package/dist/src/routes/apps.d.ts +2 -0
- package/dist/src/routes/apps.d.ts.map +1 -1
- package/dist/src/routes/apps.js +4 -0
- package/dist/src/routes/apps.js.map +1 -1
- package/dist/src/routes/auth.d.ts +2 -0
- package/dist/src/routes/auth.d.ts.map +1 -1
- package/dist/src/routes/auth.js +11 -0
- package/dist/src/routes/auth.js.map +1 -1
- package/dist/src/routes/bootstrap.d.ts +5 -0
- package/dist/src/routes/bootstrap.d.ts.map +1 -1
- package/dist/src/routes/bootstrap.js +21 -14
- package/dist/src/routes/bootstrap.js.map +1 -1
- package/dist/src/routes/calibrator.d.ts +2 -0
- package/dist/src/routes/calibrator.d.ts.map +1 -1
- package/dist/src/routes/calibrator.js +43 -0
- package/dist/src/routes/calibrator.js.map +1 -1
- package/dist/src/routes/catalogue.d.ts +2 -0
- package/dist/src/routes/catalogue.d.ts.map +1 -1
- package/dist/src/routes/catalogue.js +20 -30
- package/dist/src/routes/catalogue.js.map +1 -1
- package/dist/src/routes/commerce.d.ts.map +1 -1
- package/dist/src/routes/commerce.js +18 -8
- package/dist/src/routes/commerce.js.map +1 -1
- package/dist/src/routes/consent.d.ts.map +1 -1
- package/dist/src/routes/consent.js +10 -0
- package/dist/src/routes/consent.js.map +1 -1
- package/dist/src/routes/contacts.d.ts +20 -0
- package/dist/src/routes/contacts.d.ts.map +1 -0
- package/dist/src/routes/contacts.js +86 -0
- package/dist/src/routes/contacts.js.map +1 -0
- package/dist/src/routes/ecosystem-apps.d.ts +2 -0
- package/dist/src/routes/ecosystem-apps.d.ts.map +1 -1
- package/dist/src/routes/ecosystem-apps.js +34 -0
- package/dist/src/routes/ecosystem-apps.js.map +1 -1
- package/dist/src/routes/exchange-market.d.ts +28 -0
- package/dist/src/routes/exchange-market.d.ts.map +1 -0
- package/dist/src/routes/exchange-market.js +454 -0
- package/dist/src/routes/exchange-market.js.map +1 -0
- package/dist/src/routes/exchange.d.ts +33 -0
- package/dist/src/routes/exchange.d.ts.map +1 -0
- package/dist/src/routes/exchange.js +395 -0
- package/dist/src/routes/exchange.js.map +1 -0
- package/dist/src/routes/extensions/actions.d.ts +3 -0
- package/dist/src/routes/extensions/actions.d.ts.map +1 -1
- package/dist/src/routes/extensions/actions.js +43 -6
- package/dist/src/routes/extensions/actions.js.map +1 -1
- package/dist/src/routes/extensions/entitlement-gate.d.ts +33 -0
- package/dist/src/routes/extensions/entitlement-gate.d.ts.map +1 -0
- package/dist/src/routes/extensions/entitlement-gate.js +143 -0
- package/dist/src/routes/extensions/entitlement-gate.js.map +1 -0
- package/dist/src/routes/extensions/manifest.d.ts +11 -0
- package/dist/src/routes/extensions/manifest.d.ts.map +1 -1
- package/dist/src/routes/extensions/manifest.js +100 -8
- package/dist/src/routes/extensions/manifest.js.map +1 -1
- package/dist/src/routes/extensions/paywall.d.ts +30 -0
- package/dist/src/routes/extensions/paywall.d.ts.map +1 -0
- package/dist/src/routes/extensions/paywall.js +116 -0
- package/dist/src/routes/extensions/paywall.js.map +1 -0
- package/dist/src/routes/federation-sync/messaging.d.ts.map +1 -1
- package/dist/src/routes/federation-sync/messaging.js +7 -1
- package/dist/src/routes/federation-sync/messaging.js.map +1 -1
- package/dist/src/routes/feedback.d.ts +23 -0
- package/dist/src/routes/feedback.d.ts.map +1 -0
- package/dist/src/routes/feedback.js +111 -0
- package/dist/src/routes/feedback.js.map +1 -0
- package/dist/src/routes/generator/projects.d.ts.map +1 -1
- package/dist/src/routes/generator/projects.js +18 -0
- package/dist/src/routes/generator/projects.js.map +1 -1
- package/dist/src/routes/generator/prompts.d.ts +14 -3
- package/dist/src/routes/generator/prompts.d.ts.map +1 -1
- package/dist/src/routes/generator/prompts.js +165 -90
- package/dist/src/routes/generator/prompts.js.map +1 -1
- package/dist/src/routes/generator.d.ts +2 -0
- package/dist/src/routes/generator.d.ts.map +1 -1
- package/dist/src/routes/generator.js +2 -0
- package/dist/src/routes/generator.js.map +1 -1
- package/dist/src/routes/ghii/profile.d.ts +2 -0
- package/dist/src/routes/ghii/profile.d.ts.map +1 -1
- package/dist/src/routes/ghii/profile.js +16 -11
- package/dist/src/routes/ghii/profile.js.map +1 -1
- package/dist/src/routes/ghii/recovery.d.ts +2 -0
- package/dist/src/routes/ghii/recovery.d.ts.map +1 -1
- package/dist/src/routes/ghii/recovery.js +7 -0
- package/dist/src/routes/ghii/recovery.js.map +1 -1
- package/dist/src/routes/ghii/register-login.d.ts +4 -0
- package/dist/src/routes/ghii/register-login.d.ts.map +1 -1
- package/dist/src/routes/ghii/register-login.js +45 -22
- package/dist/src/routes/ghii/register-login.js.map +1 -1
- package/dist/src/routes/ghii/web-verify.d.ts +5 -0
- package/dist/src/routes/ghii/web-verify.d.ts.map +1 -1
- package/dist/src/routes/ghii/web-verify.js +24 -3
- package/dist/src/routes/ghii/web-verify.js.map +1 -1
- package/dist/src/routes/knowledge/admin.d.ts +1 -0
- package/dist/src/routes/knowledge/admin.d.ts.map +1 -1
- package/dist/src/routes/knowledge/admin.js +30 -40
- package/dist/src/routes/knowledge/admin.js.map +1 -1
- package/dist/src/routes/knowledge/helpers.d.ts +1 -0
- package/dist/src/routes/knowledge/helpers.d.ts.map +1 -1
- package/dist/src/routes/knowledge/helpers.js +5 -1
- package/dist/src/routes/knowledge/helpers.js.map +1 -1
- package/dist/src/routes/knowledge/organism.d.ts +1 -0
- package/dist/src/routes/knowledge/organism.d.ts.map +1 -1
- package/dist/src/routes/knowledge/organism.js +7 -11
- package/dist/src/routes/knowledge/organism.js.map +1 -1
- package/dist/src/routes/knowledge/packages-core.d.ts +1 -0
- package/dist/src/routes/knowledge/packages-core.d.ts.map +1 -1
- package/dist/src/routes/knowledge/packages-core.js +6 -16
- package/dist/src/routes/knowledge/packages-core.js.map +1 -1
- package/dist/src/routes/knowledge/sharing.d.ts +1 -0
- package/dist/src/routes/knowledge/sharing.d.ts.map +1 -1
- package/dist/src/routes/knowledge/sharing.js +11 -31
- package/dist/src/routes/knowledge/sharing.js.map +1 -1
- package/dist/src/routes/knowledge.d.ts +2 -0
- package/dist/src/routes/knowledge.d.ts.map +1 -1
- package/dist/src/routes/knowledge.js +15 -0
- package/dist/src/routes/knowledge.js.map +1 -1
- package/dist/src/routes/ledger.d.ts +4 -0
- package/dist/src/routes/ledger.d.ts.map +1 -1
- package/dist/src/routes/ledger.js +93 -53
- package/dist/src/routes/ledger.js.map +1 -1
- package/dist/src/routes/lib-data.d.ts +2 -0
- package/dist/src/routes/lib-data.d.ts.map +1 -1
- package/dist/src/routes/lib-data.js +7 -4
- package/dist/src/routes/lib-data.js.map +1 -1
- package/dist/src/routes/lib-intake.d.ts +21 -0
- package/dist/src/routes/lib-intake.d.ts.map +1 -0
- package/dist/src/routes/lib-intake.js +63 -0
- package/dist/src/routes/lib-intake.js.map +1 -0
- package/dist/src/routes/lib-organism.d.ts +13 -0
- package/dist/src/routes/lib-organism.d.ts.map +1 -1
- package/dist/src/routes/lib-organism.js +80 -0
- package/dist/src/routes/lib-organism.js.map +1 -1
- package/dist/src/routes/lib-workflows.d.ts +24 -0
- package/dist/src/routes/lib-workflows.d.ts.map +1 -0
- package/dist/src/routes/lib-workflows.js +125 -0
- package/dist/src/routes/lib-workflows.js.map +1 -0
- package/dist/src/routes/library-packs.d.ts +31 -0
- package/dist/src/routes/library-packs.d.ts.map +1 -0
- package/dist/src/routes/library-packs.js +187 -0
- package/dist/src/routes/library-packs.js.map +1 -0
- package/dist/src/routes/libs/audio-lib-part2.d.ts +2 -0
- package/dist/src/routes/libs/audio-lib-part2.d.ts.map +1 -1
- package/dist/src/routes/libs/audio-lib-part2.js +4 -0
- package/dist/src/routes/libs/audio-lib-part2.js.map +1 -1
- package/dist/src/routes/libs/auth-lib-part2.d.ts +5 -0
- package/dist/src/routes/libs/auth-lib-part2.d.ts.map +1 -1
- package/dist/src/routes/libs/auth-lib-part2.js +118 -5
- package/dist/src/routes/libs/auth-lib-part2.js.map +1 -1
- package/dist/src/routes/libs/sdk-serve.d.ts +11 -0
- package/dist/src/routes/libs/sdk-serve.d.ts.map +1 -0
- package/dist/src/routes/libs/sdk-serve.js +53 -0
- package/dist/src/routes/libs/sdk-serve.js.map +1 -0
- package/dist/src/routes/libs.d.ts +17 -1
- package/dist/src/routes/libs.d.ts.map +1 -1
- package/dist/src/routes/libs.js +83 -285
- package/dist/src/routes/libs.js.map +1 -1
- package/dist/src/routes/living.d.ts +2 -0
- package/dist/src/routes/living.d.ts.map +1 -1
- package/dist/src/routes/living.js +12 -0
- package/dist/src/routes/living.js.map +1 -1
- package/dist/src/routes/matches.d.ts +3 -0
- package/dist/src/routes/matches.d.ts.map +1 -1
- package/dist/src/routes/matches.js +47 -51
- 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 +185 -70
- package/dist/src/routes/memory/bulk.js.map +1 -1
- package/dist/src/routes/memory/crud.d.ts +2 -0
- package/dist/src/routes/memory/crud.d.ts.map +1 -1
- package/dist/src/routes/memory/crud.js +70 -39
- package/dist/src/routes/memory/crud.js.map +1 -1
- package/dist/src/routes/memory/key.d.ts +2 -0
- package/dist/src/routes/memory/key.d.ts.map +1 -1
- package/dist/src/routes/memory/key.js +23 -4
- package/dist/src/routes/memory/key.js.map +1 -1
- package/dist/src/routes/memory/shared.d.ts +4 -0
- package/dist/src/routes/memory/shared.d.ts.map +1 -1
- package/dist/src/routes/memory/shared.js.map +1 -1
- package/dist/src/routes/memory.d.ts.map +1 -1
- package/dist/src/routes/memory.js +29 -1
- package/dist/src/routes/memory.js.map +1 -1
- package/dist/src/routes/messages.d.ts +9 -0
- package/dist/src/routes/messages.d.ts.map +1 -1
- package/dist/src/routes/messages.js +48 -26
- package/dist/src/routes/messages.js.map +1 -1
- package/dist/src/routes/notifications.d.ts +8 -3
- package/dist/src/routes/notifications.d.ts.map +1 -1
- package/dist/src/routes/notifications.js +53 -5
- package/dist/src/routes/notifications.js.map +1 -1
- package/dist/src/routes/organisms/crud.d.ts +6 -0
- package/dist/src/routes/organisms/crud.d.ts.map +1 -1
- package/dist/src/routes/organisms/crud.js +80 -62
- 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 +82 -1
- package/dist/src/routes/organisms/gates.js.map +1 -1
- package/dist/src/routes/organisms/intake.d.ts +29 -0
- package/dist/src/routes/organisms/intake.d.ts.map +1 -0
- package/dist/src/routes/organisms/intake.js +251 -0
- package/dist/src/routes/organisms/intake.js.map +1 -0
- package/dist/src/routes/organisms/membership.d.ts +4 -1
- package/dist/src/routes/organisms/membership.d.ts.map +1 -1
- package/dist/src/routes/organisms/membership.js +103 -60
- package/dist/src/routes/organisms/membership.js.map +1 -1
- package/dist/src/routes/organisms/shared.d.ts +28 -0
- package/dist/src/routes/organisms/shared.d.ts.map +1 -1
- package/dist/src/routes/organisms/shared.js +339 -26
- package/dist/src/routes/organisms/shared.js.map +1 -1
- package/dist/src/routes/organisms/workspace-access.d.ts +16 -0
- package/dist/src/routes/organisms/workspace-access.d.ts.map +1 -1
- package/dist/src/routes/organisms/workspace-access.js +174 -72
- package/dist/src/routes/organisms/workspace-access.js.map +1 -1
- package/dist/src/routes/organisms/workspace-ops.d.ts +6 -0
- package/dist/src/routes/organisms/workspace-ops.d.ts.map +1 -1
- package/dist/src/routes/organisms/workspace-ops.js +224 -11
- package/dist/src/routes/organisms/workspace-ops.js.map +1 -1
- package/dist/src/routes/organisms/workspace-read.d.ts +4 -0
- package/dist/src/routes/organisms/workspace-read.d.ts.map +1 -1
- package/dist/src/routes/organisms/workspace-read.js +14 -6
- package/dist/src/routes/organisms/workspace-read.js.map +1 -1
- package/dist/src/routes/organisms.d.ts.map +1 -1
- package/dist/src/routes/organisms.js +2 -0
- package/dist/src/routes/organisms.js.map +1 -1
- package/dist/src/routes/owners.d.ts +2 -0
- package/dist/src/routes/owners.d.ts.map +1 -1
- package/dist/src/routes/owners.js +17 -7
- package/dist/src/routes/owners.js.map +1 -1
- package/dist/src/routes/packages.d.ts.map +1 -1
- package/dist/src/routes/packages.js +10 -0
- package/dist/src/routes/packages.js.map +1 -1
- package/dist/src/routes/portal.d.ts +1 -1
- package/dist/src/routes/portal.d.ts.map +1 -1
- package/dist/src/routes/portal.js +3 -7
- package/dist/src/routes/portal.js.map +1 -1
- package/dist/src/routes/portfolio.d.ts +2 -0
- package/dist/src/routes/portfolio.d.ts.map +1 -1
- package/dist/src/routes/portfolio.js +41 -31
- 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 +23 -0
- package/dist/src/routes/prompts.js.map +1 -1
- package/dist/src/routes/schedules.d.ts +7 -0
- package/dist/src/routes/schedules.d.ts.map +1 -1
- package/dist/src/routes/schedules.js +102 -39
- package/dist/src/routes/schedules.js.map +1 -1
- package/dist/src/routes/unfurl.d.ts +27 -0
- package/dist/src/routes/unfurl.d.ts.map +1 -0
- package/dist/src/routes/unfurl.js +180 -0
- package/dist/src/routes/unfurl.js.map +1 -0
- package/dist/src/routes/upload.d.ts +6 -0
- package/dist/src/routes/upload.d.ts.map +1 -1
- package/dist/src/routes/upload.js +28 -1
- package/dist/src/routes/upload.js.map +1 -1
- package/dist/src/routes/usage.d.ts +9 -5
- package/dist/src/routes/usage.d.ts.map +1 -1
- package/dist/src/routes/usage.js +26 -5
- package/dist/src/routes/usage.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 +17 -1
- package/dist/src/routes/wallet.js.map +1 -1
- package/dist/src/routes/webmcp.d.ts +3 -0
- package/dist/src/routes/webmcp.d.ts.map +1 -1
- package/dist/src/routes/webmcp.js +55 -0
- package/dist/src/routes/webmcp.js.map +1 -1
- package/dist/src/routes/work.d.ts.map +1 -1
- package/dist/src/routes/work.js +14 -9
- package/dist/src/routes/work.js.map +1 -1
- package/dist/src/routes/workflows.d.ts +4 -0
- package/dist/src/routes/workflows.d.ts.map +1 -1
- package/dist/src/routes/workflows.js +58 -1
- package/dist/src/routes/workflows.js.map +1 -1
- package/dist/src/server-bootstrap/config-init.d.ts.map +1 -1
- package/dist/src/server-bootstrap/config-init.js +7 -6
- package/dist/src/server-bootstrap/config-init.js.map +1 -1
- package/dist/src/server-bootstrap/routes-loader.d.ts +2 -0
- package/dist/src/server-bootstrap/routes-loader.d.ts.map +1 -1
- package/dist/src/server-bootstrap/routes-loader.js +35 -7
- package/dist/src/server-bootstrap/routes-loader.js.map +1 -1
- package/dist/src/server.d.ts.map +1 -1
- package/dist/src/server.js +4 -0
- package/dist/src/server.js.map +1 -1
- package/dist/src/services/agent-face.d.ts +10 -2
- package/dist/src/services/agent-face.d.ts.map +1 -1
- package/dist/src/services/agent-face.js +10 -4
- package/dist/src/services/agent-face.js.map +1 -1
- package/dist/src/services/app-agent-deploy.d.ts +26 -0
- package/dist/src/services/app-agent-deploy.d.ts.map +1 -0
- package/dist/src/services/app-agent-deploy.js +91 -0
- package/dist/src/services/app-agent-deploy.js.map +1 -0
- package/dist/src/services/app-template-proposals.d.ts +94 -0
- package/dist/src/services/app-template-proposals.d.ts.map +1 -0
- package/dist/src/services/app-template-proposals.js +114 -0
- package/dist/src/services/app-template-proposals.js.map +1 -0
- package/dist/src/services/app-tool-interfaces.d.ts +37 -0
- package/dist/src/services/app-tool-interfaces.d.ts.map +1 -0
- package/dist/src/services/app-tool-interfaces.js +101 -0
- package/dist/src/services/app-tool-interfaces.js.map +1 -0
- package/dist/src/services/appdev-flow-constants.d.ts +33 -0
- package/dist/src/services/appdev-flow-constants.d.ts.map +1 -0
- package/dist/src/services/appdev-flow-constants.js +43 -0
- package/dist/src/services/appdev-flow-constants.js.map +1 -0
- package/dist/src/services/appdev-flow-prompt.d.ts +15 -0
- package/dist/src/services/appdev-flow-prompt.d.ts.map +1 -0
- package/dist/src/services/appdev-flow-prompt.js +40 -0
- package/dist/src/services/appdev-flow-prompt.js.map +1 -0
- package/dist/src/services/appdev-kb.d.ts +71 -0
- package/dist/src/services/appdev-kb.d.ts.map +1 -0
- package/dist/src/services/appdev-kb.js +178 -0
- package/dist/src/services/appdev-kb.js.map +1 -0
- package/dist/src/services/appdev-overview.d.ts +28 -0
- package/dist/src/services/appdev-overview.d.ts.map +1 -0
- package/dist/src/services/appdev-overview.js +189 -0
- package/dist/src/services/appdev-overview.js.map +1 -0
- package/dist/src/services/build-app-prompt.d.ts +17 -0
- package/dist/src/services/build-app-prompt.d.ts.map +1 -1
- package/dist/src/services/build-app-prompt.js +74 -35
- package/dist/src/services/build-app-prompt.js.map +1 -1
- package/dist/src/services/config-schema.d.ts.map +1 -1
- package/dist/src/services/config-schema.js +1 -3
- package/dist/src/services/config-schema.js.map +1 -1
- package/dist/src/services/consent.d.ts.map +1 -1
- package/dist/src/services/consent.js +8 -3
- package/dist/src/services/consent.js.map +1 -1
- package/dist/src/services/contacts.d.ts +88 -0
- package/dist/src/services/contacts.d.ts.map +1 -0
- package/dist/src/services/contacts.js +163 -0
- package/dist/src/services/contacts.js.map +1 -0
- package/dist/src/services/core-jobs.d.ts +4 -0
- package/dist/src/services/core-jobs.d.ts.map +1 -1
- package/dist/src/services/core-jobs.js +23 -0
- package/dist/src/services/core-jobs.js.map +1 -1
- package/dist/src/services/dangling-refs.d.ts +2 -0
- package/dist/src/services/dangling-refs.d.ts.map +1 -1
- package/dist/src/services/dangling-refs.js +3 -2
- package/dist/src/services/dangling-refs.js.map +1 -1
- package/dist/src/services/db/access-tab-db-service.d.ts +49 -0
- package/dist/src/services/db/access-tab-db-service.d.ts.map +1 -0
- package/dist/src/services/db/access-tab-db-service.js +87 -0
- package/dist/src/services/db/access-tab-db-service.js.map +1 -0
- package/dist/src/services/db/agent-activity-overview-db-service.d.ts +62 -0
- package/dist/src/services/db/agent-activity-overview-db-service.d.ts.map +1 -0
- package/dist/src/services/db/agent-activity-overview-db-service.js +88 -0
- package/dist/src/services/db/agent-activity-overview-db-service.js.map +1 -0
- package/dist/src/services/db/agent-data-access-overview-db-service.d.ts +45 -0
- package/dist/src/services/db/agent-data-access-overview-db-service.d.ts.map +1 -0
- package/dist/src/services/db/agent-data-access-overview-db-service.js +42 -0
- package/dist/src/services/db/agent-data-access-overview-db-service.js.map +1 -0
- package/dist/src/services/db/agent-db-service.d.ts +58 -0
- package/dist/src/services/db/agent-db-service.d.ts.map +1 -0
- package/dist/src/services/db/agent-db-service.js +49 -0
- package/dist/src/services/db/agent-db-service.js.map +1 -0
- package/dist/src/services/db/agent-integration-overview-db-service.d.ts +44 -0
- package/dist/src/services/db/agent-integration-overview-db-service.d.ts.map +1 -0
- package/dist/src/services/db/agent-integration-overview-db-service.js +44 -0
- package/dist/src/services/db/agent-integration-overview-db-service.js.map +1 -0
- package/dist/src/services/db/agent-messages-overview-db-service.d.ts +40 -0
- package/dist/src/services/db/agent-messages-overview-db-service.d.ts.map +1 -0
- package/dist/src/services/db/agent-messages-overview-db-service.js +47 -0
- package/dist/src/services/db/agent-messages-overview-db-service.js.map +1 -0
- package/dist/src/services/db/agent-quality-overview-db-service.d.ts +43 -0
- package/dist/src/services/db/agent-quality-overview-db-service.d.ts.map +1 -0
- package/dist/src/services/db/agent-quality-overview-db-service.js +34 -0
- package/dist/src/services/db/agent-quality-overview-db-service.js.map +1 -0
- package/dist/src/services/db/calibrator-detail-db-service.d.ts +41 -0
- package/dist/src/services/db/calibrator-detail-db-service.d.ts.map +1 -0
- package/dist/src/services/db/calibrator-detail-db-service.js +61 -0
- package/dist/src/services/db/calibrator-detail-db-service.js.map +1 -0
- package/dist/src/services/db/data-wallet-db-service.d.ts +48 -0
- package/dist/src/services/db/data-wallet-db-service.d.ts.map +1 -0
- package/dist/src/services/db/data-wallet-db-service.js +74 -0
- package/dist/src/services/db/data-wallet-db-service.js.map +1 -0
- package/dist/src/services/db/generator-state-db-service.d.ts +48 -0
- package/dist/src/services/db/generator-state-db-service.d.ts.map +1 -0
- package/dist/src/services/db/generator-state-db-service.js +45 -0
- package/dist/src/services/db/generator-state-db-service.js.map +1 -0
- package/dist/src/services/db/home-dashboard-service.d.ts +65 -0
- package/dist/src/services/db/home-dashboard-service.d.ts.map +1 -0
- package/dist/src/services/db/home-dashboard-service.js +57 -0
- package/dist/src/services/db/home-dashboard-service.js.map +1 -0
- package/dist/src/services/db/index.d.ts +48 -0
- package/dist/src/services/db/index.d.ts.map +1 -0
- package/dist/src/services/db/index.js +40 -0
- package/dist/src/services/db/index.js.map +1 -0
- package/dist/src/services/db/knowledge-tab-db-service.d.ts +35 -0
- package/dist/src/services/db/knowledge-tab-db-service.d.ts.map +1 -0
- package/dist/src/services/db/knowledge-tab-db-service.js +37 -0
- package/dist/src/services/db/knowledge-tab-db-service.js.map +1 -0
- package/dist/src/services/db/living-docs-db-service.d.ts +43 -0
- package/dist/src/services/db/living-docs-db-service.d.ts.map +1 -0
- package/dist/src/services/db/living-docs-db-service.js +45 -0
- package/dist/src/services/db/living-docs-db-service.js.map +1 -0
- package/dist/src/services/db/memory-db-service.d.ts +122 -0
- package/dist/src/services/db/memory-db-service.d.ts.map +1 -0
- package/dist/src/services/db/memory-db-service.js +171 -0
- package/dist/src/services/db/memory-db-service.js.map +1 -0
- package/dist/src/services/db/memory-tab-db-service.d.ts +54 -0
- package/dist/src/services/db/memory-tab-db-service.d.ts.map +1 -0
- package/dist/src/services/db/memory-tab-db-service.js +94 -0
- package/dist/src/services/db/memory-tab-db-service.js.map +1 -0
- package/dist/src/services/db/messages-inbox-db-service.d.ts +47 -0
- package/dist/src/services/db/messages-inbox-db-service.d.ts.map +1 -0
- package/dist/src/services/db/messages-inbox-db-service.js +76 -0
- package/dist/src/services/db/messages-inbox-db-service.js.map +1 -0
- package/dist/src/services/db/messaging-db-service.d.ts +40 -0
- package/dist/src/services/db/messaging-db-service.d.ts.map +1 -0
- package/dist/src/services/db/messaging-db-service.js +55 -0
- package/dist/src/services/db/messaging-db-service.js.map +1 -0
- package/dist/src/services/db/notebook-db-service.d.ts +35 -0
- package/dist/src/services/db/notebook-db-service.d.ts.map +1 -0
- package/dist/src/services/db/notebook-db-service.js +44 -0
- package/dist/src/services/db/notebook-db-service.js.map +1 -0
- package/dist/src/services/db/owner-identity.d.ts +36 -0
- package/dist/src/services/db/owner-identity.d.ts.map +1 -0
- package/dist/src/services/db/owner-identity.js +27 -0
- package/dist/src/services/db/owner-identity.js.map +1 -0
- package/dist/src/services/db/packages-tab-db-service.d.ts +42 -0
- package/dist/src/services/db/packages-tab-db-service.d.ts.map +1 -0
- package/dist/src/services/db/packages-tab-db-service.js +33 -0
- package/dist/src/services/db/packages-tab-db-service.js.map +1 -0
- package/dist/src/services/db/security-tab-db-service.d.ts +47 -0
- package/dist/src/services/db/security-tab-db-service.d.ts.map +1 -0
- package/dist/src/services/db/security-tab-db-service.js +61 -0
- package/dist/src/services/db/security-tab-db-service.js.map +1 -0
- package/dist/src/services/db/wallet-tab-db-service.d.ts +47 -0
- package/dist/src/services/db/wallet-tab-db-service.d.ts.map +1 -0
- package/dist/src/services/db/wallet-tab-db-service.js +80 -0
- package/dist/src/services/db/wallet-tab-db-service.js.map +1 -0
- package/dist/src/services/db/work-tab-db-service.d.ts +32 -0
- package/dist/src/services/db/work-tab-db-service.d.ts.map +1 -0
- package/dist/src/services/db/work-tab-db-service.js +49 -0
- package/dist/src/services/db/work-tab-db-service.js.map +1 -0
- package/dist/src/services/directory.d.ts +1 -0
- package/dist/src/services/directory.d.ts.map +1 -1
- package/dist/src/services/directory.js +6 -2
- package/dist/src/services/directory.js.map +1 -1
- package/dist/src/services/discovery/setup.d.ts +3 -0
- package/dist/src/services/discovery/setup.d.ts.map +1 -1
- package/dist/src/services/discovery/setup.js +2 -0
- package/dist/src/services/discovery/setup.js.map +1 -1
- package/dist/src/services/discovery/sources/memory-source.d.ts +2 -0
- package/dist/src/services/discovery/sources/memory-source.d.ts.map +1 -1
- package/dist/src/services/discovery/sources/memory-source.js.map +1 -1
- package/dist/src/services/discovery/sources/templates-source.d.ts +20 -0
- package/dist/src/services/discovery/sources/templates-source.d.ts.map +1 -0
- package/dist/src/services/discovery/sources/templates-source.js +52 -0
- package/dist/src/services/discovery/sources/templates-source.js.map +1 -0
- package/dist/src/services/entitlement-money.d.ts +55 -0
- package/dist/src/services/entitlement-money.d.ts.map +1 -0
- package/dist/src/services/entitlement-money.js +68 -0
- package/dist/src/services/entitlement-money.js.map +1 -0
- package/dist/src/services/exchange-market.d.ts +247 -0
- package/dist/src/services/exchange-market.d.ts.map +1 -0
- package/dist/src/services/exchange-market.js +254 -0
- package/dist/src/services/exchange-market.js.map +1 -0
- package/dist/src/services/exchange-proposals.d.ts +47 -0
- package/dist/src/services/exchange-proposals.d.ts.map +1 -0
- package/dist/src/services/exchange-proposals.js +71 -0
- package/dist/src/services/exchange-proposals.js.map +1 -0
- package/dist/src/services/exchange-work.d.ts +30 -0
- package/dist/src/services/exchange-work.d.ts.map +1 -0
- package/dist/src/services/exchange-work.js +43 -0
- package/dist/src/services/exchange-work.js.map +1 -0
- package/dist/src/services/ext-pay-token.d.ts +29 -0
- package/dist/src/services/ext-pay-token.d.ts.map +1 -0
- package/dist/src/services/ext-pay-token.js +63 -0
- package/dist/src/services/ext-pay-token.js.map +1 -0
- package/dist/src/services/extension-runtime.d.ts.map +1 -1
- package/dist/src/services/extension-runtime.js +9 -2
- package/dist/src/services/extension-runtime.js.map +1 -1
- package/dist/src/services/feedback.d.ts +38 -0
- package/dist/src/services/feedback.d.ts.map +1 -0
- package/dist/src/services/feedback.js +118 -0
- package/dist/src/services/feedback.js.map +1 -0
- package/dist/src/services/generator-autopilot.d.ts.map +1 -1
- package/dist/src/services/generator-autopilot.js +12 -19
- package/dist/src/services/generator-autopilot.js.map +1 -1
- package/dist/src/services/generator-prompt-seeds/blueprint-prompts.d.ts.map +1 -1
- package/dist/src/services/generator-prompt-seeds/blueprint-prompts.js +28 -1
- package/dist/src/services/generator-prompt-seeds/blueprint-prompts.js.map +1 -1
- package/dist/src/services/generator-prompt-seeds/cortex-code.d.ts +5 -0
- package/dist/src/services/generator-prompt-seeds/cortex-code.d.ts.map +1 -1
- package/dist/src/services/generator-prompt-seeds/cortex-code.js +54 -3
- package/dist/src/services/generator-prompt-seeds/cortex-code.js.map +1 -1
- package/dist/src/services/generator-prompt-seeds/extension-prompts.d.ts.map +1 -1
- package/dist/src/services/generator-prompt-seeds/extension-prompts.js +106 -2
- package/dist/src/services/generator-prompt-seeds/extension-prompts.js.map +1 -1
- package/dist/src/services/generator-prompt-seeds/shared-fragments.js +1 -1
- package/dist/src/services/generator-prompts/resolvers-blueprint.d.ts.map +1 -1
- package/dist/src/services/generator-prompts/resolvers-blueprint.js +9 -0
- package/dist/src/services/generator-prompts/resolvers-blueprint.js.map +1 -1
- package/dist/src/services/generator-prompts/resolvers-cortex.d.ts.map +1 -1
- package/dist/src/services/generator-prompts/resolvers-cortex.js +4 -0
- package/dist/src/services/generator-prompts/resolvers-cortex.js.map +1 -1
- package/dist/src/services/generator-prompts/resolvers-fix.d.ts +4 -0
- package/dist/src/services/generator-prompts/resolvers-fix.d.ts.map +1 -1
- package/dist/src/services/generator-prompts/resolvers-fix.js +68 -0
- package/dist/src/services/generator-prompts/resolvers-fix.js.map +1 -1
- package/dist/src/services/generator-prompts/resolvers.d.ts.map +1 -1
- package/dist/src/services/generator-prompts/resolvers.js +5 -1
- package/dist/src/services/generator-prompts/resolvers.js.map +1 -1
- package/dist/src/services/generator-prompts/types.d.ts +9 -0
- package/dist/src/services/generator-prompts/types.d.ts.map +1 -1
- package/dist/src/services/handbooks/agent.d.ts +2 -1
- package/dist/src/services/handbooks/agent.d.ts.map +1 -1
- package/dist/src/services/handbooks/agent.js +8 -0
- package/dist/src/services/handbooks/agent.js.map +1 -1
- package/dist/src/services/handbooks/appdev.d.ts +2 -1
- package/dist/src/services/handbooks/appdev.d.ts.map +1 -1
- package/dist/src/services/handbooks/appdev.js +19 -0
- package/dist/src/services/handbooks/appdev.js.map +1 -1
- package/dist/src/services/invitations.d.ts +76 -1
- package/dist/src/services/invitations.d.ts.map +1 -1
- package/dist/src/services/invitations.js +295 -9
- package/dist/src/services/invitations.js.map +1 -1
- package/dist/src/services/job-seeding.d.ts.map +1 -1
- package/dist/src/services/job-seeding.js +2 -0
- package/dist/src/services/job-seeding.js.map +1 -1
- package/dist/src/services/living-author.js +1 -1
- package/dist/src/services/living-author.js.map +1 -1
- package/dist/src/services/llm-strip.d.ts +13 -0
- package/dist/src/services/llm-strip.d.ts.map +1 -0
- package/dist/src/services/llm-strip.js +60 -0
- package/dist/src/services/llm-strip.js.map +1 -0
- package/dist/src/services/manifest-schema.d.ts.map +1 -1
- package/dist/src/services/manifest-schema.js +1 -0
- package/dist/src/services/manifest-schema.js.map +1 -1
- package/dist/src/services/matching.d.ts +1 -0
- package/dist/src/services/matching.d.ts.map +1 -1
- package/dist/src/services/matching.js +28 -19
- package/dist/src/services/matching.js.map +1 -1
- package/dist/src/services/message-send.d.ts.map +1 -1
- package/dist/src/services/message-send.js +9 -1
- package/dist/src/services/message-send.js.map +1 -1
- package/dist/src/services/metered-entitlements.d.ts +203 -0
- package/dist/src/services/metered-entitlements.d.ts.map +1 -0
- package/dist/src/services/metered-entitlements.js +264 -0
- package/dist/src/services/metered-entitlements.js.map +1 -0
- package/dist/src/services/notebook-classify.js +1 -1
- package/dist/src/services/notebook-classify.js.map +1 -1
- package/dist/src/services/notebook-plan.js +1 -1
- package/dist/src/services/notebook-plan.js.map +1 -1
- package/dist/src/services/notify.d.ts +52 -0
- package/dist/src/services/notify.d.ts.map +1 -1
- package/dist/src/services/notify.js +56 -2
- package/dist/src/services/notify.js.map +1 -1
- package/dist/src/services/owner-memory.d.ts +25 -0
- package/dist/src/services/owner-memory.d.ts.map +1 -1
- package/dist/src/services/owner-memory.js +65 -18
- package/dist/src/services/owner-memory.js.map +1 -1
- package/dist/src/services/owner-provisioning.d.ts +5 -0
- package/dist/src/services/owner-provisioning.d.ts.map +1 -1
- package/dist/src/services/owner-provisioning.js +20 -2
- package/dist/src/services/owner-provisioning.js.map +1 -1
- package/dist/src/services/perf-trace.d.ts +43 -0
- package/dist/src/services/perf-trace.d.ts.map +1 -0
- package/dist/src/services/perf-trace.js +149 -0
- package/dist/src/services/perf-trace.js.map +1 -0
- package/dist/src/services/prompt-defaults.d.ts.map +1 -1
- package/dist/src/services/prompt-defaults.js +0 -5
- package/dist/src/services/prompt-defaults.js.map +1 -1
- package/dist/src/services/push.d.ts +5 -0
- package/dist/src/services/push.d.ts.map +1 -1
- package/dist/src/services/push.js.map +1 -1
- package/dist/src/services/quota.d.ts +3 -1
- package/dist/src/services/quota.d.ts.map +1 -1
- package/dist/src/services/quota.js +6 -9
- package/dist/src/services/quota.js.map +1 -1
- package/dist/src/services/structure-overview.d.ts +3 -0
- package/dist/src/services/structure-overview.d.ts.map +1 -1
- package/dist/src/services/structure-overview.js +3 -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 +24 -1
- package/dist/src/services/structure-snapshot.js.map +1 -1
- package/dist/src/services/tracked-classify.js +1 -1
- package/dist/src/services/tracked-classify.js.map +1 -1
- package/dist/src/services/usage-summary.d.ts +3 -0
- package/dist/src/services/usage-summary.d.ts.map +1 -1
- package/dist/src/services/usage-summary.js +31 -29
- package/dist/src/services/usage-summary.js.map +1 -1
- package/dist/src/services/workflow/engine-human.d.ts +33 -0
- package/dist/src/services/workflow/engine-human.d.ts.map +1 -0
- package/dist/src/services/workflow/engine-human.js +44 -0
- package/dist/src/services/workflow/engine-human.js.map +1 -0
- package/dist/src/services/workflow/engine-steps.d.ts +13 -0
- package/dist/src/services/workflow/engine-steps.d.ts.map +1 -1
- package/dist/src/services/workflow/engine-steps.js +33 -2
- package/dist/src/services/workflow/engine-steps.js.map +1 -1
- package/dist/src/services/workflow/engine.d.ts +20 -0
- package/dist/src/services/workflow/engine.d.ts.map +1 -1
- package/dist/src/services/workflow/engine.js +77 -3
- package/dist/src/services/workflow/engine.js.map +1 -1
- package/dist/src/services/workflow/store.d.ts +3 -0
- package/dist/src/services/workflow/store.d.ts.map +1 -1
- package/dist/src/services/workflow/store.js +29 -4
- package/dist/src/services/workflow/store.js.map +1 -1
- package/dist/src/services/workspace-access.d.ts +12 -0
- package/dist/src/services/workspace-access.d.ts.map +1 -1
- package/dist/src/services/workspace-access.js +24 -5
- package/dist/src/services/workspace-access.js.map +1 -1
- package/dist/src/services/workspace-provision.d.ts +51 -0
- package/dist/src/services/workspace-provision.d.ts.map +1 -0
- package/dist/src/services/workspace-provision.js +56 -0
- package/dist/src/services/workspace-provision.js.map +1 -0
- package/dist/src/services/workspace-versions.d.ts +110 -0
- package/dist/src/services/workspace-versions.d.ts.map +1 -0
- package/dist/src/services/workspace-versions.js +0 -0
- package/dist/src/services/workspace-versions.js.map +1 -0
- package/dist/src/storage/adapter/legacy-memory-adapter.d.ts +61 -0
- package/dist/src/storage/adapter/legacy-memory-adapter.d.ts.map +1 -0
- package/dist/src/storage/adapter/legacy-memory-adapter.js +135 -0
- package/dist/src/storage/adapter/legacy-memory-adapter.js.map +1 -0
- package/dist/src/storage/adapter/memory-adapter.d.ts +126 -0
- package/dist/src/storage/adapter/memory-adapter.d.ts.map +1 -0
- package/dist/src/storage/adapter/memory-adapter.js +2 -0
- package/dist/src/storage/adapter/memory-adapter.js.map +1 -0
- package/dist/src/storage/interface.d.ts +3 -1
- package/dist/src/storage/interface.d.ts.map +1 -1
- package/dist/src/storage/providers/mongodb/index.d.ts +28 -0
- package/dist/src/storage/providers/mongodb/index.d.ts.map +1 -1
- package/dist/src/storage/providers/mongodb/index.js +91 -1
- package/dist/src/storage/providers/mongodb/index.js.map +1 -1
- package/dist/src/storage/providers/mongodb/methods/apps.d.ts +9 -0
- package/dist/src/storage/providers/mongodb/methods/apps.d.ts.map +1 -1
- package/dist/src/storage/providers/mongodb/methods/apps.js +38 -0
- package/dist/src/storage/providers/mongodb/methods/apps.js.map +1 -1
- package/dist/src/storage/providers/mongodb/methods/governance.d.ts +5 -0
- package/dist/src/storage/providers/mongodb/methods/governance.d.ts.map +1 -1
- package/dist/src/storage/providers/mongodb/methods/governance.js +23 -2
- package/dist/src/storage/providers/mongodb/methods/governance.js.map +1 -1
- package/dist/src/storage/providers/mongodb/methods/identity.d.ts +6 -0
- package/dist/src/storage/providers/mongodb/methods/identity.d.ts.map +1 -1
- package/dist/src/storage/providers/mongodb/methods/identity.js +51 -9
- package/dist/src/storage/providers/mongodb/methods/identity.js.map +1 -1
- package/dist/src/storage/providers/mongodb/methods/owner-memory-scope.d.ts +34 -0
- package/dist/src/storage/providers/mongodb/methods/owner-memory-scope.d.ts.map +1 -0
- package/dist/src/storage/providers/mongodb/methods/owner-memory-scope.js +77 -0
- package/dist/src/storage/providers/mongodb/methods/owner-memory-scope.js.map +1 -0
- package/dist/src/storage/providers/mongodb/methods/owners-memory-bulk.d.ts +30 -0
- package/dist/src/storage/providers/mongodb/methods/owners-memory-bulk.d.ts.map +1 -0
- package/dist/src/storage/providers/mongodb/methods/owners-memory-bulk.js +0 -0
- package/dist/src/storage/providers/mongodb/methods/owners-memory-bulk.js.map +1 -0
- package/dist/src/storage/providers/mongodb/methods/owners.d.ts +8 -4
- package/dist/src/storage/providers/mongodb/methods/owners.d.ts.map +1 -1
- package/dist/src/storage/providers/mongodb/methods/owners.js +112 -21
- package/dist/src/storage/providers/mongodb/methods/owners.js.map +1 -1
- package/dist/src/storage/providers/mongodb/methods/sessions.d.ts.map +1 -1
- package/dist/src/storage/providers/mongodb/methods/sessions.js +4 -0
- package/dist/src/storage/providers/mongodb/methods/sessions.js.map +1 -1
- package/dist/src/storage/providers/mongodb/methods/storage-stats.d.ts +21 -0
- package/dist/src/storage/providers/mongodb/methods/storage-stats.d.ts.map +1 -0
- package/dist/src/storage/providers/mongodb/methods/storage-stats.js +58 -0
- package/dist/src/storage/providers/mongodb/methods/storage-stats.js.map +1 -0
- package/dist/src/storage/providers/mongodb/methods/work.d.ts +8 -0
- package/dist/src/storage/providers/mongodb/methods/work.d.ts.map +1 -1
- package/dist/src/storage/providers/mongodb/methods/work.js +42 -0
- package/dist/src/storage/providers/mongodb/methods/work.js.map +1 -1
- package/dist/src/storage/providers/postgres/index.d.ts +1 -0
- package/dist/src/storage/providers/postgres/index.d.ts.map +1 -1
- package/dist/src/storage/providers/postgres/index.js +1 -0
- package/dist/src/storage/providers/postgres/index.js.map +1 -1
- package/dist/src/storage/providers/postgres-kysely/db-types.d.ts +1538 -0
- package/dist/src/storage/providers/postgres-kysely/db-types.d.ts.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/db-types.js +6 -0
- package/dist/src/storage/providers/postgres-kysely/db-types.js.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/helpers.d.ts +23 -0
- package/dist/src/storage/providers/postgres-kysely/helpers.d.ts.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/helpers.js +91 -0
- package/dist/src/storage/providers/postgres-kysely/helpers.js.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/index.d.ts +38 -0
- package/dist/src/storage/providers/postgres-kysely/index.d.ts.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/index.js +81 -0
- package/dist/src/storage/providers/postgres-kysely/index.js.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/actions.d.ts +16 -0
- package/dist/src/storage/providers/postgres-kysely/methods/actions.d.ts.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/actions.js +103 -0
- package/dist/src/storage/providers/postgres-kysely/methods/actions.js.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/agent-misc.d.ts +37 -0
- package/dist/src/storage/providers/postgres-kysely/methods/agent-misc.d.ts.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/agent-misc.js +306 -0
- package/dist/src/storage/providers/postgres-kysely/methods/agent-misc.js.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/agent-msg-dispute-invite.d.ts +55 -0
- package/dist/src/storage/providers/postgres-kysely/methods/agent-msg-dispute-invite.d.ts.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/agent-msg-dispute-invite.js +247 -0
- package/dist/src/storage/providers/postgres-kysely/methods/agent-msg-dispute-invite.js.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/agent-onboarding.d.ts +11 -0
- package/dist/src/storage/providers/postgres-kysely/methods/agent-onboarding.d.ts.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/agent-onboarding.js +81 -0
- package/dist/src/storage/providers/postgres-kysely/methods/agent-onboarding.js.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/agent-tasks.d.ts +50 -0
- package/dist/src/storage/providers/postgres-kysely/methods/agent-tasks.d.ts.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/agent-tasks.js +238 -0
- package/dist/src/storage/providers/postgres-kysely/methods/agent-tasks.js.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/agent-usage.d.ts +10 -0
- package/dist/src/storage/providers/postgres-kysely/methods/agent-usage.d.ts.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/agent-usage.js +146 -0
- package/dist/src/storage/providers/postgres-kysely/methods/agent-usage.js.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/app-grants.d.ts +11 -0
- package/dist/src/storage/providers/postgres-kysely/methods/app-grants.d.ts.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/app-grants.js +51 -0
- package/dist/src/storage/providers/postgres-kysely/methods/app-grants.js.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/app-purchases.d.ts +10 -0
- package/dist/src/storage/providers/postgres-kysely/methods/app-purchases.d.ts.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/app-purchases.js +53 -0
- package/dist/src/storage/providers/postgres-kysely/methods/app-purchases.js.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/apps.d.ts +49 -0
- package/dist/src/storage/providers/postgres-kysely/methods/apps.d.ts.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/apps.js +369 -0
- package/dist/src/storage/providers/postgres-kysely/methods/apps.js.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/boards.d.ts +28 -0
- package/dist/src/storage/providers/postgres-kysely/methods/boards.d.ts.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/boards.js +104 -0
- package/dist/src/storage/providers/postgres-kysely/methods/boards.js.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/capabilities.d.ts +36 -0
- package/dist/src/storage/providers/postgres-kysely/methods/capabilities.d.ts.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/capabilities.js +222 -0
- package/dist/src/storage/providers/postgres-kysely/methods/capabilities.js.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/catalogue.d.ts +19 -0
- package/dist/src/storage/providers/postgres-kysely/methods/catalogue.d.ts.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/catalogue.js +96 -0
- package/dist/src/storage/providers/postgres-kysely/methods/catalogue.js.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/consent.d.ts +26 -0
- package/dist/src/storage/providers/postgres-kysely/methods/consent.d.ts.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/consent.js +119 -0
- package/dist/src/storage/providers/postgres-kysely/methods/consent.js.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/device-auth.d.ts +13 -0
- package/dist/src/storage/providers/postgres-kysely/methods/device-auth.d.ts.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/device-auth.js +68 -0
- package/dist/src/storage/providers/postgres-kysely/methods/device-auth.js.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/direct-message.d.ts +72 -0
- package/dist/src/storage/providers/postgres-kysely/methods/direct-message.d.ts.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/direct-message.js +352 -0
- package/dist/src/storage/providers/postgres-kysely/methods/direct-message.js.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/ecosystem.d.ts +22 -0
- package/dist/src/storage/providers/postgres-kysely/methods/ecosystem.d.ts.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/ecosystem.js +201 -0
- package/dist/src/storage/providers/postgres-kysely/methods/ecosystem.js.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/federation.d.ts +42 -0
- package/dist/src/storage/providers/postgres-kysely/methods/federation.d.ts.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/federation.js +295 -0
- package/dist/src/storage/providers/postgres-kysely/methods/federation.js.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/feedback.d.ts +15 -0
- package/dist/src/storage/providers/postgres-kysely/methods/feedback.d.ts.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/feedback.js +52 -0
- package/dist/src/storage/providers/postgres-kysely/methods/feedback.js.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/files.d.ts +20 -0
- package/dist/src/storage/providers/postgres-kysely/methods/files.d.ts.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/files.js +108 -0
- package/dist/src/storage/providers/postgres-kysely/methods/files.js.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/identity-extras.d.ts +19 -0
- package/dist/src/storage/providers/postgres-kysely/methods/identity-extras.d.ts.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/identity-extras.js +101 -0
- package/dist/src/storage/providers/postgres-kysely/methods/identity-extras.js.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/identity.d.ts +35 -0
- package/dist/src/storage/providers/postgres-kysely/methods/identity.d.ts.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/identity.js +302 -0
- package/dist/src/storage/providers/postgres-kysely/methods/identity.js.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/knowledge.d.ts +21 -0
- package/dist/src/storage/providers/postgres-kysely/methods/knowledge.d.ts.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/knowledge.js +65 -0
- package/dist/src/storage/providers/postgres-kysely/methods/knowledge.js.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/marketplace.d.ts +24 -0
- package/dist/src/storage/providers/postgres-kysely/methods/marketplace.d.ts.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/marketplace.js +122 -0
- package/dist/src/storage/providers/postgres-kysely/methods/marketplace.js.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/memory.d.ts +81 -0
- package/dist/src/storage/providers/postgres-kysely/methods/memory.d.ts.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/memory.js +342 -0
- package/dist/src/storage/providers/postgres-kysely/methods/memory.js.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/micro-memory.d.ts +15 -0
- package/dist/src/storage/providers/postgres-kysely/methods/micro-memory.d.ts.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/micro-memory.js +55 -0
- package/dist/src/storage/providers/postgres-kysely/methods/micro-memory.js.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/moderation.d.ts +38 -0
- package/dist/src/storage/providers/postgres-kysely/methods/moderation.d.ts.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/moderation.js +176 -0
- package/dist/src/storage/providers/postgres-kysely/methods/moderation.js.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/node-ext-escrow.d.ts +38 -0
- package/dist/src/storage/providers/postgres-kysely/methods/node-ext-escrow.d.ts.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/node-ext-escrow.js +243 -0
- package/dist/src/storage/providers/postgres-kysely/methods/node-ext-escrow.js.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/node-infra.d.ts +30 -0
- package/dist/src/storage/providers/postgres-kysely/methods/node-infra.d.ts.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/node-infra.js +158 -0
- package/dist/src/storage/providers/postgres-kysely/methods/node-infra.js.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/notifications.d.ts +19 -0
- package/dist/src/storage/providers/postgres-kysely/methods/notifications.d.ts.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/notifications.js +106 -0
- package/dist/src/storage/providers/postgres-kysely/methods/notifications.js.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/oauth.d.ts +20 -0
- package/dist/src/storage/providers/postgres-kysely/methods/oauth.d.ts.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/oauth.js +94 -0
- package/dist/src/storage/providers/postgres-kysely/methods/oauth.js.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/organisms.d.ts +46 -0
- package/dist/src/storage/providers/postgres-kysely/methods/organisms.d.ts.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/organisms.js +247 -0
- package/dist/src/storage/providers/postgres-kysely/methods/organisms.js.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/otk.d.ts +10 -0
- package/dist/src/storage/providers/postgres-kysely/methods/otk.d.ts.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/otk.js +60 -0
- package/dist/src/storage/providers/postgres-kysely/methods/otk.js.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/packages.d.ts +32 -0
- package/dist/src/storage/providers/postgres-kysely/methods/packages.d.ts.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/packages.js +228 -0
- package/dist/src/storage/providers/postgres-kysely/methods/packages.js.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/pat.d.ts +10 -0
- package/dist/src/storage/providers/postgres-kysely/methods/pat.d.ts.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/pat.js +36 -0
- package/dist/src/storage/providers/postgres-kysely/methods/pat.js.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/schedules.d.ts +32 -0
- package/dist/src/storage/providers/postgres-kysely/methods/schedules.d.ts.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/schedules.js +131 -0
- package/dist/src/storage/providers/postgres-kysely/methods/schedules.js.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/schema.d.ts +10 -0
- package/dist/src/storage/providers/postgres-kysely/methods/schema.d.ts.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/schema.js +88 -0
- package/dist/src/storage/providers/postgres-kysely/methods/schema.js.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/sessions.d.ts +38 -0
- package/dist/src/storage/providers/postgres-kysely/methods/sessions.d.ts.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/sessions.js +66 -0
- package/dist/src/storage/providers/postgres-kysely/methods/sessions.js.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/subdomain-sites.d.ts +10 -0
- package/dist/src/storage/providers/postgres-kysely/methods/subdomain-sites.d.ts.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/subdomain-sites.js +36 -0
- package/dist/src/storage/providers/postgres-kysely/methods/subdomain-sites.js.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/system-extras.d.ts +23 -0
- package/dist/src/storage/providers/postgres-kysely/methods/system-extras.d.ts.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/system-extras.js +109 -0
- package/dist/src/storage/providers/postgres-kysely/methods/system-extras.js.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/system.d.ts +32 -0
- package/dist/src/storage/providers/postgres-kysely/methods/system.d.ts.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/system.js +144 -0
- package/dist/src/storage/providers/postgres-kysely/methods/system.js.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/template-listings.d.ts +34 -0
- package/dist/src/storage/providers/postgres-kysely/methods/template-listings.d.ts.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/template-listings.js +278 -0
- package/dist/src/storage/providers/postgres-kysely/methods/template-listings.js.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/wallet.d.ts +13 -0
- package/dist/src/storage/providers/postgres-kysely/methods/wallet.d.ts.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/wallet.js +129 -0
- package/dist/src/storage/providers/postgres-kysely/methods/wallet.js.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/work.d.ts +14 -0
- package/dist/src/storage/providers/postgres-kysely/methods/work.d.ts.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/work.js +80 -0
- package/dist/src/storage/providers/postgres-kysely/methods/work.js.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/migrate.d.ts +4 -0
- package/dist/src/storage/providers/postgres-kysely/migrate.d.ts.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/migrate.js +40 -0
- package/dist/src/storage/providers/postgres-kysely/migrate.js.map +1 -0
- package/dist/src/storage/providers/postgres-kysely/migrations/0001_base_schema.sql +2406 -0
- package/dist/src/storage/providers/postgres-kysely/migrations/0002_memory_fts.sql +20 -0
- package/dist/src/storage/providers/postgres-kysely/migrations/0003_id_defaults.sql +15 -0
- package/dist/src/storage/providers/postgres-kysely/migrations/0004_otk_initial.sql +4 -0
- package/dist/src/storage/providers/postgres-kysely/migrations/0005_storage_stats.sql +9 -0
- package/dist/src/storage/providers/postgres-kysely/migrations/0006_membership_invited_workspaces.sql +5 -0
- package/dist/src/storage/providers/postgres-kysely/migrations/0007_contacts_origin.sql +5 -0
- package/dist/src/storage/providers/postgres-kysely/migrations/0008_feedback.sql +21 -0
- package/dist/src/storage/providers/postgres-kysely/migrations/0009_invitation_return_url.sql +7 -0
- package/dist/src/storage/providers/postgres-kysely/migrations/0010_agent_model.sql +5 -0
- package/dist/src/storage/providers/postgres-kysely/migrations/0011_unique_verified_email.sql +25 -0
- package/dist/src/storage/providers/sqlite/index.d.ts.map +1 -1
- package/dist/src/storage/providers/sqlite/index.js +4 -1
- package/dist/src/storage/providers/sqlite/index.js.map +1 -1
- package/dist/src/storage/providers/sqlite/methods/apps.d.ts +12 -1
- package/dist/src/storage/providers/sqlite/methods/apps.d.ts.map +1 -1
- package/dist/src/storage/providers/sqlite/methods/apps.js +42 -0
- package/dist/src/storage/providers/sqlite/methods/apps.js.map +1 -1
- package/dist/src/storage/providers/sqlite/methods/capability-agents.d.ts +12 -1
- package/dist/src/storage/providers/sqlite/methods/capability-agents.d.ts.map +1 -1
- package/dist/src/storage/providers/sqlite/methods/capability-agents.js +42 -0
- package/dist/src/storage/providers/sqlite/methods/capability-agents.js.map +1 -1
- package/dist/src/storage/providers/sqlite/methods/community.d.ts +6 -0
- package/dist/src/storage/providers/sqlite/methods/community.d.ts.map +1 -1
- package/dist/src/storage/providers/sqlite/methods/community.js +29 -3
- package/dist/src/storage/providers/sqlite/methods/community.js.map +1 -1
- package/dist/src/storage/providers/sqlite/methods/extensions-notify.d.ts.map +1 -1
- package/dist/src/storage/providers/sqlite/methods/extensions-notify.js +11 -2
- package/dist/src/storage/providers/sqlite/methods/extensions-notify.js.map +1 -1
- package/dist/src/storage/providers/sqlite/methods/feedback.d.ts +23 -0
- package/dist/src/storage/providers/sqlite/methods/feedback.d.ts.map +1 -0
- package/dist/src/storage/providers/sqlite/methods/feedback.js +64 -0
- package/dist/src/storage/providers/sqlite/methods/feedback.js.map +1 -0
- package/dist/src/storage/providers/sqlite/methods/governance.d.ts +5 -0
- package/dist/src/storage/providers/sqlite/methods/governance.d.ts.map +1 -1
- package/dist/src/storage/providers/sqlite/methods/governance.js +43 -9
- package/dist/src/storage/providers/sqlite/methods/governance.js.map +1 -1
- package/dist/src/storage/providers/sqlite/methods/identity-nodes.d.ts +9 -0
- package/dist/src/storage/providers/sqlite/methods/identity-nodes.d.ts.map +1 -1
- package/dist/src/storage/providers/sqlite/methods/identity-nodes.js +52 -0
- package/dist/src/storage/providers/sqlite/methods/identity-nodes.js.map +1 -1
- package/dist/src/storage/providers/sqlite/methods/messaging.d.ts +15 -1
- package/dist/src/storage/providers/sqlite/methods/messaging.d.ts.map +1 -1
- package/dist/src/storage/providers/sqlite/methods/messaging.js +11 -2
- package/dist/src/storage/providers/sqlite/methods/messaging.js.map +1 -1
- package/dist/src/storage/providers/sqlite/methods/owner-memory-bulk.d.ts +28 -0
- package/dist/src/storage/providers/sqlite/methods/owner-memory-bulk.d.ts.map +1 -0
- package/dist/src/storage/providers/sqlite/methods/owner-memory-bulk.js +101 -0
- package/dist/src/storage/providers/sqlite/methods/owner-memory-bulk.js.map +1 -0
- package/dist/src/storage/providers/sqlite/methods/owner-memory-scope.d.ts +35 -0
- package/dist/src/storage/providers/sqlite/methods/owner-memory-scope.d.ts.map +1 -0
- package/dist/src/storage/providers/sqlite/methods/owner-memory-scope.js +118 -0
- package/dist/src/storage/providers/sqlite/methods/owner-memory-scope.js.map +1 -0
- package/dist/src/storage/providers/sqlite/methods/owner.d.ts +6 -0
- package/dist/src/storage/providers/sqlite/methods/owner.d.ts.map +1 -1
- package/dist/src/storage/providers/sqlite/methods/owner.js +41 -9
- package/dist/src/storage/providers/sqlite/methods/owner.js.map +1 -1
- package/dist/src/storage/providers/sqlite/methods/work.d.ts +8 -0
- package/dist/src/storage/providers/sqlite/methods/work.d.ts.map +1 -1
- package/dist/src/storage/providers/sqlite/methods/work.js +31 -0
- package/dist/src/storage/providers/sqlite/methods/work.js.map +1 -1
- package/dist/src/storage/providers/sqlite/repos/action.d.ts +3 -0
- package/dist/src/storage/providers/sqlite/repos/action.d.ts.map +1 -1
- package/dist/src/storage/providers/sqlite/repos/action.js +9 -0
- package/dist/src/storage/providers/sqlite/repos/action.js.map +1 -1
- package/dist/src/storage/providers/sqlite/repos/agent.d.ts.map +1 -1
- package/dist/src/storage/providers/sqlite/repos/agent.js +8 -4
- package/dist/src/storage/providers/sqlite/repos/agent.js.map +1 -1
- package/dist/src/storage/providers/sqlite/repos/community.d.ts +1 -0
- package/dist/src/storage/providers/sqlite/repos/community.d.ts.map +1 -1
- package/dist/src/storage/providers/sqlite/repos/community.js +9 -3
- package/dist/src/storage/providers/sqlite/repos/community.js.map +1 -1
- package/dist/src/storage/providers/sqlite/repos/direct-message.d.ts +13 -1
- package/dist/src/storage/providers/sqlite/repos/direct-message.d.ts.map +1 -1
- package/dist/src/storage/providers/sqlite/repos/direct-message.js +70 -5
- package/dist/src/storage/providers/sqlite/repos/direct-message.js.map +1 -1
- package/dist/src/storage/providers/sqlite/repos/memory.d.ts +7 -0
- package/dist/src/storage/providers/sqlite/repos/memory.d.ts.map +1 -1
- package/dist/src/storage/providers/sqlite/repos/memory.js +24 -3
- package/dist/src/storage/providers/sqlite/repos/memory.js.map +1 -1
- package/dist/src/storage/providers/sqlite/repos/storage-file.d.ts +12 -0
- package/dist/src/storage/providers/sqlite/repos/storage-file.d.ts.map +1 -1
- package/dist/src/storage/providers/sqlite/repos/storage-file.js +24 -0
- package/dist/src/storage/providers/sqlite/repos/storage-file.js.map +1 -1
- package/dist/src/storage/providers/sqlite/schema-tables-1.d.ts +1 -0
- package/dist/src/storage/providers/sqlite/schema-tables-1.d.ts.map +1 -1
- package/dist/src/storage/providers/sqlite/schema-tables-1.js +18 -1
- package/dist/src/storage/providers/sqlite/schema-tables-1.js.map +1 -1
- package/dist/src/storage/providers/sqlite/schema-tables-2.d.ts +1 -0
- package/dist/src/storage/providers/sqlite/schema-tables-2.d.ts.map +1 -1
- package/dist/src/storage/providers/sqlite/schema-tables-2.js +4 -1
- package/dist/src/storage/providers/sqlite/schema-tables-2.js.map +1 -1
- package/dist/src/storage/providers/sqlite/schema-tables-3.d.ts.map +1 -1
- package/dist/src/storage/providers/sqlite/schema-tables-3.js +11 -1
- package/dist/src/storage/providers/sqlite/schema-tables-3.js.map +1 -1
- package/dist/src/storage/providers/sqlite/schema.d.ts +0 -1
- package/dist/src/storage/providers/sqlite/schema.d.ts.map +1 -1
- package/dist/src/storage/providers/sqlite/schema.js +44 -0
- package/dist/src/storage/providers/sqlite/schema.js.map +1 -1
- package/dist/src/storage/repositories/action.repository.d.ts +2 -0
- package/dist/src/storage/repositories/action.repository.d.ts.map +1 -1
- package/dist/src/storage/repositories/agent.repository.d.ts +3 -0
- package/dist/src/storage/repositories/agent.repository.d.ts.map +1 -1
- package/dist/src/storage/repositories/app.repository.d.ts +0 -0
- package/dist/src/storage/repositories/app.repository.d.ts.map +1 -1
- package/dist/src/storage/repositories/consent.repository.d.ts +10 -0
- package/dist/src/storage/repositories/consent.repository.d.ts.map +1 -1
- package/dist/src/storage/repositories/direct-message.repository.d.ts +36 -11
- package/dist/src/storage/repositories/direct-message.repository.d.ts.map +1 -1
- package/dist/src/storage/repositories/direct-message.repository.js +2 -0
- package/dist/src/storage/repositories/direct-message.repository.js.map +1 -1
- package/dist/src/storage/repositories/feedback.repository.d.ts +28 -0
- package/dist/src/storage/repositories/feedback.repository.d.ts.map +1 -0
- package/dist/src/storage/repositories/feedback.repository.js +13 -0
- package/dist/src/storage/repositories/feedback.repository.js.map +1 -0
- package/dist/src/storage/repositories/file.repository.d.ts +11 -0
- package/dist/src/storage/repositories/file.repository.d.ts.map +1 -1
- package/dist/src/storage/repositories/identity.repository.d.ts +13 -0
- package/dist/src/storage/repositories/identity.repository.d.ts.map +1 -1
- package/dist/src/storage/repositories/index.d.ts +1 -0
- package/dist/src/storage/repositories/index.d.ts.map +1 -1
- package/dist/src/storage/repositories/invitation.repository.d.ts +3 -0
- package/dist/src/storage/repositories/invitation.repository.d.ts.map +1 -1
- package/dist/src/storage/repositories/invitation.repository.js +2 -0
- package/dist/src/storage/repositories/invitation.repository.js.map +1 -1
- package/dist/src/storage/repositories/memory.repository.d.ts +133 -1
- package/dist/src/storage/repositories/memory.repository.d.ts.map +1 -1
- package/dist/src/storage/repositories/micro-memory.repository.d.ts +6 -0
- package/dist/src/storage/repositories/micro-memory.repository.d.ts.map +1 -1
- package/dist/src/storage/repositories/organism.repository.d.ts +10 -0
- package/dist/src/storage/repositories/organism.repository.d.ts.map +1 -1
- package/dist/src/storage/repositories/stats.repository.d.ts +31 -2
- package/dist/src/storage/repositories/stats.repository.d.ts.map +1 -1
- package/dist/src/storage/repositories/stats.repository.js +5 -2
- package/dist/src/storage/repositories/stats.repository.js.map +1 -1
- package/dist/src/storage/repositories/work.repository.d.ts +7 -0
- package/dist/src/storage/repositories/work.repository.d.ts.map +1 -1
- package/dist/src/storage/repositories-impl/memory-repository.d.ts +78 -0
- package/dist/src/storage/repositories-impl/memory-repository.d.ts.map +1 -0
- package/dist/src/storage/repositories-impl/memory-repository.js +121 -0
- package/dist/src/storage/repositories-impl/memory-repository.js.map +1 -0
- package/dist/src/storage/schema-lock-cache.d.ts +24 -0
- package/dist/src/storage/schema-lock-cache.d.ts.map +1 -0
- package/dist/src/storage/schema-lock-cache.js +19 -0
- package/dist/src/storage/schema-lock-cache.js.map +1 -0
- package/dist/src/storage/storage-factory.d.ts +6 -3
- package/dist/src/storage/storage-factory.d.ts.map +1 -1
- package/dist/src/storage/storage-factory.js +19 -12
- package/dist/src/storage/storage-factory.js.map +1 -1
- package/dist/src/storage/types/agents-messaging.d.ts +33 -0
- package/dist/src/storage/types/agents-messaging.d.ts.map +1 -1
- package/dist/src/storage/types/agents-messaging.js +3 -0
- package/dist/src/storage/types/agents-messaging.js.map +1 -1
- package/dist/src/storage/types/apps.d.ts +14 -0
- package/dist/src/storage/types/apps.d.ts.map +1 -1
- package/dist/src/storage/types/identity.d.ts +8 -0
- package/dist/src/storage/types/identity.d.ts.map +1 -1
- package/dist/src/storage/types/organisms-federation.d.ts +48 -0
- package/dist/src/storage/types/organisms-federation.d.ts.map +1 -1
- package/dist/src/storage/uow/batch-loader.d.ts +44 -0
- package/dist/src/storage/uow/batch-loader.d.ts.map +1 -0
- package/dist/src/storage/uow/batch-loader.js +101 -0
- package/dist/src/storage/uow/batch-loader.js.map +1 -0
- package/dist/src/storage/uow/identity-map.d.ts +0 -0
- package/dist/src/storage/uow/identity-map.d.ts.map +1 -0
- package/dist/src/storage/uow/identity-map.js +0 -0
- package/dist/src/storage/uow/identity-map.js.map +1 -0
- package/dist/src/storage/uow/unit-of-work.d.ts +42 -0
- package/dist/src/storage/uow/unit-of-work.d.ts.map +1 -0
- package/dist/src/storage/uow/unit-of-work.js +89 -0
- package/dist/src/storage/uow/unit-of-work.js.map +1 -0
- package/dist/src/utils/app-badge.d.ts +7 -22
- package/dist/src/utils/app-badge.d.ts.map +1 -1
- package/dist/src/utils/app-badge.js +59 -22
- package/dist/src/utils/app-badge.js.map +1 -1
- package/dist/src/utils/app-mobile-lint.d.ts +17 -0
- package/dist/src/utils/app-mobile-lint.d.ts.map +1 -0
- package/dist/src/utils/app-mobile-lint.js +40 -0
- package/dist/src/utils/app-mobile-lint.js.map +1 -0
- package/dist/src/utils/app-protect.d.ts +2 -0
- package/dist/src/utils/app-protect.d.ts.map +1 -1
- package/dist/src/utils/app-protect.js +3 -9
- package/dist/src/utils/app-protect.js.map +1 -1
- package/dist/src/utils/env-config/sections-node.js +4 -4
- package/dist/src/utils/env-config/sections-node.js.map +1 -1
- package/dist/src/utils/env-config/sections-platform.d.ts.map +1 -1
- package/dist/src/utils/env-config/sections-platform.js +0 -11
- package/dist/src/utils/env-config/sections-platform.js.map +1 -1
- package/dist/src/utils/env-validator.d.ts.map +1 -1
- package/dist/src/utils/env-validator.js +10 -6
- package/dist/src/utils/env-validator.js.map +1 -1
- package/dist/src/utils/html-inject.d.ts +23 -0
- package/dist/src/utils/html-inject.d.ts.map +1 -0
- package/dist/src/utils/html-inject.js +42 -0
- package/dist/src/utils/html-inject.js.map +1 -0
- package/dist/src/utils/node-descriptor.d.ts.map +1 -1
- package/dist/src/utils/node-descriptor.js +0 -1
- package/dist/src/utils/node-descriptor.js.map +1 -1
- package/dist/static/app-catalog/_template.html +27 -77
- package/dist/static/app-catalog/js/app-agents.js +232 -0
- package/dist/static/app-catalog/js/apps-io.js +51 -165
- package/dist/static/app-catalog/js/cortex.js +114 -0
- package/dist/static/app-catalog/js/cost.js +100 -0
- package/dist/static/app-catalog/js/db.js +23 -93
- package/dist/static/app-catalog/js/detail.js +196 -24
- package/dist/static/app-catalog/js/favorites.js +71 -0
- package/dist/static/app-catalog/js/i18n-data.js +168 -16
- package/dist/static/app-catalog/js/main.js +29 -103
- package/dist/static/app-catalog/js/migrate.js +88 -0
- package/dist/static/app-catalog/js/monetize.js +1 -1
- package/dist/static/app-catalog/js/promote.js +70 -0
- package/dist/static/app-catalog/js/render.js +56 -150
- package/dist/static/app-catalog/js/server-io.js +126 -214
- package/dist/static/app-catalog/js/settings.js +11 -204
- package/dist/static/app-catalog/styles/app-catalog.css +136 -9
- package/dist/static/app-catalog.html +1364 -976
- package/dist/static/sdk-libs/_core/config.js +52 -0
- package/dist/static/sdk-libs/_core/http.js +52 -0
- package/dist/static/sdk-libs/_core/namespace.js +33 -0
- package/dist/static/sdk-libs/_core/sdk-globals.d.ts +50 -0
- package/dist/static/sdk-libs/_core/session.js +66 -0
- package/dist/static/sdk-libs/agentface/index.js +102 -0
- package/dist/static/sdk-libs/agents/index.js +267 -0
- package/dist/static/sdk-libs/ai/index.js +153 -0
- package/dist/static/sdk-libs/audio/core.js +111 -0
- package/dist/static/sdk-libs/audio/index.js +380 -0
- package/dist/static/sdk-libs/audio/instruments.js +369 -0
- package/dist/static/sdk-libs/auth/config.js +46 -0
- package/dist/static/sdk-libs/auth/crypto.js +166 -0
- package/dist/static/sdk-libs/auth/events.js +27 -0
- package/dist/static/sdk-libs/auth/i18n.js +64 -0
- package/dist/static/sdk-libs/auth/index.js +37 -0
- package/dist/static/sdk-libs/auth/modal.js +545 -0
- package/dist/static/sdk-libs/auth/pill.js +167 -0
- package/dist/static/sdk-libs/auth/session.js +792 -0
- package/dist/static/sdk-libs/auth/signup.js +232 -0
- package/dist/static/sdk-libs/auth/theme.js +96 -0
- package/dist/static/sdk-libs/capabilities/index.js +179 -0
- package/dist/static/sdk-libs/commerce/index.js +243 -0
- package/dist/static/sdk-libs/data/index.js +188 -0
- package/dist/static/sdk-libs/dist/aimeat-agentface.js +91 -0
- package/dist/static/sdk-libs/dist/aimeat-agents.js +315 -0
- package/dist/static/sdk-libs/dist/aimeat-ai.js +168 -0
- package/dist/static/sdk-libs/dist/aimeat-audio.js +979 -0
- package/dist/static/sdk-libs/dist/aimeat-auth.js +1831 -0
- package/dist/static/sdk-libs/dist/aimeat-capabilities.js +177 -0
- package/dist/static/sdk-libs/dist/aimeat-commerce.js +265 -0
- package/dist/static/sdk-libs/dist/aimeat-data.js +205 -0
- package/dist/static/sdk-libs/dist/aimeat-editor.js +299 -0
- package/dist/static/sdk-libs/dist/aimeat-header.js +270 -0
- package/dist/static/sdk-libs/dist/aimeat-intake.js +94 -0
- package/dist/static/sdk-libs/dist/aimeat-live.js +265 -0
- package/dist/static/sdk-libs/dist/aimeat-markdown.js +602 -0
- package/dist/static/sdk-libs/dist/aimeat-organism.js +394 -0
- package/dist/static/sdk-libs/dist/aimeat-portfolio-standalone.js +90 -0
- package/dist/static/sdk-libs/dist/aimeat-social.js +157 -0
- package/dist/static/sdk-libs/dist/aimeat-speech.js +300 -0
- package/dist/static/sdk-libs/dist/aimeat-storage.js +210 -0
- package/dist/static/sdk-libs/dist/aimeat-tunnel.js +383 -0
- package/dist/static/sdk-libs/dist/aimeat-wallet.js +118 -0
- package/dist/static/sdk-libs/dist/aimeat-webmcp.js +187 -0
- package/dist/static/sdk-libs/dist/aimeat-work.js +213 -0
- package/dist/static/sdk-libs/dist/aimeat-workflows.js +147 -0
- package/dist/static/sdk-libs/editor/index.js +229 -0
- package/dist/static/sdk-libs/header/index.js +249 -0
- package/dist/static/sdk-libs/intake/index.js +75 -0
- package/dist/static/sdk-libs/live/index.js +156 -0
- package/dist/static/sdk-libs/markdown/index.js +522 -0
- package/dist/static/sdk-libs/organism/index.js +381 -0
- package/dist/static/sdk-libs/portfolio-standalone/index.js +78 -0
- package/dist/static/sdk-libs/social/index.js +140 -0
- package/dist/static/sdk-libs/speech/index.js +321 -0
- package/dist/static/sdk-libs/storage/index.js +189 -0
- package/dist/static/sdk-libs/tunnel/index.js +428 -0
- package/dist/static/sdk-libs/wallet/index.js +115 -0
- package/dist/static/sdk-libs/webmcp/index.js +185 -0
- package/dist/static/sdk-libs/work/index.js +191 -0
- package/dist/static/sdk-libs/workflows/index.js +113 -0
- package/package.json +23 -21
- package/prisma/schema.postgres.prisma +0 -1789
- package/prisma/schema.prisma +0 -1787
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file src/services/metered-entitlements.ts
|
|
3
|
+
* @description G1 — the durable METERED ENTITLEMENT primitive (EXCHANGE / TARGET-045). Generalises the
|
|
4
|
+
* single-use `ext-pay-token` into a lasting, budget-capped, contract-bound right: "consumer C may call
|
|
5
|
+
* provider P's capability (ext/action) at price X, under contract K, until budget B is spent." This is
|
|
6
|
+
* the object app-grants deliberately do NOT provide — a grant confers scopes (capability *classes*),
|
|
7
|
+
* never a priced call-right to a specific provider. An entitlement is server-minted by the
|
|
8
|
+
* contract-acceptance flow (a human in an MCP chat, or a closed negotiation agent) and consulted by the
|
|
9
|
+
* metered-call gateway (G2) on every call. Memory-backed (no new table — per
|
|
10
|
+
* docs/coding-guidelines/memory-contracts.md; keeps the node holding only refined data, EXCHANGE's
|
|
11
|
+
* design principle), stored under a system namespace and never client-readable.
|
|
12
|
+
* @structure MeteredEntitlement · entitlementKey · readEntitlementForCall · listEntitlementsByConsumer /
|
|
13
|
+
* ByProvider · createEntitlement · authorizeAndCharge · pauseEntitlement · revokeEntitlement
|
|
14
|
+
* @usage
|
|
15
|
+
* await createEntitlement(storage, { consumerGaii, providerGhii, ext, action, priceMoney, budget, contractRef, ... });
|
|
16
|
+
* const gate = await authorizeAndCharge(storage, consumerGaii, ext, action, priceMicros);
|
|
17
|
+
* if (!gate.ok) return res.status(402)...;
|
|
18
|
+
* @version-history
|
|
19
|
+
* v1.3.0 — 2026-07-21 — Contract history: archiveEntitlement + listEntitlementHistoryByConsumer/ByProvider
|
|
20
|
+
* (superseded contracts survive the live-key overwrite for the "past contracts" view — renegotiation).
|
|
21
|
+
* v1.2.0 — 2026-07-21 — Add optional `surface` (AppToolSurface) so a contract can bind an app-tool's pinned
|
|
22
|
+
* interface version (Gap 1 cross-app selling); the (ext, action) coordinate stays the shared key.
|
|
23
|
+
* v1.1.0 — 2026-07-20 — Add `appId` dimension + listEntitlementsByApp for the per-app cost surface (G3)
|
|
24
|
+
* v1.0.0 — 2026-07-20 — Initial G1 entitlement object (EXCHANGE slice-1): create / lookup-by-call /
|
|
25
|
+
* authorize+charge (budget decrement) / pause / revoke. Read-modify-write budget counter — see the
|
|
26
|
+
* concurrency note on authorizeAndCharge (a dedicated atomic counter is deferred to G5).
|
|
27
|
+
*/
|
|
28
|
+
import { createHash, randomUUID } from 'node:crypto';
|
|
29
|
+
/** System namespace — server-side only, never surfaced to a client (mirrors `ext-pay-token`). */
|
|
30
|
+
const NS = 'metered-entitlement';
|
|
31
|
+
/** History namespace — superseded (renegotiated) contracts are archived here so the record survives the
|
|
32
|
+
* live-key overwrite; the consumer/provider "past contracts" views read it. Append-only. */
|
|
33
|
+
const NS_HISTORY = 'metered-entitlement-history';
|
|
34
|
+
/** Deterministic, dot-safe key: a call `(consumer, ext, action)` maps to exactly one entitlement, so the
|
|
35
|
+
* gateway does an O(1) `getMemory` lookup (no scan). GAII contains `@`/`#` — hashing sidesteps key-segment
|
|
36
|
+
* rules while staying reproducible. The full identifiers live in the value for verification. */
|
|
37
|
+
export function entitlementKey(consumerGaii, ext, action) {
|
|
38
|
+
const h = createHash('sha256').update(`${consumerGaii}|${ext}|${action}`).digest('hex').slice(0, 32);
|
|
39
|
+
return `entitlement.${h}`;
|
|
40
|
+
}
|
|
41
|
+
/** Look up the live entitlement authorising this exact call, or null. */
|
|
42
|
+
export async function readEntitlementForCall(storage, consumerGaii, ext, action) {
|
|
43
|
+
const rec = await storage.getMemory(NS, entitlementKey(consumerGaii, ext, action));
|
|
44
|
+
return rec ? rec.value : null;
|
|
45
|
+
}
|
|
46
|
+
/** Every entitlement a consumer holds (for the app cost/contract surface, G3). Filtered prefix scan. */
|
|
47
|
+
export async function listEntitlementsByConsumer(storage, consumerGaii) {
|
|
48
|
+
const { items } = await storage.listAllMemory({ prefix: 'entitlement.', limit: 5000 });
|
|
49
|
+
return items.map(r => r.value).filter(v => v && v.consumerGaii === consumerGaii);
|
|
50
|
+
}
|
|
51
|
+
/** Every entitlement a provider sells (for the provider/earnings view). Filtered prefix scan. */
|
|
52
|
+
export async function listEntitlementsByProvider(storage, providerGhii) {
|
|
53
|
+
const { items } = await storage.listAllMemory({ prefix: 'entitlement.', limit: 5000 });
|
|
54
|
+
return items.map(r => r.value).filter(v => v && v.providerGhii === providerGhii);
|
|
55
|
+
}
|
|
56
|
+
/** Every entitlement a consuming app holds (the per-app cost/contract surface, G3). Filtered prefix scan. */
|
|
57
|
+
export async function listEntitlementsByApp(storage, appId) {
|
|
58
|
+
const { items } = await storage.listAllMemory({ prefix: 'entitlement.', limit: 5000 });
|
|
59
|
+
return items.map(r => r.value).filter(v => v && v.appId === appId);
|
|
60
|
+
}
|
|
61
|
+
/** Mint (or overwrite) an entitlement — called by the contract-acceptance flow after both sides agree.
|
|
62
|
+
* One `(consumer, ext, action)` triple has one entitlement; re-minting replaces it (e.g. renegotiated price),
|
|
63
|
+
* carrying spend forward only when explicitly asked. */
|
|
64
|
+
export async function createEntitlement(storage, input) {
|
|
65
|
+
const now = new Date().toISOString();
|
|
66
|
+
const value = {
|
|
67
|
+
entitlementId: input.carrySpend?.entitlementId || randomUUID(),
|
|
68
|
+
consumerGaii: input.consumerGaii,
|
|
69
|
+
appId: input.appId ?? input.carrySpend?.appId ?? null,
|
|
70
|
+
providerGhii: input.providerGhii,
|
|
71
|
+
ext: input.ext,
|
|
72
|
+
action: input.action,
|
|
73
|
+
capabilityLabel: input.capabilityLabel || `${input.ext}/${input.action}`,
|
|
74
|
+
unit: input.unit,
|
|
75
|
+
pricePerCall: input.pricePerCall,
|
|
76
|
+
currency: input.unit === 'money' ? (input.currency ?? 'EUR') : null,
|
|
77
|
+
pricing: input.pricing ?? input.carrySpend?.pricing ?? { model: 'per_call' },
|
|
78
|
+
surface: input.surface ?? input.carrySpend?.surface ?? null,
|
|
79
|
+
budget: {
|
|
80
|
+
capUnits: input.capUnits ?? null,
|
|
81
|
+
spentUnits: input.carrySpend?.budget.spentUnits ?? 0,
|
|
82
|
+
calls: input.carrySpend?.budget.calls ?? 0,
|
|
83
|
+
},
|
|
84
|
+
rakePercent: input.rakePercent ?? null,
|
|
85
|
+
contractRef: input.contractRef,
|
|
86
|
+
escrowParty: input.escrowParty ?? null,
|
|
87
|
+
state: 'active',
|
|
88
|
+
createdAt: input.carrySpend?.createdAt || now,
|
|
89
|
+
createdBy: input.carrySpend?.createdBy || input.createdBy,
|
|
90
|
+
updatedAt: now,
|
|
91
|
+
};
|
|
92
|
+
await persist(storage, value);
|
|
93
|
+
return value;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Authorize a single metered call and record its spend against the budget.
|
|
97
|
+
*
|
|
98
|
+
* Returns `{ ok: true, entitlement }` when the entitlement is `active` and the (money) price fits under the
|
|
99
|
+
* remaining cap; the caller (the G2 gateway) then executes and settles. The budget counter is incremented
|
|
100
|
+
* here so an exhausted entitlement flips to `exhausted` and stops authorising.
|
|
101
|
+
*
|
|
102
|
+
* CONCURRENCY: this is a read-modify-write on a memory record — under heavy simultaneous calls on the SAME
|
|
103
|
+
* entitlement the cap can be marginally overshot. The cap is an *authorization ceiling*, not a fund gate:
|
|
104
|
+
* every actual payment still moves through the atomic debit/credit settle path per call, so no funds are
|
|
105
|
+
* lost — only the ceiling can be exceeded by a few in-flight calls. A dedicated atomic counter (or table)
|
|
106
|
+
* is deferred to G5. The per-call price is read from the entitlement itself (`pricePerCall`, in its `unit`).
|
|
107
|
+
*/
|
|
108
|
+
export async function authorizeAndCharge(storage, consumerGaii, ext, action) {
|
|
109
|
+
const ent = await readEntitlementForCall(storage, consumerGaii, ext, action);
|
|
110
|
+
if (!ent)
|
|
111
|
+
return { ok: false, reason: 'no_entitlement' };
|
|
112
|
+
if (ent.state !== 'active')
|
|
113
|
+
return { ok: false, reason: ent.state }; // paused | exhausted | revoked
|
|
114
|
+
const price = Math.max(0, ent.pricePerCall);
|
|
115
|
+
const nextSpent = ent.budget.spentUnits + price;
|
|
116
|
+
if (ent.budget.capUnits !== null && nextSpent > ent.budget.capUnits) {
|
|
117
|
+
// Freeze it so the surface reflects the exhaustion; this call is denied.
|
|
118
|
+
if (ent.state === 'active') {
|
|
119
|
+
ent.state = 'exhausted';
|
|
120
|
+
ent.updatedAt = new Date().toISOString();
|
|
121
|
+
await persist(storage, ent);
|
|
122
|
+
}
|
|
123
|
+
return { ok: false, reason: 'budget_exhausted' };
|
|
124
|
+
}
|
|
125
|
+
ent.budget.spentUnits = nextSpent;
|
|
126
|
+
ent.budget.calls += 1;
|
|
127
|
+
if (ent.budget.capUnits !== null && nextSpent >= ent.budget.capUnits)
|
|
128
|
+
ent.state = 'exhausted';
|
|
129
|
+
ent.updatedAt = new Date().toISOString();
|
|
130
|
+
await persist(storage, ent);
|
|
131
|
+
return { ok: true, entitlement: ent };
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Compute what THIS call costs + the advanced pricing state, per the entitlement's pricing model. Pure —
|
|
135
|
+
* no mutation, no I/O (`nowMs` is passed in so it stays testable). The gate uses the result to check the
|
|
136
|
+
* budget, settle `chargeUnits`, and then {@link commitSpend} the advanced `pricing`. `allowed:false` means
|
|
137
|
+
* the call is refused without charge (a subscription rate-limit window is full).
|
|
138
|
+
*/
|
|
139
|
+
export function computeCharge(ent, nowMs) {
|
|
140
|
+
const p = ent.pricing ?? { model: 'per_call' };
|
|
141
|
+
if (p.model === 'bundle') {
|
|
142
|
+
if (p.callsRemaining > 0) {
|
|
143
|
+
return { allowed: true, chargeUnits: 0, pricing: { ...p, callsRemaining: p.callsRemaining - 1 } };
|
|
144
|
+
}
|
|
145
|
+
// Quota drained → refill: charge one more block and consume a call from it.
|
|
146
|
+
return { allowed: true, chargeUnits: Math.max(0, p.blockPrice), pricing: { ...p, callsRemaining: Math.max(0, p.blockSize - 1) } };
|
|
147
|
+
}
|
|
148
|
+
if (p.model === 'subscription') {
|
|
149
|
+
const nowIso = new Date(nowMs).toISOString();
|
|
150
|
+
let validUntil = p.validUntil, windowStart = p.windowStart, windowCount = p.windowCount, charge = 0;
|
|
151
|
+
if (nowMs >= new Date(validUntil).getTime()) { // period expired → renew (charge the period fee)
|
|
152
|
+
charge = Math.max(0, p.periodPrice);
|
|
153
|
+
validUntil = new Date(nowMs + p.periodSeconds * 1000).toISOString();
|
|
154
|
+
windowStart = nowIso;
|
|
155
|
+
windowCount = 0;
|
|
156
|
+
}
|
|
157
|
+
if (nowMs >= new Date(windowStart).getTime() + p.windowSeconds * 1000) { // rate window rolled over
|
|
158
|
+
windowStart = nowIso;
|
|
159
|
+
windowCount = 0;
|
|
160
|
+
}
|
|
161
|
+
if (windowCount >= p.callsPerWindow) { // rate limit hit — refuse without charge
|
|
162
|
+
return { allowed: false, reason: 'rate_limited', chargeUnits: 0, pricing: { ...p, validUntil, windowStart, windowCount } };
|
|
163
|
+
}
|
|
164
|
+
return { allowed: true, chargeUnits: charge, pricing: { ...p, validUntil, windowStart, windowCount: windowCount + 1 } };
|
|
165
|
+
}
|
|
166
|
+
return { allowed: true, chargeUnits: Math.max(0, ent.pricePerCall), pricing: { model: 'per_call' } };
|
|
167
|
+
}
|
|
168
|
+
/** Peek: would a charge of `chargeUnits` fit under the cap right now? (No mutation — the G2 gate checks this
|
|
169
|
+
* BEFORE moving money, then calls {@link commitSpend} only after settlement succeeds, so a failed debit
|
|
170
|
+
* never leaves a phantom spend.) */
|
|
171
|
+
export function budgetAllows(ent, chargeUnits) {
|
|
172
|
+
if (ent.state !== 'active')
|
|
173
|
+
return false;
|
|
174
|
+
return ent.budget.capUnits === null || ent.budget.spentUnits + Math.max(0, chargeUnits) <= ent.budget.capUnits;
|
|
175
|
+
}
|
|
176
|
+
/** Commit one call AFTER settlement succeeded: add `chargeUnits` to spend, bump calls, advance the pricing
|
|
177
|
+
* state, flip to `exhausted` at the cap. (Read-modify-write — see the concurrency note on {@link authorizeAndCharge}.) */
|
|
178
|
+
export async function commitSpend(storage, ent, chargeUnits, pricing) {
|
|
179
|
+
ent.budget.spentUnits += Math.max(0, chargeUnits);
|
|
180
|
+
ent.budget.calls += 1;
|
|
181
|
+
if (pricing)
|
|
182
|
+
ent.pricing = pricing;
|
|
183
|
+
if (ent.budget.capUnits !== null && ent.budget.spentUnits >= ent.budget.capUnits)
|
|
184
|
+
ent.state = 'exhausted';
|
|
185
|
+
ent.updatedAt = new Date().toISOString();
|
|
186
|
+
await persist(storage, ent);
|
|
187
|
+
return ent;
|
|
188
|
+
}
|
|
189
|
+
/** Roll back one call's spend by `chargeUnits` (the gate calls this when the sandbox script throws AFTER
|
|
190
|
+
* settlement, in lockstep with the money refund). Floors at 0 and un-exhausts if this frees headroom. Does
|
|
191
|
+
* NOT rewind the pricing quota/window (a thrown call still consumed its slot — conservative). No-op if gone. */
|
|
192
|
+
export async function refundSpend(storage, consumerGaii, ext, action, chargeUnits) {
|
|
193
|
+
const e = await readEntitlementForCall(storage, consumerGaii, ext, action);
|
|
194
|
+
if (!e)
|
|
195
|
+
return;
|
|
196
|
+
e.budget.spentUnits = Math.max(0, e.budget.spentUnits - Math.max(0, chargeUnits));
|
|
197
|
+
e.budget.calls = Math.max(0, e.budget.calls - 1);
|
|
198
|
+
if (e.state === 'exhausted' && (e.budget.capUnits === null || e.budget.spentUnits < e.budget.capUnits)) {
|
|
199
|
+
e.state = 'active';
|
|
200
|
+
}
|
|
201
|
+
e.updatedAt = new Date().toISOString();
|
|
202
|
+
await persist(storage, e);
|
|
203
|
+
}
|
|
204
|
+
/** Pause (owner off-switch) — stops authorising without losing the record/spend history. */
|
|
205
|
+
export async function pauseEntitlement(storage, consumerGaii, ext, action) {
|
|
206
|
+
return flip(storage, consumerGaii, ext, action, 'paused');
|
|
207
|
+
}
|
|
208
|
+
/** Revoke — terminal; the entitlement no longer authorises and must be re-minted to resume. */
|
|
209
|
+
export async function revokeEntitlement(storage, consumerGaii, ext, action) {
|
|
210
|
+
return flip(storage, consumerGaii, ext, action, 'revoked');
|
|
211
|
+
}
|
|
212
|
+
async function flip(storage, consumerGaii, ext, action, state) {
|
|
213
|
+
const ent = await readEntitlementForCall(storage, consumerGaii, ext, action);
|
|
214
|
+
if (!ent)
|
|
215
|
+
return false;
|
|
216
|
+
ent.state = state;
|
|
217
|
+
ent.updatedAt = new Date().toISOString();
|
|
218
|
+
await persist(storage, ent);
|
|
219
|
+
return true;
|
|
220
|
+
}
|
|
221
|
+
async function persist(storage, value) {
|
|
222
|
+
await storage.setMemory({
|
|
223
|
+
key: entitlementKey(value.consumerGaii, value.ext, value.action),
|
|
224
|
+
ownerGaii: NS,
|
|
225
|
+
value,
|
|
226
|
+
visibility: 'private',
|
|
227
|
+
tags: ['metered-entitlement'],
|
|
228
|
+
ttlHours: null,
|
|
229
|
+
version: 1,
|
|
230
|
+
createdAt: value.createdAt,
|
|
231
|
+
updatedAt: value.updatedAt,
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* Archive a copy of an entitlement to history (append-only) before the live record is overwritten by a
|
|
236
|
+
* renegotiation (supersede) — so the old terms + final spend/period survive for the "past contracts" view.
|
|
237
|
+
* Does NOT touch the live record. The `from → to` period is `createdAt → archivedAt`.
|
|
238
|
+
*/
|
|
239
|
+
export async function archiveEntitlement(storage, ent, reason, proposalId) {
|
|
240
|
+
const now = new Date().toISOString();
|
|
241
|
+
const archivedId = randomUUID();
|
|
242
|
+
const entry = {
|
|
243
|
+
...ent, archivedId, archivedAt: now, archiveReason: reason, supersededByProposal: proposalId ?? null,
|
|
244
|
+
};
|
|
245
|
+
await storage.setMemory({
|
|
246
|
+
key: `me-hist.${archivedId}`, ownerGaii: NS_HISTORY, value: entry,
|
|
247
|
+
visibility: 'private', tags: ['metered-entitlement-history'], ttlHours: null, version: 1, createdAt: now, updatedAt: now,
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
/** Past (archived) contracts a consumer held — newest first. */
|
|
251
|
+
export async function listEntitlementHistoryByConsumer(storage, consumerGaii) {
|
|
252
|
+
const { items } = await storage.listAllMemory({ prefix: 'me-hist.', limit: 5000 });
|
|
253
|
+
return items.map(r => r.value)
|
|
254
|
+
.filter(v => v && v.archivedId && v.consumerGaii === consumerGaii)
|
|
255
|
+
.sort((a, b) => (a.archivedAt < b.archivedAt ? 1 : -1));
|
|
256
|
+
}
|
|
257
|
+
/** Past (archived) contracts a provider sold — newest first. */
|
|
258
|
+
export async function listEntitlementHistoryByProvider(storage, providerGhii) {
|
|
259
|
+
const { items } = await storage.listAllMemory({ prefix: 'me-hist.', limit: 5000 });
|
|
260
|
+
return items.map(r => r.value)
|
|
261
|
+
.filter(v => v && v.archivedId && v.providerGhii === providerGhii)
|
|
262
|
+
.sort((a, b) => (a.archivedAt < b.archivedAt ? 1 : -1));
|
|
263
|
+
}
|
|
264
|
+
//# sourceMappingURL=metered-entitlements.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metered-entitlements.js","sourceRoot":"","sources":["../../../src/services/metered-entitlements.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAGrD,iGAAiG;AACjG,MAAM,EAAE,GAAG,qBAAqB,CAAC;AACjC;6FAC6F;AAC7F,MAAM,UAAU,GAAG,6BAA6B,CAAC;AA6GjD;;iGAEiG;AACjG,MAAM,UAAU,cAAc,CAAC,YAAoB,EAAE,GAAW,EAAE,MAAc;IAC9E,MAAM,CAAC,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,GAAG,YAAY,IAAI,GAAG,IAAI,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IACrG,OAAO,eAAe,CAAC,EAAE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AAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,IAAI,CAAC,CAAC,YAAY,KAAK,YAAY,CAAC;SACjE,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,UAAU,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC5D,CAAC;AAED,gEAAgE;AAChE,MAAM,CAAC,KAAK,UAAU,gCAAgC,CAAC,OAAgB,EAAE,YAAoB;IAC3F,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,OAAO,CAAC,aAAa,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IACnF,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAgC,CAAC;SACtD,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,IAAI,CAAC,CAAC,YAAY,KAAK,YAAY,CAAC;SACjE,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,UAAU,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC5D,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { stripCodeblock } from './
|
|
1
|
+
import { stripCodeblock } from './llm-strip.js';
|
|
2
2
|
import { collectWorkspaceSummary } from './structure-overview.js';
|
|
3
3
|
import { NotebookAiError, resolveOwnerModel, completeOwner } from './notebook-ai.js';
|
|
4
4
|
import { NOTEBOOK_CLASSIFY_SYSTEM, NOTEBOOK_CLASSIFY_TEMPLATE } from './notebook-classify-prompt.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notebook-classify.js","sourceRoot":"","sources":["../../../src/services/notebook-classify.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"notebook-classify.js","sourceRoot":"","sources":["../../../src/services/notebook-classify.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACrF,OAAO,EAAE,wBAAwB,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AACrG,OAAO,EAAE,0BAA0B,EAAE,4BAA4B,EAAE,MAAM,iCAAiC,CAAC;AA2B3G;sFACsF;AACtF,MAAM,OAAO,aAAc,SAAQ,eAAe;CAAG;AAErD,MAAM,QAAQ,GAAG,EAAE,CAAC;AACpB,MAAM,cAAc,GAAG,EAAE,CAAC;AAE1B;;yBAEyB;AACzB,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,OAAgB,EAChB,MAAoB,EACpB,IAA+C;IAE/C,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,aAAa,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC;IACrG,MAAM,SAAS,GAAwB,EAAE,CAAC;IAE1C,KAAK,MAAM,GAAG,IAAI,QAAQ,EAAE,CAAC;QAC3B,MAAM,MAAM,GAAG,YAAY,GAAG,CAAC,EAAE,kBAAkB,CAAC;QACpD,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,MAAM,OAAO,CAAC,aAAa,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;QACzF,MAAM,MAAM,GAAG,IAAI,GAAG,EAAyC,CA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,MAAM,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC;QACxB,MAAM,SAAS,GAAG,EAAE,IAAI,EAAE,CAAC,OAAO;YAChC,CAAC,CAAC;gBACE,OAAO,EAAE,IAAI;gBACb,YAAY,EAAE,OAAO,EAAE,CAAC,YAAY,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS;gBAC/E,aAAa,EAAE,OAAO,EAAE,CAAC,aAAa,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS;aACnF;YACH,CAAC,CAAC,IAAI,CAAC;QACT,OAAO;YACL,GAAG,MAAM;YACT,KAAK,EAAE,OAAO,EAAE,CAAC,KAAK,KAAK,QAAQ,IAAI,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,UAAU;YACrF,QAAQ,EAAE,OAAO,EAAE,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE;YAC5D,SAAS;SACV,CAAC;IACJ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;IAElC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC;AAC1E,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { stripCodeblock } from './
|
|
1
|
+
import { stripCodeblock } from './llm-strip.js';
|
|
2
2
|
import { NotebookAiError, resolveOwnerModel, completeOwner } from './notebook-ai.js';
|
|
3
3
|
import { buildPlacementContext } from './notebook-classify.js';
|
|
4
4
|
import { NOTEBOOK_PLAN_SYSTEM, NOTEBOOK_PLAN_TEMPLATE } from './notebook-plan-prompt.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notebook-plan.js","sourceRoot":"","sources":["../../../src/services/notebook-plan.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"notebook-plan.js","sourceRoot":"","sources":["../../../src/services/notebook-plan.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACrF,OAAO,EAAE,qBAAqB,EAA0B,MAAM,wBAAwB,CAAC;AACvF,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAEzF;+FAC+F;AAC/F,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,YAAY,EAAE,kBAAkB,EAAE,UAAU,CAAU,CAAC;AAiCvF,MAAM,SAAS,GAAG,CAAC,CAAC;AAEpB;yEACyE;AACzE,KAAK,UAAU,gBAAgB,CAAC,OAAgB;IAC9C,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,MAAM,OAAO,CAAC,eAAe,CAAC,eAAe,CAAC,CAAC;QAC3D,IAAI,GAAG,IAAI,GAAG,CAAC,MAAM,IAAI,OAAO,GAAG,CAAC,OAAO,KAAK,QAAQ,IAAI,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE;YAAE,OAAO,GAAG,CAAC,OAAO,CAAC;IACrG,CAAC;IAAC,MAAM,CAAC,CAAC,sCAAsC,CAAC,CAAC;IAClD,OAAO,sBAAsB,CAAC;AAChC,CAAC;AAED,MAAM,aAAa,GAAG,EAAE,CAAC;AAEzB,yGAAyG;AACzG,SAAS,kBAAkB,CAAC,GAAY;IACtC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC;QAAE,OAAO,EAAE,CAAC;IAC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AAC,sBAAsB,CAAC;QACvF,UAAU,EAAE,OAAO,MAAM,CAAC,UAAU,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QACrG,KAAK;QACL,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;KACpC,CAAC;IACF,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC;AACxE,CAAC"}
|
|
@@ -1,7 +1,53 @@
|
|
|
1
1
|
import type { Storage } from '../storage/interface.js';
|
|
2
2
|
import type { PushService } from './push.js';
|
|
3
3
|
export declare const NOTIF_PREFIX = "notif.";
|
|
4
|
+
/** How many actions a single notification may carry (bell + web-push button budget). */
|
|
5
|
+
export declare const MAX_NOTIF_ACTIONS = 3;
|
|
6
|
+
/** Visual weight of an action button in the bell (maps to existing btn-* classes). */
|
|
7
|
+
export type NotifActionStyle = 'primary' | 'default' | 'danger';
|
|
8
|
+
/**
|
|
9
|
+
* An inline action a notification offers. Three kinds:
|
|
10
|
+
* - 'navigate': deep-link somewhere in the SPA (link-equivalent, carries no new authority).
|
|
11
|
+
* - 'reply': open an inline text box in the bell and POST /v1/messages to `to` (DM reply).
|
|
12
|
+
* - 'api': call a same-node endpoint (approve/deny/accept/decline) with the clicker's JWT.
|
|
13
|
+
* `id` is a stable slug ('reply' | 'approve' | 'deny' | 'accept' | 'decline' | 'reject' | ...) the
|
|
14
|
+
* frontend uses to localize the button label; `label` is the English fallback.
|
|
15
|
+
*/
|
|
16
|
+
export type NotifAction = {
|
|
17
|
+
id: string;
|
|
18
|
+
label: string;
|
|
19
|
+
kind: 'navigate';
|
|
20
|
+
link: string;
|
|
21
|
+
style?: NotifActionStyle;
|
|
22
|
+
} | {
|
|
23
|
+
id: string;
|
|
24
|
+
label: string;
|
|
25
|
+
kind: 'reply';
|
|
26
|
+
to: string;
|
|
27
|
+
conversationId?: string;
|
|
28
|
+
subject?: string;
|
|
29
|
+
replyTo?: string;
|
|
30
|
+
style?: NotifActionStyle;
|
|
31
|
+
} | {
|
|
32
|
+
id: string;
|
|
33
|
+
label: string;
|
|
34
|
+
kind: 'api';
|
|
35
|
+
method: 'POST' | 'PATCH' | 'DELETE';
|
|
36
|
+
endpoint: string;
|
|
37
|
+
body?: Record<string, unknown>;
|
|
38
|
+
confirm?: boolean;
|
|
39
|
+
style?: NotifActionStyle;
|
|
40
|
+
};
|
|
41
|
+
/** Same-node path guard for an action endpoint/link ('/...' only — never '//host' or a full URL). */
|
|
42
|
+
export declare function isSafeNotifActionEndpoint(path: unknown): path is string;
|
|
4
43
|
export declare function setNotifyPushService(push: PushService | null): void;
|
|
44
|
+
/**
|
|
45
|
+
* Delete the recipient's bell notifications that deep-link to a given conversation — called when they
|
|
46
|
+
* open/read that thread, so a message they've now seen stops nagging from the header bell. Matches both
|
|
47
|
+
* the delivered-message link (#inbox/<id>) and the "wants to message you" request link (#inbox/req:<id>).
|
|
48
|
+
* Best-effort: never throws into the caller. Returns the number removed (0 if none / on any error).
|
|
49
|
+
*/
|
|
50
|
+
export declare function dismissConversationNotifications(storage: Storage, recipientGhii: string, conversationId: string): Promise<number>;
|
|
5
51
|
export interface NotifyInput {
|
|
6
52
|
/** Machine type, e.g. 'workspace_access_request' | 'workspace_access_approved'. */
|
|
7
53
|
type: string;
|
|
@@ -11,6 +57,12 @@ export interface NotifyInput {
|
|
|
11
57
|
body?: string;
|
|
12
58
|
/** Optional in-app link the notification deep-links to (e.g. '/v1/profile#organisms'). */
|
|
13
59
|
link?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Optional inline actions (reply / api / navigate) rendered as buttons in the bell. Trusted-only:
|
|
62
|
+
* only server-side emit code sets these — see the SECURITY note in the file header. Capped at
|
|
63
|
+
* MAX_NOTIF_ACTIONS; anything beyond is dropped.
|
|
64
|
+
*/
|
|
65
|
+
actions?: NotifAction[];
|
|
14
66
|
}
|
|
15
67
|
/**
|
|
16
68
|
* Translate a bell-vocabulary link into a URL that opens correctly from a cold start (push
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notify.d.ts","sourceRoot":"","sources":["../../../src/services/notify.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"notify.d.ts","sourceRoot":"","sources":["../../../src/services/notify.ts"],"names":[],"mappings":"AAgCA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAE7C,eAAO,MAAM,YAAY,WAAW,CAAC;AAErC,wFAAwF;AACxF,eAAO,MAAM,iBAAiB,IAAI,CAAC;AAEnC,sFAAsF;AACtF,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;AAEhE;;;;;;;GAOG;AACH,MAAM,MAAM,WAAW,GACnB;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,UAAU,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,gBAAgB,CAAA;CAAE,GACvF;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,OAAO,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,gBAAgB,CAAA;CAAE,GAC/I;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,gBAAgB,CAAA;CAAE,CAAC;AAEnL,qGAAqG;AACrG,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI,MAAM,CAEvE;AAID,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,GAAG,IAAI,CAEnE;AAED;;;;;GAKG;AACH,wBAAsB,gCAAgC,CAAC,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAgBvI;AAED,MAAM,WAAW,WAAW;IAC1B,mFAAmF;IACnF,IAAI,EAAE,MAAM,CAAC;IACb,oDAAoD;IACpD,KAAK,EAAE,MAAM,CAAC;IACd,sCAAsC;IACtC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,0FAA0F;IAC1F,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC;CACzB;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAMpD;AAED;;;;;GAKG;AACH,wBAAsB,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAmCvG"}
|
|
@@ -8,23 +8,71 @@
|
|
|
8
8
|
* When the recipient has a web-push subscription, the same notification is also delivered as a
|
|
9
9
|
* browser push (best-effort) whose click deep-links to the same target as the bell entry.
|
|
10
10
|
* @structure
|
|
11
|
-
* - notify(storage, recipientGhii, { type, title, body?, link? })
|
|
11
|
+
* - notify(storage, recipientGhii, { type, title, body?, link?, actions? })
|
|
12
|
+
* - dismissConversationNotifications(storage, recipientGhii, conversationId) — delete the bell
|
|
13
|
+
* notifications deep-linking to a conversation once its owner has read that thread
|
|
12
14
|
* - setNotifyPushService(push) — wired once at boot so notify() can bridge to web push
|
|
13
15
|
* - notifLinkToUrl(link) — bell link vocabulary ('/v1/profile#inbox/<id>') → openable URL
|
|
16
|
+
* - NotifAction — an inline action a notification carries (reply | api | navigate), rendered as a
|
|
17
|
+
* button in the header bell. SECURITY: 'reply'/'api' actions execute with the RECIPIENT's own
|
|
18
|
+
* authority when they click, so they may ONLY be set by trusted server-side emit code — never
|
|
19
|
+
* derived from a principal's input. The public POST /v1/notifications route rejects them.
|
|
20
|
+
* - isSafeNotifActionEndpoint(path) — same-node-path guard shared with the route.
|
|
14
21
|
* @usage import { notify } from '../services/notify.js';
|
|
15
22
|
* await notify(storage, `${creatorOwner}@${nodeId}`, { type: 'workspace_access_request', title, link });
|
|
16
23
|
* @version-history
|
|
17
24
|
* v1.0.0 -- 2026-06-08 -- Initial: memory-backed notification inbox.
|
|
18
25
|
* v1.1.0 -- 2026-07-02 -- Bridge bell notifications to web push with deep-link URL translation.
|
|
26
|
+
* v1.2.0 -- 2026-07-18 -- Inline notification actions (reply/api/navigate); mirror up to two into
|
|
27
|
+
* the web-push payload so the SW can offer OS-level action buttons.
|
|
28
|
+
* v1.3.0 -- 2026-07-21 -- dismissConversationNotifications(): reading a DM thread deletes its bell
|
|
29
|
+
* notifications (delivered #inbox/<id> + request #inbox/req:<id> links) so a seen message stops
|
|
30
|
+
* lingering in the header bell. Called from POST /v1/messages/conversations/:id/read.
|
|
19
31
|
*/
|
|
20
32
|
import { randomUUID } from 'node:crypto';
|
|
21
33
|
export const NOTIF_PREFIX = 'notif.';
|
|
22
34
|
const NOTIF_TTL_HOURS = 24 * 90; // 90 days
|
|
35
|
+
/** How many actions a single notification may carry (bell + web-push button budget). */
|
|
36
|
+
export const MAX_NOTIF_ACTIONS = 3;
|
|
37
|
+
/** Same-node path guard for an action endpoint/link ('/...' only — never '//host' or a full URL). */
|
|
38
|
+
export function isSafeNotifActionEndpoint(path) {
|
|
39
|
+
return typeof path === 'string' && path.startsWith('/') && !path.startsWith('//') && path.length <= 500;
|
|
40
|
+
}
|
|
23
41
|
/** Wired once at boot (routes-loader) so every notify() call can also fire a web push. */
|
|
24
42
|
let pushService = null;
|
|
25
43
|
export function setNotifyPushService(push) {
|
|
26
44
|
pushService = push;
|
|
27
45
|
}
|
|
46
|
+
/**
|
|
47
|
+
* Delete the recipient's bell notifications that deep-link to a given conversation — called when they
|
|
48
|
+
* open/read that thread, so a message they've now seen stops nagging from the header bell. Matches both
|
|
49
|
+
* the delivered-message link (#inbox/<id>) and the "wants to message you" request link (#inbox/req:<id>).
|
|
50
|
+
* Best-effort: never throws into the caller. Returns the number removed (0 if none / on any error).
|
|
51
|
+
*/
|
|
52
|
+
export async function dismissConversationNotifications(storage, recipientGhii, conversationId) {
|
|
53
|
+
if (!conversationId)
|
|
54
|
+
return 0;
|
|
55
|
+
try {
|
|
56
|
+
const links = new Set([`/v1/profile#inbox/${conversationId}`, `/v1/profile#inbox/req:${conversationId}`]);
|
|
57
|
+
const mine = await storage.listMemory(recipientGhii, { prefix: NOTIF_PREFIX });
|
|
58
|
+
const refs = mine
|
|
59
|
+
.filter(r => { const v = r.value; return !!v && typeof v.link === 'string' && links.has(v.link); })
|
|
60
|
+
.map(r => ({ ownerGaii: recipientGhii, key: r.key }));
|
|
61
|
+
if (!refs.length)
|
|
62
|
+
return 0;
|
|
63
|
+
if (storage.bulkDeleteMemory)
|
|
64
|
+
return await storage.bulkDeleteMemory(refs);
|
|
65
|
+
let removed = 0;
|
|
66
|
+
for (const ref of refs) {
|
|
67
|
+
if (await storage.deleteMemory(ref.ownerGaii, ref.key))
|
|
68
|
+
removed++;
|
|
69
|
+
}
|
|
70
|
+
return removed;
|
|
71
|
+
}
|
|
72
|
+
catch {
|
|
73
|
+
return 0;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
28
76
|
/**
|
|
29
77
|
* Translate a bell-vocabulary link into a URL that opens correctly from a cold start (push
|
|
30
78
|
* notification click, new window). The bell's '/v1/profile#<tab>[/<rest>]' hash form only works
|
|
@@ -50,11 +98,12 @@ export async function notify(storage, recipientGhii, input) {
|
|
|
50
98
|
try {
|
|
51
99
|
const id = randomUUID();
|
|
52
100
|
const now = new Date().toISOString();
|
|
101
|
+
const actions = Array.isArray(input.actions) ? input.actions.slice(0, MAX_NOTIF_ACTIONS) : [];
|
|
53
102
|
// Key sorts lexically by time; the route sorts newest-first explicitly anyway.
|
|
54
103
|
await storage.setMemory({
|
|
55
104
|
key: `${NOTIF_PREFIX}${now}.${id.slice(0, 8)}`,
|
|
56
105
|
ownerGaii: recipientGhii,
|
|
57
|
-
value: { id, type: input.type, title: input.title, body: input.body ?? '', link: input.link ?? '', read: false, createdAt: now },
|
|
106
|
+
value: { id, type: input.type, title: input.title, body: input.body ?? '', link: input.link ?? '', actions, read: false, createdAt: now },
|
|
58
107
|
visibility: 'private',
|
|
59
108
|
tags: ['notif'],
|
|
60
109
|
ttlHours: NOTIF_TTL_HOURS,
|
|
@@ -65,11 +114,16 @@ export async function notify(storage, recipientGhii, input) {
|
|
|
65
114
|
if (pushService?.enabled) {
|
|
66
115
|
// Same tag per type ⇒ a newer notification of the same kind replaces the shown one instead
|
|
67
116
|
// of stacking. A recipient without a push subscription is a silent no-op inside the service.
|
|
117
|
+
// Mirror up to two actions into the OS-level push (Notification.actions caps low, and a lock
|
|
118
|
+
// screen can't take free text) — the SW turns a button click into a focus + postMessage so the
|
|
119
|
+
// open SPA runs it with the owner's session; data.actions carries the full descriptors.
|
|
68
120
|
void pushService.sendNotification(recipientGhii.split('@')[0], {
|
|
69
121
|
title: input.title,
|
|
70
122
|
body: input.body ?? '',
|
|
71
123
|
url: notifLinkToUrl(input.link),
|
|
72
124
|
tag: `notif:${input.type}`,
|
|
125
|
+
actions: actions.slice(0, 2).map(a => ({ action: a.id, title: a.label })),
|
|
126
|
+
data: { notifId: id, actions },
|
|
73
127
|
}).catch(() => { });
|
|
74
128
|
}
|
|
75
129
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notify.js","sourceRoot":"","sources":["../../../src/services/notify.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"notify.js","sourceRoot":"","sources":["../../../src/services/notify.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAIzC,MAAM,CAAC,MAAM,YAAY,GAAG,QAAQ,CAAC;AACrC,MAAM,eAAe,GAAG,EAAE,GAAG,EAAE,CAAC,CAAG,UAAU;AAC7C,wFAAwF;AACxF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC;AAkBnC,qGAAqG;AACrG,MAAM,UAAU,yBAAyB,CAAC,IAAa;IACrD,OAAO,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,MAAM,IAAI,GAAG,CAAC;AAC1G,CAAC;AAED,0FAA0F;AAC1F,IAAI,WAAW,GAAuB,IAAI,CAAC;AAC3C,MAAM,UAAU,oBAAoB,CAAC,IAAwB;IAC3D,WAAW,GAAG,IAAI,CAAC;AACrB,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,gCAAgC,CAAC,OAAgB,EAAE,aAAqB,EAAE,cAAsB;IACpH,IAAI,CAAC,cAAc;QAAE,OAAO,CAAC,CAAC;IAC9B,IAAI,CAAC;QACH,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,CAAC,qBAAqB,cAAc,EAAE,EAAE,yBAAyB,cAAc,EAAE,CAAC,CAAC,CAAC;QAC1G,MAAM,I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E,eAAe;YACzB,OAAO,EAAE,CAAC;YACV,SAAS,EAAE,GAAG;YACd,SAAS,EAAE,GAAG;SACf,CAAC,CAAC;QACH,IAAI,WAAW,EAAE,OAAO,EAAE,CAAC;YACzB,2FAA2F;YAC3F,6FAA6F;YAC7F,6FAA6F;YAC7F,+FAA+F;YAC/F,wFAAwF;YACxF,KAAK,WAAW,CAAC,gBAAgB,CAAC,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE;gBAC7D,KAAK,EAAE,KAAK,CAAC,KAAK;gBAClB,IAAI,EAAE,KAAK,CAAC,IAAI,IAAI,EAAE;gBACtB,GAAG,EAAE,cAAc,CAAC,KAAK,CAAC,IAAI,CAAC;gBAC/B,GAAG,EAAE,SAAS,KAAK,CAAC,IAAI,EAAE;gBAC1B,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC;gBACzE,IAAI,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE;aAC/B,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,GAA6B,CAAC,CAAC,CAAC;QAChD,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,qFAAqF;IACvF,CAAC;AACH,CAAC"}
|
|
@@ -9,14 +9,21 @@
|
|
|
9
9
|
* @structure
|
|
10
10
|
* - listOwnerScopeMemory(storage, nodeId, ownerName, opts) — aggregated list (deduped, GHII-first)
|
|
11
11
|
* - getOwnerScopeMemory(storage, nodeId, ownerName, key) — one key across owner+agents (GHII-first)
|
|
12
|
+
* - getOwnerScopePublicMemory(storage, nodeId, ownerName, key) — first PUBLIC record for a key across
|
|
13
|
+
* owner+agents (GHII-first); a non-public record never shadows a public one (anonymous serve paths)
|
|
12
14
|
* @usage import { listOwnerScopeMemory, getOwnerScopeMemory } from '../services/owner-memory.js';
|
|
13
15
|
* @version-history
|
|
14
16
|
* v1.0.0 — 2026-06-13 — Extracted from routes/memory.ts owner-scope branch; reused by the workflow
|
|
15
17
|
* signal evaluator (fix: signals must read owner-scope, not the owner GHII keyspace alone).
|
|
16
18
|
* v1.1.0 — 2026-06-14 — Fold the owner's ecosystem apps (GEAIs) into the owner-scope union
|
|
17
19
|
* (ecosystem-apps foundation, chunk 1).
|
|
20
|
+
* v1.2.0 — 2026-07-14 — Add listOwnerScopeMemoryMeta (value-free owner-scope listing) for ?include=meta.
|
|
21
|
+
* v1.3.0 — 2026-07-21 — Add getOwnerScopePublicMemory so anonymous public-serve paths (agent face) can
|
|
22
|
+
* resolve a record an owner's AGENT published under its own GAII — a non-public record never shadows
|
|
23
|
+
* a public one on the same key.
|
|
18
24
|
*/
|
|
19
25
|
import type { Storage, MemoryRecord } from '../storage/interface.js';
|
|
26
|
+
import type { MemoryMetaRow } from '../storage/repositories/memory.repository.js';
|
|
20
27
|
export interface OwnerScopeListOpts {
|
|
21
28
|
prefix?: string;
|
|
22
29
|
visibility?: string;
|
|
@@ -30,6 +37,24 @@ export interface OwnerScopeListOpts {
|
|
|
30
37
|
* set `aimeat_memory_list { owner_scope: true }` returns.
|
|
31
38
|
*/
|
|
32
39
|
export declare function listOwnerScopeMemory(storage: Storage, nodeId: string, ownerName: string, opts?: OwnerScopeListOpts): Promise<MemoryRecord[]>;
|
|
40
|
+
/**
|
|
41
|
+
* Owner-scope META listing — the same union + key-dedup as {@link listOwnerScopeMemory}, but each
|
|
42
|
+
* identity is read with `listMemoryMeta` so NO value is ever loaded (backs `?include=meta`). Returns
|
|
43
|
+
* lightweight rows carrying the stored `byteSize`, so the caller can total quota usage without
|
|
44
|
+
* serialising anything.
|
|
45
|
+
*/
|
|
46
|
+
export declare function listOwnerScopeMemoryMeta(storage: Storage, nodeId: string, ownerName: string, opts?: OwnerScopeListOpts): Promise<MemoryMetaRow[]>;
|
|
33
47
|
/** Read ONE key across the owner's GHII + all the owner's agents (GHII first). null if found nowhere. */
|
|
34
48
|
export declare function getOwnerScopeMemory(storage: Storage, nodeId: string, ownerName: string, key: string): Promise<MemoryRecord | null>;
|
|
49
|
+
/**
|
|
50
|
+
* Read the first PUBLIC record for an exact key across the owner's GHII + all the owner's agents + eco
|
|
51
|
+
* apps, GHII-first. Unlike {@link getOwnerScopeMemory}, a NON-public record on the same key never
|
|
52
|
+
* shadows a public one — so this must NOT short-circuit on the GHII copy (a private GHII record must not
|
|
53
|
+
* hide a public agent record). One query across the whole union, then filter to `visibility === 'public'`
|
|
54
|
+
* and pick the highest-priority (GHII-first) survivor. null if no public copy exists anywhere.
|
|
55
|
+
*
|
|
56
|
+
* Used by anonymous public-serve paths (the Agent Face) where only `visibility:'public'` is servable and
|
|
57
|
+
* an owner's agent may have written the record under its own GAII (memory is keyed by the writer).
|
|
58
|
+
*/
|
|
59
|
+
export declare function getOwnerScopePublicMemory(storage: Storage, nodeId: string, ownerName: string, key: string): Promise<MemoryRecord | null>;
|
|
35
60
|
//# sourceMappingURL=owner-memory.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"owner-memory.d.ts","sourceRoot":"","sources":["../../../src/services/owner-memory.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"owner-memory.d.ts","sourceRoot":"","sources":["../../../src/services/owner-memory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8CAA8C,CAAC;AAElF,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,C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