@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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getAgentDefaultImageModelConfig, getAgentDefaultModelRef, init_schema, parseModelRef } from "../../config/schema.js";
|
|
2
2
|
import { init_agent_scope, resolveDefaultAgentId } from "../agent-scope.js";
|
|
3
|
-
import {
|
|
3
|
+
import { resolveEffectiveAgentConfigForAgent } from "../../config/agent-profile.js";
|
|
4
4
|
import { getDefaultModelSync, getModelsByProvider, init_providers, isProviderConfiguredSync, resolveModel } from "../../providers/index.js";
|
|
5
5
|
import { resolveAgentModelFallbackValues, resolveAgentModelPrimaryValue } from "../../config/model-input.js";
|
|
6
6
|
import { buildCapabilityPlansForConfig } from "../../capabilities/readiness/from-config.js";
|
|
@@ -37,13 +37,13 @@ function resolveEffectiveModelsConfig(params) {
|
|
|
37
37
|
if (!params.cfg) return;
|
|
38
38
|
try {
|
|
39
39
|
const agentId = params.agentId?.trim() || resolveDefaultAgentId(params.cfg);
|
|
40
|
-
return
|
|
40
|
+
return resolveEffectiveAgentConfigForAgent(params.cfg, agentId).config.models;
|
|
41
41
|
} catch {
|
|
42
42
|
return;
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
function resolveConfiguredImageModelConfig(params) {
|
|
46
|
-
return coerceToolModelConfig(resolveEffectiveModelsConfig(params)?.
|
|
46
|
+
return coerceToolModelConfig(resolveEffectiveModelsConfig(params)?.imageUnderstanding ?? (params.cfg ? getAgentDefaultImageModelConfig(params.cfg) : void 0));
|
|
47
47
|
}
|
|
48
48
|
function modelRefSupportsImage(modelRef) {
|
|
49
49
|
try {
|
|
@@ -70,27 +70,26 @@ function addCandidate(candidates, seen, entry) {
|
|
|
70
70
|
}
|
|
71
71
|
function collectRoleImageModelCandidates(params) {
|
|
72
72
|
const models = resolveEffectiveModelsConfig(params);
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
73
|
+
const routes = models ? {
|
|
74
|
+
chat: models.chat,
|
|
75
|
+
...models.intents
|
|
76
|
+
} : {};
|
|
77
|
+
const roleIds = Object.keys(routes);
|
|
77
78
|
const seen = /* @__PURE__ */ new Set();
|
|
78
79
|
const candidates = [];
|
|
79
|
-
for (const roleId of
|
|
80
|
-
const role =
|
|
80
|
+
for (const roleId of roleIds) {
|
|
81
|
+
const role = routes[roleId];
|
|
81
82
|
if (!role) continue;
|
|
82
|
-
const refs = [role.
|
|
83
|
+
const refs = [role.primary, ...role.fallbacks];
|
|
83
84
|
for (const ref of refs) addCandidate(candidates, seen, {
|
|
84
85
|
ref,
|
|
85
|
-
roleId
|
|
86
|
-
...role.description ? { roleDescription: role.description } : {}
|
|
86
|
+
roleId
|
|
87
87
|
});
|
|
88
88
|
}
|
|
89
89
|
return candidates;
|
|
90
90
|
}
|
|
91
91
|
function resolveDefaultModelRefForAgent(params) {
|
|
92
|
-
const
|
|
93
|
-
const ref = (models?.defaultRole ? models.roles?.[models.defaultRole] : void 0)?.model?.trim();
|
|
92
|
+
const ref = resolveEffectiveModelsConfig(params)?.chat.primary.trim();
|
|
94
93
|
if (ref) {
|
|
95
94
|
const parsed = parseModelRef(ref);
|
|
96
95
|
if (parsed) return parsed;
|
|
@@ -1,10 +1 @@
|
|
|
1
|
-
import type { AgentManifest, ToolPolicy } from '../../agent-manifest/schema.js';
|
|
2
1
|
export declare function mcpToolPolicyId(serverId: string, toolName: string): string;
|
|
3
|
-
export declare function resolveMcpToolPolicy(identity: {
|
|
4
|
-
serverId: string;
|
|
5
|
-
policyToolId: string;
|
|
6
|
-
}, policy: AgentManifest['tools']['mcp']): ToolPolicy | undefined;
|
|
7
|
-
export declare function isMcpCatalogToolDenied(identity: {
|
|
8
|
-
serverId: string;
|
|
9
|
-
policyToolId: string;
|
|
10
|
-
}, policy: AgentManifest['tools']['mcp']): boolean;
|
|
@@ -1,18 +1,6 @@
|
|
|
1
|
-
import { sanitizeServerName } from "./bundle-mcp-names.js";
|
|
2
1
|
//#region src/agent/mcp/bundle-mcp-policy.ts
|
|
3
2
|
function mcpToolPolicyId(serverId, toolName) {
|
|
4
3
|
return `mcp:${encodeURIComponent(serverId)}:${encodeURIComponent(toolName)}`;
|
|
5
4
|
}
|
|
6
|
-
function resolveMcpToolPolicy(identity, policy) {
|
|
7
|
-
const toolPolicy = policy?.tools?.[identity.policyToolId];
|
|
8
|
-
if (toolPolicy) return toolPolicy;
|
|
9
|
-
const directServerPolicy = policy?.servers?.[identity.serverId];
|
|
10
|
-
if (directServerPolicy) return directServerPolicy;
|
|
11
|
-
const usedNames = /* @__PURE__ */ new Set();
|
|
12
|
-
for (const [serverId, serverPolicy] of Object.entries(policy?.servers ?? {})) if (sanitizeServerName(serverId, usedNames) === identity.serverId) return serverPolicy;
|
|
13
|
-
}
|
|
14
|
-
function isMcpCatalogToolDenied(identity, policy) {
|
|
15
|
-
return resolveMcpToolPolicy(identity, policy)?.mode === "deny";
|
|
16
|
-
}
|
|
17
5
|
//#endregion
|
|
18
|
-
export {
|
|
6
|
+
export { mcpToolPolicyId };
|
|
@@ -2,12 +2,12 @@ import { createLogger } from "../../utils/logger/index.js";
|
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
3
|
import { resolveGlobalSingleton } from "../../utils/global-singleton.js";
|
|
4
4
|
import { init_string_coerce, normalizeOptionalString } from "../../utils/string-coerce.js";
|
|
5
|
-
import { sanitizeServerName } from "./bundle-mcp-names.js";
|
|
6
5
|
import { redactSensitiveUrlLikeString } from "../../utils/redact-sensitive-url.js";
|
|
7
6
|
import { loadEmbeddedMcpConfig } from "./embedded-mcp.js";
|
|
8
7
|
import { resolveConnectorSecretReferences } from "../../connectors/secret-store.js";
|
|
9
8
|
import { isMcpConfigRecord } from "./mcp-config-shared.js";
|
|
10
9
|
import { resolveMcpTransport } from "./mcp-transport.js";
|
|
10
|
+
import { sanitizeServerName } from "./bundle-mcp-names.js";
|
|
11
11
|
import crypto from "node:crypto";
|
|
12
12
|
import Ajv2020 from "ajv/dist/2020.js";
|
|
13
13
|
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { mcpToolPolicyId } from "./bundle-mcp-policy.js";
|
|
2
2
|
import { loadMergedBundleMcpConfig } from "./bundle-mcp-config.js";
|
|
3
3
|
import { loadEmbeddedMcpConfig } from "./embedded-mcp.js";
|
|
4
4
|
import { McpAuthorizationRequiredError, isMcpAuthorizationError } from "./oauth/mcp-oauth-errors.js";
|
|
@@ -9,4 +9,4 @@ import "./bundle-mcp-tools.js";
|
|
|
9
9
|
import { McpOAuthSession } from "./oauth/mcp-oauth-session.js";
|
|
10
10
|
import { McpOAuthManager, getMcpOAuthManager } from "./oauth/mcp-oauth-manager.js";
|
|
11
11
|
import "./oauth/index.js";
|
|
12
|
-
export { McpAuthorizationRequiredError, McpOAuthManager, McpOAuthSession, McpOAuthStore, XopcMcpOAuthClientProvider, __testing, canonicalMcpServerUrl, createSessionMcpRuntime, disposeAllSessionMcpRuntimes, disposeSessionMcpRuntime, getMcpOAuthManager, getOrCreateSessionMcpRuntime, getSessionMcpRuntimeManager, isMcpAuthorizationError,
|
|
12
|
+
export { McpAuthorizationRequiredError, McpOAuthManager, McpOAuthSession, McpOAuthStore, XopcMcpOAuthClientProvider, __testing, canonicalMcpServerUrl, createSessionMcpRuntime, disposeAllSessionMcpRuntimes, disposeSessionMcpRuntime, getMcpOAuthManager, getOrCreateSessionMcpRuntime, getSessionMcpRuntimeManager, isMcpAuthorizationError, loadEmbeddedMcpConfig, loadMergedBundleMcpConfig, mcpOAuthServerKey, mcpToolPolicyId, retireSessionMcpRuntime, retireSessionMcpRuntimeForSessionKey };
|
|
@@ -90,7 +90,7 @@ export declare function throwCapabilityGenerationFailure(params: ThrowCapability
|
|
|
90
90
|
export interface BuildNoCapabilityModelConfiguredMessageParams {
|
|
91
91
|
/** Display label, e.g. "image-generation". */
|
|
92
92
|
capabilityLabel: string;
|
|
93
|
-
/** Config key path, e.g. "
|
|
93
|
+
/** Config key path, e.g. "agents.defaults.models.imageGeneration". */
|
|
94
94
|
modelConfigKey: string;
|
|
95
95
|
providers: ReadonlyArray<CapabilityProviderCandidate>;
|
|
96
96
|
/** Optional env-var lookup, e.g. (id) => PROVIDER_ENV_MAP[id]. */
|
|
@@ -190,7 +190,7 @@ function throwCapabilityGenerationFailure(params) {
|
|
|
190
190
|
});
|
|
191
191
|
}
|
|
192
192
|
function buildNoCapabilityModelConfiguredMessage(params) {
|
|
193
|
-
const lines = [`No ${params.capabilityLabel} model configured.
|
|
193
|
+
const lines = [`No ${params.capabilityLabel} model configured. Set agents.defaults.models.${params.modelConfigKey} or pass modelOverride at call site.`];
|
|
194
194
|
if (params.providers.length > 0) {
|
|
195
195
|
lines.push("Registered providers:");
|
|
196
196
|
for (const p of params.providers) {
|
|
@@ -2,7 +2,7 @@ import { isMemorySubsystemEnabled } from "./memory-config.js";
|
|
|
2
2
|
import { BuiltinMemoryProvider } from "./builtin-provider.js";
|
|
3
3
|
import { MemoryManager } from "./manager.js";
|
|
4
4
|
import { loadMemoryPluginProviders } from "./plugin-discovery.js";
|
|
5
|
-
import { buildMemoryRuntime } from "
|
|
5
|
+
import { buildMemoryRuntime } from "./runtime.js";
|
|
6
6
|
//#region src/agent/memory/create-memory-manager.ts
|
|
7
7
|
function createMemoryManagerFromConfig(config) {
|
|
8
8
|
const routing = resolveMemoryManagerOptions(config);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AgentTool } from '@earendil-works/pi-agent-core';
|
|
2
|
-
import type { MemoryRuntime } from '
|
|
2
|
+
import type { MemoryRuntime } from './runtime.js';
|
|
3
3
|
import type { MemoryProvider, MemoryProviderInitOptions } from './provider.js';
|
|
4
4
|
import type { UnderstandingCandidate } from './understanding/types.js';
|
|
5
5
|
import type { MemoryDeleteRequest, MemoryListRequest, MemoryReadRequest, MemoryReadResult, MemorySearchRequest, MemorySearchResult, MemoryUpdateRequest, MemoryWriteRequest, MemoryWriteResult, MemoryRecord, MemorySignal, MemoryKind } from './types.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { UserContextConfig } from '
|
|
1
|
+
import type { UserContextConfig } from '../../user-context/config.js';
|
|
2
2
|
export type MemorySource = 'session' | 'agentProfile' | 'understanding' | 'workspace';
|
|
3
3
|
export type MemoryWriteTarget = 'agentProfile' | 'understanding' | 'workspace';
|
|
4
4
|
export type MemoryWriteDecision = 'allow' | 'confirm' | 'deny';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
//#region src/agent
|
|
2
|
-
const READ_ONLY_MODES = new Set(["readOnly"]);
|
|
1
|
+
//#region src/agent/memory/runtime.ts
|
|
3
2
|
function normalizeConfidence(value) {
|
|
4
3
|
if (typeof value !== "number" || !Number.isFinite(value)) return .5;
|
|
5
4
|
return Math.max(0, Math.min(1, value));
|
|
@@ -16,7 +15,7 @@ function buildMemoryRuntime(userContext) {
|
|
|
16
15
|
decision: "deny",
|
|
17
16
|
reason: "memory is disabled"
|
|
18
17
|
};
|
|
19
|
-
if (
|
|
18
|
+
if (memory.mode === "readOnly") return {
|
|
20
19
|
decision: "deny",
|
|
21
20
|
reason: "memory is read-only"
|
|
22
21
|
};
|
|
@@ -21,8 +21,6 @@ export interface AgentOrchestratorConfig {
|
|
|
21
21
|
/** Per-session hydration (workspace override + model override) before the agent runs. */
|
|
22
22
|
sessionHydrator: SessionHydrator;
|
|
23
23
|
getThinkingDefault: () => ThinkLevel | undefined;
|
|
24
|
-
/** Per-session default from merged `agents.list` / defaults (optional). */
|
|
25
|
-
getThinkingDefaultForSession?: (sessionKey: string) => ThinkLevel | undefined;
|
|
26
24
|
/** Default workspace root when no per-session resolver is set. */
|
|
27
25
|
workspaceRoot: string;
|
|
28
26
|
/** Per-agent workspace root for attachments (optional; defaults to `workspaceRoot`). */
|
|
@@ -45,7 +43,6 @@ export declare class AgentOrchestrator {
|
|
|
45
43
|
private sessionConfigStore;
|
|
46
44
|
private sessionHydrator;
|
|
47
45
|
private getThinkingDefault;
|
|
48
|
-
private getThinkingDefaultForSession?;
|
|
49
46
|
private enqueueAutoTitle?;
|
|
50
47
|
private getConfig?;
|
|
51
48
|
private onEmbeddedStreamEvent?;
|
|
@@ -24,7 +24,6 @@ var AgentOrchestrator = class {
|
|
|
24
24
|
sessionConfigStore;
|
|
25
25
|
sessionHydrator;
|
|
26
26
|
getThinkingDefault;
|
|
27
|
-
getThinkingDefaultForSession;
|
|
28
27
|
enqueueAutoTitle;
|
|
29
28
|
getConfig;
|
|
30
29
|
onEmbeddedStreamEvent;
|
|
@@ -36,7 +35,6 @@ var AgentOrchestrator = class {
|
|
|
36
35
|
this.sessionConfigStore = config.sessionConfigStore;
|
|
37
36
|
this.sessionHydrator = config.sessionHydrator;
|
|
38
37
|
this.getThinkingDefault = config.getThinkingDefault;
|
|
39
|
-
this.getThinkingDefaultForSession = config.getThinkingDefaultForSession;
|
|
40
38
|
this.enqueueAutoTitle = config.enqueueAutoTitle;
|
|
41
39
|
this.getConfig = config.getConfig;
|
|
42
40
|
this.onEmbeddedStreamEvent = config.onEmbeddedStreamEvent;
|
|
@@ -70,7 +68,7 @@ var AgentOrchestrator = class {
|
|
|
70
68
|
this.agentManager.getOrCreateAgent(sessionKey);
|
|
71
69
|
this.agentManager.applyTurnChannelSystemPrompt(sessionKey, channelSystemPrompt);
|
|
72
70
|
}
|
|
73
|
-
const thinkingDefault = this.
|
|
71
|
+
const thinkingDefault = this.getThinkingDefault();
|
|
74
72
|
const thinkingLevel = await resolveEffectiveThinkingLevel(this.sessionConfigStore, sessionKey, null, thinkingDefault);
|
|
75
73
|
this.agentManager.setThinkingLevel(sessionKey, thinkingLevel);
|
|
76
74
|
const persistedAttachments = await persistInboundAttachments(msg.attachments);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { resolveEffectiveAgentConfigForSession } from "../../config/agent-profile.js";
|
|
2
2
|
//#region src/agent/orchestration/run-agent-turn-with-timeout.ts
|
|
3
3
|
/** Minimum per-turn timeout (1 minute). */
|
|
4
4
|
const MIN_AGENT_TURN_TIMEOUT_MS = 6e4;
|
|
@@ -20,7 +20,7 @@ function isAgentTurnUnsettledError(err) {
|
|
|
20
20
|
}
|
|
21
21
|
function resolveAgentTurnTimeoutMs(config, sessionKey) {
|
|
22
22
|
if (!config) return DEFAULT_AGENT_TURN_TIMEOUT_MS;
|
|
23
|
-
const configured =
|
|
23
|
+
const configured = resolveEffectiveAgentConfigForSession(config, sessionKey).config.runtime.timeoutMs;
|
|
24
24
|
if (!configured) return DEFAULT_AGENT_TURN_TIMEOUT_MS;
|
|
25
25
|
return Math.min(MAX_AGENT_TURN_TIMEOUT_MS, Math.max(MIN_AGENT_TURN_TIMEOUT_MS, configured));
|
|
26
26
|
}
|
|
@@ -14,6 +14,7 @@ const CORE_TOOL_ORDER = [
|
|
|
14
14
|
"browser_use",
|
|
15
15
|
"send_message",
|
|
16
16
|
"send_media",
|
|
17
|
+
"publish_artifacts",
|
|
17
18
|
"memory_search",
|
|
18
19
|
"memory_get",
|
|
19
20
|
"session_recall",
|
|
@@ -51,6 +52,7 @@ const CORE_TOOL_SUMMARIES = {
|
|
|
51
52
|
browser_use: "Control the configured browser",
|
|
52
53
|
send_message: "Send messages to the current conversation or an explicit configured channel",
|
|
53
54
|
send_media: "Send media attachments to the current channel",
|
|
55
|
+
publish_artifacts: "Publish final generated files as durable chat deliverables",
|
|
54
56
|
memory_search: "Semantic search over indexed memory sources",
|
|
55
57
|
memory_get: "Read specific lines from memory sources returned by search",
|
|
56
58
|
session_recall: "Search exact raw turns in the current session, including compacted history",
|
|
@@ -117,6 +119,7 @@ function buildToolingSection(params) {
|
|
|
117
119
|
const hasFind = availableTools.has("find");
|
|
118
120
|
const hasExec = availableTools.has("exec_command");
|
|
119
121
|
const hasPlan = availableTools.has("update_plan");
|
|
122
|
+
const hasPublishArtifacts = availableTools.has("publish_artifacts");
|
|
120
123
|
const orchestrationLines = [];
|
|
121
124
|
if (hasDelegate) orchestrationLines.push("- Sub-agent delegation → use `delegate_task(goal, context?, toolset?)` for focused parallel work; results return to you automatically.");
|
|
122
125
|
if (hasWorkflow) orchestrationLines.push("- Multi-phase workflows → use `workflow` to start persisted runs with subagents when a script defines phases.");
|
|
@@ -131,6 +134,8 @@ function buildToolingSection(params) {
|
|
|
131
134
|
hasWrite ? `Use \`${writeToolName}\` only for new files or intentional complete rewrites.` : "",
|
|
132
135
|
hasGrep || hasFind ? `Use ${[hasGrep ? `\`${grepToolName}\`` : "", hasFind ? `\`${findToolName}\`` : ""].filter(Boolean).join(" and ")} for text/file discovery; use code graph or symbol tools when available for definitions and call relationships.` : "",
|
|
133
136
|
hasExec ? `Use \`${execToolName}\` for verification and safe inspection, not routine file editing.` : "",
|
|
137
|
+
hasWrite || hasExec ? "When delivering a user-facing workspace file, include a clickable Markdown link in the final response using `xopc://workspace/file?path=<workspace-relative-path>`; URL-encode spaces and special characters, and do not invent an HTTP or `file://` URL." : "",
|
|
138
|
+
hasPublishArtifacts ? "After a command or runtime creates final user-facing files such as spreadsheets, presentations, PDFs, documents, media, or archives, call `publish_artifacts` once with all final paths. Do not publish temporary files, code edits, or build intermediates." : "",
|
|
134
139
|
hasPlan ? `Use \`${planToolName}\` for multi-step coding work: keep exactly one active step when work is in progress, and update it after meaningful progress or review.` : "",
|
|
135
140
|
hasToolManual ? "Some complex tools have built-in manuals. Use `tool_manual(tool)` before non-trivial use." : "",
|
|
136
141
|
hasDelegate ? "If a task is complex or long-running, delegate it. Completion is push-based: the sub-agent result returns when done." : "",
|
|
@@ -283,7 +283,6 @@ var AgentService = class {
|
|
|
283
283
|
sessionHydrator: this.sessionHydrator,
|
|
284
284
|
getConfig: () => this.effectiveAppConfig(),
|
|
285
285
|
getThinkingDefault: () => void 0,
|
|
286
|
-
getThinkingDefaultForSession: (sessionKey) => this.agentManager.getThinkingDefaultForSession(sessionKey),
|
|
287
286
|
workspaceRoot: this.workspaceDir,
|
|
288
287
|
getWorkspaceRootForSession: (sessionKey) => this.agentManager.getResolvedWorkspaceForSession(sessionKey),
|
|
289
288
|
getAgentInternalStorageRootForSession: (sessionKey) => resolveAgentHomeDir(this.config.config, extractProfileAgentId(sessionKey, this.config.config)),
|
|
@@ -8,7 +8,7 @@ init_paths();
|
|
|
8
8
|
init_agent_scope();
|
|
9
9
|
const STARTER_AGENTS_INITIALIZED_VERSION = 1;
|
|
10
10
|
function denyTools(names) {
|
|
11
|
-
return
|
|
11
|
+
return Object.fromEntries(names.map((name) => [name, { mode: "deny" }]));
|
|
12
12
|
}
|
|
13
13
|
function identity(params) {
|
|
14
14
|
return `# IDENTITY.md - Who Am I?\n\n- **Name:** ${params.name}\n- **Description:** ${params.description}\n- **Language:** en\n- **Creature:** ${params.creature}\n- **Emoji:** ${params.emoji}\n- **Avatar:**\n`;
|
|
@@ -158,13 +158,6 @@ function ensureStarterAgentsInitialized(cfg) {
|
|
|
158
158
|
if (hasAgentEntry(next, starter.id)) continue;
|
|
159
159
|
next = applyAgentConfig(next, {
|
|
160
160
|
agentId: starter.id,
|
|
161
|
-
identity: {
|
|
162
|
-
name: starter.displayName,
|
|
163
|
-
description: starter.description,
|
|
164
|
-
role: starter.role,
|
|
165
|
-
language: "en",
|
|
166
|
-
tone: "direct"
|
|
167
|
-
},
|
|
168
161
|
...starter.tools ? { tools: starter.tools } : {}
|
|
169
162
|
});
|
|
170
163
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { resolvePathUnderWorkspace } from "./tool-paths.js";
|
|
2
|
+
import { turnOutcomeKindFromFileName } from "../../../packages/gateway-contract/src/turn-outcome.js";
|
|
2
3
|
import { resolveGatewayEffectiveHost } from "../../config/gateway-bind.js";
|
|
3
4
|
import { resolveShareConfig } from "../../share/share-config.js";
|
|
4
5
|
import { mergeWithDefaults } from "../../share/site-share-config.js";
|
|
@@ -231,7 +232,7 @@ function successResult(locale, payload) {
|
|
|
231
232
|
artifacts: [{
|
|
232
233
|
artifactId: `share:${String(payload.shareUrl ?? "")}`,
|
|
233
234
|
title: String(payload.title ?? "Shared result"),
|
|
234
|
-
kind: payload.kind === "site" ? "site" : payload.kind === "zip" ? "archive" : "
|
|
235
|
+
kind: payload.kind === "site" ? "site" : payload.kind === "zip" ? "archive" : turnOutcomeKindFromFileName(String(payload.title ?? "Shared result")),
|
|
235
236
|
availability: "available",
|
|
236
237
|
location: "artifact_store",
|
|
237
238
|
capabilities: payload.kind === "site" ? ["preview", "share"] : ["download", "share"],
|
|
@@ -94,7 +94,8 @@ function createExecCommandTool(workspaceCwd, options) {
|
|
|
94
94
|
description: [
|
|
95
95
|
"Run shell commands for code inspection, builds, tests, type checks, and verification.",
|
|
96
96
|
"Use apply_patch for file edits; do not edit files by shell redirection unless explicitly necessary.",
|
|
97
|
-
"Relative cwd values resolve under the current agent workspace."
|
|
97
|
+
"Relative cwd values resolve under the current agent workspace.",
|
|
98
|
+
"When the command creates final user-facing files, call publish_artifacts afterward with all final paths."
|
|
98
99
|
].join(" "),
|
|
99
100
|
parameters: ExecCommandSchema,
|
|
100
101
|
label: "Run Command",
|
|
@@ -18,7 +18,7 @@ import type { ToolConcurrencyController as ToolConcurrencyControllerType } from
|
|
|
18
18
|
export interface ToolExecutorConfig {
|
|
19
19
|
/** Default per-tool timeout when the tool does not declare its own `timeoutMs`. */
|
|
20
20
|
defaultTimeoutMs: number;
|
|
21
|
-
/** Per-session policy
|
|
21
|
+
/** Per-session policy resolved from global defaults and agent overrides. */
|
|
22
22
|
resolveTimeoutMs?: (toolName: string) => number | undefined;
|
|
23
23
|
/** Max retry attempts for tools opted into retry via `idempotent: true`. */
|
|
24
24
|
maxRetries: number;
|
|
@@ -22,6 +22,7 @@ import { createWebFetchTool, createWebSearchTool } from "./web.js";
|
|
|
22
22
|
import { createWebExtractTool } from "./web-extract.js";
|
|
23
23
|
import { createMessageTool } from "./communication.js";
|
|
24
24
|
import { createSendMediaTool } from "./send-media.js";
|
|
25
|
+
import { createPublishArtifactsTool } from "./publish-artifacts.js";
|
|
25
26
|
import { createReadMediaTool } from "./media-read-tool.js";
|
|
26
27
|
import { createCreateShareTool, isShareToolAvailable } from "./create-share-tool.js";
|
|
27
28
|
import { createTodoTool } from "./todo-tool.js";
|
|
@@ -280,6 +281,7 @@ var AgentToolsFactory = class {
|
|
|
280
281
|
getConfig: () => this.deps.getConfig?.()
|
|
281
282
|
})] : [],
|
|
282
283
|
createSendMediaTool(workspace, bus, () => this.deps.getCurrentContext()),
|
|
284
|
+
createPublishArtifactsTool(workspace),
|
|
283
285
|
createReadMediaTool(),
|
|
284
286
|
...isShareToolAvailable(cfg) ? [createCreateShareTool({
|
|
285
287
|
workspace,
|
|
@@ -14,6 +14,7 @@ export { createWebSearchTool, createWebFetchTool } from './web.js';
|
|
|
14
14
|
export { createWebExtractTool, stripHtmlBoilerplate, DEFAULT_WEB_EXTRACT_MAX_LENGTH, MAX_RAW_HTML_CHARS_FOR_WEB_EXTRACT, } from './web-extract.js';
|
|
15
15
|
export { createMessageTool } from './communication.js';
|
|
16
16
|
export { createSendMediaTool } from './send-media.js';
|
|
17
|
+
export { createPublishArtifactsTool } from './publish-artifacts.js';
|
|
17
18
|
export { createReadMediaTool } from './media-read-tool.js';
|
|
18
19
|
export { createCreateShareTool, isShareToolAvailable, type CreateShareToolDeps, } from './create-share-tool.js';
|
|
19
20
|
export { createTodoTool, TodoStore, type TodoItem, type TodoStatus } from './todo-tool.js';
|
|
@@ -16,6 +16,7 @@ import { createWebFetchTool, createWebSearchTool } from "./web.js";
|
|
|
16
16
|
import { DEFAULT_WEB_EXTRACT_MAX_LENGTH, MAX_RAW_HTML_CHARS_FOR_WEB_EXTRACT, createWebExtractTool, stripHtmlBoilerplate } from "./web-extract.js";
|
|
17
17
|
import { createMessageTool } from "./communication.js";
|
|
18
18
|
import { createSendMediaTool } from "./send-media.js";
|
|
19
|
+
import { createPublishArtifactsTool } from "./publish-artifacts.js";
|
|
19
20
|
import { createReadMediaTool } from "./media-read-tool.js";
|
|
20
21
|
import { createCreateShareTool, isShareToolAvailable } from "./create-share-tool.js";
|
|
21
22
|
import { TodoStore, createTodoTool } from "./todo-tool.js";
|
|
@@ -42,4 +43,4 @@ import { createManagedJobTool } from "./managed-job-tool.js";
|
|
|
42
43
|
import { resolveImageModelConfigForTool } from "../image/tool-model-config.js";
|
|
43
44
|
import { createImageTool } from "./image-tool.js";
|
|
44
45
|
import { createImageGenerateTool, resolveImageGenerationModelConfigForTool } from "./image-generate-tool.js";
|
|
45
|
-
export { BrowserManager, DEFAULT_DELEGATE_TOOLS, DEFAULT_MAX_BYTES, DEFAULT_MAX_LINES, DEFAULT_TOOL_METADATA, DEFAULT_WEB_EXTRACT_MAX_LENGTH, DELEGATE_BLOCKED_TOOLS, GREP_MAX_LINE_LENGTH, MAX_RAW_HTML_CHARS_FOR_WEB_EXTRACT, SANDBOX_ALLOWED_TOOLS, TodoStore, ToolConcurrencyController, assertBrowserUrlAllowed, buildSandboxToolMap, createApplyPatchTool, createAutomationTool, createBrowserRecipeTool, createClarifyTool, createCreateShareTool, createDelegateTool, createDesktopPetTool, createDreamingTool, createExecCommandTool, createExecuteCodeTool, createFindTool, createGrepTool, createImageGenerateTool, createImageTool, createListDirTool, createManagedJobTool, createMemoryGetTool, createMemorySearchTool, createMessageTool, createReadFileTool, createReadMediaTool, createSendMediaTool, createSessionRecallTool, createSessionSearchTool, createSessionStatusTool, createSkillInstallTool, createSkillManageTool, createSkillViewTool, createSkillsListTool, createSkillsMarketplaceSearchTool, createTodoTool, createToolManualTool, createUpdatePlanTool, createWebExtractTool, createWebFetchTool, createWebSearchTool, createWorkflowTool, createWriteFileTool, createXopcUseTool, findTool, formatSize, fuzzyFindText, generateDiffString, getToolMetadata, grepTool, isShareToolAvailable, listDirTool, normalizeForFuzzyMatch, normalizeToLF, resolveImageGenerationModelConfigForTool, resolveImageModelConfigForTool, resolveToolLockMode, restoreLineEndings, stripBom, stripHtmlBoilerplate, truncateHead, truncateLine, truncateTail, writeFileTool };
|
|
46
|
+
export { BrowserManager, DEFAULT_DELEGATE_TOOLS, DEFAULT_MAX_BYTES, DEFAULT_MAX_LINES, DEFAULT_TOOL_METADATA, DEFAULT_WEB_EXTRACT_MAX_LENGTH, DELEGATE_BLOCKED_TOOLS, GREP_MAX_LINE_LENGTH, MAX_RAW_HTML_CHARS_FOR_WEB_EXTRACT, SANDBOX_ALLOWED_TOOLS, TodoStore, ToolConcurrencyController, assertBrowserUrlAllowed, buildSandboxToolMap, createApplyPatchTool, createAutomationTool, createBrowserRecipeTool, createClarifyTool, createCreateShareTool, createDelegateTool, createDesktopPetTool, createDreamingTool, createExecCommandTool, createExecuteCodeTool, createFindTool, createGrepTool, createImageGenerateTool, createImageTool, createListDirTool, createManagedJobTool, createMemoryGetTool, createMemorySearchTool, createMessageTool, createPublishArtifactsTool, createReadFileTool, createReadMediaTool, createSendMediaTool, createSessionRecallTool, createSessionSearchTool, createSessionStatusTool, createSkillInstallTool, createSkillManageTool, createSkillViewTool, createSkillsListTool, createSkillsMarketplaceSearchTool, createTodoTool, createToolManualTool, createUpdatePlanTool, createWebExtractTool, createWebFetchTool, createWebSearchTool, createWorkflowTool, createWriteFileTool, createXopcUseTool, findTool, formatSize, fuzzyFindText, generateDiffString, getToolMetadata, grepTool, isShareToolAvailable, listDirTool, normalizeForFuzzyMatch, normalizeToLF, resolveImageGenerationModelConfigForTool, resolveImageModelConfigForTool, resolveToolLockMode, restoreLineEndings, stripBom, stripHtmlBoilerplate, truncateHead, truncateLine, truncateTail, writeFileTool };
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { checkFileSafety } from "../prompt/safety.js";
|
|
2
|
+
import { resolvePathUnderWorkspace } from "./tool-paths.js";
|
|
3
|
+
import { turnOutcomeKindFromFileName, turnOutcomeMimeTypeFromFileName } from "../../../packages/gateway-contract/src/turn-outcome.js";
|
|
4
|
+
import { persistToolMedia } from "./tool-media.js";
|
|
5
|
+
import { basename, isAbsolute } from "node:path";
|
|
6
|
+
import { readFile } from "node:fs/promises";
|
|
7
|
+
import { Type } from "@sinclair/typebox";
|
|
8
|
+
//#region src/agent/tools/publish-artifacts.ts
|
|
9
|
+
const PublishArtifactsSchema = Type.Object({ paths: Type.Array(Type.String({ minLength: 1 }), {
|
|
10
|
+
minItems: 1,
|
|
11
|
+
maxItems: 50,
|
|
12
|
+
description: "Files to publish. Relative paths resolve under the current agent workspace."
|
|
13
|
+
}) });
|
|
14
|
+
function createPublishArtifactsTool(workspace) {
|
|
15
|
+
return {
|
|
16
|
+
name: "publish_artifacts",
|
|
17
|
+
label: "Publish Artifacts",
|
|
18
|
+
description: "Publish completed user-facing files into durable chat artifacts. Call this after exec_command or another runtime creates spreadsheets, presentations, PDFs, documents, archives, or other files. Pass every final deliverable together; do not publish temporary or source files.",
|
|
19
|
+
parameters: PublishArtifactsSchema,
|
|
20
|
+
mutationScope: "none",
|
|
21
|
+
supportsParallel: false,
|
|
22
|
+
idempotent: false,
|
|
23
|
+
async execute(toolCallId, params) {
|
|
24
|
+
const paths = [...new Set(params.paths.map((value) => value.trim()).filter(Boolean))];
|
|
25
|
+
if (paths.length === 0) throw new Error("At least one artifact path is required");
|
|
26
|
+
const artifacts = [];
|
|
27
|
+
const publishedPaths = /* @__PURE__ */ new Set();
|
|
28
|
+
for (const [index, inputPath] of paths.entries()) {
|
|
29
|
+
const resolved = resolvePathUnderWorkspace(inputPath, workspace);
|
|
30
|
+
if (publishedPaths.has(resolved)) continue;
|
|
31
|
+
publishedPaths.add(resolved);
|
|
32
|
+
try {
|
|
33
|
+
const safety = checkFileSafety("read", resolved);
|
|
34
|
+
if (!safety.allowed) throw new Error(safety.message);
|
|
35
|
+
const media = await persistToolMedia({
|
|
36
|
+
buffer: await readFile(resolved),
|
|
37
|
+
filePath: resolved
|
|
38
|
+
});
|
|
39
|
+
const kind = turnOutcomeKindFromFileName(media.name);
|
|
40
|
+
artifacts.push({
|
|
41
|
+
artifactId: media.id,
|
|
42
|
+
title: media.name,
|
|
43
|
+
kind,
|
|
44
|
+
mimeType: media.mimeType,
|
|
45
|
+
sizeBytes: media.size,
|
|
46
|
+
availability: "available",
|
|
47
|
+
location: "artifact_store",
|
|
48
|
+
capabilities: kind === "archive" || kind === "file" ? ["download"] : ["preview", "download"],
|
|
49
|
+
uri: media.uri
|
|
50
|
+
});
|
|
51
|
+
} catch {
|
|
52
|
+
const title = basename(resolved);
|
|
53
|
+
const mimeType = turnOutcomeMimeTypeFromFileName(title);
|
|
54
|
+
artifacts.push({
|
|
55
|
+
artifactId: `publish-failed:${toolCallId}:${index}`,
|
|
56
|
+
title,
|
|
57
|
+
kind: turnOutcomeKindFromFileName(title),
|
|
58
|
+
...mimeType ? { mimeType } : {},
|
|
59
|
+
availability: "failed",
|
|
60
|
+
location: isAbsolute(inputPath) ? "external_host" : "workspace",
|
|
61
|
+
capabilities: ["regenerate"]
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
const publishedCount = artifacts.filter((item) => item.availability === "available").length;
|
|
66
|
+
const failedCount = artifacts.length - publishedCount;
|
|
67
|
+
return {
|
|
68
|
+
content: [{
|
|
69
|
+
type: "text",
|
|
70
|
+
text: [
|
|
71
|
+
`${publishedCount} artifact${publishedCount === 1 ? "" : "s"} published`,
|
|
72
|
+
failedCount > 0 ? `${failedCount} failed` : "",
|
|
73
|
+
artifacts.map((item) => item.title).join(", ")
|
|
74
|
+
].filter(Boolean).join(": ")
|
|
75
|
+
}],
|
|
76
|
+
details: { artifacts }
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
//#endregion
|
|
82
|
+
export { createPublishArtifactsTool };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { checkFileSafety } from "../prompt/safety.js";
|
|
2
2
|
import { resolvePathUnderWorkspace } from "./tool-paths.js";
|
|
3
|
+
import { turnOutcomeKindFromFileName } from "../../../packages/gateway-contract/src/turn-outcome.js";
|
|
3
4
|
import { persistToolMedia } from "./tool-media.js";
|
|
4
5
|
import { basename } from "node:path";
|
|
5
6
|
import { readFile } from "fs/promises";
|
|
@@ -67,7 +68,7 @@ function createSendMediaTool(workspace, bus, getContext) {
|
|
|
67
68
|
artifacts: [{
|
|
68
69
|
artifactId: media.id,
|
|
69
70
|
title: media.name,
|
|
70
|
-
kind: media.type === "photo" ? "image" : media.type === "video" ? "video" : media.type === "audio" ? "audio" : media.
|
|
71
|
+
kind: media.type === "photo" ? "image" : media.type === "video" ? "video" : media.type === "audio" ? "audio" : turnOutcomeKindFromFileName(media.name),
|
|
71
72
|
mimeType: media.mimeType,
|
|
72
73
|
sizeBytes: media.size,
|
|
73
74
|
availability: "available",
|
|
@@ -143,11 +143,7 @@ function resolveDefinitionId(params, catalog, config, sessionKey) {
|
|
|
143
143
|
catalog.load(name);
|
|
144
144
|
return name;
|
|
145
145
|
}
|
|
146
|
-
const configuredDefault = config ? (
|
|
147
|
-
const policy = resolveEffectiveAgentProfileForSession(config, sessionKey).manifest.workflows;
|
|
148
|
-
const intent = params.intent?.trim().toLowerCase();
|
|
149
|
-
return (intent ? policy.suggested?.find((entry) => entry.intent.toLowerCase() === intent)?.workflow : void 0) ?? policy.default;
|
|
150
|
-
})() : void 0;
|
|
146
|
+
const configuredDefault = config ? resolveEffectiveAgentProfileForSession(config, sessionKey).config.workflows.default : void 0;
|
|
151
147
|
if (configuredDefault) {
|
|
152
148
|
catalog.load(configuredDefault);
|
|
153
149
|
return configuredDefault;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { AgentDefaultsSchema, AgentEntrySchema, AgentModelsDefaultsSchema, AgentModelsOverrideSchema, AgentProfileSchema, AgentsConfigSchema, DEFAULT_AGENT_MODEL_REF, EffectiveAgentConfigSchema, ImageGenerationRouteSchema, ModelIntentSchema, ModelRefSchema, ModelRouteSchema, RuntimePolicySchema, SkillDefaultsSchema, SkillOverrideSchema, ToolModeSchema, ToolPoliciesSchema, ToolPolicySchema, WorkflowPolicySchema, init_schema } from "./schema.js";
|
|
3
|
+
import { init_resolver, resolveEffectiveAgentConfig } from "./resolver.js";
|
|
4
|
+
//#region src/agent-config/index.ts
|
|
5
|
+
var init_agent_config = __esmMin((() => {
|
|
6
|
+
init_schema();
|
|
7
|
+
init_resolver();
|
|
8
|
+
}));
|
|
9
|
+
//#endregion
|
|
10
|
+
init_agent_config();
|
|
11
|
+
export { AgentDefaultsSchema, AgentEntrySchema, AgentModelsDefaultsSchema, AgentModelsOverrideSchema, AgentProfileSchema, AgentsConfigSchema, DEFAULT_AGENT_MODEL_REF, EffectiveAgentConfigSchema, ImageGenerationRouteSchema, ModelIntentSchema, ModelRefSchema, ModelRouteSchema, RuntimePolicySchema, SkillDefaultsSchema, SkillOverrideSchema, ToolModeSchema, ToolPoliciesSchema, ToolPolicySchema, WorkflowPolicySchema, init_agent_config, resolveEffectiveAgentConfig };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type AgentDefaults, type AgentEntry, type EffectiveAgentConfig } from './schema.js';
|
|
2
|
+
export type AgentConfigSource = 'system' | 'global' | 'agent';
|
|
3
|
+
export interface ResolveEffectiveAgentConfigResult {
|
|
4
|
+
config: EffectiveAgentConfig;
|
|
5
|
+
sources: Record<string, AgentConfigSource>;
|
|
6
|
+
}
|
|
7
|
+
export declare function resolveEffectiveAgentConfig(params: {
|
|
8
|
+
defaults: AgentDefaults;
|
|
9
|
+
agent: AgentEntry;
|
|
10
|
+
defaultWorkspace?: (agentId: string) => string;
|
|
11
|
+
}): ResolveEffectiveAgentConfigResult;
|