@xopcai/xopc 0.0.179 → 0.0.180
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/gateway/static/root/assets/{activity-store-A5FUMjeV.js → activity-store-DFKtQDgE.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-NghNiDWx.js → agent-avatar-dicebear-CcTvB_4W.js} +1 -1
- package/dist/gateway/static/root/assets/{agents-Baq8Shzy.js → agents-DgGj9bu6.js} +1 -1
- package/dist/gateway/static/root/assets/{api-Bmzslx0Z.js → api-CUClAvuL.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-DDWS_BBJ.js → app-management-settings-panel-Ib-cWKHM.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-C6znvVtX.js → appearance-settings-CRSN8WuA.js} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-d-Y0Jbe1.js → apps-page-B5xahuT-.js} +1 -1
- package/dist/gateway/static/root/assets/{archive-plugin-fvTZhPUr.js → archive-plugin-BBF9zspN.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-BFEgvg-Q.js → attachment-load-D3QQfA7w.js} +1 -1
- package/dist/gateway/static/root/assets/automations-page-BUYrvMmD.js +6 -0
- package/dist/gateway/static/root/assets/{binary-plugins-CuI2bOc7.js → binary-plugins-D78XOjJ3.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-Z_k8W0al.js → block-editor-D_VVXlYX.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-settings-page-CGApoYPr.js → browser-settings-page-Cjw07q9h.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-workflow-inputs-gs6b5e9-.js → browser-workflow-inputs-_gu08MA4.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-workflows-page-Cq5qXStp.js → browser-workflows-page-58DBMXgG.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-settings-panel-BC-8n4Hl.js → capabilities-settings-panel-D_dfVxHY.js} +1 -1
- package/dist/gateway/static/root/assets/{capability-presets-api-BTKhPoDC.js → capability-presets-api-DhCn9rPv.js} +1 -1
- package/dist/gateway/static/root/assets/{capability-presets-settings-panel-D7WQ0oBN.js → capability-presets-settings-panel-LWWIYUT7.js} +1 -1
- package/dist/gateway/static/root/assets/{channel-recipient-api-TwMak0SE.js → channel-recipient-api-DYtoNV5A.js} +1 -1
- package/dist/gateway/static/root/assets/{channels-settings-DysELlO_.js → channels-settings-Cyj5OunL.js} +1 -1
- package/dist/gateway/static/root/assets/channels-status-swr-TEFnV0IG.js +1 -0
- package/dist/gateway/static/root/assets/{connector-logo-DBKotvNr.js → connector-logo-CxIXnifA.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-page-QH-0WnOo.js → connectors-page-0TobCpBB.js} +2 -2
- package/dist/gateway/static/root/assets/{desktop-pet-Dwml8znf.js → desktop-pet-CwVSLL6N.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-CyIg2jJp.js → desktop-pet-settings-BOIp4q0Z.js} +1 -1
- package/dist/gateway/static/root/assets/{directory-picker-path-field-B6fc_7SL.js → directory-picker-path-field-C8_lsW6S.js} +1 -1
- package/dist/gateway/static/root/assets/{dreaming-settings-CUQxGnDf.js → dreaming-settings-Da9FeWQl.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-AbRNi2ON.js → extension-debug-page-CMNnSJP6.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-ClYfiLXC.js → extension-page-t0pJqLvM.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-BGVP2hw1.js → extension-settings-page-aiR-tKnW.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-api-B7GqtklK.js → gateway-config-api-CkyQBD6r.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-settings-BMeK8igT.js → gateway-settings-BIZfAgfB.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-startup-retry-CKKL96r_.js → gateway-startup-retry-CSU7UvzG.js} +1 -1
- package/dist/gateway/static/root/assets/{goals-settings-Dj0ao2qA.js → goals-settings-Dx9uTyWF.js} +1 -1
- package/dist/gateway/static/root/assets/{heartbeat-settings-CTI2nPKa.js → heartbeat-settings-Cnr5ORXL.js} +1 -1
- package/dist/gateway/static/root/assets/{image-generation-api-BY3VQ5Mv.js → image-generation-api-BR6Kb77X.js} +1 -1
- package/dist/gateway/static/root/assets/{index-BDzspHrg.js → index-BA56bQ68.js} +8 -8
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-CELtDFz3.js → keyboard-shortcuts-settings-D76uYKeQ.js} +1 -1
- package/dist/gateway/static/root/assets/{local-app-workbench-page-m8CTSGix.js → local-app-workbench-page-DSUNtLHg.js} +1 -1
- package/dist/gateway/static/root/assets/{local-apps-page-CF5uUd1n.js → local-apps-page-BsLnojTh.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-DIVc0AQs.js → locale-store-BNC8HUCI.js} +1 -1
- package/dist/gateway/static/root/assets/{logs-page-DmH7Tk4k.js → logs-page-yI8kpQtO.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-split-CN85EdB8.js → markdown-split-D6smTQWD.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-CxYEc-b8.js → media-plugins-D1TmMF0A.js} +1 -1
- package/dist/gateway/static/root/assets/{messages-DYqBwJAK.js → messages-H_iJjnEM.js} +3 -3
- package/dist/gateway/static/root/assets/{notes-page-Goab4781.js → notes-page-Vt-diFf0.js} +1 -1
- package/dist/gateway/static/root/assets/{notes-workbench-C4jDBVBN.js → notes-workbench-BD297EZt.js} +2 -2
- package/dist/gateway/static/root/assets/{outcome-detail-page-DNRfeLZp.js → outcome-detail-page-C5i_ZR9a.js} +1 -1
- package/dist/gateway/static/root/assets/{page-tabs-tQNQcAts.js → page-tabs-BnSzIjH0.js} +1 -1
- package/dist/gateway/static/root/assets/{preview-open-alternatives-BSTlgsDB.js → preview-open-alternatives-CF12Eqi4.js} +1 -1
- package/dist/gateway/static/root/assets/{product-open-page-iQ5gTCip.js → product-open-page-Du0TE_CU.js} +1 -1
- package/dist/gateway/static/root/assets/{project-detail-page-D7anK-eu.js → project-detail-page-D1HGz7Dy.js} +1 -1
- package/dist/gateway/static/root/assets/{projects-page-BePESKWy.js → projects-page-CqP2TnW-.js} +1 -1
- package/dist/gateway/static/root/assets/{remote-access-hub-CHrzBKIs.js → remote-access-hub-BXdVJLS3.js} +1 -1
- package/dist/gateway/static/root/assets/{save-bar-controls-BsPf5Gkk.js → save-bar-controls-B53UNtDM.js} +1 -1
- package/dist/gateway/static/root/assets/{schedule-field-kAytH7mq.js → schedule-field-C3dIMN5q.js} +1 -1
- package/dist/gateway/static/root/assets/{schema-form-Bbw8l2ri.js → schema-form-BKvpxqof.js} +1 -1
- package/dist/gateway/static/root/assets/{sessions-page-He5YAczL.js → sessions-page-CPAwDdl5.js} +1 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-C-jGsoft.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-BqbibcnJ.js → settings-form-section-kt6GIS32.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-loading-skeleton-DNLNCEGT.js → settings-loading-skeleton-85eUPcKz.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-BR6Ss0bK.js → settings-page-Di5x6Xrc.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-layout-Cdb1e2Cz.js → settings-page-layout-CkkCee_x.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-status-panel-moT-D-ia.js → setup-status-panel-uxEE6gAB.js} +1 -1
- package/dist/gateway/static/root/assets/{share-preview-page-CkrASny2.js → share-preview-page-BtLEstaI.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-settings-X49zY21H.js → shares-settings-2mcsMWgn.js} +1 -1
- package/dist/gateway/static/root/assets/skill-reload-api-ocDwsrEt.js +1 -0
- package/dist/gateway/static/root/assets/skills-page-9_jfsFU5.js +2 -0
- package/dist/gateway/static/root/assets/{skills-page.utils-BG5dGkyA.js → skills-page.utils-C2SHvq8V.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-XdY8eyYf.js → system-settings-panel-CIJ66cUy.js} +1 -1
- package/dist/gateway/static/root/assets/{theme-store-DtwI_VLT.js → theme-store-ClDa_Bci.js} +1 -1
- package/dist/gateway/static/root/assets/{time-picker-UghsQu_I.js → time-picker-D0zAsHOo.js} +1 -1
- package/dist/gateway/static/root/assets/{typed-models-lib-DOnpwsrE.js → typed-models-lib-GsmwmB40.js} +1 -1
- package/dist/gateway/static/root/assets/{use-channel-catalog-BWDtfNvQ.js → use-channel-catalog-BQz3K7xj.js} +1 -1
- package/dist/gateway/static/root/assets/{user-context-page-BtNBEtKj.js → user-context-page-Bn4BLg4W.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-api-key-field-DP80jW-W.js → voice-api-key-field-Blaxsbb3.js} +1 -1
- package/dist/gateway/static/root/assets/{work-copy-hQmivDgT.js → work-copy-Cwyan9Sn.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-page-CkDOVZBr.js → work-discovery-page-iJ9RBSpu.js} +1 -1
- package/dist/gateway/static/root/assets/{work-item-detail-page-CqvkcFcR.js → work-item-detail-page-CqTH7PQX.js} +1 -1
- package/dist/gateway/static/root/assets/{work-page-BL8TZW4Z.js → work-page-H3m99ccS.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-BLlVqKdA.js → workflow-run-setup-panel-CTG4RpRE.js} +1 -1
- package/dist/gateway/static/root/assets/{workflows-page-BgsdRu3_.js → workflows-page-BxZSKMfv.js} +1 -1
- package/dist/gateway/static/root/index.html +6 -6
- package/dist/package.js +1 -1
- package/dist/src/agent/agent-manager.d.ts +4 -1
- package/dist/src/agent/agent-manager.js +21 -7
- package/dist/src/agent/bootstrap/filter-bootstrap-files.js +1 -1
- package/dist/src/agent/embedded/model-runtime.js +1 -1
- package/dist/src/agent/embedded/run-for-session.d.ts +2 -0
- package/dist/src/agent/embedded/run-for-session.js +3 -1
- package/dist/src/agent/goals/post-turn.js +1 -1
- package/dist/src/agent/image/tool-model-config.js +1 -1
- package/dist/src/agent/inbound/turn-dispatcher.d.ts +6 -1
- package/dist/src/agent/inbound/turn-dispatcher.js +5 -2
- package/dist/src/agent/ipc/inbox.js +1 -1
- package/dist/src/agent/lifecycle/timeout-wrapper.d.ts +2 -0
- package/dist/src/agent/lifecycle/timeout-wrapper.js +39 -9
- package/dist/src/agent/mcp/bundle-mcp-materialize.js +2 -2
- package/dist/src/agent/mcp/bundle-mcp-runtime.js +6 -1
- package/dist/src/agent/mcp/bundle-mcp-types.d.ts +1 -1
- package/dist/src/agent/mcp/mcp-transport-config.d.ts +2 -0
- package/dist/src/agent/mcp/mcp-transport-config.js +10 -3
- package/dist/src/agent/mcp/mcp-transport.d.ts +1 -0
- package/dist/src/agent/mcp/mcp-transport.js +5 -2
- package/dist/src/agent/memory/dreaming/config.js +1 -1
- package/dist/src/agent/orchestration/run-agent-turn-with-timeout.d.ts +1 -1
- package/dist/src/agent/orchestration/run-agent-turn-with-timeout.js +6 -2
- package/dist/src/agent/service/direct-turn-helpers.d.ts +1 -0
- package/dist/src/agent/service/direct-turn-helpers.js +1 -0
- package/dist/src/agent/service/process-direct-one-shot.d.ts +3 -0
- package/dist/src/agent/service/process-direct-one-shot.js +4 -1
- package/dist/src/agent/service.d.ts +1 -0
- package/dist/src/agent/service.js +5 -2
- package/dist/src/agent/session/session-inspector.js +1 -1
- package/dist/src/agent/skills/config.js +6 -0
- package/dist/src/agent/skills/filesystem-watcher.d.ts +4 -0
- package/dist/src/agent/skills/filesystem-watcher.js +16 -7
- package/dist/src/agent/skills/hub-lock.js +1 -1
- package/dist/src/agent/skills/index.d.ts +10 -7
- package/dist/src/agent/skills/index.js +56 -47
- package/dist/src/agent/skills/skill-manage-ops.js +1 -1
- package/dist/src/agent/skills/skill-manager.d.ts +5 -2
- package/dist/src/agent/skills/skill-manager.js +10 -5
- package/dist/src/agent/skills/skill-sources.d.ts +18 -0
- package/dist/src/agent/skills/skill-sources.js +143 -0
- package/dist/src/agent/skills/types.d.ts +25 -2
- package/dist/src/agent/tools/delegate-tool.js +2 -1
- package/dist/src/agent/tools/executor.d.ts +2 -0
- package/dist/src/agent/tools/executor.js +18 -11
- 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/managed-job-tool.d.ts +2 -0
- package/dist/src/agent/tools/managed-job-tool.js +160 -0
- package/dist/src/agent/workspace-runtime/registry.d.ts +3 -0
- package/dist/src/agent/workspace-runtime/registry.js +3 -1
- package/dist/src/agent-runtime/index.js +1 -1
- package/dist/src/agent-runtime/runtime-profile.js +1 -1
- package/dist/src/auth/credentials.d.ts +9 -1
- package/dist/src/auth/credentials.js +112 -56
- package/dist/src/auth/model-credential-store.js +7 -22
- package/dist/src/auth/oauth-provider-lock.d.ts +5 -0
- package/dist/src/auth/oauth-provider-lock.js +91 -0
- package/dist/src/auth/profiles/store.js +1 -1
- package/dist/src/auth/sync-provider-auth.js +2 -2
- package/dist/src/automations/domain/defaults.d.ts +8 -1
- package/dist/src/automations/domain/defaults.js +9 -2
- package/dist/src/automations/domain/index.js +2 -2
- package/dist/src/automations/domain/types.d.ts +33 -7
- package/dist/src/automations/domain/validation.d.ts +8 -0
- package/dist/src/automations/domain/validation.js +2 -0
- package/dist/src/automations/draft/automation-draft-validator.d.ts +2 -1
- package/dist/src/automations/index.js +2 -2
- package/dist/src/automations/service/action-executor.d.ts +2 -2
- package/dist/src/automations/service/action-executor.js +144 -34
- package/dist/src/automations/service/automation-service.d.ts +4 -0
- package/dist/src/automations/service/automation-service.js +197 -18
- package/dist/src/automations/storage/automation-run-repository.d.ts +1 -0
- package/dist/src/automations/storage/automation-run-repository.js +37 -7
- package/dist/src/automations/storage/index.js +2 -2
- package/dist/src/browser/providers/browser-ext-install.js +1 -1
- package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
- package/dist/src/cli/commands/doctor/checks/provider-auth.js +1 -1
- package/dist/src/cli/commands/models.js +1 -1
- package/dist/src/cli/utils/oauth-login.js +1 -7
- package/dist/src/config/agent-profile.js +1 -1
- package/dist/src/config/index.js +4 -4
- package/dist/src/config/loader.js +1 -1
- package/dist/src/config/models-json.js +1 -1
- package/dist/src/config/schema.d.ts +3 -0
- package/dist/src/config/schema.js +2 -1
- package/dist/src/extensions/lockfile.js +1 -1
- package/dist/src/gateway/agents-admin.js +2 -2
- package/dist/src/gateway/file-path-classifier.js +1 -1
- package/dist/src/gateway/heartbeat/service.js +1 -1
- package/dist/src/gateway/hono/lib/config-payload.js +1 -1
- package/dist/src/gateway/hono/oauth-async.js +1 -7
- package/dist/src/gateway/hono/oauth.js +1 -7
- package/dist/src/gateway/hono/routes/models.js +1 -1
- package/dist/src/gateway/hono/routes/you.js +1 -1
- package/dist/src/gateway/service/config-coordinator.js +1 -1
- package/dist/src/gateway/service.js +3 -3
- package/dist/src/goals/goal-workflow-judge.js +1 -1
- package/dist/src/heartbeat/index.js +1 -1
- package/dist/src/notes/service.js +1 -1
- package/dist/src/projects/project-loop.js +3 -3
- package/dist/src/providers/auth-runtime/oauth.js +12 -0
- package/dist/src/providers/auth-runtime/resolve-auth.js +1 -1
- package/dist/src/providers/index.js +2 -2
- package/dist/src/providers/model-registry.js +1 -1
- package/dist/src/providers/register-runtime-providers.js +1 -1
- package/dist/src/storage/sqlite/migrations/088_automation_execution_deadlines.sql +5 -0
- package/dist/src/storage/sqlite/migrations/089_automation_run_leases.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/tui/backends/embedded-backend.d.ts +2 -0
- package/dist/src/tui/backends/embedded-backend.js +11 -7
- package/dist/src/tui/tui-backend.d.ts +2 -0
- package/dist/src/tui/tui-oauth-login.js +1 -7
- package/dist/src/tui/tui-picker-overlay.js +1 -0
- package/dist/src/tui/tui-picker-services.d.ts +1 -0
- package/dist/src/tui/tui-skills-autocomplete.d.ts +6 -2
- package/dist/src/tui/tui-skills-autocomplete.js +10 -6
- package/dist/src/tui/tui-startup-resources.d.ts +3 -1
- package/dist/src/tui/tui-startup-resources.js +4 -3
- package/dist/src/tui/tui.js +4 -1
- package/dist/src/work/home-query-service.d.ts +31 -2
- package/dist/src/work/home-query-service.js +4 -4
- package/dist/src/work/index.js +2 -2
- package/dist/src/workflows/service/workflow-run-service.js +1 -1
- package/dist/src/workflows/service/workflow-run-service.types.d.ts +3 -1
- package/package.json +1 -1
- package/dist/gateway/static/root/assets/automations-page-CFYOCBlQ.js +0 -6
- package/dist/gateway/static/root/assets/channels-status-swr-BAC-R8IK.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-2eAC9GCP.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-CjpnFfOH.js +0 -1
- package/dist/gateway/static/root/assets/skills-page-DEwfSOUE.js +0 -2
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png?v=20260713-1" />
|
|
12
12
|
<link rel="manifest" href="/site.webmanifest?v=20260713-1" />
|
|
13
13
|
<title>XOPC — Turn goals into loops. Keep what matters moving.</title>
|
|
14
|
-
<script type="module" crossorigin src="/assets/index-
|
|
14
|
+
<script type="module" crossorigin src="/assets/index-BA56bQ68.js"></script>
|
|
15
15
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-aKtaBQYM.js">
|
|
16
16
|
<link rel="modulepreload" crossorigin href="/assets/preload-helper-zJ_50EbN.js">
|
|
17
17
|
<link rel="modulepreload" crossorigin href="/assets/vendor-react-BOUWij0V.js">
|
|
@@ -23,16 +23,16 @@
|
|
|
23
23
|
<link rel="modulepreload" crossorigin href="/assets/createLucideIcon-DPHK1VkS.js">
|
|
24
24
|
<link rel="modulepreload" crossorigin href="/assets/check-DUBLcKHA.js">
|
|
25
25
|
<link rel="modulepreload" crossorigin href="/assets/middleware-Pd0e8Igk.js">
|
|
26
|
-
<link rel="modulepreload" crossorigin href="/assets/messages-
|
|
27
|
-
<link rel="modulepreload" crossorigin href="/assets/locale-store-
|
|
26
|
+
<link rel="modulepreload" crossorigin href="/assets/messages-H_iJjnEM.js">
|
|
27
|
+
<link rel="modulepreload" crossorigin href="/assets/locale-store-BNC8HUCI.js">
|
|
28
28
|
<link rel="modulepreload" crossorigin href="/assets/cn-JdwAhgNB.js">
|
|
29
29
|
<link rel="modulepreload" crossorigin href="/assets/schemas-C6onAggk.js">
|
|
30
30
|
<link rel="modulepreload" crossorigin href="/assets/product-delivery-BVG-eWQO.js">
|
|
31
31
|
<link rel="modulepreload" crossorigin href="/assets/config-reload-event-Bjh2zoKp.js">
|
|
32
32
|
<link rel="modulepreload" crossorigin href="/assets/copy-to-clipboard-HOJ79TWv.js">
|
|
33
|
-
<link rel="modulepreload" crossorigin href="/assets/gateway-startup-retry-
|
|
34
|
-
<link rel="modulepreload" crossorigin href="/assets/activity-store-
|
|
35
|
-
<link rel="modulepreload" crossorigin href="/assets/theme-store-
|
|
33
|
+
<link rel="modulepreload" crossorigin href="/assets/gateway-startup-retry-CSU7UvzG.js">
|
|
34
|
+
<link rel="modulepreload" crossorigin href="/assets/activity-store-DFKtQDgE.js">
|
|
35
|
+
<link rel="modulepreload" crossorigin href="/assets/theme-store-ClDa_Bci.js">
|
|
36
36
|
<link rel="stylesheet" crossorigin href="/assets/index-B0Tdge_q.css">
|
|
37
37
|
</head>
|
|
38
38
|
<body>
|
package/dist/package.js
CHANGED
|
@@ -30,8 +30,10 @@ export interface SkillCatalogEntry {
|
|
|
30
30
|
description: string;
|
|
31
31
|
category?: string;
|
|
32
32
|
source: Skill['source'];
|
|
33
|
+
origin: Skill['origin']['id'];
|
|
33
34
|
path: string;
|
|
34
35
|
managed: boolean;
|
|
36
|
+
writable: boolean;
|
|
35
37
|
/** User toggle in ~/.xopc/skills.json (`entries[name].enabled`). Default true. */
|
|
36
38
|
enabled: boolean;
|
|
37
39
|
/** When true, skill is never injected into `<available_skills>` (SKILL.md frontmatter). */
|
|
@@ -230,7 +232,8 @@ export declare class AgentManager implements AgentInstanceGateway {
|
|
|
230
232
|
/**
|
|
231
233
|
* Reload skills from disk and refresh system prompt on all active Agent instances.
|
|
232
234
|
*/
|
|
233
|
-
refreshSkillsAfterDiskChange(source?: 'explicit' | 'watch'): void;
|
|
235
|
+
refreshSkillsAfterDiskChange(source?: 'explicit' | 'watch' | 'trust'): void;
|
|
236
|
+
refreshSkillsAfterTrustChange(): void;
|
|
234
237
|
private scheduleSkillsUpdated;
|
|
235
238
|
private applySkillsAfterDiskChange;
|
|
236
239
|
/**
|
|
@@ -2,15 +2,15 @@ import { resolveStateDir } from "../config/paths-state.js";
|
|
|
2
2
|
import { createLogger } from "../utils/logger/index.js";
|
|
3
3
|
import { init_logger } from "../utils/logger.js";
|
|
4
4
|
import { getAgentDefaultModelRef, init_schema } from "../config/schema.js";
|
|
5
|
-
import { applyConfigOverrides } from "../config/runtime-overrides.js";
|
|
6
5
|
import { expandWorkspacePathString, init_workspace_path } from "../config/workspace-path.js";
|
|
7
6
|
import { init_agent_scope, resolveAgentProfileDir } from "./agent-scope.js";
|
|
8
|
-
import { resolveEffectiveAgentProfile, resolveEffectiveAgentProfileForSession } from "../config/agent-profile.js";
|
|
9
7
|
import { init_paths, resolveBundledSkillsDir, resolveUserProfilePath } from "../config/paths.js";
|
|
10
|
-
import { init_sync_provider_auth, resolveProviderApiKeySync } from "../auth/sync-provider-auth.js";
|
|
11
8
|
import { CredentialResolver, init_credentials } from "../auth/credentials.js";
|
|
9
|
+
import { init_sync_provider_auth, resolveProviderApiKeySync } from "../auth/sync-provider-auth.js";
|
|
12
10
|
import { getApiKeySync, getDefaultModelSync, init_providers, resolveModel } from "../providers/index.js";
|
|
13
11
|
import { createExtensionAwareStreamFn } from "../providers/extension-stream-bridge.js";
|
|
12
|
+
import { applyConfigOverrides } from "../config/runtime-overrides.js";
|
|
13
|
+
import { resolveEffectiveAgentProfile, resolveEffectiveAgentProfileForSession } from "../config/agent-profile.js";
|
|
14
14
|
import { extractTextContent } from "./context/workspace.js";
|
|
15
15
|
import { buildExecutionScopeContextForPrompt } from "./context/execution-scope.js";
|
|
16
16
|
import { clearBootstrapSnapshot } from "./bootstrap/bootstrap-cache.js";
|
|
@@ -117,6 +117,7 @@ var AgentManager = class {
|
|
|
117
117
|
this.workspaceRuntimes = new WorkspaceRuntimeRegistry({
|
|
118
118
|
getConfig: () => this.config.config,
|
|
119
119
|
bundledSkillsDir: resolveBundledSkillsDir(),
|
|
120
|
+
isWorkspaceTrusted: (resolvedPath) => this.isProjectWorkspaceTrusted(resolvedPath),
|
|
120
121
|
onRuntimeCreated: (resolvedPath) => {
|
|
121
122
|
this.skillFilesystemWatcher.watchWorkspace(resolvedPath);
|
|
122
123
|
}
|
|
@@ -224,6 +225,11 @@ var AgentManager = class {
|
|
|
224
225
|
getCurrentContext: this.config.getCurrentContext,
|
|
225
226
|
hookRunner: this.config.hookRunner,
|
|
226
227
|
bus: this.config.bus,
|
|
228
|
+
toolExecutorConfig: { resolveTimeoutMs: (toolName) => {
|
|
229
|
+
const config = this.mergedConfig();
|
|
230
|
+
const sessionKey = this.config.getCurrentContext?.()?.sessionKey;
|
|
231
|
+
return resolveEffectiveAgentProfileForSession(config, sessionKey).manifest.tools.builtin[toolName]?.limits?.timeoutMs;
|
|
232
|
+
} },
|
|
227
233
|
getConfig: () => this.mergedConfig(),
|
|
228
234
|
getPrimaryModel: () => this.resolveModelStringToModel(this.pickDefaultModelRef()),
|
|
229
235
|
getMemoryManager: () => this.getCurrentWorkspaceRuntime().memoryManager,
|
|
@@ -454,7 +460,9 @@ var AgentManager = class {
|
|
|
454
460
|
const base = resolve(s.baseDir);
|
|
455
461
|
const workspaceRoot = workspaceDir ? resolveWorkspaceSkillsDir(workspaceDir) : "";
|
|
456
462
|
const workspaceManaged = workspaceRoot ? s.source === "workspace" && base.startsWith(resolve(workspaceRoot) + sep) : false;
|
|
457
|
-
const
|
|
463
|
+
const globalManaged = isUnderManagedSkillsDir(s.baseDir);
|
|
464
|
+
const managed = s.origin.managed && (globalManaged || workspaceManaged);
|
|
465
|
+
const writable = managed && s.origin.writable;
|
|
458
466
|
const directoryId = base.split(sep).filter(Boolean).pop() || s.name;
|
|
459
467
|
const enabled = !(skillsConfig.entries?.[s.name]?.enabled === false);
|
|
460
468
|
const hubKey = managed ? basename(base) : "";
|
|
@@ -465,8 +473,10 @@ var AgentManager = class {
|
|
|
465
473
|
description: s.description,
|
|
466
474
|
category: s.category,
|
|
467
475
|
source: s.source,
|
|
476
|
+
origin: s.origin.id,
|
|
468
477
|
path: s.baseDir,
|
|
469
478
|
managed,
|
|
479
|
+
writable,
|
|
470
480
|
enabled,
|
|
471
481
|
disableModelInvocation: s.disableModelInvocation,
|
|
472
482
|
...hub ? { hub } : {}
|
|
@@ -570,6 +580,7 @@ var AgentManager = class {
|
|
|
570
580
|
return;
|
|
571
581
|
}
|
|
572
582
|
if (source === "explicit") this.lastExplicitSkillDiskRefreshAt = now;
|
|
583
|
+
this.skillFilesystemWatcher.refreshPrimaryWorkspace(this.baseWorkspacePath);
|
|
573
584
|
if (this.skillDiskRefreshInProgress) {
|
|
574
585
|
this.skillDiskRefreshPending = true;
|
|
575
586
|
return;
|
|
@@ -579,7 +590,7 @@ var AgentManager = class {
|
|
|
579
590
|
try {
|
|
580
591
|
do {
|
|
581
592
|
this.skillDiskRefreshPending = false;
|
|
582
|
-
this.applySkillsAfterDiskChange();
|
|
593
|
+
this.applySkillsAfterDiskChange(source === "trust" ? "trust" : "disk");
|
|
583
594
|
refreshed = true;
|
|
584
595
|
} while (this.skillDiskRefreshPending);
|
|
585
596
|
} finally {
|
|
@@ -587,6 +598,9 @@ var AgentManager = class {
|
|
|
587
598
|
}
|
|
588
599
|
if (refreshed) this.scheduleSkillsUpdated("disk");
|
|
589
600
|
}
|
|
601
|
+
refreshSkillsAfterTrustChange() {
|
|
602
|
+
this.refreshSkillsAfterDiskChange("trust");
|
|
603
|
+
}
|
|
590
604
|
scheduleSkillsUpdated(reason) {
|
|
591
605
|
this.pendingSkillsUpdatedReason = reason === "disk" ? "disk" : this.pendingSkillsUpdatedReason ?? "config";
|
|
592
606
|
if (this.skillsUpdatedTimer) clearTimeout(this.skillsUpdatedTimer);
|
|
@@ -597,9 +611,9 @@ var AgentManager = class {
|
|
|
597
611
|
this.config.onSkillsUpdated?.({ reason: nextReason });
|
|
598
612
|
}, 250);
|
|
599
613
|
}
|
|
600
|
-
applySkillsAfterDiskChange() {
|
|
614
|
+
applySkillsAfterDiskChange(reason = "disk") {
|
|
601
615
|
const cfg = this.config.config;
|
|
602
|
-
for (const rt of this.workspaceRuntimes.values()) rt.skillManager.reload();
|
|
616
|
+
for (const rt of this.workspaceRuntimes.values()) rt.skillManager.reload(reason);
|
|
603
617
|
for (const instance of this.agents.values()) {
|
|
604
618
|
const resolvedWorkspacePath = this.getResolvedWorkspaceForSession(instance.sessionKey);
|
|
605
619
|
const rt = this.workspaceRuntimes.getOrCreate(resolvedWorkspacePath, instance.effectiveProfile.agentId);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isCronSessionKey, isSubagentSessionKey } from "../../routing/session-key-utils.js";
|
|
2
|
-
import { init_session_key } from "../../routing/session-key.js";
|
|
3
2
|
import { USER_PROFILE_FILENAME, init_paths } from "../../config/paths.js";
|
|
3
|
+
import { init_session_key } from "../../routing/session-key.js";
|
|
4
4
|
import { DEFAULT_AGENTS_FILENAME, DEFAULT_IDENTITY_FILENAME, DEFAULT_SOUL_FILENAME, DEFAULT_TOOLS_FILENAME } from "../context/workspace.js";
|
|
5
5
|
//#region src/agent/bootstrap/filter-bootstrap-files.ts
|
|
6
6
|
init_paths();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { init_paths, resolveModelsJsonPath } from "../../config/paths.js";
|
|
2
|
-
import { init_sync_provider_auth, resolveProviderApiKeySync } from "../../auth/sync-provider-auth.js";
|
|
3
2
|
import { CredentialResolver, init_credentials } from "../../auth/credentials.js";
|
|
3
|
+
import { init_sync_provider_auth, resolveProviderApiKeySync } from "../../auth/sync-provider-auth.js";
|
|
4
4
|
import { XopcModelCredentialStore, init_model_credential_store } from "../../auth/model-credential-store.js";
|
|
5
5
|
import { init_register_bundled_oauth_flows, registerBundledOAuthFlows } from "../../providers/register-bundled-oauth-flows.js";
|
|
6
6
|
import { init_register_runtime_providers, registerRuntimeProviders } from "../../providers/register-runtime-providers.js";
|
|
@@ -14,6 +14,8 @@ export type RunEmbeddedForSessionParams = {
|
|
|
14
14
|
modelManager: ModelManager;
|
|
15
15
|
thinkingOverride?: string | null;
|
|
16
16
|
abortSignal?: AbortSignal;
|
|
17
|
+
/** Absolute parent deadline. The turn's own timeout is capped to the remaining budget. */
|
|
18
|
+
deadlineAtMs?: number;
|
|
17
19
|
onEvent?: (event: EmbeddedStreamEvent) => void;
|
|
18
20
|
getConfig?: () => Config | undefined;
|
|
19
21
|
beforeTurn?: () => void | Promise<void>;
|
|
@@ -48,6 +48,8 @@ async function runEmbeddedTurnForSession(params) {
|
|
|
48
48
|
const thinkingLevel = params.thinkingOverride ?? agent.state.thinkingLevel;
|
|
49
49
|
const workspaceDir = agentManager.getResolvedWorkspaceForSession(sessionKey);
|
|
50
50
|
const config = params.getConfig?.();
|
|
51
|
+
const configuredTurnTimeoutMs = resolveAgentTurnTimeoutMs(config, sessionKey);
|
|
52
|
+
const turnTimeoutMs = params.deadlineAtMs === void 0 ? configuredTurnTimeoutMs : Math.max(1, Math.min(configuredTurnTimeoutMs, params.deadlineAtMs - Date.now()));
|
|
51
53
|
let userMessageForTurn = userMessage;
|
|
52
54
|
if (params.applyStartupContext !== false) userMessageForTurn = await applyStartupContextToUserMessage({
|
|
53
55
|
userMessage,
|
|
@@ -123,7 +125,7 @@ async function runEmbeddedTurnForSession(params) {
|
|
|
123
125
|
thinkingLevel,
|
|
124
126
|
workspaceDir,
|
|
125
127
|
sessionStore,
|
|
126
|
-
timeoutMs:
|
|
128
|
+
timeoutMs: turnTimeoutMs,
|
|
127
129
|
abortSignal: params.abortSignal,
|
|
128
130
|
onEvent: params.onEvent,
|
|
129
131
|
resumeLastUserMessage
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
3
|
import { getAgentDefaultModelRef, init_schema } from "../../config/schema.js";
|
|
4
|
+
import { resolveGoalUiLocale } from "./goal-locale.js";
|
|
4
5
|
import { resolveEffectiveAgentProfileForSession } from "../../config/agent-profile.js";
|
|
5
6
|
import { GoalService } from "../../goals/goal-service.js";
|
|
6
7
|
import { OutcomeRepository } from "../../work/outcome-repository.js";
|
|
7
|
-
import { resolveGoalUiLocale } from "./goal-locale.js";
|
|
8
8
|
import { evaluateAfterTurnHermesLike } from "./evaluate-turn.js";
|
|
9
9
|
import "../../goals/index.js";
|
|
10
10
|
//#region src/agent/goals/post-turn.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
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 { resolveEffectiveAgentManifestForAgent } from "../../config/agent-profile.js";
|
|
4
3
|
import { getDefaultModelSync, getModelsByProvider, init_providers, isProviderConfiguredSync, resolveModel } from "../../providers/index.js";
|
|
4
|
+
import { resolveEffectiveAgentManifestForAgent } from "../../config/agent-profile.js";
|
|
5
5
|
import { resolveAgentModelFallbackValues, resolveAgentModelPrimaryValue } from "../../config/model-input.js";
|
|
6
6
|
//#region src/agent/image/tool-model-config.ts
|
|
7
7
|
init_schema();
|
|
@@ -57,12 +57,17 @@ export interface TurnDispatcherConfig {
|
|
|
57
57
|
sourceContextResolver?: AgentSourceContextResolver;
|
|
58
58
|
}
|
|
59
59
|
export type DirectAttachment = InboundAttachmentInput;
|
|
60
|
+
export interface ProcessDirectOptions {
|
|
61
|
+
signal?: AbortSignal;
|
|
62
|
+
runId?: string;
|
|
63
|
+
deadlineAtMs?: number;
|
|
64
|
+
}
|
|
60
65
|
export declare class TurnDispatcher {
|
|
61
66
|
private readonly cfg;
|
|
62
67
|
private readonly log;
|
|
63
68
|
constructor(cfg: TurnDispatcherConfig);
|
|
64
69
|
/** One-shot direct turn (CLI / embedded TUI). */
|
|
65
|
-
processDirect(content: string, sessionKey?: string, attachments?: DirectAttachment[], thinking?: string): Promise<string>;
|
|
70
|
+
processDirect(content: string, sessionKey?: string, attachments?: DirectAttachment[], thinking?: string, options?: ProcessDirectOptions): Promise<string>;
|
|
66
71
|
/** Streaming direct turn (webchat SSE / CLI streaming). */
|
|
67
72
|
processDirectStreaming(content: string, sessionKey?: string, attachments?: DirectAttachment[], thinking?: string, options?: {
|
|
68
73
|
signal?: AbortSignal;
|
|
@@ -12,12 +12,15 @@ var TurnDispatcher = class {
|
|
|
12
12
|
this.log = cfg.log;
|
|
13
13
|
}
|
|
14
14
|
/** One-shot direct turn (CLI / embedded TUI). */
|
|
15
|
-
processDirect(content, sessionKey = "agent:main:main", attachments, thinking) {
|
|
15
|
+
processDirect(content, sessionKey = "agent:main:main", attachments, thinking, options) {
|
|
16
16
|
return runProcessDirect(this.buildOneShotDeps(), {
|
|
17
17
|
content,
|
|
18
18
|
sessionKey,
|
|
19
19
|
attachments,
|
|
20
|
-
thinking
|
|
20
|
+
thinking,
|
|
21
|
+
signal: options?.signal,
|
|
22
|
+
runId: options?.runId,
|
|
23
|
+
deadlineAtMs: options?.deadlineAtMs
|
|
21
24
|
});
|
|
22
25
|
}
|
|
23
26
|
/** Streaming direct turn (webchat SSE / CLI streaming). */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
-
import { init_paths, resolveAgentDir } from "../../config/paths.js";
|
|
4
3
|
import { init_write_file_atomic, writeTextAtomic } from "../../infra/write-file-atomic.js";
|
|
4
|
+
import { init_paths, resolveAgentDir } from "../../config/paths.js";
|
|
5
5
|
import { join } from "path";
|
|
6
6
|
import { existsSync, watch } from "fs";
|
|
7
7
|
import { mkdir, readFile, readdir, rename } from "fs/promises";
|
|
@@ -40,6 +40,31 @@ async function executeWithTimeout(operation, config) {
|
|
|
40
40
|
let timeoutId = null;
|
|
41
41
|
let isSettled = false;
|
|
42
42
|
return new Promise((resolve, reject) => {
|
|
43
|
+
const cleanup = () => {
|
|
44
|
+
if (timeoutId) {
|
|
45
|
+
clearTimeout(timeoutId);
|
|
46
|
+
timeoutId = null;
|
|
47
|
+
}
|
|
48
|
+
config.signal?.removeEventListener("abort", onAbort);
|
|
49
|
+
};
|
|
50
|
+
const onAbort = () => {
|
|
51
|
+
if (isSettled) return;
|
|
52
|
+
isSettled = true;
|
|
53
|
+
cleanup();
|
|
54
|
+
const reason = config.signal?.reason;
|
|
55
|
+
if (reason instanceof Error) {
|
|
56
|
+
reject(reason);
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
const error = /* @__PURE__ */ new Error("Tool execution was aborted");
|
|
60
|
+
error.name = "AbortError";
|
|
61
|
+
reject(error);
|
|
62
|
+
};
|
|
63
|
+
if (config.signal?.aborted) {
|
|
64
|
+
onAbort();
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
config.signal?.addEventListener("abort", onAbort, { once: true });
|
|
43
68
|
timeoutId = setTimeout(() => {
|
|
44
69
|
if (isSettled) return;
|
|
45
70
|
isSettled = true;
|
|
@@ -51,15 +76,23 @@ async function executeWithTimeout(operation, config) {
|
|
|
51
76
|
executionTimeMs: executionTime,
|
|
52
77
|
description: config.description
|
|
53
78
|
}, `Tool "${config.toolName}" timed out after ${timeoutMs}ms (elapsed ${executionTime}ms)${desc}`);
|
|
54
|
-
|
|
79
|
+
const error = new TimeoutError(config.toolName, timeoutMs, config.description, executionTime);
|
|
80
|
+
try {
|
|
81
|
+
config.onTimeout?.(error);
|
|
82
|
+
} catch (callbackError) {
|
|
83
|
+
log.warn({
|
|
84
|
+
err: callbackError,
|
|
85
|
+
toolName: config.toolName
|
|
86
|
+
}, "Tool timeout cancellation callback failed");
|
|
87
|
+
} finally {
|
|
88
|
+
cleanup();
|
|
89
|
+
reject(error);
|
|
90
|
+
}
|
|
55
91
|
}, timeoutMs);
|
|
56
92
|
operation().then((result) => {
|
|
57
93
|
if (isSettled) return;
|
|
58
94
|
isSettled = true;
|
|
59
|
-
|
|
60
|
-
clearTimeout(timeoutId);
|
|
61
|
-
timeoutId = null;
|
|
62
|
-
}
|
|
95
|
+
cleanup();
|
|
63
96
|
const executionTime = Date.now() - startTime;
|
|
64
97
|
log.debug({
|
|
65
98
|
toolName: config.toolName,
|
|
@@ -69,10 +102,7 @@ async function executeWithTimeout(operation, config) {
|
|
|
69
102
|
}).catch((error) => {
|
|
70
103
|
if (isSettled) return;
|
|
71
104
|
isSettled = true;
|
|
72
|
-
|
|
73
|
-
clearTimeout(timeoutId);
|
|
74
|
-
timeoutId = null;
|
|
75
|
-
}
|
|
105
|
+
cleanup();
|
|
76
106
|
reject(error);
|
|
77
107
|
});
|
|
78
108
|
});
|
|
@@ -138,9 +138,9 @@ async function materializeBundleMcpToolsForRun(params) {
|
|
|
138
138
|
label: tool.title ?? tool.toolName,
|
|
139
139
|
description: tool.description || tool.title || tool.fallbackDescription,
|
|
140
140
|
parameters: tool.inputSchema,
|
|
141
|
-
execute: async (_toolCallId, input) => {
|
|
141
|
+
execute: async (_toolCallId, input, signal) => {
|
|
142
142
|
params.runtime.markUsed();
|
|
143
|
-
const result = await params.runtime.callTool(tool.serverName, tool.toolName, input);
|
|
143
|
+
const result = await params.runtime.callTool(tool.serverName, tool.toolName, input, signal);
|
|
144
144
|
return toAgentToolResult({
|
|
145
145
|
serverName: tool.serverName,
|
|
146
146
|
toolName: tool.toolName,
|
|
@@ -192,6 +192,7 @@ function createSessionMcpRuntime(params) {
|
|
|
192
192
|
client,
|
|
193
193
|
transport: resolved.transport,
|
|
194
194
|
transportType: resolved.transportType,
|
|
195
|
+
requestTimeoutMs: resolved.requestTimeoutMs,
|
|
195
196
|
detachStderr: resolved.detachStderr
|
|
196
197
|
};
|
|
197
198
|
sessions.set(serverName, session);
|
|
@@ -312,7 +313,7 @@ function createSessionMcpRuntime(params) {
|
|
|
312
313
|
markUsed() {
|
|
313
314
|
lastUsedAt = Date.now();
|
|
314
315
|
},
|
|
315
|
-
async callTool(serverName, toolName, input) {
|
|
316
|
+
async callTool(serverName, toolName, input, signal) {
|
|
316
317
|
failIfDisposed();
|
|
317
318
|
await getCatalog();
|
|
318
319
|
const session = sessions.get(serverName);
|
|
@@ -320,6 +321,10 @@ function createSessionMcpRuntime(params) {
|
|
|
320
321
|
return await session.client.callTool({
|
|
321
322
|
name: toolName,
|
|
322
323
|
arguments: isMcpConfigRecord(input) ? input : {}
|
|
324
|
+
}, void 0, {
|
|
325
|
+
signal,
|
|
326
|
+
timeout: session.requestTimeoutMs,
|
|
327
|
+
maxTotalTimeout: session.requestTimeoutMs
|
|
323
328
|
});
|
|
324
329
|
},
|
|
325
330
|
async dispose() {
|
|
@@ -56,7 +56,7 @@ export type SessionMcpRuntime = {
|
|
|
56
56
|
acquireLease?: () => () => void;
|
|
57
57
|
getCatalog: () => Promise<McpToolCatalog>;
|
|
58
58
|
markUsed: () => void;
|
|
59
|
-
callTool: (serverName: string, toolName: string, input: unknown) => Promise<CallToolResult>;
|
|
59
|
+
callTool: (serverName: string, toolName: string, input: unknown, signal?: AbortSignal) => Promise<CallToolResult>;
|
|
60
60
|
dispose: () => Promise<void>;
|
|
61
61
|
};
|
|
62
62
|
export type SessionMcpRuntimeManager = {
|
|
@@ -2,6 +2,7 @@ import { type HttpMcpTransportType } from "./mcp-http.js";
|
|
|
2
2
|
type ResolvedBaseMcpTransportConfig = {
|
|
3
3
|
description: string;
|
|
4
4
|
connectionTimeoutMs: number;
|
|
5
|
+
requestTimeoutMs: number;
|
|
5
6
|
};
|
|
6
7
|
export type ResolvedStdioMcpTransportConfig = ResolvedBaseMcpTransportConfig & {
|
|
7
8
|
kind: "stdio";
|
|
@@ -18,5 +19,6 @@ export type ResolvedHttpMcpTransportConfig = ResolvedBaseMcpTransportConfig & {
|
|
|
18
19
|
headers?: Record<string, string>;
|
|
19
20
|
};
|
|
20
21
|
export type ResolvedMcpTransportConfig = ResolvedStdioMcpTransportConfig | ResolvedHttpMcpTransportConfig;
|
|
22
|
+
export declare const DEFAULT_MCP_REQUEST_TIMEOUT_MS = 60000;
|
|
21
23
|
export declare function resolveMcpTransportConfig(serverName: string, rawServer: unknown): ResolvedMcpTransportConfig | null;
|
|
22
24
|
export {};
|
|
@@ -10,10 +10,15 @@ init_logger();
|
|
|
10
10
|
init_string_coerce();
|
|
11
11
|
const log = createLogger("Mcp:Bundle");
|
|
12
12
|
const DEFAULT_CONNECTION_TIMEOUT_MS = 3e4;
|
|
13
|
+
const DEFAULT_MCP_REQUEST_TIMEOUT_MS = 6e4;
|
|
13
14
|
function getConnectionTimeoutMs(rawServer) {
|
|
14
15
|
if (rawServer && typeof rawServer === "object" && typeof rawServer.connectionTimeoutMs === "number" && rawServer.connectionTimeoutMs > 0) return rawServer.connectionTimeoutMs;
|
|
15
16
|
return DEFAULT_CONNECTION_TIMEOUT_MS;
|
|
16
17
|
}
|
|
18
|
+
function getRequestTimeoutMs(rawServer) {
|
|
19
|
+
if (rawServer && typeof rawServer === "object" && typeof rawServer.requestTimeoutMs === "number" && rawServer.requestTimeoutMs > 0) return rawServer.requestTimeoutMs;
|
|
20
|
+
return DEFAULT_MCP_REQUEST_TIMEOUT_MS;
|
|
21
|
+
}
|
|
17
22
|
function getRequestedTransport(rawServer) {
|
|
18
23
|
if (!rawServer || typeof rawServer !== "object" || typeof rawServer.transport !== "string") return "";
|
|
19
24
|
return normalizeLowercaseStringOrEmpty(rawServer.transport);
|
|
@@ -46,7 +51,8 @@ function resolveHttpTransportConfig(serverName, rawServer, transportType) {
|
|
|
46
51
|
url: launch.config.url,
|
|
47
52
|
headers: launch.config.headers,
|
|
48
53
|
description: describeHttpMcpServerLaunchConfig(launch.config),
|
|
49
|
-
connectionTimeoutMs: getConnectionTimeoutMs(rawServer)
|
|
54
|
+
connectionTimeoutMs: getConnectionTimeoutMs(rawServer),
|
|
55
|
+
requestTimeoutMs: getRequestTimeoutMs(rawServer)
|
|
50
56
|
};
|
|
51
57
|
}
|
|
52
58
|
function resolveMcpTransportConfig(serverName, rawServer) {
|
|
@@ -65,7 +71,8 @@ function resolveMcpTransportConfig(serverName, rawServer) {
|
|
|
65
71
|
env: stdioLaunch.config.env,
|
|
66
72
|
cwd: stdioLaunch.config.cwd,
|
|
67
73
|
description: describeStdioMcpServerLaunchConfig(stdioLaunch.config),
|
|
68
|
-
connectionTimeoutMs: getConnectionTimeoutMs(rawServer)
|
|
74
|
+
connectionTimeoutMs: getConnectionTimeoutMs(rawServer),
|
|
75
|
+
requestTimeoutMs: getRequestTimeoutMs(rawServer)
|
|
69
76
|
};
|
|
70
77
|
if (effectiveTransport && effectiveTransport !== "sse" && effectiveTransport !== "streamable-http") {
|
|
71
78
|
log.warn(`bundle-mcp: skipped server "${logServerName}" because transport "${sanitizeForLog(effectiveTransport)}" is not supported.`);
|
|
@@ -80,4 +87,4 @@ function resolveMcpTransportConfig(serverName, rawServer) {
|
|
|
80
87
|
return null;
|
|
81
88
|
}
|
|
82
89
|
//#endregion
|
|
83
|
-
export { resolveMcpTransportConfig };
|
|
90
|
+
export { DEFAULT_MCP_REQUEST_TIMEOUT_MS, resolveMcpTransportConfig };
|
|
@@ -4,6 +4,7 @@ export type ResolvedMcpTransport = {
|
|
|
4
4
|
description: string;
|
|
5
5
|
transportType: "stdio" | "sse" | "streamable-http";
|
|
6
6
|
connectionTimeoutMs: number;
|
|
7
|
+
requestTimeoutMs: number;
|
|
7
8
|
detachStderr?: () => void;
|
|
8
9
|
};
|
|
9
10
|
export declare function resolveMcpTransport(serverName: string, rawServer: unknown): ResolvedMcpTransport | null;
|
|
@@ -60,6 +60,7 @@ function resolveMcpTransport(serverName, rawServer) {
|
|
|
60
60
|
description: resolved.description,
|
|
61
61
|
transportType: "stdio",
|
|
62
62
|
connectionTimeoutMs: resolved.connectionTimeoutMs,
|
|
63
|
+
requestTimeoutMs: resolved.requestTimeoutMs,
|
|
63
64
|
detachStderr: attachStderrLogging(serverName, transport)
|
|
64
65
|
};
|
|
65
66
|
}
|
|
@@ -70,7 +71,8 @@ function resolveMcpTransport(serverName, rawServer) {
|
|
|
70
71
|
}),
|
|
71
72
|
description: resolved.description,
|
|
72
73
|
transportType: "streamable-http",
|
|
73
|
-
connectionTimeoutMs: resolved.connectionTimeoutMs
|
|
74
|
+
connectionTimeoutMs: resolved.connectionTimeoutMs,
|
|
75
|
+
requestTimeoutMs: resolved.requestTimeoutMs
|
|
74
76
|
};
|
|
75
77
|
const headers = { ...resolved.headers };
|
|
76
78
|
const hasHeaders = Object.keys(headers).length > 0;
|
|
@@ -82,7 +84,8 @@ function resolveMcpTransport(serverName, rawServer) {
|
|
|
82
84
|
}),
|
|
83
85
|
description: resolved.description,
|
|
84
86
|
transportType: "sse",
|
|
85
|
-
connectionTimeoutMs: resolved.connectionTimeoutMs
|
|
87
|
+
connectionTimeoutMs: resolved.connectionTimeoutMs,
|
|
88
|
+
requestTimeoutMs: resolved.requestTimeoutMs
|
|
86
89
|
};
|
|
87
90
|
}
|
|
88
91
|
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DEFAULT_DEEP_CRON, DEFAULT_LIGHT_CRON, DEFAULT_REM_CRON } from "./constants.js";
|
|
2
1
|
import { buildMemoryRuntime } from "../../../agent-runtime/memory-runtime.js";
|
|
2
|
+
import { DEFAULT_DEEP_CRON, DEFAULT_LIGHT_CRON, DEFAULT_REM_CRON } from "./constants.js";
|
|
3
3
|
//#region src/agent/memory/dreaming/config.ts
|
|
4
4
|
function clampScore(value, fallback) {
|
|
5
5
|
if (!Number.isFinite(value)) return fallback;
|
|
@@ -10,6 +10,6 @@ export declare const MIN_AGENT_TURN_TIMEOUT_MS = 60000;
|
|
|
10
10
|
export declare const MAX_AGENT_TURN_TIMEOUT_MS: number;
|
|
11
11
|
/** Default per-turn timeout (30 minutes). */
|
|
12
12
|
export declare const DEFAULT_AGENT_TURN_TIMEOUT_MS: number;
|
|
13
|
-
export declare function resolveAgentTurnTimeoutMs(
|
|
13
|
+
export declare function resolveAgentTurnTimeoutMs(config?: Config, sessionKey?: string): number;
|
|
14
14
|
export declare function isAgentTurnTimeoutError(err: unknown): boolean;
|
|
15
15
|
export declare function runAgentTurnWithTimeout(agent: Agent, runTurn: () => Promise<void>, timeoutMs: number): Promise<void>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { resolveEffectiveAgentManifestForSession } from "../../config/agent-profile.js";
|
|
1
2
|
//#region src/agent/orchestration/run-agent-turn-with-timeout.ts
|
|
2
3
|
/** Minimum per-turn timeout (1 minute). */
|
|
3
4
|
const MIN_AGENT_TURN_TIMEOUT_MS = 6e4;
|
|
@@ -5,8 +6,11 @@ const MIN_AGENT_TURN_TIMEOUT_MS = 6e4;
|
|
|
5
6
|
const MAX_AGENT_TURN_TIMEOUT_MS = 14400 * 1e3;
|
|
6
7
|
/** Default per-turn timeout (30 minutes). */
|
|
7
8
|
const DEFAULT_AGENT_TURN_TIMEOUT_MS = 1800 * 1e3;
|
|
8
|
-
function resolveAgentTurnTimeoutMs(
|
|
9
|
-
return DEFAULT_AGENT_TURN_TIMEOUT_MS;
|
|
9
|
+
function resolveAgentTurnTimeoutMs(config, sessionKey) {
|
|
10
|
+
if (!config) return DEFAULT_AGENT_TURN_TIMEOUT_MS;
|
|
11
|
+
const configured = resolveEffectiveAgentManifestForSession(config, sessionKey).runtime?.timeoutMs;
|
|
12
|
+
if (!configured) return DEFAULT_AGENT_TURN_TIMEOUT_MS;
|
|
13
|
+
return Math.min(MAX_AGENT_TURN_TIMEOUT_MS, Math.max(MIN_AGENT_TURN_TIMEOUT_MS, configured));
|
|
10
14
|
}
|
|
11
15
|
function isAgentTurnTimeoutError(err) {
|
|
12
16
|
return err instanceof Error && err.message.startsWith("Agent turn timed out after");
|
|
@@ -99,6 +99,7 @@ async function runDirectAgentTurn(deps, input) {
|
|
|
99
99
|
modelManager: deps.modelManager,
|
|
100
100
|
getConfig: () => deps.config,
|
|
101
101
|
abortSignal: input.abortSignal,
|
|
102
|
+
deadlineAtMs: input.deadlineAtMs,
|
|
102
103
|
beforeTurn: () => deps.agentManager.beginBackgroundReviewUserTurn(input.sessionKey),
|
|
103
104
|
onEvent: input.onEvent
|
|
104
105
|
});
|
|
@@ -61,7 +61,10 @@ async function runProcessDirect(deps, input) {
|
|
|
61
61
|
config: deps.config
|
|
62
62
|
}, {
|
|
63
63
|
sessionKey: input.sessionKey,
|
|
64
|
-
|
|
64
|
+
runId: input.runId,
|
|
65
|
+
userMessage,
|
|
66
|
+
abortSignal: input.signal,
|
|
67
|
+
deadlineAtMs: input.deadlineAtMs
|
|
65
68
|
}));
|
|
66
69
|
} finally {
|
|
67
70
|
clearPendingTranscriptUserMessage(input.sessionKey, pendingUserMessage);
|
|
@@ -113,6 +113,7 @@ export declare class AgentService {
|
|
|
113
113
|
getCapabilityCatalog(sessionKey?: string): AgentCapabilityCatalogEntry[];
|
|
114
114
|
getSkillMarkdownSource(skillName: string): SkillMarkdownPreviewPayload | null;
|
|
115
115
|
refreshSkillsAfterDiskChange(): void;
|
|
116
|
+
refreshSkillsAfterTrustChange(): void;
|
|
116
117
|
installSkillFromSource(opts: SkillInstallToolOptions): Promise<SkillInstallToolResult>;
|
|
117
118
|
installSkillFromMarketplace(opts: MarketplaceSkillInstallToolOptions): Promise<MarketplaceSkillInstallToolResult>;
|
|
118
119
|
refreshSkillsAfterSkillConfigChange(): void;
|
|
@@ -2,10 +2,10 @@ import { createLogger } from "../utils/logger/index.js";
|
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
3
|
import { parseNoteAttachmentTarget } from "../notes/attachment-ref.js";
|
|
4
4
|
import { getAgentDefaultModelRef, init_schema } from "../config/schema.js";
|
|
5
|
-
import { applyConfigOverrides } from "../config/runtime-overrides.js";
|
|
6
5
|
import { init_agent_scope, resolveAgentHomeDir, resolveDefaultAgentId } from "./agent-scope.js";
|
|
7
|
-
import { extractProfileAgentId } from "../config/agent-profile.js";
|
|
8
6
|
import { init_paths, resolveUserProfilePath } from "../config/paths.js";
|
|
7
|
+
import { applyConfigOverrides } from "../config/runtime-overrides.js";
|
|
8
|
+
import { extractProfileAgentId } from "../config/agent-profile.js";
|
|
9
9
|
import { extractTextContent } from "./context/workspace.js";
|
|
10
10
|
import { effectiveWorkspacePathForSession } from "../session/session-workspace.js";
|
|
11
11
|
import { getProjectForSession } from "../projects/workspace.js";
|
|
@@ -532,6 +532,9 @@ var AgentService = class {
|
|
|
532
532
|
refreshSkillsAfterDiskChange() {
|
|
533
533
|
this.agentManager.refreshSkillsAfterDiskChange();
|
|
534
534
|
}
|
|
535
|
+
refreshSkillsAfterTrustChange() {
|
|
536
|
+
this.agentManager.refreshSkillsAfterTrustChange();
|
|
537
|
+
}
|
|
535
538
|
async installSkillFromSource(opts) {
|
|
536
539
|
const target = normalizeSkillInstallTarget(opts.target);
|
|
537
540
|
const workspace = opts.workspace?.trim() || (opts.sessionKey ? this.agentManager.getResolvedWorkspaceForSession(opts.sessionKey) : void 0) || this.workspaceDir;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
3
|
import { init_workspace_defaults, resolveDefaultAgentWorkspaceDir } from "../../config/workspace-defaults.js";
|
|
4
|
-
import { resolveEffectiveAgentProfileForSession } from "../../config/agent-profile.js";
|
|
5
4
|
import { init_providers, resolveModel } from "../../providers/index.js";
|
|
5
|
+
import { resolveEffectiveAgentProfileForSession } from "../../config/agent-profile.js";
|
|
6
6
|
import { effectiveWorkspacePathForSession, projectWorkspacePath } from "../../session/session-workspace.js";
|
|
7
7
|
import { getProjectForSession } from "../../projects/workspace.js";
|
|
8
8
|
import { resolveCompactionPolicy } from "../memory/compaction-policy.js";
|