@xopcai/xopc 0.0.350 → 0.0.352
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 +2 -2
- package/README.zh-CN.md +2 -2
- package/dist/browser-ext/dist/sidepanel.js +1 -1
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/feishu/src/adapters/cli-login.js +3 -3
- package/dist/extensions/feishu/src/outbound/media-load.js +1 -1
- package/dist/extensions/telegram/src/inbound-processor.js +2 -2
- package/dist/extensions/telegram/src/outbound-sender.js +1 -1
- package/dist/extensions/telegram/src/plugin.js +2 -2
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/extensions/weixin/src/api/api.js +2 -2
- package/dist/extensions/weixin/src/auth/accounts.js +12 -12
- package/dist/extensions/weixin/src/messaging/debug-mode.js +5 -5
- package/dist/extensions/weixin/src/messaging/inbound.js +11 -11
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-GAs9LrbD.js → agent-avatar-dicebear-ChlaFmiD.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-defaults-settings-panel-q6mFje6y.js → agent-defaults-settings-panel-CgNagNMG.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-plugin-dialog-vR-3YU8w.js → agent-plugin-dialog-CDhtsMpV.js} +1 -1
- package/dist/gateway/static/root/assets/{agents-DZXa_QVc.js → agents-BLP0zRru.js} +3 -3
- package/dist/gateway/static/root/assets/{agents-admin-api-yUALtmym.js → agents-admin-api-C_3ucZGI.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-5GU28Q-V.js → app-management-settings-panel-DqC-oj5_.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-uxEo59iJ.js → appearance-settings-Cfhepf6U.js} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-06LrJSYf.js → apps-page-C6n5r8AP.js} +1 -1
- package/dist/gateway/static/root/assets/{archive-plugin-B4z8_4sq.js → archive-plugin-D4EiLLyl.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-Cap0FMSp.js → automations-page-CMxBpT5v.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-workspace-DEsdkcup.js → automations-workspace-DJ_-_kGh.js} +1 -1
- package/dist/gateway/static/root/assets/{binary-plugins-PKMXJixJ.js → binary-plugins-DQc_BlYP.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-Dv83e7vb.js → block-editor-C3S6gqnS.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automation-inputs-B0TlAcoB.js → browser-automation-inputs-D2SwaQ2F.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automations-page-C1mBYS2x.js → browser-automations-page-CGG1740U.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-settings-page-Co2D8mug.js → browser-settings-page-COTo7btH.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-e-fO70DK.js → capabilities-D4qdO980.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-page-nIIqZJuL.js → capabilities-page-BsC346Ym.js} +2 -2
- package/dist/gateway/static/root/assets/{capabilities-settings-panel-BrXWQIs7.js → capabilities-settings-panel-CRL4gfk5.js} +1 -1
- package/dist/gateway/static/root/assets/{capability-header-actions-C6d_GsqD.js → capability-header-actions-B_60-buR.js} +1 -1
- package/dist/gateway/static/root/assets/{channels-EUbBfvHY.js → channels-DNxr72oD.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-terminal-dock-CZTrJ5Do.js → chat-terminal-dock-DfTUgrey.js} +1 -1
- package/dist/gateway/static/root/assets/{computer-settings-page-CWBZwtYT.js → computer-settings-page-Bk84TKyF.js} +1 -1
- package/dist/gateway/static/root/assets/{connector-service-page-B5pF87fY.js → connector-service-page-B2pC--2X.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-page-9ztbuGCI.js → connectors-page-Bu15_14O.js} +1 -1
- package/dist/gateway/static/root/assets/{date-picker-xb5w8iAa.js → date-picker-CCN30yiy.js} +1 -1
- package/dist/gateway/static/root/assets/{dependency-picker-D7B6s4d4.js → dependency-picker-CV2ybJJd.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-Bt5JatKm.js → desktop-pet-DipFHe4X.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-BdgUJk-e.js → desktop-pet-settings-Dg3RM_vY.js} +1 -1
- package/dist/gateway/static/root/assets/{device-pairing-wizard-DQ7LNTKz.js → device-pairing-wizard-DUy1HymM.js} +1 -1
- package/dist/gateway/static/root/assets/{directory-picker-path-field-_PcWmfRH.js → directory-picker-path-field-BTuFpGIK.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-BhXwxHMP.js → extension-debug-page-xM8vfbRZ.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-CIXPBzGU.js → extension-page-Cl8zlion.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-DE4UUMD-.js → extension-settings-page-DODk0nOi.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-swr-CmjHbMj7.js → gateway-config-swr-DZWFlfJr.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-realtime-DzyR6LYb.js → gateway-realtime-HO9tL9xo.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-B01fiKrV.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-settings-CI2oGZEg.js → gateway-settings-BL3C7Q9w.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-startup-retry-CbOUnKv5.js → gateway-startup-retry-Cg1nbxJR.js} +1 -1
- package/dist/gateway/static/root/assets/{home-page-DfJvuWC-.js → home-page-CjJVq_Ff.js} +1 -1
- package/dist/gateway/static/root/assets/{image-generation-api-BmLpVntI.js → image-generation-api-DSnPfr_U.js} +1 -1
- package/dist/gateway/static/root/assets/{imports-page-DRG-aahH.js → imports-page-By9oc8sD.js} +1 -1
- package/dist/gateway/static/root/assets/index-B-w6Rk9Z.css +1 -0
- package/dist/gateway/static/root/assets/{index-Z6i4GDcT.js → index-S4z-eKe-.js} +9 -9
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-CSwc_Olv.js → keyboard-shortcuts-settings-ixQ8_6ad.js} +1 -1
- package/dist/gateway/static/root/assets/{local-app-workbench-page-DsSCCThS.js → local-app-workbench-page-Bnz5YOks.js} +1 -1
- package/dist/gateway/static/root/assets/{local-apps-page-C4psaPz5.js → local-apps-page-BV3NFUJQ.js} +1 -1
- package/dist/gateway/static/root/assets/local-session-drafts-CuyTzbfW.js +1 -0
- package/dist/gateway/static/root/assets/{locale-store-WMaCMm3_.js → locale-store-qcYD05PF.js} +1 -1
- package/dist/gateway/static/root/assets/{logs-page-kx7ama7K.js → logs-page-DVqwybaT.js} +1 -1
- package/dist/gateway/static/root/assets/{management-settings-BqcrFVsF.js → management-settings-CUoDWFg7.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-view-Oe4rXk1N.js → markdown-view-BhFHoVtG.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-BCMV9heb.js → media-plugins-cpalRgVI.js} +1 -1
- package/dist/gateway/static/root/assets/messages-vL3EpIrL.js +3 -0
- package/dist/gateway/static/root/assets/{note-detail-panel-Bvjc5JNM.js → note-detail-panel-CxbZWvj1.js} +3 -3
- package/dist/gateway/static/root/assets/{notes-page-Dak5PuTq.js → notes-page-DkEOEza6.js} +1 -1
- package/dist/gateway/static/root/assets/{page-context-capture-button-BYQnvTni.js → page-context-capture-button-CjCYNkVb.js} +1 -1
- package/dist/gateway/static/root/assets/{page-tabs--d3GEnvY.js → page-tabs-Dnzie6QW.js} +1 -1
- package/dist/gateway/static/root/assets/{preview-open-alternatives-ByuWaDEv.js → preview-open-alternatives-D1H4_Nfl.js} +1 -1
- package/dist/gateway/static/root/assets/{product-open-page-CMvjGjTz.js → product-open-page-BJwEshPw.js} +1 -1
- package/dist/gateway/static/root/assets/{project-detail-page-m8ybJpJ_.js → project-detail-page-BWC89e7l.js} +1 -1
- package/dist/gateway/static/root/assets/{projects-page-i00ns68r.js → projects-page-BYmHC91B.js} +1 -1
- package/dist/gateway/static/root/assets/{registry-api-DEePN1Rc.js → registry-api-C0j3sKT4.js} +1 -1
- package/dist/gateway/static/root/assets/{remote-access-hub-CY4kQa1Z.js → remote-access-hub-DuVzpZ9R.js} +1 -1
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-D-gA6BW9.js → runtime-tools-settings-panel-SbIgL9Ya.js} +1 -1
- package/dist/gateway/static/root/assets/{scenes-page--sExi9Fz.js → scenes-page-BBl_4U1U.js} +1 -1
- package/dist/gateway/static/root/assets/{schema-form-B8Zns_Se.js → schema-form-Rj-wi9sm.js} +1 -1
- package/dist/gateway/static/root/assets/{session-api-Bv-hCMKS.js → session-api-iR1SFNHe.js} +1 -1
- package/dist/gateway/static/root/assets/{session-manager-BcDptzCN.js → session-manager-3YOU74jt.js} +5 -5
- package/dist/gateway/static/root/assets/{sessions-page-BzW33zp4.js → sessions-page-BnipzwJ6.js} +1 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-C7oNKVxC.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-Lpep8yx-.js → settings-form-section-6gOr-ype.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-Cl_KOVsG.js → settings-page-D1tVcmlR.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-status-panel-mWQaql5h.js → setup-status-panel-CR0VBBw3.js} +1 -1
- package/dist/gateway/static/root/assets/{share-preview-page-ZZ6qg3xL.js → share-preview-page-CK0Bg_-o.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-settings-DhQRwYYL.js → shares-settings-B3Ghvh3c.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-api-DC3EXeUS.js → skill-api-CoIsCPbI.js} +1 -1
- package/dist/gateway/static/root/assets/skill-reload-api-DMIwfISw.js +1 -0
- package/dist/gateway/static/root/assets/{skills-page-ThkBmKew.js → skills-page-CDkm7yig.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-C93mkvML.js → system-settings-panel-Cfv-jDmY.js} +1 -1
- package/dist/gateway/static/root/assets/{task-detail-page-DWqYIP_j.js → task-detail-page-eYs6qgcW.js} +1 -1
- package/dist/gateway/static/root/assets/{tunnel-api-DI4NcRc8.js → tunnel-api-CpOQaCFN.js} +1 -1
- package/dist/gateway/static/root/assets/{usage-page-C--1ibDb.js → usage-page-Cye-2eKA.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-83u3Kf_7.js → use-autosave-o6YLrkpO.js} +1 -1
- package/dist/gateway/static/root/assets/{user-model-page-DasK0_MY.js → user-model-page-Bg-jeU7W.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-api-key-field-D4SxKV47.js → voice-api-key-field-FMNwQIho.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-DbjjZkIg.js → voice-config-api-CylVelIb.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-RSWjSoEp.js → work-discovery-overlay-9bULjfGk.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-BINT9Shl.js → workflow-run-setup-panel-VYQHBiz3.js} +1 -1
- package/dist/gateway/static/root/assets/{workflows-page-Bj3K-lxR.js → workflows-page-KnoMMEDN.js} +1 -1
- package/dist/gateway/static/root/index.html +15 -15
- package/dist/package.js +1 -1
- package/dist/packages/gateway-contract/src/session-input-command.js +2 -1
- package/dist/src/agent/agent-manager.js +31 -22
- package/dist/src/agent/agent-scope.js +2 -2
- package/dist/src/agent/background-review/prompts.js +1 -1
- package/dist/src/agent/background-review/run-background-review.js +4 -4
- package/dist/src/agent/bootstrap/filter-bootstrap-files.js +1 -1
- package/dist/src/agent/coding/repository-instructions.js +1 -1
- package/dist/src/agent/context/coordinator.js +2 -2
- package/dist/src/agent/context/execution-context.js +4 -4
- package/dist/src/agent/context/execution-scope.js +2 -2
- package/dist/src/agent/context/project-context.js +3 -3
- package/dist/src/agent/data-acquisition/service.js +1 -1
- package/dist/src/agent/embedded/index.js +2 -2
- package/dist/src/agent/embedded/model-runtime.js +1 -1
- package/dist/src/agent/embedded/run-for-session.js +4 -4
- package/dist/src/agent/embedded/run-turn.js +4 -4
- package/dist/src/agent/embedded/session-tool-result-guard.js +3 -3
- package/dist/src/agent/embedded/tool-result-truncation.js +1 -1
- package/dist/src/agent/external-tools/cliProvider.js +3 -3
- package/dist/src/agent/external-tools/composio-provider.js +3 -3
- package/dist/src/agent/external-tools/endpoint-provider.js +2 -2
- package/dist/src/agent/external-tools/gateway-tools.js +1 -1
- package/dist/src/agent/external-tools/mcp-provider.js +3 -3
- package/dist/src/agent/image/generation/openai-images-provider.js +1 -1
- package/dist/src/agent/image/generation/providers/dashscope.js +1 -1
- package/dist/src/agent/image/generation/providers/fal.js +1 -1
- package/dist/src/agent/image/generation/providers/google.js +1 -1
- package/dist/src/agent/image/generation/runtime.js +1 -1
- package/dist/src/agent/image/index.js +1 -1
- package/dist/src/agent/image/load-image-media.js +1 -1
- package/dist/src/agent/image/tool-model-config.js +2 -2
- package/dist/src/agent/inbound/attachment-pipeline.js +1 -1
- package/dist/src/agent/inbound/inbound-loop.js +2 -2
- package/dist/src/agent/index.js +1 -1
- package/dist/src/agent/mcp/bundle-mcp-config.js +1 -1
- package/dist/src/agent/mcp/bundle-mcp-gateway.js +1 -1
- package/dist/src/agent/mcp/bundle-mcp-runtime.js +2 -2
- package/dist/src/agent/mcp/index.js +2 -2
- 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/mcp/oauth/mcp-oauth-manager.js +1 -1
- package/dist/src/agent/mcp/plugin-http-fetch.js +1 -1
- package/dist/src/agent/memory/context-recovery.js +1 -1
- package/dist/src/agent/memory/index.js +1 -1
- package/dist/src/agent/messaging/outbound-coordinator.js +1 -1
- package/dist/src/agent/orchestration/agent-orchestrator.js +1 -1
- package/dist/src/agent/prompt/service-prompt-builder.js +2 -2
- package/dist/src/agent/sandbox/exec-policy.js +1 -1
- package/dist/src/agent/service/direct-turn-helpers.js +4 -4
- package/dist/src/agent/service/process-direct-one-shot.js +1 -1
- package/dist/src/agent/service/process-direct-streaming.js +5 -5
- package/dist/src/agent/service/webchat-tts.js +2 -2
- package/dist/src/agent/service.js +21 -21
- package/dist/src/agent/session/session-inspector.js +1 -1
- package/dist/src/agent/source-context/index.js +2 -2
- package/dist/src/agent/starter-agents.d.ts +3 -0
- package/dist/src/agent/starter-agents.js +57 -2
- package/dist/src/agent/tasks/task-judge-service.js +4 -4
- package/dist/src/agent/tools/create-share-tool.js +3 -3
- package/dist/src/agent/tools/dataBatch.js +1 -1
- package/dist/src/agent/tools/delegate-tool.js +3 -3
- package/dist/src/agent/tools/delegation-parent-policy.js +1 -1
- package/dist/src/agent/tools/executor.js +1 -1
- package/dist/src/agent/tools/factory.d.ts +3 -1
- package/dist/src/agent/tools/factory.js +22 -19
- package/dist/src/agent/tools/fetch-text.js +1 -1
- package/dist/src/agent/tools/image-generate-tool.js +3 -3
- package/dist/src/agent/tools/index.js +6 -6
- package/dist/src/agent/tools/list-dir.js +1 -1
- package/dist/src/agent/tools/publish-artifacts.js +2 -2
- package/dist/src/agent/tools/read.js +2 -2
- package/dist/src/agent/tools/review-workspace.js +1 -1
- package/dist/src/agent/tools/send-media.js +2 -2
- package/dist/src/agent/tools/skills-tools.js +1 -1
- package/dist/src/agent/tools/tts-tool.js +1 -1
- package/dist/src/agent/tools/user-context-tool.js +1 -1
- package/dist/src/agent/tools/write.js +2 -2
- package/dist/src/agent/tools/xopc-use-tool.js +5 -5
- package/dist/src/agent/workflow/subagent-runner.js +1 -1
- package/dist/src/agent/workflow/workflow-child-tools.js +2 -1
- package/dist/src/agent-catalog/capabilities.js +2 -2
- package/dist/src/agent-config/resolver.js +2 -0
- package/dist/src/agent-config/schema.d.ts +2 -0
- package/dist/src/agent-config/schema.js +2 -0
- package/dist/src/ai-assist/text-assist.js +1 -1
- package/dist/src/auth/credentials.js +1 -1
- package/dist/src/auth/oauth-provider-lock.js +1 -1
- package/dist/src/auth/sync-provider-auth.js +1 -1
- package/dist/src/automations/capabilities/drafts.js +1 -1
- package/dist/src/automations/domain/index.js +2 -2
- package/dist/src/automations/events/event-repository.js +2 -1
- package/dist/src/automations/index.js +4 -4
- package/dist/src/automations/service/automation-service.js +2 -2
- package/dist/src/backup/archive.js +1 -1
- package/dist/src/bootstrap/application-state.js +1 -1
- package/dist/src/browser/native-messaging-host.js +1 -1
- package/dist/src/capabilities/runtime/dispatcher.js +1 -1
- package/dist/src/capabilities/runtime/product.js +1 -1
- package/dist/src/channels/attachments/voice-stt-webchat.js +2 -2
- package/dist/src/channels/index.js +2 -2
- package/dist/src/channels/outbound-sender.js +1 -1
- package/dist/src/channels/pairing/allow-from-file.js +9 -9
- package/dist/src/channels/pairing/pairing-store.js +6 -6
- package/dist/src/chat-commands/agent-edit.js +1 -1
- package/dist/src/chat-commands/builtins/config.js +4 -4
- package/dist/src/chat-commands/builtins/review.js +1 -1
- package/dist/src/chat-commands/builtins/session.js +1 -1
- package/dist/src/chat-commands/builtins/thinking.js +1 -1
- package/dist/src/chat-commands/builtins/tts.js +1 -1
- package/dist/src/chat-commands/builtins/understanding.js +1 -1
- package/dist/src/chat-commands/builtins/workflow.js +2 -2
- package/dist/src/chat-commands/context.js +3 -3
- package/dist/src/chat-commands/index.js +3 -3
- package/dist/src/cli/commands/agent.js +7 -7
- package/dist/src/cli/commands/agents.js +1 -1
- package/dist/src/cli/commands/config.js +1 -1
- package/dist/src/cli/commands/connectors.js +1 -1
- package/dist/src/cli/commands/doctor/checks/channel-plugins.js +1 -1
- package/dist/src/cli/commands/doctor/checks/gateway-health.js +1 -1
- package/dist/src/cli/commands/doctor/checks/provider-auth.js +2 -2
- package/dist/src/cli/commands/doctor/checks/tool-runtimes.js +1 -1
- package/dist/src/cli/commands/extension-agent-plugin.js +2 -2
- package/dist/src/cli/commands/extension-dev.js +1 -1
- package/dist/src/cli/commands/extension-marketplace.js +2 -2
- package/dist/src/cli/commands/extension.js +4 -4
- package/dist/src/cli/commands/gateway/shared.js +1 -1
- package/dist/src/cli/commands/gateway/token.js +1 -1
- package/dist/src/cli/commands/image.js +1 -1
- package/dist/src/cli/commands/init.js +1 -1
- package/dist/src/cli/commands/models.js +1 -1
- package/dist/src/cli/commands/onboard/channels/registry.js +1 -1
- package/dist/src/cli/commands/onboard/model.js +2 -2
- package/dist/src/cli/commands/onboard.js +1 -1
- package/dist/src/cli/commands/project.js +2 -2
- package/dist/src/cli/commands/runtime.js +1 -1
- package/dist/src/cli/commands/skills.js +2 -2
- package/dist/src/cli/commands/tunnel.js +4 -4
- package/dist/src/cli/extension-cli-register.js +5 -5
- package/dist/src/cli/utils/gateway-client.js +1 -1
- package/dist/src/cli/utils/init-workspace-core.js +2 -2
- package/dist/src/cli/utils/session.js +1 -1
- package/dist/src/computer/runtime.js +2 -2
- package/dist/src/config/index.js +7 -7
- package/dist/src/config/loader.js +3 -3
- package/dist/src/config/models-json.js +1 -1
- package/dist/src/config/schema.js +1 -1
- package/dist/src/connectors/cli/authorization.js +1 -1
- package/dist/src/connectors/cli/runtime.js +1 -1
- package/dist/src/connectors/composio-sessions.js +1 -1
- package/dist/src/connectors/composio.js +1 -1
- package/dist/src/connectors/connected-source-understanding.js +3 -3
- package/dist/src/connectors/connection-recovery-service.js +10 -5
- package/dist/src/connectors/health.js +1 -1
- package/dist/src/connectors/plugin-mcp-recovery.js +1 -1
- package/dist/src/discussions/live-worker.js +1 -1
- package/dist/src/discussions/recording.js +1 -1
- package/dist/src/discussions/sealer.js +1 -1
- package/dist/src/extensions/activation-context.js +3 -3
- package/dist/src/extensions/agent-plugins/validation.js +1 -1
- package/dist/src/extensions/api.js +4 -4
- package/dist/src/extensions/bundled-extension-activation.js +1 -1
- package/dist/src/extensions/index.js +3 -3
- package/dist/src/extensions/install.js +1 -1
- package/dist/src/extensions/loader.js +2 -2
- package/dist/src/extensions/sdk/index.js +1 -1
- package/dist/src/extensions/sdk/media.js +1 -1
- package/dist/src/extensions/update.js +1 -1
- package/dist/src/gateway/agents-admin.d.ts +1 -0
- package/dist/src/gateway/agents-admin.js +3 -2
- package/dist/src/gateway/device-routes.js +2 -2
- package/dist/src/gateway/file-path-classifier.js +2 -2
- package/dist/src/gateway/global-defaults-admin.js +1 -1
- package/dist/src/gateway/hono/app.js +3 -3
- package/dist/src/gateway/hono/lib/config-payload.js +4 -4
- package/dist/src/gateway/hono/routes/agents.js +9 -2
- package/dist/src/gateway/hono/routes/auth-registry-extensions.js +1 -1
- package/dist/src/gateway/hono/routes/browser.js +1 -1
- package/dist/src/gateway/hono/routes/commands-skills.js +4 -4
- package/dist/src/gateway/hono/routes/config-patch/gateway.js +1 -1
- package/dist/src/gateway/hono/routes/config-patch/misc.js +2 -2
- package/dist/src/gateway/hono/routes/device-push.js +1 -1
- package/dist/src/gateway/hono/routes/home.js +1 -1
- package/dist/src/gateway/hono/routes/mcp.js +2 -2
- package/dist/src/gateway/hono/routes/media.js +1 -1
- package/dist/src/gateway/hono/routes/models.js +5 -5
- package/dist/src/gateway/hono/routes/notes.js +3 -3
- package/dist/src/gateway/hono/routes/projects.js +4 -4
- package/dist/src/gateway/hono/routes/session-command-handler.js +1 -1
- package/dist/src/gateway/hono/routes/session-input-handler.js +3 -3
- package/dist/src/gateway/hono/routes/sessions.js +1 -1
- package/dist/src/gateway/hono/routes/shares.js +3 -3
- package/dist/src/gateway/hono/routes/site-shares.js +1 -1
- package/dist/src/gateway/hono/routes/tasks.js +2 -2
- package/dist/src/gateway/hono/routes/user-model-refresh.js +1 -1
- package/dist/src/gateway/hono/routes/user-model.js +5 -5
- package/dist/src/gateway/hono/routes/voice.js +6 -6
- package/dist/src/gateway/hono/routes/workflows.js +2 -2
- package/dist/src/gateway/host.d.ts +0 -2
- package/dist/src/gateway/host.js +2 -5
- package/dist/src/gateway/image-generation-setup.js +3 -3
- package/dist/src/gateway/index.js +1 -1
- package/dist/src/gateway/lock.js +11 -11
- package/dist/src/gateway/media-access.js +1 -1
- package/dist/src/gateway/mobile-privacy.js +2 -2
- package/dist/src/gateway/ports.js +6 -6
- package/dist/src/gateway/run-loop.js +1 -1
- package/dist/src/gateway/scenes/mailContext.js +1 -1
- package/dist/src/gateway/scenes/slackThreadSource.js +1 -1
- package/dist/src/gateway/server.js +1 -1
- package/dist/src/gateway/service/config-coordinator.js +3 -3
- package/dist/src/gateway/service/run-gateway-agent.js +3 -3
- package/dist/src/gateway/service/sessions-api.js +1 -1
- package/dist/src/gateway/service.js +37 -37
- package/dist/src/gateway/session-context-summary.js +2 -2
- package/dist/src/gateway/workspace-editor-path.js +2 -2
- package/dist/src/gateway/xopc-cloud-capability-setup.js +1 -1
- package/dist/src/home-intelligence/generator.js +1 -1
- package/dist/src/infra/gateway-processes.js +2 -2
- package/dist/src/infra/path-env.js +3 -3
- package/dist/src/infra/update-global.js +10 -10
- package/dist/src/local-apps/service.js +2 -2
- package/dist/src/mcp/gateway-http-client.js +1 -1
- package/dist/src/media-understanding/openai-compatible-audio.js +1 -1
- package/dist/src/notes/agent-context.js +4 -4
- package/dist/src/notes/index.js +1 -1
- package/dist/src/notes/service.js +1 -1
- package/dist/src/notes/store.js +1 -1
- package/dist/src/notifications/device-store.d.ts +0 -1
- package/dist/src/notifications/device-store.js +2 -7
- package/dist/src/notifications/service.d.ts +0 -1
- package/dist/src/notifications/service.js +13 -82
- package/dist/src/providers/auth-runtime/resolve-auth.js +1 -1
- package/dist/src/providers/index.js +2 -2
- package/dist/src/providers/model-catalog-persistence.js +1 -1
- package/dist/src/providers/model-reference-auditor.js +1 -1
- package/dist/src/providers/register-runtime-providers.js +1 -1
- package/dist/src/remote-access/exposure-manager.js +1 -1
- package/dist/src/scenes/taskFollowUp/agentExecutor.js +4 -4
- package/dist/src/scenes/taskFollowUp/resources.js +1 -1
- package/dist/src/scenes/taskFollowUp/service.js +4 -4
- package/dist/src/session/execution-detail.js +16 -0
- package/dist/src/session/index.js +2 -2
- package/dist/src/session/session-title.js +1 -1
- package/dist/src/session/store.js +4 -4
- package/dist/src/session/thinking-resolve.js +1 -1
- package/dist/src/share/share-store.js +1 -1
- package/dist/src/share/share-thumbnail.js +1 -1
- package/dist/src/share/share-zip.js +1 -1
- package/dist/src/share/site-proxy.js +1 -1
- package/dist/src/share/site-share-store.js +1 -1
- package/dist/src/storage/sqlite/connection.js +9 -9
- package/dist/src/storage/sqlite/notes-repository.js +19 -4
- package/dist/src/tasks/capabilities/read.js +2 -2
- package/dist/src/tasks/capabilities/write.js +1 -1
- package/dist/src/tasks/execution-context.js +1 -1
- package/dist/src/tasks/home-query-service.js +3 -3
- package/dist/src/tasks/index.js +4 -4
- package/dist/src/tasks/task-application-service.js +2 -2
- package/dist/src/tasks/task-collaboration-delivery.js +1 -1
- package/dist/src/tasks/task-context-assembler.js +1 -1
- package/dist/src/tasks/task-handoff-service.js +1 -1
- package/dist/src/tasks/task-main-update-decision-service.js +1 -1
- package/dist/src/tui/backends/embedded-backend.js +12 -12
- package/dist/src/tui/backends/gateway-realtime-backend.js +1 -1
- package/dist/src/tui/extension-host/load-extensions.js +1 -1
- package/dist/src/tui/tui-command-formatters.js +1 -1
- package/dist/src/tui/tui-commands.js +6 -6
- package/dist/src/tui/tui-picker-overlay.js +1 -1
- package/dist/src/tui/tui-skills-autocomplete.js +1 -1
- package/dist/src/tui/tui-startup-resources.js +4 -4
- package/dist/src/tui/tui.js +7 -7
- package/dist/src/tunnel/frpc-binary.js +1 -1
- package/dist/src/tunnel/gateway-lifecycle.js +1 -1
- package/dist/src/voice/audio/normalize.js +34 -1
- package/dist/src/voice/realtime/memory-context.js +3 -3
- package/dist/src/voice/realtime/persona-context.js +1 -1
- package/dist/src/voice/realtime/runtime.js +4 -4
- package/dist/src/voice/stt/index.js +2 -2
- package/dist/src/voice/stt/preflight.js +1 -1
- package/dist/src/voice/stt/providers/alibaba-transcription.js +1 -1
- package/dist/src/voice/stt/providers/xopc-cloud-transcription.js +1 -1
- package/dist/src/voice/stt/transcribe-core.js +1 -1
- package/dist/src/voice/tts/index.js +3 -3
- package/dist/src/voice/tts/merge-config.js +1 -1
- package/dist/src/voice/tts/payload.js +1 -1
- package/dist/src/voice/tts/providers/xopc-cloud-speech.js +1 -1
- package/dist/src/voice/tts/speak-core.js +1 -1
- package/dist/src/work-discovery/incremental-repository.js +1 -1
- package/dist/src/work-discovery/index.js +1 -1
- package/dist/src/work-discovery/service.js +5 -5
- package/dist/src/workflows/engine/workflow-engine.js +1 -1
- package/dist/src/workflows/service/workflow-run-service.js +8 -8
- package/dist/src/workflows/service/workflow-session-bridge.js +1 -1
- package/package.json +10 -11
- package/dist/gateway/static/root/assets/gateway-realtime-store-KyhksZSM.js +0 -1
- package/dist/gateway/static/root/assets/index-CPi50n0l.css +0 -1
- package/dist/gateway/static/root/assets/local-session-drafts-CxXjQ5Du.js +0 -1
- package/dist/gateway/static/root/assets/messages-sXePe3LQ.js +0 -3
- package/dist/gateway/static/root/assets/settings-advanced-gate-CVnn1f7J.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-C-Dn5hSx.js +0 -1
|
@@ -6,14 +6,14 @@ import { TaskRepository, init_task_repository } from "../tasks/task-repository.j
|
|
|
6
6
|
import { getSessionMetadata } from "../storage/sqlite/session-read-repository.js";
|
|
7
7
|
import { getCurrentTranscriptId, init_session_repository } from "../storage/sqlite/session-repository.js";
|
|
8
8
|
import { getSessionConfig, init_config_repository } from "../storage/sqlite/config-repository.js";
|
|
9
|
-
import { TaskConversationRepository } from "../tasks/task-conversation-repository.js";
|
|
10
9
|
import { getExecutionEnvironmentForSession } from "../execution-environments/subject.js";
|
|
11
10
|
import { effectiveWorkspacePathForSession } from "../session/session-workspace.js";
|
|
12
11
|
import { ProjectStore } from "../projects/project-store.js";
|
|
13
12
|
import { runExec } from "../infra/exec.js";
|
|
14
13
|
import { TaskCollaborationRepository } from "../tasks/task-collaboration-repository.js";
|
|
15
|
-
import {
|
|
14
|
+
import { TaskConversationRepository } from "../tasks/task-conversation-repository.js";
|
|
16
15
|
import { isSessionSourceBinding } from "../agent/source-context/types.js";
|
|
16
|
+
import { TaskOriginRepository } from "../tasks/task-origin-repository.js";
|
|
17
17
|
import { realpath, stat } from "node:fs/promises";
|
|
18
18
|
//#region src/gateway/session-context-summary.ts
|
|
19
19
|
init_config_repository();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import path, { relative, resolve } from "node:path";
|
|
2
|
-
import
|
|
2
|
+
import fsSync from "node:fs";
|
|
3
3
|
//#region src/gateway/workspace-editor-path.ts
|
|
4
4
|
/** Resolve a workspace-relative POSIX path safely (no `..`, stays under root). */
|
|
5
5
|
function resolveWorkspaceSafePath(workspaceRoot, rel) {
|
|
@@ -20,7 +20,7 @@ function isPathUnderWorkspace(workspaceRoot, absPath) {
|
|
|
20
20
|
function normalizeComparablePath(input) {
|
|
21
21
|
let resolved = resolve(input);
|
|
22
22
|
try {
|
|
23
|
-
resolved =
|
|
23
|
+
resolved = fsSync.realpathSync.native(resolved);
|
|
24
24
|
} catch {}
|
|
25
25
|
return process.platform === "win32" ? resolved.toLowerCase() : resolved;
|
|
26
26
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AgentCatalogRepository, init_repository } from "../agent-catalog/repository.js";
|
|
2
|
+
import { AgentCatalogService } from "../agent-catalog/service.js";
|
|
2
3
|
import { getModelCatalogStore, init_model_catalog_store } from "../providers/model-catalog-store.js";
|
|
3
4
|
import { compareCatalogModels } from "../providers/model-catalog-ranking.js";
|
|
4
|
-
import { AgentCatalogService } from "../agent-catalog/service.js";
|
|
5
5
|
import { prepareUpdateGlobalDefaults } from "./global-defaults-admin.js";
|
|
6
6
|
//#region src/gateway/xopc-cloud-capability-setup.ts
|
|
7
7
|
init_repository();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { init_agent_scope, resolveDefaultAgentId } from "../agent/agent-scope.js";
|
|
2
|
+
import { extractAssistantText, getAssistantMessageErrorReason } from "../providers/model-response.js";
|
|
2
3
|
import { init_providers, resolveModel } from "../providers/index.js";
|
|
3
4
|
import { completeWithResolvedCredentials, isLocalModelBaseUrl } from "../providers/model-call.js";
|
|
4
|
-
import { extractAssistantText, getAssistantMessageErrorReason } from "../providers/model-response.js";
|
|
5
5
|
import { resolveModelSelector } from "../config/agent-model-intents.js";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
//#region src/home-intelligence/generator.ts
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { listPortListeners } from "../gateway/ports.js";
|
|
2
2
|
import { isGatewayArgv, parseProcCmdline } from "./gateway-process-argv.js";
|
|
3
|
-
import
|
|
3
|
+
import fsSync from "node:fs";
|
|
4
4
|
import { spawnSync } from "node:child_process";
|
|
5
5
|
//#region src/infra/gateway-processes.ts
|
|
6
6
|
function readGatewayProcessArgsSync(pid) {
|
|
7
7
|
if (process.platform === "linux") try {
|
|
8
|
-
return parseProcCmdline(
|
|
8
|
+
return parseProcCmdline(fsSync.readFileSync(`/proc/${pid}/cmdline`, "utf8"));
|
|
9
9
|
} catch {
|
|
10
10
|
return null;
|
|
11
11
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { resolveBrewPathDirs } from "./brew.js";
|
|
2
2
|
import os from "node:os";
|
|
3
3
|
import path from "node:path";
|
|
4
|
-
import
|
|
4
|
+
import fsSync from "node:fs";
|
|
5
5
|
//#region src/infra/path-env.ts
|
|
6
6
|
function isTruthyEnvValue(value) {
|
|
7
7
|
if (!value) return false;
|
|
@@ -10,7 +10,7 @@ function isTruthyEnvValue(value) {
|
|
|
10
10
|
}
|
|
11
11
|
function isExecutable(filePath) {
|
|
12
12
|
try {
|
|
13
|
-
|
|
13
|
+
fsSync.accessSync(filePath, fsSync.constants.X_OK);
|
|
14
14
|
return true;
|
|
15
15
|
} catch {
|
|
16
16
|
return false;
|
|
@@ -18,7 +18,7 @@ function isExecutable(filePath) {
|
|
|
18
18
|
}
|
|
19
19
|
function isDirectory(dirPath) {
|
|
20
20
|
try {
|
|
21
|
-
return
|
|
21
|
+
return fsSync.statSync(dirPath).isDirectory();
|
|
22
22
|
} catch {
|
|
23
23
|
return false;
|
|
24
24
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { applyPathPrepend } from "./path-prepend.js";
|
|
2
1
|
import { resolveExecPathBinPrepend } from "./path-env.js";
|
|
2
|
+
import { applyPathPrepend } from "./path-prepend.js";
|
|
3
3
|
import { readPackageVersion } from "./package-json.js";
|
|
4
4
|
import { createDefaultCommandRunner } from "./run-command.js";
|
|
5
5
|
import path from "node:path";
|
|
6
|
-
import
|
|
7
|
-
import fs
|
|
6
|
+
import fsSync from "node:fs";
|
|
7
|
+
import fs from "node:fs/promises";
|
|
8
8
|
//#region src/infra/update-global.ts
|
|
9
9
|
const XOPC_PACKAGE_NAME = "@xopcai/xopc";
|
|
10
10
|
const GLOBAL_RENAME_PREFIX = ".";
|
|
@@ -18,7 +18,7 @@ const NPM_GLOBAL_INSTALL_OMIT_OPTIONAL_FLAGS = ["--omit=optional", ...NPM_GLOBAL
|
|
|
18
18
|
const GLOBAL_DETECT_TIMEOUT_MS = 15e3;
|
|
19
19
|
async function pathExists(targetPath) {
|
|
20
20
|
try {
|
|
21
|
-
await fs
|
|
21
|
+
await fs.access(targetPath);
|
|
22
22
|
return true;
|
|
23
23
|
} catch {
|
|
24
24
|
return false;
|
|
@@ -26,7 +26,7 @@ async function pathExists(targetPath) {
|
|
|
26
26
|
}
|
|
27
27
|
async function tryRealpath(targetPath) {
|
|
28
28
|
try {
|
|
29
|
-
return await fs
|
|
29
|
+
return await fs.realpath(targetPath);
|
|
30
30
|
} catch {
|
|
31
31
|
return path.resolve(targetPath);
|
|
32
32
|
}
|
|
@@ -49,14 +49,14 @@ function resolvePreferredNpmCommand(pkgRoot) {
|
|
|
49
49
|
const prefix = inferNpmPrefixFromPackageRoot(pkgRoot);
|
|
50
50
|
if (!prefix) return null;
|
|
51
51
|
const candidate = process.platform === "win32" ? path.join(prefix, "npm.cmd") : path.join(prefix, "bin", "npm");
|
|
52
|
-
return
|
|
52
|
+
return fsSync.existsSync(candidate) ? candidate : null;
|
|
53
53
|
}
|
|
54
54
|
function resolveNpmFromExecPath() {
|
|
55
55
|
const execPath = process.execPath?.trim();
|
|
56
56
|
if (!execPath) return null;
|
|
57
57
|
const binDir = path.dirname(execPath);
|
|
58
58
|
const candidate = process.platform === "win32" ? path.join(binDir, "npm.cmd") : path.join(binDir, "npm");
|
|
59
|
-
return
|
|
59
|
+
return fsSync.existsSync(candidate) ? candidate : null;
|
|
60
60
|
}
|
|
61
61
|
function resolvePreferredGlobalManagerCommand(manager, pkgRoot) {
|
|
62
62
|
if (manager !== "npm") return manager;
|
|
@@ -204,7 +204,7 @@ async function cleanupGlobalRenameDirs(params) {
|
|
|
204
204
|
const prefix = `${GLOBAL_RENAME_PREFIX}${name}-`;
|
|
205
205
|
let entries = [];
|
|
206
206
|
try {
|
|
207
|
-
entries = await fs
|
|
207
|
+
entries = await fs.readdir(root);
|
|
208
208
|
} catch {
|
|
209
209
|
return { removed };
|
|
210
210
|
}
|
|
@@ -212,8 +212,8 @@ async function cleanupGlobalRenameDirs(params) {
|
|
|
212
212
|
if (!entry.startsWith(prefix)) continue;
|
|
213
213
|
const target = path.join(root, entry);
|
|
214
214
|
try {
|
|
215
|
-
if (!(await fs
|
|
216
|
-
await fs
|
|
215
|
+
if (!(await fs.lstat(target)).isDirectory()) continue;
|
|
216
|
+
await fs.rm(target, {
|
|
217
217
|
recursive: true,
|
|
218
218
|
force: true
|
|
219
219
|
});
|
|
@@ -5,11 +5,11 @@ import { currentOperationId, init_operation_context } from "../infra/operation-c
|
|
|
5
5
|
import { afterSqliteCommit, init_transaction, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
|
|
6
6
|
import { ExtensionCapabilityBindingsSchema, extensionCapabilityPermissions } from "../../packages/gateway-contract/src/extension-capabilities.js";
|
|
7
7
|
import { init_src } from "../../packages/gateway-contract/src/index.js";
|
|
8
|
+
import { CapabilityError } from "../capabilities/runtime/errors.js";
|
|
8
9
|
import { init_paths, resolveExtensionsDir } from "../config/paths.js";
|
|
9
|
-
import { LocalAppStore } from "./store.js";
|
|
10
10
|
import { slugifyProjectName } from "../projects/project-store.js";
|
|
11
|
-
import { CapabilityError } from "../capabilities/runtime/errors.js";
|
|
12
11
|
import { DomainOutboxDispatcher } from "../infra/domain-outbox-dispatcher.js";
|
|
12
|
+
import { LocalAppStore } from "./store.js";
|
|
13
13
|
import { validateLocalAppCapabilityContracts } from "./capabilities/contracts.js";
|
|
14
14
|
import { buildLocalAppFixGuidance } from "./fix-guidance.js";
|
|
15
15
|
import { readLocalAppAcceptanceConfig } from "./acceptance.js";
|
|
@@ -2,8 +2,8 @@ import { createLogger } from "../utils/logger/index.js";
|
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
3
|
import { CapabilityErrorCodeSchema } from "../../packages/gateway-contract/src/capabilities.js";
|
|
4
4
|
import { init_src } from "../../packages/gateway-contract/src/index.js";
|
|
5
|
-
import { resolveGatewayLocalClientHost } from "../config/gateway-bind.js";
|
|
6
5
|
import { loadConfig } from "../config/loader.js";
|
|
6
|
+
import { resolveGatewayLocalClientHost } from "../config/gateway-bind.js";
|
|
7
7
|
import { createGatewayCredential, gatewayCredentialAuthorization } from "../gateway/credential.js";
|
|
8
8
|
import { fetch } from "undici";
|
|
9
9
|
//#region src/mcp/gateway-http-client.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { registerMediaUnderstandingProvider } from "./registry.js";
|
|
2
1
|
import { normalizeBaseUrl, postMultipartRequest } from "../media-shared/http/provider-http.js";
|
|
3
2
|
import "../media-shared/http/index.js";
|
|
3
|
+
import { registerMediaUnderstandingProvider } from "./registry.js";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
//#region src/media-understanding/openai-compatible-audio.ts
|
|
6
6
|
/**
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { getNoteAgentContextRecord, upsertNoteAgentContextRecord } from "../storage/sqlite/note-agent-context-repository.js";
|
|
2
2
|
import { init_sqlite } from "../storage/sqlite/index.js";
|
|
3
|
-
import { resolveImageModelConfigForTool } from "../agent/image/tool-model-config.js";
|
|
4
|
-
import { describeImagesWithFallback } from "../agent/image/understanding/runtime.js";
|
|
5
|
-
import { extractDocumentText } from "../document-understanding/extract.js";
|
|
6
|
-
import { transcribe } from "../voice/stt/transcribe-core.js";
|
|
7
3
|
import { isSTTAvailable } from "../voice/stt/availability.js";
|
|
4
|
+
import { transcribe } from "../voice/stt/transcribe-core.js";
|
|
8
5
|
import { mergeSttConfigFromAppConfig } from "../voice/stt/config.js";
|
|
9
6
|
import "../voice/stt/index.js";
|
|
7
|
+
import { extractDocumentText } from "../document-understanding/extract.js";
|
|
8
|
+
import { resolveImageModelConfigForTool } from "../agent/image/tool-model-config.js";
|
|
9
|
+
import { describeImagesWithFallback } from "../agent/image/understanding/runtime.js";
|
|
10
10
|
import { extname } from "node:path";
|
|
11
11
|
import { readFile } from "node:fs/promises";
|
|
12
12
|
//#region src/notes/agent-context.ts
|
package/dist/src/notes/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { buildNoteAgentContext, buildNoteAgentContextArtifact, getCachedNoteAgentContextArtifact } from "./agent-context.js";
|
|
2
1
|
import { resolveNoteMediaDir, resolveNotesDir } from "./paths.js";
|
|
2
|
+
import { buildNoteAgentContext, buildNoteAgentContextArtifact, getCachedNoteAgentContextArtifact } from "./agent-context.js";
|
|
3
3
|
import { NotesStore } from "./store.js";
|
|
4
4
|
import { NotesService } from "./service.js";
|
|
5
5
|
export { NotesService, NotesStore, buildNoteAgentContext, buildNoteAgentContextArtifact, getCachedNoteAgentContextArtifact, resolveNoteMediaDir, resolveNotesDir };
|
|
@@ -7,8 +7,8 @@ import { init_note_markdown, parseNoteMarkdown } from "./note-markdown.js";
|
|
|
7
7
|
import { init_notes_repository, listNoteProjectSummaries } from "../storage/sqlite/notes-repository.js";
|
|
8
8
|
import { changedFieldsFromPatch, emitActivity, previewText, systemActivityActor, systemActivitySource } from "../activity/emitter.js";
|
|
9
9
|
import { getDefaultModelSync, init_providers, resolveModel } from "../providers/index.js";
|
|
10
|
-
import { DomainOutboxDispatcher } from "../infra/domain-outbox-dispatcher.js";
|
|
11
10
|
import { completeWithResolvedCredentials } from "../providers/model-call.js";
|
|
11
|
+
import { DomainOutboxDispatcher } from "../infra/domain-outbox-dispatcher.js";
|
|
12
12
|
import { partitionAttachmentsByReference } from "./note-attachment-sync.js";
|
|
13
13
|
import { buildNoteAgentContextArtifact, getCachedNoteAgentContextArtifact } from "./agent-context.js";
|
|
14
14
|
import { revokeNoteShareRecords } from "../share/note-share-revocation.js";
|
package/dist/src/notes/store.js
CHANGED
|
@@ -7,8 +7,8 @@ import { buildNoteIndexMeta, init_note_index_meta } from "./note-index-meta.js";
|
|
|
7
7
|
import { deleteNoteRecord, getNoteRecord, listNoteRecords, upsertNoteRecord } from "../storage/sqlite/notes-repository.js";
|
|
8
8
|
import { deleteNoteAgentContextRecord } from "../storage/sqlite/note-agent-context-repository.js";
|
|
9
9
|
import { init_sqlite } from "../storage/sqlite/index.js";
|
|
10
|
-
import { canRemoveRevokedNoteShareArtifact } from "../share/note-share-revocation.js";
|
|
11
10
|
import { resolveNoteMediaDir } from "./paths.js";
|
|
11
|
+
import { canRemoveRevokedNoteShareArtifact } from "../share/note-share-revocation.js";
|
|
12
12
|
import { basename, join } from "node:path";
|
|
13
13
|
import { rmSync } from "node:fs";
|
|
14
14
|
import { randomUUID } from "node:crypto";
|
|
@@ -13,4 +13,3 @@ export declare function getNotificationDevice(deviceId: string): NotificationDev
|
|
|
13
13
|
export declare function listDeliverableNotificationDevices(now?: number): NotificationDevice[];
|
|
14
14
|
export declare function updateNotificationDevicePreferences(deviceId: string, patch: Partial<NotificationPreferences>): NotificationDevice | null;
|
|
15
15
|
export declare function removeNotificationDevice(deviceId: string): boolean;
|
|
16
|
-
export declare function disableNotificationDeviceForPushToken(pushToken: string): void;
|
|
@@ -70,7 +70,7 @@ function getNotificationDevice(deviceId) {
|
|
|
70
70
|
}
|
|
71
71
|
function listDeliverableNotificationDevices(now = Date.now()) {
|
|
72
72
|
return getSqliteDatabase().prepare(`SELECT * FROM device_push_endpoints
|
|
73
|
-
WHERE enabled = 1 AND permissions = 'granted' AND lease_expires_at > ?
|
|
73
|
+
WHERE enabled = 1 AND permissions = 'granted' AND platform = 'harmonyos' AND lease_expires_at > ?
|
|
74
74
|
ORDER BY updated_at DESC`).all(now).map(deviceFromRow);
|
|
75
75
|
}
|
|
76
76
|
function updateNotificationDevicePreferences(deviceId, patch) {
|
|
@@ -88,10 +88,5 @@ function updateNotificationDevicePreferences(deviceId, patch) {
|
|
|
88
88
|
function removeNotificationDevice(deviceId) {
|
|
89
89
|
return runSqliteWriteTransaction((db) => db.prepare("DELETE FROM device_push_endpoints WHERE device_id = ?").run(deviceId).changes > 0);
|
|
90
90
|
}
|
|
91
|
-
function disableNotificationDeviceForPushToken(pushToken) {
|
|
92
|
-
runSqliteWriteTransaction((db) => {
|
|
93
|
-
db.prepare("UPDATE device_push_endpoints SET enabled = 0, updated_at = ? WHERE push_token = ?").run(Date.now(), pushToken);
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
91
|
//#endregion
|
|
97
|
-
export {
|
|
92
|
+
export { getNotificationDevice, listDeliverableNotificationDevices, registerNotificationDevice, removeNotificationDevice, updateNotificationDevicePreferences };
|
|
@@ -4,9 +4,9 @@ import { init_transaction, runSqliteWriteTransaction } from "../storage/sqlite/t
|
|
|
4
4
|
import { localizeNotification } from "../../packages/gateway-contract/src/notifications.js";
|
|
5
5
|
import { init_src } from "../../packages/gateway-contract/src/index.js";
|
|
6
6
|
import { getOrCreateGatewayIdentity, init_gateway_identity_repository } from "../storage/sqlite/gateway-identity-repository.js";
|
|
7
|
-
import {
|
|
7
|
+
import { listDeliverableNotificationDevices } from "./device-store.js";
|
|
8
8
|
import { notificationPlanFromGatewayEvent } from "./planner.js";
|
|
9
|
-
import { createNotificationEvent, deferNotificationDelivery, expireUndeliverableNotificationDeliveries, listDueNotificationDeliveries, markNotificationDeliveryAccepted, markNotificationDeliveryDead,
|
|
9
|
+
import { createNotificationEvent, deferNotificationDelivery, expireUndeliverableNotificationDeliveries, listDueNotificationDeliveries, markNotificationDeliveryAccepted, markNotificationDeliveryDead, pruneNotificationEvents, rescheduleNotificationDelivery } from "./store.js";
|
|
10
10
|
import { sendHarmonyPush } from "./harmony-push.js";
|
|
11
11
|
//#region src/notifications/service.ts
|
|
12
12
|
init_transaction();
|
|
@@ -14,8 +14,6 @@ init_src();
|
|
|
14
14
|
init_logger();
|
|
15
15
|
init_gateway_identity_repository();
|
|
16
16
|
const log = createLogger("Notifications");
|
|
17
|
-
const EXPO_PUSH_URL = "https://exp.host/--/api/v2/push/send";
|
|
18
|
-
const EXPO_RECEIPTS_URL = "https://exp.host/--/api/v2/push/getReceipts";
|
|
19
17
|
const MAX_DELIVERY_ATTEMPTS = 5;
|
|
20
18
|
const RETRY_DELAYS_MS = [
|
|
21
19
|
3e4,
|
|
@@ -24,7 +22,6 @@ const RETRY_DELAYS_MS = [
|
|
|
24
22
|
36e5,
|
|
25
23
|
216e5
|
|
26
24
|
];
|
|
27
|
-
const RECEIPT_DELAY_MS = 15 * 6e4;
|
|
28
25
|
const STANDARD_PREFERENCES = {
|
|
29
26
|
"chat.completed": "chatCompleted",
|
|
30
27
|
"chat.failed": "chatFailed",
|
|
@@ -45,9 +42,6 @@ function preferenceAllows(type, preferences) {
|
|
|
45
42
|
function retryAt(attempts, now) {
|
|
46
43
|
return now + RETRY_DELAYS_MS[Math.min(attempts, RETRY_DELAYS_MS.length - 1)];
|
|
47
44
|
}
|
|
48
|
-
function expoError(result) {
|
|
49
|
-
return result.details?.error || result.message || "Expo rejected the notification";
|
|
50
|
-
}
|
|
51
45
|
var NotificationService = class {
|
|
52
46
|
timer = null;
|
|
53
47
|
draining = false;
|
|
@@ -116,7 +110,6 @@ var NotificationService = class {
|
|
|
116
110
|
}
|
|
117
111
|
for (const notification of this.options.domainDelivery?.flush((plan) => this.persistPlan(plan)) ?? []) this.options.publish("notification.created", notification);
|
|
118
112
|
await this.deliverPending();
|
|
119
|
-
await this.checkReceipts();
|
|
120
113
|
await this.options.domainDelivery?.drain();
|
|
121
114
|
} catch (err) {
|
|
122
115
|
log.warn({ err }, "Notification delivery pass failed");
|
|
@@ -160,85 +153,23 @@ var NotificationService = class {
|
|
|
160
153
|
body: localized.localizedBody
|
|
161
154
|
};
|
|
162
155
|
try {
|
|
163
|
-
if (delivery.platform
|
|
164
|
-
|
|
165
|
-
pushToken: delivery.pushToken,
|
|
166
|
-
eventId: delivery.event.id,
|
|
167
|
-
gatewayId: getOrCreateGatewayIdentity().id,
|
|
168
|
-
target: delivery.event.target,
|
|
169
|
-
title: preview.title,
|
|
170
|
-
body: preview.body
|
|
171
|
-
}, fetchImpl);
|
|
172
|
-
markNotificationDeliveryAccepted(delivery.event.id, delivery.deviceId, ticket, Number.MAX_SAFE_INTEGER);
|
|
156
|
+
if (delivery.platform !== "harmonyos") {
|
|
157
|
+
markNotificationDeliveryDead(delivery.event.id, delivery.deviceId, "Native push provider is not configured");
|
|
173
158
|
return;
|
|
174
159
|
}
|
|
175
|
-
const
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
title: preview.title,
|
|
185
|
-
body: preview.body,
|
|
186
|
-
sound: delivery.event.priority === "high" ? "default" : void 0,
|
|
187
|
-
priority: delivery.event.priority,
|
|
188
|
-
data: {
|
|
189
|
-
eventId: delivery.event.id,
|
|
190
|
-
target: delivery.event.target,
|
|
191
|
-
...delivery.event.payload
|
|
192
|
-
}
|
|
193
|
-
})
|
|
194
|
-
});
|
|
195
|
-
if (!response.ok) throw new Error(`Expo push request failed (${response.status})`);
|
|
196
|
-
const body = await response.json();
|
|
197
|
-
const result = Array.isArray(body.data) ? body.data[0] : body.data;
|
|
198
|
-
if (result?.status !== "ok" || !result.id) {
|
|
199
|
-
const error = expoError(result ?? {});
|
|
200
|
-
if (result?.details?.error === "DeviceNotRegistered") {
|
|
201
|
-
disableNotificationDeviceForPushToken(delivery.pushToken);
|
|
202
|
-
markNotificationDeliveryDead(delivery.event.id, delivery.deviceId, error);
|
|
203
|
-
return;
|
|
204
|
-
}
|
|
205
|
-
throw new Error(error);
|
|
206
|
-
}
|
|
207
|
-
markNotificationDeliveryAccepted(delivery.event.id, delivery.deviceId, result.id, Date.now() + RECEIPT_DELAY_MS);
|
|
160
|
+
const ticket = await (this.options.sendHarmony ?? sendHarmonyPush)({
|
|
161
|
+
pushToken: delivery.pushToken,
|
|
162
|
+
eventId: delivery.event.id,
|
|
163
|
+
gatewayId: getOrCreateGatewayIdentity().id,
|
|
164
|
+
target: delivery.event.target,
|
|
165
|
+
title: preview.title,
|
|
166
|
+
body: preview.body
|
|
167
|
+
}, fetchImpl);
|
|
168
|
+
markNotificationDeliveryAccepted(delivery.event.id, delivery.deviceId, ticket, Number.MAX_SAFE_INTEGER);
|
|
208
169
|
} catch (err) {
|
|
209
170
|
this.retryOrFail(delivery, err);
|
|
210
171
|
}
|
|
211
172
|
}
|
|
212
|
-
async checkReceipts() {
|
|
213
|
-
const withTickets = listDueNotificationDeliveries("accepted").filter((delivery) => delivery.platform !== "harmonyos" && delivery.providerTicketId);
|
|
214
|
-
if (withTickets.length === 0) return;
|
|
215
|
-
const fetchImpl = this.options.fetch ?? fetch;
|
|
216
|
-
try {
|
|
217
|
-
const response = await fetchImpl(EXPO_RECEIPTS_URL, {
|
|
218
|
-
method: "POST",
|
|
219
|
-
headers: {
|
|
220
|
-
"content-type": "application/json",
|
|
221
|
-
accept: "application/json"
|
|
222
|
-
},
|
|
223
|
-
signal: AbortSignal.timeout(1e4),
|
|
224
|
-
body: JSON.stringify({ ids: withTickets.map((delivery) => delivery.providerTicketId) })
|
|
225
|
-
});
|
|
226
|
-
if (!response.ok) throw new Error(`Expo receipt request failed (${response.status})`);
|
|
227
|
-
const body = await response.json();
|
|
228
|
-
for (const delivery of withTickets) {
|
|
229
|
-
const result = body.data?.[delivery.providerTicketId];
|
|
230
|
-
if (!result) this.retryOrFail(delivery, /* @__PURE__ */ new Error("Expo receipt is not ready"), "accepted");
|
|
231
|
-
else if (result.status === "ok") markNotificationDeliveryDelivered(delivery.event.id, delivery.deviceId);
|
|
232
|
-
else {
|
|
233
|
-
const error = expoError(result);
|
|
234
|
-
if (result.details?.error === "DeviceNotRegistered") disableNotificationDeviceForPushToken(delivery.pushToken);
|
|
235
|
-
markNotificationDeliveryDead(delivery.event.id, delivery.deviceId, error);
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
} catch (err) {
|
|
239
|
-
for (const delivery of withTickets) this.retryOrFail(delivery, err, "accepted");
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
173
|
retryOrFail(delivery, error, status = "pending") {
|
|
243
174
|
const message = error instanceof Error ? error.message : String(error);
|
|
244
175
|
if (delivery.attempts + 1 >= MAX_DELIVERY_ATTEMPTS) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { init_sync_provider_auth, resolveProviderApiKeyForAgentSync } from "../../auth/sync-provider-auth.js";
|
|
2
1
|
import { getApiKeyFromEnv, init_env_keys } from "../env-keys.js";
|
|
2
|
+
import { init_sync_provider_auth, resolveProviderApiKeyForAgentSync } from "../../auth/sync-provider-auth.js";
|
|
3
3
|
import { getDefaultAuthProfileStore } from "./auth-profile-store.js";
|
|
4
4
|
//#region src/providers/auth-runtime/resolve-auth.ts
|
|
5
5
|
init_env_keys();
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { __esmMin, __exportAll } from "../../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { getAgentDefaultModelRef, init_schema } from "../config/schema.js";
|
|
3
|
-
import { getModelOAuthProviderIds, init_registry } from "../auth/oauth/registry.js";
|
|
4
|
-
import { hasProviderAuthOnDiskSync, init_sync_provider_auth } from "../auth/sync-provider-auth.js";
|
|
5
3
|
import { PROVIDER_ENV_MAP, getApiKeyFromEnv, init_env_keys } from "./env-keys.js";
|
|
6
4
|
import { init_model_ref, splitProviderModelRef } from "./model-ref.js";
|
|
7
5
|
import { ModelRegistry, getModelRegistry, init_model_registry, prewarmModelRegistry, resetModelRegistry } from "./model-registry.js";
|
|
6
|
+
import { getModelOAuthProviderIds, init_registry } from "../auth/oauth/registry.js";
|
|
8
7
|
import { CredentialResolver, hasCredentials, init_credentials } from "../auth/credentials.js";
|
|
8
|
+
import { hasProviderAuthOnDiskSync, init_sync_provider_auth } from "../auth/sync-provider-auth.js";
|
|
9
9
|
import { EXTENSION_PROVIDER_BASE_URL, init_constants } from "./constants.js";
|
|
10
10
|
import { applyOfficialModelMetadataCorrections, getSupplementalModels, init_model_supplements } from "./model-supplements.js";
|
|
11
11
|
import { getProviderRegistry, init_plugin_registry } from "./plugin-registry.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { init_paths_state, resolveXopcCloudCatalogCachePath } from "../config/paths-state.js";
|
|
3
|
-
import { ComputerProfileSchema, init_src } from "../../packages/computer-control-contract/src/index.js";
|
|
4
3
|
import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
|
|
4
|
+
import { ComputerProfileSchema, init_src } from "../../packages/computer-control-contract/src/index.js";
|
|
5
5
|
import { voiceManifestSchema } from "../../packages/realtime-protocol/src/voice-catalog.js";
|
|
6
6
|
import { init_voice } from "../../packages/realtime-protocol/src/voice.js";
|
|
7
7
|
import { readFileSync, rmSync } from "node:fs";
|
|
@@ -2,8 +2,8 @@ import { AgentCatalogRepository, init_repository } from "../agent-catalog/reposi
|
|
|
2
2
|
import { init_model_policy, isComputerModel, isDedicatedComputerProfile } from "../computer/model-policy.js";
|
|
3
3
|
import { getModelCatalogStore, init_model_catalog_store } from "./model-catalog-store.js";
|
|
4
4
|
import { getModelRegistry, init_model_registry } from "./model-registry.js";
|
|
5
|
-
import { parseImageGenerationModelRef } from "../agent/image/generation/model-ref.js";
|
|
6
5
|
import { getImageGenerationProvider } from "../agent/image/generation/provider-registry.js";
|
|
6
|
+
import { parseImageGenerationModelRef } from "../agent/image/generation/model-ref.js";
|
|
7
7
|
//#region src/providers/model-reference-auditor.ts
|
|
8
8
|
init_repository();
|
|
9
9
|
init_model_policy();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { getOAuthProviderDefinition, init_registry } from "../auth/oauth/registry.js";
|
|
3
2
|
import { getModelCatalogStore, init_model_catalog_store } from "./model-catalog-store.js";
|
|
3
|
+
import { getOAuthProviderDefinition, init_registry } from "../auth/oauth/registry.js";
|
|
4
4
|
import { XOPC_CLOUD_PROVIDER_ID, init_xopc_cloud_config, resolveXopcModelRouterUrl } from "./xopc-cloud-config.js";
|
|
5
5
|
//#region src/providers/register-runtime-providers.ts
|
|
6
6
|
function registerRuntimeProvider(modelRuntime, source) {
|
|
@@ -2,9 +2,9 @@ import { createLogger } from "../utils/logger/index.js";
|
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
3
|
import { isTailscaleInstalled } from "../infra/tailscale.js";
|
|
4
4
|
import { resolveGatewayBindMode } from "../config/gateway-bind.js";
|
|
5
|
-
import { getTunnelService } from "../tunnel/tunnel-service.js";
|
|
6
5
|
import { collectExposureConflicts } from "./exposure-guards.js";
|
|
7
6
|
import { getTailscaleExposureState, maybeStartTailscaleFromConfig, stopTailscaleExposure } from "../gateway/tailscale-lifecycle.js";
|
|
7
|
+
import { getTunnelService } from "../tunnel/tunnel-service.js";
|
|
8
8
|
import { getTunnelConsentState } from "../tunnel/consent.js";
|
|
9
9
|
import { maybeAutoStartTunnelFromConfig } from "../tunnel/gateway-lifecycle.js";
|
|
10
10
|
//#region src/remote-access/exposure-manager.ts
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { createSqliteTranscriptRuntime } from "../../agent/embedded/transcript-runtime.js";
|
|
2
|
-
import { createDelegateChildHandle } from "../../agent/child-agent-factory.js";
|
|
3
|
-
import { createDelegationParentPolicy } from "../../agent/tools/delegation-parent-policy.js";
|
|
4
|
-
import { SessionStore } from "../../session/store.js";
|
|
5
1
|
import { MessageBus } from "../../infra/bus/queue.js";
|
|
6
2
|
import "../../infra/bus/index.js";
|
|
3
|
+
import { SessionStore } from "../../session/store.js";
|
|
4
|
+
import { createSqliteTranscriptRuntime } from "../../agent/embedded/transcript-runtime.js";
|
|
7
5
|
import { createStructuredOutputTool } from "../../agent/workflow/structured-output-tool.js";
|
|
6
|
+
import { createDelegateChildHandle } from "../../agent/child-agent-factory.js";
|
|
7
|
+
import { createDelegationParentPolicy } from "../../agent/tools/delegation-parent-policy.js";
|
|
8
8
|
import { createScopedWorkspaceTools } from "../../agent/tools/scoped-workspace-tools.js";
|
|
9
9
|
import { taskFollowUpTemplate } from "./contracts.js";
|
|
10
10
|
import { z } from "zod";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { init_paths_state, resolveStateDir } from "../../config/paths-state.js";
|
|
2
2
|
import { ExecutionEnvironmentStore } from "../../execution-environments/store.js";
|
|
3
3
|
import { ProjectStore } from "../../projects/project-store.js";
|
|
4
|
-
import { readWorkspaceFile } from "../../agent/sandbox/fileAccess.js";
|
|
5
4
|
import { LocalWorktreeManager } from "../../execution-environments/local-worktree-manager.js";
|
|
5
|
+
import { readWorkspaceFile } from "../../agent/sandbox/fileAccess.js";
|
|
6
6
|
import { workspaceFingerprint } from "./workspaceFingerprint.js";
|
|
7
7
|
import { dirname, join, resolve } from "node:path";
|
|
8
8
|
import { existsSync, lstatSync, mkdirSync, readdirSync, realpathSync } from "node:fs";
|
|
@@ -5,14 +5,14 @@ import { TaskRunRepository, init_task_run_repository } from "../../tasks/task-ru
|
|
|
5
5
|
import { AgentCatalogRepository, init_repository } from "../../agent-catalog/repository.js";
|
|
6
6
|
import { init_agent_scope, resolveDefaultAgentId } from "../../agent/agent-scope.js";
|
|
7
7
|
import { init_providers, isProviderConfiguredSync, resolveModel } from "../../providers/index.js";
|
|
8
|
+
import { runProcess } from "../../process/run-process.js";
|
|
8
9
|
import { ExecutionEnvironmentStore } from "../../execution-environments/store.js";
|
|
9
10
|
import { ProjectStore } from "../../projects/project-store.js";
|
|
10
|
-
import {
|
|
11
|
-
import { removeCommandContainer } from "../../agent/commands/command-isolation.js";
|
|
12
|
-
import { inspectGitRepository } from "../../execution-environments/git.js";
|
|
11
|
+
import { resolveModelSelector } from "../../config/agent-model-intents.js";
|
|
13
12
|
import { TaskContextRepository } from "../../tasks/task-context-repository.js";
|
|
14
13
|
import { TaskApplicationService } from "../../tasks/task-application-service.js";
|
|
15
|
-
import {
|
|
14
|
+
import { inspectGitRepository } from "../../execution-environments/git.js";
|
|
15
|
+
import { removeCommandContainer } from "../../agent/commands/command-isolation.js";
|
|
16
16
|
import { sceneContentHash } from "../contracts.js";
|
|
17
17
|
import { SceneConflictError, SceneNotFoundError, SceneRepository } from "../repository.js";
|
|
18
18
|
import { SceneSetupError } from "../service.js";
|
|
@@ -3,6 +3,11 @@ import { init_redact, redactSensitiveOutput } from "../utils/logger/redact.js";
|
|
|
3
3
|
init_redact();
|
|
4
4
|
function toolCategory(name, args) {
|
|
5
5
|
const key = name.split("__").pop()?.toLowerCase().replace(/-/g, "_") ?? "";
|
|
6
|
+
if (key === "run" && args && typeof args === "object" && !Array.isArray(args)) {
|
|
7
|
+
const input = args;
|
|
8
|
+
if (Array.isArray(input.search_query)) return "search";
|
|
9
|
+
if (Array.isArray(input.open)) return "fetch";
|
|
10
|
+
}
|
|
6
11
|
if (key === "skill_view" || key === "tool_manual") return key;
|
|
7
12
|
if (key === "xopc_use") {
|
|
8
13
|
let input = args;
|
|
@@ -54,6 +59,17 @@ function publicInputPreview(name, args) {
|
|
|
54
59
|
if (!args || typeof args !== "object" || Array.isArray(args)) return void 0;
|
|
55
60
|
const input = args;
|
|
56
61
|
const category = toolCategory(name, args);
|
|
62
|
+
if (category === "search" && Array.isArray(input.search_query)) {
|
|
63
|
+
const first = input.search_query[0];
|
|
64
|
+
if (first && typeof first === "object" && !Array.isArray(first) && typeof first.q === "string") return redactSensitiveOutput(first.q.trim().slice(0, 160));
|
|
65
|
+
}
|
|
66
|
+
if (category === "fetch" && Array.isArray(input.open)) {
|
|
67
|
+
const first = input.open[0];
|
|
68
|
+
if (first && typeof first === "object" && !Array.isArray(first) && typeof first.ref_id === "string") try {
|
|
69
|
+
const url = new URL(first.ref_id);
|
|
70
|
+
return `${url.origin}${url.pathname}`.slice(0, 160);
|
|
71
|
+
} catch {}
|
|
72
|
+
}
|
|
57
73
|
const keys = category === "search" ? ["query"] : category === "read" ? ["path", "file_path"] : category === "fetch" ? ["url"] : [];
|
|
58
74
|
for (const key of keys) {
|
|
59
75
|
const value = input[key];
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { buildSessionContextForLlm, init_session_context_for_llm, isTranscriptContextEntry, mergeLlmMessagesPreservingContextRows, transcriptRowsFromJsonArray } from "./session-context-for-llm.js";
|
|
2
2
|
import { SessionStatus, init_types } from "./types.js";
|
|
3
3
|
import { effectiveWorkspacePathForSession, normalizeWorkingDirectoryInput, projectWorkspacePath } from "./session-workspace.js";
|
|
4
|
-
import { flattenMessageContent, messagesToClientHistory } from "./client-history.js";
|
|
5
|
-
import { emitSessionTranscriptUpdate, onSessionTranscriptUpdate } from "./transcript-events.js";
|
|
6
4
|
import { fallbackTitleFromMessages, generateSessionTitleFromMessages, getSessionTitleSource, isWebchatConversationId, maybeRefineSessionTitleWithLlm, maybeSetProvisionalSessionTitle, provisionalTitleFromUserText, sanitizeGeneratedSessionTitle, sanitizeSessionTitle, shouldAutoTitleConversationId, shouldRefineSessionTitleWithLlm } from "./session-title.js";
|
|
5
|
+
import { flattenMessageContent, messagesToClientHistory } from "./client-history.js";
|
|
7
6
|
import { SessionStore } from "./store.js";
|
|
8
7
|
import { applySessionPatchToMetadata } from "./patch-metadata.js";
|
|
9
8
|
import { SessionIndex } from "./manager.js";
|
|
9
|
+
import { emitSessionTranscriptUpdate, onSessionTranscriptUpdate } from "./transcript-events.js";
|
|
10
10
|
import { SessionConfigStore, resolveReasoningLevel, resolveThinkingLevel, resolveVerboseLevel } from "./config-store.js";
|
|
11
11
|
import { DEFAULT_ACTIVITY_DETAIL_LEVEL, resolveConfiguredActivityDetailDefault, resolveEffectiveReasoningLevel, resolveEffectiveThinkingLevel } from "./thinking-resolve.js";
|
|
12
12
|
import { DEFAULT_IDLE_MINUTES, DEFAULT_RESET_AT_HOUR, DEFAULT_RESET_MODE, evaluateSessionFreshness, resolveDailyResetAtMs, resolveSessionResetPolicy } from "./reset-policy.js";
|
|
@@ -5,8 +5,8 @@ import { isCronConversationId } from "../routing/agent-session-key.js";
|
|
|
5
5
|
import { init_session_key } from "../routing/session-key.js";
|
|
6
6
|
import { init_providers, resolveModel } from "../providers/index.js";
|
|
7
7
|
import { completeWithResolvedCredentials } from "../providers/model-call.js";
|
|
8
|
-
import { readAgentMessageContent } from "../agent/memory/agent-message-access.js";
|
|
9
8
|
import { stripRuntimeContextFromUserMessage } from "./user-message-display.js";
|
|
9
|
+
import { readAgentMessageContent } from "../agent/memory/agent-message-access.js";
|
|
10
10
|
//#region src/session/session-title.ts
|
|
11
11
|
init_session_key();
|
|
12
12
|
init_providers();
|