@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
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { CapabilityError } from "./errors.js";
|
|
2
|
+
import { CapabilityDispatcher } from "./dispatcher.js";
|
|
3
|
+
import { registerLocalAppReadCapabilities } from "../../local-apps/capabilities/read.js";
|
|
4
|
+
import { registerNoteReadCapabilities } from "../../notes/capabilities/read.js";
|
|
5
|
+
import { registerNoteWriteCapabilities } from "../../notes/capabilities/write.js";
|
|
6
|
+
import { registerTaskReadCapabilities } from "../../tasks/capabilities/read.js";
|
|
7
|
+
import { registerLocalAppWriteCapabilities } from "../../local-apps/capabilities/write.js";
|
|
8
|
+
import { registerProjectReadCapabilities } from "../../projects/capabilities/read.js";
|
|
9
|
+
import { registerProjectWriteCapabilities } from "../../projects/capabilities/write.js";
|
|
10
|
+
import { registerTaskRelationCapabilities } from "../../tasks/capabilities/relations.js";
|
|
11
|
+
import { registerTaskManagementCapabilities } from "../../tasks/capabilities/management.js";
|
|
12
|
+
import { registerTaskRunWriteCapabilities } from "../../tasks/capabilities/runs.js";
|
|
13
|
+
import { registerAutomationReadCapabilities } from "../../automations/capabilities/read.js";
|
|
14
|
+
import { registerAutomationWriteCapabilities } from "../../automations/capabilities/write.js";
|
|
15
|
+
import { registerAutomationDraftCapabilities } from "../../automations/capabilities/drafts.js";
|
|
16
|
+
import { registerTaskWriteCapabilities } from "../../tasks/capabilities/write.js";
|
|
17
|
+
import { registerSceneReadCapabilities } from "../../scenes/capabilities/read.js";
|
|
18
|
+
import { registerSceneWriteCapabilities } from "../../scenes/capabilities/write.js";
|
|
19
|
+
import { registerSettingsCapability } from "./settings.js";
|
|
20
|
+
import { registerAppContextCapability } from "./app-context.js";
|
|
21
|
+
//#region src/capabilities/runtime/product.ts
|
|
22
|
+
function createProductDispatcher(getNotes, taskWrites) {
|
|
23
|
+
const dispatcher = new CapabilityDispatcher();
|
|
24
|
+
registerSettingsCapability(dispatcher);
|
|
25
|
+
registerAppContextCapability(dispatcher);
|
|
26
|
+
if (taskWrites?.getSceneAccess) {
|
|
27
|
+
registerSceneReadCapabilities(dispatcher, taskWrites.getSceneAccess);
|
|
28
|
+
registerSceneWriteCapabilities(dispatcher, taskWrites.getSceneAccess);
|
|
29
|
+
}
|
|
30
|
+
const localApps = taskWrites?.getLocalApps?.();
|
|
31
|
+
if (localApps) {
|
|
32
|
+
registerLocalAppReadCapabilities(dispatcher, localApps);
|
|
33
|
+
registerLocalAppWriteCapabilities(dispatcher, localApps);
|
|
34
|
+
}
|
|
35
|
+
registerNoteReadCapabilities(dispatcher, () => {
|
|
36
|
+
const notes = getNotes?.();
|
|
37
|
+
if (!notes) throw new CapabilityError("UNAVAILABLE", "Notes service is unavailable");
|
|
38
|
+
return notes;
|
|
39
|
+
});
|
|
40
|
+
registerTaskReadCapabilities(dispatcher);
|
|
41
|
+
const projects = taskWrites?.getProjects?.();
|
|
42
|
+
if (projects) {
|
|
43
|
+
registerProjectReadCapabilities(dispatcher, projects);
|
|
44
|
+
registerProjectWriteCapabilities(dispatcher, projects, taskWrites);
|
|
45
|
+
}
|
|
46
|
+
const automations = taskWrites?.getAutomations?.();
|
|
47
|
+
if (automations) {
|
|
48
|
+
registerAutomationReadCapabilities(dispatcher, automations, projects);
|
|
49
|
+
registerAutomationWriteCapabilities(dispatcher, automations, projects);
|
|
50
|
+
registerAutomationDraftCapabilities(dispatcher, automations, taskWrites?.getConfig);
|
|
51
|
+
}
|
|
52
|
+
if (taskWrites) {
|
|
53
|
+
registerTaskWriteCapabilities(dispatcher, taskWrites);
|
|
54
|
+
registerTaskRelationCapabilities(dispatcher, taskWrites.wake);
|
|
55
|
+
registerTaskManagementCapabilities(dispatcher, taskWrites.wake);
|
|
56
|
+
registerTaskRunWriteCapabilities(dispatcher, taskWrites.wake);
|
|
57
|
+
}
|
|
58
|
+
if (getNotes) registerNoteWriteCapabilities(dispatcher, {
|
|
59
|
+
getNotes: () => {
|
|
60
|
+
const notes = getNotes();
|
|
61
|
+
if (!notes) throw new CapabilityError("UNAVAILABLE", "Notes service is unavailable");
|
|
62
|
+
return notes;
|
|
63
|
+
},
|
|
64
|
+
getProjects: taskWrites?.getProjects
|
|
65
|
+
});
|
|
66
|
+
return dispatcher;
|
|
67
|
+
}
|
|
68
|
+
//#endregion
|
|
69
|
+
export { createProductDispatcher };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ProductReadContracts } from "../../../packages/gateway-contract/src/capabilities.js";
|
|
2
|
+
import { init_src } from "../../../packages/gateway-contract/src/index.js";
|
|
3
|
+
import { defineReadCapability } from "./dispatcher.js";
|
|
4
|
+
//#region src/capabilities/runtime/settings.ts
|
|
5
|
+
init_src();
|
|
6
|
+
/** A navigation suggestion, not configuration access or authority to move a client tab. */
|
|
7
|
+
function registerSettingsCapability(dispatcher) {
|
|
8
|
+
dispatcher.register(defineReadCapability({
|
|
9
|
+
id: "xopc.settings.open",
|
|
10
|
+
majorVersion: 1,
|
|
11
|
+
description: "Suggest a relative settings target without reading or changing configuration.",
|
|
12
|
+
effect: "read",
|
|
13
|
+
surfaces: [
|
|
14
|
+
"http",
|
|
15
|
+
"agent",
|
|
16
|
+
"cli"
|
|
17
|
+
],
|
|
18
|
+
scopes: ["gateway.status"],
|
|
19
|
+
...ProductReadContracts["xopc.settings.open"],
|
|
20
|
+
execute: (input) => ({
|
|
21
|
+
ok: true,
|
|
22
|
+
settings: input
|
|
23
|
+
})
|
|
24
|
+
}));
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
|
+
export { registerSettingsCapability };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { parseFrontmatterBlock } from "../markdown/frontmatter.js";
|
|
2
2
|
import { getChannelPlugin, getChannelRegistryVersion, listChannelPlugins, syncChannelPluginsFromManager } from "./plugins/registry.js";
|
|
3
|
-
import { compileAllowlist, evaluateAccess, hasBotMention, removeBotMention, resolveAllowlistMatch, resolveAllowlistMatchSimple, resolveDmPolicy, resolveGroupPolicy } from "./security.js";
|
|
4
3
|
import { findFenceSpanAt, isSafeFenceBreak, parseFenceSpans } from "../markdown/fences.js";
|
|
5
4
|
import { chunkText } from "../markdown/chunk.js";
|
|
6
5
|
import { chunkMarkdownIR, markdownToIR, markdownToIRWithMeta } from "../markdown/ir.js";
|
|
6
|
+
import { compileAllowlist, evaluateAccess, hasBotMention, removeBotMention, resolveAllowlistMatch, resolveAllowlistMatchSimple, resolveDmPolicy, resolveGroupPolicy } from "./security.js";
|
|
7
7
|
import { renderMarkdownWithMarkers } from "../markdown/render.js";
|
|
8
8
|
import { convertMarkdownTables } from "../markdown/tables.js";
|
|
9
9
|
import { buildCodeSpanIndex, createInlineCodeState } from "../markdown/code-spans.js";
|
|
10
|
+
import { ChannelManager, createChannelManager } from "./manager.js";
|
|
10
11
|
import "./format.js";
|
|
11
12
|
import { MessagePipeline, createEnvelopeTimestampHandler, createFilterCommandsHandler, createFilterEmptyHandler, createFilterSelfHandler, createPipeline, standardPreflightHandlers, standardProcessHandlers } from "./pipeline.js";
|
|
12
|
-
import { ChannelManager, createChannelManager } from "./manager.js";
|
|
13
13
|
import { collectSetupWizardChannels } from "./setup-wizard-discovery.js";
|
|
14
14
|
export { ChannelManager, MessagePipeline, buildCodeSpanIndex, chunkMarkdownIR, chunkText, collectSetupWizardChannels, compileAllowlist, convertMarkdownTables, createChannelManager, createEnvelopeTimestampHandler, createFilterCommandsHandler, createFilterEmptyHandler, createFilterSelfHandler, createInlineCodeState, createPipeline, evaluateAccess, findFenceSpanAt, getChannelPlugin, getChannelRegistryVersion, hasBotMention, isSafeFenceBreak, listChannelPlugins, markdownToIR, markdownToIRWithMeta, parseFenceSpans, parseFrontmatterBlock, removeBotMention, renderMarkdownWithMarkers, resolveAllowlistMatch, resolveAllowlistMatchSimple, resolveDmPolicy, resolveGroupPolicy, standardPreflightHandlers, standardProcessHandlers, syncChannelPluginsFromManager };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
3
|
import { ChannelHealthMonitor } from "./health-monitor.js";
|
|
4
|
-
import { ChannelHeartbeatScheduler } from "./heartbeat-scheduler.js";
|
|
5
4
|
import { ChannelPluginRegistry } from "./plugin-registry.js";
|
|
5
|
+
import { ChannelHeartbeatScheduler } from "./heartbeat-scheduler.js";
|
|
6
6
|
import { ChannelOutboundSender } from "./outbound-sender.js";
|
|
7
7
|
import { ChannelLifecycleSupervisor } from "./lifecycle-supervisor.js";
|
|
8
8
|
//#region src/channels/manager.ts
|
|
@@ -6,6 +6,10 @@
|
|
|
6
6
|
* This module must load before any import of `../utils/logger.js`.
|
|
7
7
|
*/
|
|
8
8
|
const env = process.env;
|
|
9
|
+
const cliArgs = process.argv.slice(2);
|
|
10
|
+
let commandIndex = 0;
|
|
11
|
+
while (cliArgs[commandIndex]?.startsWith("-")) commandIndex += ["--config", "--workspace"].includes(cliArgs[commandIndex]) ? 2 : 1;
|
|
12
|
+
if (cliArgs[commandIndex] === "mcp" && cliArgs[commandIndex + 1] === "capabilities") env.XOPC_LOG_CONSOLE = "false";
|
|
9
13
|
if (!env.VITEST && !env.TEST && !env.XOPC_LOG_LEVEL && !process.argv.includes("--verbose") && !process.argv.includes("-v")) env.XOPC_LOG_LEVEL = "warn";
|
|
10
14
|
//#endregion
|
|
11
15
|
export {};
|
|
@@ -18,6 +18,7 @@ const REGISTRY_COMMAND_MODULES = {
|
|
|
18
18
|
doctor: () => import("./commands/doctor/index.js"),
|
|
19
19
|
support: () => import("./commands/support.js"),
|
|
20
20
|
runtime: () => import("./commands/runtime.js"),
|
|
21
|
+
mcp: () => import("./commands/mcp.js"),
|
|
21
22
|
platform: () => import("./commands/platform.js"),
|
|
22
23
|
image: () => import("./commands/image.js"),
|
|
23
24
|
channels: () => import("./commands/channels.js"),
|
|
@@ -91,6 +91,10 @@ const ROOT_HELP_COMMANDS = [
|
|
|
91
91
|
name: "runtime",
|
|
92
92
|
description: "Manage Node.js and Python tool runtimes used by agents"
|
|
93
93
|
},
|
|
94
|
+
{
|
|
95
|
+
name: "mcp",
|
|
96
|
+
description: "Expose selected Gateway capabilities over MCP"
|
|
97
|
+
},
|
|
94
98
|
{
|
|
95
99
|
name: "platform",
|
|
96
100
|
description: "Connect to XOPC Cloud or an enterprise platform"
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { buildChannelCatalogForConfig, init_channel_catalog_service } from "../../channels/catalog/channel-catalog-service.js";
|
|
2
2
|
import { init_loader, loadConfig, saveConfig } from "../../config/loader.js";
|
|
3
|
+
import { formatExamples, register } from "../registry.js";
|
|
3
4
|
import { listChannelPairingState } from "../../channels/pairing/pairing-service.js";
|
|
4
5
|
import { approveChannelPairingFromCli } from "../../channels/pairing/approve-cli.js";
|
|
5
|
-
import { formatExamples, register } from "../registry.js";
|
|
6
6
|
import { colors } from "../utils/colors.js";
|
|
7
7
|
import { Command } from "commander";
|
|
8
8
|
//#region src/cli/commands/channels.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { init_loader, loadConfig, saveConfig } from "../../config/loader.js";
|
|
2
2
|
import { getStoreConnectorInstallPlan, installStoreConnector, listStoreConnectors } from "../../capabilities/store-connector.js";
|
|
3
3
|
import { register } from "../registry.js";
|
|
4
|
-
import { confirm } from "@inquirer/prompts";
|
|
5
4
|
import { Command } from "commander";
|
|
5
|
+
import { confirm } from "@inquirer/prompts";
|
|
6
6
|
//#region src/cli/commands/connectors.ts
|
|
7
7
|
init_loader();
|
|
8
8
|
function parsePairs(values, option) {
|
|
@@ -53,7 +53,7 @@ async function checkDatabaseSchema(ctx) {
|
|
|
53
53
|
id: "database-schema",
|
|
54
54
|
label: "Database schema",
|
|
55
55
|
status: "pass",
|
|
56
|
-
message: `SQLite schema v${status.dbVersion} (current release
|
|
56
|
+
message: `SQLite schema v${status.dbVersion} (current release v199).`,
|
|
57
57
|
hints: []
|
|
58
58
|
};
|
|
59
59
|
}
|
|
@@ -13,8 +13,8 @@ import { existsSync, readFileSync, statSync } from "node:fs";
|
|
|
13
13
|
import { execSync } from "node:child_process";
|
|
14
14
|
import { createHash } from "node:crypto";
|
|
15
15
|
import semver from "semver";
|
|
16
|
-
import { confirm } from "@inquirer/prompts";
|
|
17
16
|
import { Command } from "commander";
|
|
17
|
+
import { confirm } from "@inquirer/prompts";
|
|
18
18
|
//#region src/cli/commands/extension-marketplace.ts
|
|
19
19
|
init_loader();
|
|
20
20
|
init_paths();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { init_loader, loadConfig } from "../../config/loader.js";
|
|
2
|
+
import { register } from "../registry.js";
|
|
3
|
+
import { createGatewayHttpClientFromConfig } from "../../mcp/gateway-http-client.js";
|
|
4
|
+
import { createCapabilityMcpServer } from "../../mcp/capability-server.js";
|
|
5
|
+
import { Command } from "commander";
|
|
6
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
7
|
+
//#region src/cli/commands/mcp.ts
|
|
8
|
+
init_loader();
|
|
9
|
+
function createMcpCommand(ctx) {
|
|
10
|
+
const command = new Command("mcp").description("Expose selected Gateway capabilities over MCP");
|
|
11
|
+
command.command("capabilities").description("Run an opt-in stdio MCP proxy for an explicit capability allowlist").requiredOption("--allow-capability <ids...>", "Exact capability IDs; no wildcards").action(async (options) => {
|
|
12
|
+
const server = createCapabilityMcpServer(createGatewayHttpClientFromConfig({ config: loadConfig(ctx.configPath) }), options.allowCapability);
|
|
13
|
+
const transport = new StdioServerTransport();
|
|
14
|
+
let resolveClosed;
|
|
15
|
+
const closed = new Promise((resolve) => {
|
|
16
|
+
resolveClosed = resolve;
|
|
17
|
+
});
|
|
18
|
+
let closing = false;
|
|
19
|
+
const shutdown = () => {
|
|
20
|
+
if (closing) return;
|
|
21
|
+
closing = true;
|
|
22
|
+
server.close().then(resolveClosed, resolveClosed);
|
|
23
|
+
};
|
|
24
|
+
server.onclose = resolveClosed;
|
|
25
|
+
process.once("SIGINT", shutdown);
|
|
26
|
+
process.once("SIGTERM", shutdown);
|
|
27
|
+
process.stdin.once("end", shutdown);
|
|
28
|
+
try {
|
|
29
|
+
await server.connect(transport);
|
|
30
|
+
await closed;
|
|
31
|
+
} finally {
|
|
32
|
+
process.off("SIGINT", shutdown);
|
|
33
|
+
process.off("SIGTERM", shutdown);
|
|
34
|
+
process.stdin.off("end", shutdown);
|
|
35
|
+
await server.close();
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
return command;
|
|
39
|
+
}
|
|
40
|
+
register({
|
|
41
|
+
id: "mcp",
|
|
42
|
+
name: "mcp",
|
|
43
|
+
description: "Expose selected Gateway capabilities over MCP",
|
|
44
|
+
factory: createMcpCommand,
|
|
45
|
+
metadata: {
|
|
46
|
+
category: "utility",
|
|
47
|
+
examples: ["xopc mcp capabilities --allow-capability xopc.notes.list"]
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
//#endregion
|
|
51
|
+
export {};
|
|
@@ -9,8 +9,8 @@ import { prepareUpdateGlobalDefaults } from "../../gateway/global-defaults-admin
|
|
|
9
9
|
import { disconnectProvider } from "../../providers/provider-disconnect.js";
|
|
10
10
|
import { colors } from "../utils/colors.js";
|
|
11
11
|
import { runCliOAuthLogin } from "../utils/oauth-login.js";
|
|
12
|
-
import { input } from "@inquirer/prompts";
|
|
13
12
|
import { Command } from "commander";
|
|
13
|
+
import { input } from "@inquirer/prompts";
|
|
14
14
|
//#region src/cli/commands/models.ts
|
|
15
15
|
init_credentials();
|
|
16
16
|
init_schema();
|
|
@@ -10,8 +10,8 @@ import { initWorkspace } from "../utils/init-workspace.js";
|
|
|
10
10
|
import { setupModel } from "./onboard/model.js";
|
|
11
11
|
import { getChannelConfigurators } from "./onboard/channels/registry.js";
|
|
12
12
|
import { setupChannels } from "./onboard/channels/index.js";
|
|
13
|
-
import { select } from "@inquirer/prompts";
|
|
14
13
|
import { Command } from "commander";
|
|
14
|
+
import { select } from "@inquirer/prompts";
|
|
15
15
|
//#region src/cli/commands/onboard.ts
|
|
16
16
|
init_schema();
|
|
17
17
|
init_paths_state();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { closeXopcDatabase, isXopcDatabaseOpen, openXopcDatabase } from "../../storage/sqlite/connection.js";
|
|
2
|
+
import { TaskRepository } from "../../tasks/task-repository.js";
|
|
2
3
|
import { getSessionMetadata } from "../../storage/sqlite/session-read-repository.js";
|
|
3
4
|
import "../../storage/sqlite/index.js";
|
|
4
5
|
import { init_loader, loadConfig } from "../../config/loader.js";
|
|
5
|
-
import { TaskRepository } from "../../tasks/task-repository.js";
|
|
6
6
|
import { ProjectService } from "../../projects/project-service.js";
|
|
7
7
|
import { isValidProjectAgentId, normalizeProjectAgentId } from "../../projects/project-agent.js";
|
|
8
8
|
import "../../projects/index.js";
|
|
@@ -43,7 +43,6 @@ export type ComputerApproval = {
|
|
|
43
43
|
export interface ComputerBrokerHost {
|
|
44
44
|
requestApproval(request: ComputerApproval, signal: AbortSignal): Promise<boolean>;
|
|
45
45
|
isVisible(): boolean;
|
|
46
|
-
hasFullControl?(): boolean;
|
|
47
46
|
onStateChange?(): void;
|
|
48
47
|
}
|
|
49
48
|
type Status = 'pending_authorization' | 'ready' | 'running' | 'pending_action' | 'paused' | 'stopped';
|
|
@@ -150,8 +150,7 @@ var ComputerBroker = class {
|
|
|
150
150
|
actions: 0
|
|
151
151
|
};
|
|
152
152
|
this.session = s;
|
|
153
|
-
|
|
154
|
-
const authorization = (fullControl ? Promise.resolve(true) : this.host.requestApproval({
|
|
153
|
+
this.host.requestApproval({
|
|
155
154
|
kind: "session",
|
|
156
155
|
id: s.id,
|
|
157
156
|
appId: s.appId,
|
|
@@ -159,7 +158,7 @@ var ComputerBroker = class {
|
|
|
159
158
|
mode: s.mode,
|
|
160
159
|
prepare: s.prepare,
|
|
161
160
|
model: s.model
|
|
162
|
-
}, s.controller.signal)
|
|
161
|
+
}, s.controller.signal).then(async (approved) => {
|
|
163
162
|
this.active(s);
|
|
164
163
|
if (!approved) {
|
|
165
164
|
await this.stop();
|
|
@@ -179,7 +178,6 @@ var ComputerBroker = class {
|
|
|
179
178
|
if (error instanceof ComputerTargetError) s.windows = error.windows;
|
|
180
179
|
return this.stop().catch(() => {});
|
|
181
180
|
}).finally(() => this.host.onStateChange?.());
|
|
182
|
-
if (fullControl) await authorization;
|
|
183
181
|
return this.result(s);
|
|
184
182
|
}
|
|
185
183
|
async observe(s) {
|
|
@@ -232,10 +230,10 @@ var ComputerBroker = class {
|
|
|
232
230
|
const observed = s.observation;
|
|
233
231
|
if (!observed || e.observationId !== observed.id || this.now() - observed.capturedAt > 12e4) throw new Error("COMPUTER_STALE_OBSERVATION");
|
|
234
232
|
if (s.actions >= this.config.maxActionsPerSession) throw new Error("COMPUTER_ACTION_BUDGET");
|
|
235
|
-
if ("point" in e.action && e.action.point
|
|
233
|
+
if ((e.action.kind === "drag" ? [e.action.from, e.action.to] : "point" in e.action && e.action.point ? [e.action.point] : []).some((point) => point.x >= observed.imageWidth || point.y >= observed.imageHeight)) throw new Error("COMPUTER_COORDINATE_OUTSIDE_WINDOW");
|
|
236
234
|
if (e.action.kind === "typeText" && !e.action.point && !observed.focusedEditableRef) throw new Error("COMPUTER_EDITABLE_TARGET_REQUIRED");
|
|
237
235
|
this.driver.validateAction?.(e.action);
|
|
238
|
-
if (e.action.kind !== "wait"
|
|
236
|
+
if (e.action.kind !== "wait") {
|
|
239
237
|
if (!s.pending) {
|
|
240
238
|
s.pending = {
|
|
241
239
|
envelope: e,
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ComputerEvaluationPlanSchema, type ComputerEvaluationRun } from './evaluation.js';
|
|
3
|
+
declare const CommandSchema: z.ZodObject<{
|
|
4
|
+
command: z.ZodArray<z.ZodString>;
|
|
5
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
6
|
+
timeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
7
|
+
}, z.core.$strict>;
|
|
8
|
+
export declare const ComputerEvaluationHarnessManifestSchema: z.ZodObject<{
|
|
9
|
+
plan: z.ZodObject<{
|
|
10
|
+
taskIds: z.ZodArray<z.ZodString>;
|
|
11
|
+
repetitions: z.ZodNumber;
|
|
12
|
+
modelRef: z.ZodString;
|
|
13
|
+
environment: z.ZodString;
|
|
14
|
+
evidence: z.ZodEnum<{
|
|
15
|
+
native: "native";
|
|
16
|
+
fixture: "fixture";
|
|
17
|
+
"real-app": "real-app";
|
|
18
|
+
}>;
|
|
19
|
+
}, z.core.$strict>;
|
|
20
|
+
executor: z.ZodObject<{
|
|
21
|
+
command: z.ZodArray<z.ZodString>;
|
|
22
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
23
|
+
timeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
24
|
+
}, z.core.$strict>;
|
|
25
|
+
oracle: z.ZodObject<{
|
|
26
|
+
command: z.ZodArray<z.ZodString>;
|
|
27
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
28
|
+
timeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
29
|
+
}, z.core.$strict>;
|
|
30
|
+
}, z.core.$strict>;
|
|
31
|
+
export type ComputerEvaluationHarnessManifest = z.infer<typeof ComputerEvaluationHarnessManifestSchema>;
|
|
32
|
+
type ExecuteCommand = (spec: z.infer<typeof CommandSchema>, input: unknown, signal?: AbortSignal) => Promise<unknown>;
|
|
33
|
+
/** Run one JSON-in/JSON-out harness process without a shell or inherited stdin. */
|
|
34
|
+
export declare function executeEvaluationCommand(spec: z.infer<typeof CommandSchema>, input: unknown, signal?: AbortSignal): Promise<unknown>;
|
|
35
|
+
/** Executor and oracle are deliberately separate processes; the oracle alone grades success. */
|
|
36
|
+
export declare function runComputerEvaluationManifest(raw: unknown, options?: {
|
|
37
|
+
execute?: ExecuteCommand;
|
|
38
|
+
signal?: AbortSignal;
|
|
39
|
+
onRun?: (run: ComputerEvaluationRun, evidenceRef: string) => void | Promise<void>;
|
|
40
|
+
}): Promise<{
|
|
41
|
+
plan: z.infer<typeof ComputerEvaluationPlanSchema>;
|
|
42
|
+
runs: ComputerEvaluationRun[];
|
|
43
|
+
evidence: Record<string, string>;
|
|
44
|
+
}>;
|
|
45
|
+
export {};
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { spawnProcess } from "../process/run-process.js";
|
|
2
|
+
import { ComputerEvaluationPlanSchema, ComputerEvaluationRunSchema } from "./evaluation.js";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
//#region src/computer/evaluation-harness.ts
|
|
5
|
+
const CommandSchema = z.object({
|
|
6
|
+
command: z.array(z.string().min(1)).min(1).max(100),
|
|
7
|
+
cwd: z.string().min(1).optional(),
|
|
8
|
+
timeoutMs: z.number().int().min(1e3).max(36e5).default(3e5)
|
|
9
|
+
}).strict();
|
|
10
|
+
const ComputerEvaluationHarnessManifestSchema = z.object({
|
|
11
|
+
plan: ComputerEvaluationPlanSchema,
|
|
12
|
+
executor: CommandSchema,
|
|
13
|
+
oracle: CommandSchema
|
|
14
|
+
}).strict();
|
|
15
|
+
const ExecutorResultSchema = ComputerEvaluationRunSchema.pick({
|
|
16
|
+
claimedSuccess: true,
|
|
17
|
+
takeover: true,
|
|
18
|
+
duplicateInputs: true,
|
|
19
|
+
scopeViolations: true,
|
|
20
|
+
postStopInputs: true,
|
|
21
|
+
durationMs: true,
|
|
22
|
+
modelRequests: true,
|
|
23
|
+
inputTokens: true,
|
|
24
|
+
outputTokens: true,
|
|
25
|
+
cost: true
|
|
26
|
+
}).extend({ runId: z.string().min(1).max(500) }).strict();
|
|
27
|
+
const OracleResultSchema = ComputerEvaluationRunSchema.pick({
|
|
28
|
+
outcome: true,
|
|
29
|
+
oracle: true
|
|
30
|
+
}).extend({ evidenceRef: z.string().min(1).max(2e3) }).strict();
|
|
31
|
+
/** Run one JSON-in/JSON-out harness process without a shell or inherited stdin. */
|
|
32
|
+
async function executeEvaluationCommand(spec, input, signal) {
|
|
33
|
+
const [file, ...args] = spec.command;
|
|
34
|
+
const maxOutputBytes = 1048576;
|
|
35
|
+
let outputBytes = 0;
|
|
36
|
+
let outputLimitExceeded = false;
|
|
37
|
+
const handle = spawnProcess({
|
|
38
|
+
program: file,
|
|
39
|
+
args,
|
|
40
|
+
cwd: spec.cwd,
|
|
41
|
+
env: process.env,
|
|
42
|
+
input: JSON.stringify(input),
|
|
43
|
+
shell: false,
|
|
44
|
+
signal,
|
|
45
|
+
timeoutMs: spec.timeoutMs,
|
|
46
|
+
maxOutputBytes,
|
|
47
|
+
terminationPolicy: "tree",
|
|
48
|
+
onOutput: (_stream, chunk) => {
|
|
49
|
+
outputBytes += chunk.length;
|
|
50
|
+
if (outputBytes > maxOutputBytes && !outputLimitExceeded) {
|
|
51
|
+
outputLimitExceeded = true;
|
|
52
|
+
handle.terminate();
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
const result = await handle.completion;
|
|
57
|
+
if (outputLimitExceeded) throw new Error("COMPUTER_EVALUATION_OUTPUT_LIMIT");
|
|
58
|
+
if (result.timedOut) throw new Error("COMPUTER_EVALUATION_TIMEOUT");
|
|
59
|
+
if (result.aborted) {
|
|
60
|
+
signal?.throwIfAborted();
|
|
61
|
+
throw new Error("COMPUTER_EVALUATION_ABORTED");
|
|
62
|
+
}
|
|
63
|
+
if (result.exitCode !== 0) throw new Error(`COMPUTER_EVALUATION_PROCESS_FAILED:${result.spawnErrorCode ?? result.exitCode}:${result.stderr.slice(0, 1e3)}`);
|
|
64
|
+
try {
|
|
65
|
+
return JSON.parse(result.stdout);
|
|
66
|
+
} catch {
|
|
67
|
+
throw new Error("COMPUTER_EVALUATION_INVALID_JSON");
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
/** Executor and oracle are deliberately separate processes; the oracle alone grades success. */
|
|
71
|
+
async function runComputerEvaluationManifest(raw, options = {}) {
|
|
72
|
+
const manifest = ComputerEvaluationHarnessManifestSchema.parse(raw);
|
|
73
|
+
const execute = options.execute ?? executeEvaluationCommand;
|
|
74
|
+
const runs = [];
|
|
75
|
+
const evidence = {};
|
|
76
|
+
for (const taskId of manifest.plan.taskIds) for (let repetition = 0; repetition < manifest.plan.repetitions; repetition++) {
|
|
77
|
+
options.signal?.throwIfAborted();
|
|
78
|
+
const request = {
|
|
79
|
+
taskId,
|
|
80
|
+
repetition,
|
|
81
|
+
modelRef: manifest.plan.modelRef,
|
|
82
|
+
environment: manifest.plan.environment,
|
|
83
|
+
evidence: manifest.plan.evidence
|
|
84
|
+
};
|
|
85
|
+
const execution = ExecutorResultSchema.parse(await execute(manifest.executor, request, options.signal));
|
|
86
|
+
const oracle = OracleResultSchema.parse(await execute(manifest.oracle, {
|
|
87
|
+
...request,
|
|
88
|
+
execution
|
|
89
|
+
}, options.signal));
|
|
90
|
+
const { runId: _runId, ...measurements } = execution;
|
|
91
|
+
const { evidenceRef, ...grade } = oracle;
|
|
92
|
+
const run = ComputerEvaluationRunSchema.parse({
|
|
93
|
+
...request,
|
|
94
|
+
...measurements,
|
|
95
|
+
...grade
|
|
96
|
+
});
|
|
97
|
+
runs.push(run);
|
|
98
|
+
evidence[`${taskId}:${repetition}`] = evidenceRef;
|
|
99
|
+
await options.onRun?.(run, evidenceRef);
|
|
100
|
+
}
|
|
101
|
+
return {
|
|
102
|
+
plan: manifest.plan,
|
|
103
|
+
runs,
|
|
104
|
+
evidence
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
//#endregion
|
|
108
|
+
export { ComputerEvaluationHarnessManifestSchema, executeEvaluationCommand, runComputerEvaluationManifest };
|
|
@@ -15,6 +15,16 @@ export declare const ComputerProposalSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
|
|
|
15
15
|
right: "right";
|
|
16
16
|
}>;
|
|
17
17
|
count: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
|
|
18
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
19
|
+
kind: z.ZodLiteral<"drag">;
|
|
20
|
+
from: z.ZodObject<{
|
|
21
|
+
x: z.ZodNumber;
|
|
22
|
+
y: z.ZodNumber;
|
|
23
|
+
}, z.core.$strict>;
|
|
24
|
+
to: z.ZodObject<{
|
|
25
|
+
x: z.ZodNumber;
|
|
26
|
+
y: z.ZodNumber;
|
|
27
|
+
}, z.core.$strict>;
|
|
18
28
|
}, z.core.$strict>, z.ZodObject<{
|
|
19
29
|
kind: z.ZodLiteral<"setValue">;
|
|
20
30
|
ref: z.ZodString;
|
|
@@ -72,6 +82,7 @@ export interface ComputerPredictionInput {
|
|
|
72
82
|
width: number;
|
|
73
83
|
height: number;
|
|
74
84
|
summary: string;
|
|
85
|
+
stateDigest?: string;
|
|
75
86
|
formatCorrection?: boolean;
|
|
76
87
|
validationReason?: ValidationReason;
|
|
77
88
|
correctionReply?: string;
|
|
@@ -79,14 +90,38 @@ export interface ComputerPredictionInput {
|
|
|
79
90
|
history?: readonly ComputerHistoryEntry[];
|
|
80
91
|
expectation?: ComputerExpectation;
|
|
81
92
|
}
|
|
93
|
+
export interface ComputerStepAdapter {
|
|
94
|
+
readonly supportsFormatRetry?: boolean;
|
|
95
|
+
predict(input: ComputerPredictionInput, signal?: AbortSignal): Promise<ComputerProposal>;
|
|
96
|
+
reset?(): void;
|
|
97
|
+
}
|
|
82
98
|
/** One format-only re-prediction is safe before any input has been proposed or dispatched. */
|
|
83
|
-
export declare function predictComputerStep(adapter:
|
|
99
|
+
export declare function predictComputerStep(adapter: ComputerStepAdapter, input: ComputerPredictionInput, reserveAttempt: () => void, signal?: AbortSignal): Promise<ComputerProposal>;
|
|
84
100
|
export declare function readComputerJson(response: Response, maxBytes: number): Promise<unknown>;
|
|
85
101
|
/** A frozen single-recipient connection; never retries, redirects or changes billing sources. */
|
|
86
|
-
export declare class
|
|
102
|
+
export declare class ChatCompletionsComputerAdapter implements ComputerStepAdapter {
|
|
103
|
+
private readonly fetchImpl;
|
|
104
|
+
private readonly connection;
|
|
105
|
+
constructor(connection: ComputerModelConnection, fetchImpl?: typeof fetch);
|
|
106
|
+
predict(input: ComputerPredictionInput, signal?: AbortSignal): Promise<ComputerProposal>;
|
|
107
|
+
}
|
|
108
|
+
/** Native Responses Computer tool adapter. Execution remains exclusively in the local broker. */
|
|
109
|
+
export declare class OpenAIResponsesComputerAdapter implements ComputerStepAdapter {
|
|
87
110
|
private readonly fetchImpl;
|
|
111
|
+
readonly supportsFormatRetry = false;
|
|
88
112
|
private readonly connection;
|
|
113
|
+
private responseId?;
|
|
114
|
+
private callId?;
|
|
115
|
+
private queued;
|
|
116
|
+
private awaitingAction?;
|
|
117
|
+
private batchGoal?;
|
|
89
118
|
constructor(connection: ComputerModelConnection, fetchImpl?: typeof fetch);
|
|
90
119
|
predict(input: ComputerPredictionInput, signal?: AbortSignal): Promise<ComputerProposal>;
|
|
120
|
+
private observe;
|
|
121
|
+
private nextQueued;
|
|
122
|
+
private mapActions;
|
|
123
|
+
reset(): void;
|
|
124
|
+
private resetTurn;
|
|
91
125
|
}
|
|
126
|
+
export declare function createComputerModelAdapter(connection: ComputerModelConnection, fetchImpl?: typeof fetch): ComputerStepAdapter;
|
|
92
127
|
export {};
|