@xopcai/xopc 0.0.231 → 0.0.233
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 +1 -0
- package/README.zh-CN.md +1 -0
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/feishu/src/schema/config-schema.d.ts +3 -3
- package/dist/extensions/telegram/src/config-schema.d.ts +4 -4
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/extensions/weixin/src/config-schema.d.ts +3 -3
- package/dist/gateway/static/root/assets/{activity-store-M0nAY5XB.js → activity-store-DQ5L3PTi.js} +1 -1
- package/dist/gateway/static/root/assets/agent-avatar-dicebear-Bps8fvBp.js +1 -0
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-JrK80PvP.js +1 -0
- package/dist/gateway/static/root/assets/agents-CJYEnz94.js +1 -0
- package/dist/gateway/static/root/assets/api-DE6tZKG0.js +1 -0
- package/dist/gateway/static/root/assets/{app-management-settings-panel-DP7YVRPn.js → app-management-settings-panel-BryzDVod.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-CVQ5n7y6.js → appearance-settings-BoweLBDm.js} +1 -1
- package/dist/gateway/static/root/assets/apps-page-Bt8_sWtU.js +1 -0
- package/dist/gateway/static/root/assets/{archive-plugin-7_DXaMTP.js → archive-plugin-DyujzZNu.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-mmr_mHRr.js → attachment-load-DmXGUWve.js} +1 -1
- package/dist/gateway/static/root/assets/attachment-preview-renderer-BDTD8YUe.js +12 -0
- package/dist/gateway/static/root/assets/{automations-page-DfY-T6Ga.js → automations-page-DrTVSK7o.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-86UTesz3.js +6 -0
- package/dist/gateway/static/root/assets/{binary-plugins-CO9QMEh2.js → binary-plugins-mFyeC74W.js} +2 -2
- package/dist/gateway/static/root/assets/{block-editor-CE14CVOy.js → block-editor-D5yMFrgH.js} +4 -4
- package/dist/gateway/static/root/assets/browser-settings-page-DfMU7yXv.js +8 -0
- package/dist/gateway/static/root/assets/browser-workflow-inputs-B6rLBtua.js +1 -0
- package/dist/gateway/static/root/assets/{browser-workflows-page-1wgXyoSO.js → browser-workflows-page-C74sg50f.js} +2 -2
- package/dist/gateway/static/root/assets/capabilities-settings-panel-lsHRuBlX.js +7 -0
- package/dist/gateway/static/root/assets/channels-settings-CxR_clkO.js +1 -0
- package/dist/gateway/static/root/assets/{channel-recipient-api-C5ABr73b.js → channels-status-swr-DowVNjNw.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-terminal-dock-CdRW6Euc.js → chat-terminal-dock-BO6_BgjE.js} +2 -2
- package/dist/gateway/static/root/assets/{code-editor-dFzqyDXS.js → code-editor-D4_k-6QN.js} +1 -1
- package/dist/gateway/static/root/assets/connectors-page-CpNLyKB4.js +2 -0
- package/dist/gateway/static/root/assets/cron-expression-CYMXfk4M.js +2 -0
- package/dist/gateway/static/root/assets/date-picker-DIM_OkQP.js +1 -0
- package/dist/gateway/static/root/assets/dependency-picker-Cp8I6rsL.js +1 -0
- package/dist/gateway/static/root/assets/{desktop-pet-settings-MmOR4A3u.js → desktop-pet-settings-NjPiz3M_.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-CMO-J3cG.js → desktop-pet-wzSzZ6S8.js} +1 -1
- package/dist/gateway/static/root/assets/dist-DqPZM2MH2.js +1 -0
- package/dist/gateway/static/root/assets/{extension-debug-page-DdH0dG2_.js → extension-debug-page-CoMl13ET.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-Clg-KktN.js → extension-page-CXc1Lc8x.js} +1 -1
- package/dist/gateway/static/root/assets/extension-settings-page-CfEWpgjl.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-config-api-DEHnF4Wm.js → gateway-config-api-yH4KAEkK.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-config-swr-YyZJKvFf.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-settings-DKkEXXj9.js → gateway-settings-BmjJIiKh.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-startup-retry-B_zrtccP.js → gateway-startup-retry-Dnrl91pU.js} +1 -1
- package/dist/gateway/static/root/assets/heartbeat-settings-DGq9q4b6.js +1 -0
- package/dist/gateway/static/root/assets/home-page-Dj4B1wb3.js +1 -0
- package/dist/gateway/static/root/assets/html-workspace-editor-C3DKAkMc.js +1 -0
- package/dist/gateway/static/root/assets/{image-generation-api-YKP2me5Z.js → image-generation-api-BNzAAw4Y.js} +1 -1
- package/dist/gateway/static/root/assets/index-BGf-TiZj.js +70 -0
- package/dist/gateway/static/root/assets/index-BTUuTnc9.css +2 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-BvpEeHnm.js → keyboard-shortcuts-settings-CfNV1ysF.js} +1 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-IJg75WaN.js +2 -0
- package/dist/gateway/static/root/assets/{local-apps-page-Bzvn99eH.js → local-apps-page-MPd4Fl_l.js} +1 -1
- package/dist/gateway/static/root/assets/locale-store-D_dq_0LV.js +1 -0
- package/dist/gateway/static/root/assets/logs-page-NsfoazgK.js +2 -0
- package/dist/gateway/static/root/assets/management-settings-DeIjN4e0.js +1 -0
- package/dist/gateway/static/root/assets/markdown-editor-nDLmA_LF.js +2 -0
- package/dist/gateway/static/root/assets/markdown-split-BUAVv6Gu.js +1 -0
- package/dist/gateway/static/root/assets/markdown-view-CPkBOY3h.js +201 -0
- package/dist/gateway/static/root/assets/{media-plugins-D8I7OGnT.js → media-plugins-DFsVnOY-.js} +1 -1
- package/dist/gateway/static/root/assets/messages-D4qOHT4D.js +3 -0
- package/dist/gateway/static/root/assets/mobile-device-api-D9JevyCE.js +1 -0
- package/dist/gateway/static/root/assets/models-hub-cache-C5y2gzMU.js +1 -0
- package/dist/gateway/static/root/assets/{notes-api-EpgG-OQc.js → notes-api-BWSfTP1w.js} +1 -1
- package/dist/gateway/static/root/assets/{notes-page-CCvjGMhN.js → notes-page-CV8UJj7g.js} +1 -1
- package/dist/gateway/static/root/assets/notes-workbench-DrjMVgEI.js +4 -0
- package/dist/gateway/static/root/assets/{oauth-api-BwNLwbI8.js → oauth-api-DnanEBsf.js} +1 -1
- package/dist/gateway/static/root/assets/popover-select-3E24E65N.js +1 -0
- package/dist/gateway/static/root/assets/{product-open-page-MmMswmOU.js → product-open-page-zNg1KOy2.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-tfcGYL-O.js +1 -0
- package/dist/gateway/static/root/assets/projects-page-BkjnXLdJ.js +1 -0
- package/dist/gateway/static/root/assets/{registry-api-BFZrVYfy.js → registry-api-BeVzfRvs.js} +1 -1
- package/dist/gateway/static/root/assets/remote-access-hub-BXn-3n2d.js +1 -0
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-Dx6o7sLu.js → runtime-tools-settings-panel-BxoioSvT.js} +2 -2
- package/dist/gateway/static/root/assets/{schema-form-Cdd9c4vt.js → schema-form-vzbmscrE.js} +1 -1
- package/dist/gateway/static/root/assets/sessions-page-MLNjrOkw.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-ByNLBY2q.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-D0YxMnhm.js → settings-form-section-x9k7MWD3.js} +1 -1
- package/dist/gateway/static/root/assets/settings-loading-skeleton-BLFOD9h9.js +1 -0
- package/dist/gateway/static/root/assets/settings-page-CwgTooar.js +1 -0
- package/dist/gateway/static/root/assets/settings-shell-layer-context-DCp6ykjQ.js +1 -0
- package/dist/gateway/static/root/assets/setup-status-panel-bnueBZg8.js +1 -0
- package/dist/gateway/static/root/assets/{share-preview-page-DiqBn-oE.js → share-preview-page-COTrPAd-.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-D-v_psqL.js +1 -0
- package/dist/gateway/static/root/assets/skill-reload-api-DJICr4wh.js +1 -0
- package/dist/gateway/static/root/assets/{skills-page-CZwhWiRl.js → skills-page-D9wM6_Jn.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page.utils-kBGr8opZ.js → skills-page.utils-PtlQLM5a.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-CPBs6lWi.js → system-settings-panel-BR74mNEK.js} +1 -1
- package/dist/gateway/static/root/assets/task-detail-page-B-rmeE8t.js +1 -0
- package/dist/gateway/static/root/assets/{theme-store-Qgvo0Ga7.js → theme-store-Bud54q9e.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-C4YcEiP9.js → use-autosave-DH47MH7s.js} +1 -1
- package/dist/gateway/static/root/assets/user-context-page-B6eyxxOT.js +1 -0
- package/dist/gateway/static/root/assets/{vendor-codemirror-DRr7hFaD.js → vendor-codemirror--gTq3YAI.js} +16 -16
- package/dist/gateway/static/root/assets/voice-api-key-field-B59GaqRa.js +1 -0
- package/dist/gateway/static/root/assets/voice-config-api-C0ahrZ0e.js +1 -0
- package/dist/gateway/static/root/assets/{work-discovery-overlay-CKIdPEen.js → work-discovery-overlay-DTn4RCcx.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-BK44Vm5W.js → workflow-run-setup-panel-yDFoEX06.js} +2 -2
- package/dist/gateway/static/root/assets/workflows-page-BOwSbfWm.js +5 -0
- package/dist/gateway/static/root/index.html +16 -16
- package/dist/package.js +1 -1
- package/dist/packages/endpoint-tools-protocol/src/index.js +162 -2
- package/dist/packages/gateway-contract/src/product-delivery.js +6 -2
- package/dist/packages/gateway-contract/src/turn-outcome.js +77 -1
- package/dist/src/agent/agent-manager.d.ts +1 -2
- package/dist/src/agent/agent-manager.js +29 -44
- package/dist/src/agent/background-review/run-background-review.js +10 -15
- package/dist/src/agent/capabilities/definitions.d.ts +1 -1
- package/dist/src/agent/capabilities/definitions.js +2 -1
- package/dist/src/agent/embedded/run-for-session.js +1 -1
- package/dist/src/agent/external-tools/endpoint-provider.js +5 -1
- package/dist/src/agent/external-tools/mcp-provider.js +3 -13
- package/dist/src/agent/image/generation/runtime.js +1 -1
- package/dist/src/agent/image/tool-model-config.js +13 -14
- package/dist/src/agent/mcp/bundle-mcp-policy.d.ts +0 -9
- package/dist/src/agent/mcp/bundle-mcp-policy.js +1 -13
- package/dist/src/agent/mcp/bundle-mcp-runtime.js +1 -1
- package/dist/src/agent/mcp/index.js +2 -2
- package/dist/src/agent/media-generation/runtime-shared.d.ts +1 -1
- package/dist/src/agent/media-generation/runtime-shared.js +1 -1
- package/dist/src/agent/memory/create-memory-manager.js +1 -1
- package/dist/src/agent/memory/manager.d.ts +1 -1
- package/dist/src/{agent-runtime/memory-runtime.d.ts → agent/memory/runtime.d.ts} +1 -1
- package/dist/src/{agent-runtime/memory-runtime.js → agent/memory/runtime.js} +2 -3
- package/dist/src/agent/orchestration/agent-orchestrator.d.ts +0 -3
- package/dist/src/agent/orchestration/agent-orchestrator.js +1 -3
- package/dist/src/agent/orchestration/run-agent-turn-with-timeout.js +2 -2
- package/dist/src/agent/prompt/sections/tooling.js +5 -0
- package/dist/src/agent/service.js +0 -1
- package/dist/src/agent/starter-agents.js +1 -8
- package/dist/src/agent/tools/create-share-tool.js +2 -1
- package/dist/src/agent/tools/exec-command.js +2 -1
- package/dist/src/agent/tools/executor.d.ts +1 -1
- package/dist/src/agent/tools/factory.js +2 -0
- package/dist/src/agent/tools/index.d.ts +1 -0
- package/dist/src/agent/tools/index.js +2 -1
- package/dist/src/agent/tools/publish-artifacts.d.ts +2 -0
- package/dist/src/agent/tools/publish-artifacts.js +82 -0
- package/dist/src/agent/tools/send-media.js +2 -1
- package/dist/src/agent/tools/workflow-tool.js +1 -5
- package/dist/src/agent-config/index.d.ts +2 -0
- package/dist/src/agent-config/index.js +11 -0
- package/dist/src/agent-config/resolver.d.ts +11 -0
- package/dist/src/agent-config/resolver.js +113 -0
- package/dist/src/agent-config/schema.d.ts +491 -0
- package/dist/src/agent-config/schema.js +172 -0
- package/dist/src/chat-commands/builtins/config.js +2 -2
- package/dist/src/chat-commands/builtins/review.js +1 -1
- package/dist/src/chat-commands/config-paths.js +1 -1
- 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/agents.js +2 -1
- package/dist/src/cli/commands/auth.js +1 -1
- package/dist/src/cli/commands/config.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 +12 -4
- package/dist/src/cli/commands/image.js +3 -4
- package/dist/src/cli/commands/models.js +9 -3
- package/dist/src/cli/commands/onboard/model.js +13 -12
- package/dist/src/cli/commands/onboard.js +1 -1
- package/dist/src/cli/commands/providers.js +1 -1
- package/dist/src/cli/commands/support.d.ts +1 -0
- package/dist/src/cli/commands/support.js +51 -0
- package/dist/src/cli/commands/tunnel.js +3 -18
- package/dist/src/cli/utils/init-workspace-core.d.ts +1 -1
- package/dist/src/cli/utils/init-workspace-core.js +1 -1
- package/dist/src/commands/agents.config.d.ts +1 -3
- package/dist/src/commands/agents.config.js +9 -26
- package/dist/src/config/agent-model-intents.d.ts +10 -0
- package/dist/src/config/agent-model-intents.js +39 -0
- package/dist/src/config/agent-profile.d.ts +7 -9
- package/dist/src/config/agent-profile.js +30 -28
- package/dist/src/config/default-model.d.ts +1 -11
- package/dist/src/config/default-model.js +3 -11
- package/dist/src/config/index.js +3 -3
- package/dist/src/config/integration.d.ts +1 -1
- package/dist/src/config/reload.js +1 -1
- package/dist/src/config/rules.js +3 -3
- package/dist/src/config/schema.d.ts +187 -452
- package/dist/src/config/schema.js +53 -131
- package/dist/src/endpoint-tools/binding-service.d.ts +22 -0
- package/dist/src/endpoint-tools/binding-service.js +45 -0
- package/dist/src/endpoint-tools/index.d.ts +1 -0
- package/dist/src/endpoint-tools/index.js +2 -1
- package/dist/src/endpoint-tools/invocation-service.d.ts +1 -0
- package/dist/src/endpoint-tools/invocation-service.js +8 -0
- package/dist/src/endpoint-tools/policy.d.ts +4 -1
- package/dist/src/endpoint-tools/policy.js +68 -5
- package/dist/src/endpoint-tools/registry.js +1 -1
- package/dist/src/endpoint-tools/runtime.d.ts +2 -0
- package/dist/src/endpoint-tools/runtime.js +8 -0
- package/dist/src/extensions/activation-context.js +7 -11
- package/dist/src/files/file-service.js +14 -5
- package/dist/src/gateway/agent-builtin-tools.d.ts +250 -6
- package/dist/src/gateway/agent-builtin-tools.js +284 -46
- package/dist/src/gateway/agents-admin.d.ts +20 -62
- package/dist/src/gateway/agents-admin.js +36 -228
- package/dist/src/gateway/chat-stream/turn-outcome-collector.js +41 -6
- package/dist/src/gateway/device-routes.d.ts +3 -0
- package/dist/src/gateway/device-routes.js +47 -0
- package/dist/src/gateway/global-defaults-admin.d.ts +6 -20
- package/dist/src/gateway/global-defaults-admin.js +20 -120
- package/dist/src/gateway/heartbeat/service.js +1 -1
- package/dist/src/gateway/hono/app.js +4 -2
- package/dist/src/gateway/hono/lib/config-payload.d.ts +54 -137
- package/dist/src/gateway/hono/lib/config-payload.js +2 -4
- package/dist/src/gateway/hono/middleware/auth.js +36 -3
- package/dist/src/gateway/hono/middleware/scopes.d.ts +2 -12
- package/dist/src/gateway/hono/middleware/scopes.js +9 -18
- package/dist/src/gateway/hono/routes/agents.js +64 -100
- package/dist/src/gateway/hono/routes/connectors.js +1 -1
- package/dist/src/gateway/hono/routes/device-push.d.ts +2 -0
- package/dist/src/gateway/hono/routes/{mobile.js → device-push.js} +40 -18
- package/dist/src/gateway/hono/routes/devices.d.ts +4 -0
- package/dist/src/gateway/hono/routes/devices.js +214 -0
- package/dist/src/gateway/hono/routes/endpoint-tools.js +68 -1
- package/dist/src/gateway/hono/routes/files.js +12 -1
- package/dist/src/gateway/hono/routes/global-defaults.js +5 -9
- package/dist/src/gateway/hono/routes/index.js +4 -2
- package/dist/src/gateway/hono/routes/lazy-bundles.js +12 -20
- package/dist/src/gateway/hono/routes/media.js +46 -2
- package/dist/src/gateway/hono/routes/models.js +2 -2
- package/dist/src/gateway/hono/routes/realtime.js +8 -1
- package/dist/src/gateway/hono/routes/status.js +9 -16
- package/dist/src/gateway/hono/routes/support.d.ts +3 -0
- package/dist/src/gateway/hono/routes/support.js +28 -0
- package/dist/src/gateway/hono/routes/tunnel.d.ts +0 -2
- package/dist/src/gateway/hono/routes/tunnel.js +10 -199
- package/dist/src/gateway/hono/routes/you.js +24 -0
- package/dist/src/gateway/image-generation-setup.d.ts +2 -2
- package/dist/src/gateway/image-generation-setup.js +8 -7
- package/dist/src/gateway/public-url.d.ts +1 -1
- package/dist/src/gateway/security/gateway-principal.d.ts +11 -0
- package/dist/src/gateway/security/gateway-principal.js +12 -0
- package/dist/src/gateway/security/gateway-scopes.d.ts +7 -0
- package/dist/src/gateway/security/gateway-scopes.js +66 -0
- package/dist/src/gateway/security/index.d.ts +2 -1
- package/dist/src/gateway/security/index.js +3 -2
- package/dist/src/gateway/service.js +7 -7
- package/dist/src/gateway/xopc-cloud-capability-setup.js +19 -21
- package/dist/src/heartbeat/index.js +1 -1
- package/dist/src/media/store.js +9 -0
- package/dist/src/migrations/index.d.ts +0 -1
- package/dist/src/migrations/index.js +1 -2
- package/dist/src/migrations/runner.js +1 -2
- package/dist/src/notifications/device-store.d.ts +1 -1
- package/dist/src/notifications/device-store.js +11 -11
- package/dist/src/notifications/store.js +3 -3
- package/dist/src/providers/index.js +1 -1
- package/dist/src/providers/model-reference-auditor.js +14 -9
- package/dist/src/realtime/runtime.d.ts +2 -0
- package/dist/src/realtime/runtime.js +27 -3
- package/dist/src/realtime/tickets.d.ts +6 -1
- package/dist/src/realtime/tickets.js +2 -1
- package/dist/src/remote-access/exposure-manager.js +3 -3
- package/dist/src/share/share-url.js +2 -2
- package/dist/src/storage/sqlite/device-access-repository.d.ts +54 -0
- package/dist/src/storage/sqlite/device-access-repository.js +194 -0
- package/dist/src/storage/sqlite/device-pairing-repository.d.ts +22 -0
- package/dist/src/storage/sqlite/device-pairing-repository.js +86 -0
- package/dist/src/storage/sqlite/endpoint-session-binding-repository.d.ts +8 -0
- package/dist/src/storage/sqlite/endpoint-session-binding-repository.js +32 -0
- package/dist/src/storage/sqlite/gateway-identity-repository.d.ts +10 -0
- package/dist/src/storage/sqlite/gateway-identity-repository.js +50 -0
- package/dist/src/storage/sqlite/index.d.ts +4 -0
- package/dist/src/storage/sqlite/index.js +5 -1
- package/dist/src/storage/sqlite/migrations/138_device_access.sql +96 -0
- package/dist/src/storage/sqlite/migrations/139_turn_outcome_artifact_backfill.sql +231 -0
- package/dist/src/storage/sqlite/migrations/140_endpoint_session_bindings.sql +8 -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/migrations/runner.ts +1 -1
- package/dist/src/storage/sqlite/schema.js +1 -1
- package/dist/src/support/build-support-investigation-prompt.d.ts +2 -0
- package/dist/src/support/build-support-investigation-prompt.js +29 -0
- package/dist/src/support/collect-support-report.d.ts +16 -0
- package/dist/src/support/collect-support-report.js +216 -0
- package/dist/src/support/redact-support-report.d.ts +16 -0
- package/dist/src/support/redact-support-report.js +89 -0
- package/dist/src/support/types.d.ts +76 -0
- package/dist/src/support/types.js +18 -0
- package/dist/src/tunnel/consent.d.ts +1 -1
- package/dist/src/tunnel/consent.js +1 -1
- package/dist/src/tunnel/gateway-lifecycle.js +1 -1
- package/dist/src/tunnel/index.d.ts +1 -4
- package/dist/src/tunnel/index.js +3 -5
- package/dist/src/tunnel/tunnel-audit.d.ts +1 -1
- package/dist/src/tunnel/tunnel-config.js +1 -1
- package/dist/src/tunnel/tunnel-service.d.ts +2 -3
- package/dist/src/tunnel/tunnel-service.js +1 -20
- package/dist/src/tunnel/tunnel-types.d.ts +0 -6
- package/dist/src/user-context/user-avatar.d.ts +17 -0
- package/dist/src/user-context/user-avatar.js +116 -0
- package/dist/src/workflows/draft/workflow-draft-service.js +2 -2
- package/dist/src/workflows/service/workflow-run-service.js +3 -3
- package/package.json +4 -4
- package/dist/gateway/static/root/assets/agent-avatar-dicebear-CBqUnlvL.js +0 -1
- package/dist/gateway/static/root/assets/agents-7YO6znTT.js +0 -68
- package/dist/gateway/static/root/assets/api-BywYxpaS.js +0 -1
- package/dist/gateway/static/root/assets/apps-page-DSCia0DT.js +0 -1
- package/dist/gateway/static/root/assets/attachment-preview-renderer-Cmo-5BP5.js +0 -11
- package/dist/gateway/static/root/assets/automations-workspace-BpvD54D6.js +0 -6
- package/dist/gateway/static/root/assets/browser-settings-page-CeESA4Oj.js +0 -8
- package/dist/gateway/static/root/assets/browser-workflow-inputs-8NC2qDRF.js +0 -1
- package/dist/gateway/static/root/assets/capabilities-settings-panel-B_OXTojB.js +0 -7
- package/dist/gateway/static/root/assets/capability-presets-api-o0y9WgAI.js +0 -1
- package/dist/gateway/static/root/assets/capability-presets-settings-panel-D5nZecxV.js +0 -3
- package/dist/gateway/static/root/assets/channels-settings-BzmnWx6X.js +0 -1
- package/dist/gateway/static/root/assets/channels-status-swr-38FsOnR0.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-DX6OkwFQ.js +0 -2
- package/dist/gateway/static/root/assets/cron-expression-DYSMZsms.js +0 -2
- package/dist/gateway/static/root/assets/date-picker-DGCfX4tK.js +0 -1
- package/dist/gateway/static/root/assets/dependency-picker-DHDa4ht1.js +0 -1
- package/dist/gateway/static/root/assets/directory-picker-path-field-B9qoxDcn.js +0 -1
- package/dist/gateway/static/root/assets/dist-J_ySZvz0.js +0 -1
- package/dist/gateway/static/root/assets/extension-settings-page-eP3fJ2M6.js +0 -1
- package/dist/gateway/static/root/assets/file-code-corner-byQA1VfD.js +0 -1
- package/dist/gateway/static/root/assets/gateway-config-swr-BWGjnmDl.js +0 -1
- package/dist/gateway/static/root/assets/heartbeat-settings-DlBPNubY.js +0 -1
- package/dist/gateway/static/root/assets/home-page-BnOrLRfs.js +0 -1
- package/dist/gateway/static/root/assets/html-workspace-editor-bXK5tq64.js +0 -1
- package/dist/gateway/static/root/assets/index-0xQO5B_Q.js +0 -70
- package/dist/gateway/static/root/assets/index-CCyIdGuQ.css +0 -2
- package/dist/gateway/static/root/assets/local-app-workbench-page-Ch1rdUo8.js +0 -2
- package/dist/gateway/static/root/assets/locale-store-CXhjfe4q.js +0 -1
- package/dist/gateway/static/root/assets/logs-page-zxx2ExlY.js +0 -2
- package/dist/gateway/static/root/assets/management-settings-BQaeyOYm.js +0 -1
- package/dist/gateway/static/root/assets/markdown-editor-TWGaF7Xa.js +0 -2
- package/dist/gateway/static/root/assets/markdown-split-D9tmIiEm.js +0 -1
- package/dist/gateway/static/root/assets/markdown-view-RxNHwlNo.js +0 -201
- package/dist/gateway/static/root/assets/messages-BMdD0LWk.js +0 -3
- package/dist/gateway/static/root/assets/models-hub-cache-0RjEwafI.js +0 -1
- package/dist/gateway/static/root/assets/notes-workbench-9cgh77VH.js +0 -4
- package/dist/gateway/static/root/assets/popover-select-CccGri5Y.js +0 -1
- package/dist/gateway/static/root/assets/project-detail-page-hf6pmH4p.js +0 -1
- package/dist/gateway/static/root/assets/projects-page-By2U-Wdh.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-CUcpp7CQ.js +0 -1
- package/dist/gateway/static/root/assets/sessions-page-ByI82xS1.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-BCoI5IJ8.js +0 -1
- package/dist/gateway/static/root/assets/settings-loading-skeleton-y53gEKsF.js +0 -1
- package/dist/gateway/static/root/assets/settings-page-BoE_tToG.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-BQmyb5KC.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-Bf3VpZ-R.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-CXHlbuGS.js +0 -1
- package/dist/gateway/static/root/assets/task-detail-page-Bo0KSZ2v.js +0 -1
- package/dist/gateway/static/root/assets/typed-models-lib-q5-Vfqd8.js +0 -1
- package/dist/gateway/static/root/assets/user-context-page-Cnj7gMX2.js +0 -1
- package/dist/gateway/static/root/assets/voice-api-key-field-BML8zCwZ.js +0 -1
- package/dist/gateway/static/root/assets/workflows-page-CB98MTwG.js +0 -5
- package/dist/src/agent-manifest/index.d.ts +0 -5
- package/dist/src/agent-manifest/index.js +0 -10
- package/dist/src/agent-manifest/preset-chain.d.ts +0 -10
- package/dist/src/agent-manifest/preset-chain.js +0 -30
- package/dist/src/agent-manifest/prompt.d.ts +0 -2
- package/dist/src/agent-manifest/prompt.js +0 -49
- package/dist/src/agent-manifest/resolver.d.ts +0 -32
- package/dist/src/agent-manifest/resolver.js +0 -114
- package/dist/src/agent-manifest/schema.d.ts +0 -695
- package/dist/src/agent-manifest/schema.js +0 -226
- package/dist/src/agent-manifest/validator.d.ts +0 -25
- package/dist/src/agent-manifest/validator.js +0 -74
- package/dist/src/agent-runtime/boundary-guard.d.ts +0 -12
- package/dist/src/agent-runtime/boundary-guard.js +0 -21
- package/dist/src/agent-runtime/index.d.ts +0 -7
- package/dist/src/agent-runtime/index.js +0 -8
- package/dist/src/agent-runtime/model-router.d.ts +0 -11
- package/dist/src/agent-runtime/model-router.js +0 -14
- package/dist/src/agent-runtime/run-trace.d.ts +0 -27
- package/dist/src/agent-runtime/run-trace.js +0 -51
- package/dist/src/agent-runtime/runtime-profile.d.ts +0 -26
- package/dist/src/agent-runtime/runtime-profile.js +0 -42
- package/dist/src/agent-runtime/tool-registry.d.ts +0 -28
- package/dist/src/agent-runtime/tool-registry.js +0 -50
- package/dist/src/agent-runtime/workflow-runtime.d.ts +0 -31
- package/dist/src/agent-runtime/workflow-runtime.js +0 -32
- package/dist/src/config/agent-typed-models.d.ts +0 -13
- package/dist/src/config/agent-typed-models.js +0 -48
- package/dist/src/gateway/capability-presets-admin.d.ts +0 -88
- package/dist/src/gateway/capability-presets-admin.js +0 -303
- package/dist/src/gateway/hono/lib/agent-model.d.ts +0 -35
- package/dist/src/gateway/hono/lib/agent-model.js +0 -97
- package/dist/src/gateway/hono/routes/capability-presets.d.ts +0 -3
- package/dist/src/gateway/hono/routes/capability-presets.js +0 -187
- package/dist/src/gateway/hono/routes/mobile.d.ts +0 -3
- package/dist/src/gateway/security/operator-scopes.d.ts +0 -37
- package/dist/src/gateway/security/operator-scopes.js +0 -147
- package/dist/src/migrations/config/default-capability-preset.d.ts +0 -10
- package/dist/src/migrations/config/default-capability-preset.js +0 -133
- package/dist/src/tunnel/enable-lan-pairing.d.ts +0 -8
- package/dist/src/tunnel/enable-lan-pairing.js +0 -41
- package/dist/src/tunnel/pair-context.d.ts +0 -36
- package/dist/src/tunnel/pair-context.js +0 -77
- package/dist/src/tunnel/pair-url.d.ts +0 -43
- package/dist/src/tunnel/pair-url.js +0 -117
- package/dist/src/tunnel/pairing-rate-limit.d.ts +0 -12
- package/dist/src/tunnel/pairing-rate-limit.js +0 -28
- package/dist/src/tunnel/pairing.d.ts +0 -21
- package/dist/src/tunnel/pairing.js +0 -103
- package/dist/src/tunnel/tunnel-qr.d.ts +0 -9
- package/dist/src/tunnel/tunnel-qr.js +0 -29
|
@@ -18,6 +18,7 @@ const endpointResultKindSchema = z.enum([
|
|
|
18
18
|
"json",
|
|
19
19
|
"file"
|
|
20
20
|
]);
|
|
21
|
+
const endpointSensitivitySchema = z.enum(["public", "personal"]);
|
|
21
22
|
const identifierSchema = z.string().min(1).max(160);
|
|
22
23
|
const turnTokenSchema = z.string().min(32).max(160).regex(/^[A-Za-z0-9_-]+$/);
|
|
23
24
|
const turnOriginSchema = z.discriminatedUnion("type", [
|
|
@@ -49,6 +50,9 @@ const endpointToolDescriptorSchema = z.strictObject({
|
|
|
49
50
|
title: z.string().min(1).max(120),
|
|
50
51
|
description: z.string().min(1).max(2e3),
|
|
51
52
|
inputSchema: jsonObjectSchema,
|
|
53
|
+
outputSchema: jsonObjectSchema,
|
|
54
|
+
policyId: z.string().regex(/^[a-z][a-z0-9_.-]+$/).max(120),
|
|
55
|
+
sensitivity: endpointSensitivitySchema,
|
|
52
56
|
effect: endpointEffectSchema,
|
|
53
57
|
confirmation: endpointConfirmationSchema,
|
|
54
58
|
requiresForeground: z.boolean(),
|
|
@@ -66,6 +70,42 @@ const endpointPrincipalRegistrationSchema = z.strictObject({
|
|
|
66
70
|
platform: z.string().min(1).max(80),
|
|
67
71
|
publicKey: z.string().min(32).max(2048)
|
|
68
72
|
});
|
|
73
|
+
const endpointSessionBindingRequestSchema = z.strictObject({ endpointId: identifierSchema });
|
|
74
|
+
const backgroundCapabilitySchema = z.string().regex(/^[a-z][a-z0-9_]*(?:\.[a-z][a-z0-9_]*)+$/).max(120);
|
|
75
|
+
z.strictObject({
|
|
76
|
+
jobId: z.uuid(),
|
|
77
|
+
endpointId: identifierSchema,
|
|
78
|
+
capability: backgroundCapabilitySchema,
|
|
79
|
+
input: jsonObjectSchema,
|
|
80
|
+
idempotencyKey: identifierSchema,
|
|
81
|
+
consentGrantId: identifierSchema,
|
|
82
|
+
createdAt: timestampSchema,
|
|
83
|
+
expiresAt: timestampSchema
|
|
84
|
+
});
|
|
85
|
+
z.strictObject({
|
|
86
|
+
jobId: z.uuid(),
|
|
87
|
+
status: z.enum([
|
|
88
|
+
"queued",
|
|
89
|
+
"running",
|
|
90
|
+
"succeeded",
|
|
91
|
+
"failed",
|
|
92
|
+
"cancelled"
|
|
93
|
+
]),
|
|
94
|
+
updatedAt: timestampSchema,
|
|
95
|
+
output: jsonObjectSchema.optional(),
|
|
96
|
+
error: z.strictObject({
|
|
97
|
+
code: identifierSchema,
|
|
98
|
+
message: z.string().min(1).max(2e3)
|
|
99
|
+
}).optional()
|
|
100
|
+
});
|
|
101
|
+
z.strictObject({
|
|
102
|
+
eventId: z.uuid(),
|
|
103
|
+
endpointId: identifierSchema,
|
|
104
|
+
subscriptionId: identifierSchema,
|
|
105
|
+
eventType: backgroundCapabilitySchema,
|
|
106
|
+
data: jsonObjectSchema,
|
|
107
|
+
occurredAt: timestampSchema
|
|
108
|
+
});
|
|
69
109
|
const endpointHelloPayloadSchema = z.strictObject({
|
|
70
110
|
principalId: identifierSchema,
|
|
71
111
|
endpointId: identifierSchema,
|
|
@@ -135,7 +175,7 @@ const endpointToolErrorCodeSchema = z.enum([
|
|
|
135
175
|
"PROTOCOL_ERROR"
|
|
136
176
|
]);
|
|
137
177
|
const envelope = (type, payload) => z.strictObject({
|
|
138
|
-
protocolVersion: z.literal(
|
|
178
|
+
protocolVersion: z.literal(2),
|
|
139
179
|
messageId: messageIdSchema,
|
|
140
180
|
type: z.literal(type),
|
|
141
181
|
sentAt: timestampSchema,
|
|
@@ -162,6 +202,126 @@ const clientEndpointMessageSchema = z.discriminatedUnion("type", [
|
|
|
162
202
|
envelope("tool.cancelled", invocationPayloadSchema)
|
|
163
203
|
]);
|
|
164
204
|
const serverEndpointMessageSchema = z.discriminatedUnion("type", [envelope("tool.invoke", toolInvokePayloadSchema), envelope("tool.cancel", toolCancelPayloadSchema)]);
|
|
205
|
+
const ENDPOINT_TEXT_OUTPUT_SCHEMA = {
|
|
206
|
+
type: "array",
|
|
207
|
+
minItems: 1,
|
|
208
|
+
maxItems: 20,
|
|
209
|
+
items: {
|
|
210
|
+
type: "object",
|
|
211
|
+
additionalProperties: false,
|
|
212
|
+
required: ["type", "text"],
|
|
213
|
+
properties: {
|
|
214
|
+
type: { const: "text" },
|
|
215
|
+
text: {
|
|
216
|
+
type: "string",
|
|
217
|
+
maxLength: 256 * 1024
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
};
|
|
222
|
+
const ENDPOINT_FILE_OUTPUT_SCHEMA = {
|
|
223
|
+
type: "array",
|
|
224
|
+
minItems: 1,
|
|
225
|
+
maxItems: 20,
|
|
226
|
+
items: {
|
|
227
|
+
type: "object",
|
|
228
|
+
additionalProperties: false,
|
|
229
|
+
required: [
|
|
230
|
+
"type",
|
|
231
|
+
"fileId",
|
|
232
|
+
"name",
|
|
233
|
+
"mimeType",
|
|
234
|
+
"size",
|
|
235
|
+
"sha256"
|
|
236
|
+
],
|
|
237
|
+
properties: {
|
|
238
|
+
type: { const: "file" },
|
|
239
|
+
fileId: {
|
|
240
|
+
type: "string",
|
|
241
|
+
minLength: 1,
|
|
242
|
+
maxLength: 160
|
|
243
|
+
},
|
|
244
|
+
name: {
|
|
245
|
+
type: "string",
|
|
246
|
+
minLength: 1,
|
|
247
|
+
maxLength: 255
|
|
248
|
+
},
|
|
249
|
+
mimeType: {
|
|
250
|
+
type: "string",
|
|
251
|
+
minLength: 1,
|
|
252
|
+
maxLength: 255
|
|
253
|
+
},
|
|
254
|
+
size: {
|
|
255
|
+
type: "integer",
|
|
256
|
+
minimum: 0
|
|
257
|
+
},
|
|
258
|
+
sha256: {
|
|
259
|
+
type: "string",
|
|
260
|
+
pattern: "^[a-f0-9]{64}$"
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
};
|
|
265
|
+
const ENDPOINT_CONTACT_RECORD_SCHEMA = {
|
|
266
|
+
type: "object",
|
|
267
|
+
additionalProperties: false,
|
|
268
|
+
required: [
|
|
269
|
+
"id",
|
|
270
|
+
"name",
|
|
271
|
+
"phones",
|
|
272
|
+
"emails"
|
|
273
|
+
],
|
|
274
|
+
properties: {
|
|
275
|
+
id: {
|
|
276
|
+
type: "string",
|
|
277
|
+
minLength: 1,
|
|
278
|
+
maxLength: 512
|
|
279
|
+
},
|
|
280
|
+
name: {
|
|
281
|
+
type: "string",
|
|
282
|
+
minLength: 1,
|
|
283
|
+
maxLength: 500
|
|
284
|
+
},
|
|
285
|
+
phones: {
|
|
286
|
+
type: "array",
|
|
287
|
+
maxItems: 20,
|
|
288
|
+
items: {
|
|
289
|
+
type: "string",
|
|
290
|
+
maxLength: 100
|
|
291
|
+
}
|
|
292
|
+
},
|
|
293
|
+
emails: {
|
|
294
|
+
type: "array",
|
|
295
|
+
maxItems: 20,
|
|
296
|
+
items: {
|
|
297
|
+
type: "string",
|
|
298
|
+
maxLength: 320
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
};
|
|
303
|
+
function contactOutputSchema(multiple) {
|
|
304
|
+
return {
|
|
305
|
+
type: "array",
|
|
306
|
+
minItems: 1,
|
|
307
|
+
maxItems: 1,
|
|
308
|
+
items: {
|
|
309
|
+
type: "object",
|
|
310
|
+
additionalProperties: false,
|
|
311
|
+
required: ["type", "value"],
|
|
312
|
+
properties: {
|
|
313
|
+
type: { const: "json" },
|
|
314
|
+
value: multiple ? {
|
|
315
|
+
type: "array",
|
|
316
|
+
maxItems: 20,
|
|
317
|
+
items: ENDPOINT_CONTACT_RECORD_SCHEMA
|
|
318
|
+
} : ENDPOINT_CONTACT_RECORD_SCHEMA
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
};
|
|
322
|
+
}
|
|
323
|
+
const ENDPOINT_CONTACT_OUTPUT_SCHEMA = contactOutputSchema(false);
|
|
324
|
+
const ENDPOINT_CONTACT_LIST_OUTPUT_SCHEMA = contactOutputSchema(true);
|
|
165
325
|
function canonicalJson(value) {
|
|
166
326
|
if (value === null) return "null";
|
|
167
327
|
if (typeof value === "string" || typeof value === "boolean") return JSON.stringify(value);
|
|
@@ -181,4 +341,4 @@ function endpointHelloSigningPayload(payload) {
|
|
|
181
341
|
return canonicalJson(unsigned);
|
|
182
342
|
}
|
|
183
343
|
//#endregion
|
|
184
|
-
export { ENDPOINT_INVOCATION_RECEIPT_TIMEOUT_MS, ENDPOINT_MAX_FILE_BYTES, canonicalJson, clientEndpointMessageSchema, endpointHelloPayloadSchema, endpointHelloSigningPayload, endpointPrincipalRegistrationSchema, endpointTurnClaimSchema, serverEndpointMessageSchema, turnOriginSchema };
|
|
344
|
+
export { ENDPOINT_CONTACT_LIST_OUTPUT_SCHEMA, ENDPOINT_CONTACT_OUTPUT_SCHEMA, ENDPOINT_FILE_OUTPUT_SCHEMA, ENDPOINT_INVOCATION_RECEIPT_TIMEOUT_MS, ENDPOINT_MAX_FILE_BYTES, ENDPOINT_TEXT_OUTPUT_SCHEMA, canonicalJson, clientEndpointMessageSchema, endpointHelloPayloadSchema, endpointHelloSigningPayload, endpointPrincipalRegistrationSchema, endpointSessionBindingRequestSchema, endpointTurnClaimSchema, serverEndpointMessageSchema, turnOriginSchema };
|
|
@@ -41,12 +41,16 @@ const ProductDeliveryOperationSchema = z.enum([
|
|
|
41
41
|
"completed",
|
|
42
42
|
"failed"
|
|
43
43
|
]);
|
|
44
|
-
z.object({
|
|
44
|
+
const ProductDeliveryEnvelopeSchema = z.object({
|
|
45
45
|
version: z.literal(1),
|
|
46
46
|
operation: ProductDeliveryOperationSchema,
|
|
47
47
|
primary: ProductReferenceSchema.optional(),
|
|
48
48
|
related: z.array(ProductReferenceSchema).optional()
|
|
49
49
|
});
|
|
50
|
+
function parseProductDeliveryEnvelope(value) {
|
|
51
|
+
const parsed = ProductDeliveryEnvelopeSchema.safeParse(value);
|
|
52
|
+
return parsed.success ? parsed.data : null;
|
|
53
|
+
}
|
|
50
54
|
const PRODUCT_DELIVERY_TEXT_PREFIX = "xopc-product-delivery:";
|
|
51
55
|
function appendProductDeliveryText(text, delivery) {
|
|
52
56
|
if (!delivery) return text;
|
|
@@ -59,4 +63,4 @@ function productReferenceDeepLink(reference) {
|
|
|
59
63
|
}).toString()}`;
|
|
60
64
|
}
|
|
61
65
|
//#endregion
|
|
62
|
-
export { appendProductDeliveryText };
|
|
66
|
+
export { appendProductDeliveryText, parseProductDeliveryEnvelope };
|
|
@@ -106,9 +106,85 @@ const TurnOutcomeSchema = z.object({
|
|
|
106
106
|
evidence: z.array(TurnOutcomeEvidenceSchema),
|
|
107
107
|
createdAt: z.string()
|
|
108
108
|
});
|
|
109
|
+
const FILE_RESOURCE_ARTIFACT_URI_PREFIX = "xopc-file:";
|
|
110
|
+
function fileResourceArtifactUri(fileResourceId) {
|
|
111
|
+
return `${FILE_RESOURCE_ARTIFACT_URI_PREFIX}${encodeURIComponent(fileResourceId)}`;
|
|
112
|
+
}
|
|
113
|
+
function turnOutcomeKindFromFileName(fileName) {
|
|
114
|
+
const extension = fileName.toLowerCase().split(".").pop() ?? "";
|
|
115
|
+
if (extension === "xlsx" || extension === "xls" || extension === "csv" || extension === "tsv") return "spreadsheet";
|
|
116
|
+
if (extension === "pptx" || extension === "ppt") return "presentation";
|
|
117
|
+
if (extension === "pdf") return "pdf";
|
|
118
|
+
if ([
|
|
119
|
+
"doc",
|
|
120
|
+
"docx",
|
|
121
|
+
"md",
|
|
122
|
+
"rtf",
|
|
123
|
+
"txt"
|
|
124
|
+
].includes(extension)) return "document";
|
|
125
|
+
if ([
|
|
126
|
+
"png",
|
|
127
|
+
"jpg",
|
|
128
|
+
"jpeg",
|
|
129
|
+
"gif",
|
|
130
|
+
"webp",
|
|
131
|
+
"svg",
|
|
132
|
+
"bmp"
|
|
133
|
+
].includes(extension)) return "image";
|
|
134
|
+
if ([
|
|
135
|
+
"mp4",
|
|
136
|
+
"mov",
|
|
137
|
+
"webm"
|
|
138
|
+
].includes(extension)) return "video";
|
|
139
|
+
if ([
|
|
140
|
+
"mp3",
|
|
141
|
+
"wav",
|
|
142
|
+
"ogg",
|
|
143
|
+
"m4a"
|
|
144
|
+
].includes(extension)) return "audio";
|
|
145
|
+
if ([
|
|
146
|
+
"zip",
|
|
147
|
+
"tar",
|
|
148
|
+
"gz",
|
|
149
|
+
"tgz"
|
|
150
|
+
].includes(extension)) return "archive";
|
|
151
|
+
if (extension === "html" || extension === "htm") return "site";
|
|
152
|
+
return "file";
|
|
153
|
+
}
|
|
154
|
+
function turnOutcomeMimeTypeFromFileName(fileName) {
|
|
155
|
+
return {
|
|
156
|
+
xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
157
|
+
xls: "application/vnd.ms-excel",
|
|
158
|
+
csv: "text/csv",
|
|
159
|
+
tsv: "text/tab-separated-values",
|
|
160
|
+
pptx: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
161
|
+
ppt: "application/vnd.ms-powerpoint",
|
|
162
|
+
docx: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
163
|
+
doc: "application/msword",
|
|
164
|
+
pdf: "application/pdf",
|
|
165
|
+
md: "text/markdown",
|
|
166
|
+
txt: "text/plain",
|
|
167
|
+
html: "text/html",
|
|
168
|
+
htm: "text/html",
|
|
169
|
+
png: "image/png",
|
|
170
|
+
jpg: "image/jpeg",
|
|
171
|
+
jpeg: "image/jpeg",
|
|
172
|
+
gif: "image/gif",
|
|
173
|
+
webp: "image/webp",
|
|
174
|
+
svg: "image/svg+xml",
|
|
175
|
+
mp4: "video/mp4",
|
|
176
|
+
mov: "video/quicktime",
|
|
177
|
+
webm: "video/webm",
|
|
178
|
+
mp3: "audio/mpeg",
|
|
179
|
+
wav: "audio/wav",
|
|
180
|
+
ogg: "audio/ogg",
|
|
181
|
+
m4a: "audio/mp4",
|
|
182
|
+
zip: "application/zip"
|
|
183
|
+
}[fileName.toLowerCase().split(".").pop() ?? ""];
|
|
184
|
+
}
|
|
109
185
|
function parseTurnOutcome(value) {
|
|
110
186
|
const parsed = TurnOutcomeSchema.safeParse(value);
|
|
111
187
|
return parsed.success ? parsed.data : null;
|
|
112
188
|
}
|
|
113
189
|
//#endregion
|
|
114
|
-
export { TurnOutcomeDeliverableSchema, parseTurnOutcome };
|
|
190
|
+
export { TurnOutcomeDeliverableSchema, fileResourceArtifactUri, parseTurnOutcome, turnOutcomeKindFromFileName, turnOutcomeMimeTypeFromFileName };
|
|
@@ -178,8 +178,6 @@ export declare class AgentManager implements AgentInstanceGateway {
|
|
|
178
178
|
* Pass `null` to clear when the session has no `workingDirectoryOverride` on disk.
|
|
179
179
|
*/
|
|
180
180
|
setSessionWorkspaceOverride(sessionKey: string, absolutePath: string | null): void;
|
|
181
|
-
/** Merged `thinkingDefault` for this session's agent id (defaults + `agents.list`). */
|
|
182
|
-
getThinkingDefaultForSession(sessionKey: string): import('./transcript/thinking-types.js').ThinkLevel | undefined;
|
|
183
181
|
private pickDefaultModelRef;
|
|
184
182
|
private resolveModelStringToModel;
|
|
185
183
|
/**
|
|
@@ -232,6 +230,7 @@ export declare class AgentManager implements AgentInstanceGateway {
|
|
|
232
230
|
getSkillCatalog(): SkillCatalogEntry[];
|
|
233
231
|
getSkillCatalogSnapshot(): SkillCatalogSnapshot;
|
|
234
232
|
private buildAgentSkillAvailability;
|
|
233
|
+
private materializeSkillAllowlist;
|
|
235
234
|
getAgentSkillAvailability(agentId: string): AgentSkillAvailabilityPayload;
|
|
236
235
|
getSessionSkillAvailability(sessionKey: string): AgentSkillAvailabilityPayload;
|
|
237
236
|
getSessionWorkspaceTrust(sessionKey: string): WorkspaceTrustState;
|
|
@@ -21,7 +21,7 @@ import { clearBootstrapSnapshot } from "./bootstrap/bootstrap-cache.js";
|
|
|
21
21
|
import { resolveBootstrapContextSync } from "./bootstrap/bootstrap-files.js";
|
|
22
22
|
import { loadProjectAgentsContextFile } from "./bootstrap/project-agents-context.js";
|
|
23
23
|
import { parseExternalToolRef } from "./external-tools/refs.js";
|
|
24
|
-
import { mcpToolPolicyId
|
|
24
|
+
import { mcpToolPolicyId } from "./mcp/bundle-mcp-policy.js";
|
|
25
25
|
import { disposeAllSessionMcpRuntimes, retireSessionMcpRuntimeForSessionKey } from "./mcp/bundle-mcp-runtime.js";
|
|
26
26
|
import { createSkillConfigManager, isSkillEnabled, resolveSkillConfig } from "./skills/config.js";
|
|
27
27
|
import { isValidSkillEnvVarName } from "./skills/required-env-vars.js";
|
|
@@ -40,7 +40,6 @@ import { WorkspaceRuntimeRegistry } from "./workspace-runtime/registry.js";
|
|
|
40
40
|
import { runTurnUnderstandingReview } from "./background-review/run-background-review.js";
|
|
41
41
|
import { BackgroundReviewCoordinator } from "./background-review/coordinator.js";
|
|
42
42
|
import { maybeRequestChannelExecApproval } from "../channels/exec-approval-runtime.js";
|
|
43
|
-
import { checkBoundary } from "../agent-runtime/boundary-guard.js";
|
|
44
43
|
import { SkillFilesystemWatcher } from "./skills/filesystem-watcher.js";
|
|
45
44
|
import { ProjectTrustStore, hasTrustRequiringProjectResources } from "../project-trust/trust-store.js";
|
|
46
45
|
import { createAgentTurnPolicy } from "./orchestration/agent-turn-policy.js";
|
|
@@ -186,12 +185,6 @@ var AgentManager = class {
|
|
|
186
185
|
if (absolutePath === null || absolutePath === "") this.sessionWorkspaceOverrides.delete(sessionKey);
|
|
187
186
|
else this.sessionWorkspaceOverrides.set(sessionKey, absolutePath);
|
|
188
187
|
}
|
|
189
|
-
/** Merged `thinkingDefault` for this session's agent id (defaults + `agents.list`). */
|
|
190
|
-
getThinkingDefaultForSession(sessionKey) {
|
|
191
|
-
const cfg = this.mergedConfig();
|
|
192
|
-
if (!cfg) return;
|
|
193
|
-
return resolveEffectiveAgentProfileForSession(cfg, sessionKey).thinkingDefault;
|
|
194
|
-
}
|
|
195
188
|
pickDefaultModelRef() {
|
|
196
189
|
const cfg = this.mergedConfig();
|
|
197
190
|
return getAgentDefaultModelRef(cfg)?.trim() || getDefaultModelSync(cfg);
|
|
@@ -243,7 +236,7 @@ var AgentManager = class {
|
|
|
243
236
|
toolExecutorConfig: { resolveTimeoutMs: (toolName) => {
|
|
244
237
|
const config = this.mergedConfig();
|
|
245
238
|
const sessionKey = this.config.getCurrentContext?.()?.sessionKey;
|
|
246
|
-
return resolveEffectiveAgentProfileForSession(config, sessionKey).
|
|
239
|
+
return resolveEffectiveAgentProfileForSession(config, sessionKey).config.tools[toolName]?.timeoutMs;
|
|
247
240
|
} },
|
|
248
241
|
getConfig: () => this.mergedConfig(),
|
|
249
242
|
getPrimaryModel: () => this.resolveModelStringToModel(this.pickDefaultModelRef()),
|
|
@@ -410,7 +403,7 @@ var AgentManager = class {
|
|
|
410
403
|
const rt = this.workspaceRuntimes.getOrCreate(resolvedWorkspacePath, instance.effectiveProfile.agentId);
|
|
411
404
|
const contextFiles = this.resolveContextFilesForSession(instance.sessionKey, instance.effectiveProfile);
|
|
412
405
|
const modelRef = instance.effectiveProfile.primaryModelRef?.trim() || this.defaultModel;
|
|
413
|
-
const thinkingLevel = instance.agent.state.thinkingLevel ??
|
|
406
|
+
const thinkingLevel = instance.agent.state.thinkingLevel ?? this.config.thinkingLevel ?? "medium";
|
|
414
407
|
return rt.systemPromptBuilder.build(contextFiles, {
|
|
415
408
|
externalMemoryInstructions: rt.memoryManager.buildExternalSystemPrompt(),
|
|
416
409
|
workspaceOverride: resolvedWorkspacePath,
|
|
@@ -520,10 +513,11 @@ var AgentManager = class {
|
|
|
520
513
|
status: rt.skillManager.getStatus()
|
|
521
514
|
};
|
|
522
515
|
}
|
|
523
|
-
buildAgentSkillAvailability(
|
|
516
|
+
buildAgentSkillAvailability(unresolvedProfile, workspaceDir, registeredToolNames) {
|
|
524
517
|
const cfg = this.config.config;
|
|
518
|
+
const rt = this.workspaceRuntimes.getOrCreate(workspaceDir, unresolvedProfile.agentId);
|
|
519
|
+
const profile = this.materializeSkillAllowlist(unresolvedProfile, rt);
|
|
525
520
|
const entry = Array.isArray(cfg.agents?.list) ? cfg.agents.list.find((a) => a && a.enabled !== false && a.id.toLowerCase() === profile.agentId.toLowerCase()) : void 0;
|
|
526
|
-
const rt = this.workspaceRuntimes.getOrCreate(workspaceDir, profile.agentId);
|
|
527
521
|
const skillsConfig = createSkillConfigManager(resolveStateDir()).load();
|
|
528
522
|
const lock = loadSkillsLock();
|
|
529
523
|
const workspaceLock = loadSkillsLock(resolveWorkspaceSkillsLockPath(workspaceDir));
|
|
@@ -560,11 +554,19 @@ var AgentManager = class {
|
|
|
560
554
|
loadedAt: rt.skillManager.getLoadedAt(),
|
|
561
555
|
diagnostics: rt.skillManager.getDiagnostics(),
|
|
562
556
|
status: rt.skillManager.getStatus(),
|
|
563
|
-
...entry?.skills?.mode === "
|
|
557
|
+
...entry?.skills?.mode === "replace" ? { agentAllowlist: [...entry.skills.include] } : {},
|
|
564
558
|
...profile.skillsAllowlist !== void 0 ? { effectiveAllowlist: [...profile.skillsAllowlist] } : {},
|
|
565
559
|
skills
|
|
566
560
|
};
|
|
567
561
|
}
|
|
562
|
+
materializeSkillAllowlist(profile, runtime) {
|
|
563
|
+
if (profile.skillsAllowlist !== void 0 || profile.skillsDenylist.length === 0) return profile;
|
|
564
|
+
const denied = new Set(profile.skillsDenylist.map((name) => name.toLowerCase()));
|
|
565
|
+
return {
|
|
566
|
+
...profile,
|
|
567
|
+
skillsAllowlist: runtime.skillManager.getSkills().map((skill) => skill.name).filter((name) => !denied.has(name.toLowerCase()))
|
|
568
|
+
};
|
|
569
|
+
}
|
|
568
570
|
getAgentSkillAvailability(agentId) {
|
|
569
571
|
const profile = resolveEffectiveAgentProfile(this.config.config, agentId);
|
|
570
572
|
return this.buildAgentSkillAvailability(profile, profile.resolvedWorkspacePath);
|
|
@@ -621,7 +623,7 @@ var AgentManager = class {
|
|
|
621
623
|
sessionKey: instance.sessionKey,
|
|
622
624
|
modelRef: instance.effectiveProfile.primaryModelRef?.trim() || this.defaultModel,
|
|
623
625
|
agentId: instance.effectiveProfile.agentId,
|
|
624
|
-
thinkingLevel:
|
|
626
|
+
thinkingLevel: this.config.thinkingLevel ?? "medium",
|
|
625
627
|
activeProjectContext: this.composeDynamicProjectContext(instance.activeProjectContext, instance.activeSelfVerifyContext)
|
|
626
628
|
});
|
|
627
629
|
instance.agent.state.systemPrompt = newPrompt;
|
|
@@ -697,7 +699,7 @@ var AgentManager = class {
|
|
|
697
699
|
sessionKey: instance.sessionKey,
|
|
698
700
|
modelRef: instance.effectiveProfile.primaryModelRef?.trim() || this.defaultModel,
|
|
699
701
|
agentId: instance.effectiveProfile.agentId,
|
|
700
|
-
thinkingLevel:
|
|
702
|
+
thinkingLevel: this.config.thinkingLevel ?? "medium",
|
|
701
703
|
activeProjectContext: this.composeDynamicProjectContext(instance.activeProjectContext, instance.activeSelfVerifyContext)
|
|
702
704
|
});
|
|
703
705
|
instance.agent.state.systemPrompt = newPrompt;
|
|
@@ -718,9 +720,10 @@ var AgentManager = class {
|
|
|
718
720
|
log.debug({ sessionKey }, "Reusing existing agent instance");
|
|
719
721
|
return existing.agent;
|
|
720
722
|
}
|
|
721
|
-
|
|
723
|
+
let profile = resolveEffectiveAgentProfileForSession(cfg, sessionKey);
|
|
722
724
|
const resolvedPath = targetPath;
|
|
723
725
|
const rt = this.workspaceRuntimes.getOrCreate(resolvedPath, profile.agentId);
|
|
726
|
+
profile = this.materializeSkillAllowlist(profile, rt);
|
|
724
727
|
if (isMemorySubsystemEnabled(cfg)) rt.memoryManager.initializeAll(sessionKey, {
|
|
725
728
|
workspace: resolvedPath,
|
|
726
729
|
agentId: profile.agentId
|
|
@@ -828,7 +831,7 @@ var AgentManager = class {
|
|
|
828
831
|
const rt = this.workspaceRuntimes.getOrCreate(resolvedWorkspacePath, instance.effectiveProfile.agentId);
|
|
829
832
|
const contextFiles = this.resolveContextFilesForSession(sessionKey, instance.effectiveProfile);
|
|
830
833
|
const modelRef = instance.effectiveProfile.primaryModelRef?.trim() || this.defaultModel;
|
|
831
|
-
const thinkingLevel =
|
|
834
|
+
const thinkingLevel = this.config.thinkingLevel ?? "medium";
|
|
832
835
|
const activeProjectContext = buildExecutionScopeContextForPrompt(sessionKey);
|
|
833
836
|
const activeSelfVerifyContext = this.getSelfVerifyPromptContext(sessionKey, instance.effectiveProfile.agentId);
|
|
834
837
|
instance.agent.state.systemPrompt = rt.systemPromptBuilder.build(contextFiles, {
|
|
@@ -929,7 +932,7 @@ var AgentManager = class {
|
|
|
929
932
|
getSkillManager: () => rt.skillManager
|
|
930
933
|
});
|
|
931
934
|
const registeredToolNames = tools.map((t) => t.name);
|
|
932
|
-
const thinkingLevel =
|
|
935
|
+
const thinkingLevel = this.config.thinkingLevel ?? "medium";
|
|
933
936
|
const turnPolicy = this.buildAgentTurnPolicy(sessionKey, profile);
|
|
934
937
|
agent = new Agent({
|
|
935
938
|
initialState: {
|
|
@@ -968,11 +971,11 @@ var AgentManager = class {
|
|
|
968
971
|
}
|
|
969
972
|
buildAgentTurnPolicy(sessionKey, profile) {
|
|
970
973
|
return createAgentTurnPolicy({
|
|
971
|
-
maxTurns: profile.
|
|
972
|
-
maxToolFailures: profile.
|
|
974
|
+
maxTurns: profile.config.runtime.maxTurns,
|
|
975
|
+
maxToolFailures: profile.config.runtime.maxToolFailuresPerTurn,
|
|
973
976
|
resolveToolLimit: (toolName, args) => {
|
|
974
977
|
const policy = this.resolveToolPolicy(profile, toolName, args);
|
|
975
|
-
const maxCalls = policy?.
|
|
978
|
+
const maxCalls = policy?.maxCallsPerTurn;
|
|
976
979
|
return policy && maxCalls ? {
|
|
977
980
|
id: policy.id,
|
|
978
981
|
maxCalls
|
|
@@ -982,22 +985,7 @@ var AgentManager = class {
|
|
|
982
985
|
const toolName = toolCall.name;
|
|
983
986
|
const policy = this.resolveToolPolicy(profile, toolName, args);
|
|
984
987
|
const detail = JSON.stringify(args ?? {});
|
|
985
|
-
|
|
986
|
-
manifest: profile.manifest,
|
|
987
|
-
action: policy?.id ?? toolName,
|
|
988
|
-
detail
|
|
989
|
-
});
|
|
990
|
-
if (boundary.decision === "deny") return {
|
|
991
|
-
block: true,
|
|
992
|
-
terminate: true,
|
|
993
|
-
reason: `Blocked by boundary rule: ${boundary.matchedRule}`
|
|
994
|
-
};
|
|
995
|
-
if (boundary.decision === "escalate") return {
|
|
996
|
-
block: true,
|
|
997
|
-
terminate: true,
|
|
998
|
-
reason: `Escalation required by boundary rule: ${boundary.matchedRule}`
|
|
999
|
-
};
|
|
1000
|
-
if (policy?.mode === "confirm" || boundary.decision === "confirm") {
|
|
988
|
+
if (policy?.mode === "ask") {
|
|
1001
989
|
if (!await this.requestToolConfirmation(sessionKey, policy?.id ?? toolName, detail)) return {
|
|
1002
990
|
block: true,
|
|
1003
991
|
terminate: true,
|
|
@@ -1039,7 +1027,7 @@ var AgentManager = class {
|
|
|
1039
1027
|
}
|
|
1040
1028
|
resolveToolPolicy(profile, toolName, args) {
|
|
1041
1029
|
if (toolName !== "xopc_tool_execute") {
|
|
1042
|
-
const policy = profile.
|
|
1030
|
+
const policy = profile.config.tools[toolName];
|
|
1043
1031
|
return policy ? {
|
|
1044
1032
|
id: toolName,
|
|
1045
1033
|
...policy
|
|
@@ -1048,10 +1036,7 @@ var AgentManager = class {
|
|
|
1048
1036
|
const parsed = parseExternalToolRef(typeof args?.toolRef === "string" ? args.toolRef : "", "mcp");
|
|
1049
1037
|
if (!parsed) return void 0;
|
|
1050
1038
|
const id = mcpToolPolicyId(parsed.namespace, parsed.toolName);
|
|
1051
|
-
const policy =
|
|
1052
|
-
serverId: parsed.namespace,
|
|
1053
|
-
policyToolId: id
|
|
1054
|
-
}, profile.manifest.tools.mcp);
|
|
1039
|
+
const policy = profile.config.tools[id];
|
|
1055
1040
|
return policy ? {
|
|
1056
1041
|
id,
|
|
1057
1042
|
...policy
|
|
@@ -1075,7 +1060,7 @@ var AgentManager = class {
|
|
|
1075
1060
|
const rt = this.workspaceRuntimes.getOrCreate(resolvedWorkspacePath, instance.effectiveProfile.agentId);
|
|
1076
1061
|
const contextFiles = this.resolveContextFilesForSession(instance.sessionKey, instance.effectiveProfile);
|
|
1077
1062
|
const modelRef = instance.effectiveProfile.primaryModelRef?.trim() || this.defaultModel;
|
|
1078
|
-
const thinkingLevel = instance.agent.state.thinkingLevel ??
|
|
1063
|
+
const thinkingLevel = instance.agent.state.thinkingLevel ?? this.config.thinkingLevel ?? "medium";
|
|
1079
1064
|
instance.agent.state.systemPrompt = rt.systemPromptBuilder.build(contextFiles, {
|
|
1080
1065
|
externalMemoryInstructions: rt.memoryManager.buildExternalSystemPrompt(),
|
|
1081
1066
|
workspaceOverride: resolvedWorkspacePath,
|
|
@@ -1113,7 +1098,7 @@ var AgentManager = class {
|
|
|
1113
1098
|
const resolvedWorkspacePath = this.getResolvedWorkspaceForSession(sessionKey);
|
|
1114
1099
|
const rt = this.workspaceRuntimes.getOrCreate(resolvedWorkspacePath, instance.effectiveProfile.agentId);
|
|
1115
1100
|
const contextFiles = this.resolveContextFilesForSession(sessionKey, instance.effectiveProfile);
|
|
1116
|
-
const thinkingLevel = instance.agent.state.thinkingLevel ??
|
|
1101
|
+
const thinkingLevel = instance.agent.state.thinkingLevel ?? this.config.thinkingLevel ?? "medium";
|
|
1117
1102
|
const activeProjectContext = buildExecutionScopeContextForPrompt(sessionKey);
|
|
1118
1103
|
const activeSelfVerifyContext = this.getSelfVerifyPromptContext(sessionKey, instance.effectiveProfile.agentId);
|
|
1119
1104
|
instance.agent.state.systemPrompt = rt.systemPromptBuilder.build(contextFiles, {
|
|
@@ -11,9 +11,9 @@ import { createExtensionAwareStreamFn } from "../../providers/extension-stream-b
|
|
|
11
11
|
import { extractTextContent } from "../context/workspace.js";
|
|
12
12
|
import { readAgentMessageContent } from "../memory/agent-message-access.js";
|
|
13
13
|
import { resolveAgentTurnTimeoutMs, runAgentTurnWithTimeout } from "../orchestration/run-agent-turn-with-timeout.js";
|
|
14
|
-
import { resolveTypedModelRef } from "../../config/agent-typed-models.js";
|
|
15
14
|
import { claimRegisteredExtraction } from "../../user-context/extraction/registry.js";
|
|
16
15
|
import { isAssistantTurnAborted, isAssistantTurnFailed } from "../orchestration/llm-turn-retry.js";
|
|
16
|
+
import { resolveModelIntentRef } from "../../config/agent-model-intents.js";
|
|
17
17
|
import { emptyUnderstandingReview, executeUnderstandingInterpretation } from "../../user-context/extraction/executor.js";
|
|
18
18
|
import { parseSemanticUnderstanding } from "../../user-context/extraction/semantic.js";
|
|
19
19
|
import { UNDERSTANDING_INTERPRETER_SYSTEM_PROMPT, buildUnderstandingInterpreterPrompt } from "./prompts.js";
|
|
@@ -95,20 +95,15 @@ function resolveInterpreterRuntime(params) {
|
|
|
95
95
|
let model;
|
|
96
96
|
if (config) {
|
|
97
97
|
const agentId = extractProfileAgentId(params.sessionKey, config);
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
agentId,
|
|
108
|
-
role,
|
|
109
|
-
modelRef: ref
|
|
110
|
-
}, "Configured understanding model could not be resolved");
|
|
111
|
-
}
|
|
98
|
+
const ref = resolveModelIntentRef(config, agentId, "understanding");
|
|
99
|
+
if (ref) try {
|
|
100
|
+
model = resolveModel(ref);
|
|
101
|
+
} catch (err) {
|
|
102
|
+
log.debug({
|
|
103
|
+
err,
|
|
104
|
+
agentId,
|
|
105
|
+
modelRef: ref
|
|
106
|
+
}, "Configured understanding model could not be resolved");
|
|
112
107
|
}
|
|
113
108
|
}
|
|
114
109
|
model ??= params.mainAgent.state.model;
|
|
@@ -156,7 +156,7 @@ export declare const AGENT_CAPABILITY_DEFINITIONS: readonly [{
|
|
|
156
156
|
readonly label: "Data analysis";
|
|
157
157
|
readonly description: "Analyze local structured data and produce derived tables, summaries, or artifacts.";
|
|
158
158
|
readonly category: "analysis";
|
|
159
|
-
readonly tools: readonly ["read_file", "write_file", "list_dir", "grep", "find"];
|
|
159
|
+
readonly tools: readonly ["read_file", "write_file", "list_dir", "grep", "find", "publish_artifacts"];
|
|
160
160
|
readonly activation: {
|
|
161
161
|
readonly mode: "explicit";
|
|
162
162
|
readonly ttl: "session";
|
|
@@ -61,7 +61,7 @@ async function runEmbeddedTurnForSession(params) {
|
|
|
61
61
|
const systemPrompt = agent.state.systemPrompt ?? "";
|
|
62
62
|
const thinkingLevel = params.thinkingOverride ?? agent.state.thinkingLevel;
|
|
63
63
|
const workspaceDir = agentManager.getResolvedWorkspaceForSession(sessionKey);
|
|
64
|
-
const promptCachePolicy = resolvePromptCachePolicy(config ? resolveEffectiveAgentProfileForSession(config, sessionKey).
|
|
64
|
+
const promptCachePolicy = resolvePromptCachePolicy(config ? resolveEffectiveAgentProfileForSession(config, sessionKey).config.runtime.promptCache : void 0);
|
|
65
65
|
let userMessageForTurn = userMessage;
|
|
66
66
|
if (params.applyStartupContext !== false) {
|
|
67
67
|
userMessageForTurn = await applyStartupContextToUserMessage({
|
|
@@ -66,13 +66,17 @@ var EndpointToolProvider = class {
|
|
|
66
66
|
details: {
|
|
67
67
|
endpointId: resolved.endpointId,
|
|
68
68
|
endpointToolName: resolved.tool.descriptor.name,
|
|
69
|
+
endpointSensitivity: resolved.tool.descriptor.sensitivity,
|
|
69
70
|
...result.details ?? {},
|
|
70
71
|
...files.length === 0 ? {} : { endpointFiles: files }
|
|
71
72
|
}
|
|
72
73
|
};
|
|
73
74
|
}
|
|
74
75
|
currentEndpoint() {
|
|
75
|
-
const
|
|
76
|
+
const context = this.deps.getCurrentContext();
|
|
77
|
+
if (!context) return void 0;
|
|
78
|
+
if (this.deps.runtime.bindings.get(context.sessionKey)) return this.deps.runtime.bindings.resolve(context.sessionKey);
|
|
79
|
+
const origin = context.origin;
|
|
76
80
|
if (origin?.type !== "endpoint") return void 0;
|
|
77
81
|
return this.deps.runtime.registry.get(origin.endpointId);
|
|
78
82
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { resolveEffectiveAgentProfileForSession } from "../../config/agent-profile.js";
|
|
2
2
|
import { externalToolRef, parseExternalToolRef } from "./refs.js";
|
|
3
|
-
import {
|
|
3
|
+
import { mcpToolPolicyId } from "../mcp/bundle-mcp-policy.js";
|
|
4
4
|
import { getOrCreateSessionMcpRuntime } from "../mcp/bundle-mcp-runtime.js";
|
|
5
5
|
//#region src/agent/external-tools/mcp-provider.ts
|
|
6
6
|
function policyToolId(tool) {
|
|
@@ -90,22 +90,12 @@ var McpToolProvider = class {
|
|
|
90
90
|
const sessionKey = this.deps.getSessionKey();
|
|
91
91
|
const profile = cfg && sessionKey ? resolveEffectiveAgentProfileForSession(cfg, sessionKey) : void 0;
|
|
92
92
|
const policyName = policyToolId(tool);
|
|
93
|
-
return !(
|
|
94
|
-
serverId: tool.safeServerName,
|
|
95
|
-
policyToolId: policyName
|
|
96
|
-
}, profile?.manifest.tools.mcp)?.scope === "readonly" && tool.annotations?.readOnlyHint !== true) && !profile?.tools.denied.has(policyName) && !isMcpCatalogToolDenied({
|
|
97
|
-
serverId: tool.safeServerName,
|
|
98
|
-
policyToolId: policyName
|
|
99
|
-
}, profile?.manifest.tools.mcp);
|
|
93
|
+
return !profile?.tools.denied.has(policyName);
|
|
100
94
|
}
|
|
101
95
|
executionSignal(tool, signal) {
|
|
102
96
|
const cfg = this.deps.getConfig();
|
|
103
97
|
const sessionKey = this.deps.getSessionKey();
|
|
104
|
-
const
|
|
105
|
-
const timeoutMs = resolveMcpToolPolicy({
|
|
106
|
-
serverId: tool.safeServerName,
|
|
107
|
-
policyToolId: policyToolId(tool)
|
|
108
|
-
}, profile?.manifest.tools.mcp)?.limits?.timeoutMs;
|
|
98
|
+
const timeoutMs = (cfg && sessionKey ? resolveEffectiveAgentProfileForSession(cfg, sessionKey) : void 0)?.config.tools[policyToolId(tool)]?.timeoutMs;
|
|
109
99
|
if (!timeoutMs) return signal;
|
|
110
100
|
const timeoutSignal = AbortSignal.timeout(timeoutMs);
|
|
111
101
|
return signal ? AbortSignal.any([signal, timeoutSignal]) : timeoutSignal;
|
|
@@ -169,7 +169,7 @@ function toCapabilityCandidate(provider) {
|
|
|
169
169
|
function buildNoImageGenerationModelConfiguredMessage(cfg, deps) {
|
|
170
170
|
return buildNoCapabilityModelConfiguredMessage({
|
|
171
171
|
capabilityLabel: "image-generation",
|
|
172
|
-
modelConfigKey: "
|
|
172
|
+
modelConfigKey: "imageGeneration",
|
|
173
173
|
providers: (deps.listProviders ?? listImageGenerationProviders)(cfg).map(toCapabilityCandidate),
|
|
174
174
|
getProviderEnvVars: deps.getProviderEnvVars ?? ((id) => PROVIDER_ENV_MAP[id])
|
|
175
175
|
});
|