@xopcai/xopc 0.0.312 → 0.0.314
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/browser-ext/dist/assets/{auth-C3yV1y_l.js → auth-DKo-NMUY.js} +18 -1
- package/dist/browser-ext/dist/background.js +68 -2
- package/dist/browser-ext/dist/sidepanel.html +1 -1
- package/dist/browser-ext/dist/sidepanel.js +1 -1
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/feishu/src/outbound/media-load.js +1 -1
- package/dist/extensions/telegram/src/inbound-processor.js +1 -1
- package/dist/extensions/telegram/src/plugin.js +2 -2
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-BVIJMP8w.js → agent-avatar-dicebear-BFkjfurL.js} +1 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-BdOZ6q8Z.js +1 -0
- package/dist/gateway/static/root/assets/{agents-D6g_SeWI.js → agents-CCcavsHq.js} +1 -1
- package/dist/gateway/static/root/assets/{api-_aHQA8bd.js → api-BYhRsTAc.js} +1 -1
- package/dist/gateway/static/root/assets/{app-link-CKueEVbT.js → app-link-nL8iPwEr.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-CLg_aXYG.js → app-management-settings-panel-B4kihr-A.js} +1 -1
- package/dist/gateway/static/root/assets/appearance-settings-N9sYmNOx.js +1 -0
- package/dist/gateway/static/root/assets/apps-page-BMcy10_s.js +1 -0
- package/dist/gateway/static/root/assets/{archive-plugin-CHO3heHX.js → archive-plugin-k_SuYWyV.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-BsmsBCI2.js → attachment-load-DRv5QWUK.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-CftigJlf.js → automations-page-CkJV3DN0.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-BEa2doeR.js +7 -0
- package/dist/gateway/static/root/assets/{binary-plugins-CRCLWBo2.js → binary-plugins-Dg3h3TA7.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-D0LDiOTT.js → block-editor-DVhdHntT.js} +29 -29
- package/dist/gateway/static/root/assets/{browser-automation-inputs-C611KRBx.js → browser-automation-inputs-BMRYUW8_.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automations-page-Djyv3vy-.js → browser-automations-page-Byv6-FY2.js} +2 -2
- package/dist/gateway/static/root/assets/browser-settings-page-DRCHGFpO.js +3 -0
- package/dist/gateway/static/root/assets/capabilities-D0S3DuAD.js +1 -0
- package/dist/gateway/static/root/assets/capabilities-settings-panel-mxRP0gl0.js +8 -0
- package/dist/gateway/static/root/assets/channels-settings-DBt_6GsB.js +1 -0
- package/dist/gateway/static/root/assets/{chat-terminal-dock-CIsKqdET.js → chat-terminal-dock-D4AHa51o.js} +2 -2
- package/dist/gateway/static/root/assets/{computer-settings-page-C0YL9J7m.js → computer-settings-page-eXPe500D.js} +1 -1
- package/dist/gateway/static/root/assets/connector-service-page-BQTFlq_k.js +1 -0
- package/dist/gateway/static/root/assets/connectors-page-BKeBWwcI.js +2 -0
- package/dist/gateway/static/root/assets/conversation-identity-Cw0n9uzK.js +1 -0
- package/dist/gateway/static/root/assets/{date-picker-CDsfv8R0.js → date-picker-7MtovynY.js} +1 -1
- package/dist/gateway/static/root/assets/{dependency-picker-DvhPj3CZ.js → dependency-picker-Bj_xkXID.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-Cyg8XMpL.js → desktop-pet-CTmba9zH.js} +1 -1
- package/dist/gateway/static/root/assets/desktop-pet-settings-DNM_BlWN.js +1 -0
- package/dist/gateway/static/root/assets/device-pairing-wizard-C2XE0QhT.js +1 -0
- package/dist/gateway/static/root/assets/{extension-debug-page-D-AVJU3q.js → extension-debug-page-J_olaL7e.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-DrFoQ9xt.js → extension-page-pK5RvqN8.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-DxWjESC1.js → extension-settings-page-BwroEN08.js} +1 -1
- package/dist/gateway/static/root/assets/files-BK6enEvD.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-config-swr-DUDX42qY.js → gateway-config-swr-FuJTIg_a.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-settings-CLLDp23J.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-startup-retry-Cf8OxlvY.js → gateway-startup-retry-CKg_gu8_.js} +1 -1
- package/dist/gateway/static/root/assets/home-page-B5Epb1PH.js +1 -0
- package/dist/gateway/static/root/assets/{image-generation-api-D2YorS--.js → image-generation-api-Bo6NZ7zb.js} +1 -1
- package/dist/gateway/static/root/assets/{imports-page-BKucJlXI.js → imports-page-C8-hX8gS.js} +1 -1
- package/dist/gateway/static/root/assets/index-14F1yGJI.js +89 -0
- package/dist/gateway/static/root/assets/index-cB7rWIDY.css +1 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-BxLXD-yU.js → keyboard-shortcuts-settings-BkBEjUZD.js} +1 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-6jC3vQpY.js +2 -0
- package/dist/gateway/static/root/assets/{local-apps-page-BAsQJQKJ.js → local-apps-page-CrbKIixo.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-DA0Z5jM_.js → locale-store-CvGwNbml.js} +1 -1
- package/dist/gateway/static/root/assets/logs-page-DBHlZts9.js +2 -0
- package/dist/gateway/static/root/assets/management-settings-DsUWLu5m.js +1 -0
- package/dist/gateway/static/root/assets/{markdown-view-DYGPxPee.js → markdown-view-nXo5nrsv.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-CQtQzLyg.js → media-plugins-upxXJ-4l.js} +1 -1
- package/dist/gateway/static/root/assets/messages-B_AwRroN.js +3 -0
- package/dist/gateway/static/root/assets/note-detail-panel-0Q9TOtJG.js +5 -0
- package/dist/gateway/static/root/assets/notes-page-D0NmcwNw.js +8 -0
- package/dist/gateway/static/root/assets/page-context-capture-button-DUyA-K4L.js +1 -0
- package/dist/gateway/static/root/assets/{page-tabs-B6DjkyMM.js → page-tabs-Cl-NFPNr.js} +1 -1
- package/dist/gateway/static/root/assets/{preview-open-alternatives-Dn57uLhr.js → preview-open-alternatives-DX81PwJ3.js} +1 -1
- package/dist/gateway/static/root/assets/product-delivery-chCjIpvu.js +1 -0
- package/dist/gateway/static/root/assets/{product-open-page-H2YMk8TY.js → product-open-page-CrfIGwm8.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-BVfVrYmn.js +1 -0
- package/dist/gateway/static/root/assets/projects-page-nM9a9XNS.js +1 -0
- package/dist/gateway/static/root/assets/{registry-api-C0DCx3wv.js → registry-api-CHxgohY0.js} +1 -1
- package/dist/gateway/static/root/assets/remote-access-hub-C8b_k88G.js +1 -0
- package/dist/gateway/static/root/assets/runtime-tools-settings-panel-D3dLOW04.js +5 -0
- package/dist/gateway/static/root/assets/scenes-page-DEowreZV.js +2 -0
- package/dist/gateway/static/root/assets/{schema-form-CblI9WUA.js → schema-form-ZxuIvD2_.js} +1 -1
- package/dist/gateway/static/root/assets/schemas-88fK3zzl.js +64 -0
- package/dist/gateway/static/root/assets/sessions-page-B_nPhera.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-BqhIOuus.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-BAaVyxJH.js → settings-form-section-TZRfg4yo.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-CKNPbm5q.js → settings-page-a8qcJpdZ.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-layout-DqNCGKxQ.js → settings-page-layout-BfvlRT9q.js} +1 -1
- package/dist/gateway/static/root/assets/setup-status-panel-CRj5Ruqn.js +1 -0
- package/dist/gateway/static/root/assets/{share-preview-page-BzMfp_HM.js → share-preview-page-DCt1pTWB.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-BNbXPk--.js +1 -0
- package/dist/gateway/static/root/assets/skill-reload-api-CNMCLbav.js +1 -0
- package/dist/gateway/static/root/assets/{skills-page-DIht92q6.js → skills-page-BIOcg44X.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page.utils-DLYRiEn3.js → skills-page.utils-CgZdzT4I.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-yYs4YgYk.js → system-settings-panel-_YaRncA6.js} +1 -1
- package/dist/gateway/static/root/assets/task-detail-page-CAcfAG-c.js +1 -0
- package/dist/gateway/static/root/assets/tasks-CDR_RVbQ.js +1 -0
- package/dist/gateway/static/root/assets/{tunnel-api-BasDYxvx.js → tunnel-api-uOupJOoS.js} +1 -1
- package/dist/gateway/static/root/assets/turn-outcome-D0SnyZ3Z.js +1 -0
- package/dist/gateway/static/root/assets/{use-autosave-CWAUHhcb.js → use-autosave-BezzHBLE.js} +1 -1
- package/dist/gateway/static/root/assets/user-model-page-BFFeneDq.js +2 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-Kc4UlxZs.js → voice-api-key-field-BmYifdwL.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-DTyMdGOR.js → voice-config-api-D_5Q2_A3.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-BPC_c9dO.js → work-discovery-overlay-4DmyEckJ.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-DBTciOrq.js → workflow-run-setup-panel-DeZe8bTZ.js} +2 -2
- package/dist/gateway/static/root/assets/workflows-page-Sv4hEc6W.js +6 -0
- package/dist/gateway/static/root/index.html +16 -16
- package/dist/package.js +1 -1
- package/dist/packages/computer-control-contract/src/index.js +10 -1
- package/dist/packages/gateway-contract/src/app-context.js +55 -0
- package/dist/packages/gateway-contract/src/automations.js +16 -17
- package/dist/packages/gateway-contract/src/capabilities.js +1078 -0
- package/dist/packages/gateway-contract/src/extension-capabilities.js +26 -0
- package/dist/packages/gateway-contract/src/home.js +3 -3
- package/dist/packages/gateway-contract/src/index.js +8 -0
- package/dist/packages/gateway-contract/src/product-delivery.js +19 -4
- package/dist/packages/gateway-contract/src/scenes.js +199 -0
- package/dist/packages/gateway-contract/src/task-runs.js +8 -4
- package/dist/packages/gateway-contract/src/tasks.js +5 -4
- package/dist/packages/realtime-client/src/index.js +17 -4
- package/dist/src/agent/agent-manager.d.ts +1 -0
- package/dist/src/agent/agent-manager.js +1 -0
- package/dist/src/agent/child-agent-factory.d.ts +2 -0
- package/dist/src/agent/child-agent-factory.js +5 -0
- package/dist/src/agent/commands/approved-verification.d.ts +14 -0
- package/dist/src/agent/commands/approved-verification.js +48 -0
- package/dist/src/agent/context/execution-scope.js +2 -1
- package/dist/src/agent/context/project-context.js +2 -1
- package/dist/src/agent/external-tools/cliProvider.js +123 -75
- package/dist/src/agent/external-tools/composio-provider.d.ts +1 -1
- package/dist/src/agent/external-tools/composio-provider.js +70 -12
- package/dist/src/agent/external-tools/endpoint-provider.js +14 -1
- package/dist/src/agent/inbound/turn-dispatcher.d.ts +2 -0
- package/dist/src/agent/inbound/turn-dispatcher.js +2 -1
- package/dist/src/agent/memory/compaction-chunks.d.ts +6 -1
- package/dist/src/agent/memory/compaction-chunks.js +16 -3
- package/dist/src/agent/memory/compaction-ledger.d.ts +3 -1
- package/dist/src/agent/memory/compaction-ledger.js +31 -18
- package/dist/src/agent/memory/compaction-request.d.ts +2 -0
- package/dist/src/agent/memory/compaction-request.js +6 -1
- package/dist/src/agent/memory/compaction.d.ts +19 -1
- package/dist/src/agent/memory/compaction.js +112 -30
- package/dist/src/agent/service/process-direct-streaming.d.ts +3 -0
- package/dist/src/agent/service/process-direct-streaming.js +19 -10
- package/dist/src/agent/service.js +1 -0
- package/dist/src/agent/service.types.d.ts +1 -0
- package/dist/src/agent/skills/config.js +2 -0
- package/dist/src/agent/skills/format-skills-prompt.js +14 -1
- package/dist/src/agent/skills/index.js +16 -8
- package/dist/src/agent/skills/types.d.ts +1 -1
- package/dist/src/agent/source-context/app-context.d.ts +4 -0
- package/dist/src/agent/source-context/app-context.js +36 -0
- package/dist/src/agent/source-context/injector.js +1 -0
- package/dist/src/agent/source-context/types.d.ts +5 -1
- package/dist/src/agent/tasks/task-judge-service.js +2 -1
- package/dist/src/agent/tool-manuals/computer.d.ts +1 -1
- package/dist/src/agent/tool-manuals/computer.js +1 -1
- package/dist/src/agent/tools/automation-tool.d.ts +12 -1
- package/dist/src/agent/tools/automation-tool.js +106 -32
- package/dist/src/agent/tools/factory.d.ts +1 -0
- package/dist/src/agent/tools/factory.js +6 -1
- package/dist/src/agent/tools/scoped-workspace-tools.d.ts +8 -0
- package/dist/src/agent/tools/scoped-workspace-tools.js +81 -0
- package/dist/src/agent/tools/xopc-use-tool.d.ts +6 -3
- package/dist/src/agent/tools/xopc-use-tool.js +997 -908
- package/dist/src/agent/workflow/subagent-runner.js +1 -0
- package/dist/src/agent-config/index.js +2 -2
- package/dist/src/agent-config/schema.d.ts +5 -0
- package/dist/src/agent-config/schema.js +14 -10
- package/dist/src/automations/api/routes.js +244 -164
- package/dist/src/automations/capabilities/drafts.d.ts +4 -0
- package/dist/src/automations/capabilities/drafts.js +95 -0
- package/dist/src/automations/capabilities/read.d.ts +4 -0
- package/dist/src/automations/capabilities/read.js +119 -0
- package/dist/src/automations/capabilities/write.d.ts +349 -0
- package/dist/src/automations/capabilities/write.js +172 -0
- package/dist/src/automations/domain/index.js +2 -2
- package/dist/src/automations/domain/validation.d.ts +77 -77
- package/dist/src/automations/domain/validation.js +9 -6
- package/dist/src/automations/draft/automation-draft-validator.d.ts +2 -2
- package/dist/src/automations/index.js +6 -6
- package/dist/src/automations/service/automation-service.d.ts +31 -0
- package/dist/src/automations/service/automation-service.js +213 -75
- package/dist/src/automations/service/index.js +2 -2
- package/dist/src/automations/storage/automation-repository.d.ts +2 -0
- package/dist/src/automations/storage/automation-repository.js +9 -1
- package/dist/src/automations/storage/automation-run-repository.d.ts +4 -1
- package/dist/src/automations/storage/automation-run-repository.js +16 -3
- package/dist/src/automations/storage/index.js +3 -3
- package/dist/src/browser/automations/schema.d.ts +1 -1
- package/dist/src/browser/automations/service.d.ts +1 -1
- package/dist/src/browser/observation/format.js +4 -0
- package/dist/src/capabilities/adapters/http.d.ts +4 -0
- package/dist/src/capabilities/adapters/http.js +44 -0
- package/dist/src/capabilities/readiness/from-config.js +11 -7
- package/dist/src/capabilities/runtime/app-context.d.ts +3 -0
- package/dist/src/capabilities/runtime/app-context.js +72 -0
- package/dist/src/capabilities/runtime/atomic-operations.d.ts +11 -0
- package/dist/src/capabilities/runtime/atomic-operations.js +34 -0
- package/dist/src/capabilities/runtime/dispatcher.d.ts +67 -0
- package/dist/src/capabilities/runtime/dispatcher.js +170 -0
- package/dist/src/capabilities/runtime/errors.d.ts +6 -0
- package/dist/src/capabilities/runtime/errors.js +11 -0
- package/dist/src/capabilities/runtime/external-operations.d.ts +16 -0
- package/dist/src/capabilities/runtime/external-operations.js +92 -0
- package/dist/src/capabilities/runtime/product.d.ts +12 -0
- package/dist/src/capabilities/runtime/product.js +69 -0
- package/dist/src/capabilities/runtime/settings.d.ts +3 -0
- package/dist/src/capabilities/runtime/settings.js +27 -0
- package/dist/src/channels/index.js +2 -2
- package/dist/src/channels/manager.js +1 -1
- package/dist/src/cli/cli-log-level-preset.d.ts +2 -0
- package/dist/src/cli/cli-log-level-preset.js +4 -0
- package/dist/src/cli/command-catalog.js +4 -0
- package/dist/src/cli/command-loaders.js +1 -0
- package/dist/src/cli/command-manifest.js +4 -0
- package/dist/src/cli/commands/channels.js +1 -1
- package/dist/src/cli/commands/connectors.js +1 -1
- package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
- package/dist/src/cli/commands/extension-marketplace.js +1 -1
- package/dist/src/cli/commands/mcp.d.ts +1 -0
- package/dist/src/cli/commands/mcp.js +51 -0
- package/dist/src/cli/commands/models.js +1 -1
- package/dist/src/cli/commands/onboard.js +1 -1
- package/dist/src/cli/commands/project.js +1 -1
- package/dist/src/computer/broker.d.ts +0 -1
- package/dist/src/computer/broker.js +4 -6
- package/dist/src/computer/evaluation-harness.d.ts +45 -0
- package/dist/src/computer/evaluation-harness.js +108 -0
- package/dist/src/computer/model-adapter.d.ts +37 -2
- package/dist/src/computer/model-adapter.js +333 -42
- package/dist/src/computer/model-policy.d.ts +4 -1
- package/dist/src/computer/model-policy.js +11 -3
- package/dist/src/computer/release-gate.d.ts +22 -0
- package/dist/src/computer/release-gate.js +19 -0
- package/dist/src/computer/runtime.js +14 -10
- package/dist/src/computer/task-state.d.ts +1 -0
- package/dist/src/computer/task-state.js +1 -0
- package/dist/src/config/models-json.d.ts +14 -8
- package/dist/src/config/models-json.js +1 -1
- package/dist/src/config/schema.d.ts +4 -0
- package/dist/src/config/schema.js +3 -9
- package/dist/src/connectors/composio-sessions.d.ts +4 -2
- package/dist/src/connectors/composio-sessions.js +10 -9
- package/dist/src/connectors/composio.js +10 -8
- package/dist/src/discussions/action-tasks.js +2 -1
- package/dist/src/discussions/recording.js +1 -1
- package/dist/src/execution-environments/local-worktree-manager.d.ts +1 -0
- package/dist/src/execution-environments/local-worktree-manager.js +13 -2
- package/dist/src/extensions/activation-context.js +3 -3
- package/dist/src/extensions/api.js +1 -1
- package/dist/src/extensions/normalize-manifest.js +6 -1
- package/dist/src/extensions/sdk/index.js +1 -1
- package/dist/src/extensions/sdk/media.js +1 -1
- package/dist/src/extensions/types/manifest.d.ts +3 -0
- package/dist/src/gateway/agent-builtin-tools.d.ts +1 -1
- package/dist/src/gateway/hono/lib/config-payload.d.ts +1 -0
- package/dist/src/gateway/hono/middleware/scopes.js +1 -1
- package/dist/src/gateway/hono/routes/auth-registry-extensions.js +5 -2
- package/dist/src/gateway/hono/routes/capability-operations.d.ts +3 -0
- package/dist/src/gateway/hono/routes/capability-operations.js +52 -0
- package/dist/src/gateway/hono/routes/lazy-bundles.js +16 -0
- package/dist/src/gateway/hono/routes/local-app-capabilities.d.ts +4 -0
- package/dist/src/gateway/hono/routes/local-app-capabilities.js +41 -0
- package/dist/src/gateway/hono/routes/local-apps.js +41 -9
- package/dist/src/gateway/hono/routes/models.js +2 -2
- package/dist/src/gateway/hono/routes/notes.js +215 -146
- package/dist/src/gateway/hono/routes/projects.js +217 -374
- package/dist/src/gateway/hono/routes/scenes.js +188 -75
- package/dist/src/gateway/hono/routes/session-input-handler.d.ts +60 -16
- package/dist/src/gateway/hono/routes/session-input-handler.js +43 -1
- package/dist/src/gateway/hono/routes/sessions.js +17 -0
- package/dist/src/gateway/hono/routes/status.js +1 -1
- package/dist/src/gateway/hono/routes/tasks.js +182 -326
- package/dist/src/gateway/hono/routes/user-model-refresh.js +1 -1
- package/dist/src/gateway/hono/routes/voice.js +4 -4
- package/dist/src/gateway/hono/routes/workflows.js +1 -1
- package/dist/src/gateway/media-access.js +2 -1
- package/dist/src/gateway/mobile-privacy.js +2 -2
- package/dist/src/gateway/scenes/host.js +14 -3
- package/dist/src/gateway/scenes/mailContext.js +1 -1
- package/dist/src/gateway/scenes/slackThreadSource.d.ts +41 -0
- package/dist/src/gateway/scenes/slackThreadSource.js +168 -0
- package/dist/src/gateway/security/gateway-scopes.d.ts +1 -1
- package/dist/src/gateway/security/gateway-scopes.js +5 -0
- package/dist/src/gateway/service/app-context-access.d.ts +11 -0
- package/dist/src/gateway/service/app-context-access.js +70 -0
- package/dist/src/gateway/service/run-gateway-agent.js +11 -2
- package/dist/src/gateway/service/session-input-coordinator.js +54 -15
- package/dist/src/gateway/service/sessions-api.d.ts +1 -0
- package/dist/src/gateway/service/sessions-api.js +3 -0
- package/dist/src/gateway/service/task-conversation-query-service.d.ts +3 -1
- package/dist/src/gateway/service/task-conversation-query-service.js +32 -3
- package/dist/src/gateway/service.d.ts +3 -0
- package/dist/src/gateway/service.js +69 -15
- package/dist/src/gateway/session-context-summary.js +2 -1
- package/dist/src/{tasks/task-outbox-dispatcher.d.ts → infra/domain-outbox-dispatcher.d.ts} +2 -2
- package/dist/src/{tasks/task-outbox-dispatcher.js → infra/domain-outbox-dispatcher.js} +10 -9
- package/dist/src/infra/operation-context.d.ts +2 -0
- package/dist/src/infra/operation-context.js +16 -0
- package/dist/src/local-apps/capabilities/contracts.d.ts +2 -0
- package/dist/src/local-apps/capabilities/contracts.js +32 -0
- package/dist/src/local-apps/capabilities/read.d.ts +3 -0
- package/dist/src/local-apps/capabilities/read.js +48 -0
- package/dist/src/local-apps/capabilities/runtime.d.ts +16 -0
- package/dist/src/local-apps/capabilities/runtime.js +66 -0
- package/dist/src/local-apps/capabilities/write.d.ts +3 -0
- package/dist/src/local-apps/capabilities/write.js +35 -0
- package/dist/src/local-apps/release-lock.d.ts +2 -0
- package/dist/src/local-apps/release-lock.js +20 -0
- package/dist/src/local-apps/runtime-entry.d.ts +0 -2
- package/dist/src/local-apps/runtime-entry.js +1 -14
- package/dist/src/local-apps/scaffold.js +4 -1
- package/dist/src/local-apps/service.d.ts +24 -1
- package/dist/src/local-apps/service.js +186 -43
- package/dist/src/local-apps/store.js +0 -2
- package/dist/src/mcp/capability-server.d.ts +4 -0
- package/dist/src/mcp/capability-server.js +96 -0
- package/dist/src/mcp/channel-bridge.js +1 -1
- package/dist/src/mcp/gateway-http-client.d.ts +7 -0
- package/dist/src/mcp/gateway-http-client.js +27 -5
- package/dist/src/media-understanding/openai-compatible-audio.js +1 -1
- package/dist/src/notes/agent-context.js +1 -1
- package/dist/src/notes/capabilities/read.d.ts +3 -0
- package/dist/src/notes/capabilities/read.js +96 -0
- package/dist/src/notes/capabilities/write.d.ts +7 -0
- package/dist/src/notes/capabilities/write.js +152 -0
- package/dist/src/notes/index.js +1 -1
- package/dist/src/notes/service.d.ts +12 -4
- package/dist/src/notes/service.js +188 -175
- package/dist/src/notes/store.d.ts +14 -9
- package/dist/src/notes/store.js +81 -21
- package/dist/src/notifications/service.d.ts +1 -0
- package/dist/src/notifications/service.js +5 -0
- package/dist/src/platform/client.d.ts +1 -1
- package/dist/src/platform/contracts.d.ts +1 -1
- package/dist/src/projects/capabilities/read.d.ts +3 -0
- package/dist/src/projects/capabilities/read.js +81 -0
- package/dist/src/projects/capabilities/write.d.ts +9 -0
- package/dist/src/projects/capabilities/write.js +260 -0
- package/dist/src/projects/index.js +2 -2
- package/dist/src/projects/project-change-events.d.ts +2 -0
- package/dist/src/projects/project-change-events.js +18 -0
- package/dist/src/projects/project-service.d.ts +11 -0
- package/dist/src/projects/project-service.js +121 -42
- package/dist/src/projects/project-store.js +12 -2
- package/dist/src/projects/project-workspace-creation.d.ts +3 -0
- package/dist/src/projects/project-workspace-creation.js +45 -0
- package/dist/src/projects/workspace-project.js +6 -0
- package/dist/src/providers/model-catalog-types.d.ts +2 -1
- package/dist/src/providers/model-reference-auditor.js +4 -4
- package/dist/src/providers/model-supplements.js +13 -3
- package/dist/src/providers/presentation.js +3 -3
- package/dist/src/providers/xopc-cloud-model-source.js +4 -2
- package/dist/src/realtime/runtime.js +4 -0
- package/dist/src/scenes/capabilities/read.d.ts +3 -0
- package/dist/src/scenes/capabilities/read.js +187 -0
- package/dist/src/scenes/capabilities/write.d.ts +3 -0
- package/dist/src/scenes/capabilities/write.js +151 -0
- package/dist/src/scenes/contracts.d.ts +2 -105
- package/dist/src/scenes/contracts.js +3 -88
- package/dist/src/scenes/execution.d.ts +1 -1
- package/dist/src/scenes/httpServices.d.ts +2 -0
- package/dist/src/scenes/inbox.d.ts +1 -0
- package/dist/src/scenes/inbox.js +7 -7
- package/dist/src/scenes/preferences.d.ts +3 -24
- package/dist/src/scenes/preferences.js +8 -30
- package/dist/src/scenes/repository.d.ts +1 -0
- package/dist/src/scenes/repository.js +7 -3
- package/dist/src/scenes/resultNotifications.js +2 -2
- package/dist/src/scenes/schedule.d.ts +1 -8
- package/dist/src/scenes/schedule.js +3 -15
- package/dist/src/scenes/service.d.ts +6 -0
- package/dist/src/scenes/service.js +29 -25
- package/dist/src/scenes/taskFollowUp/agentExecutor.d.ts +36 -0
- package/dist/src/scenes/taskFollowUp/agentExecutor.js +149 -0
- package/dist/src/scenes/taskFollowUp/branchInventory.d.ts +38 -0
- package/dist/src/scenes/taskFollowUp/branchInventory.js +70 -0
- package/dist/src/scenes/taskFollowUp/contracts.d.ts +91 -0
- package/dist/src/scenes/taskFollowUp/contracts.js +100 -0
- package/dist/src/scenes/taskFollowUp/resources.d.ts +19 -0
- package/dist/src/scenes/taskFollowUp/resources.js +97 -0
- package/dist/src/scenes/taskFollowUp/service.d.ts +810 -0
- package/dist/src/scenes/taskFollowUp/service.js +710 -0
- package/dist/src/scenes/taskFollowUp/workspaceFingerprint.d.ts +2 -0
- package/dist/src/scenes/taskFollowUp/workspaceFingerprint.js +46 -0
- package/dist/src/scenes/templates.d.ts +2 -2
- package/dist/src/scenes/templates.js +1 -1
- package/dist/src/session/session-find.d.ts +17 -0
- package/dist/src/session/session-find.js +56 -0
- package/dist/src/session/store.d.ts +4 -0
- package/dist/src/session/store.js +43 -7
- package/dist/src/share/note-share-revocation.d.ts +3 -0
- package/dist/src/share/note-share-revocation.js +26 -0
- package/dist/src/storage/sqlite/migrations/190_scene_development.sql +37 -0
- package/dist/src/storage/sqlite/migrations/191_scene_task_follow_up.sql +27 -0
- package/dist/src/storage/sqlite/migrations/192_capability_operations.sql +20 -0
- package/dist/src/storage/sqlite/migrations/193_note_file_cleanup.sql +8 -0
- package/dist/src/storage/sqlite/migrations/194_capability_external_outcomes.sql +11 -0
- package/dist/src/storage/sqlite/migrations/195_automation_deleted_revisions.sql +4 -0
- package/dist/src/storage/sqlite/migrations/196_automation_run_requests.sql +23 -0
- package/dist/src/storage/sqlite/migrations/197_note_deletion_cleanup.sql +8 -0
- package/dist/src/storage/sqlite/migrations/198_project_workspace_creation.sql +7 -0
- package/dist/src/storage/sqlite/migrations/199_scene_resource_events.sql +488 -0
- package/dist/src/storage/sqlite/migrations/runner.d.ts +1 -1
- package/dist/src/storage/sqlite/migrations/runner.js +6 -3
- package/dist/src/storage/sqlite/schema.js +1 -1
- package/dist/src/storage/sqlite/transaction.d.ts +5 -0
- package/dist/src/storage/sqlite/transaction.js +34 -3
- package/dist/src/tasks/capabilities/management.d.ts +195 -0
- package/dist/src/tasks/capabilities/management.js +111 -0
- package/dist/src/tasks/capabilities/read.d.ts +2 -0
- package/dist/src/tasks/capabilities/read.js +141 -0
- package/dist/src/tasks/capabilities/relations.d.ts +204 -0
- package/dist/src/tasks/capabilities/relations.js +140 -0
- package/dist/src/tasks/capabilities/runs.d.ts +2 -0
- package/dist/src/tasks/capabilities/runs.js +89 -0
- package/dist/src/tasks/capabilities/write.d.ts +207 -0
- package/dist/src/tasks/capabilities/write.js +107 -0
- package/dist/src/tasks/home-query-service.js +3 -2
- package/dist/src/tasks/index.d.ts +0 -1
- package/dist/src/tasks/index.js +9 -9
- package/dist/src/tasks/project-operating-view-service.js +2 -1
- package/dist/src/tasks/task-application-service.d.ts +1 -0
- package/dist/src/tasks/task-application-service.js +3 -2
- package/dist/src/tasks/task-change-events.js +5 -3
- package/dist/src/tasks/task-context-assembler.js +2 -1
- package/dist/src/tasks/task-deletion-service.js +2 -1
- package/dist/src/tasks/task-dependency-service.js +2 -1
- package/dist/src/tasks/task-handoff-service.js +2 -1
- package/dist/src/tasks/task-read-model-projector.js +2 -1
- package/dist/src/tasks/task-repository.d.ts +12 -7
- package/dist/src/tasks/task-repository.js +175 -154
- package/dist/src/tasks/task-run-coordinator.js +2 -1
- package/dist/src/tasks/task-run-dispatcher.js +2 -1
- package/dist/src/tasks/task-run-repository.d.ts +1 -0
- package/dist/src/tasks/task-run-repository.js +29 -14
- package/dist/src/tasks/task-signal-service.js +2 -1
- package/dist/src/tui/backends/embedded-backend.js +1 -1
- package/dist/src/tui/backends/gateway-realtime-backend.js +1 -1
- package/dist/src/tui/tui-commands.js +1 -1
- package/dist/src/user-context/config.d.ts +13 -0
- package/dist/src/user-context/config.js +2 -0
- package/dist/src/voice/platform-catalog.d.ts +1 -1
- package/dist/src/voice/realtime/runtime.js +3 -3
- package/dist/src/voice/stt/providers/alibaba-transcription.js +1 -1
- package/dist/src/voice/stt/providers/xopc-cloud-transcription.js +1 -1
- package/dist/src/voice/tts/providers/xopc-cloud-speech.js +1 -1
- package/dist/src/work-discovery/incremental-repository.js +1 -1
- package/dist/src/work-discovery/index.js +1 -1
- package/dist/src/work-discovery/repository.d.ts +1 -1
- package/dist/src/work-discovery/repository.js +3 -2
- package/dist/src/work-discovery/service.d.ts +4 -0
- package/dist/src/work-discovery/service.js +36 -11
- package/dist/src/workflows/context/workflow-context.js +3 -2
- package/dist/src/workflows/service/workflow-run-service.js +2 -1
- package/package.json +6 -2
- package/skills/THIRD_PARTY_NOTICES.md +2 -2
- package/skills/documents/xlsx/SKILL.md +5 -0
- package/skills/engineering/build-xopc-local-app/SKILL.md +2 -0
- package/skills/tools/find-skills/SKILL.md +3 -0
- package/dist/gateway/static/root/assets/activity-store-DVUTs1fk.js +0 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-K3hTmu9d.js +0 -1
- package/dist/gateway/static/root/assets/appearance-settings-CU52MfIT.js +0 -1
- package/dist/gateway/static/root/assets/apps-page-ZpA1-6ad.js +0 -1
- package/dist/gateway/static/root/assets/automations-workspace-IEAxKRME.js +0 -7
- package/dist/gateway/static/root/assets/browser-settings-page-CU4VWsmX.js +0 -3
- package/dist/gateway/static/root/assets/capabilities-settings-panel-C9XQk3HL.js +0 -8
- package/dist/gateway/static/root/assets/channels-settings-Bqlhjooi.js +0 -1
- package/dist/gateway/static/root/assets/connector-service-page-BmH17JnO.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-zkx8Q-e6.js +0 -2
- package/dist/gateway/static/root/assets/desktop-pet-settings-CE4GOlMM.js +0 -1
- package/dist/gateway/static/root/assets/device-pairing-wizard-CdKJqnnw.js +0 -1
- package/dist/gateway/static/root/assets/files-Be5viEFY.js +0 -1
- package/dist/gateway/static/root/assets/gateway-realtime-CGOW0-b4.js +0 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-D4um_sV7.js +0 -1
- package/dist/gateway/static/root/assets/gateway-settings-CgXp2zq4.js +0 -1
- package/dist/gateway/static/root/assets/home-page-D6Idk732.js +0 -1
- package/dist/gateway/static/root/assets/index-1wIKA-kM.css +0 -1
- package/dist/gateway/static/root/assets/index-PFQHPGgi.js +0 -79
- package/dist/gateway/static/root/assets/local-app-workbench-page-BmAqTRb4.js +0 -2
- package/dist/gateway/static/root/assets/logs-page-ZjVYXXyM.js +0 -2
- package/dist/gateway/static/root/assets/management-settings-CSTkYVOZ.js +0 -1
- package/dist/gateway/static/root/assets/messages-4BtQKYlM.js +0 -3
- package/dist/gateway/static/root/assets/note-detail-panel-DuXCt-MM.js +0 -5
- package/dist/gateway/static/root/assets/notes-page-BjOgBVq5.js +0 -8
- package/dist/gateway/static/root/assets/product-delivery-CrAI8ZEa.js +0 -1
- package/dist/gateway/static/root/assets/project-detail-page-0zi4-i9X.js +0 -1
- package/dist/gateway/static/root/assets/projects-page-B18OxmJj.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-z-DxbuaE.js +0 -1
- package/dist/gateway/static/root/assets/runtime-tools-settings-panel-DGsBTbo6.js +0 -5
- package/dist/gateway/static/root/assets/scenes-page-Bgba03B_.js +0 -1
- package/dist/gateway/static/root/assets/schemas-BaskVM5g.js +0 -64
- package/dist/gateway/static/root/assets/sessions-page-B1t3bMsm.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-CBX0Ezhf.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-Bw71C2X3.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-BoVDQolc.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-DtTptpAt.js +0 -1
- package/dist/gateway/static/root/assets/task-detail-page-vgkiGo-D.js +0 -1
- package/dist/gateway/static/root/assets/theme-store-CegIlB8d.js +0 -1
- package/dist/gateway/static/root/assets/user-model-page-CAGafNfP.js +0 -2
- package/dist/gateway/static/root/assets/workflows-page-CSxHVs1p.js +0 -6
- package/skills/creative/algorithmic-art/SKILL.md +0 -44
- package/skills/creative/algorithmic-art/templates/generator-template.js +0 -27
- package/skills/creative/algorithmic-art/templates/viewer.html +0 -27
|
@@ -29,8 +29,8 @@ export declare const OpenAICompletionsCompatSchema: z.ZodObject<{
|
|
|
29
29
|
requiresThinkingAsText: z.ZodOptional<z.ZodBoolean>;
|
|
30
30
|
requiresMistralToolIds: z.ZodOptional<z.ZodBoolean>;
|
|
31
31
|
thinkingFormat: z.ZodOptional<z.ZodEnum<{
|
|
32
|
-
"ant-ling": "ant-ling";
|
|
33
32
|
openai: "openai";
|
|
33
|
+
"ant-ling": "ant-ling";
|
|
34
34
|
deepseek: "deepseek";
|
|
35
35
|
openrouter: "openrouter";
|
|
36
36
|
zai: "zai";
|
|
@@ -67,8 +67,8 @@ export declare const OpenAICompatSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
67
67
|
requiresThinkingAsText: z.ZodOptional<z.ZodBoolean>;
|
|
68
68
|
requiresMistralToolIds: z.ZodOptional<z.ZodBoolean>;
|
|
69
69
|
thinkingFormat: z.ZodOptional<z.ZodEnum<{
|
|
70
|
-
"ant-ling": "ant-ling";
|
|
71
70
|
openai: "openai";
|
|
71
|
+
"ant-ling": "ant-ling";
|
|
72
72
|
deepseek: "deepseek";
|
|
73
73
|
openrouter: "openrouter";
|
|
74
74
|
zai: "zai";
|
|
@@ -266,6 +266,7 @@ export declare const CustomModelSchema: z.ZodObject<{
|
|
|
266
266
|
profile: z.ZodEnum<{
|
|
267
267
|
"gui-plus-2026-02-26": "gui-plus-2026-02-26";
|
|
268
268
|
"structured-tools-v1": "structured-tools-v1";
|
|
269
|
+
"openai-responses-computer-v1": "openai-responses-computer-v1";
|
|
269
270
|
}>;
|
|
270
271
|
}, z.core.$strict>>;
|
|
271
272
|
id: z.ZodString;
|
|
@@ -318,8 +319,8 @@ export declare const CustomModelSchema: z.ZodObject<{
|
|
|
318
319
|
requiresThinkingAsText: z.ZodOptional<z.ZodBoolean>;
|
|
319
320
|
requiresMistralToolIds: z.ZodOptional<z.ZodBoolean>;
|
|
320
321
|
thinkingFormat: z.ZodOptional<z.ZodEnum<{
|
|
321
|
-
"ant-ling": "ant-ling";
|
|
322
322
|
openai: "openai";
|
|
323
|
+
"ant-ling": "ant-ling";
|
|
323
324
|
deepseek: "deepseek";
|
|
324
325
|
openrouter: "openrouter";
|
|
325
326
|
zai: "zai";
|
|
@@ -347,6 +348,7 @@ export declare const ModelOverrideSchema: z.ZodObject<{
|
|
|
347
348
|
profile: z.ZodEnum<{
|
|
348
349
|
"gui-plus-2026-02-26": "gui-plus-2026-02-26";
|
|
349
350
|
"structured-tools-v1": "structured-tools-v1";
|
|
351
|
+
"openai-responses-computer-v1": "openai-responses-computer-v1";
|
|
350
352
|
}>;
|
|
351
353
|
}, z.core.$strict>>;
|
|
352
354
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -387,8 +389,8 @@ export declare const ModelOverrideSchema: z.ZodObject<{
|
|
|
387
389
|
requiresThinkingAsText: z.ZodOptional<z.ZodBoolean>;
|
|
388
390
|
requiresMistralToolIds: z.ZodOptional<z.ZodBoolean>;
|
|
389
391
|
thinkingFormat: z.ZodOptional<z.ZodEnum<{
|
|
390
|
-
"ant-ling": "ant-ling";
|
|
391
392
|
openai: "openai";
|
|
393
|
+
"ant-ling": "ant-ling";
|
|
392
394
|
deepseek: "deepseek";
|
|
393
395
|
openrouter: "openrouter";
|
|
394
396
|
zai: "zai";
|
|
@@ -432,6 +434,7 @@ export declare const ProviderConfigSchema: z.ZodObject<{
|
|
|
432
434
|
profile: z.ZodEnum<{
|
|
433
435
|
"gui-plus-2026-02-26": "gui-plus-2026-02-26";
|
|
434
436
|
"structured-tools-v1": "structured-tools-v1";
|
|
437
|
+
"openai-responses-computer-v1": "openai-responses-computer-v1";
|
|
435
438
|
}>;
|
|
436
439
|
}, z.core.$strict>>;
|
|
437
440
|
id: z.ZodString;
|
|
@@ -484,8 +487,8 @@ export declare const ProviderConfigSchema: z.ZodObject<{
|
|
|
484
487
|
requiresThinkingAsText: z.ZodOptional<z.ZodBoolean>;
|
|
485
488
|
requiresMistralToolIds: z.ZodOptional<z.ZodBoolean>;
|
|
486
489
|
thinkingFormat: z.ZodOptional<z.ZodEnum<{
|
|
487
|
-
"ant-ling": "ant-ling";
|
|
488
490
|
openai: "openai";
|
|
491
|
+
"ant-ling": "ant-ling";
|
|
489
492
|
deepseek: "deepseek";
|
|
490
493
|
openrouter: "openrouter";
|
|
491
494
|
zai: "zai";
|
|
@@ -513,6 +516,7 @@ export declare const ProviderConfigSchema: z.ZodObject<{
|
|
|
513
516
|
profile: z.ZodEnum<{
|
|
514
517
|
"gui-plus-2026-02-26": "gui-plus-2026-02-26";
|
|
515
518
|
"structured-tools-v1": "structured-tools-v1";
|
|
519
|
+
"openai-responses-computer-v1": "openai-responses-computer-v1";
|
|
516
520
|
}>;
|
|
517
521
|
}, z.core.$strict>>;
|
|
518
522
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -553,8 +557,8 @@ export declare const ProviderConfigSchema: z.ZodObject<{
|
|
|
553
557
|
requiresThinkingAsText: z.ZodOptional<z.ZodBoolean>;
|
|
554
558
|
requiresMistralToolIds: z.ZodOptional<z.ZodBoolean>;
|
|
555
559
|
thinkingFormat: z.ZodOptional<z.ZodEnum<{
|
|
556
|
-
"ant-ling": "ant-ling";
|
|
557
560
|
openai: "openai";
|
|
561
|
+
"ant-ling": "ant-ling";
|
|
558
562
|
deepseek: "deepseek";
|
|
559
563
|
openrouter: "openrouter";
|
|
560
564
|
zai: "zai";
|
|
@@ -679,6 +683,7 @@ export declare const ModelsJsonSchema: z.ZodObject<{
|
|
|
679
683
|
profile: z.ZodEnum<{
|
|
680
684
|
"gui-plus-2026-02-26": "gui-plus-2026-02-26";
|
|
681
685
|
"structured-tools-v1": "structured-tools-v1";
|
|
686
|
+
"openai-responses-computer-v1": "openai-responses-computer-v1";
|
|
682
687
|
}>;
|
|
683
688
|
}, z.core.$strict>>;
|
|
684
689
|
id: z.ZodString;
|
|
@@ -731,8 +736,8 @@ export declare const ModelsJsonSchema: z.ZodObject<{
|
|
|
731
736
|
requiresThinkingAsText: z.ZodOptional<z.ZodBoolean>;
|
|
732
737
|
requiresMistralToolIds: z.ZodOptional<z.ZodBoolean>;
|
|
733
738
|
thinkingFormat: z.ZodOptional<z.ZodEnum<{
|
|
734
|
-
"ant-ling": "ant-ling";
|
|
735
739
|
openai: "openai";
|
|
740
|
+
"ant-ling": "ant-ling";
|
|
736
741
|
deepseek: "deepseek";
|
|
737
742
|
openrouter: "openrouter";
|
|
738
743
|
zai: "zai";
|
|
@@ -760,6 +765,7 @@ export declare const ModelsJsonSchema: z.ZodObject<{
|
|
|
760
765
|
profile: z.ZodEnum<{
|
|
761
766
|
"gui-plus-2026-02-26": "gui-plus-2026-02-26";
|
|
762
767
|
"structured-tools-v1": "structured-tools-v1";
|
|
768
|
+
"openai-responses-computer-v1": "openai-responses-computer-v1";
|
|
763
769
|
}>;
|
|
764
770
|
}, z.core.$strict>>;
|
|
765
771
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -800,8 +806,8 @@ export declare const ModelsJsonSchema: z.ZodObject<{
|
|
|
800
806
|
requiresThinkingAsText: z.ZodOptional<z.ZodBoolean>;
|
|
801
807
|
requiresMistralToolIds: z.ZodOptional<z.ZodBoolean>;
|
|
802
808
|
thinkingFormat: z.ZodOptional<z.ZodEnum<{
|
|
803
|
-
"ant-ling": "ant-ling";
|
|
804
809
|
openai: "openai";
|
|
810
|
+
"ant-ling": "ant-ling";
|
|
805
811
|
deepseek: "deepseek";
|
|
806
812
|
openrouter: "openrouter";
|
|
807
813
|
zai: "zai";
|
|
@@ -118,7 +118,7 @@ function validateModelsConfig(config) {
|
|
|
118
118
|
api: model.api ?? providerConfig.api
|
|
119
119
|
})) errors.push({
|
|
120
120
|
path: `providers.${providerName}.models[${i}].computerUse`,
|
|
121
|
-
message: "Computer Use requires image input and
|
|
121
|
+
message: "Computer Use requires image input and an API matching its protocol",
|
|
122
122
|
severity: "error"
|
|
123
123
|
});
|
|
124
124
|
if (!model.api && !providerConfig.api) errors.push({
|
|
@@ -1562,6 +1562,10 @@ export declare const ConfigSchema: z.ZodDefault<z.ZodObject<{
|
|
|
1562
1562
|
summaryChunkTokens: z.ZodDefault<z.ZodNumber>;
|
|
1563
1563
|
summaryTimeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
1564
1564
|
summaryRetries: z.ZodDefault<z.ZodNumber>;
|
|
1565
|
+
reasoningLevel: z.ZodDefault<z.ZodEnum<{
|
|
1566
|
+
low: "low";
|
|
1567
|
+
off: "off";
|
|
1568
|
+
}>>;
|
|
1565
1569
|
qualityGuard: z.ZodDefault<z.ZodBoolean>;
|
|
1566
1570
|
gapAudit: z.ZodDefault<z.ZodBoolean>;
|
|
1567
1571
|
model: z.ZodOptional<z.ZodString>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { ComputerConfigSchema, init_config } from "../computer/config.js";
|
|
3
|
-
import { AgentModelsOverrideSchema, AgentsConfigSchema as AgentsConfigSchema$1, DEFAULT_AGENT_MODEL_REF, ImageGenerationRouteSchema, ModelRouteSchema } from "../agent-config/schema.js";
|
|
3
|
+
import { AgentModelsOverrideSchema, AgentsConfigSchema as AgentsConfigSchema$1, DEFAULT_AGENT_MODEL_REF, DEFAULT_SKILL_POLICY, ImageGenerationRouteSchema, ModelRouteSchema } from "../agent-config/schema.js";
|
|
4
4
|
import { init_agent_config } from "../agent-config/index.js";
|
|
5
5
|
import { DEFAULT_CONTEXT_COMPACTION_POLICY, UserContextConfigSchema, init_config as init_config$1 } from "../user-context/config.js";
|
|
6
6
|
import { init_default_model } from "./default-model.js";
|
|
@@ -61,10 +61,7 @@ var init_schema = __esmMin((() => {
|
|
|
61
61
|
},
|
|
62
62
|
intents: {}
|
|
63
63
|
},
|
|
64
|
-
skills:
|
|
65
|
-
mode: "all-enabled",
|
|
66
|
-
exclude: []
|
|
67
|
-
},
|
|
64
|
+
skills: DEFAULT_SKILL_POLICY,
|
|
68
65
|
tools: {},
|
|
69
66
|
workflows: {},
|
|
70
67
|
runtime: {}
|
|
@@ -1107,10 +1104,7 @@ workDiscoveryOnboarding: z.boolean().default(true) }).strict().default({ workDis
|
|
|
1107
1104
|
},
|
|
1108
1105
|
intents: {}
|
|
1109
1106
|
},
|
|
1110
|
-
skills:
|
|
1111
|
-
mode: "all-enabled",
|
|
1112
|
-
exclude: []
|
|
1113
|
-
},
|
|
1107
|
+
skills: DEFAULT_SKILL_POLICY,
|
|
1114
1108
|
tools: {},
|
|
1115
1109
|
workflows: {},
|
|
1116
1110
|
runtime: {}
|
|
@@ -52,8 +52,8 @@ export declare class ComposioSessionsAdapter {
|
|
|
52
52
|
alias?: string;
|
|
53
53
|
expectedAccountId?: string;
|
|
54
54
|
}): Promise<ComposioAuthorizeResult>;
|
|
55
|
-
/** Verify a
|
|
56
|
-
|
|
55
|
+
/** Verify a project credential using read-only APIs without changing remote or local state. */
|
|
56
|
+
verifyProjectAccess(context: Pick<ComposioSessionContext, 'principalId' | 'installationScope'>, connections?: ConnectorConnection[]): Promise<void>;
|
|
57
57
|
private listAllAccounts;
|
|
58
58
|
syncConnections(context: Pick<ComposioSessionContext, 'principalId' | 'installationScope' | 'backendId'>): Promise<ConnectorConnection[]>;
|
|
59
59
|
revokeConnection(connection: ConnectorConnection): Promise<void>;
|
|
@@ -68,6 +68,8 @@ export declare class ComposioSessionsAdapter {
|
|
|
68
68
|
agentId?: string;
|
|
69
69
|
conversationId?: string;
|
|
70
70
|
confirmed?: boolean;
|
|
71
|
+
/** Recheck authorization immediately before sending an action after session setup. */
|
|
72
|
+
beforeExecute?: () => void;
|
|
71
73
|
}): Promise<{
|
|
72
74
|
decision: 'allowed';
|
|
73
75
|
result: unknown;
|
|
@@ -255,16 +255,16 @@ var ComposioSessionsAdapter = class {
|
|
|
255
255
|
status: request.status
|
|
256
256
|
};
|
|
257
257
|
}
|
|
258
|
-
/** Verify a
|
|
259
|
-
async
|
|
258
|
+
/** Verify a project credential using read-only APIs without changing remote or local state. */
|
|
259
|
+
async verifyProjectAccess(context, connections = []) {
|
|
260
260
|
const client = await this.createClient();
|
|
261
|
-
const
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
261
|
+
const providerPrincipalId = createComposioPrincipalId(context.principalId, context.installationScope);
|
|
262
|
+
const storedUserIds = connections.map((connection) => connection.metadata.providerPrincipalId);
|
|
263
|
+
if (storedUserIds.some((userId) => typeof userId !== "string" || !userId)) throw new Error("Refresh existing account identities before replacing this key.");
|
|
264
|
+
const userIds = [...new Set([providerPrincipalId, ...storedUserIds])];
|
|
265
|
+
const rows = await this.listAllAccounts(client, userIds);
|
|
266
|
+
const ids = new Set(rows.flatMap((row) => row && typeof row === "object" ? [readString(row, ["id", "connected_account_id"])] : []));
|
|
267
|
+
if (connections.some((connection) => !ids.has(connection.providerConnectionId))) throw new Error("This key cannot access the existing accounts. Add it as a new project instead.");
|
|
268
268
|
}
|
|
269
269
|
async listAllAccounts(client, userIds) {
|
|
270
270
|
const rows = [];
|
|
@@ -439,6 +439,7 @@ var ComposioSessionsAdapter = class {
|
|
|
439
439
|
...typeof providerPrincipalId === "string" ? { providerPrincipalId } : {}
|
|
440
440
|
});
|
|
441
441
|
input.signal?.throwIfAborted();
|
|
442
|
+
input.beforeExecute?.();
|
|
442
443
|
const result = await session.execute(input.action.actionId, input.args ?? {}, input.connection ? { account: input.connection.providerConnectionId } : void 0);
|
|
443
444
|
input.signal?.throwIfAborted();
|
|
444
445
|
appendConnectorExecutionAudit({
|
|
@@ -320,15 +320,17 @@ async function configureComposioApiKey(apiKey, resolver = new CredentialResolver
|
|
|
320
320
|
if (!normalized) throw new Error("Composio API key is required.");
|
|
321
321
|
if (normalized.length > 4096) throw new Error("Composio API key is too long.");
|
|
322
322
|
const adapter = new ComposioSessionsAdapter({ apiKey: normalized });
|
|
323
|
-
|
|
324
|
-
await ensureComposioBackend(resolver);
|
|
323
|
+
const replacement = replaceBackendId ? getComposioBackend(replaceBackendId) : void 0;
|
|
325
324
|
if (replaceBackendId) {
|
|
326
|
-
|
|
327
|
-
if (
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
325
|
+
if (!replacement || replacement.mode !== "byok" || !replacement.credential_ref) throw new Error("Unknown Composio project.");
|
|
326
|
+
if (replacement.credential_source === "environment") throw new Error("Update this key in the gateway environment, or add a locally stored project.");
|
|
327
|
+
}
|
|
328
|
+
const existingConnections = replacement ? listConnectorConnections({ principalId: LOCAL_OWNER_PRINCIPAL }).filter((connection) => getConnectorAccount(connection.accountId)?.backendId === replacement.id && connection.status !== "revoked") : [];
|
|
329
|
+
await adapter.verifyProjectAccess({ principalId: LOCAL_OWNER_PRINCIPAL }, existingConnections);
|
|
330
|
+
await ensureComposioBackend(resolver);
|
|
331
|
+
if (replacement) {
|
|
332
|
+
await resolver.saveApiKey(replacement.credential_ref, normalized, { profileName: "default" });
|
|
333
|
+
markComposioBackendVerified(replacement.id);
|
|
332
334
|
return;
|
|
333
335
|
}
|
|
334
336
|
for (const backend of listComposioBackends()) if (backend.mode === "byok" && await resolveBackendKey(backend, resolver) === normalized) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
|
|
2
2
|
import { TaskCreateRequestSchema } from "../../packages/gateway-contract/src/tasks.js";
|
|
3
3
|
import { init_src } from "../../packages/gateway-contract/src/index.js";
|
|
4
|
-
import { TaskRepository } from "../tasks/task-repository.js";
|
|
4
|
+
import { TaskRepository, init_task_repository } from "../tasks/task-repository.js";
|
|
5
5
|
import { TaskApplicationService } from "../tasks/task-application-service.js";
|
|
6
6
|
import { DiscussionServiceError } from "./errors.js";
|
|
7
7
|
import { getDiscussionCapture, getLatestDiscussionOrganization } from "./repository.js";
|
|
@@ -9,6 +9,7 @@ import { readTranscriptRevision } from "./revisions.js";
|
|
|
9
9
|
//#region src/discussions/action-tasks.ts
|
|
10
10
|
init_src();
|
|
11
11
|
init_transaction();
|
|
12
|
+
init_task_repository();
|
|
12
13
|
function meetingActionTasks(id) {
|
|
13
14
|
const rows = getSqliteDatabase().prepare("SELECT action_id, task_id FROM discussion_action_tasks WHERE discussion_id=?").all(id);
|
|
14
15
|
const tasks = new TaskRepository();
|
|
@@ -3,9 +3,9 @@ import { DISCUSSION_MAX_DURATION_MS } from "../../packages/gateway-contract/src/
|
|
|
3
3
|
import { init_src } from "../../packages/gateway-contract/src/index.js";
|
|
4
4
|
import { decodeWavToMonoFloat32 } from "../voice/local/wav.js";
|
|
5
5
|
import { forEachNormalizedAudioSegment } from "../voice/audio/normalize.js";
|
|
6
|
+
import { resolveNoteMediaDir } from "../notes/paths.js";
|
|
6
7
|
import { DiscussionServiceError } from "./errors.js";
|
|
7
8
|
import { getDiscussionCapture, updateDiscussionCapture } from "./repository.js";
|
|
8
|
-
import { resolveNoteMediaDir } from "../notes/paths.js";
|
|
9
9
|
import { join } from "node:path";
|
|
10
10
|
import { createReadStream } from "node:fs";
|
|
11
11
|
import { createHash, randomUUID } from "node:crypto";
|
|
@@ -82,6 +82,14 @@ var LocalWorktreeManager = class {
|
|
|
82
82
|
if (repository.dirty) throw new ExecutionEnvironmentConflictError(`Repository has uncommitted changes: ${repository.repositoryRoot}`);
|
|
83
83
|
const baseRef = input.baseRef?.trim() || "HEAD";
|
|
84
84
|
const baseSha = await resolveGitCommit(repository.repositoryRoot, baseRef);
|
|
85
|
+
if (input.branchRef) {
|
|
86
|
+
if (!/^xopc\/task-[a-f0-9-]{36}$/.test(input.branchRef)) throw new Error("Invalid task branch name");
|
|
87
|
+
await runGit(repository.repositoryRoot, [
|
|
88
|
+
"check-ref-format",
|
|
89
|
+
"--branch",
|
|
90
|
+
input.branchRef
|
|
91
|
+
]);
|
|
92
|
+
}
|
|
85
93
|
const environmentId = input.environmentId?.trim() || randomUUID();
|
|
86
94
|
const rootPath = resolveManagedWorktreePath(input.projectId, environmentId, this.stateDir);
|
|
87
95
|
assertManagedWorktreePath(rootPath, this.stateDir, repository.repositoryRoot);
|
|
@@ -94,7 +102,8 @@ var LocalWorktreeManager = class {
|
|
|
94
102
|
repositoryRoot: repository.repositoryRoot,
|
|
95
103
|
gitCommonDir: repository.gitCommonDir,
|
|
96
104
|
baseRef,
|
|
97
|
-
baseSha
|
|
105
|
+
baseSha,
|
|
106
|
+
...input.branchRef ? { branchRef: input.branchRef } : {}
|
|
98
107
|
});
|
|
99
108
|
const provisioning = this.store.transition({
|
|
100
109
|
environmentId: environment.id,
|
|
@@ -112,9 +121,11 @@ var LocalWorktreeManager = class {
|
|
|
112
121
|
await mkdir(rootPath, { mode: 448 });
|
|
113
122
|
createdDirectory = await readDirectoryIdentity(rootPath);
|
|
114
123
|
await runGit(repository.repositoryRoot, [
|
|
124
|
+
"-c",
|
|
125
|
+
"core.hooksPath=/dev/null",
|
|
115
126
|
"worktree",
|
|
116
127
|
"add",
|
|
117
|
-
"--detach",
|
|
128
|
+
...input.branchRef ? ["-b", input.branchRef] : ["--detach"],
|
|
118
129
|
"--lock",
|
|
119
130
|
rootPath,
|
|
120
131
|
baseSha
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { PROVIDER_ENV_MAP, init_env_keys } from "../providers/env-keys.js";
|
|
2
2
|
import { init_providers, isProviderConfiguredSync } from "../providers/index.js";
|
|
3
|
-
import { collectTtsProviderConfigEntries } from "../voice/tts/config-slice.js";
|
|
4
|
-
import { isProviderConfigured } from "../voice/tts/factory.js";
|
|
5
|
-
import { mergeTtsConfigFromAppConfig } from "../voice/tts/merge-config.js";
|
|
6
3
|
import { collectSttProviderConfigEntries } from "../voice/stt/config-slice.js";
|
|
7
4
|
import { mergeSttConfigFromAppConfig } from "../voice/stt/config.js";
|
|
8
5
|
import "../voice/stt/index.js";
|
|
6
|
+
import { collectTtsProviderConfigEntries } from "../voice/tts/config-slice.js";
|
|
7
|
+
import { isProviderConfigured } from "../voice/tts/factory.js";
|
|
8
|
+
import { mergeTtsConfigFromAppConfig } from "../voice/tts/merge-config.js";
|
|
9
9
|
import { isSttProviderConfigured } from "../voice/stt/list-providers.js";
|
|
10
10
|
//#region src/extensions/activation-context.ts
|
|
11
11
|
init_providers();
|
|
@@ -2,12 +2,12 @@ import { createLogger } from "../utils/logger/index.js";
|
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
3
|
import { getProviderRegistry, init_plugin_registry } from "../providers/plugin-registry.js";
|
|
4
4
|
import { registerMarketplaceAdapter, unregisterMarketplaceAdapter } from "../agent/skills/marketplace/registry.js";
|
|
5
|
+
import { registerMediaUnderstandingProvider } from "../media-understanding/registry.js";
|
|
5
6
|
import { registerSpeechProvider } from "../voice/tts/speech-registry.js";
|
|
6
7
|
import { HOOK_EXECUTION_MODES } from "./types/hooks.js";
|
|
7
8
|
import { commandRegistry } from "../chat-commands/registry.js";
|
|
8
9
|
import { TypedEventBus } from "./typed-event-bus.js";
|
|
9
10
|
import { ExtensionRegistryImpl } from "./extension-registry-impl.js";
|
|
10
|
-
import { registerMediaUnderstandingProvider } from "../media-understanding/registry.js";
|
|
11
11
|
import { registerMigration } from "../migrations/registry.js";
|
|
12
12
|
import { isAbsolute, resolve } from "path";
|
|
13
13
|
import { EventEmitter } from "events";
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { ExtensionCapabilityBindingsSchema } from "../../packages/gateway-contract/src/extension-capabilities.js";
|
|
3
|
+
import { init_src } from "../../packages/gateway-contract/src/index.js";
|
|
2
4
|
//#region src/extensions/normalize-manifest.ts
|
|
3
5
|
function isRecord(x) {
|
|
4
6
|
return typeof x === "object" && x !== null && !Array.isArray(x);
|
|
@@ -162,8 +164,10 @@ function normalizeUiManifest(raw) {
|
|
|
162
164
|
permissions = p.length ? p : void 0;
|
|
163
165
|
}
|
|
164
166
|
const contributions = normalizeUiContributions(raw.contributions);
|
|
165
|
-
|
|
167
|
+
const capabilities = raw.capabilities === void 0 ? void 0 : ExtensionCapabilityBindingsSchema.parse(raw.capabilities);
|
|
168
|
+
if (!main && !icon && !permissions && !contributions && !capabilities) return void 0;
|
|
166
169
|
return {
|
|
170
|
+
...capabilities !== void 0 ? { capabilities } : {},
|
|
167
171
|
...main !== void 0 ? { main } : {},
|
|
168
172
|
...icon !== void 0 ? { icon } : {},
|
|
169
173
|
...permissions !== void 0 ? { permissions } : {},
|
|
@@ -380,6 +384,7 @@ function normalizeSetup(raw) {
|
|
|
380
384
|
}
|
|
381
385
|
var VALID_UI_PERMISSIONS;
|
|
382
386
|
var init_normalize_manifest = __esmMin((() => {
|
|
387
|
+
init_src();
|
|
383
388
|
VALID_UI_PERMISSIONS = new Set([
|
|
384
389
|
"agent.send",
|
|
385
390
|
"agent.subscribe",
|
|
@@ -7,8 +7,8 @@ import { DEFAULT_SECURITY_CONFIG, checkExtensionDirSafety, checkExtensionPathSaf
|
|
|
7
7
|
import { SlotRegistry, getSlotRegistry, registerSlotType } from "../slots.js";
|
|
8
8
|
import { ExtensionDiagnostics, ExtensionLoaderCacheImpl, getExtensionCache, getExtensionDiagnostics } from "../diagnostics.js";
|
|
9
9
|
import { ExtensionHookRunner, createHookContext, isHookEvent } from "../hooks.js";
|
|
10
|
-
import { defineChannelPluginEntry } from "./channel-entry.js";
|
|
11
10
|
import { registerExtensionCliProgram } from "./channel-helpers.js";
|
|
11
|
+
import { defineChannelPluginEntry } from "./channel-entry.js";
|
|
12
12
|
import { lazyFunction, lazyModule } from "./lazy.js";
|
|
13
13
|
import { createMockExtensionApi, createTestGateway } from "./testing.js";
|
|
14
14
|
//#region src/extensions/sdk/index.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { getMediaUnderstandingProvider, listMediaUnderstandingProviders, registerMediaUnderstandingProvider } from "../../media-understanding/registry.js";
|
|
1
2
|
import { ProviderHttpError, assertOkOrThrowHttpError } from "../../media-shared/http/provider-http-errors.js";
|
|
2
3
|
import { SsrfBlockedError, assertSafeUrl } from "../../media-shared/http/ssrf-guard.js";
|
|
3
4
|
import { fetchWithTimeoutGuarded, normalizeBaseUrl, postMultipartRequest } from "../../media-shared/http/provider-http.js";
|
|
4
5
|
import "../../media-shared/http/index.js";
|
|
5
|
-
import { getMediaUnderstandingProvider, listMediaUnderstandingProviders, registerMediaUnderstandingProvider } from "../../media-understanding/registry.js";
|
|
6
6
|
import { buildAudioTranscriptionFormData, createOpenAiCompatibleAudioProvider, registerOpenAiCompatibleAudioProvider, resolveAudioTranscriptionUploadFileName, transcribeOpenAiCompatibleAudio } from "../../media-understanding/openai-compatible-audio.js";
|
|
7
7
|
export { ProviderHttpError, SsrfBlockedError, assertOkOrThrowHttpError, assertSafeUrl, buildAudioTranscriptionFormData, createOpenAiCompatibleAudioProvider, fetchWithTimeoutGuarded, getMediaUnderstandingProvider, listMediaUnderstandingProviders, normalizeBaseUrl, postMultipartRequest, registerMediaUnderstandingProvider, registerOpenAiCompatibleAudioProvider, resolveAudioTranscriptionUploadFileName, transcribeOpenAiCompatibleAudio };
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Extension manifest — control-plane metadata (readable without loading extension code).
|
|
3
3
|
*/
|
|
4
4
|
import type { ExtensionKind } from './core.js';
|
|
5
|
+
import type { ExtensionCapabilityBinding } from '@xopcai/gateway-contract';
|
|
5
6
|
/** Declared in `engines` in the extension manifest (e.g. VSCode-style). */
|
|
6
7
|
export interface EnginesDeclaration {
|
|
7
8
|
/** Semver range string for the running xopc CLI / gateway, e.g. `">=0.0.20"`. */
|
|
@@ -121,6 +122,8 @@ export interface ExtensionManifestCommand {
|
|
|
121
122
|
}
|
|
122
123
|
/** Top-level UI declaration within an extension manifest. */
|
|
123
124
|
export interface ExtensionUiManifest {
|
|
125
|
+
/** Exact host-owned read contracts requested by this UI release. */
|
|
126
|
+
capabilities?: ExtensionCapabilityBinding[];
|
|
124
127
|
/** Frontend entry HTML (relative to extension root). */
|
|
125
128
|
main?: string;
|
|
126
129
|
/** Extension icon path (relative to extension root; SVG recommended). */
|
|
@@ -277,4 +277,4 @@ export declare const GATEWAY_BUILTIN_TOOLS: readonly [{
|
|
|
277
277
|
readonly zh: "使用已验证的参数执行选定的外部工具。";
|
|
278
278
|
};
|
|
279
279
|
}];
|
|
280
|
-
export declare const GATEWAY_BUILTIN_TOOL_IDS: ("automation" | "workflow" | "find" | "image" | "knowledge_search" | "knowledge_get" | "knowledge_write" | "user_context_search" | "user_context_get" | "user_context_update" | "web_search" | "web_fetch" | "browser_use" | "grep" | "session_search" | "read_file" | "list_dir" | "write_file" | "apply_patch" | "exec_command" | "update_plan" | "todo" | "clarify" | "xopc_tool_execute" | "
|
|
280
|
+
export declare const GATEWAY_BUILTIN_TOOL_IDS: ("automation" | "workflow" | "find" | "image" | "knowledge_search" | "knowledge_get" | "knowledge_write" | "user_context_search" | "user_context_get" | "user_context_update" | "web_search" | "web_fetch" | "browser_use" | "grep" | "session_search" | "read_file" | "list_dir" | "write_file" | "apply_patch" | "exec_command" | "update_plan" | "todo" | "clarify" | "xopc_tool_execute" | "computer_use" | "tool_manual" | "web_extract" | "image_generate" | "skills_list" | "skill_view" | "skill_manage" | "skills_marketplace_search" | "session_status" | "send_message" | "send_media" | "delegate_task" | "skill_install" | "text_to_speech" | "create_share" | "xopc_tool_search" | "xopc_tool_describe" | "read_media" | "memory_maintenance" | "execute_code" | "create_desktop_pet")[];
|
|
@@ -260,6 +260,7 @@ export declare function buildSafeWebConfigPayload(service: GatewayService, optio
|
|
|
260
260
|
summaryChunkTokens: number;
|
|
261
261
|
summaryTimeoutMs: number;
|
|
262
262
|
summaryRetries: number;
|
|
263
|
+
reasoningLevel: "low" | "off";
|
|
263
264
|
qualityGuard: boolean;
|
|
264
265
|
gapAudit: boolean;
|
|
265
266
|
minToolResultKeepChars: number;
|
|
@@ -11,7 +11,7 @@ function gatewayScopes() {
|
|
|
11
11
|
return createMiddleware(async (c, next) => {
|
|
12
12
|
const principal = getGatewayPrincipal(c);
|
|
13
13
|
const requiredScope = requiredGatewayScope(c.req.method, c.req.path);
|
|
14
|
-
if (!hasGatewayScope(principal.scopes, requiredScope)) {
|
|
14
|
+
if (requiredScope && !hasGatewayScope(principal.scopes, requiredScope)) {
|
|
15
15
|
log.warn({
|
|
16
16
|
path: c.req.path,
|
|
17
17
|
method: c.req.method,
|
|
@@ -231,8 +231,11 @@ function registerAuthRegistryExtensionsRoutes(authenticated, deps) {
|
|
|
231
231
|
authenticated.get("/api/extensions/:id/ui-grant", (c) => {
|
|
232
232
|
return c.json({ grant: service.localApps.getUiGrant(c.req.param("id")) });
|
|
233
233
|
});
|
|
234
|
-
authenticated.post("/api/extensions/:id/ui-grant", (c) => {
|
|
235
|
-
|
|
234
|
+
authenticated.post("/api/extensions/:id/ui-grant", async (c) => {
|
|
235
|
+
const body = await c.req.json().catch(() => null);
|
|
236
|
+
if (!body || typeof body.manifestDigest !== "string" || !/^[a-f0-9]{64}$/.test(body.manifestDigest)) return c.json({ error: "The reviewed manifestDigest is required" }, 400);
|
|
237
|
+
if (service.localApps.getUiGrant(c.req.param("id")).manifestDigest !== body.manifestDigest) return c.json({ error: "Extension release changed; review permissions again" }, 409);
|
|
238
|
+
return c.json({ grant: service.localApps.grantUiPermissions(c.req.param("id"), body.manifestDigest) });
|
|
236
239
|
});
|
|
237
240
|
authenticated.get("/api/extensions/:id/storage", async (c) => {
|
|
238
241
|
const store = await loadExtensionStore(c.req.param("id"));
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { CapabilityCallSchema } from "../../../../packages/gateway-contract/src/capabilities.js";
|
|
2
|
+
import { init_src } from "../../../../packages/gateway-contract/src/index.js";
|
|
3
|
+
import { CapabilityError } from "../../../capabilities/runtime/errors.js";
|
|
4
|
+
import "../../../capabilities/runtime/dispatcher.js";
|
|
5
|
+
import { createProductDispatcher } from "../../../capabilities/runtime/product.js";
|
|
6
|
+
import { capabilityHttpContext, capabilityHttpError } from "../../../capabilities/adapters/http.js";
|
|
7
|
+
//#region src/gateway/hono/routes/capability-operations.ts
|
|
8
|
+
init_src();
|
|
9
|
+
function registerCapabilityOperationRoutes(app, deps) {
|
|
10
|
+
const dispatcher = createProductDispatcher(() => deps.service.notesServiceInstance, {
|
|
11
|
+
getConfig: () => deps.service.currentConfig,
|
|
12
|
+
getProjects: () => deps.service.projects,
|
|
13
|
+
getAutomations: () => deps.service.automationServiceInstance,
|
|
14
|
+
getWorkDiscovery: () => deps.service.workDiscovery,
|
|
15
|
+
getLocalApps: () => deps.service.localApps,
|
|
16
|
+
...deps.scenes ? { getSceneAccess: () => ({
|
|
17
|
+
services: deps.scenes,
|
|
18
|
+
principal: {
|
|
19
|
+
ownerId: "local-owner",
|
|
20
|
+
workspaceId: deps.service.currentWorkspacePath
|
|
21
|
+
}
|
|
22
|
+
}) } : {},
|
|
23
|
+
wake: (runId) => runId ? deps.service.dispatchTaskRuns() : deps.service.dispatchTaskEvents(),
|
|
24
|
+
abortConversation: async (conversationId) => {
|
|
25
|
+
const liveRunId = deps.service.getActiveWebchatRunId(conversationId);
|
|
26
|
+
if (liveRunId) await deps.service.abortAgentRun(liveRunId);
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
app.get("/api/capabilities/operations", (c) => c.json({ capabilities: dispatcher.list(capabilityHttpContext(c)) }));
|
|
30
|
+
app.get("/api/capabilities/operations/:id", (c) => {
|
|
31
|
+
try {
|
|
32
|
+
return c.json(dispatcher.describe(c.req.param("id"), capabilityHttpContext(c)));
|
|
33
|
+
} catch (error) {
|
|
34
|
+
return capabilityHttpError(c, error);
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
app.post("/api/capabilities/operations/:id/invocations", deps.strictRateLimitMiddleware, async (c) => {
|
|
38
|
+
try {
|
|
39
|
+
const parsed = CapabilityCallSchema.safeParse(await c.req.json().catch(() => null));
|
|
40
|
+
if (!parsed.success) throw new CapabilityError("INVALID_INPUT", "Invalid capability request");
|
|
41
|
+
const result = await dispatcher.call(c.req.param("id"), parsed.data.input, capabilityHttpContext(c), parsed.data);
|
|
42
|
+
return c.json({
|
|
43
|
+
status: "succeeded",
|
|
44
|
+
data: result
|
|
45
|
+
});
|
|
46
|
+
} catch (error) {
|
|
47
|
+
return capabilityHttpError(c, error);
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
//#endregion
|
|
52
|
+
export { registerCapabilityOperationRoutes };
|
|
@@ -3,6 +3,22 @@ function startsWithAny(path, prefixes) {
|
|
|
3
3
|
return prefixes.some((prefix) => path === prefix || path.startsWith(`${prefix}/`));
|
|
4
4
|
}
|
|
5
5
|
const AUTHENTICATED_LAZY_ROUTE_BUNDLES = [
|
|
6
|
+
{
|
|
7
|
+
id: "local-app-capabilities",
|
|
8
|
+
match: (path) => /^\/api\/local-app-capabilities\/[^/]+(?:\/[^/]+\/invocations)?$/.test(path),
|
|
9
|
+
load: async () => {
|
|
10
|
+
const { registerLocalAppCapabilityRoutes } = await import("./local-app-capabilities.js");
|
|
11
|
+
return { register: registerLocalAppCapabilityRoutes };
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
id: "capability-operations",
|
|
16
|
+
match: (path) => startsWithAny(path, ["/api/capabilities/operations"]),
|
|
17
|
+
load: async () => {
|
|
18
|
+
const { registerCapabilityOperationRoutes } = await import("./capability-operations.js");
|
|
19
|
+
return { register: registerCapabilityOperationRoutes };
|
|
20
|
+
}
|
|
21
|
+
},
|
|
6
22
|
{
|
|
7
23
|
id: "endpoint-compatibility",
|
|
8
24
|
match: (path) => path === "/api/endpoint-tools/compatibility",
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Hono } from 'hono';
|
|
2
|
+
import type { AuthenticatedRouteDeps } from './deps.js';
|
|
3
|
+
/** Authenticated host API. Iframes must not receive Gateway credentials. */
|
|
4
|
+
export declare function registerLocalAppCapabilityRoutes(app: Hono, deps: AuthenticatedRouteDeps): void;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { CapabilityCallSchema } from "../../../../packages/gateway-contract/src/capabilities.js";
|
|
2
|
+
import { init_src } from "../../../../packages/gateway-contract/src/index.js";
|
|
3
|
+
import { CapabilityError } from "../../../capabilities/runtime/errors.js";
|
|
4
|
+
import { createProductDispatcher } from "../../../capabilities/runtime/product.js";
|
|
5
|
+
import { localAppCapabilities } from "../../../local-apps/capabilities/runtime.js";
|
|
6
|
+
import { capabilityHttpContext, capabilityHttpError } from "../../../capabilities/adapters/http.js";
|
|
7
|
+
import { z } from "zod";
|
|
8
|
+
//#region src/gateway/hono/routes/local-app-capabilities.ts
|
|
9
|
+
init_src();
|
|
10
|
+
const Digest = z.string().regex(/^[a-f0-9]{64}$/);
|
|
11
|
+
const Invocation = z.strictObject({
|
|
12
|
+
manifestDigest: Digest,
|
|
13
|
+
call: CapabilityCallSchema
|
|
14
|
+
});
|
|
15
|
+
/** Authenticated host API. Iframes must not receive Gateway credentials. */
|
|
16
|
+
function registerLocalAppCapabilityRoutes(app, deps) {
|
|
17
|
+
const dispatcher = createProductDispatcher(() => deps.service.notesServiceInstance, { getProjects: () => deps.service.projects });
|
|
18
|
+
const path = "/api/local-app-capabilities/:extensionId";
|
|
19
|
+
app.get(path, (c) => {
|
|
20
|
+
try {
|
|
21
|
+
const digest = Digest.parse(c.req.query("manifestDigest"));
|
|
22
|
+
return c.json(localAppCapabilities(deps.service.localApps, dispatcher, c.req.param("extensionId"), digest, capabilityHttpContext(c)).list());
|
|
23
|
+
} catch (error) {
|
|
24
|
+
return capabilityHttpError(c, error instanceof z.ZodError ? new CapabilityError("INVALID_INPUT", "Invalid manifest digest") : error);
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
app.post(`${path}/:id/invocations`, deps.strictRateLimitMiddleware, async (c) => {
|
|
28
|
+
try {
|
|
29
|
+
const parsed = Invocation.safeParse(await c.req.json().catch(() => null));
|
|
30
|
+
if (!parsed.success) throw new CapabilityError("INVALID_INPUT", "Invalid local app invocation");
|
|
31
|
+
const { manifestDigest, call } = parsed.data;
|
|
32
|
+
const extensionId = c.req.param("extensionId");
|
|
33
|
+
const id = c.req.param("id");
|
|
34
|
+
return c.json(await localAppCapabilities(deps.service.localApps, dispatcher, extensionId, manifestDigest, capabilityHttpContext(c)).call(id, call));
|
|
35
|
+
} catch (error) {
|
|
36
|
+
return capabilityHttpError(c, error);
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
//#endregion
|
|
41
|
+
export { registerLocalAppCapabilityRoutes };
|