@xopcai/xopc 0.0.376 → 0.0.378
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/_locales/en/messages.json +1 -0
- package/dist/browser-ext/_locales/zh_CN/messages.json +1 -0
- package/dist/browser-ext/dist/sidepanel.js +36 -9
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/gateway/static/root/assets/{activity-store-CvR3rjdp.js → activity-store-Xnu0H9yx.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-B6OsxiBw.js → agent-avatar-dicebear-sKMpwYNC.js} +1 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-DLrGOiCS.js +1 -0
- package/dist/gateway/static/root/assets/agent-plugin-dialog-CxZeGEuL.js +1 -0
- package/dist/gateway/static/root/assets/agents-CUnG8q3J.js +66 -0
- package/dist/gateway/static/root/assets/{agents-admin-api-DsXvJeqd.js → agents-admin-api-DFBVz3bV.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-9JzhRHSD.js → app-management-settings-panel-CWqbEntC.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-CoyZuGAt.js → appearance-settings-QznCLnam.js} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-CcbCxZaw.js → apps-page-wbVq-6PP.js} +1 -1
- package/dist/gateway/static/root/assets/{archive-plugin-kfDRSd7K.js → archive-plugin-BclI5H7-.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-DZJKbmlm.js → automations-page-CTKIwPAS.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-BblZP4ft.js +6 -0
- package/dist/gateway/static/root/assets/{binary-plugins-d4QP_iyy.js → binary-plugins-D9FwadCs.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-DraiSml9.js → block-editor-Dqqtybdf.js} +39 -39
- package/dist/gateway/static/root/assets/{browser-automation-inputs-BAiaU9gl.js → browser-automation-inputs-FGALoJY8.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automations-page-Bo40qRor.js → browser-automations-page-hQbQFWl-.js} +2 -2
- package/dist/gateway/static/root/assets/browser-settings-page-DQvfXaeq.js +3 -0
- package/dist/gateway/static/root/assets/{capabilities-B-vsqiw2.js → capabilities-CQuaJBPv.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-DQEeiNq_.js → capabilities-ClI4hof_.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-page-CuHSjBDG.js → capabilities-page-CbPvaNJF.js} +2 -2
- package/dist/gateway/static/root/assets/capabilities-settings-panel-CjApEiV4.js +8 -0
- package/dist/gateway/static/root/assets/{capability-header-actions-CaH0L2sV.js → capability-header-actions-XMz78V4c.js} +1 -1
- package/dist/gateway/static/root/assets/channels-CJUz97Cw.js +1 -0
- package/dist/gateway/static/root/assets/{chat-terminal-dock-hZnKhClF.js → chat-terminal-dock-Dr3rujcs.js} +2 -2
- package/dist/gateway/static/root/assets/{computer-settings-page-CYEA9B-G.js → computer-settings-page-G2lMB7CR.js} +1 -1
- package/dist/gateway/static/root/assets/{connector-service-page-DXi2Bx2u.js → connector-service-page-Cne5MBuz.js} +1 -1
- package/dist/gateway/static/root/assets/connectors-page-CbxL6ENI.js +1 -0
- package/dist/gateway/static/root/assets/{date-picker-BW_xBw2L.js → date-picker-yGmnkoC5.js} +1 -1
- package/dist/gateway/static/root/assets/{dependency-picker-ByRPupfC.js → dependency-picker-CdKC_TNa.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-DTcVMPlC.js → desktop-pet-C4d305Me.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-BkMP5pdR.js → desktop-pet-settings-hCS9Mddt.js} +1 -1
- package/dist/gateway/static/root/assets/{device-pairing-wizard-5kYuK9oW.js → device-pairing-wizard-C6qeCyfO.js} +1 -1
- package/dist/gateway/static/root/assets/{directory-picker-path-field-DIYIejyX.js → directory-picker-path-field-kYdBIm8m.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-QCUvXcP2.js → extension-debug-page-odpIjn1q.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-BMeQveJ_.js → extension-page-C6Jn5baO.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-provider-CDOEBj7F.js → extension-provider-DB4M3dc8.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-D-M7P4HQ.js → extension-settings-page-Clx81lZy.js} +1 -1
- package/dist/gateway/static/root/assets/{fallback-models-5DaUVrLS.js → fallback-models-pBVU4PxA.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-swr-CWIVt5XM.js → gateway-config-swr-ArYo4YFd.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-realtime-DC8N3fNU.js → gateway-realtime-BaE0shFY.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-CHAa_VNb.js +1 -0
- package/dist/gateway/static/root/assets/gateway-settings-BcSr6MzW.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-startup-retry-pVqdX0dO.js → gateway-startup-retry-BRCCiCBH.js} +1 -1
- package/dist/gateway/static/root/assets/home-page-CKeRXki2.js +2 -0
- package/dist/gateway/static/root/assets/{image-generation-api-CX6__We2.js → image-generation-api-B5FwRmo9.js} +1 -1
- package/dist/gateway/static/root/assets/{imports-page-b0ILSTz1.js → imports-page-7s8jzc2G.js} +1 -1
- package/dist/gateway/static/root/assets/index-B3BVcMQj.js +106 -0
- package/dist/gateway/static/root/assets/index-BU0KqtLI.css +1 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-DGl7wSHG.js → keyboard-shortcuts-settings-CyFSxteg.js} +1 -1
- package/dist/gateway/static/root/assets/{local-app-workbench-page--W2QjBqz.js → local-app-workbench-page-B-hYeH8P.js} +1 -1
- package/dist/gateway/static/root/assets/{local-apps-page-8SQ85WLr.js → local-apps-page-CFt8G-ae.js} +1 -1
- package/dist/gateway/static/root/assets/{local-session-drafts-LCEmswHW.js → local-session-drafts-CLR702g5.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-UEl-U1DO.js → locale-store-CeoW7A5a.js} +1 -1
- package/dist/gateway/static/root/assets/{logs-page-BAQeHGd4.js → logs-page-BQ9AzAj9.js} +2 -2
- package/dist/gateway/static/root/assets/{management-settings-DoXDsSSN.js → management-settings-BDuuXJ5t.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-view-DUo9Tl3H.js → markdown-view-CdqdeQqI.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-8zr2wlMR.js → media-plugins-hqKbHVyi.js} +1 -1
- package/dist/gateway/static/root/assets/messages-BpEhZm54.js +3 -0
- package/dist/gateway/static/root/assets/models-hub-cache-D0yA-nf6.js +1 -0
- package/dist/gateway/static/root/assets/note-detail-panel-G_6LpTik.js +5 -0
- package/dist/gateway/static/root/assets/{notes-api-bDQOslzF.js → notes-api-B0QQSN4M.js} +1 -1
- package/dist/gateway/static/root/assets/notes-page-kBo3rUvj.js +8 -0
- package/dist/gateway/static/root/assets/{page-context-capture-button-o-i2_7Jz.js → page-context-capture-button-Dp1RoS6x.js} +1 -1
- package/dist/gateway/static/root/assets/personal-page-Bf07rfSd.js +1 -0
- package/dist/gateway/static/root/assets/{product-open-page-DWgjStlK.js → product-open-page-DZyCQVVW.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-content-BWQRI242.js → product-preview-content-CrfIfrVJ.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-C3wJ8U07.js +1 -0
- package/dist/gateway/static/root/assets/projects-page-DZ98gcjB.js +1 -0
- package/dist/gateway/static/root/assets/{registry-api-CftkuRz7.js → registry-api-Dzl61MkW.js} +1 -1
- package/dist/gateway/static/root/assets/remote-access-hub-BvhaF5Pi.js +1 -0
- package/dist/gateway/static/root/assets/runtime-tools-api-Cg9dqJon.js +5 -0
- package/dist/gateway/static/root/assets/runtime-tools-settings-panel-oEdBs0He.js +1 -0
- package/dist/gateway/static/root/assets/{scenes-page-QQ2CiTee.js → scenes-page-CVlz-PiN.js} +2 -2
- package/dist/gateway/static/root/assets/{schema-form-TbUx_9NF.js → schema-form-DIC8IlM1.js} +1 -1
- package/dist/gateway/static/root/assets/{send-session-input-D4c72mD6.js → send-session-input-C449pdoe.js} +1 -1
- package/dist/gateway/static/root/assets/{session-api-DtpzfFNw.js → session-api-CVHFZq_A.js} +1 -1
- package/dist/gateway/static/root/assets/session-manager-CKFTwYtq.js +16 -0
- package/dist/gateway/static/root/assets/sessions-page-DtB119_G.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-2ciK8mPP.js +1 -0
- package/dist/gateway/static/root/assets/{settings-page-NncRVc1e.js → settings-page-CN0_Np6E.js} +1 -1
- package/dist/gateway/static/root/assets/setup-status-panel-VtNv07PN.js +1 -0
- package/dist/gateway/static/root/assets/{share-link-dialog-DGUiTTZ3.js → share-link-dialog-C0gKFt8r.js} +1 -1
- package/dist/gateway/static/root/assets/{share-preview-page-BDl6XGKm.js → share-preview-page-DxQ6yfYv.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-api-BIx5ji2U.js → shares-api-tR66Fdly.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-settings-DVM6xJuW.js → shares-settings-C_ZOqMjz.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-api-Crld1PEV.js → skill-api-BFhU0NNu.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-reload-api-D2HAboLP.js → skill-reload-api-D_04Mpcb.js} +1 -1
- package/dist/gateway/static/root/assets/skills-page-4-d-lfhq.js +2 -0
- package/dist/gateway/static/root/assets/{system-settings-panel-DUro5X0b.js → system-settings-panel-DHhaFWty.js} +1 -1
- package/dist/gateway/static/root/assets/{task-detail-page-BYNcWubZ.js → task-detail-page-CHBEI5uz.js} +2 -2
- package/dist/gateway/static/root/assets/{task-expandable-content-BKa2YEJy.js → task-expandable-content-AGJtkFIu.js} +1 -1
- package/dist/gateway/static/root/assets/{theme-store-ByAapAD7.js → theme-store-DezB9Sal.js} +1 -1
- package/dist/gateway/static/root/assets/{tracing-settings-page-Dv-XBvpD.js → tracing-settings-page-BEHmd2wL.js} +1 -1
- package/dist/gateway/static/root/assets/{tunnel-api-C2_SEpMa.js → tunnel-api-Bbb_6pV4.js} +1 -1
- package/dist/gateway/static/root/assets/usage-page-BEiWznDq.js +1 -0
- package/dist/gateway/static/root/assets/{use-autosave-BhsYFV0o.js → use-autosave-BtTE5X_M.js} +1 -1
- package/dist/gateway/static/root/assets/{use-composer-attachments-Bv4umde0.js → use-composer-attachments-BBHrVqB7.js} +1 -1
- package/dist/gateway/static/root/assets/{use-file-preview-expanded-CBVymo3h.js → use-file-preview-expanded-CQmLEkdj.js} +2 -2
- package/dist/gateway/static/root/assets/user-model-page-B4Gwo5T7.js +2 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-DRoGFFs6.js → voice-api-key-field-tQsUdQnu.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-BwLiaw5J.js → voice-config-api-69Yqf0QM.js} +1 -1
- package/dist/gateway/static/root/assets/work-discovery-overlay-Cvf8u31v.js +1 -0
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-BYfytB9q.js → workflow-run-setup-panel-CqYp6zjF.js} +2 -2
- package/dist/gateway/static/root/assets/workflows-page-DMzGl3CE.js +6 -0
- package/dist/gateway/static/root/assets/{workspace-api-BHy2a_hm.js → workspace-api-Bu6Csrxf.js} +2 -2
- package/dist/gateway/static/root/assets/xopc-cloud-account-card-D3Cyk8pp.js +1 -0
- package/dist/gateway/static/root/index.html +27 -27
- package/dist/package.js +1 -1
- package/dist/src/agent/agent-manager.js +3 -3
- package/dist/src/agent/background-review/run-background-review.js +1 -1
- package/dist/src/agent/embedded/execution-tool-policy.d.ts +14 -0
- package/dist/src/agent/embedded/execution-tool-policy.js +41 -0
- package/dist/src/agent/embedded/run-for-session.js +6 -4
- package/dist/src/agent/embedded/run-turn.js +18 -1
- package/dist/src/agent/embedded/session-runner.d.ts +3 -0
- package/dist/src/agent/embedded/session-runner.js +29 -8
- package/dist/src/agent/embedded/types.d.ts +2 -0
- package/dist/src/agent/external-tools/endpoint-provider.js +2 -2
- package/dist/src/agent/service/process-direct-streaming.js +1 -1
- package/dist/src/agent/service.js +3 -2
- package/dist/src/agent/session/session-config-service.js +2 -4
- 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/tools/factory.js +15 -14
- package/dist/src/agent/tools/knowledge-memory-tool.js +5 -4
- package/dist/src/agent/tools/local-read-budget.d.ts +2 -0
- package/dist/src/agent/tools/local-read-budget.js +5 -0
- package/dist/src/agent/tools/media-read-tool.js +2 -1
- package/dist/src/agent/tools/personal-read-tool.js +34 -10
- package/dist/src/agent/tools/read.js +5 -2
- package/dist/src/agent/tools/session-recall-tool.d.ts +1 -0
- package/dist/src/agent/tools/session-recall-tool.js +53 -12
- package/dist/src/agent/tools/session-search-tool.js +34 -8
- package/dist/src/agent/tools/user-context-tool.js +5 -4
- package/dist/src/agent/tools/xopc-use-tool.js +2 -2
- package/dist/src/agent/workspace-runtime/registry.js +1 -1
- package/dist/src/agent-catalog/capabilities.js +2 -2
- package/dist/src/automations/capabilities/drafts.js +1 -1
- package/dist/src/automations/service/action-executor.js +1 -1
- package/dist/src/bootstrap/application-state.js +1 -1
- package/dist/src/capabilities/runtime/dispatcher.js +1 -1
- package/dist/src/capabilities/runtime/product.js +1 -1
- package/dist/src/chat-commands/agent-edit.js +1 -1
- package/dist/src/cli/bin.js +2 -2
- package/dist/src/cli/commands/agent.js +3 -3
- package/dist/src/cli/commands/agents.js +1 -1
- package/dist/src/cli/commands/auth.js +1 -1
- package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
- package/dist/src/cli/commands/extension-agent-plugin.js +1 -1
- package/dist/src/cli/commands/extension-dev.js +1 -1
- package/dist/src/cli/commands/extension-marketplace.js +1 -1
- package/dist/src/cli/commands/extension.js +1 -1
- package/dist/src/cli/commands/gateway/lifecycle.js +1 -1
- package/dist/src/cli/commands/gateway-ssh-tunnel.js +1 -1
- package/dist/src/cli/commands/import.js +1 -1
- package/dist/src/cli/commands/mcp.js +2 -2
- package/dist/src/cli/commands/models.js +3 -3
- package/dist/src/cli/commands/onboard/model.js +3 -3
- package/dist/src/cli/commands/onboard.js +2 -2
- package/dist/src/cli/commands/platform.js +1 -1
- package/dist/src/cli/commands/profile.js +1 -1
- package/dist/src/cli/commands/tunnel.js +1 -1
- package/dist/src/cli/commands/update.js +1 -1
- package/dist/src/cli/extension-cli-register.js +1 -1
- package/dist/src/cli/utils/init-workspace-core.js +1 -1
- package/dist/src/config/agent-profile.js +2 -2
- package/dist/src/config/index.js +1 -1
- package/dist/src/config/loader.js +1 -1
- package/dist/src/config/models-json.js +1 -1
- package/dist/src/config/schema.js +1 -1
- package/dist/src/extensions/agent-plugins/validation.js +1 -1
- package/dist/src/gateway/agents-admin.js +2 -2
- package/dist/src/gateway/hono/lib/config-payload.js +1 -1
- package/dist/src/gateway/hono/routes/config-patch/misc.js +2 -2
- package/dist/src/gateway/hono/routes/connectors.js +1 -1
- package/dist/src/gateway/hono/routes/context-sources.js +1 -1
- package/dist/src/gateway/hono/routes/notes.js +2 -2
- package/dist/src/gateway/hono/routes/projects.js +2 -2
- package/dist/src/gateway/hono/routes/session-input-handler.js +1 -1
- package/dist/src/gateway/hono/routes/tasks.js +1 -1
- package/dist/src/gateway/image-generation-setup.js +1 -1
- package/dist/src/gateway/lock.js +1 -1
- package/dist/src/gateway/run-loop.js +1 -1
- package/dist/src/gateway/server.js +1 -1
- package/dist/src/gateway/service/session-command-service.js +1 -1
- package/dist/src/gateway/service.js +6 -6
- package/dist/src/gateway/xopc-cloud-capability-setup.js +1 -1
- package/dist/src/home-intelligence/host.js +2 -2
- package/dist/src/local-apps/service.js +1 -1
- package/dist/src/personal-agent/policy.js +4 -4
- package/dist/src/personal-agent/proactivity/service.js +1 -1
- package/dist/src/personal-agent/prompt-context.js +3 -3
- package/dist/src/personal-agent/prompts.js +3 -0
- package/dist/src/personal-agent/service.js +3 -13
- package/dist/src/providers/model-catalog-persistence.js +1 -1
- package/dist/src/providers/prompt-cache-payload.js +19 -24
- package/dist/src/providers/prompt-cache-plan.d.ts +1 -0
- package/dist/src/providers/prompt-cache-plan.js +2 -2
- package/dist/src/routing/resolve-route.js +1 -1
- package/dist/src/routing/resolve-tui-session-key.js +1 -1
- package/dist/src/session/config-store.js +1 -2
- package/dist/src/session/store.d.ts +1 -0
- package/dist/src/storage/sqlite/migrations/246_personal_session_thinking.sql +22 -0
- package/dist/src/storage/sqlite/migrations/runner.d.ts +1 -1
- package/dist/src/storage/sqlite/migrations/runner.js +3 -3
- package/dist/src/storage/sqlite/schema.js +1 -1
- package/dist/src/storage/sqlite/transcript-repository.d.ts +1 -0
- package/dist/src/storage/sqlite/transcript-repository.js +5 -3
- package/dist/src/tasks/capabilities/read.js +2 -2
- package/dist/src/tasks/task-handoff-service.js +1 -1
- package/dist/src/tui/backends/embedded-backend.js +2 -2
- package/dist/src/voice/realtime/persona-context.js +1 -1
- package/package.json +3 -3
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-MB_QmjX-.js +0 -1
- package/dist/gateway/static/root/assets/agent-plugin-dialog-Bpcf0zhP.js +0 -1
- package/dist/gateway/static/root/assets/agents-BQ7ag_R3.js +0 -66
- package/dist/gateway/static/root/assets/automations-workspace-ChKT1JN6.js +0 -6
- package/dist/gateway/static/root/assets/browser-settings-page-Dg4S7ph5.js +0 -3
- package/dist/gateway/static/root/assets/capabilities-settings-panel-bxxADxzW.js +0 -8
- package/dist/gateway/static/root/assets/channels-Drx78hEY.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-BCWPY5hs.js +0 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-BkE2mHog.js +0 -1
- package/dist/gateway/static/root/assets/gateway-settings-DK2NzPkL.js +0 -1
- package/dist/gateway/static/root/assets/home-page-A3oTV3Vq.js +0 -2
- package/dist/gateway/static/root/assets/index-BGBkIIzM.css +0 -1
- package/dist/gateway/static/root/assets/index-Cz75qf5b.js +0 -106
- package/dist/gateway/static/root/assets/messages-Uqz0xpsK.js +0 -3
- package/dist/gateway/static/root/assets/models-hub-cache-3HOFy11k.js +0 -1
- package/dist/gateway/static/root/assets/note-detail-panel-Cg65uYJ3.js +0 -5
- package/dist/gateway/static/root/assets/notes-page-DDUlWJOk.js +0 -8
- package/dist/gateway/static/root/assets/personal-page-E9-LBR1_.js +0 -1
- package/dist/gateway/static/root/assets/project-detail-page-FjGobz6n.js +0 -1
- package/dist/gateway/static/root/assets/projects-page-CVhXJp7f.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-B2AcKWlb.js +0 -1
- package/dist/gateway/static/root/assets/runtime-tools-settings-panel-DmOfq9ay.js +0 -5
- package/dist/gateway/static/root/assets/session-manager-De46GeR0.js +0 -16
- package/dist/gateway/static/root/assets/sessions-page-CquSXQHo.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-BOHKIN4t.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-t1vcGUsK.js +0 -1
- package/dist/gateway/static/root/assets/skills-page-DdD6C_Z8.js +0 -2
- package/dist/gateway/static/root/assets/usage-page-CqMzyGiK.js +0 -1
- package/dist/gateway/static/root/assets/user-model-page-EMn_nA9w.js +0 -2
- package/dist/gateway/static/root/assets/work-discovery-overlay-DbH62mtI.js +0 -1
- package/dist/gateway/static/root/assets/workflows-page-rJqJ9dQo.js +0 -6
- package/dist/gateway/static/root/assets/xopc-cloud-account-card-DrAX_9m_.js +0 -1
- package/dist/src/personal-agent/model-config.d.ts +0 -5
- package/dist/src/personal-agent/model-config.js +0 -59
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { LOCAL_READ_MAX_CHARS } from "./local-read-budget.js";
|
|
1
2
|
import { CapabilityDispatcher } from "../../capabilities/runtime/dispatcher.js";
|
|
2
3
|
import { registerNoteReadCapabilities } from "../../notes/capabilities/read.js";
|
|
3
4
|
import { registerProjectReadCapabilities } from "../../projects/capabilities/read.js";
|
|
@@ -123,7 +124,7 @@ function createPersonalReadTool(deps) {
|
|
|
123
124
|
};
|
|
124
125
|
}
|
|
125
126
|
const serialized = JSON.stringify(payload);
|
|
126
|
-
const requiresSpecialist = input.command === "get" && (serialized.length >
|
|
127
|
+
const requiresSpecialist = input.command === "get" && (serialized.length > 8e3 || Boolean(payload.item?.truncatedFields));
|
|
127
128
|
if (requiresSpecialist) payload = {
|
|
128
129
|
...payload,
|
|
129
130
|
requiresSpecialist: true,
|
|
@@ -131,21 +132,44 @@ function createPersonalReadTool(deps) {
|
|
|
131
132
|
id: input.id,
|
|
132
133
|
guidance: "Briefly tell the user the material is large, then delegate full reading and processing using this object kind and ID."
|
|
133
134
|
};
|
|
134
|
-
|
|
135
|
+
let output = JSON.stringify(payload);
|
|
136
|
+
let complete = true;
|
|
137
|
+
while (output.length > LOCAL_READ_MAX_CHARS) {
|
|
138
|
+
if (input.command === "list") {
|
|
139
|
+
const items = payload.items;
|
|
140
|
+
if (!items.length) break;
|
|
141
|
+
items.pop();
|
|
142
|
+
payload.nextOffset = offset + items.length;
|
|
143
|
+
payload.truncated = true;
|
|
144
|
+
} else {
|
|
145
|
+
const item = payload.item;
|
|
146
|
+
const largest = Object.keys(item).filter((key) => typeof item[key] === "string" && item[key].length > 200).sort((a, b) => item[b].length - item[a].length)[0];
|
|
147
|
+
if (!largest) break;
|
|
148
|
+
item[largest] = item[largest].slice(0, Math.floor(item[largest].length / 2));
|
|
149
|
+
item.truncatedFields = [...new Set([...item.truncatedFields ?? [], largest])];
|
|
150
|
+
payload.truncated = true;
|
|
151
|
+
}
|
|
152
|
+
output = JSON.stringify(payload);
|
|
153
|
+
}
|
|
154
|
+
if (output.length > 8e3) {
|
|
155
|
+
complete = false;
|
|
156
|
+
output = JSON.stringify({
|
|
157
|
+
kind: input.kind,
|
|
158
|
+
id: input.id,
|
|
159
|
+
search: input.search,
|
|
160
|
+
requiresSpecialist: true,
|
|
161
|
+
complete: false,
|
|
162
|
+
reason: "large_object"
|
|
163
|
+
});
|
|
164
|
+
}
|
|
135
165
|
return {
|
|
136
166
|
content: [{
|
|
137
167
|
type: "text",
|
|
138
|
-
text: output
|
|
139
|
-
kind: input.kind,
|
|
140
|
-
excerpt: output.slice(0, 1e4),
|
|
141
|
-
truncated: true,
|
|
142
|
-
requiresSpecialist: true,
|
|
143
|
-
id: input.id
|
|
144
|
-
})
|
|
168
|
+
text: output
|
|
145
169
|
}],
|
|
146
170
|
details: {
|
|
147
171
|
localOnly: true,
|
|
148
|
-
requiresSpecialist: requiresSpecialist ||
|
|
172
|
+
requiresSpecialist: requiresSpecialist || !complete
|
|
149
173
|
}
|
|
150
174
|
};
|
|
151
175
|
}
|
|
@@ -92,6 +92,9 @@ async function executeReadFile(workspace, options, params, signal) {
|
|
|
92
92
|
let outputText = truncation.content;
|
|
93
93
|
if (truncation.truncated) if (truncation.firstLineExceedsLimit) outputText = `(Line exceeds ${formatSize(maxOutputBytes)})`;
|
|
94
94
|
else outputText += options?.maxReadBytes ? `\n\n[File excerpt only. Tell the user briefly and delegate full reading and processing. Path: ${normalized}]` : `\n\n[Lines ${offset}-${offset + truncation.outputLines - 1} of ${lines.length}; continue with offset=${offset + truncation.outputLines}]`;
|
|
95
|
+
const bounded = Boolean(options?.maxReadBytes && outputText.length > maxOutputBytes);
|
|
96
|
+
if (bounded) outputText = outputText.slice(0, Math.max(0, maxOutputBytes - 61)) + "\n[File excerpt only; delegate full analysis to a specialist.]";
|
|
97
|
+
const truncated = truncation.truncated || bounded;
|
|
95
98
|
return {
|
|
96
99
|
content: [{
|
|
97
100
|
type: "text",
|
|
@@ -101,8 +104,8 @@ async function executeReadFile(workspace, options, params, signal) {
|
|
|
101
104
|
path: normalized,
|
|
102
105
|
offset,
|
|
103
106
|
totalLines: lines.length,
|
|
104
|
-
truncated
|
|
105
|
-
...options?.maxReadBytes &&
|
|
107
|
+
truncated,
|
|
108
|
+
...options?.maxReadBytes && truncated ? {
|
|
106
109
|
requiresSpecialist: true,
|
|
107
110
|
reason: "large_file"
|
|
108
111
|
} : {}
|
|
@@ -3,5 +3,6 @@ import type { SessionStore } from '../../session/store.js';
|
|
|
3
3
|
export interface SessionRecallToolDeps {
|
|
4
4
|
getSessionStore: () => SessionStore;
|
|
5
5
|
getCurrentConversationId: () => string | undefined;
|
|
6
|
+
maxOutputChars?: number;
|
|
6
7
|
}
|
|
7
8
|
export declare function createSessionRecallTool(deps: SessionRecallToolDeps): AgentTool;
|
|
@@ -50,28 +50,69 @@ function createSessionRecallTool(deps) {
|
|
|
50
50
|
const query = input.query.trim();
|
|
51
51
|
const limit = Math.min(20, Math.max(1, input.limit ?? 8));
|
|
52
52
|
const maxChars = Math.min(2e4, Math.max(500, input.maxCharsPerResult ?? 6e3));
|
|
53
|
-
const
|
|
53
|
+
const matches = deps.getSessionStore().recallSession(conversationId, query, {
|
|
54
54
|
limit,
|
|
55
|
-
...input.beforeSeq ? { beforeSeq: input.beforeSeq } : {}
|
|
56
|
-
|
|
55
|
+
...input.beforeSeq ? { beforeSeq: input.beforeSeq } : {},
|
|
56
|
+
...deps.maxOutputChars ? { orderBySeq: true } : {}
|
|
57
|
+
});
|
|
58
|
+
if (deps.maxOutputChars) matches.sort((a, b) => b.seq - a.seq);
|
|
59
|
+
const results = matches.map((match) => ({
|
|
57
60
|
seq: match.seq,
|
|
58
61
|
entryId: match.entryId,
|
|
59
62
|
role: match.role,
|
|
60
63
|
createdAt: new Date(match.createdAt).toISOString(),
|
|
61
|
-
content: excerpt(match.content, query, maxChars)
|
|
64
|
+
content: excerpt(match.content, query, maxChars),
|
|
65
|
+
...deps.maxOutputChars ? { truncated: match.content.length > maxChars } : {}
|
|
62
66
|
}));
|
|
63
|
-
const
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
const payloadFor = () => {
|
|
68
|
+
const nextBeforeSeq = results.length && (results.length < matches.length || matches.length === limit) ? Math.min(...results.map((result) => result.seq)) : void 0;
|
|
69
|
+
return {
|
|
70
|
+
success: true,
|
|
71
|
+
query,
|
|
72
|
+
results,
|
|
73
|
+
count: results.length,
|
|
74
|
+
...deps.maxOutputChars ? {
|
|
75
|
+
excerpts: true,
|
|
76
|
+
truncated: results.length < matches.length || results.some((result) => result.truncated)
|
|
77
|
+
} : {},
|
|
78
|
+
...nextBeforeSeq ? { nextBeforeSeq } : {}
|
|
79
|
+
};
|
|
70
80
|
};
|
|
81
|
+
let payload = payloadFor();
|
|
82
|
+
let text = JSON.stringify(payload, null, 2);
|
|
83
|
+
if (deps.maxOutputChars) {
|
|
84
|
+
while (text.length > deps.maxOutputChars && results.length) {
|
|
85
|
+
if (results.length > 1) results.pop();
|
|
86
|
+
else if (results[0].content.length > 100) {
|
|
87
|
+
const match = matches[0];
|
|
88
|
+
results[0].content = excerpt(match.content, query, Math.floor(results[0].content.length / 2));
|
|
89
|
+
results[0].truncated = true;
|
|
90
|
+
} else break;
|
|
91
|
+
payload = payloadFor();
|
|
92
|
+
text = JSON.stringify(payload, null, 2);
|
|
93
|
+
}
|
|
94
|
+
if (text.length > deps.maxOutputChars) return {
|
|
95
|
+
content: [{
|
|
96
|
+
type: "text",
|
|
97
|
+
text: JSON.stringify({
|
|
98
|
+
query: query.slice(0, 500),
|
|
99
|
+
conversationId,
|
|
100
|
+
requiresSpecialist: true,
|
|
101
|
+
complete: false,
|
|
102
|
+
reason: "large_transcript",
|
|
103
|
+
guidance: "Delegate a complete read using the conversation ID and query."
|
|
104
|
+
})
|
|
105
|
+
}],
|
|
106
|
+
details: {
|
|
107
|
+
requiresSpecialist: true,
|
|
108
|
+
complete: false
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
}
|
|
71
112
|
return {
|
|
72
113
|
content: [{
|
|
73
114
|
type: "text",
|
|
74
|
-
text
|
|
115
|
+
text
|
|
75
116
|
}],
|
|
76
117
|
details: payload
|
|
77
118
|
};
|
|
@@ -3,6 +3,7 @@ import { init_logger } from "../../utils/logger.js";
|
|
|
3
3
|
import { init_providers, resolveModel } from "../../providers/index.js";
|
|
4
4
|
import { completeWithResolvedCredentials } from "../../providers/model-call.js";
|
|
5
5
|
import { readAgentMessageContent } from "../memory/agent-message-access.js";
|
|
6
|
+
import "./local-read-budget.js";
|
|
6
7
|
import { Type } from "@sinclair/typebox";
|
|
7
8
|
//#region src/agent/tools/session-search-tool.ts
|
|
8
9
|
init_providers();
|
|
@@ -92,7 +93,13 @@ function createSessionSearchTool(deps) {
|
|
|
92
93
|
name: "session_search",
|
|
93
94
|
label: "Session search",
|
|
94
95
|
description: deps.localOnly ? "Search other chats locally and return short matching transcript excerpts. Omit query to list recent chats. No model or network calls." : "Search other chat sessions by keywords and get short summaries, or omit `query` to list recent sessions (no LLM cost). Uses the same session store as the gateway. Narrow with roleFilter if needed.",
|
|
95
|
-
parameters:
|
|
96
|
+
parameters: deps.localOnly ? Type.Object({
|
|
97
|
+
...SessionSearchSchema.properties,
|
|
98
|
+
query: Type.Optional(Type.String({
|
|
99
|
+
maxLength: 500,
|
|
100
|
+
description: "Keywords for other chats; omit to list recent chats."
|
|
101
|
+
}))
|
|
102
|
+
}) : SessionSearchSchema,
|
|
96
103
|
supportsParallel: true,
|
|
97
104
|
idempotent: true,
|
|
98
105
|
async execute(_toolCallId, params, signal) {
|
|
@@ -104,9 +111,16 @@ function createSessionSearchTool(deps) {
|
|
|
104
111
|
details: { error: "cross_session_history_disabled" }
|
|
105
112
|
};
|
|
106
113
|
const p = params;
|
|
107
|
-
const store = deps.getSessionStore();
|
|
108
114
|
const limit = Math.min(deps.localOnly ? 5 : 15, Math.max(1, p.limit ?? (deps.localOnly ? 3 : 5)));
|
|
109
115
|
const query = p.query?.trim() ?? "";
|
|
116
|
+
if (deps.localOnly && query.length > 500) return {
|
|
117
|
+
content: [{
|
|
118
|
+
type: "text",
|
|
119
|
+
text: "Use at most 500 characters of search keywords."
|
|
120
|
+
}],
|
|
121
|
+
details: { error: "invalid_query" }
|
|
122
|
+
};
|
|
123
|
+
const store = deps.getSessionStore();
|
|
110
124
|
try {
|
|
111
125
|
if (!query) {
|
|
112
126
|
const listed = await store.list({
|
|
@@ -165,15 +179,27 @@ function createSessionSearchTool(deps) {
|
|
|
165
179
|
};
|
|
166
180
|
})
|
|
167
181
|
}));
|
|
182
|
+
const payload = {
|
|
183
|
+
success: true,
|
|
184
|
+
mode: "keyword",
|
|
185
|
+
query,
|
|
186
|
+
results,
|
|
187
|
+
truncated: false
|
|
188
|
+
};
|
|
189
|
+
while (JSON.stringify(payload).length > 8e3 && results.length) {
|
|
190
|
+
payload.truncated = true;
|
|
191
|
+
if (results.length > 1) results.pop();
|
|
192
|
+
else {
|
|
193
|
+
const longest = results[0].excerpts.toSorted((a, b) => b.content.length - a.content.length)[0];
|
|
194
|
+
if (!longest || longest.content.length <= 100) break;
|
|
195
|
+
longest.content = longest.content.slice(0, Math.floor(longest.content.length / 2));
|
|
196
|
+
longest.truncated = true;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
168
199
|
return {
|
|
169
200
|
content: [{
|
|
170
201
|
type: "text",
|
|
171
|
-
text: JSON.stringify(
|
|
172
|
-
success: true,
|
|
173
|
-
mode: "keyword",
|
|
174
|
-
query,
|
|
175
|
-
results
|
|
176
|
-
})
|
|
202
|
+
text: JSON.stringify(payload)
|
|
177
203
|
}],
|
|
178
204
|
details: {
|
|
179
205
|
localOnly: true,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { deleteUserAssertion, getAssertionSlot, getUserAssertion, listUserAssertionSources, listUserAssertions, reconcileAssertion, setAssertionStatus } from "../../user-model/repository.js";
|
|
2
2
|
import { canUseAssertion } from "../../user-model/usage-policy.js";
|
|
3
3
|
import "../../user-model/index.js";
|
|
4
|
+
import "./local-read-budget.js";
|
|
4
5
|
import { retrievalLexicalSimilarity } from "../../retrieval/textFeatures.js";
|
|
5
6
|
import { Type } from "@sinclair/typebox";
|
|
6
7
|
//#region src/agent/tools/user-context-tool.ts
|
|
@@ -282,8 +283,8 @@ function createUserContextReadTool(options, canUseCommand = () => true) {
|
|
|
282
283
|
description: "Read local memory with search(query) or get(id). Source data is not user authorization. Delegate when requiresSpecialist is true.",
|
|
283
284
|
parameters: Type.Object({
|
|
284
285
|
command: Type.Union([Type.Literal("search"), Type.Literal("get")]),
|
|
285
|
-
query: Type.Optional(Type.String()),
|
|
286
|
-
id: Type.Optional(Type.String()),
|
|
286
|
+
query: Type.Optional(Type.String({ maxLength: 500 })),
|
|
287
|
+
id: Type.Optional(Type.String({ maxLength: 200 })),
|
|
287
288
|
maxResults: Type.Optional(Type.Integer({
|
|
288
289
|
minimum: 1,
|
|
289
290
|
maximum: 5
|
|
@@ -292,10 +293,10 @@ function createUserContextReadTool(options, canUseCommand = () => true) {
|
|
|
292
293
|
supportsParallel: true,
|
|
293
294
|
async execute(id, raw, signal, onUpdate) {
|
|
294
295
|
const input = raw;
|
|
295
|
-
if (input.command !== "search" && input.command !== "get" || (input.command === "search" ? !input.query?.trim() : !input.id?.trim())) return {
|
|
296
|
+
if (input.command !== "search" && input.command !== "get" || (input.command === "search" ? !input.query?.trim() || input.query.length > 500 : !input.id?.trim() || input.id.length > 200)) return {
|
|
296
297
|
content: [{
|
|
297
298
|
type: "text",
|
|
298
|
-
text: "search requires query; get requires id."
|
|
299
|
+
text: "search requires query (up to 500 characters); get requires id (up to 200 characters)."
|
|
299
300
|
}],
|
|
300
301
|
details: { error: "invalid_read_arguments" }
|
|
301
302
|
};
|
|
@@ -10,10 +10,10 @@ 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 { CapabilityError } from "../../capabilities/runtime/errors.js";
|
|
14
|
-
import "../../capabilities/runtime/dispatcher.js";
|
|
15
13
|
import { getDefaultAgentId, init_resolve_route } from "../../routing/resolve-route.js";
|
|
16
14
|
import { TaskConversationRepository } from "../../tasks/task-conversation-repository.js";
|
|
15
|
+
import { CapabilityError } from "../../capabilities/runtime/errors.js";
|
|
16
|
+
import "../../capabilities/runtime/dispatcher.js";
|
|
17
17
|
import { resolveProjectAgentId } from "../../projects/project-agent.js";
|
|
18
18
|
import "../../projects/index.js";
|
|
19
19
|
import { TaskDeletionService } from "../../tasks/task-deletion-service.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { init_agent_scope, resolveAgentIdForWorkspacePath } from "../agent-scope.js";
|
|
2
1
|
import { init_agent_session_key, normalizeAgentId } from "../../routing/agent-session-key.js";
|
|
2
|
+
import { init_agent_scope, resolveAgentIdForWorkspacePath } from "../agent-scope.js";
|
|
3
3
|
import { SkillManager } from "../skills/skill-manager.js";
|
|
4
4
|
import { SystemPromptBuilder } from "../prompt/service-prompt-builder.js";
|
|
5
5
|
import { UserContextRuntimeRegistry } from "../../user-context/runtime.js";
|
|
@@ -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 { CapabilityError } from "../capabilities/runtime/errors.js";
|
|
5
|
-
import { defineAtomicCapability, defineReadCapability } from "../capabilities/runtime/dispatcher.js";
|
|
6
4
|
import { AgentCatalogRepository, init_repository } from "./repository.js";
|
|
7
5
|
import { init_agent_scope, resolveAgentWorkspaceDir } from "../agent/agent-scope.js";
|
|
6
|
+
import { CapabilityError } from "../capabilities/runtime/errors.js";
|
|
7
|
+
import { defineAtomicCapability, defineReadCapability } from "../capabilities/runtime/dispatcher.js";
|
|
8
8
|
import { AgentCatalogService } from "./service.js";
|
|
9
9
|
import { z } from "zod";
|
|
10
10
|
//#region src/agent-catalog/capabilities.ts
|
|
@@ -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";
|
|
6
7
|
import { CapabilityError } from "../../capabilities/runtime/errors.js";
|
|
7
8
|
import { ExternalEffectNotAppliedError } from "../../capabilities/runtime/external-operations.js";
|
|
8
9
|
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,8 +1,8 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
+
import { init_session_key, resolveConversationId } from "../../routing/session-key.js";
|
|
3
4
|
import { normalizeAgentId } from "../../agent-catalog/id.js";
|
|
4
5
|
import { init_agent_scope } from "../../agent/agent-scope.js";
|
|
5
|
-
import { init_session_key, resolveConversationId } from "../../routing/session-key.js";
|
|
6
6
|
import { resolveAutomationTimeoutSeconds } from "../domain/defaults.js";
|
|
7
7
|
//#region src/automations/service/action-executor.ts
|
|
8
8
|
init_agent_scope();
|
|
@@ -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";
|
|
4
5
|
import { cutoverLegacyAgentConfig } from "../agent-catalog/migrations/legacy-config-cutover.js";
|
|
5
6
|
import "../agent-catalog/index.js";
|
|
6
|
-
import { ensureStarterAgentsInitialized } from "../agent/starter-agents.js";
|
|
7
7
|
import { migrateIdentityMarkdownToCatalog } from "../agent-catalog/migrations/identity-markdown-cutover.js";
|
|
8
8
|
import { migrateCloudPublicModelsSync } from "../migrations/cloud-public-models.js";
|
|
9
9
|
import { runBootstrapMigrationsSync } from "../migrations/runner.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SqliteCommitEffectError, init_transaction } from "../../storage/sqlite/transaction.js";
|
|
2
|
-
import { OperationConflictError, executeAtomicOperation } from "./atomic-operations.js";
|
|
3
2
|
import { CapabilityError } from "./errors.js";
|
|
4
3
|
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,6 +1,5 @@
|
|
|
1
1
|
import { CapabilityError } from "./errors.js";
|
|
2
2
|
import { CapabilityDispatcher } from "./dispatcher.js";
|
|
3
|
-
import { registerAgentCapabilities } from "../../agent-catalog/capabilities.js";
|
|
4
3
|
import { registerLocalAppReadCapabilities } from "../../local-apps/capabilities/read.js";
|
|
5
4
|
import { registerNoteReadCapabilities } from "../../notes/capabilities/read.js";
|
|
6
5
|
import { registerNoteWriteCapabilities } from "../../notes/capabilities/write.js";
|
|
@@ -19,6 +18,7 @@ import { registerSceneReadCapabilities } from "../../scenes/capabilities/read.js
|
|
|
19
18
|
import { registerSceneWriteCapabilities } from "../../scenes/capabilities/write.js";
|
|
20
19
|
import { registerSettingsCapability } from "./settings.js";
|
|
21
20
|
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,6 +1,6 @@
|
|
|
1
|
+
import { init_agent_session_key, resolveAgentIdFromConversationId } from "../routing/agent-session-key.js";
|
|
1
2
|
import { normalizeAgentId } from "../agent-catalog/id.js";
|
|
2
3
|
import { init_agent_scope, resolveAgentProfileDir } from "../agent/agent-scope.js";
|
|
3
|
-
import { init_agent_session_key, resolveAgentIdFromConversationId } from "../routing/agent-session-key.js";
|
|
4
4
|
import { WORKSPACE_FILES, init_paths } from "../config/paths.js";
|
|
5
5
|
import { commandRegistry } from "./registry.js";
|
|
6
6
|
import { join } from "node:path";
|
package/dist/src/cli/bin.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { version } from "../../package.js";
|
|
3
|
-
import "./cli-log-level-preset.js";
|
|
4
|
-
import "../infra/http-proxy-env.js";
|
|
5
3
|
import { ensureXopcCliOnPath } from "../infra/path-env.js";
|
|
4
|
+
import "../infra/http-proxy-env.js";
|
|
5
|
+
import "./cli-log-level-preset.js";
|
|
6
6
|
import { formatRootHelp } from "./command-manifest.js";
|
|
7
7
|
//#region src/cli/bin.ts
|
|
8
8
|
ensureXopcCliOnPath();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
-
import { init_agent_scope, resolveDefaultAgentId } from "../../agent/agent-scope.js";
|
|
4
3
|
import { init_agent_session_key, resolveAgentMainConversationId } from "../../routing/agent-session-key.js";
|
|
4
|
+
import { init_agent_scope, resolveDefaultAgentId } from "../../agent/agent-scope.js";
|
|
5
5
|
import { getAgentDefaultModelRef, init_schema } from "../../config/schema.js";
|
|
6
6
|
import { getWorkspacePath } from "../../config/workspace-path-helpers.js";
|
|
7
7
|
import { ExtensionLoader } from "../../extensions/loader.js";
|
|
@@ -11,10 +11,10 @@ import { MessageBus, MessageBusShutdownError } from "../../infra/bus/queue.js";
|
|
|
11
11
|
import "../../infra/bus/index.js";
|
|
12
12
|
import { AgentService } from "../../agent/service.js";
|
|
13
13
|
import "../../agent/index.js";
|
|
14
|
-
import { formatExamples, register } from "../registry.js";
|
|
15
|
-
import { getContextWithOpts } from "../context.js";
|
|
16
14
|
import "../../config/index.js";
|
|
17
15
|
import { getXopcCloudCatalogCoordinator } from "../../providers/xopc-cloud-catalog-coordinator.js";
|
|
16
|
+
import { formatExamples, register } from "../registry.js";
|
|
17
|
+
import { getContextWithOpts } from "../context.js";
|
|
18
18
|
import { listSessions } from "./agent/sessions.js";
|
|
19
19
|
import { renderStreamToTerminal } from "./agent/stream-renderer.js";
|
|
20
20
|
import { startInteractiveChat } from "./agent/interactive.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { normalizeAgentId, validateAgentIdForNewAgent } from "../../agent-catalog/id.js";
|
|
2
2
|
import { AgentCatalogRepository, init_repository } from "../../agent-catalog/repository.js";
|
|
3
3
|
import { init_agent_scope, resolveAgentDir, resolveAgentWorkspaceDir, resolveDefaultAgentId } from "../../agent/agent-scope.js";
|
|
4
|
-
import { AgentCatalogService } from "../../agent-catalog/service.js";
|
|
5
4
|
import { resolveEffectiveAgentConfigForAgent } from "../../config/agent-profile.js";
|
|
5
|
+
import { AgentCatalogService } from "../../agent-catalog/service.js";
|
|
6
6
|
import { colors } from "../utils/colors.js";
|
|
7
7
|
//#region src/cli/commands/agents.ts
|
|
8
8
|
init_repository();
|
|
@@ -2,8 +2,8 @@ import { createLogger } from "../../utils/logger/index.js";
|
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
3
|
import { CredentialResolver, init_credentials } from "../../auth/credentials.js";
|
|
4
4
|
import { getAllProviders, init_providers } from "../../providers/index.js";
|
|
5
|
-
import { formatExamples, register } from "../registry.js";
|
|
6
5
|
import { disconnectProvider } from "../../providers/provider-disconnect.js";
|
|
6
|
+
import { formatExamples, register } from "../registry.js";
|
|
7
7
|
import { colorizeStatus, colors } from "../utils/colors.js";
|
|
8
8
|
import { listAllProfiles, listProfilesForProvider, removeAuthProfile, upsertAuthProfile } from "../../auth/profiles/profiles.js";
|
|
9
9
|
import "../../auth/profiles/index.js";
|
|
@@ -53,7 +53,7 @@ async function checkDatabaseSchema(ctx) {
|
|
|
53
53
|
id: "database-schema",
|
|
54
54
|
label: "Database schema",
|
|
55
55
|
status: "pass",
|
|
56
|
-
message: `SQLite schema v${status.dbVersion} (current release
|
|
56
|
+
message: `SQLite schema v${status.dbVersion} (current release v246).`,
|
|
57
57
|
hints: []
|
|
58
58
|
};
|
|
59
59
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AgentPluginStore } from "../../extensions/agent-plugins/store.js";
|
|
2
2
|
import { loadConfig } from "../../config/loader.js";
|
|
3
|
-
import { getContextWithOpts } from "../context.js";
|
|
4
3
|
import { isAgentPluginArchive, withAgentPluginSource } from "../../extensions/agent-plugins/sources.js";
|
|
4
|
+
import { getContextWithOpts } from "../context.js";
|
|
5
5
|
import { removePluginCredentials } from "../../extensions/agent-plugins/credentials.js";
|
|
6
6
|
import { join, resolve } from "node:path";
|
|
7
7
|
import { existsSync, readFileSync, statSync } from "node:fs";
|
|
@@ -5,10 +5,10 @@ import { init_paths, resolveConfigPath, resolveExtensionsDir } from "../../confi
|
|
|
5
5
|
import { normalizeExtensionManifest } from "../../extensions/normalize-manifest.js";
|
|
6
6
|
import { checkEngineCompatibility } from "../../extensions/engine-check.js";
|
|
7
7
|
import { loadConfig } from "../../config/loader.js";
|
|
8
|
-
import { getContextWithOpts } from "../context.js";
|
|
9
8
|
import { GatewayServer } from "../../gateway/server.js";
|
|
10
9
|
import { runGatewayLoop } from "../../gateway/run-loop.js";
|
|
11
10
|
import "../../gateway/index.js";
|
|
11
|
+
import { getContextWithOpts } from "../context.js";
|
|
12
12
|
import { colors } from "../utils/colors.js";
|
|
13
13
|
import { initWorkspace } from "../utils/init-workspace.js";
|
|
14
14
|
import { join, resolve } from "node:path";
|
|
@@ -3,11 +3,11 @@ import { downloadExtensionStoreZipBuffer, resolveExtensionZipDownloadUrl, resolv
|
|
|
3
3
|
import { computeExtensionDirectoryIntegrity, getExtensionLockfileManager } from "../../extensions/lockfile.js";
|
|
4
4
|
import { AgentPluginStore } from "../../extensions/agent-plugins/store.js";
|
|
5
5
|
import { loadConfig } from "../../config/loader.js";
|
|
6
|
-
import { getContextWithOpts } from "../context.js";
|
|
7
6
|
import { peekExtensionManifestFromStoreZip } from "../../extensions/install.js";
|
|
8
7
|
import { commitStagedExtensionInstall, finalizeStagedExtensionInstall, rollbackStagedExtensionInstall, stageExtensionLocal, stageExtensionNpm, stageExtensionStoreZip } from "../../extensions/install-transaction.js";
|
|
9
8
|
import { fetchRegistry, findExtension, getExtensionMarketplaceStoreBaseUrl, listExtensions, searchExtensions } from "../../extensions/marketplace.js";
|
|
10
9
|
import { isAgentPluginArchive } from "../../extensions/agent-plugins/sources.js";
|
|
10
|
+
import { getContextWithOpts } from "../context.js";
|
|
11
11
|
import { colors } from "../utils/colors.js";
|
|
12
12
|
import { installAgentPluginFromCli, isAgentPluginSource } from "./extension-agent-plugin.js";
|
|
13
13
|
import { validateExtensionPackageDirectory } from "./extension-pack.js";
|
|
@@ -7,10 +7,10 @@ import { AgentPluginStore } from "../../extensions/agent-plugins/store.js";
|
|
|
7
7
|
import { checkEngineCompatibility } from "../../extensions/engine-check.js";
|
|
8
8
|
import { ExtensionLoader } from "../../extensions/loader.js";
|
|
9
9
|
import { loadConfig, saveConfig } from "../../config/loader.js";
|
|
10
|
-
import { getContextWithOpts } from "../context.js";
|
|
11
10
|
import { checkAllExtensionsHealth, getExtensionHealthChecker } from "../../extensions/health.js";
|
|
12
11
|
import { collectExtensionPackageDependencyIssues } from "../../extensions/package-contract.js";
|
|
13
12
|
import { withAgentPluginSource } from "../../extensions/agent-plugins/sources.js";
|
|
13
|
+
import { getContextWithOpts } from "../context.js";
|
|
14
14
|
import { colors } from "../utils/colors.js";
|
|
15
15
|
import { addAgentPluginLifecycleCommands, isAgentPluginSource } from "./extension-agent-plugin.js";
|
|
16
16
|
import { createExtensionCreateCommand } from "./extension-create.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { init_paths, resolveConfigPath } from "../../../config/paths.js";
|
|
2
2
|
import { loadConfig } from "../../../config/loader.js";
|
|
3
|
-
import "../../../config/index.js";
|
|
4
3
|
import { isRestartEnabled } from "../../../config/commands.flags.js";
|
|
4
|
+
import "../../../config/index.js";
|
|
5
5
|
import { resolveGatewayService } from "../../../daemon/service.js";
|
|
6
6
|
import { authorizeGatewaySigusr1Restart, writeGatewayRestartIntentSync } from "../../../infra/restart.js";
|
|
7
7
|
import { findVerifiedGatewayListenerPidsOnPortSync, formatGatewayPidList, signalVerifiedGatewayPidSync } from "../../../infra/gateway-processes.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { formatExamples } from "../registry.js";
|
|
2
1
|
import { startSshPortForward } from "../../infra/ssh-tunnel.js";
|
|
2
|
+
import { formatExamples } from "../registry.js";
|
|
3
3
|
import { Command } from "commander";
|
|
4
4
|
//#region src/cli/commands/gateway-ssh-tunnel.ts
|
|
5
5
|
function registerGatewaySshTunnelCommand(parent, ctx) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { closeXopcDatabase, init_connection, isXopcDatabaseOpen, openXopcDatabase } from "../../storage/sqlite/connection.js";
|
|
2
|
-
import { register } from "../registry.js";
|
|
3
2
|
import { isImportSource } from "../../imports/sources.js";
|
|
4
3
|
import { scanProduct } from "../../imports/inventory.js";
|
|
5
4
|
import { importSelection, listImportSources } from "../../imports/productImport.js";
|
|
6
5
|
import { createRuntimeImportService, recoverCapabilityImports } from "../../imports/runtime.js";
|
|
6
|
+
import { register } from "../registry.js";
|
|
7
7
|
import { randomUUID } from "node:crypto";
|
|
8
8
|
import { Command } from "commander";
|
|
9
9
|
//#region src/cli/commands/import.ts
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { getNativePiAgentDir, prepareNativeMcpConfig } from "../../agent/mcp/native-mcp.js";
|
|
2
2
|
import { loadConfig } from "../../config/loader.js";
|
|
3
|
-
import { register } from "../registry.js";
|
|
4
3
|
import { createGatewayHttpClientFromConfig } from "../../mcp/gateway-http-client.js";
|
|
5
4
|
import { createCapabilityMcpServer } from "../../mcp/capability-server.js";
|
|
5
|
+
import { register } from "../registry.js";
|
|
6
6
|
import { join } from "node:path";
|
|
7
7
|
import { chmodSync, existsSync, readFileSync, writeFileSync } from "node:fs";
|
|
8
8
|
import { main } from "@earendil-works/pi-coding-agent";
|
|
9
|
-
import { Command } from "commander";
|
|
10
9
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
10
|
+
import { Command } from "commander";
|
|
11
11
|
//#region src/cli/commands/mcp.ts
|
|
12
12
|
function createMcpCommand(ctx) {
|
|
13
13
|
const command = new Command("mcp").description("Manage native pi MCP servers and expose Gateway capabilities");
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { creditDecimal } from "../../../packages/gateway-contract/src/cloud-credits.js";
|
|
2
2
|
import { init_src } from "../../../packages/gateway-contract/src/index.js";
|
|
3
3
|
import { AgentCatalogRepository, init_repository } from "../../agent-catalog/repository.js";
|
|
4
|
-
import { AgentCatalogService } from "../../agent-catalog/service.js";
|
|
5
4
|
import { getAgentDefaultModelRef, init_schema } from "../../config/schema.js";
|
|
6
5
|
import { CredentialResolver, init_credentials } from "../../auth/credentials.js";
|
|
7
6
|
import { getAllModels, getAvailableModels, getConfiguredProviders, getProviderAuthState, getProviderDisplayName, init_providers, isProviderConfigured, providerSupportsApiKey, providerSupportsOAuth, resolveModel } from "../../providers/index.js";
|
|
8
7
|
import { XopcCloudAccountService } from "../../providers/xopc-cloud-account-service.js";
|
|
8
|
+
import { AgentCatalogService } from "../../agent-catalog/service.js";
|
|
9
9
|
import { listImageProviderSpecs } from "../../../packages/image-providers/src/catalog.js";
|
|
10
10
|
import "../../../packages/image-providers/src/index.js";
|
|
11
11
|
import { loadConfig } from "../../config/loader.js";
|
|
12
|
-
import { formatExamples, register } from "../registry.js";
|
|
13
|
-
import { getContextWithOpts } from "../context.js";
|
|
14
12
|
import "../../config/index.js";
|
|
15
13
|
import { prepareUpdateGlobalDefaults } from "../../gateway/global-defaults-admin.js";
|
|
16
14
|
import { disconnectProvider } from "../../providers/provider-disconnect.js";
|
|
15
|
+
import { formatExamples, register } from "../registry.js";
|
|
16
|
+
import { getContextWithOpts } from "../context.js";
|
|
17
17
|
import { colors } from "../utils/colors.js";
|
|
18
18
|
import { runCliOAuthLogin } from "../utils/oauth-login.js";
|
|
19
19
|
import { input } from "@inquirer/prompts";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { AgentCatalogRepository, init_repository } from "../../../agent-catalog/repository.js";
|
|
2
|
-
import { AgentCatalogService } from "../../../agent-catalog/service.js";
|
|
3
2
|
import { getAgentDefaultModelRef, init_schema } from "../../../config/schema.js";
|
|
4
3
|
import { resolveModelsJsonPath } from "../../../config/paths.js";
|
|
5
4
|
import { init_models_json, loadModelsJson, saveModelsJson } from "../../../config/models-json.js";
|
|
@@ -7,15 +6,16 @@ import { getApiKeyFromEnv } from "../../../providers/env-keys.js";
|
|
|
7
6
|
import { getModelRegistry } from "../../../providers/model-registry.js";
|
|
8
7
|
import { CredentialResolver, init_credentials } from "../../../auth/credentials.js";
|
|
9
8
|
import { getAllProviders, getModelsByProvider, getProviderDisplayName, init_providers, providerSupportsApiKey, providerSupportsOAuth } from "../../../providers/index.js";
|
|
9
|
+
import { AgentCatalogService } from "../../../agent-catalog/service.js";
|
|
10
10
|
import { prepareUpdateGlobalDefaults } from "../../../gateway/global-defaults-admin.js";
|
|
11
11
|
import { discoverProviderModels, isProviderApiDiscoverable } from "../../../providers/model-discovery.js";
|
|
12
12
|
import { getXopcCloudCatalogCoordinator } from "../../../providers/xopc-cloud-catalog-coordinator.js";
|
|
13
|
-
import { getDomesticProviderBaseUrl, getDomesticProviderPreset, getDomesticProviderPresetIds, providerConfigFromDomesticPreset } from "../../../providers/domestic-presets.js";
|
|
14
|
-
import { getProviderHint, getRecommendedModelsForProvider, sortModelsForPicker, sortProvidersForPicker } from "../../../providers/presentation.js";
|
|
15
13
|
import { colors } from "../../utils/colors.js";
|
|
16
14
|
import { listProfilesForProvider } from "../../../auth/profiles/profiles.js";
|
|
17
15
|
import "../../../auth/profiles/index.js";
|
|
18
16
|
import { getOAuthProvider } from "../../utils/oauth-providers.js";
|
|
17
|
+
import { getDomesticProviderBaseUrl, getDomesticProviderPreset, getDomesticProviderPresetIds, providerConfigFromDomesticPreset } from "../../../providers/domestic-presets.js";
|
|
18
|
+
import { getProviderHint, getRecommendedModelsForProvider, sortModelsForPicker, sortProvidersForPicker } from "../../../providers/presentation.js";
|
|
19
19
|
import { runCliOAuthLogin } from "../../utils/oauth-login.js";
|
|
20
20
|
import { confirm, input, select } from "@inquirer/prompts";
|
|
21
21
|
//#region src/cli/commands/onboard/model.ts
|
|
@@ -3,10 +3,10 @@ import { AgentCatalogRepository, init_repository } from "../../agent-catalog/rep
|
|
|
3
3
|
import { ConfigSchema, init_schema } from "../../config/schema.js";
|
|
4
4
|
import { resolveGatewayLocalClientHost } from "../../config/gateway-bind.js";
|
|
5
5
|
import { saveConfig } from "../../config/loader.js";
|
|
6
|
-
import { formatExamples, register } from "../registry.js";
|
|
7
6
|
import "../../config/index.js";
|
|
8
|
-
import {
|
|
7
|
+
import { formatExamples, register } from "../registry.js";
|
|
9
8
|
import { provisionEagerRuntimes } from "../../runtime-tools/bootstrap.js";
|
|
9
|
+
import { colors } from "../utils/colors.js";
|
|
10
10
|
import { initWorkspace } from "../utils/init-workspace.js";
|
|
11
11
|
import { setupModel } from "./onboard/model.js";
|
|
12
12
|
import { getChannelConfigurators } from "./onboard/channels/registry.js";
|