@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
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { readWorkspaceRevision } from "../coding/workspace-revision.js";
|
|
2
1
|
import { prepareSafeToolEnv } from "../sandbox/sanitize-env-vars.js";
|
|
2
|
+
import { readWorkspaceRevision } from "../coding/workspace-revision.js";
|
|
3
3
|
import { evaluateFilePolicy } from "../sandbox/exec-policy.js";
|
|
4
4
|
import { checkedFilePath, readWorkspaceFile } from "../sandbox/fileAccess.js";
|
|
5
5
|
import { resolve } from "node:path";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { turnOutcomeKindFromFileName } from "../../../packages/gateway-contract/src/turn-outcome.js";
|
|
2
2
|
import { init_src } from "../../../packages/gateway-contract/src/index.js";
|
|
3
|
-
import { readWorkspaceFile } from "../sandbox/fileAccess.js";
|
|
4
|
-
import { checkFileSafety } from "../prompt/safety.js";
|
|
5
3
|
import { resolvePathUnderWorkspace } from "./tool-paths.js";
|
|
6
4
|
import { MEDIA_MAX_BYTES } from "../../media/store.js";
|
|
5
|
+
import { readWorkspaceFile } from "../sandbox/fileAccess.js";
|
|
6
|
+
import { checkFileSafety } from "../prompt/safety.js";
|
|
7
7
|
import { persistToolMedia } from "./tool-media.js";
|
|
8
8
|
import { basename } from "node:path";
|
|
9
9
|
import { Type } from "@sinclair/typebox";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { resolveStateDir } from "../../config/paths-state.js";
|
|
2
2
|
import { init_paths } from "../../config/paths.js";
|
|
3
|
-
import { DEFAULT_MAX_BYTES, formatSize, truncateHead } from "./truncate.js";
|
|
4
3
|
import { createSkillConfigManager, isSkillEnabled, resolveSkillConfig } from "../skills/config.js";
|
|
4
|
+
import { DEFAULT_MAX_BYTES, formatSize, truncateHead } from "./truncate.js";
|
|
5
5
|
import { resolveSkillReadablePath } from "../skills/skill-view-path.js";
|
|
6
6
|
import { readFileSync, statSync } from "fs";
|
|
7
7
|
import { Type } from "@sinclair/typebox";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
-
import { speak } from "../../voice/tts/speak-core.js";
|
|
4
3
|
import { mergeTtsConfigFromAppConfig } from "../../voice/tts/merge-config.js";
|
|
5
4
|
import { getChannelOutputFormat } from "../../voice/tts/service.js";
|
|
5
|
+
import { speak } from "../../voice/tts/speak-core.js";
|
|
6
6
|
import { compressAudio } from "../../voice/tts/audio.js";
|
|
7
7
|
import { persistOutboundTtsAudio } from "../../channels/attachments/outbound-tts-persist.js";
|
|
8
8
|
import { Type } from "@sinclair/typebox";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { retrievalLexicalSimilarity } from "../../retrieval/textFeatures.js";
|
|
2
1
|
import { deleteUserAssertion, getAssertionSlot, getUserAssertion, listUserAssertionSources, listUserAssertions, reconcileAssertion, setAssertionStatus } from "../../user-model/repository.js";
|
|
3
2
|
import { canUseAssertion } from "../../user-model/usage-policy.js";
|
|
4
3
|
import "../../user-model/index.js";
|
|
4
|
+
import { retrievalLexicalSimilarity } from "../../retrieval/textFeatures.js";
|
|
5
5
|
import { Type } from "@sinclair/typebox";
|
|
6
6
|
//#region src/agent/tools/user-context-tool.ts
|
|
7
7
|
const SearchSchema = Type.Object({
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { appendProductDeliveryText } from "../../../packages/gateway-contract/src/product-delivery.js";
|
|
2
2
|
import { init_src } from "../../../packages/gateway-contract/src/index.js";
|
|
3
|
+
import { fileResourceId, fileSpaceId } from "../../files/file-service.js";
|
|
4
|
+
import { isBareProfileMarkdownFileName, resolvePathUnderWorkspace, resolveProfileMarkdownPathIfBareName } from "./tool-paths.js";
|
|
3
5
|
import { writeWorkspaceFile } from "../sandbox/fileAccess.js";
|
|
4
6
|
import { checkFileSafety } from "../prompt/safety.js";
|
|
5
|
-
import { isBareProfileMarkdownFileName, resolvePathUnderWorkspace, resolveProfileMarkdownPathIfBareName } from "./tool-paths.js";
|
|
6
|
-
import { fileResourceId, fileSpaceId } from "../../files/file-service.js";
|
|
7
7
|
import { basename, relative, sep } from "path";
|
|
8
8
|
import { realpath } from "fs/promises";
|
|
9
9
|
import { Type } from "@sinclair/typebox";
|
|
@@ -10,22 +10,22 @@ import { TaskRunRepository } from "../../tasks/task-run-repository.js";
|
|
|
10
10
|
import { getSessionMetadata } from "../../storage/sqlite/session-read-repository.js";
|
|
11
11
|
import { init_sqlite } from "../../storage/sqlite/index.js";
|
|
12
12
|
import "../../activity/index.js";
|
|
13
|
-
import { getDefaultAgentId, init_resolve_route } from "../../routing/resolve-route.js";
|
|
14
|
-
import { TaskConversationRepository } from "../../tasks/task-conversation-repository.js";
|
|
15
13
|
import { CapabilityError } from "../../capabilities/runtime/errors.js";
|
|
16
14
|
import "../../capabilities/runtime/dispatcher.js";
|
|
15
|
+
import { getDefaultAgentId, init_resolve_route } from "../../routing/resolve-route.js";
|
|
16
|
+
import { TaskCollaborationRepository } from "../../tasks/task-collaboration-repository.js";
|
|
17
|
+
import { TaskConversationRepository } from "../../tasks/task-conversation-repository.js";
|
|
18
|
+
import { TaskApplicationService } from "../../tasks/task-application-service.js";
|
|
17
19
|
import { resolveProjectAgentId } from "../../projects/project-agent.js";
|
|
18
20
|
import "../../projects/index.js";
|
|
21
|
+
import { TaskOriginRepository } from "../../tasks/task-origin-repository.js";
|
|
19
22
|
import { TaskDeletionService } from "../../tasks/task-deletion-service.js";
|
|
20
23
|
import { TaskDeleteOutputSchema } from "../../tasks/capabilities/management.js";
|
|
21
|
-
import { TaskCollaborationRepository } from "../../tasks/task-collaboration-repository.js";
|
|
22
|
-
import { TaskApplicationService } from "../../tasks/task-application-service.js";
|
|
23
24
|
import { AutomationCreateCapabilityInputSchema, AutomationUpdatePatchSchema } from "../../automations/capabilities/write.js";
|
|
24
25
|
import { TaskMutationOutputSchema } from "../../tasks/capabilities/write.js";
|
|
25
26
|
import { createProductDispatcher } from "../../capabilities/runtime/product.js";
|
|
26
27
|
import { localAppCapabilities } from "../../local-apps/capabilities/runtime.js";
|
|
27
28
|
import { defineTaskContract } from "../../tasks/task-contract-definition.js";
|
|
28
|
-
import { TaskOriginRepository } from "../../tasks/task-origin-repository.js";
|
|
29
29
|
import "../../tasks/index.js";
|
|
30
30
|
import { randomUUID } from "node:crypto";
|
|
31
31
|
import { Type } from "@sinclair/typebox";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
3
|
import { createSqliteTranscriptRuntime } from "../embedded/transcript-runtime.js";
|
|
4
|
+
import { STRUCTURED_OUTPUT_TOOL_NAME, createStructuredOutputTool } from "./structured-output-tool.js";
|
|
4
5
|
import { createDelegateChildHandle } from "../child-agent-factory.js";
|
|
5
6
|
import { DELEGATION_TOOL_CAPABILITIES, protectDelegatedTool, resolveDelegationTools } from "../tools/delegation-policy.js";
|
|
6
7
|
import { DELEGATE_BLOCKED_TOOLS } from "../tools/delegate-tool.js";
|
|
7
8
|
import { createDelegationParentPolicy } from "../tools/delegation-parent-policy.js";
|
|
8
|
-
import { STRUCTURED_OUTPUT_TOOL_NAME, createStructuredOutputTool } from "./structured-output-tool.js";
|
|
9
9
|
//#region src/agent/workflow/subagent-runner.ts
|
|
10
10
|
init_logger();
|
|
11
11
|
const log = createLogger("Agent:WorkflowSubagent");
|
|
@@ -25,7 +25,8 @@ function buildWorkflowChildTools(childOptions) {
|
|
|
25
25
|
getPrimaryModel: () => childOptions.model,
|
|
26
26
|
agentId: childOptions.agentId,
|
|
27
27
|
conversationId: childOptions.browserConversationId,
|
|
28
|
-
disabledTools: profile?.tools.denied
|
|
28
|
+
disabledTools: profile?.tools.denied,
|
|
29
|
+
toolAllowlist: profile?.config.toolAllowlist
|
|
29
30
|
});
|
|
30
31
|
}
|
|
31
32
|
//#endregion
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { AgentEntrySchema, EffectiveAgentConfigSchema } from "../agent-config/schema.js";
|
|
2
2
|
import { resolveEffectiveAgentConfig } from "../agent-config/resolver.js";
|
|
3
3
|
import { init_agent_config } from "../agent-config/index.js";
|
|
4
|
-
import { AgentCatalogRepository, init_repository } from "./repository.js";
|
|
5
|
-
import { init_agent_scope, resolveAgentWorkspaceDir } from "../agent/agent-scope.js";
|
|
6
4
|
import { CapabilityError } from "../capabilities/runtime/errors.js";
|
|
7
5
|
import { defineAtomicCapability, defineReadCapability } from "../capabilities/runtime/dispatcher.js";
|
|
6
|
+
import { AgentCatalogRepository, init_repository } from "./repository.js";
|
|
7
|
+
import { init_agent_scope, resolveAgentWorkspaceDir } from "../agent/agent-scope.js";
|
|
8
8
|
import { AgentCatalogService } from "./service.js";
|
|
9
9
|
import { z } from "zod";
|
|
10
10
|
//#region src/agent-catalog/capabilities.ts
|
|
@@ -95,6 +95,7 @@ function resolveEffectiveAgentConfig(params) {
|
|
|
95
95
|
const workspace = agent.workspace ?? params.defaultWorkspace?.(agent.id) ?? `~/.xopc/workspace/${agent.id}`;
|
|
96
96
|
sources.workspace = agent.workspace ? "agent" : "system";
|
|
97
97
|
if (agent.profile) markObjectSources(agent.profile, "agent", "profile", sources);
|
|
98
|
+
if (agent.toolAllowlist) sources.toolAllowlist = "agent";
|
|
98
99
|
return {
|
|
99
100
|
config: EffectiveAgentConfigSchema.parse({
|
|
100
101
|
id: agent.id,
|
|
@@ -104,6 +105,7 @@ function resolveEffectiveAgentConfig(params) {
|
|
|
104
105
|
models,
|
|
105
106
|
skills,
|
|
106
107
|
tools,
|
|
108
|
+
...agent.toolAllowlist ? { toolAllowlist: [...agent.toolAllowlist] } : {},
|
|
107
109
|
workflows,
|
|
108
110
|
runtime
|
|
109
111
|
}),
|
|
@@ -302,6 +302,7 @@ export declare const AgentEntrySchema: z.ZodObject<{
|
|
|
302
302
|
maxCallsPerTurn: z.ZodOptional<z.ZodNumber>;
|
|
303
303
|
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
304
304
|
}, z.core.$strict>>>;
|
|
305
|
+
toolAllowlist: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
305
306
|
workflows: z.ZodOptional<z.ZodObject<{
|
|
306
307
|
default: z.ZodOptional<z.ZodString>;
|
|
307
308
|
allowed: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -389,6 +390,7 @@ export declare const EffectiveAgentConfigSchema: z.ZodObject<{
|
|
|
389
390
|
maxCallsPerTurn: z.ZodOptional<z.ZodNumber>;
|
|
390
391
|
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
391
392
|
}, z.core.$strict>>;
|
|
393
|
+
toolAllowlist: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
392
394
|
workflows: z.ZodObject<{
|
|
393
395
|
default: z.ZodOptional<z.ZodString>;
|
|
394
396
|
allowed: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -125,6 +125,7 @@ var init_schema = __esmMin((() => {
|
|
|
125
125
|
models: AgentModelsOverrideSchema.optional(),
|
|
126
126
|
skills: SkillOverrideSchema.optional(),
|
|
127
127
|
tools: ToolPoliciesSchema.optional(),
|
|
128
|
+
toolAllowlist: z.array(z.string().min(1)).optional(),
|
|
128
129
|
workflows: WorkflowPolicySchema.optional(),
|
|
129
130
|
runtime: RuntimePolicySchema.optional()
|
|
130
131
|
}).strict();
|
|
@@ -139,6 +140,7 @@ var init_schema = __esmMin((() => {
|
|
|
139
140
|
models: AgentModelsDefaultsSchema,
|
|
140
141
|
skills: SkillDefaultsSchema,
|
|
141
142
|
tools: ToolPoliciesSchema,
|
|
143
|
+
toolAllowlist: z.array(z.string().min(1)).optional(),
|
|
142
144
|
workflows: WorkflowPolicySchema,
|
|
143
145
|
runtime: RuntimePolicySchema
|
|
144
146
|
}).strict();
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
|
+
import { getAssistantMessageErrorReason, stripCodeFences } from "../providers/model-response.js";
|
|
3
4
|
import { getDefaultModelSync, init_providers, resolveModel } from "../providers/index.js";
|
|
4
5
|
import { createExtensionAwareStreamFn } from "../providers/extension-stream-bridge.js";
|
|
5
6
|
import { trackAiUsageStream } from "../usage/recorder.js";
|
|
6
7
|
import { isLocalModelBaseUrl, resolveModelCallApiKey, resolveModelCallOptions } from "../providers/model-call.js";
|
|
7
|
-
import { getAssistantMessageErrorReason, stripCodeFences } from "../providers/model-response.js";
|
|
8
8
|
import { normalizeContext } from "@earendil-works/pi-ai";
|
|
9
9
|
//#region src/ai-assist/text-assist.ts
|
|
10
10
|
init_providers();
|
|
@@ -2,9 +2,9 @@ import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
|
2
2
|
import { createLogger } from "../utils/logger/index.js";
|
|
3
3
|
import { init_logger } from "../utils/logger.js";
|
|
4
4
|
import { init_paths, resolveAgentAuthProfilesPath, resolveAuthProfilesPath, resolveCredentialsDir, resolveOAuthPath } from "../config/paths.js";
|
|
5
|
-
import { getOAuthProviderDefinition, init_registry } from "./oauth/registry.js";
|
|
6
5
|
import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
|
|
7
6
|
import { getApiKeyFromEnv, init_env_keys } from "../providers/env-keys.js";
|
|
7
|
+
import { getOAuthProviderDefinition, init_registry } from "./oauth/registry.js";
|
|
8
8
|
import { init_oauth_provider_lock, withOAuthProviderLock } from "./oauth-provider-lock.js";
|
|
9
9
|
import { dirname, join } from "path";
|
|
10
10
|
import { mkdir, readFile, readdir, rm } from "fs/promises";
|
|
@@ -3,8 +3,8 @@ import { init_paths, resolveOAuthPath } from "../config/paths.js";
|
|
|
3
3
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
4
4
|
import { dirname } from "node:path";
|
|
5
5
|
import { randomUUID } from "node:crypto";
|
|
6
|
-
import { setTimeout } from "node:timers/promises";
|
|
7
6
|
import { mkdir, open, readFile, rm, stat } from "node:fs/promises";
|
|
7
|
+
import { setTimeout } from "node:timers/promises";
|
|
8
8
|
//#region src/auth/oauth-provider-lock.ts
|
|
9
9
|
function lockPath(providerId) {
|
|
10
10
|
return `${resolveOAuthPath(providerId.toLowerCase())}.lock`;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { getDefaultAgentId, init_resolve_route } from "../routing/resolve-route.js";
|
|
3
2
|
import { init_paths, resolveAgentAuthProfilesPath, resolveAuthProfilesPath, resolveOAuthPath } from "../config/paths.js";
|
|
4
3
|
import { init_registry, isOAuthOnlyProvider } from "./oauth/registry.js";
|
|
4
|
+
import { getDefaultAgentId, init_resolve_route } from "../routing/resolve-route.js";
|
|
5
5
|
import { existsSync, readFileSync } from "node:fs";
|
|
6
6
|
//#region src/auth/sync-provider-auth.ts
|
|
7
7
|
/**
|
|
@@ -3,10 +3,10 @@ import { init_src } from "../../../packages/gateway-contract/src/index.js";
|
|
|
3
3
|
import { init_trust_policy, resolveAutomationSafetyForTrust } from "../../user-context/trust-policy.js";
|
|
4
4
|
import { getUserTrustPolicy } from "../../storage/sqlite/user-trust-repository.js";
|
|
5
5
|
import { init_sqlite } from "../../storage/sqlite/index.js";
|
|
6
|
-
import { init_agent_scope, resolveDefaultAgentId } from "../../agent/agent-scope.js";
|
|
7
6
|
import { CapabilityError } from "../../capabilities/runtime/errors.js";
|
|
8
7
|
import { ExternalEffectNotAppliedError } from "../../capabilities/runtime/external-operations.js";
|
|
9
8
|
import { defineExternalCapability, defineReadCapability } from "../../capabilities/runtime/dispatcher.js";
|
|
9
|
+
import { init_agent_scope, resolveDefaultAgentId } from "../../agent/agent-scope.js";
|
|
10
10
|
import { AutomationCreateCapabilityInputSchema } from "./write.js";
|
|
11
11
|
import { simulateAutomation } from "../draft/automation-draft-validator.js";
|
|
12
12
|
import { AutomationDraftService } from "../draft/automation-draft-service.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AutomationActionSchema, AutomationDeliveryPolicySchema, AutomationManagementSchema, AutomationReliabilitySchema, AutomationSafetyPolicySchema, AutomationScheduleSchema, AutomationSchema, AutomationStateSchema, AutomationTriggerSchema, CreateAutomationSchema, UpdateAutomationSchema } from "./validation.js";
|
|
2
|
-
import { computeNextAutomationRunAtMs, computeNextScheduleRunAtMs, timerDelayUntil } from "./schedule.js";
|
|
3
1
|
import { DEFAULT_AUTOMATION_TIMEOUT_SECONDS, DEFAULT_BROWSER_AUTOMATION_TIMEOUT_SECONDS, defaultAutomationTimeoutSeconds, resolveAutomationTimeoutSeconds } from "./defaults.js";
|
|
2
|
+
import { computeNextAutomationRunAtMs, computeNextScheduleRunAtMs, timerDelayUntil } from "./schedule.js";
|
|
3
|
+
import { AutomationActionSchema, AutomationDeliveryPolicySchema, AutomationManagementSchema, AutomationReliabilitySchema, AutomationSafetyPolicySchema, AutomationScheduleSchema, AutomationSchema, AutomationStateSchema, AutomationTriggerSchema, CreateAutomationSchema, UpdateAutomationSchema } from "./validation.js";
|
|
4
4
|
export { AutomationActionSchema, AutomationDeliveryPolicySchema, AutomationManagementSchema, AutomationReliabilitySchema, AutomationSafetyPolicySchema, AutomationScheduleSchema, AutomationSchema, AutomationStateSchema, AutomationTriggerSchema, CreateAutomationSchema, DEFAULT_AUTOMATION_TIMEOUT_SECONDS, DEFAULT_BROWSER_AUTOMATION_TIMEOUT_SECONDS, UpdateAutomationSchema, computeNextAutomationRunAtMs, computeNextScheduleRunAtMs, defaultAutomationTimeoutSeconds, resolveAutomationTimeoutSeconds, timerDelayUntil };
|
|
@@ -98,7 +98,8 @@ function ingestAutomationEvent(input, options = {}) {
|
|
|
98
98
|
deliveryCount: Number(db.prepare("SELECT count(*) AS count FROM automation_event_deliveries WHERE event_id = ?").get(existing.id)?.count ?? 0)
|
|
99
99
|
};
|
|
100
100
|
}
|
|
101
|
-
const
|
|
101
|
+
const manualTarget = event.type === "automation.manual.requested" || event.type === "automation.rerun.requested";
|
|
102
|
+
const automations = options.targetAutomationIds ? options.targetAutomationIds.map(getAutomation).filter((automation) => Boolean(automation && (automation.enabled || manualTarget))) : listAutomations().filter((automation) => automation.enabled && automation.trigger.kind === "event" && matchesEvent(automation.trigger, event));
|
|
102
103
|
const insertDelivery = db.prepare(`INSERT INTO automation_event_deliveries (
|
|
103
104
|
event_id, automation_id, status, attempts, next_attempt_at_ms, created_at_ms, updated_at_ms
|
|
104
105
|
) VALUES (?, ?, 'pending', 0, ?, ?, ?)`);
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
+
import { DEFAULT_AUTOMATION_TIMEOUT_SECONDS, DEFAULT_BROWSER_AUTOMATION_TIMEOUT_SECONDS, defaultAutomationTimeoutSeconds, resolveAutomationTimeoutSeconds } from "./domain/defaults.js";
|
|
2
|
+
import { computeNextAutomationRunAtMs, computeNextScheduleRunAtMs, timerDelayUntil } from "./domain/schedule.js";
|
|
1
3
|
import { AutomationActionSchema, AutomationDeliveryPolicySchema, AutomationManagementSchema, AutomationReliabilitySchema, AutomationSafetyPolicySchema, AutomationScheduleSchema, AutomationSchema, AutomationStateSchema, AutomationTriggerSchema, CreateAutomationSchema, UpdateAutomationSchema } from "./domain/validation.js";
|
|
4
|
+
import "./domain/index.js";
|
|
5
|
+
import { AutomationActionExecutor } from "./service/action-executor.js";
|
|
2
6
|
import { listBusinessEventDefinitions, registerBusinessEvent, validateCatalogedBusinessEvent } from "./events/event-catalog.js";
|
|
3
7
|
import { automationEventPublisher, claimAutomationEventDeliveries, claimAutomationEventsForProjection, completeAutomationEventDelivery, completeAutomationEventProjection, deferAutomationEventDelivery, expireAutomationEventProjectionLeases, failAutomationEventProjection, getAutomationEventDeliveryRunId, getAutomationEventForRun, getAutomationEventQueueMetrics, ingestAutomationEvent, listAutomationEventRecords, listAutomationEvents, markAutomationEventDeliveryQueued, reconcileAutomationEventDeliveries, releaseAutomationEventDelivery, releaseAutomationEventProjection, replayAutomationEvent, skipAutomationEventDelivery } from "./events/event-repository.js";
|
|
4
|
-
import { computeNextAutomationRunAtMs, computeNextScheduleRunAtMs, timerDelayUntil } from "./domain/schedule.js";
|
|
5
|
-
import { DEFAULT_AUTOMATION_TIMEOUT_SECONDS, DEFAULT_BROWSER_AUTOMATION_TIMEOUT_SECONDS, defaultAutomationTimeoutSeconds, resolveAutomationTimeoutSeconds } from "./domain/defaults.js";
|
|
6
|
-
import { AutomationActionExecutor } from "./service/action-executor.js";
|
|
7
8
|
import { AutomationEventDispatcher } from "./events/event-dispatcher.js";
|
|
8
9
|
import "./events/index.js";
|
|
9
10
|
import { resolveAutomationWebhookSecret } from "./webhook-secrets.js";
|
|
10
11
|
import { AutomationDeliveryRouter, getAutomationResultDeliveryMetrics, listAutomationResultDeliveries, retryAutomationResultDelivery } from "./delivery/delivery-router.js";
|
|
11
12
|
import "./delivery/index.js";
|
|
12
13
|
import { AutomationAlreadyExistsError, AutomationAlreadyRunningError, AutomationService } from "./service/automation-service.js";
|
|
13
|
-
import "./domain/index.js";
|
|
14
14
|
import "./service/index.js";
|
|
15
15
|
export { AutomationActionExecutor, AutomationActionSchema, AutomationAlreadyExistsError, AutomationAlreadyRunningError, AutomationDeliveryPolicySchema, AutomationDeliveryRouter, AutomationEventDispatcher, AutomationManagementSchema, AutomationReliabilitySchema, AutomationSafetyPolicySchema, AutomationScheduleSchema, AutomationSchema, AutomationService, AutomationStateSchema, AutomationTriggerSchema, CreateAutomationSchema, DEFAULT_AUTOMATION_TIMEOUT_SECONDS, DEFAULT_BROWSER_AUTOMATION_TIMEOUT_SECONDS, UpdateAutomationSchema, automationEventPublisher, claimAutomationEventDeliveries, claimAutomationEventsForProjection, completeAutomationEventDelivery, completeAutomationEventProjection, computeNextAutomationRunAtMs, computeNextScheduleRunAtMs, defaultAutomationTimeoutSeconds, deferAutomationEventDelivery, expireAutomationEventProjectionLeases, failAutomationEventProjection, getAutomationEventDeliveryRunId, getAutomationEventForRun, getAutomationEventQueueMetrics, getAutomationResultDeliveryMetrics, ingestAutomationEvent, listAutomationEventRecords, listAutomationEvents, listAutomationResultDeliveries, listBusinessEventDefinitions, markAutomationEventDeliveryQueued, reconcileAutomationEventDeliveries, registerBusinessEvent, releaseAutomationEventDelivery, releaseAutomationEventProjection, replayAutomationEvent, resolveAutomationTimeoutSeconds, resolveAutomationWebhookSecret, retryAutomationResultDelivery, skipAutomationEventDelivery, timerDelayUntil, validateCatalogedBusinessEvent };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
3
|
import { init_transaction, runSqliteWriteTransaction } from "../../storage/sqlite/transaction.js";
|
|
4
|
+
import { computeNextAutomationRunAtMs, timerDelayUntil } from "../domain/schedule.js";
|
|
4
5
|
import { AutomationSchema, CreateAutomationSchema, UpdateAutomationSchema } from "../domain/validation.js";
|
|
6
|
+
import { AutomationActionExecutor } from "./action-executor.js";
|
|
5
7
|
import { deleteAutomation, getAutomation, getDeletedAutomationRevision, listAutomations, saveAutomation, saveAutomations } from "../storage/automation-repository.js";
|
|
6
8
|
import { appendAutomationRunEvent, getAutomationRun, getAutomationRunRequest, listAutomationRunEvents, listAutomationRuns, listAutomationRunsForProductEvent, listUnfinishedAutomationRuns, markAllAutomationRunsRead, markAutomationRunRead, pruneAutomationHistory, saveAutomationRun, saveAutomationRunRequest, touchAutomationRunLease } from "../storage/automation-run-repository.js";
|
|
7
9
|
import "../storage/index.js";
|
|
8
10
|
import { getAutomationEventDeliveryRunId, getAutomationEventForRun, getAutomationEventQueueMetrics, ingestAutomationEvent, listAutomationEventRecords, markAutomationEventDeliveryQueued, replayAutomationEvent } from "../events/event-repository.js";
|
|
9
|
-
import { computeNextAutomationRunAtMs, timerDelayUntil } from "../domain/schedule.js";
|
|
10
|
-
import { AutomationActionExecutor } from "./action-executor.js";
|
|
11
11
|
import { AutomationEventDispatcher } from "../events/event-dispatcher.js";
|
|
12
12
|
import { AutomationDeliveryRouter, getAutomationResultDeliveryMetrics, listAutomationResultDeliveries, retryAutomationResultDelivery } from "../delivery/delivery-router.js";
|
|
13
13
|
import "../delivery/index.js";
|
|
@@ -6,8 +6,8 @@ import { basename, dirname, isAbsolute, join, relative, resolve, sep } from "nod
|
|
|
6
6
|
import { constants, createReadStream, createWriteStream } from "node:fs";
|
|
7
7
|
import { createCipheriv, createDecipheriv, createHash, randomBytes, randomUUID, scryptSync } from "node:crypto";
|
|
8
8
|
import { chmod, lstat, mkdir, mkdtemp, open, readFile, readdir, rename, rm, writeFile } from "node:fs/promises";
|
|
9
|
-
import { pipeline } from "node:stream/promises";
|
|
10
9
|
import { Transform } from "node:stream";
|
|
10
|
+
import { pipeline } from "node:stream/promises";
|
|
11
11
|
//#region src/backup/archive.ts
|
|
12
12
|
init_node_sqlite();
|
|
13
13
|
init_conversation_backup();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { requireXopcDatabase } from "../storage/sqlite/connection.js";
|
|
2
2
|
import { init_sqlite } from "../storage/sqlite/index.js";
|
|
3
3
|
import { AgentCatalogService } from "../agent-catalog/service.js";
|
|
4
|
-
import { ensureStarterAgentsInitialized } from "../agent/starter-agents.js";
|
|
5
4
|
import { cutoverLegacyAgentConfig } from "../agent-catalog/migrations/legacy-config-cutover.js";
|
|
6
5
|
import "../agent-catalog/index.js";
|
|
6
|
+
import { ensureStarterAgentsInitialized } from "../agent/starter-agents.js";
|
|
7
7
|
import { runBootstrapMigrationsSync } from "../migrations/runner.js";
|
|
8
8
|
//#region src/bootstrap/application-state.ts
|
|
9
9
|
init_sqlite();
|
|
@@ -3,9 +3,9 @@ import { browserPairingInvitationPayloadSchema, formatBrowserPairingInvitation }
|
|
|
3
3
|
import { init_src } from "../../packages/gateway-contract/src/index.js";
|
|
4
4
|
import { getGatewayIdentityPublicKeyRaw, getOrCreateGatewayIdentity, init_gateway_identity_repository } from "../storage/sqlite/gateway-identity-repository.js";
|
|
5
5
|
import { createDevicePairingSetup, init_device_pairing_repository } from "../storage/sqlite/device-pairing-repository.js";
|
|
6
|
-
import { loadConfig } from "../config/loader.js";
|
|
7
6
|
import { browserEnrollmentPublicKeyThumbprint } from "./enrollment.js";
|
|
8
7
|
import { BROWSER_EXTENSION_ID, BROWSER_NATIVE_HOST_NAME } from "./extension-identity.js";
|
|
8
|
+
import { loadConfig } from "../config/loader.js";
|
|
9
9
|
import os from "node:os";
|
|
10
10
|
//#region src/browser/native-messaging-host.ts
|
|
11
11
|
init_src();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SqliteCommitEffectError, init_transaction } from "../../storage/sqlite/transaction.js";
|
|
2
|
+
import { OperationConflictError, executeAtomicOperation } from "./atomic-operations.js";
|
|
2
3
|
import { CapabilityError } from "./errors.js";
|
|
3
4
|
import { executeExternalOperation } from "./external-operations.js";
|
|
4
|
-
import { OperationConflictError, executeAtomicOperation } from "./atomic-operations.js";
|
|
5
5
|
import { createHash } from "node:crypto";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
//#region src/capabilities/runtime/dispatcher.ts
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CapabilityError } from "./errors.js";
|
|
2
2
|
import { CapabilityDispatcher } from "./dispatcher.js";
|
|
3
|
+
import { registerAgentCapabilities } from "../../agent-catalog/capabilities.js";
|
|
3
4
|
import { registerLocalAppReadCapabilities } from "../../local-apps/capabilities/read.js";
|
|
4
5
|
import { registerNoteReadCapabilities } from "../../notes/capabilities/read.js";
|
|
5
6
|
import { registerNoteWriteCapabilities } from "../../notes/capabilities/write.js";
|
|
@@ -18,7 +19,6 @@ import { registerSceneReadCapabilities } from "../../scenes/capabilities/read.js
|
|
|
18
19
|
import { registerSceneWriteCapabilities } from "../../scenes/capabilities/write.js";
|
|
19
20
|
import { registerSettingsCapability } from "./settings.js";
|
|
20
21
|
import { registerAppContextCapability } from "./app-context.js";
|
|
21
|
-
import { registerAgentCapabilities } from "../../agent-catalog/capabilities.js";
|
|
22
22
|
//#region src/capabilities/runtime/product.ts
|
|
23
23
|
function createProductDispatcher(getNotes, taskWrites) {
|
|
24
24
|
const dispatcher = new CapabilityDispatcher();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
-
import { decodeInboundAttachmentBase64, readInboundAttachmentBuffer } from "./inbound-persist.js";
|
|
4
|
-
import { transcribe } from "../../voice/stt/transcribe-core.js";
|
|
5
3
|
import { isSTTAvailable } from "../../voice/stt/availability.js";
|
|
4
|
+
import { transcribe } from "../../voice/stt/transcribe-core.js";
|
|
6
5
|
import "../../voice/stt/index.js";
|
|
6
|
+
import { decodeInboundAttachmentBase64, readInboundAttachmentBuffer } from "./inbound-persist.js";
|
|
7
7
|
//#region src/channels/attachments/voice-stt-webchat.ts
|
|
8
8
|
init_logger();
|
|
9
9
|
const STT_MAX_BYTES = 25 * 1024 * 1024;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { parseFrontmatterBlock } from "../markdown/frontmatter.js";
|
|
2
|
-
import { getChannelPlugin, getChannelRegistryVersion, listChannelPlugins, syncChannelPluginsFromManager } from "./plugins/registry.js";
|
|
3
2
|
import { findFenceSpanAt, isSafeFenceBreak, parseFenceSpans } from "../markdown/fences.js";
|
|
4
3
|
import { chunkText } from "../markdown/chunk.js";
|
|
5
4
|
import { chunkMarkdownIR, markdownToIR, markdownToIRWithMeta } from "../markdown/ir.js";
|
|
6
|
-
import { compileAllowlist, evaluateAccess, hasBotMention, removeBotMention, resolveAllowlistMatch, resolveAllowlistMatchSimple, resolveDmPolicy, resolveGroupPolicy } from "./security.js";
|
|
7
5
|
import { renderMarkdownWithMarkers } from "../markdown/render.js";
|
|
8
6
|
import { convertMarkdownTables } from "../markdown/tables.js";
|
|
9
7
|
import { buildCodeSpanIndex, createInlineCodeState } from "../markdown/code-spans.js";
|
|
10
8
|
import "./format.js";
|
|
9
|
+
import { compileAllowlist, evaluateAccess, hasBotMention, removeBotMention, resolveAllowlistMatch, resolveAllowlistMatchSimple, resolveDmPolicy, resolveGroupPolicy } from "./security.js";
|
|
11
10
|
import { MessagePipeline, createEnvelopeTimestampHandler, createFilterCommandsHandler, createFilterEmptyHandler, createFilterSelfHandler, createPipeline, standardPreflightHandlers, standardProcessHandlers } from "./pipeline.js";
|
|
11
|
+
import { getChannelPlugin, getChannelRegistryVersion, listChannelPlugins, syncChannelPluginsFromManager } from "./plugins/registry.js";
|
|
12
12
|
import { ChannelManager, createChannelManager } from "./manager.js";
|
|
13
13
|
import { collectSetupWizardChannels } from "./setup-wizard-discovery.js";
|
|
14
14
|
export { ChannelManager, MessagePipeline, buildCodeSpanIndex, chunkMarkdownIR, chunkText, collectSetupWizardChannels, compileAllowlist, convertMarkdownTables, createChannelManager, createEnvelopeTimestampHandler, createFilterCommandsHandler, createFilterEmptyHandler, createFilterSelfHandler, createInlineCodeState, createPipeline, evaluateAccess, findFenceSpanAt, getChannelPlugin, getChannelRegistryVersion, hasBotMention, isSafeFenceBreak, listChannelPlugins, markdownToIR, markdownToIRWithMeta, parseFenceSpans, parseFrontmatterBlock, removeBotMention, renderMarkdownWithMarkers, resolveAllowlistMatch, resolveAllowlistMatchSimple, resolveDmPolicy, resolveGroupPolicy, standardPreflightHandlers, standardProcessHandlers, syncChannelPluginsFromManager };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
|
+
import "./internal-outbound.js";
|
|
3
4
|
import { mergeTtsConfigFromAppConfig } from "../voice/tts/merge-config.js";
|
|
4
5
|
import { maybeApplyTtsToPayload } from "../voice/tts/payload.js";
|
|
5
|
-
import "./internal-outbound.js";
|
|
6
6
|
import { deliverOutboundMessage } from "./outbound/deliver.js";
|
|
7
7
|
import { OutboundPersistStore } from "./outbound/persist-store.js";
|
|
8
8
|
//#region src/channels/outbound-sender.ts
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
|
-
import
|
|
2
|
+
import fsSync from "node:fs";
|
|
3
3
|
//#region src/channels/pairing/allow-from-file.ts
|
|
4
4
|
function readAllowFromFile(filePath) {
|
|
5
5
|
try {
|
|
6
|
-
if (!
|
|
6
|
+
if (!fsSync.existsSync(filePath)) return {
|
|
7
7
|
version: 1,
|
|
8
8
|
allowFrom: []
|
|
9
9
|
};
|
|
10
|
-
const raw =
|
|
10
|
+
const raw = fsSync.readFileSync(filePath, "utf-8");
|
|
11
11
|
const parsed = JSON.parse(raw);
|
|
12
12
|
if (Array.isArray(parsed.allowFrom)) return {
|
|
13
13
|
version: 1,
|
|
@@ -26,13 +26,13 @@ function appendAllowFromIdSync(filePath, userId) {
|
|
|
26
26
|
const trimmed = userId.trim();
|
|
27
27
|
if (!trimmed) return { changed: false };
|
|
28
28
|
const dir = path.dirname(filePath);
|
|
29
|
-
|
|
29
|
+
fsSync.mkdirSync(dir, { recursive: true });
|
|
30
30
|
const content = readAllowFromFile(filePath);
|
|
31
31
|
if (content.allowFrom.includes(trimmed)) return { changed: false };
|
|
32
32
|
content.allowFrom.push(trimmed);
|
|
33
|
-
|
|
33
|
+
fsSync.writeFileSync(filePath, JSON.stringify(content, null, 2), "utf-8");
|
|
34
34
|
try {
|
|
35
|
-
|
|
35
|
+
fsSync.chmodSync(filePath, 384);
|
|
36
36
|
} catch {}
|
|
37
37
|
return { changed: true };
|
|
38
38
|
}
|
|
@@ -43,13 +43,13 @@ function removeAllowFromIdSync(filePath, userId) {
|
|
|
43
43
|
const next = content.allowFrom.filter((id) => id !== trimmed);
|
|
44
44
|
if (next.length === content.allowFrom.length) return { changed: false };
|
|
45
45
|
const dir = path.dirname(filePath);
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
fsSync.mkdirSync(dir, { recursive: true });
|
|
47
|
+
fsSync.writeFileSync(filePath, JSON.stringify({
|
|
48
48
|
version: 1,
|
|
49
49
|
allowFrom: next
|
|
50
50
|
}, null, 2), "utf-8");
|
|
51
51
|
try {
|
|
52
|
-
|
|
52
|
+
fsSync.chmodSync(filePath, 384);
|
|
53
53
|
} catch {}
|
|
54
54
|
return { changed: true };
|
|
55
55
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { appendAllowFromIdSync } from "./allow-from-file.js";
|
|
2
2
|
import "./pairing-constants.js";
|
|
3
3
|
import path from "node:path";
|
|
4
|
-
import
|
|
4
|
+
import fsSync from "node:fs";
|
|
5
5
|
import crypto from "node:crypto";
|
|
6
6
|
//#region src/channels/pairing/pairing-store.ts
|
|
7
7
|
const PAIRING_CODE_LENGTH = 8;
|
|
@@ -36,11 +36,11 @@ function requestAccountId(entry) {
|
|
|
36
36
|
}
|
|
37
37
|
function readStore(filePath) {
|
|
38
38
|
try {
|
|
39
|
-
if (!
|
|
39
|
+
if (!fsSync.existsSync(filePath)) return {
|
|
40
40
|
version: 1,
|
|
41
41
|
requests: []
|
|
42
42
|
};
|
|
43
|
-
const raw =
|
|
43
|
+
const raw = fsSync.readFileSync(filePath, "utf-8");
|
|
44
44
|
const parsed = JSON.parse(raw);
|
|
45
45
|
if (parsed && Array.isArray(parsed.requests)) return {
|
|
46
46
|
version: 1,
|
|
@@ -54,10 +54,10 @@ function readStore(filePath) {
|
|
|
54
54
|
}
|
|
55
55
|
function writeStore(filePath, store) {
|
|
56
56
|
const dir = path.dirname(filePath);
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
fsSync.mkdirSync(dir, { recursive: true });
|
|
58
|
+
fsSync.writeFileSync(filePath, JSON.stringify(store, null, 2), "utf-8");
|
|
59
59
|
try {
|
|
60
|
-
|
|
60
|
+
fsSync.chmodSync(filePath, 384);
|
|
61
61
|
} catch {}
|
|
62
62
|
}
|
|
63
63
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { normalizeAgentId } from "../agent-catalog/id.js";
|
|
2
2
|
import { init_agent_scope, resolveAgentProfileDir } from "../agent/agent-scope.js";
|
|
3
|
-
import { init_agent_session_key, resolveAgentIdFromConversationId } from "../routing/agent-session-key.js";
|
|
4
3
|
import { WORKSPACE_FILES, init_paths } from "../config/paths.js";
|
|
4
|
+
import { init_agent_session_key, resolveAgentIdFromConversationId } from "../routing/agent-session-key.js";
|
|
5
5
|
import { commandRegistry } from "./registry.js";
|
|
6
6
|
import { join } from "node:path";
|
|
7
7
|
import { readFile } from "node:fs/promises";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
-
import { ConfigSchema, init_schema } from "../../config/schema.js";
|
|
4
3
|
import { init_paths, resolveConfigPath } from "../../config/paths.js";
|
|
5
|
-
import {
|
|
6
|
-
import { parseConfigValue } from "../config-value.js";
|
|
7
|
-
import { getConfigValueAtPath, parseConfigPath, setConfigValueAtPath, unsetConfigValueAtPath } from "../config-paths.js";
|
|
4
|
+
import { ConfigSchema, init_schema } from "../../config/schema.js";
|
|
8
5
|
import { loadConfig, saveConfig } from "../../config/loader.js";
|
|
9
6
|
import { resolveAllowlistMatchSimple } from "../../channels/security.js";
|
|
7
|
+
import { commandRegistry } from "../registry.js";
|
|
8
|
+
import { getConfigValueAtPath, parseConfigPath, setConfigValueAtPath, unsetConfigValueAtPath } from "../config-paths.js";
|
|
9
|
+
import { parseConfigValue } from "../config-value.js";
|
|
10
10
|
//#region src/chat-commands/builtins/config.ts
|
|
11
11
|
init_schema();
|
|
12
12
|
init_paths();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { commandRegistry } from "../registry.js";
|
|
1
2
|
import { resolveEffectiveAgentProfileForSession } from "../../config/agent-profile.js";
|
|
2
3
|
import { effectiveWorkspacePathForSession } from "../../session/session-workspace.js";
|
|
3
4
|
import { getProjectForSession } from "../../projects/workspace.js";
|
|
4
|
-
import { commandRegistry } from "../registry.js";
|
|
5
5
|
import { buildReviewDiffBundle, parseReviewTargetArgs, resolveGitRoot } from "../../review/review-git.js";
|
|
6
6
|
import { formatReviewMarkdown } from "../../review/review-types.js";
|
|
7
7
|
import { randomUUID } from "node:crypto";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { formatThinkingLevels, normalizeReasoningLevel, normalizeThinkLevel, normalizeVerboseLevel } from "../../agent/transcript/thinking-types.js";
|
|
2
1
|
import { commandRegistry } from "../registry.js";
|
|
2
|
+
import { formatThinkingLevels, normalizeReasoningLevel, normalizeThinkLevel, normalizeVerboseLevel } from "../../agent/transcript/thinking-types.js";
|
|
3
3
|
//#region src/chat-commands/builtins/thinking.ts
|
|
4
4
|
async function setSessionAgentField(store, conversationId, field, value) {
|
|
5
5
|
if (!store) return;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isTTSAvailable } from "../../voice/tts/factory.js";
|
|
2
2
|
import { appendTtsReadinessNote, formatTtsSetupHint, mergeTtsConfigFromAppConfig } from "../../voice/tts/merge-config.js";
|
|
3
|
-
import { commandRegistry } from "../registry.js";
|
|
4
3
|
import { ttsStatusTracker } from "../../voice/tts/status-tracker.js";
|
|
4
|
+
import { commandRegistry } from "../registry.js";
|
|
5
5
|
import "../../voice/tts/index.js";
|
|
6
6
|
//#region src/chat-commands/builtins/tts.ts
|
|
7
7
|
function defaultTtsVoiceForProvider(provider) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { commandRegistry } from "../registry.js";
|
|
1
2
|
import { reconcileAssertion } from "../../user-model/repository.js";
|
|
2
3
|
import "../../user-model/index.js";
|
|
3
|
-
import { commandRegistry } from "../registry.js";
|
|
4
4
|
import { createHash } from "node:crypto";
|
|
5
5
|
//#region src/chat-commands/builtins/understanding.ts
|
|
6
6
|
function parseRememberArgs(args) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { extractProfileAgentId } from "../../config/agent-profile.js";
|
|
2
|
-
import { createWorkflowCatalog } from "../../agent/workflow/catalog.js";
|
|
3
1
|
import { commandRegistry } from "../registry.js";
|
|
2
|
+
import { extractProfileAgentId } from "../../config/agent-profile.js";
|
|
4
3
|
import { bulletList, code, joinBlocks, section } from "../format-output.js";
|
|
4
|
+
import { createWorkflowCatalog } from "../../agent/workflow/catalog.js";
|
|
5
5
|
//#region src/chat-commands/builtins/workflow.ts
|
|
6
6
|
/**
|
|
7
7
|
* `/workflows` and `/workflow <subcommand>` — read-only commands for browsing
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
3
|
import { getAgentDefaultModelRef, init_schema } from "../config/schema.js";
|
|
4
|
-
import { effectiveWorkspacePathForSession } from "../session/session-workspace.js";
|
|
5
|
-
import { getProjectForSession } from "../projects/workspace.js";
|
|
6
|
-
import { getSessionDisplayName } from "./session-key.js";
|
|
7
4
|
import { saveConfig } from "../config/loader.js";
|
|
5
|
+
import { getSessionDisplayName } from "./session-key.js";
|
|
6
|
+
import { effectiveWorkspacePathForSession } from "../session/session-workspace.js";
|
|
8
7
|
import { wrapMarkdownExportAsHtml } from "../session/chat-export.js";
|
|
8
|
+
import { getProjectForSession } from "../projects/workspace.js";
|
|
9
9
|
import { join } from "path";
|
|
10
10
|
import { mkdir, writeFile } from "fs/promises";
|
|
11
11
|
//#region src/chat-commands/context.ts
|