@xopcai/xopc 0.0.178 → 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-BzGX__8I.js → activity-store-DFKtQDgE.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-BzxntcaZ.js → agent-avatar-dicebear-CcTvB_4W.js} +1 -1
- package/dist/gateway/static/root/assets/agents-DgGj9bu6.js +2 -0
- package/dist/gateway/static/root/assets/{api-hi6f2Xtp.js → api-CUClAvuL.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-fTY1F7ac.js → app-management-settings-panel-Ib-cWKHM.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-BZ-IxQfB.js → appearance-settings-CRSN8WuA.js} +1 -1
- package/dist/gateway/static/root/assets/apps-page-B5xahuT-.js +1 -0
- package/dist/gateway/static/root/assets/{archive-plugin-ZSLLG8wB.js → archive-plugin-BBF9zspN.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-D4YktqIF.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-BIkPxfxj.js → binary-plugins-D78XOjJ3.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-Q3v_YQom.js → block-editor-D_VVXlYX.js} +46 -46
- package/dist/gateway/static/root/assets/browser-settings-page-Cjw07q9h.js +8 -0
- package/dist/gateway/static/root/assets/{browser-workflow-inputs-M5lTEW1I.js → browser-workflow-inputs-_gu08MA4.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-workflows-page-B3T1KYk4.js → browser-workflows-page-58DBMXgG.js} +2 -2
- package/dist/gateway/static/root/assets/capabilities-settings-panel-D_dfVxHY.js +7 -0
- package/dist/gateway/static/root/assets/{capability-presets-api-DE09c0VB.js → capability-presets-api-DhCn9rPv.js} +1 -1
- package/dist/gateway/static/root/assets/capability-presets-settings-panel-LWWIYUT7.js +1 -0
- package/dist/gateway/static/root/assets/{channel-recipient-api-CFR5FBfS.js → channel-recipient-api-DYtoNV5A.js} +1 -1
- package/dist/gateway/static/root/assets/channels-settings-Cyj5OunL.js +1 -0
- package/dist/gateway/static/root/assets/channels-status-swr-TEFnV0IG.js +1 -0
- package/dist/gateway/static/root/assets/{connector-logo-B1mD-3pM.js → connector-logo-CxIXnifA.js} +1 -1
- package/dist/gateway/static/root/assets/connectors-page-0TobCpBB.js +2 -0
- package/dist/gateway/static/root/assets/desktop-pet-CwVSLL6N.js +1 -0
- package/dist/gateway/static/root/assets/desktop-pet-settings-BOIp4q0Z.js +1 -0
- package/dist/gateway/static/root/assets/{directory-picker-path-field-BYQJ2XUS.js → directory-picker-path-field-C8_lsW6S.js} +1 -1
- package/dist/gateway/static/root/assets/{dreaming-settings-BXcb8fwx.js → dreaming-settings-Da9FeWQl.js} +3 -3
- package/dist/gateway/static/root/assets/{extension-debug-page-O1Xu1r4Q.js → extension-debug-page-CMNnSJP6.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-C2Jraq8l.js → extension-page-t0pJqLvM.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-DcXQDTpG.js → extension-settings-page-aiR-tKnW.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-api-DmPIZrvg.js → gateway-config-api-CkyQBD6r.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-settings-BIZfAgfB.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-startup-retry-BZEkOdPm.js → gateway-startup-retry-CSU7UvzG.js} +1 -1
- package/dist/gateway/static/root/assets/goals-settings-Dx9uTyWF.js +1 -0
- package/dist/gateway/static/root/assets/{heartbeat-settings-BtKu2NWT.js → heartbeat-settings-Cnr5ORXL.js} +1 -1
- package/dist/gateway/static/root/assets/{image-generation-api-05Gg8wsU.js → image-generation-api-BR6Kb77X.js} +1 -1
- package/dist/gateway/static/root/assets/index-B0Tdge_q.css +1 -0
- package/dist/gateway/static/root/assets/index-BA56bQ68.js +224 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-CfmDR9Sc.js → keyboard-shortcuts-settings-D76uYKeQ.js} +1 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-DSUNtLHg.js +2 -0
- package/dist/gateway/static/root/assets/{local-apps-page-Df8BW1A_.js → local-apps-page-BsLnojTh.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-CTwSy7yW.js → locale-store-BNC8HUCI.js} +1 -1
- package/dist/gateway/static/root/assets/logs-page-yI8kpQtO.js +7 -0
- package/dist/gateway/static/root/assets/{markdown-split-B3FvKbaP.js → markdown-split-D6smTQWD.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-DsjrvvB6.js → media-plugins-D1TmMF0A.js} +1 -1
- package/dist/gateway/static/root/assets/messages-H_iJjnEM.js +3 -0
- package/dist/gateway/static/root/assets/{notes-page-tuzIwy3c.js → notes-page-Vt-diFf0.js} +1 -1
- package/dist/gateway/static/root/assets/notes-workbench-BD297EZt.js +4 -0
- package/dist/gateway/static/root/assets/outcome-detail-page-C5i_ZR9a.js +1 -0
- package/dist/gateway/static/root/assets/{page-tabs-ke9s4nYi.js → page-tabs-BnSzIjH0.js} +1 -1
- package/dist/gateway/static/root/assets/{preview-open-alternatives-Cp1eI4S9.js → preview-open-alternatives-CF12Eqi4.js} +1 -1
- package/dist/gateway/static/root/assets/product-delivery-BVG-eWQO.js +1 -0
- package/dist/gateway/static/root/assets/{product-open-page-dXQCMAtH.js → product-open-page-Du0TE_CU.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-D1HGz7Dy.js +1 -0
- package/dist/gateway/static/root/assets/projects-page-CqP2TnW-.js +1 -0
- package/dist/gateway/static/root/assets/remote-access-hub-BXdVJLS3.js +1 -0
- package/dist/gateway/static/root/assets/{save-bar-controls-Bl30zjHc.js → save-bar-controls-B53UNtDM.js} +1 -1
- package/dist/gateway/static/root/assets/{schedule-field-DqhmXQKo.js → schedule-field-C3dIMN5q.js} +1 -1
- package/dist/gateway/static/root/assets/{schema-form-DkUCy6vf.js → schema-form-BKvpxqof.js} +1 -1
- package/dist/gateway/static/root/assets/{schemas-DgQq6Z5S.js → schemas-C6onAggk.js} +2 -2
- package/dist/gateway/static/root/assets/sessions-page-CPAwDdl5.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-C-jGsoft.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-C6ZbNpdy.js → settings-form-section-kt6GIS32.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-loading-skeleton-Bk58_cr7.js → settings-loading-skeleton-85eUPcKz.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-k8iE_NdX.js → settings-page-Di5x6Xrc.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-layout-DgFSya2e.js → settings-page-layout-CkkCee_x.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-status-panel-B_KDlyZA.js → setup-status-panel-uxEE6gAB.js} +1 -1
- package/dist/gateway/static/root/assets/{share-preview-page-CV7nL_J9.js → share-preview-page-BtLEstaI.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-2mcsMWgn.js +1 -0
- 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-kahBIHg0.js → skills-page.utils-C2SHvq8V.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-JV3-MG5F.js → system-settings-panel-CIJ66cUy.js} +1 -1
- package/dist/gateway/static/root/assets/{theme-store-DFLyzoLO.js → theme-store-ClDa_Bci.js} +1 -1
- package/dist/gateway/static/root/assets/time-picker-D0zAsHOo.js +1 -0
- package/dist/gateway/static/root/assets/{typed-models-lib-60Aqo-UJ.js → typed-models-lib-GsmwmB40.js} +1 -1
- package/dist/gateway/static/root/assets/{use-channel-catalog-CnTkHDnw.js → use-channel-catalog-BQz3K7xj.js} +1 -1
- package/dist/gateway/static/root/assets/user-context-page-Bn4BLg4W.js +1 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-CNa8qUgS.js → voice-api-key-field-Blaxsbb3.js} +1 -1
- package/dist/gateway/static/root/assets/work-copy-Cwyan9Sn.js +1 -0
- package/dist/gateway/static/root/assets/work-discovery-page-iJ9RBSpu.js +1 -0
- package/dist/gateway/static/root/assets/work-item-detail-page-CqTH7PQX.js +1 -0
- package/dist/gateway/static/root/assets/work-page-H3m99ccS.js +3 -0
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-yV_x595t.js → workflow-run-setup-panel-CTG4RpRE.js} +2 -2
- package/dist/gateway/static/root/assets/workflows-page-BxZSKMfv.js +11 -0
- package/dist/gateway/static/root/index.html +9 -10
- package/dist/package.js +1 -1
- package/dist/packages/gateway-contract/src/outcomes.js +137 -0
- package/dist/packages/gateway-contract/src/product-delivery.js +1 -0
- package/dist/packages/gateway-contract/src/work-intake.js +85 -0
- package/dist/src/activity/service.d.ts +1 -0
- package/dist/src/activity/service.js +4 -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/code-intelligence/binary.js +1 -1
- package/dist/src/agent/context/execution-scope.d.ts +1 -1
- package/dist/src/agent/context/execution-scope.js +6 -4
- 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 +7 -6
- 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-stdio-transport.js +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/memory/user-context-coordinator.d.ts +1 -0
- package/dist/src/agent/memory/user-context-coordinator.js +17 -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/outcomes/{task-evaluation.d.ts → execution-evaluation.d.ts} +3 -3
- package/dist/src/agent/outcomes/{task-evaluation.js → execution-evaluation.js} +5 -5
- package/dist/src/agent/outcomes/execution-verifier.d.ts +29 -0
- package/dist/src/agent/outcomes/{task-verifier.js → execution-verifier.js} +4 -4
- 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/process-direct-streaming.js +3 -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 +18 -1
- package/dist/src/agent/tools/goal-tool.js +5 -3
- 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/tools/todo-tool.d.ts +5 -0
- package/dist/src/agent/tools/todo-tool.js +16 -4
- package/dist/src/agent/tools/update-plan-tool.d.ts +1 -0
- package/dist/src/agent/tools/update-plan-tool.js +6 -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/browser/providers/cloakbrowser.js +2 -2
- package/dist/src/channels/attachments/voice-stt-webchat.d.ts +0 -3
- package/dist/src/channels/attachments/voice-stt-webchat.js +1 -24
- package/dist/src/chat-commands/builtins/goal.js +5 -4
- package/dist/src/cli/commands/agents.js +1 -1
- package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
- package/dist/src/cli/commands/doctor/checks/provider-auth.js +1 -1
- package/dist/src/cli/commands/goal.js +6 -5
- package/dist/src/cli/commands/models.js +1 -1
- package/dist/src/cli/commands/tunnel.js +3 -3
- 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/connectors/learning-coordinator.js +7 -1
- package/dist/src/connectors/source-change-publisher.d.ts +17 -0
- package/dist/src/connectors/source-change-publisher.js +148 -0
- package/dist/src/discussions/analyzer.d.ts +35 -0
- package/dist/src/discussions/analyzer.js +127 -0
- package/dist/src/discussions/index.d.ts +7 -0
- package/dist/src/discussions/index.js +7 -0
- package/dist/src/discussions/live-worker.d.ts +33 -0
- package/dist/src/discussions/live-worker.js +148 -0
- package/dist/src/discussions/pipeline.d.ts +33 -0
- package/dist/src/discussions/pipeline.js +205 -0
- package/dist/src/discussions/project-inference.d.ts +13 -0
- package/dist/src/discussions/project-inference.js +19 -0
- package/dist/src/discussions/repository.d.ts +29 -0
- package/dist/src/discussions/repository.js +255 -0
- package/dist/src/discussions/service.d.ts +51 -0
- package/dist/src/discussions/service.js +335 -0
- package/dist/src/discussions/transcript.d.ts +3 -0
- package/dist/src/discussions/transcript.js +15 -0
- package/dist/src/discussions/types.d.ts +116 -0
- package/dist/src/discussions/types.js +10 -0
- package/dist/src/discussions/worker.d.ts +18 -0
- package/dist/src/discussions/worker.js +74 -0
- package/dist/src/extensions/activation-context.js +2 -1
- package/dist/src/extensions/lockfile.js +1 -1
- package/dist/src/extensions/sdk/testing.js +1 -1
- package/dist/src/gateway/agents-admin.js +3 -3
- package/dist/src/gateway/chat-stream/mapper.js +53 -3
- package/dist/src/gateway/chat-stream/protocol.d.ts +17 -1
- package/dist/src/gateway/file-path-classifier.js +1 -1
- package/dist/src/gateway/hono/app.js +8 -3
- package/dist/src/gateway/hono/lib/config-payload.js +2 -2
- package/dist/src/gateway/hono/middleware/auth.js +2 -2
- package/dist/src/gateway/hono/middleware/logger.js +1 -1
- package/dist/src/gateway/hono/middleware/strict-rate-limit.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/agents.js +1 -1
- package/dist/src/gateway/hono/routes/config-patch/misc.js +2 -2
- package/dist/src/gateway/hono/routes/connectors.js +79 -0
- package/dist/src/gateway/hono/routes/discussions.d.ts +3 -0
- package/dist/src/gateway/hono/routes/discussions.js +177 -0
- package/dist/src/gateway/hono/routes/execution-receipts.d.ts +3 -0
- package/dist/src/gateway/hono/routes/execution-receipts.js +163 -0
- package/dist/src/gateway/hono/routes/exposure.js +1 -1
- package/dist/src/gateway/hono/routes/goals.js +3 -288
- package/dist/src/gateway/hono/routes/home.d.ts +2 -102
- package/dist/src/gateway/hono/routes/home.js +8 -424
- package/dist/src/gateway/hono/routes/index.js +6 -2
- package/dist/src/gateway/hono/routes/memory.js +7 -7
- package/dist/src/gateway/hono/routes/models.js +1 -1
- package/dist/src/gateway/hono/routes/notes.js +30 -0
- package/dist/src/gateway/hono/routes/projects.js +8 -152
- package/dist/src/gateway/hono/routes/shares.js +1 -1
- package/dist/src/gateway/hono/routes/status.js +2 -2
- package/dist/src/gateway/hono/routes/tunnel.js +3 -3
- package/dist/src/gateway/hono/routes/voice.js +1 -1
- package/dist/src/gateway/hono/routes/work.d.ts +3 -0
- package/dist/src/gateway/hono/routes/work.js +207 -0
- package/dist/src/gateway/hono/routes/you.js +13 -15
- package/dist/src/gateway/index.js +2 -2
- package/dist/src/gateway/runtime-config.js +2 -2
- package/dist/src/gateway/security/audit.js +2 -2
- package/dist/src/gateway/security/index.js +1 -1
- package/dist/src/gateway/service/config-coordinator.js +2 -2
- package/dist/src/gateway/service/run-gateway-agent.js +46 -51
- package/dist/src/gateway/service.d.ts +8 -1
- package/dist/src/gateway/service.js +142 -15
- package/dist/src/goals/goal-queue-store.d.ts +1 -0
- package/dist/src/goals/goal-queue-store.js +5 -1
- package/dist/src/goals/goal-queue-types.d.ts +11 -1
- package/dist/src/goals/goal-runner.js +10 -6
- package/dist/src/goals/goal-service.d.ts +2 -15
- package/dist/src/goals/goal-service.js +9 -42
- package/dist/src/goals/goal-store.d.ts +1 -18
- package/dist/src/goals/goal-store.js +25 -231
- package/dist/src/goals/goal-workflow-judge.js +1 -1
- package/dist/src/goals/index.d.ts +0 -4
- package/dist/src/goals/index.js +1 -3
- package/dist/src/goals/types.d.ts +4 -66
- package/dist/src/notes/agent-context.js +1 -1
- package/dist/src/notes/service.d.ts +1 -0
- package/dist/src/notes/service.js +10 -1
- package/dist/src/notes/types.d.ts +1 -0
- package/dist/src/proactive/events/product-event-bridge.d.ts +7 -0
- package/dist/src/proactive/events/product-event-bridge.js +84 -0
- package/dist/src/proactive/execution/context.d.ts +27 -11
- package/dist/src/proactive/execution/context.js +259 -25
- package/dist/src/proactive/execution/repository.js +18 -5
- package/dist/src/proactive/execution/types.d.ts +7 -1
- package/dist/src/proactive/execution/worker.js +7 -6
- package/dist/src/proactive/inbox/repository.js +8 -2
- package/dist/src/proactive/index.d.ts +4 -2
- package/dist/src/proactive/index.js +5 -3
- package/dist/src/proactive/temporal/worker.d.ts +16 -0
- package/dist/src/proactive/temporal/worker.js +110 -0
- 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/share/share-zip.js +1 -1
- package/dist/src/share/site-proxy.js +1 -1
- package/dist/src/storage/sqlite/activity-repository.d.ts +1 -0
- package/dist/src/storage/sqlite/activity-repository.js +4 -1
- package/dist/src/storage/sqlite/connector-sync-policy-repository.d.ts +20 -0
- package/dist/src/storage/sqlite/connector-sync-policy-repository.js +50 -0
- package/dist/src/storage/sqlite/execution-receipt-repository.d.ts +146 -0
- package/dist/src/storage/sqlite/execution-receipt-repository.js +235 -0
- package/dist/src/storage/sqlite/index.d.ts +4 -2
- package/dist/src/storage/sqlite/index.js +6 -4
- package/dist/src/storage/sqlite/knowledge-repository.d.ts +3 -0
- package/dist/src/storage/sqlite/knowledge-repository.js +9 -1
- package/dist/src/storage/sqlite/memory-records-repository.js +1 -1
- package/dist/src/storage/sqlite/migrations/075_connector_sync_policies.sql +13 -0
- package/dist/src/storage/sqlite/migrations/076_meeting_preparation_scenario.sql +29 -0
- package/dist/src/storage/sqlite/migrations/077_proactive_insight_fingerprints.sql +4 -0
- package/dist/src/storage/sqlite/migrations/078_discussion_captures.sql +64 -0
- package/dist/src/storage/sqlite/migrations/079_discussion_follow_up_scenario.sql +29 -0
- package/dist/src/storage/sqlite/migrations/080_task_outcome_context.sql +15 -0
- package/dist/src/storage/sqlite/migrations/081_project_monitoring_policies.sql +10 -0
- package/dist/src/storage/sqlite/migrations/082_one_click_live_discussions.sql +100 -0
- package/dist/src/storage/sqlite/migrations/083_session_task_plans.sql +9 -0
- package/dist/src/storage/sqlite/migrations/084_work_intake_lifecycle.sql +26 -0
- package/dist/src/storage/sqlite/migrations/085_task_outcome_projection.sql +19 -0
- package/dist/src/storage/sqlite/migrations/086_outcome_aggregates.sql +168 -0
- package/dist/src/storage/sqlite/migrations/087_context_snapshots.sql +21 -0
- 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/notes-repository.js +9 -0
- package/dist/src/storage/sqlite/schema.js +1 -1
- package/dist/src/storage/sqlite/schema.sql +89 -44
- package/dist/src/storage/sqlite/session-repository.js +1 -1
- package/dist/src/storage/sqlite/session-task-plan-repository.d.ts +20 -0
- package/dist/src/storage/sqlite/session-task-plan-repository.js +77 -0
- package/dist/src/tui/backends/embedded-backend.d.ts +2 -0
- package/dist/src/tui/backends/embedded-backend.js +12 -8
- 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/tunnel/frpc-binary.js +1 -1
- package/dist/src/tunnel/frpc-extract.js +1 -1
- package/dist/src/tunnel/index.js +2 -2
- package/dist/src/user-context/context-compiler.d.ts +31 -0
- package/dist/src/user-context/context-compiler.js +51 -0
- package/dist/src/voice/local/model-files.js +1 -1
- package/dist/src/voice/stt/config.d.ts +4 -0
- package/dist/src/voice/stt/config.js +26 -0
- package/dist/src/voice/stt/index.d.ts +1 -0
- package/dist/src/voice/stt/index.js +2 -1
- package/dist/src/voice/stt/list-providers.js +1 -1
- package/dist/src/work/attention-governor.d.ts +20 -0
- package/dist/src/work/attention-governor.js +46 -0
- package/dist/src/work/execution-context.d.ts +16 -0
- package/dist/src/work/execution-context.js +66 -0
- package/dist/src/work/home-query-service.d.ts +147 -0
- package/dist/src/work/home-query-service.js +389 -0
- package/dist/src/work/index.d.ts +14 -0
- package/dist/src/work/index.js +15 -0
- package/dist/src/work/outcome-contract-definition.d.ts +8 -0
- package/dist/src/work/outcome-contract-definition.js +15 -0
- package/dist/src/work/outcome-execution-service.d.ts +27 -0
- package/dist/src/work/outcome-execution-service.js +60 -0
- package/dist/src/work/outcome-projection-service.d.ts +7 -0
- package/dist/src/work/outcome-projection-service.js +51 -0
- package/dist/src/work/outcome-receipt-service.d.ts +13 -0
- package/dist/src/work/outcome-receipt-service.js +55 -0
- package/dist/src/work/outcome-repository.d.ts +50 -0
- package/dist/src/work/outcome-repository.js +112 -0
- package/dist/src/work/outcome-run-coordinator.d.ts +25 -0
- package/dist/src/work/outcome-run-coordinator.js +117 -0
- package/dist/src/work/project-monitoring-service.d.ts +21 -0
- package/dist/src/work/project-monitoring-service.js +76 -0
- package/dist/src/work/project-operating-view-service.d.ts +10 -0
- package/dist/src/work/project-operating-view-service.js +46 -0
- package/dist/src/work/work-intake-repository.d.ts +49 -0
- package/dist/src/work/work-intake-repository.js +97 -0
- package/dist/src/work/work-intake-service.d.ts +26 -0
- package/dist/src/work/work-intake-service.js +171 -0
- package/dist/src/work/work-value-metrics-service.d.ts +4 -0
- package/dist/src/work/work-value-metrics-service.js +88 -0
- package/dist/src/work-items/work-item-service.d.ts +0 -2
- package/dist/src/work-items/work-item-service.js +0 -28
- package/dist/src/workflows/service/workflow-run-service.js +2 -2
- package/dist/src/workflows/service/workflow-run-service.types.d.ts +3 -1
- package/dist/src/workflows/service/workflow-session-bridge.js +2 -2
- package/package.json +1 -1
- package/dist/gateway/static/root/assets/agents-DC9F12Kw.js +0 -2
- package/dist/gateway/static/root/assets/apps-page-5bKr05Fa.js +0 -1
- package/dist/gateway/static/root/assets/automation-suggestion-card-B7mxFRtf.js +0 -1
- package/dist/gateway/static/root/assets/automations-page-Dg6dmt5g.js +0 -6
- package/dist/gateway/static/root/assets/browser-settings-page-BHoo6Rpq.js +0 -8
- package/dist/gateway/static/root/assets/capabilities-settings-panel-BlsqN8Fu.js +0 -7
- package/dist/gateway/static/root/assets/capability-presets-settings-panel-DJeT8_B4.js +0 -1
- package/dist/gateway/static/root/assets/channels-settings-C4VVjYEm.js +0 -1
- package/dist/gateway/static/root/assets/channels-status-swr-vdf8kB16.js +0 -1
- package/dist/gateway/static/root/assets/circle-alert-BEjgurr2.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-DNcrDThX.js +0 -2
- package/dist/gateway/static/root/assets/desktop-pet-B1urphOZ.js +0 -1
- package/dist/gateway/static/root/assets/desktop-pet-settings-DTL6J3EP.js +0 -1
- package/dist/gateway/static/root/assets/gateway-settings-DmObBx9b.js +0 -1
- package/dist/gateway/static/root/assets/goal-create-dialog-BRhmmBe9.js +0 -1
- package/dist/gateway/static/root/assets/goal-detail-page-C1k7_s_O.js +0 -4
- package/dist/gateway/static/root/assets/goals-config-api-Fwu1wjEP.js +0 -1
- package/dist/gateway/static/root/assets/goals-page-hOu9uA3q.js +0 -2
- package/dist/gateway/static/root/assets/goals-settings-DY-JjvHz.js +0 -1
- package/dist/gateway/static/root/assets/index-C0CGebQ1.js +0 -212
- package/dist/gateway/static/root/assets/index-eqq25gvV.css +0 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-EjsNT7nJ.js +0 -2
- package/dist/gateway/static/root/assets/logs-page-Dswjlraa.js +0 -7
- package/dist/gateway/static/root/assets/messages-DP6tPKk-.js +0 -3
- package/dist/gateway/static/root/assets/notes-workbench-DSh3-hMY.js +0 -4
- package/dist/gateway/static/root/assets/product-delivery-BTRT9kCS.js +0 -1
- package/dist/gateway/static/root/assets/project-detail-page-D0QPRHR_.js +0 -1
- package/dist/gateway/static/root/assets/projects-page-CI5Vz62F.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-S1jpzBS5.js +0 -1
- package/dist/gateway/static/root/assets/sessions-page-CTm66k7h.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-CU52AUVD.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-DK6XK95e.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-Bvv_u4ii.js +0 -1
- package/dist/gateway/static/root/assets/skills-page-BGHvVbay.js +0 -2
- package/dist/gateway/static/root/assets/time-picker-XwpxdZFr.js +0 -1
- package/dist/gateway/static/root/assets/user-context-page-DBCMk-Vn.js +0 -1
- package/dist/gateway/static/root/assets/work-discovery-page-C1UIdsCl.js +0 -1
- package/dist/gateway/static/root/assets/work-item-detail-page-DEAQepB8.js +0 -1
- package/dist/gateway/static/root/assets/work-page-D5qYmCTq.js +0 -3
- package/dist/gateway/static/root/assets/workflows-page-yrK17ZZ5.js +0 -11
- package/dist/src/agent/outcomes/task-verifier.d.ts +0 -29
- package/dist/src/gateway/hono/routes/task-outcomes.d.ts +0 -3
- package/dist/src/gateway/hono/routes/task-outcomes.js +0 -109
- package/dist/src/goals/goal-contract-draft.d.ts +0 -15
- package/dist/src/goals/goal-contract-draft.js +0 -112
- package/dist/src/goals/goal-evidence-review.d.ts +0 -15
- package/dist/src/goals/goal-evidence-review.js +0 -89
- package/dist/src/storage/sqlite/task-outcome-repository.d.ts +0 -90
- package/dist/src/storage/sqlite/task-outcome-repository.js +0 -138
|
@@ -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">
|
|
@@ -22,19 +22,18 @@
|
|
|
22
22
|
<link rel="modulepreload" crossorigin href="/assets/vendor-swr-BIWyz7Rc.js">
|
|
23
23
|
<link rel="modulepreload" crossorigin href="/assets/createLucideIcon-DPHK1VkS.js">
|
|
24
24
|
<link rel="modulepreload" crossorigin href="/assets/check-DUBLcKHA.js">
|
|
25
|
-
<link rel="modulepreload" crossorigin href="/assets/circle-alert-BEjgurr2.js">
|
|
26
25
|
<link rel="modulepreload" crossorigin href="/assets/middleware-Pd0e8Igk.js">
|
|
27
|
-
<link rel="modulepreload" crossorigin href="/assets/messages-
|
|
28
|
-
<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">
|
|
29
28
|
<link rel="modulepreload" crossorigin href="/assets/cn-JdwAhgNB.js">
|
|
30
|
-
<link rel="modulepreload" crossorigin href="/assets/schemas-
|
|
31
|
-
<link rel="modulepreload" crossorigin href="/assets/product-delivery-
|
|
29
|
+
<link rel="modulepreload" crossorigin href="/assets/schemas-C6onAggk.js">
|
|
30
|
+
<link rel="modulepreload" crossorigin href="/assets/product-delivery-BVG-eWQO.js">
|
|
32
31
|
<link rel="modulepreload" crossorigin href="/assets/config-reload-event-Bjh2zoKp.js">
|
|
33
32
|
<link rel="modulepreload" crossorigin href="/assets/copy-to-clipboard-HOJ79TWv.js">
|
|
34
|
-
<link rel="modulepreload" crossorigin href="/assets/gateway-startup-retry-
|
|
35
|
-
<link rel="modulepreload" crossorigin href="/assets/activity-store-
|
|
36
|
-
<link rel="modulepreload" crossorigin href="/assets/theme-store-
|
|
37
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
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
|
+
<link rel="stylesheet" crossorigin href="/assets/index-B0Tdge_q.css">
|
|
38
37
|
</head>
|
|
39
38
|
<body>
|
|
40
39
|
<div id="root"></div>
|
package/dist/package.js
CHANGED
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
//#region packages/gateway-contract/src/outcomes.ts
|
|
3
|
+
const OutcomeUserStatusSchema = z.enum([
|
|
4
|
+
"running",
|
|
5
|
+
"needs_user",
|
|
6
|
+
"completed"
|
|
7
|
+
]);
|
|
8
|
+
const OutcomeInternalStatusSchema = z.enum([
|
|
9
|
+
"captured",
|
|
10
|
+
"planning",
|
|
11
|
+
"running",
|
|
12
|
+
"verifying",
|
|
13
|
+
"continuing",
|
|
14
|
+
"needs_user",
|
|
15
|
+
"blocked",
|
|
16
|
+
"paused",
|
|
17
|
+
"completed",
|
|
18
|
+
"cancelled"
|
|
19
|
+
]);
|
|
20
|
+
const OutcomeImportanceSchema = z.enum([
|
|
21
|
+
"low",
|
|
22
|
+
"normal",
|
|
23
|
+
"high",
|
|
24
|
+
"critical"
|
|
25
|
+
]);
|
|
26
|
+
const OutcomeContractSchema = z.object({
|
|
27
|
+
outcomeId: z.string(),
|
|
28
|
+
version: z.number().int().positive(),
|
|
29
|
+
objective: z.string(),
|
|
30
|
+
deliverables: z.array(z.string()),
|
|
31
|
+
acceptanceCriteria: z.array(z.string()),
|
|
32
|
+
constraints: z.array(z.string()),
|
|
33
|
+
approvalRequired: z.array(z.string()),
|
|
34
|
+
contextSnapshotId: z.string().optional(),
|
|
35
|
+
createdBy: z.enum(["user", "system"]),
|
|
36
|
+
createdAt: z.number()
|
|
37
|
+
});
|
|
38
|
+
const OutcomeSchema = z.object({
|
|
39
|
+
id: z.string(),
|
|
40
|
+
objective: z.string(),
|
|
41
|
+
userStatus: OutcomeUserStatusSchema,
|
|
42
|
+
internalStatus: OutcomeInternalStatusSchema,
|
|
43
|
+
importance: OutcomeImportanceSchema,
|
|
44
|
+
dueAt: z.number().optional(),
|
|
45
|
+
latestContractVersion: z.number().int().positive(),
|
|
46
|
+
latestReceiptRunId: z.string().optional(),
|
|
47
|
+
contract: OutcomeContractSchema.optional(),
|
|
48
|
+
createdAt: z.number(),
|
|
49
|
+
updatedAt: z.number()
|
|
50
|
+
});
|
|
51
|
+
z.object({
|
|
52
|
+
ok: z.literal(true),
|
|
53
|
+
items: z.array(OutcomeSchema)
|
|
54
|
+
});
|
|
55
|
+
const OutcomeActionSchema = z.enum([
|
|
56
|
+
"run",
|
|
57
|
+
"pause",
|
|
58
|
+
"resume",
|
|
59
|
+
"cancel"
|
|
60
|
+
]);
|
|
61
|
+
const OutcomeActionRequestSchema = z.object({ action: OutcomeActionSchema });
|
|
62
|
+
const OutcomeReceiptStatusSchema = z.enum([
|
|
63
|
+
"running",
|
|
64
|
+
"completed",
|
|
65
|
+
"partial",
|
|
66
|
+
"needs_user",
|
|
67
|
+
"failed",
|
|
68
|
+
"cancelled"
|
|
69
|
+
]);
|
|
70
|
+
const OutcomeEvidenceSchema = z.object({
|
|
71
|
+
kind: z.enum([
|
|
72
|
+
"artifact",
|
|
73
|
+
"test",
|
|
74
|
+
"state",
|
|
75
|
+
"source"
|
|
76
|
+
]),
|
|
77
|
+
title: z.string(),
|
|
78
|
+
summary: z.string(),
|
|
79
|
+
uri: z.string().optional(),
|
|
80
|
+
verifies: z.array(z.string()).optional()
|
|
81
|
+
});
|
|
82
|
+
const OutcomeReceiptSchema = z.object({
|
|
83
|
+
runId: z.string(),
|
|
84
|
+
outcomeId: z.string().optional(),
|
|
85
|
+
contractVersion: z.number().int().positive().optional(),
|
|
86
|
+
sessionKey: z.string(),
|
|
87
|
+
objective: z.string(),
|
|
88
|
+
status: OutcomeReceiptStatusSchema,
|
|
89
|
+
summary: z.string(),
|
|
90
|
+
projectId: z.string().optional(),
|
|
91
|
+
goalId: z.string().optional(),
|
|
92
|
+
workItemId: z.string().optional(),
|
|
93
|
+
origin: z.string().optional(),
|
|
94
|
+
triggerKind: z.string().optional(),
|
|
95
|
+
changes: z.array(OutcomeEvidenceSchema),
|
|
96
|
+
evidence: z.array(OutcomeEvidenceSchema),
|
|
97
|
+
verification: z.object({
|
|
98
|
+
status: z.enum([
|
|
99
|
+
"passed",
|
|
100
|
+
"failed",
|
|
101
|
+
"unverified"
|
|
102
|
+
]),
|
|
103
|
+
checks: z.array(z.object({
|
|
104
|
+
criterion: z.string(),
|
|
105
|
+
status: z.enum([
|
|
106
|
+
"passed",
|
|
107
|
+
"failed",
|
|
108
|
+
"unverified"
|
|
109
|
+
]),
|
|
110
|
+
evidenceTitles: z.array(z.string())
|
|
111
|
+
}))
|
|
112
|
+
}),
|
|
113
|
+
remainingWork: z.array(z.string()),
|
|
114
|
+
nextAction: z.string().optional(),
|
|
115
|
+
needsUser: z.boolean(),
|
|
116
|
+
completionVerdict: z.enum([
|
|
117
|
+
"achieved",
|
|
118
|
+
"partial",
|
|
119
|
+
"not_achieved"
|
|
120
|
+
]).optional(),
|
|
121
|
+
correctionText: z.string().optional(),
|
|
122
|
+
contextTraceId: z.string().optional(),
|
|
123
|
+
startedAt: z.number(),
|
|
124
|
+
completedAt: z.number().optional(),
|
|
125
|
+
feedback: z.object({
|
|
126
|
+
outcome: z.enum(["helpful", "not_helpful"]),
|
|
127
|
+
reason: z.string().optional(),
|
|
128
|
+
needsCorrection: z.boolean().optional(),
|
|
129
|
+
supportFit: z.boolean().optional()
|
|
130
|
+
}).optional()
|
|
131
|
+
});
|
|
132
|
+
z.object({
|
|
133
|
+
ok: z.literal(true),
|
|
134
|
+
items: z.array(OutcomeReceiptSchema)
|
|
135
|
+
});
|
|
136
|
+
//#endregion
|
|
137
|
+
export { OutcomeActionRequestSchema, OutcomeUserStatusSchema };
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
//#region packages/gateway-contract/src/work-intake.ts
|
|
3
|
+
const WorkExecutionModeSchema = z.enum(["create_only", "run_now"]);
|
|
4
|
+
const WorkExecutionStatusSchema = z.enum([
|
|
5
|
+
"not_started",
|
|
6
|
+
"queued",
|
|
7
|
+
"running",
|
|
8
|
+
"retry_waiting",
|
|
9
|
+
"succeeded",
|
|
10
|
+
"failed",
|
|
11
|
+
"skipped"
|
|
12
|
+
]);
|
|
13
|
+
const MonitoringModeSchema = z.enum([
|
|
14
|
+
"observe",
|
|
15
|
+
"ask_before_action",
|
|
16
|
+
"auto_low_risk"
|
|
17
|
+
]);
|
|
18
|
+
const QuietHoursSchema = z.object({
|
|
19
|
+
startHour: z.number().int().min(0).max(23),
|
|
20
|
+
endHour: z.number().int().min(0).max(23),
|
|
21
|
+
timezone: z.string().min(1)
|
|
22
|
+
});
|
|
23
|
+
z.object({
|
|
24
|
+
projectId: z.string(),
|
|
25
|
+
mode: MonitoringModeSchema,
|
|
26
|
+
quietHours: QuietHoursSchema.optional(),
|
|
27
|
+
allowedActions: z.array(z.string()),
|
|
28
|
+
confidenceThreshold: z.number().min(0).max(1),
|
|
29
|
+
scenarios: z.array(z.string()),
|
|
30
|
+
configured: z.boolean(),
|
|
31
|
+
updatedAt: z.number().optional()
|
|
32
|
+
});
|
|
33
|
+
const ProjectMonitoringUpdateSchema = z.object({
|
|
34
|
+
mode: MonitoringModeSchema.optional(),
|
|
35
|
+
quietHours: QuietHoursSchema.nullable().optional(),
|
|
36
|
+
allowedActions: z.array(z.string()).optional(),
|
|
37
|
+
confidenceThreshold: z.number().min(0).max(1).optional(),
|
|
38
|
+
scenarios: z.array(z.string()).optional()
|
|
39
|
+
});
|
|
40
|
+
z.object({
|
|
41
|
+
id: z.string(),
|
|
42
|
+
objective: z.string(),
|
|
43
|
+
projectId: z.string().optional(),
|
|
44
|
+
planningContext: z.object({
|
|
45
|
+
supportMode: z.enum([
|
|
46
|
+
"efficient",
|
|
47
|
+
"coach",
|
|
48
|
+
"companion",
|
|
49
|
+
"auto"
|
|
50
|
+
]),
|
|
51
|
+
proactiveEnabled: z.boolean()
|
|
52
|
+
}),
|
|
53
|
+
outcomeContract: z.object({
|
|
54
|
+
objective: z.string(),
|
|
55
|
+
deliverables: z.array(z.string()),
|
|
56
|
+
acceptanceCriteria: z.array(z.string()),
|
|
57
|
+
constraints: z.array(z.string()),
|
|
58
|
+
approvalRequired: z.array(z.string())
|
|
59
|
+
}),
|
|
60
|
+
expiresAt: z.number()
|
|
61
|
+
});
|
|
62
|
+
const WorkIntakeCreateRequestSchema = z.object({
|
|
63
|
+
idempotencyKey: z.string().min(1).max(200),
|
|
64
|
+
objective: z.string().min(1).max(12e3),
|
|
65
|
+
projectId: z.string().min(1).optional(),
|
|
66
|
+
sessionKey: z.string().min(1).optional(),
|
|
67
|
+
agentId: z.string().min(1).optional()
|
|
68
|
+
});
|
|
69
|
+
const WorkIntakeConfirmRequestSchema = z.object({
|
|
70
|
+
executionMode: WorkExecutionModeSchema,
|
|
71
|
+
projectId: z.string().min(1).optional()
|
|
72
|
+
});
|
|
73
|
+
z.object({
|
|
74
|
+
outcomeId: z.string(),
|
|
75
|
+
projectId: z.string().optional(),
|
|
76
|
+
goalId: z.string(),
|
|
77
|
+
sessionKey: z.string().optional(),
|
|
78
|
+
execution: z.object({
|
|
79
|
+
mode: WorkExecutionModeSchema,
|
|
80
|
+
status: WorkExecutionStatusSchema,
|
|
81
|
+
queueId: z.string().optional()
|
|
82
|
+
})
|
|
83
|
+
});
|
|
84
|
+
//#endregion
|
|
85
|
+
export { ProjectMonitoringUpdateSchema, WorkIntakeConfirmRequestSchema, WorkIntakeCreateRequestSchema };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createObjectLinkRecord, getActivityEventRecord, listActivityRecords, listObjectActivityRecords, listObjectLinkRecords, listProjectActivityRecords, recordActivityEvent } from "../storage/sqlite/activity-repository.js";
|
|
1
|
+
import { createObjectLinkRecord, deleteObjectLinkRecord, getActivityEventRecord, listActivityRecords, listObjectActivityRecords, listObjectLinkRecords, listProjectActivityRecords, recordActivityEvent } from "../storage/sqlite/activity-repository.js";
|
|
2
2
|
import "../storage/sqlite/index.js";
|
|
3
3
|
import { randomUUID } from "node:crypto";
|
|
4
4
|
//#region src/activity/service.ts
|
|
@@ -52,6 +52,9 @@ var ObjectLinkService = class {
|
|
|
52
52
|
listForObject(object) {
|
|
53
53
|
return listObjectLinkRecords(object);
|
|
54
54
|
}
|
|
55
|
+
delete(id) {
|
|
56
|
+
return deleteObjectLinkRecord(id);
|
|
57
|
+
}
|
|
55
58
|
};
|
|
56
59
|
//#endregion
|
|
57
60
|
export { ActivityService, ObjectLinkService };
|
|
@@ -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();
|
|
@@ -9,8 +9,8 @@ import { accessSync, chmodSync, constants, copyFileSync, createReadStream, creat
|
|
|
9
9
|
import { execFile } from "node:child_process";
|
|
10
10
|
import { createHash, randomBytes } from "node:crypto";
|
|
11
11
|
import { promisify } from "node:util";
|
|
12
|
-
import { Readable } from "node:stream";
|
|
13
12
|
import { pipeline } from "node:stream/promises";
|
|
13
|
+
import { Readable } from "node:stream";
|
|
14
14
|
import lockfile from "proper-lockfile";
|
|
15
15
|
//#region src/agent/code-intelligence/binary.ts
|
|
16
16
|
init_paths();
|
|
@@ -2,6 +2,7 @@ import { isXopcDatabaseOpen } from "../../storage/sqlite/connection.js";
|
|
|
2
2
|
import { getSessionMetadata } from "../../storage/sqlite/session-repository.js";
|
|
3
3
|
import "../../storage/sqlite/index.js";
|
|
4
4
|
import { GoalService } from "../../goals/goal-service.js";
|
|
5
|
+
import { OutcomeRepository } from "../../work/outcome-repository.js";
|
|
5
6
|
import "../../goals/index.js";
|
|
6
7
|
import { sanitizeForPromptLiteral } from "../prompt/sanitize-for-prompt.js";
|
|
7
8
|
import { buildActiveProjectContextForPrompt } from "./project-context.js";
|
|
@@ -14,15 +15,16 @@ function bounded(value, max = MAX_OBJECTIVE_TEXT) {
|
|
|
14
15
|
return text.length <= max ? text : `${text.slice(0, max - 1).trimEnd()}…`;
|
|
15
16
|
}
|
|
16
17
|
function goalObjective(goal) {
|
|
18
|
+
const contract = new OutcomeRepository().getContract(goal.outcomeId, goal.outcomeContractVersion);
|
|
17
19
|
return {
|
|
18
20
|
kind: "goal",
|
|
19
21
|
id: goal.id,
|
|
20
22
|
title: goal.title,
|
|
21
|
-
objective:
|
|
23
|
+
objective: contract?.objective.trim() || goal.title,
|
|
22
24
|
status: goal.status,
|
|
23
|
-
scopeBoundary: bounded(
|
|
25
|
+
scopeBoundary: bounded(contract?.constraints.join("\n")),
|
|
24
26
|
acceptanceCriteria: goal.checklist.slice(0, MAX_CRITERIA).map((item) => item.text),
|
|
25
|
-
|
|
27
|
+
deliverables: contract?.deliverables.slice(0, MAX_CRITERIA) ?? [],
|
|
26
28
|
nextAction: bounded(goal.nextAction),
|
|
27
29
|
blockedReason: bounded(goal.blockedReason)
|
|
28
30
|
};
|
|
@@ -69,7 +71,7 @@ function formatCurrentWorkForPrompt(scope) {
|
|
|
69
71
|
if (objective.kind === "goal") {
|
|
70
72
|
if (objective.scopeBoundary) lines.push("", "## Scope Boundary", sanitizeForPromptLiteral(objective.scopeBoundary));
|
|
71
73
|
if (objective.acceptanceCriteria.length > 0) lines.push("", "## Acceptance Criteria", ...objective.acceptanceCriteria.map((item) => `- ${sanitizeForPromptLiteral(item)}`));
|
|
72
|
-
if (objective.
|
|
74
|
+
if (objective.deliverables.length > 0) lines.push("", "## Deliverables", ...objective.deliverables.map((item) => `- ${sanitizeForPromptLiteral(item)}`));
|
|
73
75
|
if (objective.nextAction) lines.push("", "Next action:", sanitizeForPromptLiteral(objective.nextAction));
|
|
74
76
|
if (objective.blockedReason) lines.push("", "Blocked reason:", sanitizeForPromptLiteral(objective.blockedReason));
|
|
75
77
|
}
|
|
@@ -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,9 +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
|
-
import {
|
|
7
|
+
import { OutcomeRepository } from "../../work/outcome-repository.js";
|
|
7
8
|
import { evaluateAfterTurnHermesLike } from "./evaluate-turn.js";
|
|
8
9
|
import "../../goals/index.js";
|
|
9
10
|
//#region src/agent/goals/post-turn.ts
|
|
@@ -22,9 +23,10 @@ function buildHistoryExcerpt(messages, maxChars) {
|
|
|
22
23
|
}
|
|
23
24
|
}
|
|
24
25
|
function buildGoalContextText(goal) {
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
if (
|
|
26
|
+
const contract = new OutcomeRepository().getContract(goal.outcomeId, goal.outcomeContractVersion);
|
|
27
|
+
const lines = [`Outcome: ${contract?.objective ?? goal.title}`];
|
|
28
|
+
if (contract?.constraints.length) lines.push(`Constraints:\n${contract.constraints.map((item) => `- ${item}`).join("\n")}`);
|
|
29
|
+
if (contract?.deliverables.length) lines.push(`Deliverables:\n${contract.deliverables.map((item) => `- ${item}`).join("\n")}`);
|
|
28
30
|
if (goal.contextMessage?.text.trim()) lines.push(`Context:\n${goal.contextMessage.text.trim()}`);
|
|
29
31
|
if (goal.contextMessage?.attachments.length) lines.push(["Attachments:", ...goal.contextMessage.attachments.map((attachment) => `- ${attachment.name} (${attachment.mimeType}, ${attachment.size} bytes) ${attachment.uri}`)].join("\n"));
|
|
30
32
|
return lines.join("\n\n");
|
|
@@ -101,8 +103,7 @@ async function handlePersistentGoalPostTurn(opts) {
|
|
|
101
103
|
goalContextExcerpt: buildGoalContextText(goal),
|
|
102
104
|
uiLocale: resolveGoalUiLocale(state)
|
|
103
105
|
});
|
|
104
|
-
const
|
|
105
|
-
const executionGaps = completionReadiness ? [...completionReadiness.missingEvidence, ...completionReadiness.pendingOutcome] : [];
|
|
106
|
+
const executionGaps = goalService.getCompletionReadiness(goal.id)?.pendingCriteria ?? [];
|
|
106
107
|
if (decision.verdict === "done" && executionGaps.length > 0 && decision.newState) {
|
|
107
108
|
const reason = `Completion evidence or outcome still needed: ${executionGaps.join("; ")}`;
|
|
108
109
|
decision = {
|
|
@@ -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";
|