@xopcai/xopc 0.0.190 → 0.0.192
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/telegram/xopc.extension.json +1 -1
- package/dist/gateway/static/root/assets/{activity-store-DstnJCS5.js → activity-store-B-tzXpDD.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-9vAbkroX.js → agent-avatar-dicebear-xOu0qNwc.js} +1 -1
- package/dist/gateway/static/root/assets/agents-CxuwvDk0.js +68 -0
- package/dist/gateway/static/root/assets/{api-BTL9kayv.js → api-fMItZb-h.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-DkFeIdBf.js → app-management-settings-panel-D6Rv3OWI.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-Bxs8Fpaj.js → appearance-settings-CKoNCwco.js} +1 -1
- package/dist/gateway/static/root/assets/apps-page-wAb5dnHZ.js +1 -0
- package/dist/gateway/static/root/assets/{archive-plugin-Ch2RmLCC.js → archive-plugin-BokNQBwH.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-BhMQM_Ky.js → attachment-load-Dx1HglsM.js} +1 -1
- package/dist/gateway/static/root/assets/automations-page-Drgazevs.js +6 -0
- package/dist/gateway/static/root/assets/{binary-plugins-D6CqlymH.js → binary-plugins-CPYAflIG.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-ClL6HEg9.js → block-editor-BFLgl8SS.js} +47 -47
- package/dist/gateway/static/root/assets/browser-settings-page-DmYlFJW7.js +8 -0
- package/dist/gateway/static/root/assets/{browser-workflow-inputs-BYy48VhN.js → browser-workflow-inputs-CqLnqA9z.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-workflows-page-zgLibuMH.js → browser-workflows-page-Db5v3HtE.js} +2 -2
- package/dist/gateway/static/root/assets/capabilities-settings-panel-D7Z8T0o5.js +7 -0
- package/dist/gateway/static/root/assets/capability-presets-api-lov0J9A2.js +1 -0
- package/dist/gateway/static/root/assets/capability-presets-settings-panel-COjnwO0U.js +3 -0
- package/dist/gateway/static/root/assets/{channel-recipient-api-BThDGiO3.js → channel-recipient-api-DSJznouK.js} +1 -1
- package/dist/gateway/static/root/assets/channels-settings-DcRYBNN7.js +1 -0
- package/dist/gateway/static/root/assets/channels-status-swr-C2UYdebT.js +1 -0
- package/dist/gateway/static/root/assets/{code-editor-D4_k-6QN.js → code-editor-dFzqyDXS.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-api-DS9ED-EL.js → connectors-api-3ccRyS3L.js} +1 -1
- package/dist/gateway/static/root/assets/connectors-page-FVmvBG9H.js +2 -0
- package/dist/gateway/static/root/assets/{cron-expression-CkgsvhtW.js → cron-expression-C9hhCiuo.js} +1 -1
- package/dist/gateway/static/root/assets/dependency-picker-CTtZFZug.js +1 -0
- package/dist/gateway/static/root/assets/{desktop-pet-Cv8rGhYW.js → desktop-pet-DOUeNVmC.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-CIeJdwfV.js → desktop-pet-settings-D4704vtl.js} +1 -1
- package/dist/gateway/static/root/assets/{directory-picker-path-field-D8jXEiAY.js → directory-picker-path-field-DJDXeA1B.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-CCZ9u6TZ.js → extension-debug-page-C0n2NMF1.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-CV36ILRG.js → extension-page-vG-xxRNs.js} +1 -1
- package/dist/gateway/static/root/assets/extension-settings-page-CtuY2THd.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-config-api-D4_r5iJM.js → gateway-config-api-CZra7GuI.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-settings-CYlntpBH.js → gateway-settings-Cz33jRkR.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-startup-retry-EO9mKvzE.js → gateway-startup-retry-BbVV0udv.js} +1 -1
- package/dist/gateway/static/root/assets/{heartbeat-settings-D4SyWob8.js → heartbeat-settings-D2XMlA_U.js} +1 -1
- package/dist/gateway/static/root/assets/home-page-CPrHkPN6.js +3 -0
- package/dist/gateway/static/root/assets/html-workspace-editor-bXK5tq64.js +1 -0
- package/dist/gateway/static/root/assets/{image-generation-api-Bu7PyVSh.js → image-generation-api-BgrOvhaJ.js} +1 -1
- package/dist/gateway/static/root/assets/index-Cg7Xnlu3.css +1 -0
- package/dist/gateway/static/root/assets/index-DzmbmOGA.js +150 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-BMhCuVBZ.js → keyboard-shortcuts-settings-BfyAEG1G.js} +1 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-Clz47vSr.js +2 -0
- package/dist/gateway/static/root/assets/{local-apps-page-ijIe7_y2.js → local-apps-page-BYalcRSY.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-deR2zRaE.js → locale-store-VOY1wMO9.js} +1 -1
- package/dist/gateway/static/root/assets/logs-page-Cxq9WMf5.js +2 -0
- package/dist/gateway/static/root/assets/{management-settings--V_fovKD.js → management-settings-BQf-6s32.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-editor-BvUebh3C.js → markdown-editor-TWGaF7Xa.js} +2 -2
- package/dist/gateway/static/root/assets/{markdown-split-Dt9-in6W.js → markdown-split-Cy_2SN1Q.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-B3pj_iO0.js → media-plugins-CkDupqb2.js} +1 -1
- package/dist/gateway/static/root/assets/messages-DMJ-6-1m.js +3 -0
- package/dist/gateway/static/root/assets/{notes-page-DZ366lIT.js → notes-page-kiGRR9jo.js} +1 -1
- package/dist/gateway/static/root/assets/notes-workbench-DkYkPGyB.js +4 -0
- package/dist/gateway/static/root/assets/{page-tabs-C5ge434C.js → page-tabs-CvzSdYVj.js} +1 -1
- package/dist/gateway/static/root/assets/{preview-open-alternatives-BFa9DgSV.js → preview-open-alternatives-kZ0nco7e.js} +1 -1
- package/dist/gateway/static/root/assets/{product-open-page-Dc9CcWdu.js → product-open-page-DgoieqQC.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-CeSjJd-N.js +1 -0
- package/dist/gateway/static/root/assets/projects-page-fZ1rm4b9.js +1 -0
- package/dist/gateway/static/root/assets/remote-access-hub-CbYI6KC8.js +1 -0
- package/dist/gateway/static/root/assets/runtime-tools-settings-panel-Bud_NTEZ.js +5 -0
- package/dist/gateway/static/root/assets/{schema-form-B84DckWe.js → schema-form-GlbsCBmv.js} +1 -1
- package/dist/gateway/static/root/assets/sessions-page-sOJ_TnLm.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-BI0u77dt.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-Dp9itvdy.js → settings-form-section-CKLns16d.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-loading-skeleton-CCtlhoy7.js → settings-loading-skeleton-BDzpxgk0.js} +1 -1
- package/dist/gateway/static/root/assets/settings-page-BH0pF7QB.js +1 -0
- package/dist/gateway/static/root/assets/{settings-page-layout-EQIOJa_L.js → settings-page-layout-J793iqfm.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-status-panel-Cwi-SPja.js → setup-status-panel-CGsml89P.js} +1 -1
- package/dist/gateway/static/root/assets/{share-preview-page-C4_B2jvf.js → share-preview-page-UTm_7r0l.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-BM--lgUS.js +1 -0
- package/dist/gateway/static/root/assets/skill-reload-api-CGCOC-rV.js +1 -0
- package/dist/gateway/static/root/assets/skills-page-iLyaOl48.js +2 -0
- package/dist/gateway/static/root/assets/skills-page.utils-Bwid1TGB.js +1 -0
- package/dist/gateway/static/root/assets/style-TIDOdKy0.js +7 -0
- package/dist/gateway/static/root/assets/{system-settings-panel-Dpx2ags2.js → system-settings-panel-BcB3p1e3.js} +1 -1
- package/dist/gateway/static/root/assets/task-detail-page-DQYEf08v.js +1 -0
- package/dist/gateway/static/root/assets/{theme-store-DnBOcGXi.js → theme-store-GVZOImyb.js} +1 -1
- package/dist/gateway/static/root/assets/{typed-models-lib-DULmTHUB.js → typed-models-lib-CT2c85Ju.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-BrjVk5VH.js → use-autosave-CcvY7DTh.js} +1 -1
- package/dist/gateway/static/root/assets/user-context-page-CGI41bfO.js +1 -0
- package/dist/gateway/static/root/assets/{vendor-codemirror--gTq3YAI.js → vendor-codemirror-DRr7hFaD.js} +16 -16
- package/dist/gateway/static/root/assets/voice-api-key-field-Ricc3QGo.js +1 -0
- package/dist/gateway/static/root/assets/{work-discovery-overlay-Wr-uF7VA.js → work-discovery-overlay-BoomfqhX.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-page-BWds95sL.js → work-discovery-page-mbnepbQk.js} +1 -1
- package/dist/gateway/static/root/assets/workflow-run-setup-panel-DSWG2xqL.js +3 -0
- package/dist/gateway/static/root/assets/workflows-page-DtV0ruyk.js +5 -0
- package/dist/gateway/static/root/index.html +7 -7
- package/dist/package.js +1 -1
- package/dist/src/agent/agent-manager.d.ts +2 -0
- package/dist/src/agent/agent-manager.js +76 -0
- package/dist/src/agent/background-review/prompts.d.ts +1 -1
- package/dist/src/agent/background-review/prompts.js +1 -1
- package/dist/src/agent/background-review/run-background-review.js +3 -12
- package/dist/src/agent/embedded/run-for-session.js +3 -0
- package/dist/src/agent/embedded/run-turn.js +4 -1
- package/dist/src/agent/embedded/session-runner.js +3 -4
- package/dist/src/agent/embedded/types.d.ts +10 -1
- package/dist/src/agent/embedded/xopc-stream-bridge.js +3 -2
- package/dist/src/agent/external-tools/mcp-provider.d.ts +1 -0
- package/dist/src/agent/external-tools/mcp-provider.js +21 -6
- package/dist/src/agent/image/generation/openai-images-provider.d.ts +1 -1
- package/dist/src/agent/image/generation/openai-images-provider.js +1 -1
- package/dist/src/agent/image/generation/provider-registry.d.ts +2 -0
- package/dist/src/agent/image/generation/provider-registry.js +21 -10
- package/dist/src/agent/image/generation/providers/dashscope.js +20 -0
- package/dist/src/agent/image/generation/providers/fal.d.ts +1 -1
- package/dist/src/agent/image/generation/providers/fal.js +12 -6
- package/dist/src/agent/image/generation/providers/google.js +8 -0
- package/dist/src/agent/image/generation/providers/minimax.js +20 -0
- package/dist/src/agent/image/generation/providers/openai.js +36 -26
- package/dist/src/agent/image/generation/providers/xopc-cloud.d.ts +2 -0
- package/dist/src/agent/image/generation/providers/xopc-cloud.js +74 -0
- package/dist/src/agent/image/generation/types.d.ts +15 -2
- package/dist/src/agent/mcp/bundle-mcp-gateway.d.ts +1 -0
- package/dist/src/agent/mcp/bundle-mcp-gateway.js +2 -1
- package/dist/src/agent/mcp/bundle-mcp-policy.d.ts +5 -1
- package/dist/src/agent/mcp/bundle-mcp-policy.js +11 -3
- package/dist/src/agent/mcp/bundle-mcp-runtime.js +3 -2
- package/dist/src/agent/mcp/bundle-mcp-types.d.ts +2 -1
- 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.d.ts +2 -1
- package/dist/src/agent/mcp/mcp-transport.js +22 -4
- package/dist/src/agent/memory/compaction.js +19 -17
- package/dist/src/agent/memory/context-budget.js +2 -3
- package/dist/src/agent/memory/understanding/service.d.ts +1 -0
- package/dist/src/agent/memory/understanding/service.js +49 -20
- package/dist/src/agent/memory/understanding/types.d.ts +1 -0
- package/dist/src/agent/memory/user-context-coordinator.js +6 -0
- package/dist/src/agent/orchestration/agent-orchestrator.js +15 -1
- package/dist/src/agent/service/direct-turn-helpers.js +14 -5
- package/dist/src/agent/skills/index.d.ts +1 -1
- package/dist/src/agent/skills/index.js +2 -2
- package/dist/src/agent/skills/installer.d.ts +3 -10
- package/dist/src/agent/skills/installer.js +99 -156
- package/dist/src/agent/skills/marketplace/adapter.types.d.ts +3 -1
- package/dist/src/agent/skills/marketplace/adapters/clawhub/adapter.js +30 -6
- package/dist/src/agent/skills/marketplace/adapters/skillhub/adapter.js +21 -4
- package/dist/src/agent/skills/marketplace/adapters/store/adapter.js +7 -4
- package/dist/src/agent/skills/marketplace/adapters/store/store-api-client.d.ts +3 -0
- package/dist/src/agent/skills/marketplace/adapters/store/store-api-client.js +7 -1
- package/dist/src/agent/skills/marketplace/search.d.ts +2 -2
- package/dist/src/agent/skills/marketplace/search.js +52 -21
- package/dist/src/agent/skills/skills-marketplace.d.ts +1 -1
- package/dist/src/agent/skills/skills-marketplace.js +2 -2
- package/dist/src/agent/skills/types.d.ts +0 -8
- package/dist/src/agent/tools/exec-command.d.ts +1 -0
- package/dist/src/agent/tools/exec-command.js +2 -1
- package/dist/src/agent/tools/factory.d.ts +1 -0
- package/dist/src/agent/tools/factory.js +17 -2
- package/dist/src/agent/tools/managed-job-tool.d.ts +1 -1
- package/dist/src/agent/tools/managed-job-tool.js +3 -2
- package/dist/src/agent/tools/skill-install-tool.d.ts +2 -2
- package/dist/src/agent/tools/skill-install-tool.js +8 -4
- package/dist/src/agent/tools/skills-marketplace-search-tool.js +3 -2
- package/dist/src/agent/tools/workflow-tool.d.ts +1 -0
- package/dist/src/agent/tools/workflow-tool.js +14 -4
- package/dist/src/agent-manifest/schema.d.ts +20 -0
- package/dist/src/agent-manifest/schema.js +6 -1
- package/dist/src/browser/providers/cloakbrowser.js +1 -1
- package/dist/src/cli/command-loaders.js +1 -0
- package/dist/src/cli/command-manifest.js +4 -0
- package/dist/src/cli/commands/doctor/checks/node-version.js +3 -3
- package/dist/src/cli/commands/doctor/checks/tool-runtimes.d.ts +2 -0
- package/dist/src/cli/commands/doctor/checks/tool-runtimes.js +36 -0
- package/dist/src/cli/commands/doctor/flow.js +2 -0
- package/dist/src/cli/commands/extension-marketplace.js +1 -1
- package/dist/src/cli/commands/models.js +0 -1
- package/dist/src/cli/commands/onboard/model.d.ts +18 -0
- package/dist/src/cli/commands/onboard/model.js +81 -5
- package/dist/src/cli/commands/onboard.js +13 -1
- package/dist/src/cli/commands/runtime.d.ts +1 -0
- package/dist/src/cli/commands/runtime.js +77 -0
- package/dist/src/cli/commands/setup.js +15 -1
- package/dist/src/cli/commands/skills.js +7 -4
- package/dist/src/config/agent-profile.js +1 -1
- package/dist/src/config/index.js +2 -2
- package/dist/src/config/schema.d.ts +125 -0
- package/dist/src/config/schema.js +77 -2
- package/dist/src/config/voice.d.ts +6 -0
- package/dist/src/config/voice.js +17 -0
- package/dist/src/extensions/install.js +1 -1
- package/dist/src/extensions/types/providers.d.ts +4 -0
- package/dist/src/gateway/agents-admin.js +1 -1
- package/dist/src/gateway/capability-presets-admin.d.ts +9 -0
- package/dist/src/gateway/capability-presets-admin.js +24 -6
- package/dist/src/gateway/chat-stream/mapper.js +8 -4
- package/dist/src/gateway/chat-stream/protocol.d.ts +10 -1
- package/dist/src/gateway/heartbeat/service.js +1 -1
- package/dist/src/gateway/hono/lib/config-payload.d.ts +1 -0
- package/dist/src/gateway/hono/routes/commands-skills.js +2 -1
- package/dist/src/gateway/hono/routes/lazy-bundles.js +8 -0
- package/dist/src/gateway/hono/routes/models.js +11 -11
- package/dist/src/gateway/hono/routes/runtime-tools.d.ts +3 -0
- package/dist/src/gateway/hono/routes/runtime-tools.js +142 -0
- package/dist/src/gateway/hono/routes/understanding-sources.js +2 -1
- package/dist/src/gateway/hono/routes/voice.js +43 -2
- package/dist/src/gateway/hono/routes/workflows.js +1 -1
- package/dist/src/gateway/hono/routes/you.js +22 -25
- package/dist/src/gateway/image-generation-setup.d.ts +2 -3
- package/dist/src/gateway/image-generation-setup.js +39 -8
- package/dist/src/gateway/service/marketplace-service.d.ts +1 -1
- package/dist/src/gateway/service/marketplace-service.js +2 -2
- package/dist/src/heartbeat/index.js +1 -1
- package/dist/src/infra/update-global.js +1 -1
- package/dist/src/providers/extension-stream-bridge.js +8 -7
- package/dist/src/providers/model-catalog-store.d.ts +35 -0
- package/dist/src/providers/model-catalog-store.js +25 -1
- package/dist/src/providers/model-catalog-sync-service.js +6 -0
- package/dist/src/providers/model-registry.js +4 -4
- package/dist/src/providers/prompt-cache-payload.d.ts +13 -0
- package/dist/src/providers/prompt-cache-payload.js +110 -0
- package/dist/src/providers/register-runtime-providers.js +4 -4
- package/dist/src/providers/xopc-cloud-model-source.js +101 -8
- package/dist/src/runtime-tools/archive.d.ts +8 -0
- package/dist/src/runtime-tools/archive.js +99 -0
- package/dist/src/runtime-tools/bootstrap.d.ts +16 -0
- package/dist/src/runtime-tools/bootstrap.js +33 -0
- package/dist/src/runtime-tools/catalog.d.ts +19 -0
- package/dist/src/runtime-tools/catalog.js +59 -0
- package/dist/src/runtime-tools/command.d.ts +15 -0
- package/dist/src/runtime-tools/command.js +59 -0
- package/dist/src/runtime-tools/download-source.d.ts +24 -0
- package/dist/src/runtime-tools/download-source.js +125 -0
- package/dist/src/runtime-tools/downloader.d.ts +21 -0
- package/dist/src/runtime-tools/downloader.js +137 -0
- package/dist/src/runtime-tools/environment.d.ts +20 -0
- package/dist/src/runtime-tools/environment.js +113 -0
- package/dist/src/runtime-tools/errors.d.ts +10 -0
- package/dist/src/runtime-tools/errors.js +14 -0
- package/dist/src/runtime-tools/index.d.ts +7 -0
- package/dist/src/runtime-tools/index.js +7 -0
- package/dist/src/runtime-tools/install-lock.d.ts +1 -0
- package/dist/src/runtime-tools/install-lock.js +50 -0
- package/dist/src/runtime-tools/manager.d.ts +20 -0
- package/dist/src/runtime-tools/manager.js +641 -0
- package/dist/src/runtime-tools/manifest-store.d.ts +3 -0
- package/dist/src/runtime-tools/manifest-store.js +26 -0
- package/dist/src/runtime-tools/network.d.ts +9 -0
- package/dist/src/runtime-tools/network.js +41 -0
- package/dist/src/runtime-tools/offline-bundle.d.ts +16 -0
- package/dist/src/runtime-tools/offline-bundle.js +41 -0
- package/dist/src/runtime-tools/paths.d.ts +7 -0
- package/dist/src/runtime-tools/paths.js +22 -0
- package/dist/src/runtime-tools/probe.d.ts +7 -0
- package/dist/src/runtime-tools/probe.js +71 -0
- package/dist/src/runtime-tools/prune.d.ts +10 -0
- package/dist/src/runtime-tools/prune.js +93 -0
- package/dist/src/runtime-tools/types.d.ts +70 -0
- package/dist/src/runtime-tools/types.js +1 -0
- package/dist/src/share/share-zip.js +1 -1
- package/dist/src/storage/sqlite/migrations/113_memory_evidence_single_source.sql +42 -20
- package/dist/src/tasks/home-query-service.js +1 -5
- package/dist/src/tasks/index.js +2 -2
- package/dist/src/tasks/project-operating-view-service.d.ts +2 -1
- package/dist/src/tasks/project-operating-view-service.js +6 -4
- package/dist/src/tasks/task-dependency-service.d.ts +2 -1
- package/dist/src/tasks/task-dependency-service.js +15 -0
- package/dist/src/tunnel/frpc-binary.js +1 -1
- package/dist/src/user-context/domain.d.ts +2 -1
- package/dist/src/user-context/domain.js +12 -1
- package/dist/src/user-context/manual-understanding.js +8 -10
- package/dist/src/user-context/planner.js +1 -6
- package/dist/src/user-context/sources/activity-clustering.d.ts +5 -0
- package/dist/src/user-context/sources/activity-clustering.js +130 -0
- package/dist/src/user-context/sources/catalog.js +26 -0
- package/dist/src/user-context/sources/local-source-contract.d.ts +3 -0
- package/dist/src/user-context/sources/local-source-contract.js +15 -0
- package/dist/src/user-context/sources/repository.js +7 -1
- package/dist/src/user-context/sources/types.d.ts +7 -1
- package/dist/src/user-context/understanding.d.ts +15 -0
- package/dist/src/user-context/understanding.js +24 -0
- package/dist/src/voice/local/model-files.js +1 -1
- package/dist/src/voice/metadata/builtin.js +99 -32
- package/dist/src/voice/metadata/types.d.ts +3 -0
- package/dist/src/voice/stt/availability.js +4 -1
- package/dist/src/voice/stt/config-slice.d.ts +0 -2
- package/dist/src/voice/stt/config-slice.js +1 -6
- package/dist/src/voice/stt/factory.js +2 -2
- package/dist/src/voice/stt/index.d.ts +2 -3
- package/dist/src/voice/stt/list-providers.js +1 -1
- package/dist/src/voice/stt/providers/alibaba-transcription.d.ts +0 -19
- package/dist/src/voice/stt/providers/alibaba-transcription.js +59 -132
- package/dist/src/voice/stt/providers/index.d.ts +1 -0
- package/dist/src/voice/stt/providers/index.js +2 -1
- package/dist/src/voice/stt/providers/openai-transcription.d.ts +2 -2
- package/dist/src/voice/stt/providers/openai-transcription.js +4 -4
- package/dist/src/voice/stt/providers/xopc-cloud-transcription.d.ts +2 -0
- package/dist/src/voice/stt/providers/xopc-cloud-transcription.js +49 -0
- package/dist/src/voice/stt/types.js +2 -2
- package/dist/src/voice/tts/providers/index.d.ts +1 -0
- package/dist/src/voice/tts/providers/index.js +2 -1
- package/dist/src/voice/tts/providers/xopc-cloud-speech.d.ts +2 -0
- package/dist/src/voice/tts/providers/xopc-cloud-speech.js +113 -0
- package/dist/src/voice/tts/types.d.ts +1 -1
- package/dist/src/work-discovery/analyzer.js +9 -4
- package/dist/src/work-discovery/candidate-discovery.d.ts +1 -0
- package/dist/src/work-discovery/candidate-discovery.js +3 -3
- package/dist/src/work-discovery/index.js +2 -2
- package/dist/src/work-discovery/service.d.ts +2 -1
- package/dist/src/work-discovery/service.js +126 -37
- package/dist/src/work-discovery/types.d.ts +1 -0
- package/dist/src/workflows/service/workflow-run-service.js +8 -0
- package/dist/src/workflows/service/workflow-run-service.types.d.ts +1 -1
- package/package.json +1 -1
- package/dist/gateway/static/root/assets/agents-D1t4SfMQ.js +0 -68
- package/dist/gateway/static/root/assets/apps-page-Cgrgu5OW.js +0 -1
- package/dist/gateway/static/root/assets/automations-page-CtJxstKh.js +0 -6
- package/dist/gateway/static/root/assets/browser-settings-page-DW99iDmD.js +0 -8
- package/dist/gateway/static/root/assets/capabilities-settings-panel-CHUrT9EB.js +0 -7
- package/dist/gateway/static/root/assets/capability-presets-api-BB8t4Ja7.js +0 -1
- package/dist/gateway/static/root/assets/capability-presets-settings-panel-Cycrv0YV.js +0 -1
- package/dist/gateway/static/root/assets/channels-settings-V96gPUAU.js +0 -1
- package/dist/gateway/static/root/assets/channels-status-swr-Cz7SAAkm.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-BhlyQoQI.js +0 -2
- package/dist/gateway/static/root/assets/extension-settings-page-IyQrSILY.js +0 -1
- package/dist/gateway/static/root/assets/home-page-B2Kagoh8.js +0 -3
- package/dist/gateway/static/root/assets/html-workspace-editor-C3DKAkMc.js +0 -1
- package/dist/gateway/static/root/assets/index-CYT5DOzr.js +0 -150
- package/dist/gateway/static/root/assets/index-D6e3tPL-.css +0 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-BHYbFjqy.js +0 -2
- package/dist/gateway/static/root/assets/logs-page-IIn8Tess.js +0 -2
- package/dist/gateway/static/root/assets/messages-B4XqB8I6.js +0 -3
- package/dist/gateway/static/root/assets/notes-workbench-S2sBVOLw.js +0 -4
- package/dist/gateway/static/root/assets/project-detail-page-BilzoCJ7.js +0 -1
- package/dist/gateway/static/root/assets/projects-page-BoQUyacP.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-DUyUaCRF.js +0 -1
- package/dist/gateway/static/root/assets/sessions-page-Dzxlq1F0.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-TzwlZxU6.js +0 -1
- package/dist/gateway/static/root/assets/settings-page-DQmMKf8r.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-CkyuGlZK.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-BJCePQK5.js +0 -1
- package/dist/gateway/static/root/assets/skills-page-BYWLfmJi.js +0 -2
- package/dist/gateway/static/root/assets/skills-page.utils-Jhm24i4h.js +0 -1
- package/dist/gateway/static/root/assets/task-detail-page-DLAdxI6e.js +0 -1
- package/dist/gateway/static/root/assets/user-context-page-9AAFpGAL.js +0 -1
- package/dist/gateway/static/root/assets/voice-api-key-field-BISTPfq_.js +0 -1
- package/dist/gateway/static/root/assets/workflow-run-setup-panel-DHqHP8_6.js +0 -3
- package/dist/gateway/static/root/assets/workflows-page-0b4_DFHr.js +0 -11
- /package/dist/gateway/static/root/assets/{workflows-page-DLioOiRN.css → style-DLioOiRN.css} +0 -0
|
@@ -5,8 +5,8 @@ function marketplaceAdapter(config, provider) {
|
|
|
5
5
|
if (provider && isRegisteredProvider(provider)) return getMarketplaceAdapterForProvider(provider);
|
|
6
6
|
return getMarketplaceAdapter(config);
|
|
7
7
|
}
|
|
8
|
-
async function listMarketplaceCategories(config, provider) {
|
|
9
|
-
return { items: await marketplaceAdapter(config, provider).listCategories(config) };
|
|
8
|
+
async function listMarketplaceCategories(config, provider, locale) {
|
|
9
|
+
return { items: await marketplaceAdapter(config, provider).listCategories(config, { locale }) };
|
|
10
10
|
}
|
|
11
11
|
async function listMarketplacePackages(config, params, provider) {
|
|
12
12
|
return marketplaceAdapter(config, provider).listPackages(config, params);
|
|
@@ -106,12 +106,6 @@ export interface SkillSourceDescriptor {
|
|
|
106
106
|
writable: boolean;
|
|
107
107
|
}
|
|
108
108
|
export type SkillOrigin = SkillSourceDescriptor;
|
|
109
|
-
export interface SkillsInstallConfig {
|
|
110
|
-
/** Prefer brew for package installation */
|
|
111
|
-
preferBrew?: boolean;
|
|
112
|
-
/** Node package manager preference */
|
|
113
|
-
nodeManager?: 'pnpm' | 'npm' | 'yarn' | 'bun';
|
|
114
|
-
}
|
|
115
109
|
export interface SkillsLimitsConfig {
|
|
116
110
|
/** Max number of immediate child directories to consider */
|
|
117
111
|
maxCandidatesPerRoot?: number;
|
|
@@ -129,8 +123,6 @@ export interface SkillsConfig {
|
|
|
129
123
|
allowBundled?: string[];
|
|
130
124
|
/** Load configuration */
|
|
131
125
|
load?: SkillsLoadConfig;
|
|
132
|
-
/** Install configuration */
|
|
133
|
-
install?: SkillsInstallConfig;
|
|
134
126
|
/** Limits configuration */
|
|
135
127
|
limits?: SkillsLimitsConfig;
|
|
136
128
|
/** Per-skill configuration */
|
|
@@ -24,5 +24,6 @@ export interface ExecCommandUpdateDetails {
|
|
|
24
24
|
export interface CreateExecCommandToolOptions {
|
|
25
25
|
/** Env var names allowed through prepareSafeToolEnv even if they match secret heuristics. */
|
|
26
26
|
getSkillPassthroughEnvVarNames?: () => string[];
|
|
27
|
+
prepareEnv?: (baseEnv: Record<string, string>, cwd: string) => Promise<Record<string, string>>;
|
|
27
28
|
}
|
|
28
29
|
export declare function createExecCommandTool(workspaceCwd: string, options?: CreateExecCommandToolOptions): AgentTool;
|
|
@@ -116,6 +116,7 @@ function createExecCommandTool(workspaceCwd, options) {
|
|
|
116
116
|
const timeoutMs = Math.min(clampTimeoutMs(params.timeoutMs), policy.timeoutMs);
|
|
117
117
|
const maxOutputChars = clampMaxOutputChars(params.maxOutputChars);
|
|
118
118
|
const startTime = Date.now();
|
|
119
|
+
const runtimeEnv = options?.prepareEnv ? await options.prepareEnv(policy.sanitizedEnv, policy.effectiveCwd) : policy.sanitizedEnv;
|
|
119
120
|
let stdout = "";
|
|
120
121
|
let stderr = "";
|
|
121
122
|
let aggregatedOutput = "";
|
|
@@ -126,7 +127,7 @@ function createExecCommandTool(workspaceCwd, options) {
|
|
|
126
127
|
shell: true,
|
|
127
128
|
cwd: policy.effectiveCwd,
|
|
128
129
|
env: {
|
|
129
|
-
...
|
|
130
|
+
...runtimeEnv,
|
|
130
131
|
COLUMNS: "200"
|
|
131
132
|
}
|
|
132
133
|
});
|
|
@@ -99,6 +99,7 @@ export declare class AgentToolsFactory {
|
|
|
99
99
|
/** Cached readiness probe — keyed by backend mode + extension host:port. */
|
|
100
100
|
private browserReadinessCache;
|
|
101
101
|
constructor(deps: ToolFactoryDeps);
|
|
102
|
+
private prepareRuntimeEnv;
|
|
102
103
|
private browserReadinessKey;
|
|
103
104
|
private checkBrowserReadinessCached;
|
|
104
105
|
/** Invalidate the readiness cache (config hot-reload, settings-page save, etc.). */
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { init_paths_state, resolveStateDir } from "../../config/paths-state.js";
|
|
1
2
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
3
|
import { init_logger } from "../../utils/logger.js";
|
|
3
4
|
import { isXopcDatabaseOpen } from "../../storage/sqlite/connection.js";
|
|
@@ -5,6 +6,7 @@ import { getSessionTaskPlan, setSessionTaskPlan } from "../../storage/sqlite/ses
|
|
|
5
6
|
import "../../storage/sqlite/index.js";
|
|
6
7
|
import { init_agent_scope, resolveDefaultAgentId } from "../agent-scope.js";
|
|
7
8
|
import { wrapToolsWithProtection } from "./executor.js";
|
|
9
|
+
import { buildRuntimeEnvironment } from "../../runtime-tools/environment.js";
|
|
8
10
|
import { createDefaultExternalToolGatewayTools } from "../external-tools/index.js";
|
|
9
11
|
import { createReadFileTool } from "./read.js";
|
|
10
12
|
import { createWriteFileTool } from "./write.js";
|
|
@@ -56,6 +58,7 @@ import "../capabilities/index.js";
|
|
|
56
58
|
//#region src/agent/tools/factory.ts
|
|
57
59
|
init_agent_scope();
|
|
58
60
|
init_logger();
|
|
61
|
+
init_paths_state();
|
|
59
62
|
const log = createLogger("AgentToolsFactory");
|
|
60
63
|
/** Channels where `clarify` can block for a user answer (web UI, Telegram, CLI readline). */
|
|
61
64
|
const CLARIFY_SUPPORTED_CHANNELS = new Set([
|
|
@@ -72,6 +75,15 @@ var AgentToolsFactory = class {
|
|
|
72
75
|
constructor(deps) {
|
|
73
76
|
this.deps = deps;
|
|
74
77
|
}
|
|
78
|
+
prepareRuntimeEnv = async (baseEnv) => {
|
|
79
|
+
const config = this.deps.getConfig?.();
|
|
80
|
+
if (!config) return baseEnv;
|
|
81
|
+
return (await buildRuntimeEnvironment({
|
|
82
|
+
stateDir: resolveStateDir(),
|
|
83
|
+
config: config.runtimeTools,
|
|
84
|
+
baseEnv
|
|
85
|
+
})).env;
|
|
86
|
+
};
|
|
75
87
|
browserReadinessKey() {
|
|
76
88
|
const cfg = this.deps.getConfig?.();
|
|
77
89
|
const backend = resolveBrowserBackendFromConfig(cfg);
|
|
@@ -251,8 +263,11 @@ var AgentToolsFactory = class {
|
|
|
251
263
|
listDir,
|
|
252
264
|
grep,
|
|
253
265
|
find,
|
|
254
|
-
createExecCommandTool(workspace, {
|
|
255
|
-
|
|
266
|
+
createExecCommandTool(workspace, {
|
|
267
|
+
getSkillPassthroughEnvVarNames: this.deps.getSkillPassthroughEnvVarNames,
|
|
268
|
+
prepareEnv: this.prepareRuntimeEnv
|
|
269
|
+
}),
|
|
270
|
+
createManagedJobTool(workspace, () => this.deps.getCurrentContext()?.sessionKey, this.deps.getSkillPassthroughEnvVarNames, this.prepareRuntimeEnv),
|
|
256
271
|
createWebSearchTool(() => this.deps.getConfig?.()),
|
|
257
272
|
createWebFetchTool(() => this.deps.getConfig?.()),
|
|
258
273
|
createWebExtractTool({ getConfig: () => this.deps.getConfig?.() }),
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { AgentTool } from '@earendil-works/pi-agent-core';
|
|
2
|
-
export declare function createManagedJobTool(workspace: string, getSessionKey: () => string | undefined, getSkillPassthroughEnvVarNames?: () => string[]): AgentTool;
|
|
2
|
+
export declare function createManagedJobTool(workspace: string, getSessionKey: () => string | undefined, getSkillPassthroughEnvVarNames?: () => string[], prepareEnv?: (baseEnv: Record<string, string>, cwd: string) => Promise<Record<string, string>>): AgentTool;
|
|
@@ -126,7 +126,7 @@ function result(value) {
|
|
|
126
126
|
details: {}
|
|
127
127
|
};
|
|
128
128
|
}
|
|
129
|
-
function createManagedJobTool(workspace, getSessionKey, getSkillPassthroughEnvVarNames) {
|
|
129
|
+
function createManagedJobTool(workspace, getSessionKey, getSkillPassthroughEnvVarNames, prepareEnv) {
|
|
130
130
|
return {
|
|
131
131
|
name: "managed_job",
|
|
132
132
|
label: "Managed Job",
|
|
@@ -149,8 +149,9 @@ function createManagedJobTool(workspace, getSessionKey, getSkillPassthroughEnvVa
|
|
|
149
149
|
if (!policy.allowed) return result({ error: `Sandbox blocked command: ${policy.reason}` });
|
|
150
150
|
const rawMax = Number(input.maxRuntimeMs ?? DEFAULT_MAX_RUNTIME_MS);
|
|
151
151
|
const maxRuntimeMs = Math.min(MAX_RUNTIME_MS, Math.max(1e3, Number.isFinite(rawMax) ? rawMax : DEFAULT_MAX_RUNTIME_MS));
|
|
152
|
+
const runtimeEnv = prepareEnv ? await prepareEnv(policy.sanitizedEnv, policy.effectiveCwd) : policy.sanitizedEnv;
|
|
152
153
|
return result(registry().start(owner, command, policy.effectiveCwd, {
|
|
153
|
-
...
|
|
154
|
+
...runtimeEnv,
|
|
154
155
|
COLUMNS: "200"
|
|
155
156
|
}, maxRuntimeMs));
|
|
156
157
|
}
|
|
@@ -22,7 +22,7 @@ export interface SkillInstallToolResult {
|
|
|
22
22
|
target?: SkillInstallTarget;
|
|
23
23
|
}
|
|
24
24
|
export interface MarketplaceSkillInstallToolOptions {
|
|
25
|
-
provider: 'store' | 'clawhub';
|
|
25
|
+
provider: 'store' | 'skillhub' | 'clawhub';
|
|
26
26
|
name: string;
|
|
27
27
|
version?: string;
|
|
28
28
|
target?: SkillInstallTarget;
|
|
@@ -32,7 +32,7 @@ export interface MarketplaceSkillInstallToolOptions {
|
|
|
32
32
|
export interface MarketplaceSkillInstallToolResult {
|
|
33
33
|
skillId: string;
|
|
34
34
|
path: string;
|
|
35
|
-
provider: 'store' | 'clawhub';
|
|
35
|
+
provider: 'store' | 'skillhub' | 'clawhub';
|
|
36
36
|
name: string;
|
|
37
37
|
version?: string;
|
|
38
38
|
target?: SkillInstallTarget;
|
|
@@ -3,7 +3,11 @@ import { Type } from "@sinclair/typebox";
|
|
|
3
3
|
//#region src/agent/tools/skill-install-tool.ts
|
|
4
4
|
const SkillInstallSchema = Type.Object({
|
|
5
5
|
source: Type.Optional(Type.String({ description: "Explicit source install: Git URL, GitHub repository URL, https .zip/.tar.gz URL, file:// URL, or local archive/path." })),
|
|
6
|
-
provider: Type.Optional(Type.Union([
|
|
6
|
+
provider: Type.Optional(Type.Union([
|
|
7
|
+
Type.Literal("store"),
|
|
8
|
+
Type.Literal("skillhub"),
|
|
9
|
+
Type.Literal("clawhub")
|
|
10
|
+
], { description: "Marketplace provider. Use with name; copy it from skills_marketplace_search." })),
|
|
7
11
|
name: Type.Optional(Type.String({ description: "Marketplace package name or install.reference. For ClawHub prefer owner/slug to disambiguate publishers." })),
|
|
8
12
|
version: Type.Optional(Type.String({ description: "Optional marketplace package version." })),
|
|
9
13
|
ref: Type.Optional(Type.String({ description: "Optional Git branch/tag/ref." })),
|
|
@@ -20,7 +24,7 @@ function createSkillInstallTool(deps) {
|
|
|
20
24
|
return {
|
|
21
25
|
name: "skill_install",
|
|
22
26
|
label: "Install skill",
|
|
23
|
-
description: "Install an xopc skill from a Store/ClawHub marketplace result or an explicit source. Use only when the user clearly asks to install or update a skill; never treat search or a pasted URL as installation consent.",
|
|
27
|
+
description: "Install an xopc skill from a Store/SkillHub/ClawHub marketplace result or an explicit source. Use only when the user clearly asks to install or update a skill; never treat search or a pasted URL as installation consent.",
|
|
24
28
|
parameters: SkillInstallSchema,
|
|
25
29
|
async execute(_toolCallId, params) {
|
|
26
30
|
const provider = clean(params.provider);
|
|
@@ -28,10 +32,10 @@ function createSkillInstallTool(deps) {
|
|
|
28
32
|
const target = isSkillInstallTarget(params.target) ? params.target : "global";
|
|
29
33
|
const sessionKey = deps.getSessionKey?.();
|
|
30
34
|
if (provider || name) {
|
|
31
|
-
if (provider !== "store" && provider !== "clawhub") return {
|
|
35
|
+
if (provider !== "store" && provider !== "skillhub" && provider !== "clawhub") return {
|
|
32
36
|
content: [{
|
|
33
37
|
type: "text",
|
|
34
|
-
text: "Marketplace installs require provider: store or clawhub."
|
|
38
|
+
text: "Marketplace installs require provider: store, skillhub, or clawhub."
|
|
35
39
|
}],
|
|
36
40
|
details: { errorCode: "missing_provider" }
|
|
37
41
|
};
|
|
@@ -8,11 +8,12 @@ const SkillsMarketplaceSearchSchema = Type.Object({
|
|
|
8
8
|
}),
|
|
9
9
|
sources: Type.Optional(Type.Array(Type.Union([
|
|
10
10
|
Type.Literal("store"),
|
|
11
|
+
Type.Literal("skillhub"),
|
|
11
12
|
Type.Literal("clawhub"),
|
|
12
13
|
Type.Literal("skills-sh")
|
|
13
14
|
]), {
|
|
14
15
|
minItems: 1,
|
|
15
|
-
maxItems:
|
|
16
|
+
maxItems: 4,
|
|
16
17
|
uniqueItems: true
|
|
17
18
|
})),
|
|
18
19
|
limit: Type.Optional(Type.Integer({
|
|
@@ -34,7 +35,7 @@ function createSkillsMarketplaceSearchTool(deps) {
|
|
|
34
35
|
return {
|
|
35
36
|
name: "skills_marketplace_search",
|
|
36
37
|
label: "🔎 Find skills",
|
|
37
|
-
description: "Search the XOPC Store, native ClawHub catalog, and skills.sh results federated by ClawHub. Returns normalized provenance, install references, adoption metrics, partial-source errors, and a heuristic value score. Read-only; never installs a skill.",
|
|
38
|
+
description: "Search the XOPC Store, SkillHub, native ClawHub catalog, and skills.sh results federated by ClawHub. Returns normalized provenance, install references, adoption metrics, partial-source errors, and a heuristic value score. Read-only; never installs a skill.",
|
|
38
39
|
parameters: SkillsMarketplaceSearchSchema,
|
|
39
40
|
mutatesWorkspace: false,
|
|
40
41
|
mutationScope: "none",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
-
import { extractProfileAgentId } from "../../config/agent-profile.js";
|
|
3
|
+
import { extractProfileAgentId, resolveEffectiveAgentProfileForSession } from "../../config/agent-profile.js";
|
|
4
4
|
import { appendProductDeliveryText } from "../../../packages/gateway-contract/src/product-delivery.js";
|
|
5
5
|
import { Type } from "@sinclair/typebox";
|
|
6
6
|
//#region src/agent/tools/workflow-tool.ts
|
|
@@ -13,6 +13,7 @@ const WorkflowToolSchema = Type.Object({
|
|
|
13
13
|
name: Type.Optional(Type.String({ description: "Name of a saved visual workflow to run." })),
|
|
14
14
|
args: Type.Optional(Type.Any({ description: "Optional JSON value passed as workflow input payload." })),
|
|
15
15
|
goal: Type.Optional(Type.String({ description: "Optional goal or task description for this workflow run (defaults to user intent in chat)." })),
|
|
16
|
+
intent: Type.Optional(Type.String({ description: "Optional short intent used to select a suggested workflow." })),
|
|
16
17
|
taskRunId: Type.Optional(Type.String({ description: "Optional TaskRun id. When set, the workflow executes and finalizes that run." }))
|
|
17
18
|
});
|
|
18
19
|
function createWorkflowTool(deps) {
|
|
@@ -35,7 +36,7 @@ function createWorkflowTool(deps) {
|
|
|
35
36
|
};
|
|
36
37
|
let definitionId;
|
|
37
38
|
try {
|
|
38
|
-
definitionId = resolveDefinitionId(params, deps.catalog);
|
|
39
|
+
definitionId = resolveDefinitionId(params, deps.catalog, deps.getConfig(), deps.getCurrentSessionKey?.());
|
|
39
40
|
} catch (e) {
|
|
40
41
|
const message = e instanceof Error ? e.message : String(e);
|
|
41
42
|
return {
|
|
@@ -136,13 +137,22 @@ function createWorkflowTool(deps) {
|
|
|
136
137
|
}
|
|
137
138
|
};
|
|
138
139
|
}
|
|
139
|
-
function resolveDefinitionId(params, catalog) {
|
|
140
|
+
function resolveDefinitionId(params, catalog, config, sessionKey) {
|
|
140
141
|
const name = params.name?.trim();
|
|
141
142
|
if (name) {
|
|
142
143
|
catalog.load(name);
|
|
143
144
|
return name;
|
|
144
145
|
}
|
|
145
|
-
|
|
146
|
+
const configuredDefault = config ? (() => {
|
|
147
|
+
const policy = resolveEffectiveAgentProfileForSession(config, sessionKey).manifest.workflows;
|
|
148
|
+
const intent = params.intent?.trim().toLowerCase();
|
|
149
|
+
return (intent ? policy.suggested?.find((entry) => entry.intent.toLowerCase() === intent)?.workflow : void 0) ?? policy.default;
|
|
150
|
+
})() : void 0;
|
|
151
|
+
if (configuredDefault) {
|
|
152
|
+
catalog.load(configuredDefault);
|
|
153
|
+
return configuredDefault;
|
|
154
|
+
}
|
|
155
|
+
throw new Error("`name` is required because this agent has no default workflow.");
|
|
146
156
|
}
|
|
147
157
|
//#endregion
|
|
148
158
|
export { createWorkflowTool };
|
|
@@ -250,6 +250,11 @@ export declare const RuntimePolicySchema: z.ZodOptional<z.ZodObject<{
|
|
|
250
250
|
maxTurns: z.ZodOptional<z.ZodNumber>;
|
|
251
251
|
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
252
252
|
maxToolFailuresPerTurn: z.ZodOptional<z.ZodNumber>;
|
|
253
|
+
promptCacheRetention: z.ZodOptional<z.ZodEnum<{
|
|
254
|
+
none: "none";
|
|
255
|
+
short: "short";
|
|
256
|
+
long: "long";
|
|
257
|
+
}>>;
|
|
253
258
|
}, z.core.$strict>>;
|
|
254
259
|
export declare const PromptPolicySchema: z.ZodOptional<z.ZodObject<{
|
|
255
260
|
customInstructions: z.ZodOptional<z.ZodString>;
|
|
@@ -394,6 +399,11 @@ export declare const AgentManifestSchema: z.ZodObject<{
|
|
|
394
399
|
maxTurns: z.ZodOptional<z.ZodNumber>;
|
|
395
400
|
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
396
401
|
maxToolFailuresPerTurn: z.ZodOptional<z.ZodNumber>;
|
|
402
|
+
promptCacheRetention: z.ZodOptional<z.ZodEnum<{
|
|
403
|
+
none: "none";
|
|
404
|
+
short: "short";
|
|
405
|
+
long: "long";
|
|
406
|
+
}>>;
|
|
397
407
|
}, z.core.$strict>>;
|
|
398
408
|
prompt: z.ZodOptional<z.ZodObject<{
|
|
399
409
|
customInstructions: z.ZodOptional<z.ZodString>;
|
|
@@ -526,6 +536,11 @@ export declare const AgentConfigEntrySchema: z.ZodObject<{
|
|
|
526
536
|
maxTurns: z.ZodOptional<z.ZodNumber>;
|
|
527
537
|
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
528
538
|
maxToolFailuresPerTurn: z.ZodOptional<z.ZodNumber>;
|
|
539
|
+
promptCacheRetention: z.ZodOptional<z.ZodEnum<{
|
|
540
|
+
none: "none";
|
|
541
|
+
short: "short";
|
|
542
|
+
long: "long";
|
|
543
|
+
}>>;
|
|
529
544
|
}, z.core.$strict>>;
|
|
530
545
|
prompt: z.ZodOptional<z.ZodObject<{
|
|
531
546
|
customInstructions: z.ZodOptional<z.ZodString>;
|
|
@@ -644,6 +659,11 @@ export declare const CapabilityPresetSchema: z.ZodObject<{
|
|
|
644
659
|
maxTurns: z.ZodOptional<z.ZodNumber>;
|
|
645
660
|
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
646
661
|
maxToolFailuresPerTurn: z.ZodOptional<z.ZodNumber>;
|
|
662
|
+
promptCacheRetention: z.ZodOptional<z.ZodEnum<{
|
|
663
|
+
none: "none";
|
|
664
|
+
short: "short";
|
|
665
|
+
long: "long";
|
|
666
|
+
}>>;
|
|
647
667
|
}, z.core.$strict>>;
|
|
648
668
|
locks: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
649
669
|
}, z.core.$strict>;
|
|
@@ -156,7 +156,12 @@ var init_schema = __esmMin((() => {
|
|
|
156
156
|
RuntimePolicySchema = z.object({
|
|
157
157
|
maxTurns: z.number().int().positive().optional(),
|
|
158
158
|
timeoutMs: z.number().int().positive().optional(),
|
|
159
|
-
maxToolFailuresPerTurn: z.number().int().positive().optional()
|
|
159
|
+
maxToolFailuresPerTurn: z.number().int().positive().optional(),
|
|
160
|
+
promptCacheRetention: z.enum([
|
|
161
|
+
"none",
|
|
162
|
+
"short",
|
|
163
|
+
"long"
|
|
164
|
+
]).optional()
|
|
160
165
|
}).strict().optional();
|
|
161
166
|
PromptPolicySchema = z.object({ customInstructions: z.string().optional() }).strict().optional();
|
|
162
167
|
AgentIdentitySchema = z.object({
|
|
@@ -11,9 +11,9 @@ import { createReadStream, createWriteStream } from "node:fs";
|
|
|
11
11
|
import { spawn } from "node:child_process";
|
|
12
12
|
import { createHash } from "node:crypto";
|
|
13
13
|
import { mkdir, mkdtemp, rm, stat } from "node:fs/promises";
|
|
14
|
-
import { Readable, Transform } from "node:stream";
|
|
15
14
|
import AdmZip from "adm-zip";
|
|
16
15
|
import { pipeline } from "node:stream/promises";
|
|
16
|
+
import { Readable, Transform } from "node:stream";
|
|
17
17
|
//#region src/browser/providers/cloakbrowser.ts
|
|
18
18
|
/**
|
|
19
19
|
* CloakBrowser provider — anti-fingerprint Chromium with stealth capabilities.
|
|
@@ -15,6 +15,7 @@ const REGISTRY_COMMAND_MODULES = {
|
|
|
15
15
|
project: () => import("./commands/project.js"),
|
|
16
16
|
config: () => import("./commands/config.js"),
|
|
17
17
|
doctor: () => import("./commands/doctor/index.js"),
|
|
18
|
+
runtime: () => import("./commands/runtime.js"),
|
|
18
19
|
image: () => import("./commands/image.js"),
|
|
19
20
|
channels: () => import("./commands/channels.js"),
|
|
20
21
|
models: () => import("./commands/models.js"),
|
|
@@ -79,6 +79,10 @@ const ROOT_HELP_COMMANDS = [
|
|
|
79
79
|
name: "doctor [options]",
|
|
80
80
|
description: "Check xopc installation health and diagnose common issues"
|
|
81
81
|
},
|
|
82
|
+
{
|
|
83
|
+
name: "runtime",
|
|
84
|
+
description: "Manage Node.js and Python tool runtimes used by agents"
|
|
85
|
+
},
|
|
82
86
|
{
|
|
83
87
|
name: "update [options]",
|
|
84
88
|
description: "Check for and install xopc updates"
|
|
@@ -7,21 +7,21 @@ async function checkNodeVersion(_ctx) {
|
|
|
7
7
|
const major = parseNodeMajorVersion();
|
|
8
8
|
if (major === 0) return {
|
|
9
9
|
id: "node-version",
|
|
10
|
-
label: "Node.js",
|
|
10
|
+
label: "Host Node.js",
|
|
11
11
|
status: "warn",
|
|
12
12
|
message: "Could not parse Node.js version.",
|
|
13
13
|
hints: [`process.version=${process.version}`]
|
|
14
14
|
};
|
|
15
15
|
if (major < 22) return {
|
|
16
16
|
id: "node-version",
|
|
17
|
-
label: "Node.js",
|
|
17
|
+
label: "Host Node.js",
|
|
18
18
|
status: "fail",
|
|
19
19
|
message: `Node ${major} is below the required minimum (22).`,
|
|
20
20
|
hints: ["Install Node.js 22+ from https://nodejs.org/"]
|
|
21
21
|
};
|
|
22
22
|
return {
|
|
23
23
|
id: "node-version",
|
|
24
|
-
label: "Node.js",
|
|
24
|
+
label: "Host Node.js",
|
|
25
25
|
status: "pass",
|
|
26
26
|
message: `Node.js ${process.version} meets the project requirement (>= 22).`,
|
|
27
27
|
hints: []
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { init_loader, loadConfig } from "../../../../config/loader.js";
|
|
2
|
+
import { ManagedRuntimeManager } from "../../../../runtime-tools/manager.js";
|
|
3
|
+
//#region src/cli/commands/doctor/checks/tool-runtimes.ts
|
|
4
|
+
init_loader();
|
|
5
|
+
async function checkToolRuntimes(ctx) {
|
|
6
|
+
const config = loadConfig(ctx.configPath);
|
|
7
|
+
const statuses = await new ManagedRuntimeManager({
|
|
8
|
+
stateDir: ctx.stateDir,
|
|
9
|
+
config: config.runtimeTools
|
|
10
|
+
}).statusAll();
|
|
11
|
+
const invalid = statuses.filter((status) => status.state === "corrupted" || status.state === "failed");
|
|
12
|
+
const absent = statuses.filter((status) => status.state === "absent");
|
|
13
|
+
if (invalid.length > 0) return {
|
|
14
|
+
id: "tool-runtimes",
|
|
15
|
+
label: "Agent tool runtimes",
|
|
16
|
+
status: "fail",
|
|
17
|
+
message: `${invalid.map((status) => status.runtime).join(", ")} runtime installation is invalid.`,
|
|
18
|
+
hints: invalid.map((status) => `Run xopc runtime repair ${status.runtime}`)
|
|
19
|
+
};
|
|
20
|
+
if (absent.length > 0) return {
|
|
21
|
+
id: "tool-runtimes",
|
|
22
|
+
label: "Agent tool runtimes",
|
|
23
|
+
status: "warn",
|
|
24
|
+
message: `${absent.map((status) => status.runtime).join(", ")} runtime is not installed.`,
|
|
25
|
+
hints: absent.map((status) => `Run xopc runtime install ${status.runtime}`)
|
|
26
|
+
};
|
|
27
|
+
return {
|
|
28
|
+
id: "tool-runtimes",
|
|
29
|
+
label: "Agent tool runtimes",
|
|
30
|
+
status: "pass",
|
|
31
|
+
message: statuses.map((status) => status.message).join("; "),
|
|
32
|
+
hints: []
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
36
|
+
export { checkToolRuntimes };
|
|
@@ -15,10 +15,12 @@ import { checkVersionUpdate } from "./checks/version-check.js";
|
|
|
15
15
|
import { checkChannelPlugins } from "./checks/channel-plugins.js";
|
|
16
16
|
import { checkMigrations } from "./checks/migrations.js";
|
|
17
17
|
import { checkImageProviders } from "./checks/image-providers.js";
|
|
18
|
+
import { checkToolRuntimes } from "./checks/tool-runtimes.js";
|
|
18
19
|
//#region src/cli/commands/doctor/flow.ts
|
|
19
20
|
const DOCTOR_CHECKS = [
|
|
20
21
|
checkVersionUpdate,
|
|
21
22
|
checkNodeVersion,
|
|
23
|
+
checkToolRuntimes,
|
|
22
24
|
checkMigrations,
|
|
23
25
|
checkConfigHealth,
|
|
24
26
|
checkStateIntegrity,
|
|
@@ -12,9 +12,9 @@ import { join, resolve } from "node:path";
|
|
|
12
12
|
import { existsSync, readFileSync, rmSync, statSync } from "node:fs";
|
|
13
13
|
import { execSync } from "node:child_process";
|
|
14
14
|
import { createHash } from "node:crypto";
|
|
15
|
+
import semver from "semver";
|
|
15
16
|
import { confirm } from "@inquirer/prompts";
|
|
16
17
|
import { Command } from "commander";
|
|
17
|
-
import semver from "semver";
|
|
18
18
|
//#region src/cli/commands/extension-marketplace.ts
|
|
19
19
|
init_loader();
|
|
20
20
|
init_paths();
|
|
@@ -2,7 +2,25 @@
|
|
|
2
2
|
* Catalog-driven model configuration for onboarding.
|
|
3
3
|
*/
|
|
4
4
|
import type { Config } from '../../../config/schema.js';
|
|
5
|
+
import { type ModelCatalogStore } from '../../../providers/model-catalog-store.js';
|
|
5
6
|
import { XopcCloudModelSource } from '../../../providers/xopc-cloud-model-source.js';
|
|
6
7
|
import type { CLIContext } from '../../registry.js';
|
|
8
|
+
export declare function defaultXopcCloudImageModel(catalogStore?: ModelCatalogStore): string | undefined;
|
|
9
|
+
export declare function defaultXopcCloudAudioModels(catalogStore?: ModelCatalogStore): {
|
|
10
|
+
stt?: string;
|
|
11
|
+
tts?: {
|
|
12
|
+
model: string;
|
|
13
|
+
voice: string;
|
|
14
|
+
maxCharacters: number;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export declare function setPrimaryModel(config: Config, workspacePath: string, modelRef: string, defaultImageGenerationModel?: string, defaultAudioModels?: {
|
|
18
|
+
stt?: string;
|
|
19
|
+
tts?: {
|
|
20
|
+
model: string;
|
|
21
|
+
voice: string;
|
|
22
|
+
maxCharacters: number;
|
|
23
|
+
};
|
|
24
|
+
}): Config;
|
|
7
25
|
export declare function refreshOnboardModelCatalogIfNeeded(provider: string, hasCatalogModels: boolean, source?: Pick<XopcCloudModelSource, 'refresh'>): Promise<void>;
|
|
8
26
|
export declare function setupModel(existingConfig: Config | null, ctx: CLIContext): Promise<Config>;
|
|
@@ -2,6 +2,7 @@ import { getAgentDefaultModelRef, init_schema } from "../../../config/schema.js"
|
|
|
2
2
|
import { resolveModelsJsonPath } from "../../../config/paths.js";
|
|
3
3
|
import { init_models_json, loadModelsJson, saveModelsJson } from "../../../config/models-json.js";
|
|
4
4
|
import { getApiKeyFromEnv } from "../../../providers/env-keys.js";
|
|
5
|
+
import { getModelCatalogStore, init_model_catalog_store } from "../../../providers/model-catalog-store.js";
|
|
5
6
|
import { getModelRegistry } from "../../../providers/model-registry.js";
|
|
6
7
|
import { CredentialResolver, init_credentials } from "../../../auth/credentials.js";
|
|
7
8
|
import { getAllProviders, getModelsByProvider, getProviderDisplayName, init_providers, providerSupportsApiKey, providerSupportsOAuth } from "../../../providers/index.js";
|
|
@@ -23,7 +24,25 @@ init_credentials();
|
|
|
23
24
|
init_models_json();
|
|
24
25
|
init_schema();
|
|
25
26
|
init_providers();
|
|
26
|
-
|
|
27
|
+
init_model_catalog_store();
|
|
28
|
+
function defaultXopcCloudImageModel(catalogStore = getModelCatalogStore()) {
|
|
29
|
+
const model = catalogStore.getSource("xopc-cloud")?.models.find((entry) => entry.availability === "available" && entry.kind === "image" && entry.operations.includes("images.generate"));
|
|
30
|
+
return model ? `xopc-cloud/${model.id}` : void 0;
|
|
31
|
+
}
|
|
32
|
+
function defaultXopcCloudAudioModels(catalogStore = getModelCatalogStore()) {
|
|
33
|
+
const models = catalogStore.getSource("xopc-cloud")?.models.filter((entry) => entry.availability === "available") ?? [];
|
|
34
|
+
const stt = models.find((entry) => entry.kind === "stt");
|
|
35
|
+
const tts = models.find((entry) => entry.kind === "tts" && entry.tts?.defaultVoice);
|
|
36
|
+
return {
|
|
37
|
+
...stt ? { stt: stt.id } : {},
|
|
38
|
+
...tts?.tts?.defaultVoice ? { tts: {
|
|
39
|
+
model: tts.id,
|
|
40
|
+
voice: tts.tts.defaultVoice,
|
|
41
|
+
maxCharacters: tts.tts.maxCharacters
|
|
42
|
+
} } : {}
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
function setPrimaryModel(config, workspacePath, modelRef, defaultImageGenerationModel, defaultAudioModels) {
|
|
27
46
|
const id = config.agents.default ?? config.agents.list[0]?.id ?? "main";
|
|
28
47
|
const index = config.agents.list.findIndex((entry) => entry.id === id);
|
|
29
48
|
let nextConfig = config;
|
|
@@ -42,12 +61,64 @@ function setPrimaryModel(config, workspacePath, modelRef) {
|
|
|
42
61
|
}
|
|
43
62
|
};
|
|
44
63
|
}
|
|
64
|
+
const presetId = nextConfig.agents.defaultPreset ?? "default";
|
|
65
|
+
const currentModels = nextConfig.agents.capabilityPresets[presetId]?.models;
|
|
45
66
|
const prep = prepareUpdateGlobalDefaults(nextConfig, { models: {
|
|
67
|
+
...currentModels,
|
|
46
68
|
defaultRole: "deep",
|
|
47
|
-
roles: {
|
|
69
|
+
roles: {
|
|
70
|
+
...currentModels?.roles,
|
|
71
|
+
deep: { model: modelRef }
|
|
72
|
+
},
|
|
73
|
+
...!currentModels?.imageGenerationModel && defaultImageGenerationModel ? { imageGenerationModel: { primary: defaultImageGenerationModel } } : {}
|
|
48
74
|
} });
|
|
49
75
|
if (prep.ok === false) throw new Error(prep.error);
|
|
50
|
-
|
|
76
|
+
let configured = prep.data.nextConfig;
|
|
77
|
+
if (defaultAudioModels?.stt && !configured.tools.media?.audio) configured = {
|
|
78
|
+
...configured,
|
|
79
|
+
tools: {
|
|
80
|
+
...configured.tools,
|
|
81
|
+
media: {
|
|
82
|
+
...configured.tools.media,
|
|
83
|
+
audio: {
|
|
84
|
+
enabled: true,
|
|
85
|
+
provider: "xopc-cloud",
|
|
86
|
+
models: [{
|
|
87
|
+
provider: "xopc-cloud",
|
|
88
|
+
model: defaultAudioModels.stt,
|
|
89
|
+
capabilities: ["audio"]
|
|
90
|
+
}],
|
|
91
|
+
providers: { "xopc-cloud": { model: defaultAudioModels.stt } },
|
|
92
|
+
fallback: {
|
|
93
|
+
enabled: false,
|
|
94
|
+
order: []
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
if (defaultAudioModels?.tts && !configured.messages?.tts) configured = {
|
|
101
|
+
...configured,
|
|
102
|
+
messages: {
|
|
103
|
+
...configured.messages,
|
|
104
|
+
tts: {
|
|
105
|
+
enabled: true,
|
|
106
|
+
provider: "xopc-cloud",
|
|
107
|
+
trigger: "off",
|
|
108
|
+
fallback: {
|
|
109
|
+
enabled: false,
|
|
110
|
+
order: []
|
|
111
|
+
},
|
|
112
|
+
maxTextLength: defaultAudioModels.tts.maxCharacters,
|
|
113
|
+
timeoutMs: 6e4,
|
|
114
|
+
providers: { "xopc-cloud": {
|
|
115
|
+
model: defaultAudioModels.tts.model,
|
|
116
|
+
voice: defaultAudioModels.tts.voice
|
|
117
|
+
} }
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
return configured;
|
|
51
122
|
}
|
|
52
123
|
function formatRecommended(provider) {
|
|
53
124
|
const labels = getRecommendedModelsForProvider(provider, 3).map((m) => m.name || m.id);
|
|
@@ -469,7 +540,12 @@ async function setupModel(existingConfig, ctx) {
|
|
|
469
540
|
}))
|
|
470
541
|
});
|
|
471
542
|
console.log("\n✅ Model configured:", model);
|
|
472
|
-
|
|
543
|
+
const imageModel = provider === "xopc-cloud" ? defaultXopcCloudImageModel() : void 0;
|
|
544
|
+
const audioModels = provider === "xopc-cloud" ? defaultXopcCloudAudioModels() : void 0;
|
|
545
|
+
if (imageModel) console.log("✅ Image generation configured:", imageModel);
|
|
546
|
+
if (audioModels?.stt) console.log("✅ Speech recognition configured:", audioModels.stt);
|
|
547
|
+
if (audioModels?.tts) console.log("✅ Speech synthesis configured:", audioModels.tts.model);
|
|
548
|
+
return setPrimaryModel(config, ctx.workspacePath, model, imageModel, audioModels);
|
|
473
549
|
}
|
|
474
550
|
//#endregion
|
|
475
|
-
export { refreshOnboardModelCatalogIfNeeded, setupModel };
|
|
551
|
+
export { defaultXopcCloudAudioModels, defaultXopcCloudImageModel, refreshOnboardModelCatalogIfNeeded, setPrimaryModel, setupModel };
|