@xopcai/xopc 0.0.369 → 0.0.371
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +59 -174
- package/README.zh-CN.md +59 -174
- package/dist/.pnpm/@noble_hashes@1.8.0/node_modules/@noble/hashes/esm/_md.js +131 -0
- package/dist/.pnpm/@noble_hashes@1.8.0/node_modules/@noble/hashes/esm/_u64.js +30 -0
- package/dist/.pnpm/@noble_hashes@1.8.0/node_modules/@noble/hashes/esm/sha2.js +252 -0
- package/dist/.pnpm/@noble_hashes@1.8.0/node_modules/@noble/hashes/esm/sha256.js +16 -0
- package/dist/.pnpm/@noble_hashes@1.8.0/node_modules/@noble/hashes/esm/utils.js +66 -0
- package/dist/browser-ext/dist/sidepanel.js +21 -1
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-Stj17S9u.js → agent-avatar-dicebear-C8MqXy6W.js} +1 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-BLaL4law.js +1 -0
- package/dist/gateway/static/root/assets/agent-plugin-dialog-BrysdA6F.js +1 -0
- package/dist/gateway/static/root/assets/agents-BJRyMNx2.js +66 -0
- package/dist/gateway/static/root/assets/{app-management-settings-panel-pJFe6M6c.js → app-management-settings-panel-Bi02swpZ.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-BrxSpBWa.js → appearance-settings-rr0qirDm.js} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-DegSl5Lh.js → apps-page-Sz3wl3lV.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-BZQ_VHjp.js → automations-page-DqdbP0hD.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-CxgKlA5d.js +6 -0
- package/dist/gateway/static/root/assets/{block-editor-3XjFv3kK.js → block-editor-CfVR1zGa.js} +3 -3
- package/dist/gateway/static/root/assets/browser-automations-page-DeYnh3mY.js +3 -0
- package/dist/gateway/static/root/assets/{browser-settings-page-ch2_bQF0.js → browser-settings-page-DDZvlGCD.js} +2 -2
- package/dist/gateway/static/root/assets/{capabilities-DO-vfNKI.js → capabilities-CY4SiHcP.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-B48r0DDa.js → capabilities-gjQtMhKu.js} +1 -1
- package/dist/gateway/static/root/assets/capabilities-page-Bl6PZqx3.js +2 -0
- package/dist/gateway/static/root/assets/{capabilities-settings-panel-NckMsJ5N.js → capabilities-settings-panel-B-MM4LJA.js} +4 -4
- package/dist/gateway/static/root/assets/{capability-header-actions-CY8KCO9j.js → capability-header-actions-CAiY7HK1.js} +1 -1
- package/dist/gateway/static/root/assets/{channels-CHOS2CGa.js → channels-D1_fDkhu.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-terminal-dock-Bwknnb4c.js → chat-terminal-dock-D6slpF2a.js} +2 -2
- package/dist/gateway/static/root/assets/{computer-settings-page-B2xeFCSt.js → computer-settings-page-D1n_uQHN.js} +1 -1
- package/dist/gateway/static/root/assets/{connector-service-page-C83DnAqK.js → connector-service-page-FvSCyJzn.js} +1 -1
- package/dist/gateway/static/root/assets/connectors-page-DroD-gQn.js +1 -0
- package/dist/gateway/static/root/assets/copy-text-row-C1gaJwlZ.js +1 -0
- package/dist/gateway/static/root/assets/{date-picker-Bq9GR-DU.js → date-picker-Bl-HqvGU.js} +1 -1
- package/dist/gateway/static/root/assets/dependency-picker-DY4nU-HL.js +1 -0
- package/dist/gateway/static/root/assets/{desktop-pet-BwsbQw8V.js → desktop-pet-_A89B2xw.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-sL9i44pP.js → desktop-pet-settings-BJWkGynu.js} +1 -1
- package/dist/gateway/static/root/assets/device-pairing-wizard-DJ_ITvkI.js +1 -0
- package/dist/gateway/static/root/assets/{directory-picker-path-field-BFlDmsS5.js → directory-picker-path-field-Bj2Cpmxs.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-7Z1Tp7-w.js → extension-debug-page-BfAtjhoK.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-uGqvb8QX.js → extension-page-BFjc1zDp.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-provider-xlSyz4Z6.js → extension-provider-Br6LXyIj.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-CKHgrjOs.js → extension-settings-page-oAwllsMb.js} +1 -1
- package/dist/gateway/static/root/assets/{fallback-models-BwQg0G1D.js → fallback-models-KHd6tw_t.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-realtime-F6D4A7N5.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-settings-BAQnSEMJ.js → gateway-settings-BIyhyiOq.js} +1 -1
- package/dist/gateway/static/root/assets/home-page-CEjaIUTF.js +2 -0
- package/dist/gateway/static/root/assets/{imports-page-re1_Nh64.js → imports-page-ClFqRiGQ.js} +1 -1
- package/dist/gateway/static/root/assets/index-BGBkIIzM.css +1 -0
- package/dist/gateway/static/root/assets/index-GBFmI8im.js +106 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-B_xja9LN.js → keyboard-shortcuts-settings-Ca9_GJSQ.js} +1 -1
- package/dist/gateway/static/root/assets/{local-app-workbench-page-CErdCrPX.js → local-app-workbench-page-BaK9zX1-.js} +1 -1
- package/dist/gateway/static/root/assets/{local-apps-page-BPL2RXdK.js → local-apps-page-1CjSftZ3.js} +1 -1
- package/dist/gateway/static/root/assets/local-session-drafts-pox8evDV.js +1 -0
- package/dist/gateway/static/root/assets/logs-page-6joZBbcx.js +2 -0
- package/dist/gateway/static/root/assets/management-settings-Cnubkklb.js +1 -0
- package/dist/gateway/static/root/assets/note-detail-panel-B6DHbMzT.js +5 -0
- package/dist/gateway/static/root/assets/notes-page-CGZkIKdi.js +8 -0
- package/dist/gateway/static/root/assets/{page-context-capture-button-tf77xIz3.js → page-context-capture-button-y3QmhTu2.js} +1 -1
- package/dist/gateway/static/root/assets/personal-page-C_roXCJB.js +1 -0
- package/dist/gateway/static/root/assets/{product-open-page-Dc3Y-Y7J.js → product-open-page-CSRYWt0f.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-content-MG_hmVA3.js → product-preview-content-DuOML6gs.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-v7xtnvha.js +1 -0
- package/dist/gateway/static/root/assets/{projects-page-MllfNLGA.js → projects-page-BuJCBT6n.js} +1 -1
- package/dist/gateway/static/root/assets/{remote-access-hub-Bs-C70el.js → remote-access-hub-DpHnyBnG.js} +1 -1
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-DpJ5jNzR.js → runtime-tools-settings-panel-DTMTL0hy.js} +1 -1
- package/dist/gateway/static/root/assets/{scenes-page-Dpxamkw6.js → scenes-page-B0JqO_fM.js} +2 -2
- package/dist/gateway/static/root/assets/{schema-form-DUeyQ1zh.js → schema-form-g4z7GH4W.js} +1 -1
- package/dist/gateway/static/root/assets/{send-session-input-Dgn4BRk_.js → send-session-input-BW40VHiL.js} +1 -1
- package/dist/gateway/static/root/assets/session-manager-BqlvrjPE.js +16 -0
- package/dist/gateway/static/root/assets/sessions-page-CftImbH7.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-BkvbSieZ.js +1 -0
- package/dist/gateway/static/root/assets/{settings-page-DouHuBXt.js → settings-page-YD-U8BVw.js} +1 -1
- package/dist/gateway/static/root/assets/setup-status-panel-q_X3kxw2.js +1 -0
- package/dist/gateway/static/root/assets/{share-link-dialog-DJTabLAM.js → share-link-dialog-HCHM8qnf.js} +1 -1
- package/dist/gateway/static/root/assets/{share-preview-page-jw7h4t_B.js → share-preview-page-Ce6FNWt1.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-KHRg_-03.js +1 -0
- package/dist/gateway/static/root/assets/{skill-api-CfyX_0zN.js → skill-api-BpqDMkNB.js} +1 -1
- package/dist/gateway/static/root/assets/skills-page-Bnfn51ks.js +2 -0
- package/dist/gateway/static/root/assets/{system-settings-panel-DWf256TE.js → system-settings-panel-CncvC2CI.js} +1 -1
- package/dist/gateway/static/root/assets/{task-detail-page-DE6N1ZQe.js → task-detail-page-BVJKdnMC.js} +2 -2
- package/dist/gateway/static/root/assets/{tunnel-api-BBm9esrY.js → tunnel-api-g7etuoaT.js} +1 -1
- package/dist/gateway/static/root/assets/{usage-page-C93x89uW.js → usage-page-Dao1I-5F.js} +1 -1
- package/dist/gateway/static/root/assets/{use-composer-attachments-C7Gaaai1.js → use-composer-attachments-DJya1hIL.js} +1 -1
- package/dist/gateway/static/root/assets/use-file-preview-expanded-C5ONO7sF.js +2 -0
- package/dist/gateway/static/root/assets/user-model-page-jr986ucl.js +2 -0
- package/dist/gateway/static/root/assets/{work-discovery-overlay-Bs2MKiTv.js → work-discovery-overlay-CC3mr7tX.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-BR_U_snV.js → workflow-run-setup-panel-CqpXZJxs.js} +2 -2
- package/dist/gateway/static/root/assets/workflows-page-DOk6tBbK.js +6 -0
- package/dist/gateway/static/root/assets/{workspace-api-Si2o3inw.js → workspace-api-WhbMvdBE.js} +2 -2
- package/dist/gateway/static/root/index.html +18 -20
- package/dist/package.js +1 -1
- package/dist/packages/endpoint-tools-client/src/index.js +189 -0
- package/dist/packages/endpoint-tools-protocol/src/bridge.js +105 -0
- package/dist/packages/endpoint-tools-protocol/src/index.js +95 -2
- package/dist/packages/endpoint-tools-protocol/src/location.js +109 -0
- package/dist/packages/endpoint-tools-protocol/src/personal.js +149 -0
- package/dist/packages/gateway-contract/src/session-input-command.js +30 -5
- package/dist/src/agent/agent-manager.js +23 -27
- package/dist/src/agent/background-review/run-background-review.js +1 -1
- package/dist/src/agent/embedded/codemode-extension.d.ts +7 -0
- package/dist/src/agent/embedded/codemode-extension.js +232 -0
- package/dist/src/agent/embedded/codemode-output.d.ts +2 -0
- package/dist/src/agent/embedded/codemode-output.js +34 -0
- package/dist/src/agent/embedded/external-tool-discovery.d.ts +6 -0
- package/dist/src/agent/embedded/external-tool-discovery.js +60 -0
- package/dist/src/agent/embedded/model-runtime.js +5 -2
- package/dist/src/agent/embedded/run-for-session.js +10 -1
- package/dist/src/agent/embedded/run-turn.js +10 -3
- package/dist/src/agent/embedded/session-runner.d.ts +9 -1
- package/dist/src/agent/embedded/session-runner.js +111 -23
- package/dist/src/agent/embedded/session-tool-result-guard.d.ts +2 -0
- package/dist/src/agent/embedded/session-tool-result-guard.js +17 -0
- package/dist/src/agent/embedded/subscribe-session.js +14 -4
- package/dist/src/agent/embedded/tool-metadata.d.ts +15 -0
- package/dist/src/agent/embedded/tool-metadata.js +38 -0
- package/dist/src/agent/embedded/tool-search-extension.d.ts +5 -0
- package/dist/src/agent/embedded/tool-search-extension.js +31 -0
- package/dist/src/agent/embedded/types.d.ts +7 -0
- package/dist/src/agent/embedded/xopc-tools-bridge.js +6 -0
- package/dist/src/agent/external-tools/endpoint-provider.d.ts +1 -1
- package/dist/src/agent/external-tools/endpoint-provider.js +174 -53
- package/dist/src/agent/external-tools/extension-provider.js +8 -1
- package/dist/src/agent/external-tools/gateway-tools.d.ts +1 -1
- package/dist/src/agent/external-tools/gateway-tools.js +45 -22
- package/dist/src/agent/external-tools/index.js +46 -14
- package/dist/src/agent/external-tools/memory-provider.js +8 -1
- package/dist/src/agent/external-tools/read-policy.js +2 -1
- package/dist/src/agent/external-tools/service.d.ts +2 -0
- package/dist/src/agent/external-tools/service.js +25 -3
- package/dist/src/agent/external-tools/tool-registry.d.ts +14 -0
- package/dist/src/agent/external-tools/tool-registry.js +14 -0
- package/dist/src/agent/external-tools/types.d.ts +8 -1
- package/dist/src/agent/external-tools/types.js +0 -1
- package/dist/src/agent/inbound/attachment-pipeline.js +1 -1
- package/dist/src/agent/mcp/config.d.ts +18 -0
- package/dist/src/agent/mcp/{bundle-mcp-config.js → config.js} +8 -25
- package/dist/src/agent/mcp/native-mcp.d.ts +6 -0
- package/dist/src/agent/mcp/native-mcp.js +73 -0
- package/dist/src/agent/service.js +3 -6
- package/dist/src/agent/skills/index.js +1 -1
- package/dist/src/agent/skills/installer.js +1 -1
- package/dist/src/agent/skills/managed-store.js +1 -1
- package/dist/src/agent/skills/skill-manage-ops.js +1 -1
- package/dist/src/agent/skills/skill-manager.js +1 -1
- package/dist/src/agent/skills/skill-sources.js +1 -1
- package/dist/src/agent/source-context/index.d.ts +0 -1
- package/dist/src/agent/source-context/index.js +1 -2
- package/dist/src/agent/source-context/injector.js +1 -0
- package/dist/src/agent/source-context/types.d.ts +2 -2
- package/dist/src/agent/source-context/types.js +1 -1
- package/dist/src/agent/tools/cli-clarify.js +1 -1
- package/dist/src/agent/tools/codemode-permissions.d.ts +4 -0
- package/dist/src/agent/tools/codemode-permissions.js +23 -0
- package/dist/src/agent/tools/dataBatch.js +3 -1
- package/dist/src/agent/tools/delegation-parent-policy.js +1 -4
- package/dist/src/agent/tools/factory.js +4 -3
- package/dist/src/agent/tools/xopc-use-tool.js +2 -2
- package/dist/src/agent/transcript/provider-capabilities.js +0 -1
- package/dist/src/agent/transcript/transcript-policy.js +1 -2
- package/dist/src/agent-catalog/capabilities.js +2 -2
- package/dist/src/agent-catalog/migrations/legacy-config-cutover.js +1 -1
- package/dist/src/agent-catalog/repository.js +1 -1
- package/dist/src/agent-config/schema.d.ts +28 -0
- package/dist/src/agent-config/schema.js +7 -0
- package/dist/src/auth/credentials.js +7 -20
- package/dist/src/auth/model-credential-store.js +11 -4
- package/dist/src/auth/oauth/index.d.ts +1 -1
- package/dist/src/auth/oauth/index.js +3 -3
- package/dist/src/auth/oauth/openai.d.ts +2 -0
- package/dist/src/auth/oauth/openai.js +90 -0
- package/dist/src/auth/oauth/registry.js +3 -3
- package/dist/src/auth/oauth/types.d.ts +1 -0
- package/dist/src/auth/oauth/xopc-cloud.js +1 -1
- package/dist/src/auth/sync-provider-auth.js +5 -0
- package/dist/src/automations/capabilities/drafts.js +1 -1
- package/dist/src/bootstrap/application-state.js +1 -1
- package/dist/src/capabilities/runtime/dispatcher.js +1 -1
- package/dist/src/capabilities/runtime/product.js +1 -1
- package/dist/src/chat-commands/builtins/model.js +2 -2
- package/dist/src/cli/command-manifest.js +1 -1
- package/dist/src/cli/commands/agents.js +1 -1
- package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
- package/dist/src/cli/commands/doctor/checks/provider-auth.js +1 -1
- package/dist/src/cli/commands/extension-agent-plugin.js +0 -19
- package/dist/src/cli/commands/mcp.js +36 -2
- package/dist/src/cli/commands/models.js +2 -2
- package/dist/src/cli/commands/onboard/model.js +2 -2
- package/dist/src/cli/utils/init-workspace-core.js +1 -1
- package/dist/src/cli/utils/oauth-login.js +2 -2
- package/dist/src/config/agent-profile.js +1 -1
- package/dist/src/config/index.js +3 -3
- package/dist/src/config/mcp-config-normalize.d.ts +0 -3
- package/dist/src/config/mcp-config-normalize.js +2 -22
- package/dist/src/config/models-json.d.ts +0 -5
- package/dist/src/config/models-json.js +13 -4
- package/dist/src/config/paths.d.ts +0 -1
- package/dist/src/config/paths.js +1 -4
- package/dist/src/config/schema.d.ts +130 -36
- package/dist/src/config/schema.js +52 -35
- package/dist/src/connectors/auth-provider-registry.d.ts +1 -1
- package/dist/src/connectors/auth-provider-registry.js +1 -21
- package/dist/src/connectors/china-catalog.js +5 -5
- package/dist/src/connectors/connection-recovery-service.d.ts +1 -6
- package/dist/src/connectors/connection-recovery-service.js +3 -105
- package/dist/src/connectors/health.d.ts +1 -2
- package/dist/src/connectors/health.js +2 -101
- package/dist/src/connectors/types.d.ts +1 -1
- package/dist/src/endpoint-tools/binding-service.d.ts +2 -0
- package/dist/src/endpoint-tools/binding-service.js +14 -2
- package/dist/src/endpoint-tools/bridge-host.d.ts +15 -0
- package/dist/src/endpoint-tools/bridge-host.js +166 -0
- package/dist/src/endpoint-tools/bridge.d.ts +27 -0
- package/dist/src/endpoint-tools/bridge.js +88 -0
- package/dist/src/endpoint-tools/capability-catalog.d.ts +2 -0
- package/dist/src/endpoint-tools/capability-catalog.js +8 -0
- package/dist/src/endpoint-tools/grant-service.d.ts +69 -0
- package/dist/src/endpoint-tools/grant-service.js +113 -0
- package/dist/src/endpoint-tools/index.js +1 -1
- package/dist/src/endpoint-tools/invocation-service.js +21 -4
- package/dist/src/endpoint-tools/location-task.d.ts +22 -0
- package/dist/src/endpoint-tools/location-task.js +114 -0
- package/dist/src/endpoint-tools/policy.js +21 -1
- package/dist/src/endpoint-tools/registry.d.ts +2 -0
- package/dist/src/endpoint-tools/registry.js +9 -0
- package/dist/src/endpoint-tools/result-projector.d.ts +15 -0
- package/dist/src/endpoint-tools/result-projector.js +31 -0
- package/dist/src/endpoint-tools/runtime.d.ts +2 -0
- package/dist/src/endpoint-tools/runtime.js +15 -2
- package/dist/src/endpoint-tools/target-resolver.d.ts +12 -0
- package/dist/src/endpoint-tools/target-resolver.js +27 -0
- package/dist/src/endpoint-tools/turn-context.d.ts +6 -0
- package/dist/src/endpoint-tools/turn-context.js +29 -0
- package/dist/src/endpoint-tools/upload-service.d.ts +4 -2
- package/dist/src/endpoint-tools/upload-service.js +29 -4
- package/dist/src/extensions/agent-plugins/auth.d.ts +0 -2
- package/dist/src/extensions/agent-plugins/auth.js +2 -19
- package/dist/src/extensions/agent-plugins/credentials.js +3 -19
- package/dist/src/extensions/agent-plugins/inventory.d.ts +2 -2
- package/dist/src/extensions/agent-plugins/mcp-adapter.js +1 -5
- package/dist/src/extensions/agent-plugins/source-http-fetch.d.ts +2 -0
- package/dist/src/{agent/mcp/plugin-http-fetch.js → extensions/agent-plugins/source-http-fetch.js} +7 -7
- package/dist/src/extensions/agent-plugins/sources.js +2 -2
- package/dist/src/extensions/agent-plugins/store.js +1 -3
- package/dist/src/extensions/agent-plugins/validation.d.ts +0 -4
- package/dist/src/extensions/agent-plugins/validation.js +14 -21
- package/dist/src/gateway/agents-admin.d.ts +5 -0
- package/dist/src/gateway/agents-admin.js +58 -3
- package/dist/src/gateway/chat-stream/mapper.js +9 -0
- package/dist/src/gateway/chat-stream/protocol.d.ts +4 -4
- package/dist/src/gateway/hono/lib/config-payload.d.ts +9 -4
- package/dist/src/gateway/hono/lib/config-payload.js +2 -5
- package/dist/src/gateway/hono/oauth-async.js +9 -2
- package/dist/src/gateway/hono/routes/agent-plugins.js +4 -9
- package/dist/src/gateway/hono/routes/agents.js +5 -4
- package/dist/src/gateway/hono/routes/config-patch/misc.js +1 -1
- package/dist/src/gateway/hono/routes/connection-waits.js +2 -5
- package/dist/src/gateway/hono/routes/connectors.js +5 -60
- package/dist/src/gateway/hono/routes/device-authorizations.d.ts +3 -0
- package/dist/src/gateway/hono/routes/device-authorizations.js +74 -0
- package/dist/src/gateway/hono/routes/endpoint-compatibility.js +8 -0
- package/dist/src/gateway/hono/routes/endpoint-tools.d.ts +1 -0
- package/dist/src/gateway/hono/routes/endpoint-tools.js +70 -3
- package/dist/src/gateway/hono/routes/lazy-bundles.js +17 -1
- package/dist/src/gateway/hono/routes/mcp.d.ts +1 -1
- package/dist/src/gateway/hono/routes/mcp.js +11 -237
- package/dist/src/gateway/hono/routes/notes.js +2 -2
- package/dist/src/gateway/hono/routes/projects.js +2 -2
- package/dist/src/gateway/hono/routes/session-command-handler.js +11 -1
- package/dist/src/gateway/hono/routes/session-input-handler.d.ts +8 -2
- package/dist/src/gateway/hono/routes/session-input-handler.js +26 -2
- package/dist/src/gateway/hono/routes/tasks.js +1 -1
- package/dist/src/gateway/image-generation-setup.js +1 -1
- package/dist/src/gateway/service/config-coordinator.js +2 -5
- package/dist/src/gateway/service/marketplace-service.js +2 -2
- package/dist/src/gateway/service/run-gateway-agent.js +13 -5
- package/dist/src/gateway/service/session-input-coordinator.d.ts +1 -1
- package/dist/src/gateway/service/session-input-coordinator.js +29 -9
- package/dist/src/gateway/service/sessions-api.js +0 -6
- package/dist/src/gateway/service.js +7 -16
- package/dist/src/gateway/session-reset-service.js +0 -6
- package/dist/src/gateway/xopc-cloud-capability-setup.js +1 -1
- package/dist/src/home-intelligence/host.js +2 -2
- package/dist/src/imports/compatibility.js +12 -10
- package/dist/src/local-apps/service.js +1 -1
- package/dist/src/mcp/channel-bridge.js +1 -1
- package/dist/src/notes/agent-context.js +1 -1
- package/dist/src/personal-agent/service.js +1 -1
- package/dist/src/providers/env-keys.js +1 -1
- package/dist/src/providers/index.js +26 -24
- package/dist/src/providers/model-call.d.ts +0 -2
- package/dist/src/providers/model-call.js +2 -6
- package/dist/src/providers/model-registry.js +4 -2
- package/dist/src/providers/model-supplements.d.ts +3 -3
- package/dist/src/providers/model-supplements.js +6 -27
- package/dist/src/providers/presentation.js +3 -8
- package/dist/src/providers/prompt-cache-plan.js +1 -1
- package/dist/src/providers/provider-auth-service.d.ts +1 -1
- package/dist/src/providers/provider-auth-service.js +7 -2
- package/dist/src/providers/provider-policy.d.ts +3 -0
- package/dist/src/providers/provider-policy.js +14 -0
- package/dist/src/providers/register-runtime-providers.js +6 -1
- package/dist/src/realtime/runtime.js +1 -1
- package/dist/src/session/store.js +7 -1
- package/dist/src/session/transcript-events.d.ts +5 -0
- package/dist/src/session/transcript-events.js +1 -0
- package/dist/src/session/types.d.ts +2 -0
- package/dist/src/storage/sqlite/device-grant-audit-repository.d.ts +11 -0
- package/dist/src/storage/sqlite/device-grant-audit-repository.js +10 -0
- package/dist/src/storage/sqlite/endpoint-device-settings-repository.d.ts +7 -0
- package/dist/src/storage/sqlite/endpoint-device-settings-repository.js +17 -0
- package/dist/src/storage/sqlite/migrations/240_device_settings.sql +5 -0
- package/dist/src/storage/sqlite/migrations/241_device_grant_audit.sql +13 -0
- package/dist/src/storage/sqlite/migrations/runner.d.ts +1 -1
- package/dist/src/storage/sqlite/migrations/runner.js +3 -3
- package/dist/src/storage/sqlite/schema.js +1 -1
- package/dist/src/storage/sqlite/session-input-repository.d.ts +1 -0
- package/dist/src/storage/sqlite/session-input-repository.js +5 -1
- package/dist/src/tasks/capabilities/read.js +2 -2
- 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/xopc-tui-keybindings.d.ts +4 -4
- package/dist/src/voice/realtime/persona-context.js +1 -1
- package/package.json +20 -9
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-CCRfvuov.js +0 -1
- package/dist/gateway/static/root/assets/agent-plugin-dialog-CRlzd8El.js +0 -1
- package/dist/gateway/static/root/assets/agents-_ug2LCQb.js +0 -66
- package/dist/gateway/static/root/assets/automations-workspace-BQywN6nG.js +0 -6
- package/dist/gateway/static/root/assets/browser-automations-page-yiEuG1v7.js +0 -3
- package/dist/gateway/static/root/assets/capabilities-page-BEnFt_dj.js +0 -2
- package/dist/gateway/static/root/assets/connectors-page-D6wTmWA6.js +0 -2
- package/dist/gateway/static/root/assets/copy-text-row-BHDs3cBa.js +0 -1
- package/dist/gateway/static/root/assets/dependency-picker-BTERkA9X.js +0 -1
- package/dist/gateway/static/root/assets/device-pairing-wizard-DI2bqaKO.js +0 -1
- package/dist/gateway/static/root/assets/dist-Che_jiQF.js +0 -1
- package/dist/gateway/static/root/assets/gateway-realtime-DDWymi-o.js +0 -1
- package/dist/gateway/static/root/assets/home-page-BZDjvwet.js +0 -2
- package/dist/gateway/static/root/assets/index-BB1z8QxA.js +0 -106
- package/dist/gateway/static/root/assets/index-D9R6tU7r.css +0 -1
- package/dist/gateway/static/root/assets/link-2-D_ZKYUW7.js +0 -1
- package/dist/gateway/static/root/assets/local-session-drafts-DRPsDCj1.js +0 -1
- package/dist/gateway/static/root/assets/logs-page-DL-BM0xq.js +0 -2
- package/dist/gateway/static/root/assets/management-settings-BOVRHhXk.js +0 -1
- package/dist/gateway/static/root/assets/note-detail-panel-DJJK2yL4.js +0 -5
- package/dist/gateway/static/root/assets/notes-page-oCxO7ZTv.js +0 -8
- package/dist/gateway/static/root/assets/personal-page-DOk9gUK5.js +0 -1
- package/dist/gateway/static/root/assets/project-detail-page-3uAzbW4T.js +0 -1
- package/dist/gateway/static/root/assets/session-manager-LInoZ_Yi.js +0 -16
- package/dist/gateway/static/root/assets/sessions-page-BCVlNHtq.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-Bz-ue9fZ.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-B5BoZ-1y.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-BlnlzGjH.js +0 -1
- package/dist/gateway/static/root/assets/skills-page-DjdTeYzm.js +0 -2
- package/dist/gateway/static/root/assets/use-file-preview-expanded-Db2VYg1b.js +0 -2
- package/dist/gateway/static/root/assets/user-model-page-B74LkVbp.js +0 -2
- package/dist/gateway/static/root/assets/workflows-page-Crk4SxtC.js +0 -6
- package/dist/src/agent/embedded/system-prompt-override.d.ts +0 -2
- package/dist/src/agent/embedded/system-prompt-override.js +0 -21
- package/dist/src/agent/external-tools/mcp-provider.d.ts +0 -32
- package/dist/src/agent/external-tools/mcp-provider.js +0 -208
- package/dist/src/agent/mcp/bundle-mcp-config.d.ts +0 -20
- package/dist/src/agent/mcp/bundle-mcp-gateway.d.ts +0 -79
- package/dist/src/agent/mcp/bundle-mcp-gateway.js +0 -93
- package/dist/src/agent/mcp/bundle-mcp-names.d.ts +0 -1
- package/dist/src/agent/mcp/bundle-mcp-names.js +0 -25
- package/dist/src/agent/mcp/bundle-mcp-policy.d.ts +0 -1
- package/dist/src/agent/mcp/bundle-mcp-policy.js +0 -6
- package/dist/src/agent/mcp/bundle-mcp-runtime.d.ts +0 -46
- package/dist/src/agent/mcp/bundle-mcp-runtime.js +0 -571
- package/dist/src/agent/mcp/bundle-mcp-tools.d.ts +0 -2
- package/dist/src/agent/mcp/bundle-mcp-tools.js +0 -2
- package/dist/src/agent/mcp/bundle-mcp-types.d.ts +0 -76
- package/dist/src/agent/mcp/bundle-mcp-types.js +0 -1
- package/dist/src/agent/mcp/embedded-mcp.d.ts +0 -10
- package/dist/src/agent/mcp/embedded-mcp.js +0 -14
- package/dist/src/agent/mcp/index.d.ts +0 -5
- package/dist/src/agent/mcp/index.js +0 -12
- package/dist/src/agent/mcp/mcp-config-shared.d.ts +0 -8
- package/dist/src/agent/mcp/mcp-config-shared.js +0 -39
- package/dist/src/agent/mcp/mcp-http.d.ts +0 -23
- package/dist/src/agent/mcp/mcp-http.js +0 -67
- package/dist/src/agent/mcp/mcp-resource-id.d.ts +0 -6
- package/dist/src/agent/mcp/mcp-resource-id.js +0 -19
- package/dist/src/agent/mcp/mcp-stdio-transport.d.ts +0 -26
- package/dist/src/agent/mcp/mcp-stdio-transport.js +0 -120
- package/dist/src/agent/mcp/mcp-stdio.d.ts +0 -18
- package/dist/src/agent/mcp/mcp-stdio.js +0 -35
- package/dist/src/agent/mcp/mcp-transport-config.d.ts +0 -28
- package/dist/src/agent/mcp/mcp-transport-config.js +0 -91
- package/dist/src/agent/mcp/mcp-transport.d.ts +0 -17
- package/dist/src/agent/mcp/mcp-transport.js +0 -141
- package/dist/src/agent/mcp/oauth/index.d.ts +0 -6
- package/dist/src/agent/mcp/oauth/index.js +0 -6
- package/dist/src/agent/mcp/oauth/mcp-oauth-errors.d.ts +0 -5
- package/dist/src/agent/mcp/oauth/mcp-oauth-errors.js +0 -14
- package/dist/src/agent/mcp/oauth/mcp-oauth-manager.d.ts +0 -30
- package/dist/src/agent/mcp/oauth/mcp-oauth-manager.js +0 -276
- package/dist/src/agent/mcp/oauth/mcp-oauth-provider.d.ts +0 -33
- package/dist/src/agent/mcp/oauth/mcp-oauth-provider.js +0 -103
- package/dist/src/agent/mcp/oauth/mcp-oauth-session.d.ts +0 -31
- package/dist/src/agent/mcp/oauth/mcp-oauth-session.js +0 -181
- package/dist/src/agent/mcp/oauth/mcp-oauth-store.d.ts +0 -12
- package/dist/src/agent/mcp/oauth/mcp-oauth-store.js +0 -91
- package/dist/src/agent/mcp/oauth/mcp-oauth-types.d.ts +0 -22
- package/dist/src/agent/mcp/oauth/mcp-oauth-types.js +0 -1
- package/dist/src/agent/mcp/plugin-http-fetch.d.ts +0 -2
- package/dist/src/agent/source-context/mcp-resource-context.d.ts +0 -8
- package/dist/src/agent/source-context/mcp-resource-context.js +0 -30
- package/dist/src/auth/oauth/openai-codex.d.ts +0 -9
- package/dist/src/auth/oauth/openai-codex.js +0 -414
- package/dist/src/connectors/plugin-mcp-recovery.d.ts +0 -28
- package/dist/src/connectors/plugin-mcp-recovery.js +0 -90
- package/dist/src/extensions/agent-plugins/connection.d.ts +0 -8
- package/dist/src/extensions/agent-plugins/connection.js +0 -41
- package/dist/src/extensions/agent-plugins/health.d.ts +0 -4
- package/dist/src/extensions/agent-plugins/health.js +0 -48
- package/dist/src/extensions/agent-plugins/plugin-oauth-scope.d.ts +0 -1
- package/dist/src/extensions/agent-plugins/plugin-oauth-scope.js +0 -8
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { locationRequestSchema } from "../../../../packages/endpoint-tools-protocol/src/location.js";
|
|
2
|
+
import { init_src } from "../../../../packages/endpoint-tools-protocol/src/index.js";
|
|
3
|
+
import { getSessionMetadata } from "../../../storage/sqlite/session-read-repository.js";
|
|
4
|
+
import { init_session_repository } from "../../../storage/sqlite/session-repository.js";
|
|
5
|
+
import { getGatewayPrincipal } from "../../security/gateway-principal.js";
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
//#region src/gateway/hono/routes/device-authorizations.ts
|
|
8
|
+
init_src();
|
|
9
|
+
init_session_repository();
|
|
10
|
+
const authorizationSchema = z.object({
|
|
11
|
+
conversationId: z.uuid(),
|
|
12
|
+
requestorPrincipalId: z.string().min(1).max(160),
|
|
13
|
+
targetEndpointId: z.string().min(1).max(160),
|
|
14
|
+
toolName: z.enum([
|
|
15
|
+
"mobile.device.get_location",
|
|
16
|
+
"web.device.get_location",
|
|
17
|
+
"desktop.device.get_location"
|
|
18
|
+
]),
|
|
19
|
+
arguments: locationRequestSchema
|
|
20
|
+
}).strict();
|
|
21
|
+
function registerDeviceAuthorizationRoutes(app, deps) {
|
|
22
|
+
app.use("/api/endpoint-tools/target-authorizations*", async (c, next) => {
|
|
23
|
+
if (getGatewayPrincipal(c).kind !== "owner") return c.json({
|
|
24
|
+
ok: false,
|
|
25
|
+
error: {
|
|
26
|
+
code: "FORBIDDEN",
|
|
27
|
+
message: "Device authorization requires Gateway owner consent"
|
|
28
|
+
}
|
|
29
|
+
}, 403);
|
|
30
|
+
c.header("Cache-Control", "no-store");
|
|
31
|
+
await next();
|
|
32
|
+
});
|
|
33
|
+
app.get("/api/endpoint-tools/target-authorizations", (c) => c.json({
|
|
34
|
+
ok: true,
|
|
35
|
+
payload: deps.service.endpointTools.grants.list()
|
|
36
|
+
}));
|
|
37
|
+
app.post("/api/endpoint-tools/target-authorizations", async (c) => {
|
|
38
|
+
const parsed = authorizationSchema.safeParse(await c.req.json().catch(() => null));
|
|
39
|
+
if (!parsed.success) return c.json({
|
|
40
|
+
ok: false,
|
|
41
|
+
error: {
|
|
42
|
+
code: "BAD_REQUEST",
|
|
43
|
+
message: "Invalid single-call device authorization"
|
|
44
|
+
}
|
|
45
|
+
}, 400);
|
|
46
|
+
if (!getSessionMetadata(parsed.data.conversationId)) return c.json({
|
|
47
|
+
ok: false,
|
|
48
|
+
error: {
|
|
49
|
+
code: "NOT_FOUND",
|
|
50
|
+
message: "Conversation not found"
|
|
51
|
+
}
|
|
52
|
+
}, 404);
|
|
53
|
+
try {
|
|
54
|
+
return c.json({
|
|
55
|
+
ok: true,
|
|
56
|
+
payload: deps.service.endpointTools.grants.issue(parsed.data)
|
|
57
|
+
}, 201);
|
|
58
|
+
} catch {
|
|
59
|
+
return c.json({
|
|
60
|
+
ok: false,
|
|
61
|
+
error: {
|
|
62
|
+
code: "TARGET_UNAVAILABLE",
|
|
63
|
+
message: "Device or capability is unavailable"
|
|
64
|
+
}
|
|
65
|
+
}, 409);
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
app.delete("/api/endpoint-tools/target-authorizations/:grantId", (c) => c.json({
|
|
69
|
+
ok: true,
|
|
70
|
+
payload: { revoked: deps.service.endpointTools.grants.revoke(c.req.param("grantId")) }
|
|
71
|
+
}));
|
|
72
|
+
}
|
|
73
|
+
//#endregion
|
|
74
|
+
export { registerDeviceAuthorizationRoutes };
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { init_src } from "../../../../packages/endpoint-tools-protocol/src/index.js";
|
|
2
2
|
import { COMPUTER_DESCRIPTOR, COMPUTER_FRAME_MAX_BYTES, init_src as init_src$1 } from "../../../../packages/computer-control-contract/src/index.js";
|
|
3
3
|
import { REALTIME_CAPABILITIES } from "../../../../packages/realtime-protocol/src/index.js";
|
|
4
|
+
import { getGatewayPrincipal } from "../../security/gateway-principal.js";
|
|
4
5
|
//#region src/gateway/hono/routes/endpoint-compatibility.ts
|
|
5
6
|
init_src$1();
|
|
6
7
|
init_src();
|
|
7
8
|
function registerEndpointCompatibilityRoutes(authenticated) {
|
|
8
9
|
authenticated.get("/api/endpoint-tools/compatibility", (c) => {
|
|
10
|
+
const principal = getGatewayPrincipal(c);
|
|
9
11
|
c.header("Cache-Control", "no-store");
|
|
10
12
|
return c.json({
|
|
11
13
|
ok: true,
|
|
@@ -16,6 +18,12 @@ function registerEndpointCompatibilityRoutes(authenticated) {
|
|
|
16
18
|
maxVersion: 2,
|
|
17
19
|
capabilities: REALTIME_CAPABILITIES
|
|
18
20
|
},
|
|
21
|
+
turnDeviceContextV1: true,
|
|
22
|
+
deviceStateToolsV1: true,
|
|
23
|
+
hardwareBridgeV1: true,
|
|
24
|
+
deviceLocationTasksV1: true,
|
|
25
|
+
mobilePersonalToolsV1: true,
|
|
26
|
+
...principal.kind === "device" ? { deviceId: principal.deviceId } : {},
|
|
19
27
|
endpointProtocolVersion: 2,
|
|
20
28
|
computerControl: COMPUTER_DESCRIPTOR,
|
|
21
29
|
computerFrameUploadMaxBytes: COMPUTER_FRAME_MAX_BYTES
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import type { Hono } from 'hono';
|
|
2
2
|
import type { AuthenticatedRouteDeps } from './deps.js';
|
|
3
3
|
export declare function registerEndpointToolRoutes(authenticated: Hono, deps: AuthenticatedRouteDeps): void;
|
|
4
|
+
export declare function registerDeviceSettingsRoutes(authenticated: Hono): void;
|
|
@@ -5,9 +5,11 @@ import { endpointPrincipalRegistrationSchema, endpointSessionBindingRequestSchem
|
|
|
5
5
|
import { createEndpointPrincipal, getEndpointPrincipal, listEndpointPrincipals, revokeEndpointPrincipal } from "../../../storage/sqlite/endpoint-principal-repository.js";
|
|
6
6
|
import { listEndpointToolInvocationAuditPage } from "../../../storage/sqlite/endpoint-tool-invocation-repository.js";
|
|
7
7
|
import { init_sqlite } from "../../../storage/sqlite/index.js";
|
|
8
|
+
import { getEndpointDeviceSettings, renameEndpointDevice } from "../../../storage/sqlite/endpoint-device-settings-repository.js";
|
|
8
9
|
import { parseEndpointPublicKey } from "../../../endpoint-tools/auth.js";
|
|
9
10
|
import { ENDPOINT_UPLOAD_MAX_BYTES, EndpointUploadError } from "../../../endpoint-tools/upload-service.js";
|
|
10
11
|
import { getGatewayPrincipal } from "../../security/gateway-principal.js";
|
|
12
|
+
import { z } from "zod";
|
|
11
13
|
//#region src/gateway/hono/routes/endpoint-tools.ts
|
|
12
14
|
init_src();
|
|
13
15
|
init_sqlite();
|
|
@@ -52,13 +54,17 @@ function registerEndpointToolRoutes(authenticated, deps) {
|
|
|
52
54
|
}
|
|
53
55
|
const devicesById = new Map(listDevices().map((device) => [device.id, device]));
|
|
54
56
|
const principalsById = new Map(listEndpointPrincipals().map((principal) => [principal.id, principal]));
|
|
55
|
-
const
|
|
57
|
+
const ids = new Set([...devicesById.keys(), ...principalsById.keys()]);
|
|
58
|
+
const actor = getGatewayPrincipal(c);
|
|
59
|
+
const devices = [...ids].filter((id) => actor.kind !== "device" || id === actor.deviceId).map((id) => {
|
|
56
60
|
const access = devicesById.get(id);
|
|
57
61
|
const principal = principalsById.get(id);
|
|
62
|
+
const settings = principal ? getEndpointDeviceSettings(id) : void 0;
|
|
58
63
|
const lastSeenAt = Math.max(access?.lastSeenAt ?? 0, principal?.lastSeenAt ?? 0) || void 0;
|
|
59
64
|
return {
|
|
60
65
|
id,
|
|
61
|
-
displayName: principal?.displayName ?? access?.displayName ?? id,
|
|
66
|
+
displayName: settings?.nickname ?? principal?.displayName ?? access?.displayName ?? id,
|
|
67
|
+
settingsRevision: settings?.revision ?? 0,
|
|
62
68
|
kind: principal?.kind ?? (access?.platform === "chrome" ? "browser" : "mobile"),
|
|
63
69
|
platform: principal?.platform ?? access?.platform ?? "unknown",
|
|
64
70
|
createdAt: Math.min(access?.createdAt ?? Number.POSITIVE_INFINITY, principal?.createdAt ?? Number.POSITIVE_INFINITY),
|
|
@@ -302,6 +308,15 @@ function registerEndpointToolRoutes(authenticated, deps) {
|
|
|
302
308
|
message: "Uploaded file is too large"
|
|
303
309
|
}
|
|
304
310
|
}, 413);
|
|
311
|
+
const actor = getGatewayPrincipal(c);
|
|
312
|
+
const endpoint = deps.service.endpointTools.registry.get(endpointId);
|
|
313
|
+
if (actor.kind !== "owner" && !(actor.kind === "device" && actor.deviceId === endpoint?.principalId)) return c.json({
|
|
314
|
+
ok: false,
|
|
315
|
+
error: {
|
|
316
|
+
code: "FORBIDDEN",
|
|
317
|
+
message: "Upload belongs to another device"
|
|
318
|
+
}
|
|
319
|
+
}, 403);
|
|
305
320
|
let bytes;
|
|
306
321
|
try {
|
|
307
322
|
const limits = deps.service.endpointTools.uploads.getGrantLimits(invocationId, endpointId, token);
|
|
@@ -350,6 +365,14 @@ function registerEndpointToolRoutes(authenticated, deps) {
|
|
|
350
365
|
});
|
|
351
366
|
authenticated.get("/api/endpoint-tools/files/:fileId", (c) => {
|
|
352
367
|
const file = deps.service.endpointTools.uploads.getFile(c.req.param("fileId"));
|
|
368
|
+
const actor = getGatewayPrincipal(c);
|
|
369
|
+
if (file && actor.kind !== "owner" && !(actor.kind === "device" && actor.deviceId === file.principalId)) return c.json({
|
|
370
|
+
ok: false,
|
|
371
|
+
error: {
|
|
372
|
+
code: "FORBIDDEN",
|
|
373
|
+
message: "Endpoint file is not accessible"
|
|
374
|
+
}
|
|
375
|
+
}, 403);
|
|
353
376
|
const bytes = file && deps.service.endpointTools.uploads.readFile(file.fileId);
|
|
354
377
|
if (!file || !bytes) return c.json({
|
|
355
378
|
ok: false,
|
|
@@ -365,5 +388,49 @@ function registerEndpointToolRoutes(authenticated, deps) {
|
|
|
365
388
|
return c.body(body);
|
|
366
389
|
});
|
|
367
390
|
}
|
|
391
|
+
function registerDeviceSettingsRoutes(authenticated) {
|
|
392
|
+
authenticated.patch("/api/endpoint-tools/devices/:principalId", async (c) => {
|
|
393
|
+
const parsed = z.strictObject({
|
|
394
|
+
nickname: z.string().trim().min(1).max(80),
|
|
395
|
+
expectedRevision: z.number().int().nonnegative()
|
|
396
|
+
}).safeParse(await c.req.json().catch(() => null));
|
|
397
|
+
if (!parsed.success) return c.json({
|
|
398
|
+
ok: false,
|
|
399
|
+
error: {
|
|
400
|
+
code: "BAD_REQUEST",
|
|
401
|
+
message: "Invalid device settings"
|
|
402
|
+
}
|
|
403
|
+
}, 400);
|
|
404
|
+
const actor = getGatewayPrincipal(c);
|
|
405
|
+
const id = c.req.param("principalId");
|
|
406
|
+
if (actor.kind !== "owner" && !(actor.kind === "device" && actor.deviceId === id)) return c.json({
|
|
407
|
+
ok: false,
|
|
408
|
+
error: {
|
|
409
|
+
code: "FORBIDDEN",
|
|
410
|
+
message: "Device settings are not accessible"
|
|
411
|
+
}
|
|
412
|
+
}, 403);
|
|
413
|
+
const principal = getEndpointPrincipal(id);
|
|
414
|
+
if (!principal || principal.revokedAt) return c.json({
|
|
415
|
+
ok: false,
|
|
416
|
+
error: {
|
|
417
|
+
code: "NOT_FOUND",
|
|
418
|
+
message: "Device is unavailable"
|
|
419
|
+
}
|
|
420
|
+
}, 404);
|
|
421
|
+
const settings = renameEndpointDevice(id, parsed.data.nickname, parsed.data.expectedRevision);
|
|
422
|
+
if (!settings) return c.json({
|
|
423
|
+
ok: false,
|
|
424
|
+
error: {
|
|
425
|
+
code: "CONFLICT",
|
|
426
|
+
message: "Device settings changed. Refresh before saving."
|
|
427
|
+
}
|
|
428
|
+
}, 409);
|
|
429
|
+
return c.json({
|
|
430
|
+
ok: true,
|
|
431
|
+
payload: settings
|
|
432
|
+
});
|
|
433
|
+
});
|
|
434
|
+
}
|
|
368
435
|
//#endregion
|
|
369
|
-
export { registerEndpointToolRoutes };
|
|
436
|
+
export { registerDeviceSettingsRoutes, registerEndpointToolRoutes };
|
|
@@ -35,6 +35,22 @@ const AUTHENTICATED_LAZY_ROUTE_BUNDLES = [
|
|
|
35
35
|
return { register: registerCapabilityOperationRoutes };
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
|
+
{
|
|
39
|
+
id: "device-authorizations",
|
|
40
|
+
match: (path) => /^\/api\/endpoint-tools\/target-authorizations(?:\/[^/]+)?$/.test(path),
|
|
41
|
+
load: async () => {
|
|
42
|
+
const { registerDeviceAuthorizationRoutes } = await import("./device-authorizations.js");
|
|
43
|
+
return { register: registerDeviceAuthorizationRoutes };
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
id: "device-settings",
|
|
48
|
+
match: (path) => /^\/api\/endpoint-tools\/devices\/[^/]+$/.test(path) && path !== "/api/endpoint-tools/devices/revoke",
|
|
49
|
+
load: async () => {
|
|
50
|
+
const { registerDeviceSettingsRoutes } = await import("./endpoint-tools.js");
|
|
51
|
+
return { register: registerDeviceSettingsRoutes };
|
|
52
|
+
}
|
|
53
|
+
},
|
|
38
54
|
{
|
|
39
55
|
id: "endpoint-compatibility",
|
|
40
56
|
match: (path) => path === "/api/endpoint-tools/compatibility",
|
|
@@ -424,7 +440,7 @@ const AUTHENTICATED_LAZY_ROUTE_BUNDLES = [
|
|
|
424
440
|
},
|
|
425
441
|
{
|
|
426
442
|
id: "mcp",
|
|
427
|
-
match: (path) =>
|
|
443
|
+
match: (path) => path === "/api/mcp/servers",
|
|
428
444
|
load: async () => {
|
|
429
445
|
const { registerMcpRoutes } = await import("./mcp.js");
|
|
430
446
|
return { register: registerMcpRoutes };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { Hono } from 'hono';
|
|
2
2
|
import type { AuthenticatedRouteDeps } from './deps.js';
|
|
3
|
-
export declare function registerMcpRoutes(
|
|
3
|
+
export declare function registerMcpRoutes(app: Hono, deps: AuthenticatedRouteDeps): void;
|
|
@@ -1,254 +1,28 @@
|
|
|
1
1
|
import { isManagedConnectorServer } from "../../../connectors/materialize.js";
|
|
2
|
-
import {
|
|
3
|
-
import { canonicalizeConfiguredMcpServer, normalizeConfiguredMcpServers } from "../../../config/mcp-config-normalize.js";
|
|
4
|
-
import { savePluginAuthBinding } from "../../../extensions/agent-plugins/auth.js";
|
|
5
|
-
import { loadMergedBundleMcpConfig } from "../../../agent/mcp/bundle-mcp-config.js";
|
|
2
|
+
import { loadMergedMcpConfig } from "../../../agent/mcp/config.js";
|
|
6
3
|
import { getWorkspacePath } from "../../../config/workspace-path-helpers.js";
|
|
7
|
-
import { getMcpOAuthManager } from "../../../agent/mcp/oauth/mcp-oauth-manager.js";
|
|
8
|
-
import { listBundleMcpResourcesForGateway, listBundleMcpServerCapabilitiesForGateway, listBundleMcpServerToolsForGateway } from "../../../agent/mcp/bundle-mcp-gateway.js";
|
|
9
4
|
//#region src/gateway/hono/routes/mcp.ts
|
|
10
|
-
function registerMcpRoutes(
|
|
11
|
-
|
|
5
|
+
function registerMcpRoutes(app, deps) {
|
|
6
|
+
app.get("/api/mcp/servers", (c) => {
|
|
12
7
|
const cfg = deps.service.currentConfig;
|
|
13
|
-
|
|
14
|
-
workspaceDir: getWorkspacePath(cfg) || "./workspace",
|
|
15
|
-
cfg
|
|
16
|
-
}).config.mcpServers[id];
|
|
17
|
-
};
|
|
18
|
-
authenticated.get("/api/mcp/servers", async (c) => {
|
|
19
|
-
const cfg = deps.service.currentConfig;
|
|
20
|
-
const merged = loadMergedBundleMcpConfig({
|
|
8
|
+
const merged = loadMergedMcpConfig({
|
|
21
9
|
workspaceDir: getWorkspacePath(cfg) || "./workspace",
|
|
22
10
|
cfg
|
|
23
11
|
});
|
|
24
|
-
const configured = normalizeConfiguredMcpServers(cfg.mcp?.servers);
|
|
25
|
-
const servers = await Promise.all(Object.entries(merged.config.mcpServers).map(async ([id, server]) => ({
|
|
26
|
-
id,
|
|
27
|
-
plugin: server.xopcPlugin,
|
|
28
|
-
managed: isManagedConnectorServer(server),
|
|
29
|
-
connectorId: isManagedConnectorServer(server) ? server.xopcConnector.connectorId : void 0,
|
|
30
|
-
oauth: await getMcpOAuthManager(server).status(id, server)
|
|
31
|
-
})));
|
|
32
12
|
return c.json({
|
|
33
13
|
ok: true,
|
|
34
14
|
payload: {
|
|
35
|
-
servers:
|
|
15
|
+
servers: Object.entries(merged.config.mcpServers).map(([id, server]) => ({
|
|
16
|
+
id,
|
|
17
|
+
plugin: server.xopcPlugin,
|
|
18
|
+
managed: isManagedConnectorServer(server),
|
|
19
|
+
connectorId: isManagedConnectorServer(server) ? server.xopcConnector.connectorId : void 0
|
|
20
|
+
})).sort((a, b) => a.id.localeCompare(b.id)),
|
|
36
21
|
mergedServerIds: Object.keys(merged.config.mcpServers).sort(),
|
|
37
|
-
configured
|
|
22
|
+
configured: cfg.mcp?.servers ?? {}
|
|
38
23
|
}
|
|
39
24
|
});
|
|
40
25
|
});
|
|
41
|
-
authenticated.get("/api/mcp/resources", async (c) => {
|
|
42
|
-
const cfg = deps.service.currentConfig;
|
|
43
|
-
const workspaceDir = getWorkspacePath(cfg) || "./workspace";
|
|
44
|
-
const query = (c.req.query("q") ?? "").trim().toLocaleLowerCase();
|
|
45
|
-
const serverId = (c.req.query("serverId") ?? "").trim();
|
|
46
|
-
try {
|
|
47
|
-
const items = (await listBundleMcpResourcesForGateway({
|
|
48
|
-
workspaceDir,
|
|
49
|
-
cfg
|
|
50
|
-
})).filter((resource) => {
|
|
51
|
-
if (serverId && resource.serverId !== serverId) return false;
|
|
52
|
-
if (!query) return true;
|
|
53
|
-
return [
|
|
54
|
-
resource.name,
|
|
55
|
-
resource.title,
|
|
56
|
-
resource.description,
|
|
57
|
-
resource.uri,
|
|
58
|
-
resource.serverId
|
|
59
|
-
].some((value) => value?.toLocaleLowerCase().includes(query));
|
|
60
|
-
}).slice(0, 20);
|
|
61
|
-
return c.json({
|
|
62
|
-
ok: true,
|
|
63
|
-
payload: { resources: items }
|
|
64
|
-
});
|
|
65
|
-
} catch (err) {
|
|
66
|
-
return c.json({
|
|
67
|
-
ok: false,
|
|
68
|
-
error: err instanceof Error ? err.message : String(err)
|
|
69
|
-
}, 500);
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
authenticated.get("/api/mcp/servers/:id/oauth", async (c) => {
|
|
73
|
-
const id = c.req.param("id");
|
|
74
|
-
const server = resolveServer(id);
|
|
75
|
-
if (!server) return c.json({
|
|
76
|
-
ok: false,
|
|
77
|
-
error: `Unknown MCP server: ${id}`
|
|
78
|
-
}, 404);
|
|
79
|
-
return c.json({
|
|
80
|
-
ok: true,
|
|
81
|
-
payload: await getMcpOAuthManager(server).status(id, server)
|
|
82
|
-
});
|
|
83
|
-
});
|
|
84
|
-
authenticated.post("/api/mcp/servers/:id/oauth/callback", deps.strictRateLimitMiddleware, async (c) => {
|
|
85
|
-
const id = c.req.param("id");
|
|
86
|
-
const server = resolveServer(id);
|
|
87
|
-
if (!server) return c.json({
|
|
88
|
-
ok: false,
|
|
89
|
-
error: "Unknown MCP server"
|
|
90
|
-
}, 404);
|
|
91
|
-
try {
|
|
92
|
-
const body = await c.req.json();
|
|
93
|
-
if (typeof body.callbackUrl !== "string" || body.callbackUrl.length > 16384) throw new Error("Expected callbackUrl");
|
|
94
|
-
return c.json({
|
|
95
|
-
ok: true,
|
|
96
|
-
payload: await getMcpOAuthManager(server).submitCallback(id, server, body.callbackUrl)
|
|
97
|
-
});
|
|
98
|
-
} catch {
|
|
99
|
-
return c.json({
|
|
100
|
-
ok: false,
|
|
101
|
-
error: "OAuth callback rejected; verify the URL and active authorization session"
|
|
102
|
-
}, 400);
|
|
103
|
-
}
|
|
104
|
-
});
|
|
105
|
-
authenticated.post("/api/mcp/servers/:id/oauth/start", deps.strictRateLimitMiddleware, async (c) => {
|
|
106
|
-
const id = c.req.param("id");
|
|
107
|
-
const server = resolveServer(id);
|
|
108
|
-
if (!server) return c.json({
|
|
109
|
-
ok: false,
|
|
110
|
-
error: `Unknown MCP server: ${id}`
|
|
111
|
-
}, 404);
|
|
112
|
-
try {
|
|
113
|
-
const origin = server.xopcPlugin;
|
|
114
|
-
if (origin) await savePluginAuthBinding(new AgentPluginStore(), origin.id, origin.serverName, { mode: "oauth" });
|
|
115
|
-
const oauthServer = origin ? resolveServer(id) : server;
|
|
116
|
-
const payload = await getMcpOAuthManager(oauthServer).start({
|
|
117
|
-
serverId: id,
|
|
118
|
-
rawServer: oauthServer,
|
|
119
|
-
cfg: deps.service.currentConfig
|
|
120
|
-
});
|
|
121
|
-
return c.json({
|
|
122
|
-
ok: true,
|
|
123
|
-
payload
|
|
124
|
-
});
|
|
125
|
-
} catch (err) {
|
|
126
|
-
return c.json({
|
|
127
|
-
ok: false,
|
|
128
|
-
error: err instanceof Error ? err.message : String(err)
|
|
129
|
-
}, 400);
|
|
130
|
-
}
|
|
131
|
-
});
|
|
132
|
-
authenticated.delete("/api/mcp/servers/:id/oauth", deps.strictRateLimitMiddleware, async (c) => {
|
|
133
|
-
const id = c.req.param("id");
|
|
134
|
-
const server = resolveServer(id);
|
|
135
|
-
if (!server) return c.json({
|
|
136
|
-
ok: false,
|
|
137
|
-
error: `Unknown MCP server: ${id}`
|
|
138
|
-
}, 404);
|
|
139
|
-
try {
|
|
140
|
-
const payload = await getMcpOAuthManager(server).disconnect(id, server);
|
|
141
|
-
return c.json({
|
|
142
|
-
ok: true,
|
|
143
|
-
payload
|
|
144
|
-
});
|
|
145
|
-
} catch (err) {
|
|
146
|
-
return c.json({
|
|
147
|
-
ok: false,
|
|
148
|
-
error: err instanceof Error ? err.message : String(err)
|
|
149
|
-
}, 400);
|
|
150
|
-
}
|
|
151
|
-
});
|
|
152
|
-
authenticated.get("/api/mcp/servers/:id/tools", async (c) => {
|
|
153
|
-
const id = c.req.param("id");
|
|
154
|
-
const cfg = deps.service.currentConfig;
|
|
155
|
-
const workspaceDir = getWorkspacePath(cfg) || "./workspace";
|
|
156
|
-
try {
|
|
157
|
-
const tools = await listBundleMcpServerToolsForGateway({
|
|
158
|
-
workspaceDir,
|
|
159
|
-
cfg,
|
|
160
|
-
serverId: id
|
|
161
|
-
});
|
|
162
|
-
return c.json({
|
|
163
|
-
ok: true,
|
|
164
|
-
payload: { tools }
|
|
165
|
-
});
|
|
166
|
-
} catch (err) {
|
|
167
|
-
return c.json({
|
|
168
|
-
ok: false,
|
|
169
|
-
error: err instanceof Error ? err.message : String(err)
|
|
170
|
-
}, 500);
|
|
171
|
-
}
|
|
172
|
-
});
|
|
173
|
-
authenticated.get("/api/mcp/servers/:id/capabilities", async (c) => {
|
|
174
|
-
const id = c.req.param("id");
|
|
175
|
-
const cfg = deps.service.currentConfig;
|
|
176
|
-
const workspaceDir = getWorkspacePath(cfg) || "./workspace";
|
|
177
|
-
try {
|
|
178
|
-
const capabilities = await listBundleMcpServerCapabilitiesForGateway({
|
|
179
|
-
workspaceDir,
|
|
180
|
-
cfg,
|
|
181
|
-
serverId: id
|
|
182
|
-
});
|
|
183
|
-
return c.json({
|
|
184
|
-
ok: true,
|
|
185
|
-
payload: capabilities
|
|
186
|
-
});
|
|
187
|
-
} catch (err) {
|
|
188
|
-
return c.json({
|
|
189
|
-
ok: false,
|
|
190
|
-
error: err instanceof Error ? err.message : String(err)
|
|
191
|
-
}, 500);
|
|
192
|
-
}
|
|
193
|
-
});
|
|
194
|
-
authenticated.post("/api/mcp/servers/:id/test", async (c) => {
|
|
195
|
-
const id = c.req.param("id");
|
|
196
|
-
const cfg = deps.service.currentConfig;
|
|
197
|
-
const workspaceDir = getWorkspacePath(cfg) || "./workspace";
|
|
198
|
-
const body = await c.req.json().catch(() => ({}));
|
|
199
|
-
const inlineServer = body && typeof body === "object" && !Array.isArray(body) && body.server && typeof body.server === "object" ? body.server : void 0;
|
|
200
|
-
if (inlineServer && id.startsWith("plugin/")) return c.json({
|
|
201
|
-
ok: false,
|
|
202
|
-
error: "Plugin servers must use their installed configuration"
|
|
203
|
-
}, 400);
|
|
204
|
-
const mergedServers = loadMergedBundleMcpConfig({
|
|
205
|
-
workspaceDir,
|
|
206
|
-
cfg
|
|
207
|
-
}).config.mcpServers;
|
|
208
|
-
const knownServer = inlineServer ?? mergedServers[id];
|
|
209
|
-
if (!knownServer) return c.json({
|
|
210
|
-
ok: false,
|
|
211
|
-
error: `Unknown MCP server: ${id}`
|
|
212
|
-
}, 404);
|
|
213
|
-
try {
|
|
214
|
-
const oauth = await getMcpOAuthManager(knownServer).status(id, knownServer);
|
|
215
|
-
if (oauth.configured && knownServer.xopcAutoAuth !== true && oauth.status !== "connected") return c.json({
|
|
216
|
-
ok: false,
|
|
217
|
-
code: "MCP_AUTHORIZATION_REQUIRED",
|
|
218
|
-
serverId: id,
|
|
219
|
-
error: oauth.session?.error ?? "MCP server authorization is required"
|
|
220
|
-
}, 409);
|
|
221
|
-
const capabilities = await listBundleMcpServerCapabilitiesForGateway({
|
|
222
|
-
workspaceDir,
|
|
223
|
-
cfg: inlineServer ? {
|
|
224
|
-
...cfg,
|
|
225
|
-
mcp: {
|
|
226
|
-
...cfg.mcp,
|
|
227
|
-
servers: { [id]: canonicalizeConfiguredMcpServer(inlineServer) }
|
|
228
|
-
}
|
|
229
|
-
} : cfg,
|
|
230
|
-
serverId: id
|
|
231
|
-
});
|
|
232
|
-
if (capabilities.error) return c.json({
|
|
233
|
-
ok: false,
|
|
234
|
-
code: capabilities.error.code,
|
|
235
|
-
serverId: id,
|
|
236
|
-
error: capabilities.error.message
|
|
237
|
-
}, capabilities.error.code === "MCP_AUTHORIZATION_REQUIRED" ? 409 : 502);
|
|
238
|
-
return c.json({
|
|
239
|
-
ok: true,
|
|
240
|
-
payload: {
|
|
241
|
-
...capabilities,
|
|
242
|
-
serverId: id
|
|
243
|
-
}
|
|
244
|
-
});
|
|
245
|
-
} catch (err) {
|
|
246
|
-
return c.json({
|
|
247
|
-
ok: false,
|
|
248
|
-
error: err instanceof Error ? err.message : String(err)
|
|
249
|
-
}, 500);
|
|
250
|
-
}
|
|
251
|
-
});
|
|
252
26
|
}
|
|
253
27
|
//#endregion
|
|
254
28
|
export { registerMcpRoutes };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { NoteDeleteOutputSchema, NoteGetOutputSchema, ProductReadContracts } from "../../../../packages/gateway-contract/src/capabilities.js";
|
|
2
2
|
import { init_src } from "../../../../packages/gateway-contract/src/index.js";
|
|
3
|
-
import { init_session_key, resolveConversationId } from "../../../routing/session-key.js";
|
|
4
|
-
import { agentExists, getDefaultAgentId, init_resolve_route } from "../../../routing/resolve-route.js";
|
|
5
3
|
import { CapabilityError } from "../../../capabilities/runtime/errors.js";
|
|
6
4
|
import "../../../capabilities/runtime/dispatcher.js";
|
|
5
|
+
import { init_session_key, resolveConversationId } from "../../../routing/session-key.js";
|
|
6
|
+
import { agentExists, getDefaultAgentId, init_resolve_route } from "../../../routing/resolve-route.js";
|
|
7
7
|
import { resolveGatewayEffectiveHost } from "../../../config/gateway-bind.js";
|
|
8
8
|
import { getShareStore } from "../../../share/share-store.js";
|
|
9
9
|
import { resolveShareUrl } from "../../../share/share-url.js";
|
|
@@ -7,12 +7,12 @@ import { loadTranscriptRowsForSession } from "../../../storage/sqlite/transcript
|
|
|
7
7
|
import { init_sqlite } from "../../../storage/sqlite/index.js";
|
|
8
8
|
import { ActivityService } from "../../../activity/service.js";
|
|
9
9
|
import "../../../activity/index.js";
|
|
10
|
+
import { CapabilityError } from "../../../capabilities/runtime/errors.js";
|
|
11
|
+
import "../../../capabilities/runtime/dispatcher.js";
|
|
10
12
|
import { resolveEffectiveAgentProfile } from "../../../config/agent-profile.js";
|
|
11
13
|
import { listKnowledgeItems, writeKnowledgeItem } from "../../../knowledge-memory/repository.js";
|
|
12
14
|
import "../../../knowledge-memory/index.js";
|
|
13
15
|
import { TaskReadModelProjector } from "../../../tasks/task-read-model-projector.js";
|
|
14
|
-
import { CapabilityError } from "../../../capabilities/runtime/errors.js";
|
|
15
|
-
import "../../../capabilities/runtime/dispatcher.js";
|
|
16
16
|
import { ProjectWorkspaceConflictError, ProjectWorkspaceMissingError } from "../../../projects/workspace-project.js";
|
|
17
17
|
import { inferProjectExecutionMode, inferProjectKind } from "../../../projects/project-kind.js";
|
|
18
18
|
import { ProjectDeletionBlockedError, ProjectWorkspaceInUseError } from "../../../projects/project-service.js";
|
|
@@ -10,6 +10,7 @@ import { parseSlashCommand } from "../../../chat-commands/command-parse.js";
|
|
|
10
10
|
import { commandRegistry } from "../../../chat-commands/registry.js";
|
|
11
11
|
import "../../../chat-commands/index.js";
|
|
12
12
|
import { isVoiceLikeAttachment } from "../../../channels/attachments/voice-stt-webchat.js";
|
|
13
|
+
import { deviceTurnSourceContext, endpointClaimBelongsToPrincipal } from "../../../endpoint-tools/turn-context.js";
|
|
13
14
|
import { SessionCommandError, getSessionInputReceipt, isConversationDeleted, retrySessionPreparation } from "../../../storage/sqlite/session-creation-repository.js";
|
|
14
15
|
import { getGatewayPrincipal } from "../../security/gateway-principal.js";
|
|
15
16
|
import { browserPageContextToAgentContext } from "../../../agent/source-context/browser-page.js";
|
|
@@ -55,6 +56,13 @@ async function handleSessionCommand(c, deps, materialize = false) {
|
|
|
55
56
|
message: "Endpoint connection is not active"
|
|
56
57
|
}
|
|
57
58
|
}, 401);
|
|
59
|
+
if (origin?.success && !endpointClaimBelongsToPrincipal(deps.service.endpointTools.registry, origin.data.endpointId, principal)) return c.json({
|
|
60
|
+
ok: false,
|
|
61
|
+
error: {
|
|
62
|
+
code: "FORBIDDEN",
|
|
63
|
+
message: "Endpoint does not belong to the authenticated device"
|
|
64
|
+
}
|
|
65
|
+
}, 403);
|
|
58
66
|
if (!origin && principal.kind !== "owner") return c.json({
|
|
59
67
|
ok: false,
|
|
60
68
|
error: {
|
|
@@ -105,7 +113,9 @@ async function handleSessionCommand(c, deps, materialize = false) {
|
|
|
105
113
|
try {
|
|
106
114
|
const payload = await receiveSessionCommand(deps.service, id.data, principal.principalId, command, async () => {
|
|
107
115
|
if (!("input" in command)) return [];
|
|
108
|
-
const
|
|
116
|
+
const endpoint = command.origin.type === "endpoint" ? deps.service.endpointTools.registry.get(command.origin.endpointId) : void 0;
|
|
117
|
+
const contexts = endpoint ? [deviceTurnSourceContext(endpoint, command.input.endpointContext)] : [];
|
|
118
|
+
contexts.push(...(command.input.browserContexts ?? []).map(browserPageContextToAgentContext));
|
|
109
119
|
if (command.input.appContext) contexts.push(await deps.service.prepareSessionAppContext(command.input.appContext, principal, id.data, command.clientMessageId));
|
|
110
120
|
return contexts;
|
|
111
121
|
});
|
|
@@ -74,7 +74,7 @@ export declare function submitSessionInput(c: Context, deps: AuthenticatedRouteD
|
|
|
74
74
|
}[];
|
|
75
75
|
contextSnapshots?: {
|
|
76
76
|
refId?: string;
|
|
77
|
-
kind: import("../../../agent/source-context/types.js").SessionSourceBinding["kind"] | "task" | "file" | "session" | "
|
|
77
|
+
kind: import("../../../agent/source-context/types.js").SessionSourceBinding["kind"] | "task" | "file" | "session" | "browser_tab" | "browser_page" | "app_context" | "user_assertion" | "device_context";
|
|
78
78
|
sourceId: string;
|
|
79
79
|
version: string;
|
|
80
80
|
title: string;
|
|
@@ -159,6 +159,12 @@ export declare function replaceLatestSessionTurn(c: Context, deps: Authenticated
|
|
|
159
159
|
code: string;
|
|
160
160
|
message: string;
|
|
161
161
|
};
|
|
162
|
+
}, 403, "json">) | (Response & import("hono").TypedResponse<{
|
|
163
|
+
ok: false;
|
|
164
|
+
error: {
|
|
165
|
+
code: string;
|
|
166
|
+
message: string;
|
|
167
|
+
};
|
|
162
168
|
}, 409, "json">) | (Response & import("hono").TypedResponse<{
|
|
163
169
|
ok: false;
|
|
164
170
|
error: {
|
|
@@ -219,7 +225,7 @@ export declare function replaceLatestSessionTurn(c: Context, deps: Authenticated
|
|
|
219
225
|
}[];
|
|
220
226
|
contextSnapshots?: {
|
|
221
227
|
refId?: string;
|
|
222
|
-
kind: import("../../../agent/source-context/types.js").SessionSourceBinding["kind"] | "task" | "file" | "session" | "
|
|
228
|
+
kind: import("../../../agent/source-context/types.js").SessionSourceBinding["kind"] | "task" | "file" | "session" | "browser_tab" | "browser_page" | "app_context" | "user_assertion" | "device_context";
|
|
223
229
|
sourceId: string;
|
|
224
230
|
version: string;
|
|
225
231
|
title: string;
|