aimeat 2.0.0 → 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/dist/locales/en.json +35 -1
- package/dist/locales/fi.json +35 -1
- package/dist/public/components/LinkPreview.js +101 -0
- package/dist/public/components/NotificationBell.js +18 -1
- package/dist/public/css/theme.css +57 -7
- package/dist/public/css/views/admin.css +8 -1
- package/dist/public/css/views/app-grant.css +18 -0
- package/dist/public/css/views/inbox.css +46 -0
- package/dist/public/css/views/portfolio.css +46 -0
- package/dist/public/css/views/profile.css +29 -4
- package/dist/public/js/services/apps.js +19 -3
- package/dist/public/js/services/messages-ai-prompts.js +38 -0
- package/dist/public/js/services/messages.js +26 -4
- package/dist/public/js/services/notebook.js +76 -0
- package/dist/public/js/services/unfurl.js +43 -0
- package/dist/public/lib/samples/LICENSE.md +11 -0
- package/dist/public/lib/samples/bass/A1.mp3 +0 -0
- package/dist/public/lib/samples/bass/B2.mp3 +0 -0
- package/dist/public/lib/samples/bass/D2.mp3 +0 -0
- package/dist/public/lib/samples/bass/E1.mp3 +0 -0
- package/dist/public/lib/samples/bass/E3.mp3 +0 -0
- package/dist/public/lib/samples/bass/G2.mp3 +0 -0
- package/dist/public/lib/samples/epiano/C2.mp3 +0 -0
- package/dist/public/lib/samples/epiano/C3.mp3 +0 -0
- package/dist/public/lib/samples/epiano/C4.mp3 +0 -0
- package/dist/public/lib/samples/epiano/C5.mp3 +0 -0
- package/dist/public/lib/samples/epiano/C6.mp3 +0 -0
- package/dist/public/lib/samples/epiano/G2.mp3 +0 -0
- package/dist/public/lib/samples/epiano/G3.mp3 +0 -0
- package/dist/public/lib/samples/epiano/G4.mp3 +0 -0
- package/dist/public/lib/samples/epiano/G5.mp3 +0 -0
- package/dist/public/lib/samples/guitar-steel/A2.mp3 +0 -0
- package/dist/public/lib/samples/guitar-steel/A4.mp3 +0 -0
- package/dist/public/lib/samples/guitar-steel/B3.mp3 +0 -0
- package/dist/public/lib/samples/guitar-steel/D3.mp3 +0 -0
- package/dist/public/lib/samples/guitar-steel/E2.mp3 +0 -0
- package/dist/public/lib/samples/guitar-steel/E4.mp3 +0 -0
- package/dist/public/lib/samples/guitar-steel/E5.mp3 +0 -0
- package/dist/public/lib/samples/guitar-steel/G3.mp3 +0 -0
- package/dist/public/lib/samples/organ/C2.mp3 +0 -0
- package/dist/public/lib/samples/organ/C3.mp3 +0 -0
- package/dist/public/lib/samples/organ/C4.mp3 +0 -0
- package/dist/public/lib/samples/organ/C5.mp3 +0 -0
- package/dist/public/lib/samples/organ/C6.mp3 +0 -0
- package/dist/public/lib/samples/organ/G2.mp3 +0 -0
- package/dist/public/lib/samples/organ/G3.mp3 +0 -0
- package/dist/public/lib/samples/organ/G4.mp3 +0 -0
- package/dist/public/lib/samples/organ/G5.mp3 +0 -0
- package/dist/public/lib/samples/strings/C2.mp3 +0 -0
- package/dist/public/lib/samples/strings/C3.mp3 +0 -0
- package/dist/public/lib/samples/strings/C4.mp3 +0 -0
- package/dist/public/lib/samples/strings/C5.mp3 +0 -0
- package/dist/public/lib/samples/strings/C6.mp3 +0 -0
- package/dist/public/lib/samples/strings/G2.mp3 +0 -0
- package/dist/public/lib/samples/strings/G3.mp3 +0 -0
- package/dist/public/lib/samples/strings/G4.mp3 +0 -0
- package/dist/public/lib/samples/strings/G5.mp3 +0 -0
- package/dist/public/lib/samples/trumpet/A3.mp3 +0 -0
- package/dist/public/lib/samples/trumpet/A4.mp3 +0 -0
- package/dist/public/lib/samples/trumpet/A5.mp3 +0 -0
- package/dist/public/lib/samples/trumpet/C4.mp3 +0 -0
- package/dist/public/lib/samples/trumpet/C5.mp3 +0 -0
- package/dist/public/lib/samples/trumpet/E3.mp3 +0 -0
- package/dist/public/lib/samples/trumpet/E4.mp3 +0 -0
- package/dist/public/lib/samples/trumpet/E5.mp3 +0 -0
- package/dist/public/spa.html +2 -0
- package/dist/public/views/app-grant.js +24 -4
- package/dist/public/views/portfolio.js +61 -6
- package/dist/public/views/profile/apps-tab.js +18 -1
- package/dist/public/views/profile/inbox-tab/ai-actions.js +86 -0
- package/dist/public/views/profile/inbox-tab/components.js +124 -9
- package/dist/public/views/profile/inbox-tab/helpers.js +26 -0
- package/dist/public/views/profile/inbox-tab/panels.js +18 -3
- package/dist/public/views/profile/inbox-tab/use-thread-ux.js +18 -1
- package/dist/public/views/profile/inbox-tab.js +46 -49
- package/dist/public/views/profile/landing-page.cards.js +7 -0
- package/dist/public/views/profile/landing-page.js +12 -1
- package/dist/public/views/profile/skills-tab.js +1 -1
- package/dist/public/views/public-workspace-viewer.js +1 -1
- package/dist/public/views/start.js +2 -1
- package/dist/scripts/build-sdk-libs.d.ts +16 -0
- package/dist/scripts/build-sdk-libs.d.ts.map +1 -0
- package/dist/scripts/build-sdk-libs.js +112 -0
- package/dist/scripts/build-sdk-libs.js.map +1 -0
- package/dist/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/exchange.d.ts +18 -0
- package/dist/src/cli/connect/mcp/tools/exchange.d.ts.map +1 -0
- package/dist/src/cli/connect/mcp/tools/exchange.js +170 -0
- package/dist/src/cli/connect/mcp/tools/exchange.js.map +1 -0
- package/dist/src/cli/connect/mcp/tools/index.d.ts.map +1 -1
- package/dist/src/cli/connect/mcp/tools/index.js +2 -0
- package/dist/src/cli/connect/mcp/tools/index.js.map +1 -1
- package/dist/src/cli/connect/tool-call-defs-exchange.d.ts +3 -0
- package/dist/src/cli/connect/tool-call-defs-exchange.d.ts.map +1 -0
- package/dist/src/cli/connect/tool-call-defs-exchange.js +146 -0
- package/dist/src/cli/connect/tool-call-defs-exchange.js.map +1 -0
- package/dist/src/cli/connect/tool-call.d.ts.map +1 -1
- package/dist/src/cli/connect/tool-call.js +2 -0
- package/dist/src/cli/connect/tool-call.js.map +1 -1
- package/dist/src/commerce/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/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/appdev-pitfalls.d.ts +2 -0
- package/dist/src/data/appdev-pitfalls.d.ts.map +1 -1
- package/dist/src/data/appdev-pitfalls.js +24 -1
- package/dist/src/data/appdev-pitfalls.js.map +1 -1
- package/dist/src/generated/api-types.d.ts +1565 -9
- package/dist/src/generated/api-types.d.ts.map +1 -1
- package/dist/src/mcp/annotations.d.ts.map +1 -1
- package/dist/src/mcp/annotations.js +20 -0
- package/dist/src/mcp/annotations.js.map +1 -1
- package/dist/src/mcp/apps.d.ts.map +1 -1
- package/dist/src/mcp/apps.js +8 -4
- package/dist/src/mcp/apps.js.map +1 -1
- package/dist/src/mcp/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.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.map +1 -1
- package/dist/src/mcp/catalog/scopes.js +22 -0
- package/dist/src/mcp/catalog/scopes.js.map +1 -1
- package/dist/src/mcp/catalog/surfaces.d.ts.map +1 -1
- package/dist/src/mcp/catalog/surfaces.js +14 -0
- package/dist/src/mcp/catalog/surfaces.js.map +1 -1
- package/dist/src/mcp/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.map +1 -1
- package/dist/src/mcp/extensions.js +11 -0
- package/dist/src/mcp/extensions.js.map +1 -1
- package/dist/src/mcp/index.d.ts.map +1 -1
- package/dist/src/mcp/index.js +6 -2
- package/dist/src/mcp/index.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/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/routes/agents/device-auth.d.ts +4 -0
- package/dist/src/routes/agents/device-auth.d.ts.map +1 -1
- package/dist/src/routes/agents/device-auth.js +19 -4
- package/dist/src/routes/agents/device-auth.js.map +1 -1
- package/dist/src/routes/app-grants.d.ts +6 -0
- package/dist/src/routes/app-grants.d.ts.map +1 -1
- package/dist/src/routes/app-grants.js +35 -2
- package/dist/src/routes/app-grants.js.map +1 -1
- package/dist/src/routes/apps/fork-manage.d.ts.map +1 -1
- package/dist/src/routes/apps/fork-manage.js +24 -1
- package/dist/src/routes/apps/fork-manage.js.map +1 -1
- package/dist/src/routes/apps/publish.d.ts +2 -0
- package/dist/src/routes/apps/publish.d.ts.map +1 -1
- package/dist/src/routes/apps/publish.js +27 -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/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/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 +9 -0
- package/dist/src/routes/extensions/manifest.d.ts.map +1 -1
- package/dist/src/routes/extensions/manifest.js +33 -1
- package/dist/src/routes/extensions/manifest.js.map +1 -1
- package/dist/src/routes/extensions/paywall.d.ts.map +1 -1
- package/dist/src/routes/extensions/paywall.js +9 -0
- package/dist/src/routes/extensions/paywall.js.map +1 -1
- package/dist/src/routes/federation-sync/messaging.d.ts.map +1 -1
- package/dist/src/routes/federation-sync/messaging.js +3 -1
- package/dist/src/routes/federation-sync/messaging.js.map +1 -1
- package/dist/src/routes/ghii/recovery.d.ts +2 -0
- package/dist/src/routes/ghii/recovery.d.ts.map +1 -1
- package/dist/src/routes/ghii/recovery.js +7 -0
- package/dist/src/routes/ghii/recovery.js.map +1 -1
- package/dist/src/routes/ghii/register-login.d.ts +4 -0
- package/dist/src/routes/ghii/register-login.d.ts.map +1 -1
- package/dist/src/routes/ghii/register-login.js +45 -22
- package/dist/src/routes/ghii/register-login.js.map +1 -1
- package/dist/src/routes/ghii/web-verify.d.ts +5 -0
- package/dist/src/routes/ghii/web-verify.d.ts.map +1 -1
- package/dist/src/routes/ghii/web-verify.js +24 -3
- package/dist/src/routes/ghii/web-verify.js.map +1 -1
- package/dist/src/routes/libs/sdk-serve.d.ts +11 -0
- package/dist/src/routes/libs/sdk-serve.d.ts.map +1 -0
- package/dist/src/routes/libs/sdk-serve.js +53 -0
- package/dist/src/routes/libs/sdk-serve.js.map +1 -0
- package/dist/src/routes/libs.d.ts +7 -1
- package/dist/src/routes/libs.d.ts.map +1 -1
- package/dist/src/routes/libs.js +65 -146
- package/dist/src/routes/libs.js.map +1 -1
- package/dist/src/routes/messages.d.ts +3 -0
- package/dist/src/routes/messages.d.ts.map +1 -1
- package/dist/src/routes/messages.js +9 -0
- package/dist/src/routes/messages.js.map +1 -1
- package/dist/src/routes/notifications.d.ts +6 -3
- package/dist/src/routes/notifications.d.ts.map +1 -1
- package/dist/src/routes/notifications.js +32 -3
- package/dist/src/routes/notifications.js.map +1 -1
- package/dist/src/routes/organisms/workspace-access.d.ts.map +1 -1
- package/dist/src/routes/organisms/workspace-access.js +38 -20
- package/dist/src/routes/organisms/workspace-access.js.map +1 -1
- package/dist/src/routes/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 +2 -0
- package/dist/src/routes/upload.d.ts.map +1 -1
- package/dist/src/routes/upload.js +7 -0
- package/dist/src/routes/upload.js.map +1 -1
- package/dist/src/routes/webmcp.d.ts +3 -0
- package/dist/src/routes/webmcp.d.ts.map +1 -1
- package/dist/src/routes/webmcp.js +55 -0
- package/dist/src/routes/webmcp.js.map +1 -1
- package/dist/src/server-bootstrap/routes-loader.d.ts +1 -0
- package/dist/src/server-bootstrap/routes-loader.d.ts.map +1 -1
- package/dist/src/server-bootstrap/routes-loader.js +8 -0
- package/dist/src/server-bootstrap/routes-loader.js.map +1 -1
- package/dist/src/services/agent-face.d.ts +10 -2
- package/dist/src/services/agent-face.d.ts.map +1 -1
- package/dist/src/services/agent-face.js +10 -4
- package/dist/src/services/agent-face.js.map +1 -1
- package/dist/src/services/app-tool-interfaces.d.ts +37 -0
- package/dist/src/services/app-tool-interfaces.d.ts.map +1 -0
- package/dist/src/services/app-tool-interfaces.js +101 -0
- package/dist/src/services/app-tool-interfaces.js.map +1 -0
- package/dist/src/services/build-app-prompt.d.ts +3 -0
- package/dist/src/services/build-app-prompt.d.ts.map +1 -1
- package/dist/src/services/build-app-prompt.js +12 -1
- package/dist/src/services/build-app-prompt.js.map +1 -1
- package/dist/src/services/contacts.d.ts +25 -1
- package/dist/src/services/contacts.d.ts.map +1 -1
- package/dist/src/services/contacts.js +30 -0
- package/dist/src/services/contacts.js.map +1 -1
- package/dist/src/services/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/message-send.d.ts.map +1 -1
- package/dist/src/services/message-send.js +4 -1
- package/dist/src/services/message-send.js.map +1 -1
- package/dist/src/services/metered-entitlements.d.ts +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/notify.d.ts +7 -0
- package/dist/src/services/notify.d.ts.map +1 -1
- package/dist/src/services/notify.js +35 -0
- package/dist/src/services/notify.js.map +1 -1
- package/dist/src/services/owner-memory.d.ts +16 -0
- package/dist/src/services/owner-memory.d.ts.map +1 -1
- package/dist/src/services/owner-memory.js +23 -0
- 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/storage/providers/postgres-kysely/methods/apps.d.ts +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/apps.d.ts.map +1 -1
- package/dist/src/storage/providers/postgres-kysely/methods/apps.js +2 -0
- package/dist/src/storage/providers/postgres-kysely/methods/apps.js.map +1 -1
- package/dist/src/storage/providers/postgres-kysely/methods/identity.d.ts +1 -0
- package/dist/src/storage/providers/postgres-kysely/methods/identity.d.ts.map +1 -1
- package/dist/src/storage/providers/postgres-kysely/methods/identity.js +4 -0
- package/dist/src/storage/providers/postgres-kysely/methods/identity.js.map +1 -1
- package/dist/src/storage/providers/postgres-kysely/migrations/0011_unique_verified_email.sql +25 -0
- package/dist/src/storage/providers/sqlite/methods/apps.d.ts +1 -0
- package/dist/src/storage/providers/sqlite/methods/apps.d.ts.map +1 -1
- package/dist/src/storage/providers/sqlite/methods/apps.js +2 -0
- package/dist/src/storage/providers/sqlite/methods/apps.js.map +1 -1
- package/dist/src/storage/providers/sqlite/methods/identity-nodes.d.ts +1 -0
- package/dist/src/storage/providers/sqlite/methods/identity-nodes.d.ts.map +1 -1
- package/dist/src/storage/providers/sqlite/methods/identity-nodes.js +4 -0
- package/dist/src/storage/providers/sqlite/methods/identity-nodes.js.map +1 -1
- package/dist/src/storage/providers/sqlite/schema.d.ts.map +1 -1
- package/dist/src/storage/providers/sqlite/schema.js +20 -0
- package/dist/src/storage/providers/sqlite/schema.js.map +1 -1
- package/dist/src/storage/repositories/app.repository.d.ts +0 -0
- package/dist/src/storage/repositories/app.repository.d.ts.map +1 -1
- package/dist/src/storage/repositories/identity.repository.d.ts +6 -0
- package/dist/src/storage/repositories/identity.repository.d.ts.map +1 -1
- package/dist/src/storage/types/apps.d.ts +1 -0
- package/dist/src/storage/types/apps.d.ts.map +1 -1
- package/dist/src/storage/types/organisms-federation.d.ts +21 -0
- package/dist/src/storage/types/organisms-federation.d.ts.map +1 -1
- package/dist/src/utils/app-mobile-lint.d.ts +17 -0
- package/dist/src/utils/app-mobile-lint.d.ts.map +1 -0
- package/dist/src/utils/app-mobile-lint.js +40 -0
- package/dist/src/utils/app-mobile-lint.js.map +1 -0
- package/dist/static/app-catalog/_template.html +12 -77
- package/dist/static/app-catalog/js/apps-io.js +51 -165
- 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 +158 -24
- package/dist/static/app-catalog/js/favorites.js +71 -0
- package/dist/static/app-catalog/js/i18n-data.js +90 -16
- package/dist/static/app-catalog/js/main.js +23 -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 +26 -139
- package/dist/static/app-catalog/js/server-io.js +126 -223
- package/dist/static/app-catalog/js/settings.js +11 -204
- package/dist/static/app-catalog/styles/app-catalog.css +40 -0
- package/dist/static/app-catalog.html +790 -912
- 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 +5 -2
|
@@ -4,6 +4,13 @@
|
|
|
4
4
|
* wallet, memory, agents, extensions, packages, knowledge, generator, and
|
|
5
5
|
* edit panels. Consumes theme.css tokens so it flips with dark/light mode.
|
|
6
6
|
* @version-history
|
|
7
|
+
* v2.16.2 — 2026-07-21 — App-shell scroll model (theme.css v1.24.0): .pf-sidebar sticks to top:0 of
|
|
8
|
+
* the new .page-content scroll region (was top:var(--nav-height) against the window) and caps at
|
|
9
|
+
* calc(100dvh − nav-height) so its nav list scrolls without a header-height gap.
|
|
10
|
+
* v2.16.1 — 2026-07-20 — Mobile home-dashboard overflow fix: .pf-home-card (and the spend/quota
|
|
11
|
+
* tiles, chips, and long app-name row) get min-width:0 so unbreakable inner content no longer
|
|
12
|
+
* forces a card — and the whole home grid — wider than a narrow phone (content ran off the right
|
|
13
|
+
* edge, clipped by body{overflow-x:hidden}). .pf-usage-head wraps a very long quota value.
|
|
7
14
|
* v2.16.0 — 2026-07-19 — AppDev tab (pf-adk-*): prompt cards, learned-pitfall rows,
|
|
8
15
|
* chips (model/shared/tier/proof), severity badges (AppDev KB UI phase).
|
|
9
16
|
* v2.15.0 — 2026-07-16 — Drop the dead .pf-side-ico rule (sidebar nav is label-only now).
|
|
@@ -2239,8 +2246,15 @@
|
|
|
2239
2246
|
|
|
2240
2247
|
.pf-sidebar {
|
|
2241
2248
|
width: 240px; flex: 0 0 240px;
|
|
2242
|
-
|
|
2243
|
-
|
|
2249
|
+
/* App-shell: the scroll region is now .page-content (the header lives OUTSIDE
|
|
2250
|
+
it), so the sidebar sticks to the top of that region (top:0), not below the
|
|
2251
|
+
header. Height caps at the region's height so its own nav list scrolls.
|
|
2252
|
+
border-box folds the vertical padding INTO max-height — without it the padding
|
|
2253
|
+
stacks on top, making the sidebar taller than the scroll region so sticky can't
|
|
2254
|
+
hold it (it drifts up and the identity slides under the header when you scroll). */
|
|
2255
|
+
position: sticky; top: 0;
|
|
2256
|
+
box-sizing: border-box;
|
|
2257
|
+
max-height: calc(100dvh - var(--nav-height, 56px));
|
|
2244
2258
|
overflow-y: auto;
|
|
2245
2259
|
padding: 0.75rem 0.5rem 2rem;
|
|
2246
2260
|
border-right: 1px solid var(--border);
|
|
@@ -2977,7 +2991,11 @@
|
|
|
2977
2991
|
.pf-waiting-where { color: var(--muted); }
|
|
2978
2992
|
.pf-home-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1rem 0; }
|
|
2979
2993
|
@media (max-width: 760px) { .pf-home-grid { grid-template-columns: 1fr; } }
|
|
2980
|
-
|
|
2994
|
+
/* min-width:0 is load-bearing: grid/flex items default to min-width:auto and refuse to shrink
|
|
2995
|
+
below their content's intrinsic width. Without it, a card with unbreakable inner content (long
|
|
2996
|
+
app names, the 3-col number grid, the chart canvas) forces its grid column — and thus the whole
|
|
2997
|
+
home dashboard — wider than a narrow phone, overflowing the right edge. */
|
|
2998
|
+
.pf-home-card { border: 1px solid var(--border); border-radius: 12px; background: var(--card); padding: 0.8rem 1rem; min-width: 0; }
|
|
2981
2999
|
.pf-home-card-title { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 0.5rem; background: none; border: none; padding: 0; text-align: left; }
|
|
2982
3000
|
.pf-home-card-link { cursor: pointer; }
|
|
2983
3001
|
.pf-home-card-link:hover { color: var(--text); }
|
|
@@ -3017,7 +3035,14 @@
|
|
|
3017
3035
|
.pf-ai-apps-head { font-size: 0.75rem; font-weight: 600; color: var(--muted); margin-bottom: 0.35rem; }
|
|
3018
3036
|
.pf-ai-app-row { display: flex; align-items: center; gap: 0.5rem; padding: 0.2rem 0; font-size: 0.82rem; }
|
|
3019
3037
|
.pf-ai-app-dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
|
|
3020
|
-
|
|
3038
|
+
/* min-width:0 lets the flex:1 item actually shrink so the ellipsis engages on a long app name
|
|
3039
|
+
(a bare flex:1 keeps min-width:auto and would overflow the card on a narrow screen instead). */
|
|
3040
|
+
.pf-ai-app-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
|
|
3041
|
+
/* Let the spend tiles / quota chips shrink to their column on a narrow screen (tabular numbers
|
|
3042
|
+
otherwise hold an intrinsic min-width and push the card past the viewport). */
|
|
3043
|
+
.pf-ai-win, .pf-usage-chip { min-width: 0; }
|
|
3044
|
+
/* A very long quota value wraps under its label instead of forcing the row wider than the screen. */
|
|
3045
|
+
.pf-usage-head { flex-wrap: wrap; }
|
|
3021
3046
|
.pf-ai-app-cost { color: var(--text); font-variant-numeric: tabular-nums; }
|
|
3022
3047
|
.pf-ai-app-pct { width: 3ch; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
|
|
3023
3048
|
.pf-ai-app-meta { color: var(--muted); font-size: 0.72rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
|
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
* crew-defs an app declares (manifest.cortex.agents) onto YOUR OWN fleet + read liveness
|
|
13
13
|
*
|
|
14
14
|
* @version-history
|
|
15
|
+
* v1.2.0 — 2026-07-21 — listApps() paginates through ALL apps (was capped at the server
|
|
16
|
+
* default of 50, silently truncating the Apps tab / gallery).
|
|
15
17
|
* v1.1.0 — 2026-07-16 — Agent-Bundled Apps Slice 1: deploy/undeploy/status service calls
|
|
16
18
|
* v1.0.0 — 2026-07-13 — Header added; file pre-dates header standard
|
|
17
19
|
*/
|
|
@@ -19,10 +21,24 @@ import { apiGet, apiDelete, apiPatch, api } from '/js/api.js';
|
|
|
19
21
|
|
|
20
22
|
/** List apps. Returns array. The server decides visibility from who is
|
|
21
23
|
* authenticated: the owner sees their own parked/operator-hidden apps (the latter
|
|
22
|
-
* flagged operator_hidden so the UI can badge them); everyone else does not.
|
|
24
|
+
* flagged operator_hidden so the UI can badge them); everyone else does not.
|
|
25
|
+
*
|
|
26
|
+
* Paginates through EVERY app: a single /v1/apps request caps at the server default
|
|
27
|
+
* (50), so this loops by offset (200/page) until it has the server-reported `total`.
|
|
28
|
+
* Otherwise the Apps tab / gallery silently stopped at 50. A guard bounds the loop. */
|
|
23
29
|
export async function listApps() {
|
|
24
|
-
const
|
|
25
|
-
|
|
30
|
+
const LIMIT = 200;
|
|
31
|
+
let all = [];
|
|
32
|
+
let offset = 0;
|
|
33
|
+
for (let page = 0; page < 100; page++) { // guard: ≤ 100 pages (20k apps)
|
|
34
|
+
const data = await apiGet(`/v1/apps?limit=${LIMIT}&offset=${offset}`);
|
|
35
|
+
const apps = data?.data?.apps || [];
|
|
36
|
+
all = all.concat(apps);
|
|
37
|
+
const total = typeof data?.data?.total === 'number' ? data.data.total : all.length;
|
|
38
|
+
if (apps.length < LIMIT || all.length >= total) break;
|
|
39
|
+
offset += LIMIT;
|
|
40
|
+
}
|
|
41
|
+
return all;
|
|
26
42
|
}
|
|
27
43
|
|
|
28
44
|
/** Upload an app (HTML file + optional screenshot). */
|
|
@@ -19,6 +19,8 @@
|
|
|
19
19
|
* - handleOf(id) / peerLabel(id) — short label helpers (mirrors inbox-tab peerName)
|
|
20
20
|
* - buildConversationReplyPrompt({ peerGhii, subject, conversationId, thread }, mode)
|
|
21
21
|
* - buildMessageReplyPrompt({ peerGhii, subject, conversationId, message }, mode)
|
|
22
|
+
* - buildConversationSummaryPrompt({ peerGhii, subject, thread, peerName }) — distill a whole thread
|
|
23
|
+
* into a filo-ready note (summary/decisions/open-questions/actions/ideas) for the Notebook capture.
|
|
22
24
|
* @usage
|
|
23
25
|
* import { buildConversationReplyPrompt, MODES } from '/js/services/messages-ai-prompts.js';
|
|
24
26
|
* const text = buildConversationReplyPrompt({ peerGhii, subject, conversationId, thread }, MODES.COPY);
|
|
@@ -31,6 +33,9 @@
|
|
|
31
33
|
* v1.2.0 -- 2026-07-12 -- MCP mode sends AS THE OWNER via aimeat_dm_send_as_owner (consent-gated
|
|
32
34
|
* delegation, scope messages:send-as-owner), landing the reply in the owner's thread from the owner.
|
|
33
35
|
* Graceful fallback to "hand me the reply" when the scope isn't granted; still never aimeat_dm_send.
|
|
36
|
+
* v1.3.0 -- 2026-07-19 -- buildConversationSummaryPrompt: distill a whole thread into a knowledge note
|
|
37
|
+
* (summary/decisions/open-questions/actions/ideas). One prompt, two deliveries — the server-side
|
|
38
|
+
* /v1/ai/complete summary AND the copy-paste "run it in my own chat" mode of the Notebook capture.
|
|
34
39
|
*/
|
|
35
40
|
|
|
36
41
|
export const MODES = { COPY: 'copy', MCP: 'mcp' };
|
|
@@ -165,6 +170,39 @@ export function buildConversationReplyPrompt({ peerGhii, subject, conversationId
|
|
|
165
170
|
].join('\n');
|
|
166
171
|
}
|
|
167
172
|
|
|
173
|
+
/**
|
|
174
|
+
* Distill a whole conversation into a self-contained knowledge note — the prompt behind the Inbox
|
|
175
|
+
* "→ Notebook" capture. Used two ways with the SAME text: sent to /v1/ai/complete (server-side, the
|
|
176
|
+
* owner's own key) and shown for copy-paste into the owner's own AI chat. English framing (house rule);
|
|
177
|
+
* the model answers in the conversation's language.
|
|
178
|
+
* @param {ConversationSource} [src]
|
|
179
|
+
*/
|
|
180
|
+
export function buildConversationSummaryPrompt({ peerGhii, subject, thread, peerName } = {}) {
|
|
181
|
+
const them = peerLabel(peerGhii, peerName);
|
|
182
|
+
const topic = subject ? ` (topic: "${subject}")` : '';
|
|
183
|
+
const convo = transcript(thread, peerGhii, peerName || handleOf(peerGhii));
|
|
184
|
+
return [
|
|
185
|
+
'# Summarize this conversation for my knowledge base',
|
|
186
|
+
'',
|
|
187
|
+
`This is my AIMEAT conversation with **${them}**${topic}. Distill it into a clean, self-contained`,
|
|
188
|
+
'Markdown note I can file into my workspace. Write in the SAME language as the conversation.',
|
|
189
|
+
'',
|
|
190
|
+
'## Produce these sections (drop a heading only when it would be genuinely empty)',
|
|
191
|
+
'1. **Summary** — 2-4 sentences on what this conversation was about.',
|
|
192
|
+
'2. **Decisions** — concrete decisions that were made (bullet list).',
|
|
193
|
+
'3. **Open questions** — anything still unresolved or awaiting an answer.',
|
|
194
|
+
'4. **Action items** — who does what next, if stated (name the owner when known).',
|
|
195
|
+
'5. **Ideas worth keeping** — proposals, concepts, or directions raised that are worth revisiting.',
|
|
196
|
+
'',
|
|
197
|
+
'Stay faithful to what was actually said — do not invent decisions or facts. Images shown as',
|
|
198
|
+
'`` were shared but you cannot see them — reference them by name, never guess their',
|
|
199
|
+
'contents. Start the note with a single H1 title line.',
|
|
200
|
+
'',
|
|
201
|
+
'## The conversation',
|
|
202
|
+
convo,
|
|
203
|
+
].join('\n');
|
|
204
|
+
}
|
|
205
|
+
|
|
168
206
|
/**
|
|
169
207
|
* Single-message reply prompt — scoped to one message the user pointed at.
|
|
170
208
|
* @param {MessageSource} [src]
|
|
@@ -13,6 +13,8 @@
|
|
|
13
13
|
* v1.1.0 -- 2026-06-23 -- send() carries the optional `interactive` payload (federated AskUserQuestion).
|
|
14
14
|
* v1.1.1 -- 2026-07-17 -- uploadAttachment: add a random suffix to the storage key so same-named files
|
|
15
15
|
* uploaded in the same millisecond (two clipboard "image.png" pastes) don't overwrite each other.
|
|
16
|
+
* v1.2.0 -- 2026-07-21 -- getConversation(…, all): default loads the newest 50 (server page); all=true
|
|
17
|
+
* walks every page (per_page=200) so long threads show their FULL history instead of only the last 50.
|
|
16
18
|
*/
|
|
17
19
|
import { api, apiGet } from '/js/api.js';
|
|
18
20
|
|
|
@@ -54,10 +56,30 @@ export async function listConversations() {
|
|
|
54
56
|
return r?.data?.conversations || [];
|
|
55
57
|
}
|
|
56
58
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
/**
|
|
60
|
+
* Fetch a conversation thread. Default = the newest page (server default 50). Pass all=true to load the
|
|
61
|
+
* ENTIRE history: it walks every page (per_page=200) so long threads are never truncated — no message is
|
|
62
|
+
* hidden, only paged. Returns the messages array newest-first (the caller reverses for chat display);
|
|
63
|
+
* dedupes by id so a message arriving mid-walk can't double-render.
|
|
64
|
+
*/
|
|
65
|
+
export async function getConversation(conversationId, viaAgent, all = false) {
|
|
66
|
+
const base = `/v1/messages/conversations/${enc(conversationId)}`;
|
|
67
|
+
const agent = viaAgent ? `&agent=${enc(viaAgent)}` : '';
|
|
68
|
+
const perPage = all ? 200 : 50;
|
|
69
|
+
const first = await apiGet(`${base}?per_page=${perPage}&page=1${agent}`);
|
|
70
|
+
const data = first?.data || {};
|
|
71
|
+
let messages = data.messages || [];
|
|
72
|
+
const total = Number(data.total) || messages.length;
|
|
73
|
+
if (all && total > messages.length) {
|
|
74
|
+
const pages = Math.ceil(total / perPage);
|
|
75
|
+
for (let p = 2; p <= pages; p++) {
|
|
76
|
+
const r = await apiGet(`${base}?per_page=${perPage}&page=${p}${agent}`);
|
|
77
|
+
messages = messages.concat(r?.data?.messages || []);
|
|
78
|
+
}
|
|
79
|
+
const seen = new Set();
|
|
80
|
+
messages = messages.filter(m => m && m.id && !seen.has(m.id) && seen.add(m.id));
|
|
81
|
+
}
|
|
82
|
+
return messages;
|
|
61
83
|
}
|
|
62
84
|
|
|
63
85
|
export async function markConversationRead(conversationId) {
|
|
@@ -11,6 +11,9 @@
|
|
|
11
11
|
* - distributeNote(text) — POST /v1/librarian/distribute (split into placed chunks)
|
|
12
12
|
* - materializeDocument(plan) — resolve/create org → ws → document space → draft→publish doc → drop source
|
|
13
13
|
* - distributeChunks(chunks, sourceKey, onProgress) — materialize each chunk to its home
|
|
14
|
+
* - parkMessageToNotebook(msg) — park ONE inbox message for later processing
|
|
15
|
+
* - parkConversationToNotebook({conv,thread,peerName,summary,images}) — park a WHOLE thread (transcript +
|
|
16
|
+
* inline image embeds, optional AI/pasted summary) as one entry, ready for classify/distribute
|
|
14
17
|
* - getNotebookSettings/saveNotebookSettings — the per-owner trust toggles (notebook.settings)
|
|
15
18
|
* @version-history
|
|
16
19
|
* v1.0.0 — 2026-06-19 — Initial: classify + materialize-document orchestration (slice B).
|
|
@@ -21,10 +24,13 @@
|
|
|
21
24
|
* v1.3.0 — 2026-06-23 — materializeDocument now writes via writeDraft + publishDraft (was a raw
|
|
22
25
|
* `.latest` memory write) so notebook documents get version history and appear in the workspace
|
|
23
26
|
* activity log/heatmap — the document-path counterpart to the v1.2.0 record fix.
|
|
27
|
+
* v1.4.0 — 2026-07-19 — parkConversationToNotebook: capture a whole inbox thread (transcript + inline
|
|
28
|
+
* image embeds, optional summary) as one notebook entry for the "→ Notebook" conversation capture.
|
|
24
29
|
*/
|
|
25
30
|
import { api, apiPost } from '/js/api.js';
|
|
26
31
|
import { createMemory, getMemory, deleteMemory } from '/js/services/memory.js';
|
|
27
32
|
import { createOrganism, saveManifest, listWorkspaces, saveWorkspaceRegistry, wsRoot, writeDraft, publishDraft } from '/js/services/organisms.js';
|
|
33
|
+
import { handleOf } from '/js/services/messages-ai-prompts.js';
|
|
28
34
|
|
|
29
35
|
const DOC_SPACE = 'pages';
|
|
30
36
|
|
|
@@ -82,6 +88,76 @@ export async function parkMessageToNotebook(msg, opts = {}) {
|
|
|
82
88
|
return { key };
|
|
83
89
|
}
|
|
84
90
|
|
|
91
|
+
/** A short, stable UTC timestamp for a transcript line (locale-independent so the note is reproducible). */
|
|
92
|
+
function nbStamp(iso) {
|
|
93
|
+
if (!iso) return '';
|
|
94
|
+
const d = new Date(iso);
|
|
95
|
+
return Number.isFinite(d.getTime()) ? d.toISOString().replace('T', ' ').slice(0, 16) + ' UTC' : '';
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/** Render a whole thread as a Markdown transcript, embedding each message's image attachments inline
|
|
99
|
+
* (by url) so they survive into the materialized workspace document. `images` groups by messageId. */
|
|
100
|
+
function renderConversationMarkdown(thread, peerGhii, peerName, images) {
|
|
101
|
+
const them = peerName || handleOf(peerGhii);
|
|
102
|
+
const byMsg = {};
|
|
103
|
+
for (const im of (images || [])) (byMsg[im.messageId] || (byMsg[im.messageId] = [])).push(im);
|
|
104
|
+
return (thread || []).map((m) => {
|
|
105
|
+
const who = m.direction === 'outbound' ? 'Me' : them;
|
|
106
|
+
const when = nbStamp(m.createdAt);
|
|
107
|
+
const body = String(m.body || '').trim();
|
|
108
|
+
const imgs = (byMsg[m.id] || []).map((im) => `\n\n`).join('');
|
|
109
|
+
return `**${who}**${when ? ` — ${when}` : ''}\n\n${body}${imgs}`;
|
|
110
|
+
}).join('\n\n---\n\n');
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/** Pull an H1/first line out of a summary to use as the note title, or null. */
|
|
114
|
+
function summaryTitle(summary) {
|
|
115
|
+
const first = String(summary || '').split('\n').map((l) => l.trim()).find(Boolean);
|
|
116
|
+
if (!first) return null;
|
|
117
|
+
return first.replace(/^#+\s*/, '').slice(0, 120) || null;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Park a WHOLE conversation into the notebook as one entry (text + inline image embeds), ready for the
|
|
122
|
+
* existing classify/distribute enrichment. The three inbox capture modes all land here:
|
|
123
|
+
* - a server-side / pasted AI summary → stored above a "Full transcript" section, or
|
|
124
|
+
* - raw (no summary) → just the transcript.
|
|
125
|
+
* @param {object} [args]
|
|
126
|
+
* @param {{ conversationId?:string, peerGhii?:string, subject?:string }} [args.conv]
|
|
127
|
+
* @param {Array} [args.thread] The loaded thread messages.
|
|
128
|
+
* @param {string} [args.peerName]
|
|
129
|
+
* @param {string} [args.summary] An AI (server or pasted) summary markdown; omit for a raw capture.
|
|
130
|
+
* @param {Array<{messageId:string,id:string,name?:string,url:string}>} [args.images] Image attachments.
|
|
131
|
+
*/
|
|
132
|
+
export async function parkConversationToNotebook({ conv, thread, peerName, summary, images } = {}) {
|
|
133
|
+
const peerGhii = conv?.peerGhii || '';
|
|
134
|
+
const transcriptMd = renderConversationMarkdown(thread, peerGhii, peerName, images);
|
|
135
|
+
const sum = (summary || '').trim();
|
|
136
|
+
const text = sum
|
|
137
|
+
? `${sum}\n\n---\n\n## Full transcript\n\n${transcriptMd}`
|
|
138
|
+
: transcriptMd;
|
|
139
|
+
const title = summaryTitle(sum) || `Conversation with ${peerName || handleOf(peerGhii)}`;
|
|
140
|
+
const key = 'notebook.inbox.' + Date.now();
|
|
141
|
+
const value = {
|
|
142
|
+
text,
|
|
143
|
+
title,
|
|
144
|
+
capturedAt: new Date().toISOString(),
|
|
145
|
+
source: {
|
|
146
|
+
kind: 'conversation',
|
|
147
|
+
conversationId: conv?.conversationId,
|
|
148
|
+
peerGhii,
|
|
149
|
+
originNodeId: (peerGhii.split('@')[1] || ''),
|
|
150
|
+
messageCount: (thread || []).length,
|
|
151
|
+
attachments: (images || []).map((im) => ({ messageId: im.messageId, id: im.id, name: im.name, url: im.url })),
|
|
152
|
+
},
|
|
153
|
+
// A summarized thread is a knowledge capture, not an unanswered message — it owes no reply.
|
|
154
|
+
trackedResponseIntent: { owes: false, mode: 'approve' },
|
|
155
|
+
};
|
|
156
|
+
const resp = await createMemory(key, value, 'private');
|
|
157
|
+
if (resp?.ok === false) throw new Error(resp.error?.message || 'Could not park conversation to notebook');
|
|
158
|
+
return { key };
|
|
159
|
+
}
|
|
160
|
+
|
|
85
161
|
/** The per-owner notebook trust toggles ({ autoDetectIntent, autoRunPlan, autoDistribute }). */
|
|
86
162
|
export async function getNotebookSettings() {
|
|
87
163
|
try { const r = await getMemory('notebook.settings'); return (r?.data?.value) || {}; }
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file public/js/services/unfurl.js
|
|
3
|
+
* @description Frontend service for link previews (unfurls). `fetchPreview(url)` asks the node for a
|
|
4
|
+
* pasted link's OpenGraph/Twitter-card metadata; `fetchPreviewImageUrl(imageUrl)` pulls the preview
|
|
5
|
+
* image THROUGH the node (same-origin, auth'd) into a `blob:` object URL — the SPA's CSP forbids remote
|
|
6
|
+
* image hosts, so a direct <img src="https://…"> would be blocked. Both back the inbox message cards.
|
|
7
|
+
* @structure fetchPreview / fetchPreviewImageUrl
|
|
8
|
+
* @usage import * as unfurl from '/js/services/unfurl.js';
|
|
9
|
+
* @version-history
|
|
10
|
+
* v1.0.0 — 2026-07-21 — Initial link-preview service (inbox message link cards).
|
|
11
|
+
*/
|
|
12
|
+
import { apiGet } from '/js/api.js';
|
|
13
|
+
|
|
14
|
+
const enc = encodeURIComponent;
|
|
15
|
+
|
|
16
|
+
/** Fetch OG/Twitter-card metadata for one URL. Returns { url, resolvedUrl, title, description, image,
|
|
17
|
+
* siteName } or null if the node couldn't unfurl it (blocked/failed fetch, non-HTML, etc.). */
|
|
18
|
+
export async function fetchPreview(url) {
|
|
19
|
+
try {
|
|
20
|
+
const r = await apiGet(`/v1/unfurl?url=${enc(url)}`);
|
|
21
|
+
return r?.data || null;
|
|
22
|
+
} catch {
|
|
23
|
+
return null; // a preview is best-effort — a link that won't unfurl just shows no card
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/** Fetch a preview image through the node's proxy and return a blob: object URL (CSP-safe, auth'd via
|
|
28
|
+
* the session JWT — an <img> tag can't send an Authorization header, so we fetch the bytes ourselves).
|
|
29
|
+
* Returns null on any failure. The CALLER owns the returned URL and must URL.revokeObjectURL it. */
|
|
30
|
+
export async function fetchPreviewImageUrl(imageUrl) {
|
|
31
|
+
try {
|
|
32
|
+
const headers = /** @type {Record<string, string>} */ ({});
|
|
33
|
+
const session = window.AIMEAT?.auth?.getSession?.();
|
|
34
|
+
if (session?.jwt) headers['Authorization'] = 'Bearer ' + session.jwt;
|
|
35
|
+
const resp = await fetch(`/v1/unfurl/image?url=${enc(imageUrl)}`, { headers });
|
|
36
|
+
if (!resp.ok) return null;
|
|
37
|
+
const blob = await resp.blob();
|
|
38
|
+
if (!blob.type.startsWith('image/')) return null;
|
|
39
|
+
return URL.createObjectURL(blob);
|
|
40
|
+
} catch {
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -37,5 +37,16 @@ tom-high=D3/50, clap=Eb2/39, cowbell=Ab3/56)
|
|
|
37
37
|
- Source: https://github.com/dave4mpls/midi-js-soundfonts-with-drums (gleitz
|
|
38
38
|
fork that adds the GM percussion renders missing upstream)
|
|
39
39
|
|
|
40
|
+
## Strings (strings/), Organ (organ/), E-piano (epiano/), Trumpet (trumpet/)
|
|
41
|
+
|
|
42
|
+
**MusyngKite soundfont** pre-rendered per-note MP3s (string_ensemble_1,
|
|
43
|
+
drawbar_organ, electric_piano_1, trumpet)
|
|
44
|
+
- License: MIT — https://github.com/gleitz/midi-js-soundfonts (MusyngKite/)
|
|
45
|
+
- Added 2026-07-19 (Band Jam feedback round 2)
|
|
46
|
+
|
|
47
|
+
Note (2026-07-19, feedback round 2): bass swapped MusyngKite → **FluidR3
|
|
48
|
+
electric_bass_finger** (MusyngKite render sustained like a church organ) and
|
|
49
|
+
guitar-steel swapped MusyngKite → **FluidR3 acoustic_guitar_steel**.
|
|
50
|
+
|
|
40
51
|
All note subsets match `SAMPLE_NOTES` in aimeat-audio.js exactly (nearest-sample
|
|
41
52
|
pitch shift covers the gaps).
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/public/spa.html
CHANGED
|
@@ -154,6 +154,7 @@
|
|
|
154
154
|
"/js/services/work.js": "/js/services/work.js",
|
|
155
155
|
"/js/services/messages.js": "/js/services/messages.js",
|
|
156
156
|
"/js/services/messages-ai-prompts.js": "/js/services/messages-ai-prompts.js",
|
|
157
|
+
"/js/services/unfurl.js": "/js/services/unfurl.js",
|
|
157
158
|
"/js/services/tracked-responses.js": "/js/services/tracked-responses.js",
|
|
158
159
|
"/js/services/presence.js": "/js/services/presence.js",
|
|
159
160
|
"/js/presence-store.js": "/js/presence-store.js",
|
|
@@ -163,6 +164,7 @@
|
|
|
163
164
|
"/components/Modal.js": "/components/Modal.js",
|
|
164
165
|
"/components/useViewCSS.js": "/components/useViewCSS.js",
|
|
165
166
|
"/components/Markdown.js": "/components/Markdown.js",
|
|
167
|
+
"/components/LinkPreview.js": "/components/LinkPreview.js",
|
|
166
168
|
"/components/InboxLink.js": "/components/InboxLink.js",
|
|
167
169
|
"/components/JsonView.js": "/components/JsonView.js",
|
|
168
170
|
"/components/ImageDeliverable.js": "/components/ImageDeliverable.js",
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
* v1.0.0 — 2026-06-20 — Initial (H-2 app-origin isolation, Phase 3: consent page).
|
|
18
18
|
* v1.1.0 — 2026-06-20 — Popup (web_message) delivery + "trust this app" reframe + Advanced
|
|
19
19
|
* per-scope subset selection (consent flow wired to apps via the SDK).
|
|
20
|
+
* v1.2.0 — 2026-07-19 — Own-app + scope-upgrade fixes (Band Jam findings): the signed-in owner's
|
|
21
|
+
* OWN app (server-verified origin_bound + app_owner) auto-approves like the silent bridge and
|
|
22
|
+
* shows "Your app" instead of "not yours"; manage mode pre-checks the UNION of granted +
|
|
23
|
+
* requested scopes and badges newly requested ones "new" (they used to come unchecked, so
|
|
24
|
+
* users silently kept the old grant after an app added a scope).
|
|
20
25
|
*/
|
|
21
26
|
import { h } from 'preact';
|
|
22
27
|
import { useState, useEffect } from 'preact/hooks';
|
|
@@ -34,6 +39,7 @@ export default function AppGrant() {
|
|
|
34
39
|
const [advanced, setAdvanced] = useState(false);
|
|
35
40
|
const [selected, setSelected] = useState(() => new Set());
|
|
36
41
|
const [existingGrant, setExistingGrant] = useState(null); // the grant this app already holds (manage mode)
|
|
42
|
+
const [ownApp, setOwnApp] = useState(false); // server-verified: origin-bound request for the signed-in owner's own app
|
|
37
43
|
|
|
38
44
|
const requestId = new URLSearchParams(window.location.search).get('req') || '';
|
|
39
45
|
const [authed, setAuthed] = useState(() => !!window.AIMEAT?.auth?.hasSession);
|
|
@@ -67,9 +73,19 @@ export default function AppGrant() {
|
|
|
67
73
|
} catch { /* ignore */ }
|
|
68
74
|
if (!live) return;
|
|
69
75
|
const reqScopes = (res.data.scopes || []).map((s) => s.scope);
|
|
70
|
-
|
|
76
|
+
// The owner's OWN app (server-verified: the redirect origin is bound to exactly this app):
|
|
77
|
+
// same auto-approve policy as the silent bridge — their own app never needs the trust prompt.
|
|
78
|
+
// The server computes `own` independently at consent time, so this is UX, not the gate.
|
|
79
|
+
const myOwner = (window.AIMEAT?.auth?.storedGhii || '').split('@')[0];
|
|
80
|
+
const own = !!(res.data.origin_bound && res.data.app_owner && myOwner && myOwner === res.data.app_owner);
|
|
81
|
+
// Pre-check the UNION of already-granted and now-requested scopes: an app update that added
|
|
82
|
+
// a scope must surface it CHECKED — presenting it unchecked made users keep the old grant
|
|
83
|
+
// without noticing (the Band Jam scope-upgrade trap).
|
|
84
|
+
const granted = grant ? [...new Set([...grant.scopes, ...reqScopes])] : reqScopes;
|
|
71
85
|
setExistingGrant(grant);
|
|
72
86
|
setSelected(new Set(granted));
|
|
87
|
+
setOwnApp(own);
|
|
88
|
+
if (own && !res.data.manage) { setState({ status: 'autoapprove', request: res.data }); return; }
|
|
73
89
|
// Pass-through: when NOT explicitly managing (the gear) and the app already holds a grant that
|
|
74
90
|
// covers what it's asking for, just approve silently — no second prompt for an app you trust.
|
|
75
91
|
const covers = grant && reqScopes.every((s) => grant.scopes.includes(s));
|
|
@@ -170,13 +186,15 @@ export default function AppGrant() {
|
|
|
170
186
|
return html`
|
|
171
187
|
<div class="agr-wrap">
|
|
172
188
|
<div class="agr-card">
|
|
173
|
-
<span class="agr-badge">${tr('appGrant.externalBadge', 'External app')}</span>
|
|
189
|
+
<span class="agr-badge ${ownApp ? 'agr-badge-own' : ''}">${ownApp ? tr('appGrant.ownBadge', 'Your app') : tr('appGrant.externalBadge', 'External app')}</span>
|
|
174
190
|
<h1 class="agr-title">${existingGrant ? tr('appGrant.manageTitle', 'Manage this app’s access') : tr('appGrant.trustTitle', 'Trust this app?')}</h1>
|
|
175
191
|
<div class="agr-app">
|
|
176
192
|
<div class="agr-app-name">${escHtml(req.app_name)}</div>
|
|
177
193
|
<div class="agr-app-origin">${escHtml(req.app_origin)}</div>
|
|
178
194
|
</div>
|
|
179
|
-
<p class="agr-muted">${
|
|
195
|
+
<p class="agr-muted">${ownApp
|
|
196
|
+
? tr('appGrant.ownIntro', 'This is your own app. It still uses a scoped, revocable key — never your login session.')
|
|
197
|
+
: tr('appGrant.trustIntro', 'This app is not yours. It gets its OWN scoped, revocable key — never your login session. You can revoke it anytime in Profile › Access.')}</p>
|
|
180
198
|
|
|
181
199
|
<div class="agr-scopes-label">${tr('appGrant.needsLabel', 'This app needs:')}</div>
|
|
182
200
|
<ul class="agr-scopes">
|
|
@@ -186,7 +204,9 @@ export default function AppGrant() {
|
|
|
186
204
|
<input type="checkbox" class="agr-scope-check" checked=${selected.has(s.scope)}
|
|
187
205
|
onChange=${() => toggle(s.scope)} aria-label=${s.scope} />`}
|
|
188
206
|
<span class="agr-scope-text">
|
|
189
|
-
<span class="agr-scope-desc">${escHtml(s.description || s.scope)}
|
|
207
|
+
<span class="agr-scope-desc">${escHtml(s.description || s.scope)}
|
|
208
|
+
${existingGrant && !existingGrant.scopes.includes(s.scope) && html`<span class="agr-scope-newbadge">${tr('appGrant.newScope', 'new')}</span>`}
|
|
209
|
+
</span>
|
|
190
210
|
<span class="agr-scope-name">${escHtml(s.scope)}</span>
|
|
191
211
|
</span>
|
|
192
212
|
</li>`)}
|