@xopcai/xopc 0.0.352 → 0.0.353
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/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-ChlaFmiD.js → agent-avatar-dicebear-BVIuZcCP.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-defaults-settings-panel-CgNagNMG.js → agent-defaults-settings-panel-CcTnphqy.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-plugin-dialog-CDhtsMpV.js → agent-plugin-dialog-CdCzMPhC.js} +1 -1
- package/dist/gateway/static/root/assets/agents-BiNKpndr.js +66 -0
- package/dist/gateway/static/root/assets/{agents-admin-api-C_3ucZGI.js → agents-admin-api-Ck2x78jq.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-DqC-oj5_.js → app-management-settings-panel-BvGDN5J6.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-Cfhepf6U.js → appearance-settings-BhQYkuQj.js} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-C6n5r8AP.js → apps-page-BQZJuM-C.js} +1 -1
- package/dist/gateway/static/root/assets/{archive-plugin-D4EiLLyl.js → archive-plugin-BZXXJvpX.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-CMxBpT5v.js → automations-page-C7VKkDb5.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-workspace-DJ_-_kGh.js → automations-workspace-y4qcvlg8.js} +1 -1
- package/dist/gateway/static/root/assets/{binary-plugins-DQc_BlYP.js → binary-plugins-DoT3g5SP.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-C3S6gqnS.js → block-editor-sqqrCafh.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automation-inputs-D2SwaQ2F.js → browser-automation-inputs-CZOKsAaa.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automations-page-CGG1740U.js → browser-automations-page-TEeTmkGP.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-settings-page-COTo7btH.js → browser-settings-page--N4P7V0l.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-D4qdO980.js → capabilities-BOrLei_L.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-page-BsC346Ym.js → capabilities-page-F7OAv-iz.js} +2 -2
- package/dist/gateway/static/root/assets/{capabilities-settings-panel-CRL4gfk5.js → capabilities-settings-panel-CaiIo1S1.js} +1 -1
- package/dist/gateway/static/root/assets/{capability-header-actions-B_60-buR.js → capability-header-actions-CR_O9_Vr.js} +1 -1
- package/dist/gateway/static/root/assets/{channels-DNxr72oD.js → channels-Bb-8c4wl.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-terminal-dock-DfTUgrey.js → chat-terminal-dock-Q99iKyiO.js} +1 -1
- package/dist/gateway/static/root/assets/{computer-settings-page-Bk84TKyF.js → computer-settings-page-QuXZBfky.js} +1 -1
- package/dist/gateway/static/root/assets/{connector-service-page-B2pC--2X.js → connector-service-page-BIqzVqCO.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-page-Bu15_14O.js → connectors-page-CZ24DSBJ.js} +1 -1
- package/dist/gateway/static/root/assets/{date-picker-CCN30yiy.js → date-picker-Ck-FmYEL.js} +1 -1
- package/dist/gateway/static/root/assets/{dependency-picker-CV2ybJJd.js → dependency-picker-BjH8XrKb.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-DipFHe4X.js → desktop-pet-DyGxNAVW.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-Dg3RM_vY.js → desktop-pet-settings-C1rKgB-S.js} +1 -1
- package/dist/gateway/static/root/assets/{device-pairing-wizard-DUy1HymM.js → device-pairing-wizard-UrPcOU6Q.js} +1 -1
- package/dist/gateway/static/root/assets/{directory-picker-path-field-BTuFpGIK.js → directory-picker-path-field-BYxUgMZb.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-xM8vfbRZ.js → extension-debug-page-CGL0jpQA.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-Cl8zlion.js → extension-page-DPWf-tYg.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-DODk0nOi.js → extension-settings-page-DZWBY39d.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-swr-DZWFlfJr.js → gateway-config-swr-B31I6Gbq.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-realtime-HO9tL9xo.js → gateway-realtime-D6ffOiPe.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-DQuFWNjA.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-settings-BL3C7Q9w.js → gateway-settings-D5w5aYXK.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-startup-retry-Cg1nbxJR.js → gateway-startup-retry-DVol958v.js} +1 -1
- package/dist/gateway/static/root/assets/{home-page-CjJVq_Ff.js → home-page-DPQwxBGy.js} +1 -1
- package/dist/gateway/static/root/assets/{image-generation-api-DSnPfr_U.js → image-generation-api-TVgJfz9r.js} +1 -1
- package/dist/gateway/static/root/assets/{imports-page-By9oc8sD.js → imports-page-CnRWDtGz.js} +1 -1
- package/dist/gateway/static/root/assets/{index-S4z-eKe-.js → index-DU5Eb1V8.js} +20 -20
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-ixQ8_6ad.js → keyboard-shortcuts-settings-CoYdyBRh.js} +1 -1
- package/dist/gateway/static/root/assets/{local-app-workbench-page-Bnz5YOks.js → local-app-workbench-page-hjFeYlIq.js} +1 -1
- package/dist/gateway/static/root/assets/{local-apps-page-BV3NFUJQ.js → local-apps-page-CeBhXeoX.js} +1 -1
- package/dist/gateway/static/root/assets/{local-session-drafts-CuyTzbfW.js → local-session-drafts-wiq_12oN.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-qcYD05PF.js → locale-store-Y1aBayM_.js} +1 -1
- package/dist/gateway/static/root/assets/{logs-page-DVqwybaT.js → logs-page-CzpZDjkA.js} +1 -1
- package/dist/gateway/static/root/assets/{management-settings-CUoDWFg7.js → management-settings-Beu_R_Rc.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-view-BhFHoVtG.js → markdown-view-BlzX7Ze5.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-cpalRgVI.js → media-plugins-C9ya5rUH.js} +1 -1
- package/dist/gateway/static/root/assets/messages-DPw2X06D.js +3 -0
- package/dist/gateway/static/root/assets/{note-detail-panel-CxbZWvj1.js → note-detail-panel-D8bpTGwP.js} +3 -3
- package/dist/gateway/static/root/assets/{notes-page-DkEOEza6.js → notes-page-OmgXowUG.js} +1 -1
- package/dist/gateway/static/root/assets/{page-context-capture-button-CjCYNkVb.js → page-context-capture-button-BjjjuLkz.js} +1 -1
- package/dist/gateway/static/root/assets/{page-tabs-Dnzie6QW.js → page-tabs-_DiuzxyD.js} +1 -1
- package/dist/gateway/static/root/assets/{preview-open-alternatives-D1H4_Nfl.js → preview-open-alternatives-BKvUadws.js} +1 -1
- package/dist/gateway/static/root/assets/{product-open-page-BJwEshPw.js → product-open-page-DUPsiVP9.js} +1 -1
- package/dist/gateway/static/root/assets/{project-detail-page-BWC89e7l.js → project-detail-page-CWlCg2x5.js} +1 -1
- package/dist/gateway/static/root/assets/{projects-page-BYmHC91B.js → projects-page-NbVNo0tP.js} +1 -1
- package/dist/gateway/static/root/assets/{registry-api-C0j3sKT4.js → registry-api-DqDOrPQ0.js} +1 -1
- package/dist/gateway/static/root/assets/{remote-access-hub-DuVzpZ9R.js → remote-access-hub-CD8HrqGC.js} +1 -1
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-SbIgL9Ya.js → runtime-tools-settings-panel-C25xEYTK.js} +1 -1
- package/dist/gateway/static/root/assets/{scenes-page-BBl_4U1U.js → scenes-page-DbWaemwR.js} +1 -1
- package/dist/gateway/static/root/assets/{schema-form-Rj-wi9sm.js → schema-form-_3LQ4hyB.js} +1 -1
- package/dist/gateway/static/root/assets/{session-api-iR1SFNHe.js → session-api-CTN4qwiN.js} +1 -1
- package/dist/gateway/static/root/assets/{session-manager-3YOU74jt.js → session-manager-DsH1DZI_.js} +1 -1
- package/dist/gateway/static/root/assets/{sessions-page-BnipzwJ6.js → sessions-page-B7ZUdXlb.js} +1 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-CpKzZMft.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-6gOr-ype.js → settings-form-section-DS80hVSY.js} +1 -1
- package/dist/gateway/static/root/assets/settings-page-DqCJHcdG.js +1 -0
- package/dist/gateway/static/root/assets/{setup-status-panel-CR0VBBw3.js → setup-status-panel-De-kC3yJ.js} +1 -1
- package/dist/gateway/static/root/assets/{share-preview-page-CK0Bg_-o.js → share-preview-page-T-0g_rwr.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-settings-B3Ghvh3c.js → shares-settings-Dz33T3du.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-api-CoIsCPbI.js → skill-api-Cx6GGpSY.js} +1 -1
- package/dist/gateway/static/root/assets/skill-reload-api-DyJ-Duem.js +1 -0
- package/dist/gateway/static/root/assets/{skills-page-CDkm7yig.js → skills-page-B2iyN-kP.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-Cfv-jDmY.js → system-settings-panel-By3SZQR_.js} +1 -1
- package/dist/gateway/static/root/assets/{task-detail-page-eYs6qgcW.js → task-detail-page-4yHUTs4_.js} +1 -1
- package/dist/gateway/static/root/assets/{tunnel-api-CpOQaCFN.js → tunnel-api-BoH0LBkw.js} +1 -1
- package/dist/gateway/static/root/assets/{usage-page-Cye-2eKA.js → usage-page-dKU5X9zT.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-o6YLrkpO.js → use-autosave-YKCwQvqT.js} +1 -1
- package/dist/gateway/static/root/assets/{user-model-page-Bg-jeU7W.js → user-model-page-Uht32LPP.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-api-key-field-FMNwQIho.js → voice-api-key-field-DiqHIA8l.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-CylVelIb.js → voice-config-api-BM75K3mR.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-9bULjfGk.js → work-discovery-overlay-BnfD6w0k.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-VYQHBiz3.js → workflow-run-setup-panel-DSy57rBr.js} +1 -1
- package/dist/gateway/static/root/assets/{workflows-page-KnoMMEDN.js → workflows-page-Cq3vRUbc.js} +1 -1
- package/dist/gateway/static/root/index.html +14 -14
- package/dist/package.js +1 -1
- package/dist/src/agent/agent-manager.js +22 -17
- 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 +3 -3
- package/dist/src/agent/bootstrap/bootstrap-files.d.ts +0 -4
- package/dist/src/agent/bootstrap/bootstrap-files.js +3 -9
- package/dist/src/agent/bootstrap/load-bootstrap-files.js +2 -4
- 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/context/workspace-seed.d.ts +1 -7
- package/dist/src/agent/context/workspace-seed.js +4 -13
- package/dist/src/agent/context/workspace-templates/AGENTS.md +1 -1
- package/dist/src/agent/context/workspace.d.ts +1 -3
- package/dist/src/agent/context/workspace.js +3 -7
- 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/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 +1 -1
- 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/oauth/mcp-oauth-store.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/no-reply.d.ts +1 -0
- package/dist/src/agent/messaging/no-reply.js +4 -0
- package/dist/src/agent/messaging/outbound-coordinator.d.ts +0 -4
- package/dist/src/agent/messaging/outbound-coordinator.js +2 -4
- package/dist/src/agent/orchestration/agent-orchestrator.js +1 -1
- package/dist/src/agent/prompt/sections/agent-identity.d.ts +3 -0
- package/dist/src/agent/prompt/sections/agent-identity.js +13 -0
- package/dist/src/agent/prompt/sections/messaging-runtime.d.ts +0 -5
- package/dist/src/agent/prompt/sections/messaging-runtime.js +2 -16
- package/dist/src/agent/prompt/sections/project-context.d.ts +0 -3
- package/dist/src/agent/prompt/sections/project-context.js +2 -9
- package/dist/src/agent/prompt/sections/tooling.js +1 -1
- package/dist/src/agent/prompt/service-prompt-builder.d.ts +2 -0
- package/dist/src/agent/prompt/service-prompt-builder.js +5 -10
- package/dist/src/agent/prompt/subagent-context.js +1 -1
- package/dist/src/agent/prompt/system-prompt-params.d.ts +0 -4
- package/dist/src/agent/prompt/system-prompt-params.js +0 -2
- package/dist/src/agent/prompt/system-prompt.d.ts +2 -2
- package/dist/src/agent/prompt/system-prompt.js +8 -9
- 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 +19 -20
- package/dist/src/agent/session/session-inspector.js +1 -1
- package/dist/src/agent/skills/hub-lock.js +1 -1
- package/dist/src/agent/skills/index.js +1 -1
- package/dist/src/agent/skills/managed-store.js +1 -1
- package/dist/src/agent/skills/skill-manage-ops.js +1 -1
- package/dist/src/agent/source-context/index.js +2 -2
- package/dist/src/agent/starter-agents.d.ts +0 -4
- package/dist/src/agent/starter-agents.js +57 -98
- package/dist/src/agent/tasks/task-judge-service.js +4 -4
- package/dist/src/agent/tool-manuals/xopc-use.d.ts +1 -1
- package/dist/src/agent/tool-manuals/xopc-use.js +7 -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 +1 -1
- package/dist/src/agent/tools/factory.js +16 -16
- 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 +3 -3
- package/dist/src/agent/workflow/subagent-runner.js +1 -1
- package/dist/src/agent-catalog/migrations/identity-markdown-cutover.d.ts +5 -0
- package/dist/src/agent-catalog/migrations/identity-markdown-cutover.js +94 -0
- package/dist/src/agent-catalog/repository.js +7 -1
- package/dist/src/agent-catalog/service.js +2 -2
- package/dist/src/agent-config/schema.d.ts +19 -0
- package/dist/src/agent-config/schema.js +7 -4
- package/dist/src/ai-assist/text-assist.js +1 -1
- package/dist/src/auth/credentials.js +2 -2
- package/dist/src/auth/profiles/store.js +1 -1
- package/dist/src/auth/sync-provider-auth.js +1 -1
- package/dist/src/automations/domain/index.js +2 -2
- 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 +2 -0
- package/dist/src/browser/native-messaging-host.js +1 -1
- package/dist/src/browser/providers/browser-ext-install.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 +4 -7
- 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 +6 -6
- package/dist/src/cli/commands/auth.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/doctor/checks/workspace-status.js +0 -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 -34
- 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/providers.js +1 -1
- 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/templates.d.ts +1 -1
- package/dist/src/cli/templates.js +1 -23
- package/dist/src/cli/utils/gateway-client.js +1 -1
- package/dist/src/cli/utils/init-workspace-core.js +1 -1
- 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 +2 -2
- package/dist/src/config/models-json.js +1 -1
- package/dist/src/config/paths.d.ts +0 -2
- package/dist/src/config/paths.js +1 -3
- package/dist/src/config/reload.d.ts +0 -1
- package/dist/src/config/reload.js +0 -4
- package/dist/src/config/rules.js +0 -5
- package/dist/src/config/schema.d.ts +0 -45
- package/dist/src/config/schema.js +2 -23
- 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 +5 -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/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/lockfile.js +1 -1
- 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 -9
- package/dist/src/gateway/agents-admin.js +8 -33
- 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 +1 -1
- 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/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 +1 -1
- package/dist/src/gateway/hono/routes/projects.js +2 -2
- package/dist/src/gateway/hono/routes/session-command-handler.js +1 -1
- package/dist/src/gateway/hono/routes/session-input-handler.js +2 -2
- 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 +1 -1
- 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/image-generation-setup.js +1 -1
- 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 +46 -46
- package/dist/src/gateway/session-context-summary.js +2 -2
- package/dist/src/gateway/workspace-editor-path.js +2 -2
- package/dist/src/home-intelligence/generator.js +1 -1
- package/dist/src/home-intelligence/host.js +2 -2
- 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 +1 -1
- 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/providers/auth-runtime/resolve-auth.js +1 -1
- package/dist/src/providers/index.js +2 -2
- 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/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/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 +10 -10
- 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/realtime/memory-context.js +3 -3
- package/dist/src/voice/realtime/persona-context.d.ts +2 -2
- package/dist/src/voice/realtime/persona-context.js +19 -33
- package/dist/src/voice/realtime/runtime.js +3 -3
- 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 +2 -2
- package/dist/gateway/static/root/assets/agents-BLP0zRru.js +0 -70
- package/dist/gateway/static/root/assets/gateway-realtime-store-B01fiKrV.js +0 -1
- package/dist/gateway/static/root/assets/messages-vL3EpIrL.js +0 -3
- package/dist/gateway/static/root/assets/settings-advanced-gate-C7oNKVxC.js +0 -1
- package/dist/gateway/static/root/assets/settings-page-D1tVcmlR.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-DMIwfISw.js +0 -1
- package/dist/src/agent/bootstrap/filter-bootstrap-files.d.ts +0 -3
- package/dist/src/agent/bootstrap/filter-bootstrap-files.js +0 -18
- package/dist/src/agent/context/workspace-templates/HEARTBEAT.md +0 -26
- package/dist/src/agent/context/workspace-templates/IDENTITY.md +0 -30
- package/dist/src/agent/service/parse-outbound-session-key.d.ts +0 -8
- package/dist/src/agent/service/parse-outbound-session-key.js +0 -44
- package/dist/src/heartbeat/active-hours.d.ts +0 -11
- package/dist/src/heartbeat/active-hours.js +0 -40
- package/dist/src/heartbeat/content-check.d.ts +0 -4
- package/dist/src/heartbeat/content-check.js +0 -17
- package/dist/src/heartbeat/event-prompt.d.ts +0 -4
- package/dist/src/heartbeat/event-prompt.js +0 -11
- package/dist/src/heartbeat/index.d.ts +0 -5
- package/dist/src/heartbeat/index.js +0 -6
- package/dist/src/heartbeat/tokens.d.ts +0 -15
- package/dist/src/heartbeat/tokens.js +0 -25
- package/dist/src/heartbeat/wake.d.ts +0 -13
- package/dist/src/heartbeat/wake.js +0 -46
|
@@ -51,9 +51,9 @@ to a TaskRun. Never treat these three objects as interchangeable.
|
|
|
51
51
|
Commands: \`list\`, \`get\`, \`create\`, \`update\`, \`set_default\`, \`disable\`,
|
|
52
52
|
\`delete\`, and \`purge\`.
|
|
53
53
|
|
|
54
|
-
An Agent profile
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
An Agent profile stores \`name\` and optional \`description\`, \`creature\`, \`style\`, \`language\`,
|
|
55
|
+
\`emoji\`, and \`avatar\` identity fields. Use \`instructions\` for short execution rules.
|
|
56
|
+
Put personality in SOUL.md and ongoing work guidance in AGENTS.md.
|
|
57
57
|
|
|
58
58
|
\`\`\`json
|
|
59
59
|
{
|
|
@@ -63,7 +63,10 @@ fields such as \`description\`, \`language\`, \`emoji\`, or \`creature\`.
|
|
|
63
63
|
"id": "xiaomei",
|
|
64
64
|
"profile": {
|
|
65
65
|
"name": "小美",
|
|
66
|
-
"
|
|
66
|
+
"description": "帮助整理日常事项",
|
|
67
|
+
"language": "zh-CN",
|
|
68
|
+
"style": "温柔、亲切",
|
|
69
|
+
"instructions": "给出操作建议前先核对关键事实。"
|
|
67
70
|
},
|
|
68
71
|
"idempotencyKey": "create-agent-xiaomei"
|
|
69
72
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
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 { resolveGatewayEffectiveHost } from "../../config/gateway-bind.js";
|
|
4
|
-
import { resolveReverseProxyPublicUrl } from "../../gateway/public-url.js";
|
|
5
|
-
import { resolvePathUnderWorkspace } from "./tool-paths.js";
|
|
6
3
|
import { assertWorkspaceTreeReadable, checkedFilePath } from "../sandbox/fileAccess.js";
|
|
4
|
+
import { resolvePathUnderWorkspace } from "./tool-paths.js";
|
|
5
|
+
import { resolveGatewayEffectiveHost } from "../../config/gateway-bind.js";
|
|
7
6
|
import { resolveShareConfig } from "../../share/share-config.js";
|
|
8
7
|
import { mergeWithDefaults } from "../../share/site-share-config.js";
|
|
9
8
|
import { getShareStore } from "../../share/share-store.js";
|
|
10
9
|
import { getSiteShareStore } from "../../share/site-share-store.js";
|
|
11
10
|
import { resolveShareUrl, resolveSiteShareUrl } from "../../share/share-url.js";
|
|
12
11
|
import { publishHostedStaticSite } from "../../share/hosted-static-site-publish.js";
|
|
12
|
+
import { resolveReverseProxyPublicUrl } from "../../gateway/public-url.js";
|
|
13
13
|
import { audienceDefaults, decideShareKind, makeDescription, makeTitle, probeShareTarget, rememberStagedSite, stageSingleHtmlAsSite } from "../../share/share-auto.js";
|
|
14
14
|
import { scheduleThumbnail } from "../../share/share-thumbnail.js";
|
|
15
15
|
import { resolveToolLocale, shareToolErrorLine, shareToolSuccessLines } from "../../i18n/share-tool-bundle.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
-
import { renderDataBatch } from "../data-acquisition/render.js";
|
|
4
3
|
import { DataBatchSchema } from "../data-acquisition/schema.js";
|
|
5
4
|
import { acquireData } from "../data-acquisition/service.js";
|
|
5
|
+
import { renderDataBatch } from "../data-acquisition/render.js";
|
|
6
6
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
7
7
|
//#region src/agent/tools/dataBatch.ts
|
|
8
8
|
init_logger();
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { runGit } from "../../execution-environments/git.js";
|
|
2
|
-
import { LocalWorktreeManager } from "../../execution-environments/local-worktree-manager.js";
|
|
3
|
-
import { SessionEnvironmentService } from "../../execution-environments/session-environment-service.js";
|
|
4
1
|
import { readWorkspaceRevision } from "../coding/workspace-revision.js";
|
|
5
2
|
import { EXTERNAL_TOOL_NAMES } from "../external-tools/gateway-tools.js";
|
|
6
3
|
import "../external-tools/index.js";
|
|
7
4
|
import { getDelegationScope } from "../orchestration/delegation-scope.js";
|
|
8
5
|
import { createDelegateChildHandle } from "../child-agent-factory.js";
|
|
6
|
+
import { runGit } from "../../execution-environments/git.js";
|
|
7
|
+
import { LocalWorktreeManager } from "../../execution-environments/local-worktree-manager.js";
|
|
8
|
+
import { SessionEnvironmentService } from "../../execution-environments/session-environment-service.js";
|
|
9
9
|
import { DELEGATION_CAPABILITIES, DELEGATION_TOOL_CAPABILITIES, protectDelegatedTool, resolveDelegationTools } from "./delegation-policy.js";
|
|
10
10
|
import { Type } from "@sinclair/typebox";
|
|
11
11
|
//#region src/agent/tools/delegate-tool.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { resolveEffectiveAgentConfigForAgent, resolveEffectiveAgentConfigForSession } from "../../config/agent-profile.js";
|
|
2
|
-
import { mcpToolPolicyId } from "../mcp/bundle-mcp-policy.js";
|
|
3
2
|
import { parseExternalToolRef } from "../external-tools/refs.js";
|
|
3
|
+
import { mcpToolPolicyId } from "../mcp/bundle-mcp-policy.js";
|
|
4
4
|
import { createAgentTurnPolicy } from "../orchestration/agent-turn-policy.js";
|
|
5
5
|
//#region src/agent/tools/delegation-parent-policy.ts
|
|
6
6
|
/** Noninteractive callers cannot silently turn an ask policy into an allow. */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
-
import { withRetry } from "../../infra/retry.js";
|
|
4
3
|
import { commandTimeout } from "../commands/command-registry.js";
|
|
5
4
|
import { DEFAULT_TOOL_EXECUTION_TIMEOUT_MS, TimeoutError, executeWithTimeout } from "../lifecycle/timeout-wrapper.js";
|
|
5
|
+
import { withRetry } from "../../infra/retry.js";
|
|
6
6
|
import { ToolConcurrencyController, resolveToolLockMode } from "./concurrency.js";
|
|
7
7
|
//#region src/agent/tools/executor.ts
|
|
8
8
|
init_logger();
|
|
@@ -93,7 +93,7 @@ export interface CreateCoreToolsOptions {
|
|
|
93
93
|
createDelegationPolicy?: () => import('../orchestration/agent-turn-policy.js').AgentTurnPolicy;
|
|
94
94
|
/** Workspace root for file/command tools (defaults to factory workspace). */
|
|
95
95
|
workspace?: string;
|
|
96
|
-
/** Canonical `agents/<id>/profile/`: bare SOUL.md
|
|
96
|
+
/** Canonical `agents/<id>/profile/`: bare SOUL.md resolve here after the workspace. */
|
|
97
97
|
profileMarkdownRoot?: string;
|
|
98
98
|
/** Tool `name` values to omit (e.g. `exec_command`, `extensions` for extension tools). */
|
|
99
99
|
disabledTools?: Set<string>;
|
|
@@ -7,27 +7,16 @@ import { getSessionMetadata } from "../../storage/sqlite/session-read-repository
|
|
|
7
7
|
import { getSessionTaskPlan, setSessionTaskPlan } from "../../storage/sqlite/session-task-plan-repository.js";
|
|
8
8
|
import { init_sqlite } from "../../storage/sqlite/index.js";
|
|
9
9
|
import { init_agent_scope, resolveDefaultAgentId } from "../agent-scope.js";
|
|
10
|
-
import { BrowserRuntime } from "../../browser/runtime/browser-runtime.js";
|
|
11
|
-
import "../../../packages/browser-control-contract/src/index.js";
|
|
12
|
-
import { createBrowserDriver } from "../../browser/drivers/create-driver.js";
|
|
13
|
-
import { checkBrowserReadiness } from "../../browser/readiness.js";
|
|
14
|
-
import "../../browser/index.js";
|
|
15
|
-
import { mergeTtsConfigFromAppConfig } from "../../voice/tts/merge-config.js";
|
|
16
10
|
import { resolveEffectiveAgentConfigForAgent, resolveEffectiveAgentConfigForSession } from "../../config/agent-profile.js";
|
|
17
|
-
import
|
|
18
|
-
import {
|
|
19
|
-
import { buildRuntimeEnvironment } from "../../runtime-tools/environment.js";
|
|
20
|
-
import { skillEnvironmentId } from "../skills/installer.js";
|
|
11
|
+
import "../../../packages/browser-control-contract/src/index.js";
|
|
12
|
+
import { getEmbeddedExecutionRunId, getEmbeddedExecutionSession } from "../embedded/execution-context.js";
|
|
21
13
|
import { wrapToolsWithProtection } from "./executor.js";
|
|
22
14
|
import { EXTERNAL_TOOL_NAMES } from "../external-tools/gateway-tools.js";
|
|
15
|
+
import { buildRuntimeEnvironment } from "../../runtime-tools/environment.js";
|
|
23
16
|
import { createDefaultExternalToolGatewayTools } from "../external-tools/index.js";
|
|
24
|
-
import { resolveUserContextSessionAccess } from "../../user-context/access-policy.js";
|
|
25
|
-
import { getPendingTranscriptUserText } from "../inbound/attachment-pipeline.js";
|
|
26
|
-
import { createDataBatchTool } from "./dataBatch.js";
|
|
27
|
-
import { getEmbeddedExecutionRunId, getEmbeddedExecutionSession } from "../embedded/execution-context.js";
|
|
28
|
-
import { createDelegateTool } from "./delegate-tool.js";
|
|
29
|
-
import { createDelegationParentPolicy } from "./delegation-parent-policy.js";
|
|
30
17
|
import { createReadFileTool } from "./read.js";
|
|
18
|
+
import { createDataBatchTool } from "./dataBatch.js";
|
|
19
|
+
import { skillEnvironmentId } from "../skills/installer.js";
|
|
31
20
|
import { createWriteFileTool } from "./write.js";
|
|
32
21
|
import { createListDirTool } from "./list-dir.js";
|
|
33
22
|
import { createPublishArtifactsTool } from "./publish-artifacts.js";
|
|
@@ -50,7 +39,14 @@ import { createUpdatePlanTool } from "./update-plan-tool.js";
|
|
|
50
39
|
import { createSessionStatusTool } from "./session-status-tool.js";
|
|
51
40
|
import { createMemoryMaintenanceTool } from "./memory-maintenance-tool.js";
|
|
52
41
|
import { createClarifyTool } from "./clarify-tool.js";
|
|
42
|
+
import { BrowserRuntime } from "../../browser/runtime/browser-runtime.js";
|
|
43
|
+
import { createBrowserDriver } from "../../browser/drivers/create-driver.js";
|
|
44
|
+
import { checkBrowserReadiness } from "../../browser/readiness.js";
|
|
45
|
+
import "../../browser/index.js";
|
|
46
|
+
import { getPendingTranscriptUserText } from "../inbound/attachment-pipeline.js";
|
|
47
|
+
import { createDelegateTool } from "./delegate-tool.js";
|
|
53
48
|
import { createWorkflowTool } from "./workflow-tool.js";
|
|
49
|
+
import { createWorkflowCatalog } from "../workflow/catalog.js";
|
|
54
50
|
import { createWorkflowManageTool } from "./workflow-manage-tool.js";
|
|
55
51
|
import { createAutomationTool } from "./automation-tool.js";
|
|
56
52
|
import { createBrowserAutomationTool } from "./browser-automation-tool.js";
|
|
@@ -65,10 +61,14 @@ import { createManagedJobTool } from "./managed-job-tool.js";
|
|
|
65
61
|
import { createImageTool } from "./image-tool.js";
|
|
66
62
|
import { createImageGenerateTool } from "./image-generate-tool.js";
|
|
67
63
|
import "./index.js";
|
|
64
|
+
import { resolveUserContextSessionAccess } from "../../user-context/access-policy.js";
|
|
68
65
|
import { createBrowserUseTool } from "./browser/tool/browser-use-tool.js";
|
|
66
|
+
import { ComputerRuntime } from "../../computer/runtime.js";
|
|
69
67
|
import { createComputerUseTool } from "./computer-use-tool.js";
|
|
70
68
|
import { createReviewWorkspaceTool } from "./review-workspace.js";
|
|
71
69
|
import { createLanguageDiagnosticsTool } from "./language-diagnostics.js";
|
|
70
|
+
import { createDelegationParentPolicy } from "./delegation-parent-policy.js";
|
|
71
|
+
import { mergeTtsConfigFromAppConfig } from "../../voice/tts/merge-config.js";
|
|
72
72
|
import { createTextToSpeechTool } from "./tts-tool.js";
|
|
73
73
|
import { getAgentCapabilityToolNames } from "../capabilities/registry.js";
|
|
74
74
|
import "../capabilities/index.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { checkUrlSafety, checkWebsiteBlocklist } from "./url-safety.js";
|
|
2
|
-
import { lookup } from "node:dns";
|
|
3
2
|
import { Agent, fetch } from "undici";
|
|
3
|
+
import { lookup } from "node:dns";
|
|
4
4
|
//#region src/agent/tools/fetch-text.ts
|
|
5
5
|
/** Validate each redirect and the address actually used for the connection. */
|
|
6
6
|
async function fetchPublicText(input, blocklist, signal) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { getAgentDefaultImageGenerationModelConfig, init_schema } from "../../config/schema.js";
|
|
2
|
+
import { readWorkspaceFile, writeWorkspaceFile } from "../sandbox/fileAccess.js";
|
|
2
3
|
import { imageAssetFromDataUrl, imageFileExtensionForMimeType, mimeTypeFromFileName, parseImageDataUrl, sniffImageMimeType } from "../image/generation/image-assets.js";
|
|
3
|
-
import {
|
|
4
|
+
import { persistToolMedia } from "./tool-media.js";
|
|
4
5
|
import { buildCapabilityPlansForConfig } from "../../capabilities/readiness/from-config.js";
|
|
5
6
|
import "../../capabilities/readiness/index.js";
|
|
6
7
|
import { applyImageGenerationModelConfigDefaults } from "../image/image-helpers.js";
|
|
7
|
-
import { readWorkspaceFile, writeWorkspaceFile } from "../sandbox/fileAccess.js";
|
|
8
|
-
import { persistToolMedia } from "./tool-media.js";
|
|
9
8
|
import { isFailoverError } from "../failover-error.js";
|
|
9
|
+
import { getImageGenerationProvider } from "../image/generation/provider-registry.js";
|
|
10
10
|
import { generateImage, listImageGenerationProvidersSummary } from "../image/generation/runtime.js";
|
|
11
11
|
import path from "node:path";
|
|
12
12
|
import { randomBytes } from "node:crypto";
|
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
import { assertBrowserUrlAllowed } from "../../browser/url-policy.js";
|
|
2
|
-
import { BrowserRuntime } from "../../browser/runtime/browser-runtime.js";
|
|
3
|
-
import "../../browser/index.js";
|
|
4
1
|
import { DEFAULT_TOOL_METADATA, getToolMetadata } from "./metadata.js";
|
|
5
2
|
import { ToolConcurrencyController, resolveToolLockMode } from "./concurrency.js";
|
|
6
|
-
import { resolveImageModelConfigForTool } from "../image/tool-model-config.js";
|
|
7
|
-
import { createDataBatchTool } from "./dataBatch.js";
|
|
8
|
-
import { DEFAULT_DELEGATE_TOOLS, DELEGATE_BLOCKED_TOOLS, createDelegateTool } from "./delegate-tool.js";
|
|
9
3
|
import { DEFAULT_MAX_BYTES, DEFAULT_MAX_LINES, GREP_MAX_LINE_LENGTH, formatSize, truncateHead, truncateLine, truncateTail } from "./truncate.js";
|
|
10
4
|
import { createReadFileTool } from "./read.js";
|
|
5
|
+
import { createDataBatchTool } from "./dataBatch.js";
|
|
11
6
|
import { createWriteFileTool, writeFileTool } from "./write.js";
|
|
12
7
|
import { createListDirTool, listDirTool } from "./list-dir.js";
|
|
13
8
|
import { createPublishArtifactsTool } from "./publish-artifacts.js";
|
|
@@ -31,6 +26,11 @@ import { createUpdatePlanTool } from "./update-plan-tool.js";
|
|
|
31
26
|
import { createSessionStatusTool } from "./session-status-tool.js";
|
|
32
27
|
import { createMemoryMaintenanceTool } from "./memory-maintenance-tool.js";
|
|
33
28
|
import { createClarifyTool } from "./clarify-tool.js";
|
|
29
|
+
import { assertBrowserUrlAllowed } from "../../browser/url-policy.js";
|
|
30
|
+
import { BrowserRuntime } from "../../browser/runtime/browser-runtime.js";
|
|
31
|
+
import "../../browser/index.js";
|
|
32
|
+
import { resolveImageModelConfigForTool } from "../image/tool-model-config.js";
|
|
33
|
+
import { DEFAULT_DELEGATE_TOOLS, DELEGATE_BLOCKED_TOOLS, createDelegateTool } from "./delegate-tool.js";
|
|
34
34
|
import { createWorkflowTool } from "./workflow-tool.js";
|
|
35
35
|
import { createWorkflowManageTool } from "./workflow-manage-tool.js";
|
|
36
36
|
import { createAutomationTool } from "./automation-tool.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { resolvePathUnderWorkspace } from "./tool-paths.js";
|
|
2
1
|
import { checkedFilePath } from "../sandbox/fileAccess.js";
|
|
2
|
+
import { resolvePathUnderWorkspace } from "./tool-paths.js";
|
|
3
3
|
import { readdir } from "fs/promises";
|
|
4
4
|
import { Type } from "@sinclair/typebox";
|
|
5
5
|
//#region src/agent/tools/list-dir.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { turnOutcomeKindFromFileName, turnOutcomeMimeTypeFromFileName } from "../../../packages/gateway-contract/src/turn-outcome.js";
|
|
2
2
|
import { init_src } from "../../../packages/gateway-contract/src/index.js";
|
|
3
|
-
import { fileResourceId, fileSpaceId } from "../../files/file-service.js";
|
|
4
|
-
import { resolvePathUnderWorkspace } from "./tool-paths.js";
|
|
5
3
|
import { evaluateFilePolicy } from "../sandbox/exec-policy.js";
|
|
6
4
|
import { readWorkspaceFile } from "../sandbox/fileAccess.js";
|
|
5
|
+
import { resolvePathUnderWorkspace } from "./tool-paths.js";
|
|
6
|
+
import { fileResourceId, fileSpaceId } from "../../files/file-service.js";
|
|
7
7
|
import { persistToolMedia } from "./tool-media.js";
|
|
8
8
|
import { basename, isAbsolute, relative, sep } from "node:path";
|
|
9
9
|
import { realpath } from "node:fs/promises";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { isBareProfileMarkdownFileName, resolvePathUnderWorkspace, resolveProfileMarkdownPathIfBareName } from "./tool-paths.js";
|
|
2
1
|
import { checkedFilePath, readWorkspaceFileAsync } from "../sandbox/fileAccess.js";
|
|
3
|
-
import { checkFileSafety } from "../prompt/safety.js";
|
|
4
2
|
import { dataScheduler } from "../data-acquisition/scheduler.js";
|
|
3
|
+
import { checkFileSafety } from "../prompt/safety.js";
|
|
5
4
|
import { DEFAULT_MAX_BYTES, formatSize, truncateHead } from "./truncate.js";
|
|
5
|
+
import { isBareProfileMarkdownFileName, resolvePathUnderWorkspace, resolveProfileMarkdownPathIfBareName } from "./tool-paths.js";
|
|
6
6
|
import { stat } from "fs/promises";
|
|
7
7
|
import { Type } from "@sinclair/typebox";
|
|
8
8
|
//#region src/agent/tools/read.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { prepareSafeToolEnv } from "../sandbox/sanitize-env-vars.js";
|
|
2
1
|
import { readWorkspaceRevision } from "../coding/workspace-revision.js";
|
|
2
|
+
import { prepareSafeToolEnv } from "../sandbox/sanitize-env-vars.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 { resolvePathUnderWorkspace } from "./tool-paths.js";
|
|
4
|
-
import { MEDIA_MAX_BYTES } from "../../media/store.js";
|
|
5
3
|
import { readWorkspaceFile } from "../sandbox/fileAccess.js";
|
|
6
4
|
import { checkFileSafety } from "../prompt/safety.js";
|
|
5
|
+
import { resolvePathUnderWorkspace } from "./tool-paths.js";
|
|
6
|
+
import { MEDIA_MAX_BYTES } from "../../media/store.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 { createSkillConfigManager, isSkillEnabled, resolveSkillConfig } from "../skills/config.js";
|
|
4
3
|
import { DEFAULT_MAX_BYTES, formatSize, truncateHead } from "./truncate.js";
|
|
4
|
+
import { createSkillConfigManager, isSkillEnabled, resolveSkillConfig } from "../skills/config.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";
|
|
3
4
|
import { mergeTtsConfigFromAppConfig } from "../../voice/tts/merge-config.js";
|
|
4
5
|
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";
|
|
1
2
|
import { deleteUserAssertion, getAssertionSlot, getUserAssertion, listUserAssertionSources, listUserAssertions, reconcileAssertion, setAssertionStatus } from "../../user-model/repository.js";
|
|
2
3
|
import { canUseAssertion } from "../../user-model/usage-policy.js";
|
|
3
4
|
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";
|
|
5
3
|
import { writeWorkspaceFile } from "../sandbox/fileAccess.js";
|
|
6
4
|
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";
|
|
@@ -13,19 +13,19 @@ import "../../activity/index.js";
|
|
|
13
13
|
import { CapabilityError } from "../../capabilities/runtime/errors.js";
|
|
14
14
|
import "../../capabilities/runtime/dispatcher.js";
|
|
15
15
|
import { getDefaultAgentId, init_resolve_route } from "../../routing/resolve-route.js";
|
|
16
|
-
import { TaskCollaborationRepository } from "../../tasks/task-collaboration-repository.js";
|
|
17
16
|
import { TaskConversationRepository } from "../../tasks/task-conversation-repository.js";
|
|
18
|
-
import { TaskApplicationService } from "../../tasks/task-application-service.js";
|
|
19
17
|
import { resolveProjectAgentId } from "../../projects/project-agent.js";
|
|
20
18
|
import "../../projects/index.js";
|
|
21
|
-
import { TaskOriginRepository } from "../../tasks/task-origin-repository.js";
|
|
22
19
|
import { TaskDeletionService } from "../../tasks/task-deletion-service.js";
|
|
23
20
|
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";
|
|
24
23
|
import { AutomationCreateCapabilityInputSchema, AutomationUpdatePatchSchema } from "../../automations/capabilities/write.js";
|
|
25
24
|
import { TaskMutationOutputSchema } from "../../tasks/capabilities/write.js";
|
|
26
25
|
import { createProductDispatcher } from "../../capabilities/runtime/product.js";
|
|
27
26
|
import { localAppCapabilities } from "../../local-apps/capabilities/runtime.js";
|
|
28
27
|
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";
|
|
5
4
|
import { createDelegateChildHandle } from "../child-agent-factory.js";
|
|
6
5
|
import { DELEGATION_TOOL_CAPABILITIES, protectDelegatedTool, resolveDelegationTools } from "../tools/delegation-policy.js";
|
|
7
6
|
import { DELEGATE_BLOCKED_TOOLS } from "../tools/delegate-tool.js";
|
|
8
7
|
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");
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { AgentProfile } from '../../agent-config/index.js';
|
|
2
|
+
/** Parse only known identity fields. The original document is archived after migration. */
|
|
3
|
+
export declare function parseIdentityFieldsForCutover(content: string): Partial<AgentProfile>;
|
|
4
|
+
/** One-time upgrade. Runtime never reads the retired identity document. */
|
|
5
|
+
export declare function migrateIdentityMarkdownToCatalog(): void;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { getXopcDatabase } from "../../storage/sqlite/connection.js";
|
|
2
|
+
import { init_sqlite } from "../../storage/sqlite/index.js";
|
|
3
|
+
import { AgentCatalogRepository, init_repository } from "../repository.js";
|
|
4
|
+
import { init_agent_scope, resolveAgentProfileDir } from "../../agent/agent-scope.js";
|
|
5
|
+
import { join } from "node:path";
|
|
6
|
+
import { existsSync, readFileSync, renameSync } from "node:fs";
|
|
7
|
+
//#region src/agent-catalog/migrations/identity-markdown-cutover.ts
|
|
8
|
+
init_agent_scope();
|
|
9
|
+
init_sqlite();
|
|
10
|
+
init_repository();
|
|
11
|
+
const MIGRATION_ID = "agent-identity-structured-v1";
|
|
12
|
+
const FIELDS = {
|
|
13
|
+
name: "name",
|
|
14
|
+
名称: "name",
|
|
15
|
+
description: "description",
|
|
16
|
+
简介: "description",
|
|
17
|
+
一句话介绍: "description",
|
|
18
|
+
职责: "description",
|
|
19
|
+
creature: "creature",
|
|
20
|
+
type: "creature",
|
|
21
|
+
role: "creature",
|
|
22
|
+
类型: "creature",
|
|
23
|
+
角色: "creature",
|
|
24
|
+
vibe: "style",
|
|
25
|
+
style: "style",
|
|
26
|
+
风格: "style",
|
|
27
|
+
表达风格: "style",
|
|
28
|
+
language: "language",
|
|
29
|
+
语言: "language",
|
|
30
|
+
主要语言: "language",
|
|
31
|
+
emoji: "emoji",
|
|
32
|
+
签名表情: "emoji",
|
|
33
|
+
表情: "emoji",
|
|
34
|
+
avatar: "avatar",
|
|
35
|
+
头像: "avatar",
|
|
36
|
+
头像地址: "avatar"
|
|
37
|
+
};
|
|
38
|
+
/** Parse only known identity fields. The original document is archived after migration. */
|
|
39
|
+
function parseIdentityFieldsForCutover(content) {
|
|
40
|
+
const fields = {};
|
|
41
|
+
for (const line of content.split(/\r?\n/)) {
|
|
42
|
+
const match = /^\s*[-*]\s+\*\*([^*::]+?)(?:[::]\*\*|\*\*[::])\s*(.*)$/.exec(line);
|
|
43
|
+
if (!match) continue;
|
|
44
|
+
const key = FIELDS[match[1].trim().toLowerCase()];
|
|
45
|
+
const value = match[2].trim();
|
|
46
|
+
if (key && value && !/^_\(.*\)_$/.test(value)) fields[key] = value;
|
|
47
|
+
}
|
|
48
|
+
return fields;
|
|
49
|
+
}
|
|
50
|
+
/** One-time upgrade. Runtime never reads the retired identity document. */
|
|
51
|
+
function migrateIdentityMarkdownToCatalog() {
|
|
52
|
+
const database = getXopcDatabase().db;
|
|
53
|
+
if (database.prepare("SELECT state FROM application_migrations WHERE id = ?").get(MIGRATION_ID)?.state === "completed") return;
|
|
54
|
+
const repository = new AgentCatalogRepository();
|
|
55
|
+
const migratedPaths = [];
|
|
56
|
+
for (const agent of repository.list()) {
|
|
57
|
+
const source = join(resolveAgentProfileDir(agent.id), "IDENTITY.md");
|
|
58
|
+
if (!existsSync(source)) continue;
|
|
59
|
+
const fields = parseIdentityFieldsForCutover(readFileSync(source, "utf8"));
|
|
60
|
+
const current = agent.profile;
|
|
61
|
+
const profile = {
|
|
62
|
+
name: current?.name || fields.name || agent.id,
|
|
63
|
+
...Object.fromEntries([
|
|
64
|
+
"description",
|
|
65
|
+
"creature",
|
|
66
|
+
"style",
|
|
67
|
+
"language",
|
|
68
|
+
"emoji",
|
|
69
|
+
"avatar"
|
|
70
|
+
].filter((key) => current?.[key] || fields[key]).map((key) => [key, current?.[key] || fields[key]])),
|
|
71
|
+
...current?.instructions ? { instructions: current.instructions } : {}
|
|
72
|
+
};
|
|
73
|
+
const { revision, provisioningState: _provisioningState, provisioningError: _provisioningError, createdAt: _createdAt, updatedAt: _updatedAt, deletedAt: _deletedAt, ...entry } = agent;
|
|
74
|
+
repository.update(agent.id, revision, {
|
|
75
|
+
...entry,
|
|
76
|
+
profile
|
|
77
|
+
});
|
|
78
|
+
migratedPaths.push({
|
|
79
|
+
source,
|
|
80
|
+
backup: join(resolveAgentProfileDir(agent.id), ".identity-migration-backup")
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
for (const { source, backup } of migratedPaths) {
|
|
84
|
+
if (existsSync(backup)) throw new Error(`Identity migration backup already exists: ${backup}`);
|
|
85
|
+
renameSync(source, backup);
|
|
86
|
+
}
|
|
87
|
+
const now = Date.now();
|
|
88
|
+
database.prepare(`INSERT INTO application_migrations
|
|
89
|
+
(id, state, source_digest, source_backup_path, database_backup_path, error_json,
|
|
90
|
+
started_at, completed_at, updated_at)
|
|
91
|
+
VALUES (?, 'completed', NULL, NULL, NULL, NULL, ?, ?, ?)`).run(MIGRATION_ID, now, now, now);
|
|
92
|
+
}
|
|
93
|
+
//#endregion
|
|
94
|
+
export { migrateIdentityMarkdownToCatalog, parseIdentityFieldsForCutover };
|
|
@@ -81,7 +81,13 @@ var init_repository = __esmMin((() => {
|
|
|
81
81
|
db.prepare(`INSERT OR IGNORE INTO agents
|
|
82
82
|
(id, enabled, workspace_override, profile_json, overrides_json, provisioning_state,
|
|
83
83
|
provisioning_error, revision, created_at, updated_at, deleted_at)
|
|
84
|
-
VALUES (?, 1, NULL, ?, '{}', 'pending', NULL, 1, ?, ?, NULL)`).run(DEFAULT_AGENT_ID, JSON.stringify({
|
|
84
|
+
VALUES (?, 1, NULL, ?, '{}', 'pending', NULL, 1, ?, ?, NULL)`).run(DEFAULT_AGENT_ID, JSON.stringify({
|
|
85
|
+
name: "Smart Assistant",
|
|
86
|
+
description: "General-purpose personal assistant.",
|
|
87
|
+
creature: "assistant",
|
|
88
|
+
language: "en",
|
|
89
|
+
emoji: "✨"
|
|
90
|
+
}), now, now);
|
|
85
91
|
db.prepare(`INSERT OR IGNORE INTO agent_catalog_settings
|
|
86
92
|
(singleton_id, default_agent_id, defaults_json, revision, created_at, updated_at)
|
|
87
93
|
VALUES (1, ?, ?, 1, ?, ?)`).run(DEFAULT_AGENT_ID, JSON.stringify(AgentDefaultsSchema.parse(defaults)), now, now);
|
|
@@ -155,7 +155,7 @@ var AgentCatalogService = class {
|
|
|
155
155
|
await mkdir(workspace, { recursive: true });
|
|
156
156
|
await mkdir(resolveAgentDir(entry.id), { recursive: true });
|
|
157
157
|
await mkdir(profileDir, { recursive: true });
|
|
158
|
-
seedAgentProfileMarkdownFiles(profileDir, workspace
|
|
158
|
+
seedAgentProfileMarkdownFiles(profileDir, workspace);
|
|
159
159
|
}
|
|
160
160
|
provisionSync(entry) {
|
|
161
161
|
const workspace = workspaceForEntry(entry, this.repository.getSettings().defaultAgentId);
|
|
@@ -163,7 +163,7 @@ var AgentCatalogService = class {
|
|
|
163
163
|
mkdirSync(workspace, { recursive: true });
|
|
164
164
|
mkdirSync(resolveAgentDir(entry.id), { recursive: true });
|
|
165
165
|
mkdirSync(profileDir, { recursive: true });
|
|
166
|
-
seedAgentProfileMarkdownFiles(profileDir, workspace
|
|
166
|
+
seedAgentProfileMarkdownFiles(profileDir, workspace);
|
|
167
167
|
}
|
|
168
168
|
purgeEntryDataSync(entry, defaultAgentId) {
|
|
169
169
|
if (entry.id === "main") throw new Error("Refusing to purge the primary Agent");
|
|
@@ -243,6 +243,12 @@ export declare const AgentDefaultsSchema: z.ZodObject<{
|
|
|
243
243
|
}, z.core.$strict>;
|
|
244
244
|
export declare const AgentProfileSchema: z.ZodObject<{
|
|
245
245
|
name: z.ZodString;
|
|
246
|
+
description: z.ZodOptional<z.ZodString>;
|
|
247
|
+
creature: z.ZodOptional<z.ZodString>;
|
|
248
|
+
style: z.ZodOptional<z.ZodString>;
|
|
249
|
+
language: z.ZodOptional<z.ZodString>;
|
|
250
|
+
emoji: z.ZodOptional<z.ZodString>;
|
|
251
|
+
avatar: z.ZodOptional<z.ZodString>;
|
|
246
252
|
instructions: z.ZodOptional<z.ZodString>;
|
|
247
253
|
}, z.core.$strict>;
|
|
248
254
|
export declare const AgentEntrySchema: z.ZodObject<{
|
|
@@ -251,6 +257,12 @@ export declare const AgentEntrySchema: z.ZodObject<{
|
|
|
251
257
|
workspace: z.ZodOptional<z.ZodString>;
|
|
252
258
|
profile: z.ZodOptional<z.ZodObject<{
|
|
253
259
|
name: z.ZodString;
|
|
260
|
+
description: z.ZodOptional<z.ZodString>;
|
|
261
|
+
creature: z.ZodOptional<z.ZodString>;
|
|
262
|
+
style: z.ZodOptional<z.ZodString>;
|
|
263
|
+
language: z.ZodOptional<z.ZodString>;
|
|
264
|
+
emoji: z.ZodOptional<z.ZodString>;
|
|
265
|
+
avatar: z.ZodOptional<z.ZodString>;
|
|
254
266
|
instructions: z.ZodOptional<z.ZodString>;
|
|
255
267
|
}, z.core.$strict>>;
|
|
256
268
|
models: z.ZodOptional<z.ZodObject<{
|
|
@@ -340,6 +352,12 @@ export declare const EffectiveAgentConfigSchema: z.ZodObject<{
|
|
|
340
352
|
workspace: z.ZodString;
|
|
341
353
|
profile: z.ZodOptional<z.ZodObject<{
|
|
342
354
|
name: z.ZodString;
|
|
355
|
+
description: z.ZodOptional<z.ZodString>;
|
|
356
|
+
creature: z.ZodOptional<z.ZodString>;
|
|
357
|
+
style: z.ZodOptional<z.ZodString>;
|
|
358
|
+
language: z.ZodOptional<z.ZodString>;
|
|
359
|
+
emoji: z.ZodOptional<z.ZodString>;
|
|
360
|
+
avatar: z.ZodOptional<z.ZodString>;
|
|
343
361
|
instructions: z.ZodOptional<z.ZodString>;
|
|
344
362
|
}, z.core.$strict>>;
|
|
345
363
|
models: z.ZodObject<{
|
|
@@ -426,6 +444,7 @@ export type AgentModelsDefaults = z.infer<typeof AgentModelsDefaultsSchema>;
|
|
|
426
444
|
export type AgentModelsOverride = z.infer<typeof AgentModelsOverrideSchema>;
|
|
427
445
|
export type ModelIntent = z.infer<typeof ModelIntentSchema>;
|
|
428
446
|
export type AgentDefaults = z.infer<typeof AgentDefaultsSchema>;
|
|
447
|
+
export type AgentProfile = z.infer<typeof AgentProfileSchema>;
|
|
429
448
|
export type AgentEntry = z.infer<typeof AgentEntrySchema>;
|
|
430
449
|
export type EffectiveAgentConfig = z.infer<typeof EffectiveAgentConfigSchema>;
|
|
431
450
|
export type SkillDefaults = z.infer<typeof SkillDefaultsSchema>;
|
|
@@ -115,6 +115,12 @@ var init_schema = __esmMin((() => {
|
|
|
115
115
|
}).strict();
|
|
116
116
|
AgentProfileSchema = z.object({
|
|
117
117
|
name: z.string().trim().min(1),
|
|
118
|
+
description: z.string().trim().optional(),
|
|
119
|
+
creature: z.string().trim().optional(),
|
|
120
|
+
style: z.string().trim().optional(),
|
|
121
|
+
language: z.string().trim().optional(),
|
|
122
|
+
emoji: z.string().trim().optional(),
|
|
123
|
+
avatar: z.string().trim().optional(),
|
|
118
124
|
instructions: z.string().trim().min(1).optional()
|
|
119
125
|
}).strict();
|
|
120
126
|
AgentEntrySchema = z.object({
|
|
@@ -133,10 +139,7 @@ var init_schema = __esmMin((() => {
|
|
|
133
139
|
id: AgentIdSchema,
|
|
134
140
|
enabled: z.boolean(),
|
|
135
141
|
workspace: z.string().min(1),
|
|
136
|
-
profile:
|
|
137
|
-
name: z.string().min(1),
|
|
138
|
-
instructions: z.string().optional()
|
|
139
|
-
}).strict().optional(),
|
|
142
|
+
profile: AgentProfileSchema.optional(),
|
|
140
143
|
models: AgentModelsDefaultsSchema,
|
|
141
144
|
skills: SkillDefaultsSchema,
|
|
142
145
|
tools: ToolPoliciesSchema,
|
|
@@ -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";
|
|
4
3
|
import { getDefaultModelSync, init_providers, resolveModel } from "../providers/index.js";
|
|
5
4
|
import { createExtensionAwareStreamFn } from "../providers/extension-stream-bridge.js";
|
|
6
5
|
import { trackAiUsageStream } from "../usage/recorder.js";
|
|
7
6
|
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();
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
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
|
-
import { init_paths, resolveAgentAuthProfilesPath, resolveAuthProfilesPath, resolveCredentialsDir, resolveOAuthPath } from "../config/paths.js";
|
|
5
4
|
import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
|
|
6
|
-
import {
|
|
5
|
+
import { init_paths, resolveAgentAuthProfilesPath, resolveAuthProfilesPath, resolveCredentialsDir, resolveOAuthPath } from "../config/paths.js";
|
|
7
6
|
import { getOAuthProviderDefinition, init_registry } from "./oauth/registry.js";
|
|
7
|
+
import { getApiKeyFromEnv, init_env_keys } from "../providers/env-keys.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";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { init_paths, resolveCredentialsDir } from "../../config/paths.js";
|
|
2
1
|
import { init_write_file_atomic, writeTextAtomicSync } from "../../infra/write-file-atomic.js";
|
|
2
|
+
import { init_paths, resolveCredentialsDir } from "../../config/paths.js";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { chmodSync, existsSync, mkdirSync, readFileSync } from "node:fs";
|
|
5
5
|
//#region src/auth/profiles/store.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { getDefaultAgentId, init_resolve_route } from "../routing/resolve-route.js";
|
|
2
3
|
import { init_paths, resolveAgentAuthProfilesPath, resolveAuthProfilesPath, resolveOAuthPath } from "../config/paths.js";
|
|
3
4
|
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
|
/**
|