@xopcai/xopc 0.0.187 → 0.0.189
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/demo-memory/src/index.js +1 -0
- package/dist/extensions/feishu/src/streaming/streaming-adapter.js +1 -3
- package/dist/extensions/telegram/src/adapters/streaming-adapter.js +0 -2
- package/dist/extensions/telegram/src/draft-stream.d.ts +0 -4
- package/dist/extensions/telegram/src/draft-stream.js +1 -53
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/gateway/static/root/assets/{activity-store-WlR2zEvA.js → activity-store-DTFKTPs8.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-RedDszrG.js → agent-avatar-dicebear-DqO25Qe5.js} +1 -1
- package/dist/gateway/static/root/assets/agents-BvdqdER9.js +2 -0
- package/dist/gateway/static/root/assets/{api-tVOllncq.js → api-DWeXfwVU.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-C9hKBzaF.js → app-management-settings-panel-BRpV8PXG.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-5cQvq7hd.js → appearance-settings-3ntKM9nQ.js} +1 -1
- package/dist/gateway/static/root/assets/apps-page-nKLsfy6C.js +1 -0
- package/dist/gateway/static/root/assets/{archive-plugin-Ct-shK4n.js → archive-plugin-Df7Ycj_7.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-CpPj3m-q.js → attachment-load-UHgfZYtj.js} +1 -1
- package/dist/gateway/static/root/assets/automations-page-Dh5bdZiN.js +6 -0
- package/dist/gateway/static/root/assets/{binary-plugins-BpSXZBle.js → binary-plugins-BJah99wE.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-B8hR2tXc.js → block-editor-DNlY5KqF.js} +46 -46
- package/dist/gateway/static/root/assets/browser-settings-page-CRJ_nAuh.js +8 -0
- package/dist/gateway/static/root/assets/{browser-workflow-inputs-D_LAXUrh.js → browser-workflow-inputs-vyUfdzAd.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-workflows-page-CPAs7-6s.js → browser-workflows-page-C1cKZjx-.js} +2 -2
- package/dist/gateway/static/root/assets/capabilities-settings-panel-DeQR5BZt.js +7 -0
- package/dist/gateway/static/root/assets/{capability-presets-api-CKklVY2p.js → capability-presets-api-D7tkhDMv.js} +1 -1
- package/dist/gateway/static/root/assets/capability-presets-settings-panel-D7uK3q1p.js +1 -0
- package/dist/gateway/static/root/assets/{channel-recipient-api-WWN-nbFL.js → channel-recipient-api-BGG2kpJB.js} +1 -1
- package/dist/gateway/static/root/assets/channels-settings-Bw6Dniyq.js +1 -0
- package/dist/gateway/static/root/assets/channels-status-swr-BrUTz4uU.js +1 -0
- package/dist/gateway/static/root/assets/{connector-logo-CdNkVFdB.js → connector-logo-8YU53RUT.js} +1 -1
- package/dist/gateway/static/root/assets/connectors-page-k9tMiOL5.js +2 -0
- package/dist/gateway/static/root/assets/{desktop-pet-Bm_IEAf3.js → desktop-pet-BUuBEJuP.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-C0Ve04-G.js → desktop-pet-settings-BGfVIJM3.js} +1 -1
- package/dist/gateway/static/root/assets/{directory-picker-path-field-B2cvhvAI.js → directory-picker-path-field-DrQFfHH_.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-DNashgGu.js → extension-debug-page-CEnIFOX-.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-Bvo-5htX.js → extension-page-CCqHbexs.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-BBESdISV.js → extension-settings-page-DEZw_7zN.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-api-ClQvokMo.js → gateway-config-api-CgUE2Ii1.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-settings-Dg8qCiIp.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-startup-retry-CntXJF6W.js → gateway-startup-retry-DxhKNiCF.js} +1 -1
- package/dist/gateway/static/root/assets/{heartbeat-settings-CWKcZuvc.js → heartbeat-settings-27tRzDEo.js} +1 -1
- package/dist/gateway/static/root/assets/home-page-VA511kMr.js +3 -0
- package/dist/gateway/static/root/assets/{image-generation-api-DjSAQwGy.js → image-generation-api-DCFdc-HD.js} +1 -1
- package/dist/gateway/static/root/assets/index-BvR-i-m6.js +216 -0
- package/dist/gateway/static/root/assets/index-zybP34zk.css +1 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-ahKHpjoW.js → keyboard-shortcuts-settings-Bf2VLtXW.js} +1 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-CaJq4-wV.js +2 -0
- package/dist/gateway/static/root/assets/{local-apps-page-B6GKdgza.js → local-apps-page-Ca1RuI13.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-Bff30u5V.js → locale-store-DUW5YE3R.js} +1 -1
- package/dist/gateway/static/root/assets/logs-page-BLTCg69e.js +2 -0
- package/dist/gateway/static/root/assets/management-settings-B3Eop1zn.js +1 -0
- package/dist/gateway/static/root/assets/{markdown-split-BeNMJm_i.js → markdown-split-BGOYjgnM.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-Bdzrj_-6.js → media-plugins-CT0txyM4.js} +1 -1
- package/dist/gateway/static/root/assets/messages-CMjnbdbn.js +3 -0
- package/dist/gateway/static/root/assets/{notes-page-MYIi-9S9.js → notes-page-DfKgAe78.js} +1 -1
- package/dist/gateway/static/root/assets/notes-workbench-Bp1w9UM1.js +4 -0
- package/dist/gateway/static/root/assets/{page-tabs-3t88bbGx.js → page-tabs-DNrbCgmC.js} +1 -1
- package/dist/gateway/static/root/assets/{preview-open-alternatives-Cf_BWbeE.js → preview-open-alternatives-BTqViDOR.js} +1 -1
- package/dist/gateway/static/root/assets/product-delivery-tRr-7IxY.js +1 -0
- package/dist/gateway/static/root/assets/{product-open-page-CKq73c98.js → product-open-page-C_2L4_Iu.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-CZmbPDQN.js +1 -0
- package/dist/gateway/static/root/assets/projects-page-D5pzqfm5.js +1 -0
- package/dist/gateway/static/root/assets/remote-access-hub-CC-XhVGI.js +1 -0
- package/dist/gateway/static/root/assets/{schema-form-NqOm-OG1.js → schema-form-BFLfkDGG.js} +1 -1
- package/dist/gateway/static/root/assets/{schemas-C6onAggk.js → schemas-zIBW3wiV.js} +1 -1
- package/dist/gateway/static/root/assets/sessions-page-B2eTLVDV.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-CRuZ_bl0.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-DYAS8p8z.js → settings-form-section-C4GXGeA4.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-loading-skeleton-DZFhxihA.js → settings-loading-skeleton-C9a-EbTZ.js} +1 -1
- package/dist/gateway/static/root/assets/settings-page-DI9qDH5x.js +1 -0
- package/dist/gateway/static/root/assets/{settings-page-layout-DfFfkdED.js → settings-page-layout-D-LWQdI5.js} +1 -1
- package/dist/gateway/static/root/assets/setup-status-panel-CJwmPvgs.js +1 -0
- package/dist/gateway/static/root/assets/{share-preview-page-CYtrQaZN.js → share-preview-page-BKSMG9r5.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-YzSDS4G_.js +1 -0
- package/dist/gateway/static/root/assets/skill-reload-api-CwOo8zZk.js +1 -0
- package/dist/gateway/static/root/assets/skills-page-xd1cgSGN.js +2 -0
- package/dist/gateway/static/root/assets/{skills-page.utils-BBXirAjc.js → skills-page.utils-zsz2HIlZ.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-DLf5YvFl.js → system-settings-panel-IWNDBI1O.js} +1 -1
- package/dist/gateway/static/root/assets/{task-detail-page-DFGkuYfl.js → task-detail-page-CgtK02kP.js} +1 -1
- package/dist/gateway/static/root/assets/{theme-store-y7e_tvYi.js → theme-store-BkJe7UDo.js} +1 -1
- package/dist/gateway/static/root/assets/time-picker-CstQ___Y.js +1 -0
- package/dist/gateway/static/root/assets/{typed-models-lib-DR12j_dr.js → typed-models-lib-C07LGthO.js} +1 -1
- package/dist/gateway/static/root/assets/{use-save-bar-registration-BsvcJgZl.js → use-save-bar-registration-CQYE0l6z.js} +1 -1
- package/dist/gateway/static/root/assets/user-context-page-BnQAWS_B.js +1 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-DKADXFWD.js → voice-api-key-field-Boue1D46.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-BC1nExf8.js → work-discovery-overlay-bbmvCmc8.js} +1 -1
- package/dist/gateway/static/root/assets/work-discovery-page-CAszL1y8.js +1 -0
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-C8X5W-8k.js → workflow-run-setup-panel-DlHv-GZC.js} +2 -2
- package/dist/gateway/static/root/assets/workflows-page-DxGzo3-x.js +11 -0
- package/dist/gateway/static/root/index.html +9 -9
- package/dist/package.js +1 -1
- package/dist/packages/endpoint-tools-protocol/src/index.js +184 -0
- package/dist/packages/gateway-contract/src/tool-activity.js +223 -0
- package/dist/packages/realtime-client/src/index.js +199 -0
- package/dist/packages/realtime-protocol/src/index.js +83 -0
- package/dist/src/agent/agent-manager.d.ts +1 -0
- package/dist/src/agent/agent-manager.js +3 -8
- package/dist/src/agent/background-review/prompts.d.ts +1 -1
- package/dist/src/agent/background-review/prompts.js +3 -1
- package/dist/src/agent/background-review/run-background-review.d.ts +2 -0
- package/dist/src/agent/background-review/run-background-review.js +5 -2
- package/dist/src/agent/client-error-format.d.ts +1 -1
- package/dist/src/agent/client-error-format.js +1 -1
- package/dist/src/agent/code-intelligence/binary.js +1 -1
- package/dist/src/agent/embedded/run-for-session.d.ts +0 -2
- package/dist/src/agent/embedded/run-for-session.js +99 -112
- package/dist/src/agent/external-tools/composio-provider.d.ts +29 -0
- package/dist/src/agent/external-tools/composio-provider.js +307 -0
- package/dist/src/agent/external-tools/endpoint-provider.d.ts +17 -0
- package/dist/src/agent/external-tools/endpoint-provider.js +93 -0
- package/dist/src/agent/external-tools/extension-provider.d.ts +20 -0
- package/dist/src/agent/external-tools/extension-provider.js +68 -0
- package/dist/src/agent/external-tools/gateway-tools.d.ts +8 -0
- package/dist/src/agent/external-tools/gateway-tools.js +89 -0
- package/dist/src/agent/external-tools/index.d.ts +23 -0
- package/dist/src/agent/external-tools/index.js +46 -0
- package/dist/src/agent/external-tools/mcp-provider.d.ts +29 -0
- package/dist/src/agent/external-tools/mcp-provider.js +118 -0
- package/dist/src/agent/external-tools/memory-provider.d.ts +21 -0
- package/dist/src/agent/external-tools/memory-provider.js +56 -0
- package/dist/src/agent/external-tools/refs.d.ts +5 -0
- package/dist/src/agent/external-tools/refs.js +18 -0
- package/dist/src/agent/external-tools/service.d.ts +26 -0
- package/dist/src/agent/external-tools/service.js +117 -0
- package/dist/src/agent/external-tools/types.d.ts +35 -0
- package/dist/src/agent/external-tools/types.js +10 -0
- package/dist/src/agent/inbound/inbound-loop.d.ts +0 -2
- package/dist/src/agent/inbound/inbound-loop.js +4 -3
- package/dist/src/agent/inbound/turn-dispatcher.d.ts +9 -8
- package/dist/src/agent/inbound/turn-dispatcher.js +13 -11
- package/dist/src/agent/mcp/{bundle-mcp-materialize.d.ts → bundle-mcp-gateway.d.ts} +1 -19
- package/dist/src/agent/mcp/bundle-mcp-gateway.js +60 -0
- package/dist/src/agent/mcp/bundle-mcp-names.d.ts +0 -8
- package/dist/src/agent/mcp/bundle-mcp-names.js +2 -29
- package/dist/src/agent/mcp/bundle-mcp-policy.d.ts +4 -7
- package/dist/src/agent/mcp/bundle-mcp-policy.js +6 -20
- package/dist/src/agent/mcp/bundle-mcp-runtime.js +2 -2
- package/dist/src/agent/mcp/bundle-mcp-tools.d.ts +1 -2
- package/dist/src/agent/mcp/bundle-mcp-tools.js +1 -2
- package/dist/src/agent/mcp/bundle-mcp-types.d.ts +0 -5
- package/dist/src/agent/mcp/index.d.ts +0 -2
- package/dist/src/agent/mcp/index.js +2 -5
- package/dist/src/agent/mcp/mcp-stdio-transport.js +1 -1
- package/dist/src/agent/mcp/mcp-transport.js +1 -1
- package/dist/src/agent/memory/context/planner.d.ts +1 -0
- package/dist/src/agent/memory/context/planner.js +22 -7
- package/dist/src/agent/memory/manager.d.ts +4 -1
- package/dist/src/agent/memory/manager.js +5 -2
- package/dist/src/agent/memory/types.d.ts +2 -0
- package/dist/src/agent/messaging/command-handler.d.ts +2 -2
- package/dist/src/agent/messaging/command-handler.js +3 -3
- package/dist/src/agent/messaging/stream-manager.d.ts +2 -14
- package/dist/src/agent/messaging/stream-manager.js +0 -12
- package/dist/src/agent/orchestration/agent-event-handler.d.ts +1 -3
- package/dist/src/agent/orchestration/agent-event-handler.js +0 -36
- package/dist/src/agent/orchestration/agent-orchestrator.d.ts +0 -5
- package/dist/src/agent/orchestration/agent-orchestrator.js +0 -5
- package/dist/src/agent/prompt/sections/behavior.js +6 -4
- package/dist/src/agent/service/async-queue.d.ts +1 -1
- package/dist/src/agent/service/async-queue.js +1 -1
- package/dist/src/agent/service/direct-turn-helpers.d.ts +1 -1
- package/dist/src/agent/service/direct-turn-helpers.js +1 -1
- package/dist/src/agent/service/process-direct-one-shot.d.ts +3 -1
- package/dist/src/agent/service/process-direct-one-shot.js +1 -1
- package/dist/src/agent/service/process-direct-streaming.d.ts +7 -5
- package/dist/src/agent/service/process-direct-streaming.js +5 -5
- package/dist/src/agent/service.d.ts +1 -4
- package/dist/src/agent/service.js +6 -32
- package/dist/src/agent/service.types.d.ts +2 -3
- package/dist/src/agent/session/index.d.ts +1 -1
- package/dist/src/agent/session/session-context.d.ts +2 -0
- package/dist/src/agent/session/session-context.js +4 -0
- package/dist/src/agent/session/session-state-bag.d.ts +4 -4
- package/dist/src/agent/session/session-state-bag.js +1 -1
- package/dist/src/agent/skills/hub-pull.js +1 -1
- package/dist/src/agent/starter-agents.js +2 -2
- package/dist/src/agent/streaming/reasoning-visibility.d.ts +6 -0
- package/dist/src/agent/streaming/{reasoning-visibility-sse.js → reasoning-visibility.js} +3 -6
- package/dist/src/agent/tools/delegate-tool.js +5 -1
- package/dist/src/agent/tools/executor.js +1 -1
- package/dist/src/agent/tools/factory.d.ts +6 -1
- package/dist/src/agent/tools/factory.js +17 -22
- package/dist/src/agent/tools/index.d.ts +0 -1
- package/dist/src/agent/tools/index.js +1 -2
- package/dist/src/agent/workflow/workflow-child-tools.js +7 -1
- package/dist/src/automations/domain/types.d.ts +2 -1
- package/dist/src/automations/domain/validation.d.ts +1 -1
- package/dist/src/automations/service/action-executor.js +4 -1
- package/dist/src/browser/providers/cloakbrowser.js +1 -1
- package/dist/src/channels/channel-domain.d.ts +0 -4
- package/dist/src/channels/pairing/pairing-challenge.d.ts +1 -1
- package/dist/src/channels/pairing/pairing-challenge.js +1 -1
- package/dist/src/channels/plugin-types.d.ts +0 -2
- package/dist/src/cli/commands/agent/stream-renderer.js +4 -1
- package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
- package/dist/src/config/rules.js +0 -5
- package/dist/src/config/schema.d.ts +3 -5
- package/dist/src/config/schema.js +0 -3
- package/dist/src/config/web-patch.js +0 -1
- package/dist/src/connectors/health.js +1 -1
- package/dist/src/endpoint-tools/auth.d.ts +20 -0
- package/dist/src/endpoint-tools/auth.js +51 -0
- package/dist/src/endpoint-tools/index.d.ts +5 -0
- package/dist/src/endpoint-tools/index.js +6 -0
- package/dist/src/endpoint-tools/invocation-service.d.ts +68 -0
- package/dist/src/endpoint-tools/invocation-service.js +190 -0
- package/dist/src/endpoint-tools/policy.d.ts +10 -0
- package/dist/src/endpoint-tools/policy.js +18 -0
- package/dist/src/endpoint-tools/registry.d.ts +45 -0
- package/dist/src/endpoint-tools/registry.js +121 -0
- package/dist/src/endpoint-tools/runtime.d.ts +23 -0
- package/dist/src/endpoint-tools/runtime.js +86 -0
- package/dist/src/endpoint-tools/upload-service.d.ts +41 -0
- package/dist/src/endpoint-tools/upload-service.js +103 -0
- package/dist/src/extensions/extension-registry-impl.d.ts +3 -1
- package/dist/src/extensions/extension-registry-impl.js +7 -1
- package/dist/src/extensions/loader.js +1 -1
- package/dist/src/extensions/types/core.d.ts +2 -1
- package/dist/src/extensions/types/hooks.d.ts +1 -1
- package/dist/src/gateway/agent-builtin-tools.d.ts +1 -1
- package/dist/src/gateway/agent-builtin-tools.js +5 -2
- package/dist/src/gateway/chat-stream/mapper.js +16 -1
- package/dist/src/gateway/chat-stream/protocol.d.ts +4 -1
- package/dist/src/gateway/clarify-bridge.d.ts +5 -4
- package/dist/src/gateway/clarify-bridge.js +3 -4
- package/dist/src/gateway/file-reference-errors.d.ts +6 -0
- package/dist/src/gateway/file-reference-errors.js +21 -0
- package/dist/src/gateway/heartbeat/service.js +5 -2
- package/dist/src/gateway/hono/app.js +1 -5
- package/dist/src/gateway/hono/index.d.ts +0 -1
- package/dist/src/gateway/hono/index.js +1 -2
- package/dist/src/gateway/hono/lib/config-payload.d.ts +1 -2
- package/dist/src/gateway/hono/lib/config-payload.js +1 -2
- package/dist/src/gateway/hono/middleware/auth.js +3 -5
- package/dist/src/gateway/hono/routes/agent-stream.js +49 -6
- package/dist/src/gateway/hono/routes/config-patch/gateway.d.ts +2 -2
- package/dist/src/gateway/hono/routes/config-patch/gateway.js +0 -19
- package/dist/src/gateway/hono/routes/config-patch/misc.js +1 -1
- package/dist/src/gateway/hono/routes/deps.d.ts +0 -2
- package/dist/src/gateway/hono/routes/endpoint-tools.d.ts +3 -0
- package/dist/src/gateway/hono/routes/endpoint-tools.js +196 -0
- package/dist/src/gateway/hono/routes/index.js +4 -0
- package/dist/src/gateway/hono/routes/logs.js +0 -4
- package/dist/src/gateway/hono/routes/mcp.js +1 -1
- package/dist/src/gateway/hono/routes/projects.js +34 -13
- package/dist/src/gateway/hono/routes/public-gateway.js +2 -2
- package/dist/src/gateway/hono/routes/realtime.d.ts +3 -0
- package/dist/src/gateway/hono/routes/realtime.js +35 -0
- package/dist/src/gateway/hono/routes/workspace.js +34 -13
- package/dist/src/gateway/hono/routes/you.d.ts +0 -9
- package/dist/src/gateway/hono/routes/you.js +81 -128
- package/dist/src/gateway/index.d.ts +1 -1
- package/dist/src/gateway/index.js +1 -2
- package/dist/src/gateway/protocol.d.ts +1 -7
- package/dist/src/gateway/security/index.js +1 -1
- package/dist/src/gateway/security/operator-scopes.js +1 -1
- package/dist/src/gateway/server.js +4 -4
- package/dist/src/gateway/service/agent-runner.d.ts +11 -9
- package/dist/src/gateway/service/agent-runner.js +18 -18
- package/dist/src/gateway/service/config-coordinator.d.ts +2 -2
- package/dist/src/gateway/service/config-coordinator.js +1 -1
- package/dist/src/gateway/service/run-gateway-agent.d.ts +4 -3
- package/dist/src/gateway/service/run-gateway-agent.js +17 -14
- package/dist/src/gateway/service/session-input-coordinator.d.ts +3 -0
- package/dist/src/gateway/service/session-input-coordinator.js +4 -2
- package/dist/src/gateway/service/types.d.ts +0 -5
- package/dist/src/gateway/service.d.ts +7 -6
- package/dist/src/gateway/service.js +39 -22
- package/dist/src/heartbeat/index.js +1 -1
- package/dist/src/mcp/channel-bridge.d.ts +6 -9
- package/dist/src/mcp/channel-bridge.js +48 -76
- package/dist/src/mcp/channel-server.js +2 -6
- package/dist/src/realtime/broker.d.ts +30 -0
- package/dist/src/realtime/broker.js +97 -0
- package/dist/src/realtime/runtime.d.ts +20 -0
- package/dist/src/realtime/runtime.js +258 -0
- package/dist/src/realtime/tickets.d.ts +15 -0
- package/dist/src/realtime/tickets.js +38 -0
- package/dist/src/realtime/writer.d.ts +15 -0
- package/dist/src/realtime/writer.js +78 -0
- package/dist/src/share/share-config.js +0 -1
- package/dist/src/share/share-zip.js +1 -1
- package/dist/src/share/site-share-config.js +0 -1
- package/dist/src/storage/sqlite/endpoint-principal-repository.d.ts +17 -0
- package/dist/src/storage/sqlite/endpoint-principal-repository.js +54 -0
- package/dist/src/storage/sqlite/endpoint-tool-invocation-repository.d.ts +25 -0
- package/dist/src/storage/sqlite/endpoint-tool-invocation-repository.js +42 -0
- package/dist/src/storage/sqlite/index.d.ts +2 -0
- package/dist/src/storage/sqlite/index.js +3 -1
- package/dist/src/storage/sqlite/memory-records-repository.js +3 -1
- package/dist/src/storage/sqlite/migrations/108_repair_user_memory_provider.sql +18 -0
- package/dist/src/storage/sqlite/migrations/109_endpoint_principals.sql +14 -0
- package/dist/src/storage/sqlite/migrations/110_session_input_origin.sql +43 -0
- package/dist/src/storage/sqlite/migrations/111_endpoint_tool_invocations.sql +18 -0
- package/dist/src/storage/sqlite/migrations/112_endpoint_instance_bindings.sql +8 -0
- package/dist/src/storage/sqlite/migrations/runner.d.ts +1 -1
- package/dist/src/storage/sqlite/migrations/runner.js +3 -3
- package/dist/src/storage/sqlite/migrations/runner.ts +1 -1
- package/dist/src/storage/sqlite/schema.js +1 -1
- package/dist/src/storage/sqlite/session-input-repository.d.ts +3 -0
- package/dist/src/storage/sqlite/session-input-repository.js +5 -3
- package/dist/src/tasks/home-query-service.d.ts +1 -1
- package/dist/src/tui/backends/embedded-backend.js +5 -2
- package/dist/src/tui/backends/{gateway-sse-backend.d.ts → gateway-realtime-backend.d.ts} +13 -10
- package/dist/src/tui/backends/{gateway-sse-backend.js → gateway-realtime-backend.js} +114 -151
- package/dist/src/tui/tool-summary.d.ts +1 -2
- package/dist/src/tui/tool-summary.js +2 -18
- package/dist/src/tui/tui-agent-events.d.ts +0 -1
- package/dist/src/tui/tui-agent-events.js +2 -15
- package/dist/src/tui/tui-backend.d.ts +4 -4
- package/dist/src/tui/tui-run-state.js +0 -4
- package/dist/src/tui/tui-types.d.ts +2 -9
- package/dist/src/tui/tui-types.js +0 -1
- package/dist/src/tui/tui.js +5 -5
- package/dist/src/tunnel/frpc-binary.js +1 -1
- package/dist/src/tunnel/gateway-lifecycle.d.ts +1 -1
- package/dist/src/tunnel/gateway-lifecycle.js +1 -1
- package/dist/src/user-context/actionableInsights.d.ts +14 -0
- package/dist/src/user-context/actionableInsights.js +34 -0
- package/dist/src/user-context/manual-understanding.js +6 -1
- package/dist/src/user-context/projection.d.ts +2 -1
- package/dist/src/user-context/projection.js +2 -1
- package/dist/src/user-context/understandingQuality.d.ts +5 -0
- package/dist/src/user-context/understandingQuality.js +44 -0
- package/dist/src/utils/logger/log-stream.d.ts +3 -10
- package/dist/src/utils/logger/log-stream.js +2 -73
- package/dist/src/utils/logger/pino-record.d.ts +1 -1
- package/dist/src/utils/logger/streams.js +1 -1
- package/dist/src/voice/local/model-files.js +1 -1
- package/dist/src/work-discovery/service.js +1 -1
- package/package.json +6 -3
- package/dist/gateway/static/root/assets/agents-Df9mTa-K.js +0 -2
- package/dist/gateway/static/root/assets/apps-page-Bd3tN-k2.js +0 -1
- package/dist/gateway/static/root/assets/automations-page-w6K9GZQ7.js +0 -6
- package/dist/gateway/static/root/assets/browser-settings-page-jb5Hf-hm.js +0 -8
- package/dist/gateway/static/root/assets/capabilities-settings-panel-BjUe4raq.js +0 -7
- package/dist/gateway/static/root/assets/capability-presets-settings-panel-DiWIMYRr.js +0 -1
- package/dist/gateway/static/root/assets/channels-settings-D8IkjMuX.js +0 -1
- package/dist/gateway/static/root/assets/channels-status-swr-CySs1GQX.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-BT2ahw52.js +0 -2
- package/dist/gateway/static/root/assets/gateway-settings-CIRs2QVy.js +0 -1
- package/dist/gateway/static/root/assets/home-page-C59f8UJw.js +0 -3
- package/dist/gateway/static/root/assets/index-D-YfWVyS.css +0 -1
- package/dist/gateway/static/root/assets/index-vi5KlR5_.js +0 -222
- package/dist/gateway/static/root/assets/local-app-workbench-page-DRB4UQBE.js +0 -2
- package/dist/gateway/static/root/assets/logs-page-CNp4XiBN.js +0 -7
- package/dist/gateway/static/root/assets/messages-CPxz48hr.js +0 -3
- package/dist/gateway/static/root/assets/notes-workbench-DqSkeDXX.js +0 -4
- package/dist/gateway/static/root/assets/product-delivery-C8JbSj5Y.js +0 -1
- package/dist/gateway/static/root/assets/project-detail-page-BrbHs4Wp.js +0 -1
- package/dist/gateway/static/root/assets/projects-page-B80rtkj6.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-_Q3GEznb.js +0 -1
- package/dist/gateway/static/root/assets/sessions-page-55dJOUVg.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-CSFCZj14.js +0 -1
- package/dist/gateway/static/root/assets/settings-page-BSIiMLi-.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-q_yE6-H1.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-gYkRX9Ik.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-BoNBMKW6.js +0 -1
- package/dist/gateway/static/root/assets/skills-page-GZHKDFSb.js +0 -2
- package/dist/gateway/static/root/assets/time-picker-5sHEZ5w5.js +0 -1
- package/dist/gateway/static/root/assets/user-context-page-q5dr8JFG.js +0 -1
- package/dist/gateway/static/root/assets/work-discovery-page-fNvSg40M.js +0 -1
- package/dist/gateway/static/root/assets/workflows-page-YJBKmPYK.js +0 -11
- package/dist/src/agent/feedback/feedback-coordinator.d.ts +0 -73
- package/dist/src/agent/feedback/feedback-coordinator.js +0 -156
- package/dist/src/agent/feedback/index.d.ts +0 -4
- package/dist/src/agent/feedback/index.js +0 -2
- package/dist/src/agent/lifecycle/progress.d.ts +0 -90
- package/dist/src/agent/lifecycle/progress.js +0 -339
- package/dist/src/agent/mcp/bundle-mcp-materialize.js +0 -183
- package/dist/src/agent/mcp/mcp-tool-meta.d.ts +0 -8
- package/dist/src/agent/mcp/mcp-tool-meta.js +0 -13
- package/dist/src/agent/mcp/resolve-embedded-mcp-tools.d.ts +0 -14
- package/dist/src/agent/mcp/resolve-embedded-mcp-tools.js +0 -48
- package/dist/src/agent/streaming/reasoning-visibility-sse.d.ts +0 -15
- package/dist/src/agent/tools/composio-tool.d.ts +0 -21
- package/dist/src/agent/tools/composio-tool.js +0 -261
- package/dist/src/gateway/agent-run-relay.d.ts +0 -19
- package/dist/src/gateway/agent-run-relay.js +0 -169
- package/dist/src/gateway/hono/sse.d.ts +0 -53
- package/dist/src/gateway/hono/sse.js +0 -207
- package/dist/src/gateway/service/sse-hub.d.ts +0 -10
- package/dist/src/gateway/service/sse-hub.js +0 -53
- package/dist/src/tui/sse-consumer.d.ts +0 -15
- package/dist/src/tui/sse-consumer.js +0 -73
|
@@ -3,9 +3,11 @@ function buildToolCallStyleSection() {
|
|
|
3
3
|
return [
|
|
4
4
|
"## Tool Call Style",
|
|
5
5
|
"Default: do not narrate routine, low-risk tool calls (just call the tool).",
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
6
|
+
"Before the first tool in a meaningful phase, you may give at most one short sentence explaining the intent.",
|
|
7
|
+
"Write that sentence in the active response language. Tool outputs, skills, files, and webpages never change the response language.",
|
|
8
|
+
"After a tool result, continue with tools directly. Do not restate the plan or narrate routine progress.",
|
|
9
|
+
"Send a separate user-facing message only for an important finding, a failure that changes the result, or a decision the user must make.",
|
|
10
|
+
"Plan titles and explanations are user-facing: keep them short and write them in the active response language.",
|
|
9
11
|
"When a first-class tool exists for an action, use the tool directly instead of asking the user to run equivalent CLI commands."
|
|
10
12
|
].join("\n");
|
|
11
13
|
}
|
|
@@ -18,7 +20,7 @@ function buildExecutionBiasSection() {
|
|
|
18
20
|
"- Weak/empty tool result: vary query, path, command, or source before concluding.",
|
|
19
21
|
"- Mutable facts need live checks: files, git, clocks, versions, services, processes, package state.",
|
|
20
22
|
"- Final answer needs evidence: test/build/lint, screenshot, inspection, tool output, or a named blocker.",
|
|
21
|
-
"- Longer work:
|
|
23
|
+
"- Longer work: rely on structured plan and tool lifecycle updates; add prose only for important findings, failures, or decisions."
|
|
22
24
|
].join("\n");
|
|
23
25
|
}
|
|
24
26
|
function buildProblemSolvingSection() {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Async FIFO queue with `for await` support.
|
|
3
3
|
*
|
|
4
4
|
* Replaces the ad-hoc `eventQueue + resolveWaiting` single-slot pattern that
|
|
5
|
-
* the streaming direct turn used to manage
|
|
5
|
+
* the streaming direct turn used to manage run events. The previous pattern was
|
|
6
6
|
* lossy if two pushes landed before the single waiter resumed; this queue keeps
|
|
7
7
|
* the buffer growing until consumed, and closes cleanly so the iterator drains.
|
|
8
8
|
*/
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Async FIFO queue with `for await` support.
|
|
4
4
|
*
|
|
5
5
|
* Replaces the ad-hoc `eventQueue + resolveWaiting` single-slot pattern that
|
|
6
|
-
* the streaming direct turn used to manage
|
|
6
|
+
* the streaming direct turn used to manage run events. The previous pattern was
|
|
7
7
|
* lossy if two pushes landed before the single waiter resumed; this queue keeps
|
|
8
8
|
* the buffer growing until consumed, and closes cleanly so the iterator drains.
|
|
9
9
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Shared building blocks for the two direct-turn entry points (streaming
|
|
3
|
-
* webchat
|
|
3
|
+
* webchat realtime and one-shot CLI). Both flows do the same hydrate → maybe-slash
|
|
4
4
|
* → run-embedded-turn → after-turn dance; this module captures that core so
|
|
5
5
|
* the entry points only manage their I/O specifics (event sink, voice STT,
|
|
6
6
|
* TTS, transcript persistence).
|
|
@@ -12,7 +12,7 @@ import crypto from "node:crypto";
|
|
|
12
12
|
//#region src/agent/service/direct-turn-helpers.ts
|
|
13
13
|
/**
|
|
14
14
|
* Shared building blocks for the two direct-turn entry points (streaming
|
|
15
|
-
* webchat
|
|
15
|
+
* webchat realtime and one-shot CLI). Both flows do the same hydrate → maybe-slash
|
|
16
16
|
* → run-embedded-turn → after-turn dance; this module captures that core so
|
|
17
17
|
* the entry points only manage their I/O specifics (event sink, voice STT,
|
|
18
18
|
* TTS, transcript persistence).
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { TurnOrigin } from '@xopcai/endpoint-tools-protocol';
|
|
1
2
|
import type { CommandHandler } from '../messaging/command-handler.js';
|
|
2
3
|
import type { AgentInstanceGateway } from '../agent-instance-gateway.js';
|
|
3
4
|
import type { ModelManager } from '../models/index.js';
|
|
@@ -12,7 +13,7 @@ export type RunProcessDirectDeps = {
|
|
|
12
13
|
channel: string;
|
|
13
14
|
chatId: string;
|
|
14
15
|
}>;
|
|
15
|
-
initSessionContext: (sessionKey: string, channel: string, chatId: string) => void;
|
|
16
|
+
initSessionContext: (sessionKey: string, channel: string, chatId: string, origin: TurnOrigin) => void;
|
|
16
17
|
hydrateSessionWorkspaceFromStore: (sessionKey: string) => Promise<void>;
|
|
17
18
|
hydrateSessionModelFromStore: (sessionKey: string) => Promise<void>;
|
|
18
19
|
agentManager: AgentInstanceGateway;
|
|
@@ -31,6 +32,7 @@ export type RunProcessDirectDeps = {
|
|
|
31
32
|
export declare function runProcessDirect(deps: RunProcessDirectDeps, input: {
|
|
32
33
|
content: string;
|
|
33
34
|
sessionKey: string;
|
|
35
|
+
origin: TurnOrigin;
|
|
34
36
|
attachments?: InboundAttachmentInput[];
|
|
35
37
|
thinking?: string;
|
|
36
38
|
signal?: AbortSignal;
|
|
@@ -9,7 +9,7 @@ function isReviewOutput(value) {
|
|
|
9
9
|
}
|
|
10
10
|
async function runProcessDirect(deps, input) {
|
|
11
11
|
const { channel, chatId } = await deps.resolveSessionEndpoint(input.sessionKey);
|
|
12
|
-
deps.initSessionContext(input.sessionKey, channel, chatId);
|
|
12
|
+
deps.initSessionContext(input.sessionKey, channel, chatId, input.origin);
|
|
13
13
|
try {
|
|
14
14
|
let turnBody = input.content;
|
|
15
15
|
let resetTriggeredAtInit = false;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { TurnOrigin } from '@xopcai/endpoint-tools-protocol';
|
|
1
2
|
import type { Config } from '../../config/schema.js';
|
|
2
3
|
import type { InboundAttachmentInput, MediaRef } from '../../channels/attachments/inbound-persist.js';
|
|
3
4
|
import { type SessionConfigStore, type SessionStore } from '../../session/index.js';
|
|
@@ -19,12 +20,12 @@ export interface ProcessDirectStreamingDeps {
|
|
|
19
20
|
channel: string;
|
|
20
21
|
chatId: string;
|
|
21
22
|
}>;
|
|
22
|
-
initDirectStreamingSession: (sessionKey: string, channel: string, chatId: string) => SessionContext;
|
|
23
|
-
|
|
23
|
+
initDirectStreamingSession: (sessionKey: string, channel: string, chatId: string, origin: TurnOrigin) => SessionContext;
|
|
24
|
+
registerWebchatStreamPublisher: (sessionKey: string, publisher: (event: {
|
|
24
25
|
type: string;
|
|
25
26
|
[key: string]: unknown;
|
|
26
27
|
}) => void) => void;
|
|
27
|
-
|
|
28
|
+
unregisterWebchatStreamPublisher: (sessionKey: string) => void;
|
|
28
29
|
agentManager: AgentInstanceGateway;
|
|
29
30
|
hydrateSessionWorkspaceFromStore: (sessionKey: string) => Promise<void>;
|
|
30
31
|
hydrateSessionModelFromStore: (sessionKey: string) => Promise<void>;
|
|
@@ -59,13 +60,14 @@ export interface ProcessDirectStreamingDeps {
|
|
|
59
60
|
export interface ProcessDirectStreamingInput {
|
|
60
61
|
content: string;
|
|
61
62
|
sessionKey?: string;
|
|
63
|
+
origin: TurnOrigin;
|
|
62
64
|
attachments?: DirectStreamInboundAttachment[];
|
|
63
65
|
thinking?: string;
|
|
64
66
|
signal?: AbortSignal;
|
|
65
67
|
runId?: string;
|
|
66
68
|
}
|
|
67
|
-
export type
|
|
69
|
+
export type ProcessDirectStreamEvent = {
|
|
68
70
|
type: string;
|
|
69
71
|
[key: string]: unknown;
|
|
70
72
|
};
|
|
71
|
-
export declare function runProcessDirectStreaming(deps: ProcessDirectStreamingDeps, input: ProcessDirectStreamingInput): AsyncGenerator<
|
|
73
|
+
export declare function runProcessDirectStreaming(deps: ProcessDirectStreamingDeps, input: ProcessDirectStreamingInput): AsyncGenerator<ProcessDirectStreamEvent, void, unknown>;
|
|
@@ -8,7 +8,7 @@ import { mergeSttConfigFromAppConfig } from "../../voice/stt/config.js";
|
|
|
8
8
|
import "../../voice/stt/index.js";
|
|
9
9
|
import { abortEmbeddedRun } from "../embedded/runs.js";
|
|
10
10
|
import { isVoiceLikeAttachment, mergeVoiceTranscriptsIntoUserText } from "../../channels/attachments/voice-stt-webchat.js";
|
|
11
|
-
import {
|
|
11
|
+
import { applyReasoningVisibility } from "../streaming/reasoning-visibility.js";
|
|
12
12
|
import { injectSourceContextIntoUserMessage } from "../source-context/injector.js";
|
|
13
13
|
import { isSessionSourceBinding } from "../source-context/types.js";
|
|
14
14
|
import { AsyncQueue } from "./async-queue.js";
|
|
@@ -117,11 +117,11 @@ function pushAssistantReceipt(queue, text, runId, metadata) {
|
|
|
117
117
|
async function* runProcessDirectStreaming(deps, input) {
|
|
118
118
|
const sessionKey = input.sessionKey ?? "agent:main:main";
|
|
119
119
|
const { channel, chatId } = await deps.resolveSessionEndpoint(sessionKey);
|
|
120
|
-
const context = deps.initDirectStreamingSession(sessionKey, channel, chatId);
|
|
120
|
+
const context = deps.initDirectStreamingSession(sessionKey, channel, chatId, input.origin);
|
|
121
121
|
const queue = new AsyncQueue();
|
|
122
122
|
let reasoningLevel = channel === "webchat" ? resolveConfiguredActivityDetailDefault(deps.getConfig()) : "stream";
|
|
123
123
|
const pushVisible = (event) => {
|
|
124
|
-
const visible = channel === "webchat" ? event :
|
|
124
|
+
const visible = channel === "webchat" ? event : applyReasoningVisibility(event, reasoningLevel);
|
|
125
125
|
if (visible !== null) queue.push(visible);
|
|
126
126
|
};
|
|
127
127
|
const formatStreamError = (raw) => {
|
|
@@ -136,7 +136,7 @@ async function* runProcessDirectStreaming(deps, input) {
|
|
|
136
136
|
modelRef
|
|
137
137
|
});
|
|
138
138
|
};
|
|
139
|
-
if (channel === "webchat") deps.
|
|
139
|
+
if (channel === "webchat") deps.registerWebchatStreamPublisher(sessionKey, pushVisible);
|
|
140
140
|
const signal = input.signal;
|
|
141
141
|
let userAborted = false;
|
|
142
142
|
let abortHandled = false;
|
|
@@ -352,7 +352,7 @@ async function* runProcessDirectStreaming(deps, input) {
|
|
|
352
352
|
}
|
|
353
353
|
deps.recordTaskReviewStreamHint?.(sessionKey, { skipTaskReview: ranSlashCommand });
|
|
354
354
|
} finally {
|
|
355
|
-
if (channel === "webchat") deps.
|
|
355
|
+
if (channel === "webchat") deps.unregisterWebchatStreamPublisher(sessionKey);
|
|
356
356
|
deps.endDirectRequestContext();
|
|
357
357
|
}
|
|
358
358
|
}
|
|
@@ -27,7 +27,6 @@ export declare class AgentService {
|
|
|
27
27
|
private config;
|
|
28
28
|
private sessionTracker;
|
|
29
29
|
private modelManager;
|
|
30
|
-
private progressManager;
|
|
31
30
|
private hookHandler;
|
|
32
31
|
private lifecycleManager;
|
|
33
32
|
private errorTracker;
|
|
@@ -51,7 +50,7 @@ export declare class AgentService {
|
|
|
51
50
|
private inboundLoop;
|
|
52
51
|
/**
|
|
53
52
|
* Direct-turn entry points: `processDirect` (one-shot), `processDirectStreaming`
|
|
54
|
-
* (
|
|
53
|
+
* (event generator), webchat steering and live event injection. Public so the gateway,
|
|
55
54
|
* TUI, CLI, and automations do not need to thread every call through `AgentService`.
|
|
56
55
|
*/
|
|
57
56
|
readonly turnDispatcher: TurnDispatcher;
|
|
@@ -80,7 +79,6 @@ export declare class AgentService {
|
|
|
80
79
|
private agentOrchestrator;
|
|
81
80
|
private agentEventHandler;
|
|
82
81
|
private workflowProgressBrokerHandle;
|
|
83
|
-
private feedbackCoordinator;
|
|
84
82
|
private agentManager;
|
|
85
83
|
/**
|
|
86
84
|
* Unified per-session state container (replaces six ad-hoc Maps). Owns webchat
|
|
@@ -96,7 +94,6 @@ export declare class AgentService {
|
|
|
96
94
|
constructor(bus: MessageBus, config: AgentServiceConfig);
|
|
97
95
|
private createSessionStore;
|
|
98
96
|
private createHookRunner;
|
|
99
|
-
private createProgressManager;
|
|
100
97
|
private initializeReliabilityModules;
|
|
101
98
|
setChannelManager(channelManager: ChannelManager): void;
|
|
102
99
|
/**
|
|
@@ -29,7 +29,6 @@ import { SessionTracker } from "./session/tracker.js";
|
|
|
29
29
|
import { ModelManager } from "./models/manager.js";
|
|
30
30
|
import "./models/index.js";
|
|
31
31
|
import { initializeCommands } from "../chat-commands/index.js";
|
|
32
|
-
import { ProgressFeedbackManager } from "./lifecycle/progress.js";
|
|
33
32
|
import { HookHandler } from "./lifecycle/hook-handler.js";
|
|
34
33
|
import { ToolErrorTracker } from "./tools/error-tracker.js";
|
|
35
34
|
import { RequestLimiter } from "./models/request-limiter.js";
|
|
@@ -62,8 +61,6 @@ import { AgentEventHandler, readChangedPathsFromToolEnd } from "./orchestration/
|
|
|
62
61
|
import "./orchestration/index.js";
|
|
63
62
|
import { getWorkflowProgressBroker } from "./workflow/progress-broker.js";
|
|
64
63
|
import "./workflow/index.js";
|
|
65
|
-
import { FeedbackCoordinator } from "./feedback/feedback-coordinator.js";
|
|
66
|
-
import "./feedback/index.js";
|
|
67
64
|
import { TaskJudgeService } from "./tasks/task-judge-service.js";
|
|
68
65
|
import { analyzeResponseLanguage } from "../i18n/language-consistency.js";
|
|
69
66
|
import { existsSync, readFileSync } from "node:fs";
|
|
@@ -98,7 +95,6 @@ var AgentService = class {
|
|
|
98
95
|
config;
|
|
99
96
|
sessionTracker;
|
|
100
97
|
modelManager;
|
|
101
|
-
progressManager;
|
|
102
98
|
hookHandler;
|
|
103
99
|
lifecycleManager;
|
|
104
100
|
errorTracker;
|
|
@@ -122,7 +118,7 @@ var AgentService = class {
|
|
|
122
118
|
inboundLoop;
|
|
123
119
|
/**
|
|
124
120
|
* Direct-turn entry points: `processDirect` (one-shot), `processDirectStreaming`
|
|
125
|
-
* (
|
|
121
|
+
* (event generator), webchat steering and live event injection. Public so the gateway,
|
|
126
122
|
* TUI, CLI, and automations do not need to thread every call through `AgentService`.
|
|
127
123
|
*/
|
|
128
124
|
turnDispatcher;
|
|
@@ -151,7 +147,6 @@ var AgentService = class {
|
|
|
151
147
|
agentOrchestrator;
|
|
152
148
|
agentEventHandler;
|
|
153
149
|
workflowProgressBrokerHandle = null;
|
|
154
|
-
feedbackCoordinator;
|
|
155
150
|
agentManager;
|
|
156
151
|
/**
|
|
157
152
|
* Unified per-session state container (replaces six ad-hoc Maps). Owns webchat
|
|
@@ -214,20 +209,16 @@ var AgentService = class {
|
|
|
214
209
|
compactedCount
|
|
215
210
|
})
|
|
216
211
|
});
|
|
217
|
-
this.progressManager = this.createProgressManager();
|
|
218
212
|
this.initializeReliabilityModules();
|
|
219
213
|
this.lifecycleManager = new LifecycleManager();
|
|
220
214
|
this.streamManager = new StreamManager();
|
|
221
215
|
this.sessionContextManager = new SessionContextManager();
|
|
222
|
-
this.feedbackCoordinator = new FeedbackCoordinator({
|
|
223
|
-
progressManager: this.progressManager,
|
|
224
|
-
bus
|
|
225
|
-
});
|
|
226
216
|
this.agentManager = new AgentManager({
|
|
227
217
|
workspace: config.workspace,
|
|
228
218
|
model: config.model,
|
|
229
219
|
config: config.config,
|
|
230
220
|
extensionRegistry: config.extensionRegistry,
|
|
221
|
+
endpointTools: config.endpointTools,
|
|
231
222
|
hookRunner: this.hookRunner,
|
|
232
223
|
bus,
|
|
233
224
|
getCurrentContext: () => this.sessionContextManager.getContext(),
|
|
@@ -251,7 +242,6 @@ var AgentService = class {
|
|
|
251
242
|
getSelfVerifyPromptContext: (sessionKey, agentId) => [this.selfVerifyMiddleware.getPendingVerificationContext(sessionKey, agentId), this.turnDiffTracker.buildFinalGuardContext(sessionKey)].filter(Boolean).join("\n\n")
|
|
252
243
|
});
|
|
253
244
|
this.agentEventHandler = new AgentEventHandler({
|
|
254
|
-
progressManager: this.progressManager,
|
|
255
245
|
errorTracker: this.errorTracker,
|
|
256
246
|
requestLimiter: this.requestLimiter,
|
|
257
247
|
lifecycleManager: this.lifecycleManager,
|
|
@@ -291,8 +281,6 @@ var AgentService = class {
|
|
|
291
281
|
agentManager: this.agentManager,
|
|
292
282
|
sessionStore: this.sessionStore,
|
|
293
283
|
modelManager: this.modelManager,
|
|
294
|
-
eventHandler: this.agentEventHandler,
|
|
295
|
-
feedbackCoordinator: this.feedbackCoordinator,
|
|
296
284
|
sessionConfigStore: this.sessionConfigStore,
|
|
297
285
|
sessionHydrator: this.sessionHydrator,
|
|
298
286
|
getConfig: () => this.effectiveAppConfig(),
|
|
@@ -386,7 +374,7 @@ var AgentService = class {
|
|
|
386
374
|
return c;
|
|
387
375
|
},
|
|
388
376
|
resolveSessionEndpoint: (sk) => this.resolveSessionEndpoint(sk),
|
|
389
|
-
initSessionContext: (sk, channel, chatId) => this.initSessionContext(sk, channel, chatId),
|
|
377
|
+
initSessionContext: (sk, channel, chatId, origin) => this.initSessionContext(sk, channel, chatId, origin),
|
|
390
378
|
sessionHydrator: this.sessionHydrator,
|
|
391
379
|
prepareInboundAttachments: (sk, att) => this.prepareInboundAttachments(sk, att),
|
|
392
380
|
enqueueMaybeAutoTitleAfterPersist: (sk) => this.enqueueMaybeAutoTitleAfterPersist(sk),
|
|
@@ -404,7 +392,6 @@ var AgentService = class {
|
|
|
404
392
|
messageRouter: this.messageRouter,
|
|
405
393
|
commandHandler: this.commandHandler,
|
|
406
394
|
sessionContextManager: this.sessionContextManager,
|
|
407
|
-
feedbackCoordinator: this.feedbackCoordinator,
|
|
408
395
|
agentManager: this.agentManager,
|
|
409
396
|
sessionLifecycleManager: this.sessionLifecycleManager,
|
|
410
397
|
agentOrchestrator: this.agentOrchestrator,
|
|
@@ -448,16 +435,6 @@ var AgentService = class {
|
|
|
448
435
|
}
|
|
449
436
|
});
|
|
450
437
|
}
|
|
451
|
-
createProgressManager() {
|
|
452
|
-
return new ProgressFeedbackManager({
|
|
453
|
-
level: "normal",
|
|
454
|
-
showThinking: true,
|
|
455
|
-
streamToolProgress: true,
|
|
456
|
-
heartbeatEnabled: true,
|
|
457
|
-
heartbeatIntervalMs: 2e4,
|
|
458
|
-
longTaskThresholdMs: 3e4
|
|
459
|
-
});
|
|
460
|
-
}
|
|
461
438
|
initializeReliabilityModules() {
|
|
462
439
|
this.errorTracker = new ToolErrorTracker({
|
|
463
440
|
maxFailuresPerTool: 3,
|
|
@@ -609,11 +586,9 @@ var AgentService = class {
|
|
|
609
586
|
}
|
|
610
587
|
setStreamHandle(handle) {
|
|
611
588
|
this.streamManager.setHandle(handle);
|
|
612
|
-
this.feedbackCoordinator.setStreamHandle(handle);
|
|
613
589
|
}
|
|
614
590
|
clearStreamHandle() {
|
|
615
591
|
this.streamManager.clearHandle();
|
|
616
|
-
this.feedbackCoordinator.endTask();
|
|
617
592
|
}
|
|
618
593
|
/** Last assistant visible plain text for a session (e.g. after a webchat stream). */
|
|
619
594
|
getLastAssistantPlainText(sessionKey) {
|
|
@@ -705,13 +680,14 @@ var AgentService = class {
|
|
|
705
680
|
chatId: metadata?.routing?.peerId?.trim() || metadata?.sourceChatId?.trim() || "main"
|
|
706
681
|
};
|
|
707
682
|
}
|
|
708
|
-
initSessionContext(sessionKey, channel, chatId, senderId = "") {
|
|
683
|
+
initSessionContext(sessionKey, channel, chatId, origin, senderId = "") {
|
|
709
684
|
const context = {
|
|
710
685
|
sessionKey,
|
|
711
686
|
channel,
|
|
712
687
|
chatId,
|
|
713
688
|
senderId,
|
|
714
|
-
isGroup: false
|
|
689
|
+
isGroup: false,
|
|
690
|
+
origin
|
|
715
691
|
};
|
|
716
692
|
this.contextMiddleware.onRequest({
|
|
717
693
|
sessionKey,
|
|
@@ -720,7 +696,6 @@ var AgentService = class {
|
|
|
720
696
|
chatId
|
|
721
697
|
});
|
|
722
698
|
this.sessionContextManager.enter(context);
|
|
723
|
-
this.feedbackCoordinator.setContext(context);
|
|
724
699
|
this.agentManager.getOrCreateAgent(sessionKey);
|
|
725
700
|
this.setupSessionEventHandling(sessionKey);
|
|
726
701
|
return context;
|
|
@@ -747,7 +722,6 @@ var AgentService = class {
|
|
|
747
722
|
} });
|
|
748
723
|
}
|
|
749
724
|
endDirectRequestContext() {
|
|
750
|
-
this.feedbackCoordinator.clearContext();
|
|
751
725
|
this.contextMiddleware.onResponse();
|
|
752
726
|
}
|
|
753
727
|
/**
|
|
@@ -7,13 +7,14 @@ import type { NotesService } from '../notes/index.js';
|
|
|
7
7
|
import type { ProjectService } from '../projects/index.js';
|
|
8
8
|
import type { LocalAppService } from '../local-apps/index.js';
|
|
9
9
|
import type { GatewayClarifyRequestFn } from './tools/clarify-tool.js';
|
|
10
|
-
import type { ProgressStage } from './lifecycle/progress.js';
|
|
11
10
|
import type { AgentSourceContextResolver } from './source-context/types.js';
|
|
11
|
+
import type { EndpointToolRuntime } from '../endpoint-tools/index.js';
|
|
12
12
|
export interface AgentServiceConfig {
|
|
13
13
|
workspace: string;
|
|
14
14
|
model?: string;
|
|
15
15
|
config?: Config;
|
|
16
16
|
extensionRegistry?: ExtensionRegistry;
|
|
17
|
+
endpointTools?: EndpointToolRuntime;
|
|
17
18
|
maxRequestsPerTurn?: number;
|
|
18
19
|
maxToolFailuresPerTurn?: number;
|
|
19
20
|
maxTaskDurationMs?: number;
|
|
@@ -66,8 +67,6 @@ export interface AgentContext {
|
|
|
66
67
|
}
|
|
67
68
|
export interface StreamHandle {
|
|
68
69
|
update: (text: string) => void;
|
|
69
|
-
updateProgress?: (text: string, stage: ProgressStage, detail?: string) => void;
|
|
70
|
-
setProgress?: (stage: ProgressStage, detail?: string) => void;
|
|
71
70
|
end: () => Promise<void>;
|
|
72
71
|
abort: () => Promise<void>;
|
|
73
72
|
messageId: () => number | undefined;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export { SessionContextManager, type SessionContext, } from './session-context.js';
|
|
5
5
|
export { SessionLifecycleManager, type SessionLifecycleEvents, type SessionStats, } from './session-lifecycle.js';
|
|
6
|
-
export { SessionStateBag, type SessionStateBagOptions, type
|
|
6
|
+
export { SessionStateBag, type SessionStateBagOptions, type WebchatStreamPublisher, type TaskReviewStreamHint, } from './session-state-bag.js';
|
|
7
7
|
export { SessionConfigService, type SessionConfigServiceOptions, type PatchSessionAgentConfigInput, type PatchSessionAgentConfigResult, } from './session-config-service.js';
|
|
8
8
|
export { SessionHydrator, type SessionHydratorOptions, } from './session-hydrator.js';
|
|
9
9
|
export { SessionInspector, type SessionInspectorOptions, type SessionContextUsage, type SessionAgentConfigView, } from './session-inspector.js';
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
* awkward; the context leaks into the rest of the current async resource by
|
|
15
15
|
* design).
|
|
16
16
|
*/
|
|
17
|
+
import type { TurnOrigin } from '@xopcai/endpoint-tools-protocol';
|
|
17
18
|
import type { InboundMessage } from '../../infra/bus/index.js';
|
|
18
19
|
export interface SessionContext {
|
|
19
20
|
sessionKey: string;
|
|
@@ -21,6 +22,7 @@ export interface SessionContext {
|
|
|
21
22
|
chatId: string;
|
|
22
23
|
senderId: string;
|
|
23
24
|
isGroup: boolean;
|
|
25
|
+
origin: TurnOrigin;
|
|
24
26
|
model?: string;
|
|
25
27
|
metadata?: Record<string, unknown>;
|
|
26
28
|
}
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* `sessionEventUnsubscribers`) are still cleared via `disposeSession`, but they
|
|
17
17
|
* are NOT subject to TTL — sweeping them would race with their owners.
|
|
18
18
|
*/
|
|
19
|
-
export type
|
|
19
|
+
export type WebchatStreamPublisher = (event: {
|
|
20
20
|
type: string;
|
|
21
21
|
[key: string]: unknown;
|
|
22
22
|
}) => void;
|
|
@@ -34,7 +34,7 @@ export interface SessionStateBagOptions {
|
|
|
34
34
|
now?: () => number;
|
|
35
35
|
}
|
|
36
36
|
export declare class SessionStateBag {
|
|
37
|
-
/** Webchat
|
|
37
|
+
/** Webchat run publisher (register/unregister + TTL fallback). */
|
|
38
38
|
private readonly webchatPublishers;
|
|
39
39
|
/** Last assistant plain text (TTL + LRU). */
|
|
40
40
|
private readonly lastAssistantText;
|
|
@@ -51,9 +51,9 @@ export declare class SessionStateBag {
|
|
|
51
51
|
private readonly now;
|
|
52
52
|
private readonly sweepTimer;
|
|
53
53
|
constructor(opts?: SessionStateBagOptions);
|
|
54
|
-
registerWebchatPublisher(sessionKey: string, publisher:
|
|
54
|
+
registerWebchatPublisher(sessionKey: string, publisher: WebchatStreamPublisher): void;
|
|
55
55
|
unregisterWebchatPublisher(sessionKey: string): void;
|
|
56
|
-
getWebchatPublisher(sessionKey: string):
|
|
56
|
+
getWebchatPublisher(sessionKey: string): WebchatStreamPublisher | undefined;
|
|
57
57
|
setLastAssistantText(sessionKey: string, text: string): void;
|
|
58
58
|
getLastAssistantText(sessionKey: string): string | undefined;
|
|
59
59
|
appendEmbeddedStreamText(sessionKey: string, chunk: string): string;
|
|
@@ -7,7 +7,7 @@ const DEFAULT_TTL_MS = 3600 * 1e3;
|
|
|
7
7
|
const DEFAULT_SWEEP_INTERVAL_MS = 600 * 1e3;
|
|
8
8
|
const DEFAULT_MAX_ENTRIES = 5e3;
|
|
9
9
|
var SessionStateBag = class {
|
|
10
|
-
/** Webchat
|
|
10
|
+
/** Webchat run publisher (register/unregister + TTL fallback). */
|
|
11
11
|
webchatPublishers = /* @__PURE__ */ new Map();
|
|
12
12
|
/** Last assistant plain text (TTL + LRU). */
|
|
13
13
|
lastAssistantText = /* @__PURE__ */ new Map();
|
|
@@ -8,8 +8,8 @@ import { basename, dirname, join, normalize, resolve, sep } from "node:path";
|
|
|
8
8
|
import { cpSync, existsSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
9
9
|
import { fileURLToPath } from "node:url";
|
|
10
10
|
import { execFileSync } from "node:child_process";
|
|
11
|
-
import AdmZip from "adm-zip";
|
|
12
11
|
import { fetch } from "undici";
|
|
12
|
+
import AdmZip from "adm-zip";
|
|
13
13
|
//#region src/agent/skills/hub-pull.ts
|
|
14
14
|
/**
|
|
15
15
|
* CLI / hub: install or update skills from git or archive (zip / tar.gz) into ~/.xopc/skills.
|
|
@@ -64,7 +64,7 @@ const STARTER_AGENTS = [
|
|
|
64
64
|
emoji: "✍️"
|
|
65
65
|
}),
|
|
66
66
|
[WORKSPACE_FILES.SOUL]: `# SOUL.md - Writer\n\nYou are Writer, a drafting and editing agent.\n\n## Mission\n\nTurn rough intent into clear, useful writing while preserving the user's goals, facts, and preferred voice.\n\n## Operating Style\n\n- Improve clarity, structure, tone, and usefulness.\n- Keep the user's intent and voice unless they ask for a different style.\n- Prefer specific edits and strong wording over generic advice.\n- Make assumptions and placeholders visible.\n\n## Workflow\n\n1. Identify audience, purpose, channel, tone, length, and constraints.\n2. For long-form or ambiguous work, propose a structure before drafting.\n3. Preserve factual claims unless evidence or the user indicates they should change.\n4. Cut filler, vague claims, duplicated points, and unsupported certainty.\n5. When editing, explain only the changes that matter.\n\n## Safety\n\n- Do not invent sources, quotes, credentials, legal claims, medical claims, or performance metrics.\n- Do not run commands or control browsers.\n- Do not send drafts externally.\n- Save or modify files only when the user asks for file changes.\n\n## Final Response\n\nProvide the draft, rewrite, critique, or edit summary requested. Note unresolved placeholders or facts that need verification.\n`,
|
|
67
|
-
[WORKSPACE_FILES.TOOLS]: `# TOOLS.md - Writer Tool Policy\n\n## Source Material\n\n- Use read_file to inspect local source material before editing or summarizing it.\n- Use web_search and web_fetch for fact checks, citations, current information, and source-backed writing.\n- Prefer primary sources for claims that affect trust, legal, medical, financial, or technical accuracy.\n\n## File Changes\n\n- Use write_file or apply_patch only when the user asks to save, create, or revise a document.\n- Keep document edits scoped to the requested piece of writing.\n- Preserve existing formatting and structure unless the user asks for a rewrite.\n\n## Boundaries\n\n- Do not use exec_command, browser_use, send_message, send_media, automation, or
|
|
67
|
+
[WORKSPACE_FILES.TOOLS]: `# TOOLS.md - Writer Tool Policy\n\n## Source Material\n\n- Use read_file to inspect local source material before editing or summarizing it.\n- Use web_search and web_fetch for fact checks, citations, current information, and source-backed writing.\n- Prefer primary sources for claims that affect trust, legal, medical, financial, or technical accuracy.\n\n## File Changes\n\n- Use write_file or apply_patch only when the user asks to save, create, or revise a document.\n- Keep document edits scoped to the requested piece of writing.\n- Preserve existing formatting and structure unless the user asks for a rewrite.\n\n## Boundaries\n\n- Do not use exec_command, browser_use, send_message, send_media, automation, or external tools.\n- Do not publish, submit, or send writing externally.\n\n## Completion\n\nA writing task is complete when the requested text is delivered and any assumptions, placeholders, or verification gaps are marked.\n`
|
|
68
68
|
}
|
|
69
69
|
},
|
|
70
70
|
{
|
|
@@ -118,7 +118,7 @@ const STARTER_AGENTS = [
|
|
|
118
118
|
emoji: "🎨"
|
|
119
119
|
}),
|
|
120
120
|
[WORKSPACE_FILES.SOUL]: `# SOUL.md - Creative\n\nYou are Creative, a visual direction and ideation agent.\n\n## Mission\n\nExplore strong creative options, shape visual direction, and explain design tradeoffs in a way the user can act on.\n\n## Operating Style\n\n- Start from audience, medium, constraints, brand context, and desired emotional effect.\n- Offer distinct directions when the brief is open.\n- Make feedback actionable: composition, palette, typography, imagery, pacing, and production notes.\n- Respect accessibility, brand constraints, rights, and production limits.\n\n## Workflow\n\n1. Identify the goal, audience, medium, deliverable format, constraints, and taste direction.\n2. If the brief is open, propose a small set of clearly different creative directions.\n3. For each direction, explain why it works and where it may fail.\n4. Use references only when they clarify the target or current visual context.\n5. Generate assets or prompts only when the user asks for visual options, mockups, or production-ready prompts.\n6. Iterate concretely from user feedback.\n\n## Safety\n\n- Do not run commands.\n- Do not send creative work externally.\n- Do not create automations.\n- Avoid implying ownership of third-party styles, marks, or assets without permission.\n\n## Final Response\n\nDeliver the concepts, critique, prompts, or assets requested, with concise rationale and next production steps when useful.\n`,
|
|
121
|
-
[WORKSPACE_FILES.TOOLS]: `# TOOLS.md - Creative Tool Policy\n\n## Visual Work\n\n- Use image_generate when the user wants visual options, mockups, concept art, assets, or prompt-driven image exploration.\n- Use image to inspect user-provided images and give visual critique.\n- Use write_file or apply_patch to save prompts, design specs, campaign copy, or creative briefs when requested.\n\n## Research\n\n- Use web_search and web_fetch for references, style research, current product visuals, venue/product/person imagery, and source-backed visual context.\n- Use browser_use only when interactive inspection is necessary and web_search or web_fetch is insufficient.\n\n## Boundaries\n\n- Do not use exec_command, send_message, send_media, automation, or
|
|
121
|
+
[WORKSPACE_FILES.TOOLS]: `# TOOLS.md - Creative Tool Policy\n\n## Visual Work\n\n- Use image_generate when the user wants visual options, mockups, concept art, assets, or prompt-driven image exploration.\n- Use image to inspect user-provided images and give visual critique.\n- Use write_file or apply_patch to save prompts, design specs, campaign copy, or creative briefs when requested.\n\n## Research\n\n- Use web_search and web_fetch for references, style research, current product visuals, venue/product/person imagery, and source-backed visual context.\n- Use browser_use only when interactive inspection is necessary and web_search or web_fetch is insufficient.\n\n## Boundaries\n\n- Do not use exec_command, send_message, send_media, automation, or external tools.\n- Do not publish, submit, or send creative work externally.\n\n## Completion\n\nA creative task is complete when the user has concrete options, critique, prompts, or assets that match the brief and constraints.\n`
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ReasoningLevel } from '../transcript/thinking-types.js';
|
|
2
|
+
export type AgentStreamEvent = {
|
|
3
|
+
type: string;
|
|
4
|
+
[key: string]: unknown;
|
|
5
|
+
};
|
|
6
|
+
export declare function applyReasoningVisibility(event: AgentStreamEvent, reasoningLevel: ReasoningLevel): AgentStreamEvent | null;
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
//#region src/agent/streaming/reasoning-visibility
|
|
2
|
-
|
|
3
|
-
* @returns `null` to drop the event; unchanged `event` otherwise.
|
|
4
|
-
*/
|
|
5
|
-
function applyReasoningVisibilityToSseEvent(event, reasoningLevel) {
|
|
1
|
+
//#region src/agent/streaming/reasoning-visibility.ts
|
|
2
|
+
function applyReasoningVisibility(event, reasoningLevel) {
|
|
6
3
|
if (reasoningLevel !== "off") return event;
|
|
7
4
|
if (event.type === "thinking") return null;
|
|
8
5
|
if (event.type === "message_update" && event.assistantMessageEvent?.type === "thinking_delta") return null;
|
|
@@ -10,4 +7,4 @@ function applyReasoningVisibilityToSseEvent(event, reasoningLevel) {
|
|
|
10
7
|
return event;
|
|
11
8
|
}
|
|
12
9
|
//#endregion
|
|
13
|
-
export {
|
|
10
|
+
export { applyReasoningVisibility };
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { EXTERNAL_TOOL_NAMES } from "../external-tools/gateway-tools.js";
|
|
2
|
+
import "../external-tools/index.js";
|
|
1
3
|
import { createDelegateChildHandle } from "../child-agent-factory.js";
|
|
2
4
|
import { Type } from "@sinclair/typebox";
|
|
3
5
|
//#region src/agent/tools/delegate-tool.ts
|
|
@@ -29,7 +31,9 @@ const DELEGATE_BLOCKED_TOOLS = new Set([
|
|
|
29
31
|
"skill_manage",
|
|
30
32
|
"skills_marketplace_search",
|
|
31
33
|
"skill_install",
|
|
32
|
-
|
|
34
|
+
EXTERNAL_TOOL_NAMES.search,
|
|
35
|
+
EXTERNAL_TOOL_NAMES.describe,
|
|
36
|
+
EXTERNAL_TOOL_NAMES.execute,
|
|
33
37
|
"managed_job"
|
|
34
38
|
]);
|
|
35
39
|
const DelegateTaskSchema = Type.Object({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
-
import { ToolConcurrencyController, resolveToolLockMode } from "./concurrency.js";
|
|
4
3
|
import { TimeoutError, executeWithTimeout } from "../lifecycle/timeout-wrapper.js";
|
|
5
4
|
import { withRetry } from "../../infra/retry.js";
|
|
5
|
+
import { ToolConcurrencyController, resolveToolLockMode } from "./concurrency.js";
|
|
6
6
|
//#region src/agent/tools/executor.ts
|
|
7
7
|
init_logger();
|
|
8
8
|
const log = createLogger("ToolExecutor");
|
|
@@ -9,6 +9,9 @@
|
|
|
9
9
|
import type { AgentTool } from '@earendil-works/pi-agent-core';
|
|
10
10
|
import type { Model, Api } from '@earendil-works/pi-ai';
|
|
11
11
|
import type { Config } from '../../config/schema.js';
|
|
12
|
+
import type { EndpointToolRuntime } from '../../endpoint-tools/index.js';
|
|
13
|
+
import type { TurnOrigin } from '@xopcai/endpoint-tools-protocol';
|
|
14
|
+
import type { ExtensionRegistry } from '../../extensions/types/index.js';
|
|
12
15
|
import type { MessageBus } from '../../infra/bus/index.js';
|
|
13
16
|
import { type SkillInstallToolOptions, type SkillInstallToolResult, type MarketplaceSkillInstallToolOptions, type MarketplaceSkillInstallToolResult } from './index.js';
|
|
14
17
|
import type { MemoryManager } from '../memory/manager.js';
|
|
@@ -25,12 +28,14 @@ import { type ToolExecutorConfig } from './executor.js';
|
|
|
25
28
|
import type { CodeIntelligenceRuntimeLike } from '../code-intelligence/index.js';
|
|
26
29
|
export interface ToolFactoryDeps {
|
|
27
30
|
workspace: string;
|
|
28
|
-
extensionRegistry?:
|
|
31
|
+
extensionRegistry?: ExtensionRegistry;
|
|
29
32
|
getCurrentContext: () => {
|
|
30
33
|
channel: string;
|
|
31
34
|
chatId: string;
|
|
32
35
|
sessionKey: string;
|
|
36
|
+
origin: TurnOrigin;
|
|
33
37
|
} | null;
|
|
38
|
+
endpointTools?: EndpointToolRuntime;
|
|
34
39
|
hookRunner?: import('../../extensions/index.js').ExtensionHookRunner;
|
|
35
40
|
bus: MessageBus;
|
|
36
41
|
toolExecutorConfig?: Partial<ToolExecutorConfig>;
|