@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
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ProxyAgent, fetch } from "undici";
|
|
2
|
+
//#region src/runtime-tools/network.ts
|
|
3
|
+
const PROXY_AGENTS = /* @__PURE__ */ new Map();
|
|
4
|
+
function dispatcher(proxy) {
|
|
5
|
+
if (!proxy) return void 0;
|
|
6
|
+
const existing = PROXY_AGENTS.get(proxy);
|
|
7
|
+
if (existing) return existing;
|
|
8
|
+
const created = new ProxyAgent(proxy);
|
|
9
|
+
PROXY_AGENTS.set(proxy, created);
|
|
10
|
+
return created;
|
|
11
|
+
}
|
|
12
|
+
async function fetchRuntimeResource(params) {
|
|
13
|
+
const timeoutSignal = AbortSignal.timeout(params.timeoutMs);
|
|
14
|
+
const signal = params.signal ? AbortSignal.any([params.signal, timeoutSignal]) : timeoutSignal;
|
|
15
|
+
return await fetch(params.url, {
|
|
16
|
+
...params.init,
|
|
17
|
+
dispatcher: dispatcher(params.proxy),
|
|
18
|
+
signal
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
async function readRuntimeResponseText(response, maxBytes) {
|
|
22
|
+
if (!response.body) return "";
|
|
23
|
+
const reader = response.body.getReader();
|
|
24
|
+
const chunks = [];
|
|
25
|
+
let bytes = 0;
|
|
26
|
+
try {
|
|
27
|
+
while (true) {
|
|
28
|
+
const { done, value } = await reader.read();
|
|
29
|
+
if (done) break;
|
|
30
|
+
bytes += value.byteLength;
|
|
31
|
+
if (bytes > maxBytes) throw new Error("Response exceeds size limit");
|
|
32
|
+
chunks.push(Buffer.from(value));
|
|
33
|
+
}
|
|
34
|
+
} catch (error) {
|
|
35
|
+
await reader.cancel().catch(() => {});
|
|
36
|
+
throw error;
|
|
37
|
+
}
|
|
38
|
+
return Buffer.concat(chunks, bytes).toString("utf8");
|
|
39
|
+
}
|
|
40
|
+
//#endregion
|
|
41
|
+
export { fetchRuntimeResource, readRuntimeResponseText };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { RuntimeKind } from './types.js';
|
|
2
|
+
export type OfflineBundleArtifact = {
|
|
3
|
+
archivePath: string;
|
|
4
|
+
archiveFile: string;
|
|
5
|
+
archiveType: 'zip' | 'tar.gz';
|
|
6
|
+
sha256: string;
|
|
7
|
+
};
|
|
8
|
+
export declare function bundledPythonArchiveName(params: {
|
|
9
|
+
version: string;
|
|
10
|
+
platform: string;
|
|
11
|
+
}): string;
|
|
12
|
+
export declare function resolveOfflineBundleArtifact(params: {
|
|
13
|
+
bundleDir: string;
|
|
14
|
+
runtime: RuntimeKind;
|
|
15
|
+
archiveFile: string;
|
|
16
|
+
}): Promise<OfflineBundleArtifact>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { RuntimeError } from "./errors.js";
|
|
2
|
+
import { sha256File } from "./downloader.js";
|
|
3
|
+
import { isAbsolute, join } from "node:path";
|
|
4
|
+
import { access, readFile } from "node:fs/promises";
|
|
5
|
+
//#region src/runtime-tools/offline-bundle.ts
|
|
6
|
+
function parseChecksum(text, archiveFile) {
|
|
7
|
+
for (const line of text.split(/\r?\n/).map((item) => item.trim()).filter(Boolean)) {
|
|
8
|
+
const match = line.match(/^([a-fA-F0-9]{64})(?:\s+[*]?(.+))?$/);
|
|
9
|
+
if (match && (!match[2] || match[2] === archiveFile)) return match[1].toLowerCase();
|
|
10
|
+
}
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
13
|
+
function bundledPythonArchiveName(params) {
|
|
14
|
+
const extension = params.platform.startsWith("win32-") ? "zip" : "tar.gz";
|
|
15
|
+
return `python-${params.version}-${params.platform}.${extension}`;
|
|
16
|
+
}
|
|
17
|
+
async function resolveOfflineBundleArtifact(params) {
|
|
18
|
+
if (!isAbsolute(params.bundleDir)) throw new RuntimeError("runtimeTools.download.bundleDir must be an absolute path", "RUNTIME_ARCHIVE_INVALID", params.runtime, "offline_bundle", false);
|
|
19
|
+
const archivePath = join(params.bundleDir, params.archiveFile);
|
|
20
|
+
try {
|
|
21
|
+
await access(archivePath);
|
|
22
|
+
} catch {
|
|
23
|
+
throw new RuntimeError(`Offline bundle is missing ${params.archiveFile}`, "RUNTIME_NOT_FOUND", params.runtime, "offline_bundle", true);
|
|
24
|
+
}
|
|
25
|
+
const checksumFiles = [`${archivePath}.sha256`, join(params.bundleDir, "SHASUMS256.txt")];
|
|
26
|
+
let expected = null;
|
|
27
|
+
for (const checksumPath of checksumFiles) try {
|
|
28
|
+
expected = parseChecksum(await readFile(checksumPath, "utf8"), params.archiveFile);
|
|
29
|
+
if (expected) break;
|
|
30
|
+
} catch {}
|
|
31
|
+
if (!expected) throw new RuntimeError(`Offline bundle has no checksum for ${params.archiveFile}`, "RUNTIME_CHECKSUM_MISMATCH", params.runtime, "offline_bundle", false);
|
|
32
|
+
if (await sha256File(archivePath) !== expected) throw new RuntimeError(`Offline bundle checksum mismatch for ${params.archiveFile}`, "RUNTIME_CHECKSUM_MISMATCH", params.runtime, "offline_bundle", true);
|
|
33
|
+
return {
|
|
34
|
+
archivePath,
|
|
35
|
+
archiveFile: params.archiveFile,
|
|
36
|
+
archiveType: params.archiveFile.endsWith(".zip") ? "zip" : "tar.gz",
|
|
37
|
+
sha256: expected
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
//#endregion
|
|
41
|
+
export { bundledPythonArchiveName, resolveOfflineBundleArtifact };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { RuntimeKind } from './types.js';
|
|
2
|
+
export declare function runtimeToolsRoot(stateDir: string): string;
|
|
3
|
+
export declare function runtimeVersionDir(stateDir: string, runtime: RuntimeKind, version: string): string;
|
|
4
|
+
export declare function runtimeManifestPath(stateDir: string, runtime: RuntimeKind): string;
|
|
5
|
+
export declare function runtimeLockPath(stateDir: string, runtime: RuntimeKind, version: string): string;
|
|
6
|
+
export declare function runtimeDownloadPath(stateDir: string, archiveFile: string): string;
|
|
7
|
+
export declare function runtimeStagingDir(stateDir: string, runtime: RuntimeKind, version: string, operationId: string): string;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { join } from "node:path";
|
|
2
|
+
//#region src/runtime-tools/paths.ts
|
|
3
|
+
function runtimeToolsRoot(stateDir) {
|
|
4
|
+
return join(stateDir, "tools");
|
|
5
|
+
}
|
|
6
|
+
function runtimeVersionDir(stateDir, runtime, version) {
|
|
7
|
+
return join(runtimeToolsRoot(stateDir), runtime, "versions", version);
|
|
8
|
+
}
|
|
9
|
+
function runtimeManifestPath(stateDir, runtime) {
|
|
10
|
+
return join(runtimeToolsRoot(stateDir), "manifests", `${runtime}.json`);
|
|
11
|
+
}
|
|
12
|
+
function runtimeLockPath(stateDir, runtime, version) {
|
|
13
|
+
return join(runtimeToolsRoot(stateDir), "locks", `${runtime}-${version}.lock`);
|
|
14
|
+
}
|
|
15
|
+
function runtimeDownloadPath(stateDir, archiveFile) {
|
|
16
|
+
return join(runtimeToolsRoot(stateDir), "downloads", `${archiveFile}.partial`);
|
|
17
|
+
}
|
|
18
|
+
function runtimeStagingDir(stateDir, runtime, version, operationId) {
|
|
19
|
+
return join(runtimeToolsRoot(stateDir), "staging", `${runtime}-${version}-${operationId}`);
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
export { runtimeDownloadPath, runtimeLockPath, runtimeManifestPath, runtimeStagingDir, runtimeToolsRoot, runtimeVersionDir };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { RuntimeExecutables, RuntimeKind } from './types.js';
|
|
2
|
+
export declare function parseRuntimeVersion(output: string): string | null;
|
|
3
|
+
export declare function versionSatisfies(actual: string, requested: string): boolean;
|
|
4
|
+
export declare function probeSystemRuntime(runtime: RuntimeKind, requestedVersion: string): Promise<{
|
|
5
|
+
version: string;
|
|
6
|
+
executables: RuntimeExecutables;
|
|
7
|
+
} | null>;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { runRuntimeCommand } from "./command.js";
|
|
2
|
+
import semver from "semver";
|
|
3
|
+
//#region src/runtime-tools/probe.ts
|
|
4
|
+
function parseRuntimeVersion(output) {
|
|
5
|
+
return output.match(/v?(\d+\.\d+\.\d+)/)?.[1] ?? null;
|
|
6
|
+
}
|
|
7
|
+
function versionSatisfies(actual, requested) {
|
|
8
|
+
const normalized = semver.valid(actual);
|
|
9
|
+
if (!normalized) return false;
|
|
10
|
+
if (/^\d+$/.test(requested)) return semver.major(normalized) === Number(requested);
|
|
11
|
+
if (/^\d+\.\d+$/.test(requested)) {
|
|
12
|
+
const [major, minor] = requested.split(".").map(Number);
|
|
13
|
+
return semver.major(normalized) === major && semver.minor(normalized) === minor;
|
|
14
|
+
}
|
|
15
|
+
return semver.satisfies(normalized, requested) || normalized === requested;
|
|
16
|
+
}
|
|
17
|
+
function commandNames(runtime) {
|
|
18
|
+
if (runtime === "node") return process.platform === "win32" ? ["node.exe", "node"] : ["node"];
|
|
19
|
+
if (runtime === "uv") return process.platform === "win32" ? ["uv.exe", "uv"] : ["uv"];
|
|
20
|
+
return process.platform === "win32" ? [
|
|
21
|
+
"python.exe",
|
|
22
|
+
"python3.exe",
|
|
23
|
+
"python"
|
|
24
|
+
] : ["python3", "python"];
|
|
25
|
+
}
|
|
26
|
+
async function probeSystemRuntime(runtime, requestedVersion) {
|
|
27
|
+
for (const command of commandNames(runtime)) {
|
|
28
|
+
const versionResult = await runRuntimeCommand({
|
|
29
|
+
command,
|
|
30
|
+
args: ["--version"]
|
|
31
|
+
});
|
|
32
|
+
if (!versionResult.ok) continue;
|
|
33
|
+
const version = parseRuntimeVersion(`${versionResult.stdout}\n${versionResult.stderr}`);
|
|
34
|
+
if (!version || !versionSatisfies(version, requestedVersion)) continue;
|
|
35
|
+
if (runtime === "node") {
|
|
36
|
+
const npm = process.platform === "win32" ? "npm.cmd" : "npm";
|
|
37
|
+
const npx = process.platform === "win32" ? "npx.cmd" : "npx";
|
|
38
|
+
const [npmResult, npxResult] = await Promise.all([runRuntimeCommand({
|
|
39
|
+
command: npm,
|
|
40
|
+
args: ["--version"]
|
|
41
|
+
}), runRuntimeCommand({
|
|
42
|
+
command: npx,
|
|
43
|
+
args: ["--version"]
|
|
44
|
+
})]);
|
|
45
|
+
if (!npmResult.ok || !npxResult.ok) continue;
|
|
46
|
+
return {
|
|
47
|
+
version,
|
|
48
|
+
executables: {
|
|
49
|
+
primary: command,
|
|
50
|
+
node: command,
|
|
51
|
+
npm,
|
|
52
|
+
npx
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
return {
|
|
57
|
+
version,
|
|
58
|
+
executables: runtime === "uv" ? {
|
|
59
|
+
primary: command,
|
|
60
|
+
uv: command,
|
|
61
|
+
uvx: process.platform === "win32" ? "uvx.exe" : "uvx"
|
|
62
|
+
} : {
|
|
63
|
+
primary: command,
|
|
64
|
+
python: command
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
//#endregion
|
|
71
|
+
export { parseRuntimeVersion, probeSystemRuntime, versionSatisfies };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { RuntimeToolsConfig } from '../config/schema.js';
|
|
2
|
+
export type RuntimePruneResult = {
|
|
3
|
+
removed: string[];
|
|
4
|
+
reclaimedBytes: number;
|
|
5
|
+
};
|
|
6
|
+
export declare function pruneRuntimeTools(params: {
|
|
7
|
+
stateDir: string;
|
|
8
|
+
config: RuntimeToolsConfig;
|
|
9
|
+
now?: number;
|
|
10
|
+
}): Promise<RuntimePruneResult>;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { runtimeToolsRoot } from "./paths.js";
|
|
2
|
+
import { readRuntimeManifest } from "./manifest-store.js";
|
|
3
|
+
import { join, resolve } from "node:path";
|
|
4
|
+
import { lstat, readdir, rm, stat } from "node:fs/promises";
|
|
5
|
+
//#region src/runtime-tools/prune.ts
|
|
6
|
+
const RUNTIMES = [
|
|
7
|
+
"node",
|
|
8
|
+
"uv",
|
|
9
|
+
"python"
|
|
10
|
+
];
|
|
11
|
+
const STALE_TEMP_MS = 1440 * 60 * 1e3;
|
|
12
|
+
async function pathSize(path) {
|
|
13
|
+
const details = await lstat(path);
|
|
14
|
+
if (details.isSymbolicLink()) return details.size;
|
|
15
|
+
if (!details.isDirectory()) return details.size;
|
|
16
|
+
let total = 0;
|
|
17
|
+
for (const entry of await readdir(path)) total += await pathSize(join(path, entry));
|
|
18
|
+
return total;
|
|
19
|
+
}
|
|
20
|
+
async function listEntries(path) {
|
|
21
|
+
try {
|
|
22
|
+
return await Promise.all((await readdir(path)).map(async (name) => {
|
|
23
|
+
const entryPath = join(path, name);
|
|
24
|
+
return {
|
|
25
|
+
path: entryPath,
|
|
26
|
+
mtimeMs: (await stat(entryPath)).mtimeMs,
|
|
27
|
+
size: await pathSize(entryPath)
|
|
28
|
+
};
|
|
29
|
+
}));
|
|
30
|
+
} catch (error) {
|
|
31
|
+
if (error.code === "ENOENT") return [];
|
|
32
|
+
throw error;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
async function pruneRuntimeTools(params) {
|
|
36
|
+
const removed = [];
|
|
37
|
+
let reclaimedBytes = 0;
|
|
38
|
+
const root = runtimeToolsRoot(params.stateDir);
|
|
39
|
+
for (const runtime of RUNTIMES) {
|
|
40
|
+
const entries = (await listEntries(join(root, runtime, "versions"))).sort((a, b) => b.mtimeMs - a.mtimeMs);
|
|
41
|
+
const manifest = await readRuntimeManifest(params.stateDir, runtime);
|
|
42
|
+
const entryPaths = new Set(entries.map((entry) => resolve(entry.path)));
|
|
43
|
+
const activePath = manifest && entryPaths.has(resolve(manifest.installDir)) ? resolve(manifest.installDir) : null;
|
|
44
|
+
const keep = /* @__PURE__ */ new Set();
|
|
45
|
+
if (activePath) keep.add(activePath);
|
|
46
|
+
for (const entry of entries) {
|
|
47
|
+
if (keep.size >= params.config.retention.keepVersions) break;
|
|
48
|
+
keep.add(resolve(entry.path));
|
|
49
|
+
}
|
|
50
|
+
for (const entry of entries) {
|
|
51
|
+
if (keep.has(resolve(entry.path))) continue;
|
|
52
|
+
await rm(entry.path, {
|
|
53
|
+
recursive: true,
|
|
54
|
+
force: true
|
|
55
|
+
});
|
|
56
|
+
removed.push(entry.path);
|
|
57
|
+
reclaimedBytes += entry.size;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
const now = params.now ?? Date.now();
|
|
61
|
+
for (const entry of await listEntries(join(root, "staging"))) {
|
|
62
|
+
if (now - entry.mtimeMs < STALE_TEMP_MS) continue;
|
|
63
|
+
await rm(entry.path, {
|
|
64
|
+
recursive: true,
|
|
65
|
+
force: true
|
|
66
|
+
});
|
|
67
|
+
removed.push(entry.path);
|
|
68
|
+
reclaimedBytes += entry.size;
|
|
69
|
+
}
|
|
70
|
+
const maxCacheBytes = params.config.retention.maxCacheBytes;
|
|
71
|
+
if (maxCacheBytes !== void 0) {
|
|
72
|
+
const cacheEntries = (await listEntries(join(root, "downloads"))).sort((a, b) => b.mtimeMs - a.mtimeMs);
|
|
73
|
+
let retained = 0;
|
|
74
|
+
for (const entry of cacheEntries) {
|
|
75
|
+
if (retained + entry.size <= maxCacheBytes) {
|
|
76
|
+
retained += entry.size;
|
|
77
|
+
continue;
|
|
78
|
+
}
|
|
79
|
+
await rm(entry.path, {
|
|
80
|
+
recursive: true,
|
|
81
|
+
force: true
|
|
82
|
+
});
|
|
83
|
+
removed.push(entry.path);
|
|
84
|
+
reclaimedBytes += entry.size;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
return {
|
|
88
|
+
removed,
|
|
89
|
+
reclaimedBytes
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
//#endregion
|
|
93
|
+
export { pruneRuntimeTools };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { RuntimeToolsConfig } from '../config/schema.js';
|
|
2
|
+
export type RuntimeKind = 'node' | 'uv' | 'python';
|
|
3
|
+
export type RuntimeSource = 'managed' | 'system';
|
|
4
|
+
export type RuntimeState = 'disabled' | 'unsupported' | 'absent' | 'installing' | 'ready' | 'degraded' | 'corrupted' | 'failed';
|
|
5
|
+
export interface RuntimeExecutables {
|
|
6
|
+
primary: string;
|
|
7
|
+
node?: string;
|
|
8
|
+
npm?: string;
|
|
9
|
+
npx?: string;
|
|
10
|
+
corepack?: string;
|
|
11
|
+
uv?: string;
|
|
12
|
+
uvx?: string;
|
|
13
|
+
python?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface InstalledRuntimeManifest {
|
|
16
|
+
schemaVersion: 1;
|
|
17
|
+
runtime: RuntimeKind;
|
|
18
|
+
version: string;
|
|
19
|
+
source: RuntimeSource;
|
|
20
|
+
platform: string;
|
|
21
|
+
arch: string;
|
|
22
|
+
installDir: string;
|
|
23
|
+
executables: RuntimeExecutables;
|
|
24
|
+
installedAt: string;
|
|
25
|
+
verifiedAt: string;
|
|
26
|
+
distribution?: {
|
|
27
|
+
url: string;
|
|
28
|
+
sha256: string;
|
|
29
|
+
archiveFile: string;
|
|
30
|
+
catalogVersion: string;
|
|
31
|
+
};
|
|
32
|
+
probe: {
|
|
33
|
+
versionOutput: string;
|
|
34
|
+
packageManagerVersion?: string;
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export interface ResolvedRuntime {
|
|
38
|
+
runtime: RuntimeKind;
|
|
39
|
+
version: string;
|
|
40
|
+
source: RuntimeSource;
|
|
41
|
+
executable: string;
|
|
42
|
+
executables: RuntimeExecutables;
|
|
43
|
+
installDir?: string;
|
|
44
|
+
}
|
|
45
|
+
export interface RuntimeStatus {
|
|
46
|
+
runtime: RuntimeKind;
|
|
47
|
+
state: RuntimeState;
|
|
48
|
+
requestedVersion: string;
|
|
49
|
+
resolved?: ResolvedRuntime;
|
|
50
|
+
message: string;
|
|
51
|
+
repairable: boolean;
|
|
52
|
+
}
|
|
53
|
+
export interface RuntimeRequest {
|
|
54
|
+
runtime: RuntimeKind;
|
|
55
|
+
version?: string;
|
|
56
|
+
allowProvision?: boolean;
|
|
57
|
+
signal?: AbortSignal;
|
|
58
|
+
}
|
|
59
|
+
export interface RuntimeManagerOptions {
|
|
60
|
+
stateDir: string;
|
|
61
|
+
config: RuntimeToolsConfig;
|
|
62
|
+
}
|
|
63
|
+
export interface RuntimeProgressEvent {
|
|
64
|
+
operationId: string;
|
|
65
|
+
runtime: RuntimeKind;
|
|
66
|
+
phase: 'resolve' | 'download' | 'verify' | 'extract' | 'install' | 'probe' | 'complete';
|
|
67
|
+
message: string;
|
|
68
|
+
downloadedBytes?: number;
|
|
69
|
+
totalBytes?: number;
|
|
70
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -2,8 +2,8 @@ import { isPathUnderWorkspace } from "../gateway/workspace-editor-path.js";
|
|
|
2
2
|
import { relative, resolve } from "node:path";
|
|
3
3
|
import { createReadStream } from "node:fs";
|
|
4
4
|
import { lstat, readdir, realpath, stat } from "node:fs/promises";
|
|
5
|
-
import { Readable, Transform } from "node:stream";
|
|
6
5
|
import { pipeline } from "node:stream/promises";
|
|
6
|
+
import { Readable, Transform } from "node:stream";
|
|
7
7
|
import { crc32, createDeflateRaw } from "node:zlib";
|
|
8
8
|
//#region src/share/share-zip.ts
|
|
9
9
|
const SIG_LOCAL = 67324752;
|
|
@@ -2,16 +2,20 @@ ALTER TABLE memory_evidence ADD COLUMN session_key TEXT;
|
|
|
2
2
|
ALTER TABLE memory_evidence ADD COLUMN turn_id TEXT;
|
|
3
3
|
ALTER TABLE memory_evidence ADD COLUMN tool_call_id TEXT;
|
|
4
4
|
|
|
5
|
+
-- Preserve evidence while treating deleted legacy sources like ON DELETE SET NULL.
|
|
5
6
|
WITH legacy AS (
|
|
6
7
|
SELECT
|
|
7
8
|
r.record_id,
|
|
8
|
-
|
|
9
|
+
source.item_id AS source_item_id,
|
|
9
10
|
COALESCE(json_extract(j.value, '$.relation'), 'supports') AS relation,
|
|
10
11
|
MAX(CAST(strftime('%s', json_extract(j.value, '$.observedAt')) AS INTEGER) * 1000) AS observed_at,
|
|
11
12
|
MAX(json_extract(j.value, '$.sessionKey')) AS session_key,
|
|
12
13
|
MAX(json_extract(j.value, '$.turnId')) AS turn_id,
|
|
13
14
|
MAX(json_extract(j.value, '$.toolCallId')) AS tool_call_id
|
|
14
|
-
FROM memory_records r
|
|
15
|
+
FROM memory_records r
|
|
16
|
+
JOIN json_each(r.evidence_json) j
|
|
17
|
+
LEFT JOIN knowledge_source_items source
|
|
18
|
+
ON source.item_id = json_extract(j.value, '$.sourceItemId')
|
|
15
19
|
WHERE json_valid(r.evidence_json)
|
|
16
20
|
GROUP BY r.record_id, source_item_id, relation
|
|
17
21
|
)
|
|
@@ -26,29 +30,47 @@ WHERE evidence.record_id = legacy.record_id
|
|
|
26
30
|
AND COALESCE(evidence.source_item_id, '') = COALESCE(legacy.source_item_id, '')
|
|
27
31
|
AND evidence.relation = legacy.relation;
|
|
28
32
|
|
|
33
|
+
WITH legacy AS (
|
|
34
|
+
SELECT
|
|
35
|
+
r.record_id,
|
|
36
|
+
source.item_id AS source_item_id,
|
|
37
|
+
COALESCE(json_extract(j.value, '$.relation'), 'supports') AS relation,
|
|
38
|
+
MAX(json_extract(j.value, '$.sourceText')) AS excerpt,
|
|
39
|
+
MAX(json_extract(j.value, '$.confidence')) AS confidence,
|
|
40
|
+
MAX(CAST(strftime('%s', json_extract(j.value, '$.observedAt')) AS INTEGER) * 1000) AS observed_at,
|
|
41
|
+
MAX(json_extract(j.value, '$.sessionKey')) AS session_key,
|
|
42
|
+
MAX(json_extract(j.value, '$.turnId')) AS turn_id,
|
|
43
|
+
MAX(json_extract(j.value, '$.toolCallId')) AS tool_call_id,
|
|
44
|
+
MAX(r.created_at) AS created_at
|
|
45
|
+
FROM memory_records r
|
|
46
|
+
JOIN json_each(r.evidence_json) j
|
|
47
|
+
LEFT JOIN knowledge_source_items source
|
|
48
|
+
ON source.item_id = json_extract(j.value, '$.sourceItemId')
|
|
49
|
+
WHERE json_valid(r.evidence_json)
|
|
50
|
+
GROUP BY r.record_id, source_item_id, relation
|
|
51
|
+
)
|
|
29
52
|
INSERT INTO memory_evidence (
|
|
30
53
|
evidence_id, record_id, source_item_id, relation, excerpt, confidence,
|
|
31
54
|
observed_at, session_key, turn_id, tool_call_id, created_at
|
|
32
55
|
)
|
|
33
56
|
SELECT
|
|
34
57
|
lower(hex(randomblob(16))),
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
FROM
|
|
46
|
-
WHERE
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
);
|
|
58
|
+
legacy.record_id,
|
|
59
|
+
legacy.source_item_id,
|
|
60
|
+
legacy.relation,
|
|
61
|
+
legacy.excerpt,
|
|
62
|
+
legacy.confidence,
|
|
63
|
+
legacy.observed_at,
|
|
64
|
+
legacy.session_key,
|
|
65
|
+
legacy.turn_id,
|
|
66
|
+
legacy.tool_call_id,
|
|
67
|
+
legacy.created_at
|
|
68
|
+
FROM legacy
|
|
69
|
+
WHERE NOT EXISTS (
|
|
70
|
+
SELECT 1 FROM memory_evidence e
|
|
71
|
+
WHERE e.record_id = legacy.record_id
|
|
72
|
+
AND COALESCE(e.source_item_id, '') = COALESCE(legacy.source_item_id, '')
|
|
73
|
+
AND e.relation = legacy.relation
|
|
74
|
+
);
|
|
53
75
|
|
|
54
76
|
ALTER TABLE memory_records DROP COLUMN evidence_json;
|
|
@@ -81,11 +81,7 @@ function attentionDetail(kind, status, locale, timeoutSeconds) {
|
|
|
81
81
|
}
|
|
82
82
|
function decisionFromTask(model, projectName) {
|
|
83
83
|
const item = model.attention[0];
|
|
84
|
-
if (!item || ![
|
|
85
|
-
"input_required",
|
|
86
|
-
"approval_required",
|
|
87
|
-
"dependency_blocked"
|
|
88
|
-
].includes(item.kind)) return null;
|
|
84
|
+
if (!item || !["input_required", "approval_required"].includes(item.kind)) return null;
|
|
89
85
|
const task = model.task;
|
|
90
86
|
return {
|
|
91
87
|
id: `task:${task.id}`,
|
package/dist/src/tasks/index.js
CHANGED
|
@@ -13,9 +13,9 @@ import { ModelTaskContractPlanner, parseTaskContractResponse } from "./task-cont
|
|
|
13
13
|
import { assembleTaskContext, buildTaskExecutionDirective, getTaskContextManifest, getTaskExecutionBrief } from "./task-context-assembler.js";
|
|
14
14
|
import { TaskRunCoordinator } from "./task-run-coordinator.js";
|
|
15
15
|
import { ProjectMonitoringService, decideProactiveDisposition } from "./project-monitoring-service.js";
|
|
16
|
-
import { ProjectOperatingViewService } from "./project-operating-view-service.js";
|
|
16
|
+
import { ProjectOperatingViewService, projectTaskLane } from "./project-operating-view-service.js";
|
|
17
17
|
import { TaskValueMetricsService } from "./task-value-metrics-service.js";
|
|
18
18
|
import { TaskOutboxDispatcher } from "./task-outbox-dispatcher.js";
|
|
19
19
|
import { TaskRunDispatcher } from "./task-run-dispatcher.js";
|
|
20
20
|
import { TaskSignalService } from "./task-signal-service.js";
|
|
21
|
-
export { AttentionGovernor, HomeQueryService, ModelTaskContractPlanner, ProjectMonitoringService, ProjectOperatingViewService, TaskApplicationService, TaskContextRepository, TaskDependencyError, TaskDependencyService, TaskOutboxDispatcher, TaskReadModelProjector, TaskRepository, TaskRunCoordinator, TaskRunDispatcher, TaskRunRepository, TaskSignalService, TaskValueMetricsService, TaskWorkflowCoordinator, assembleTaskContext, buildHomeBriefing, buildTaskExecutionDirective, decideProactiveDisposition, decisionFromTask, defineTaskContract, getTaskContextManifest, getTaskExecutionBrief, parseTaskContractResponse, resolveExecutionContext };
|
|
21
|
+
export { AttentionGovernor, HomeQueryService, ModelTaskContractPlanner, ProjectMonitoringService, ProjectOperatingViewService, TaskApplicationService, TaskContextRepository, TaskDependencyError, TaskDependencyService, TaskOutboxDispatcher, TaskReadModelProjector, TaskRepository, TaskRunCoordinator, TaskRunDispatcher, TaskRunRepository, TaskSignalService, TaskValueMetricsService, TaskWorkflowCoordinator, assembleTaskContext, buildHomeBriefing, buildTaskExecutionDirective, decideProactiveDisposition, decisionFromTask, defineTaskContract, getTaskContextManifest, getTaskExecutionBrief, parseTaskContractResponse, projectTaskLane, resolveExecutionContext };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { ProjectOperatingView } from '@xopcai/gateway-contract';
|
|
1
|
+
import type { ProjectOperatingView, ProjectTaskCard } from '@xopcai/gateway-contract';
|
|
2
2
|
import type { ProjectService } from '../projects/index.js';
|
|
3
|
+
export declare function projectTaskLane(card: Pick<ProjectTaskCard, 'phase' | 'operationalState' | 'attention'>): ProjectTaskCard['lane'];
|
|
3
4
|
export declare class ProjectOperatingViewService {
|
|
4
5
|
#private;
|
|
5
6
|
private readonly projects;
|
|
@@ -4,14 +4,15 @@ import { TaskReadModelProjector } from "./task-read-model-projector.js";
|
|
|
4
4
|
import { TaskDependencyService } from "./task-dependency-service.js";
|
|
5
5
|
import { ProjectMonitoringService } from "./project-monitoring-service.js";
|
|
6
6
|
//#region src/tasks/project-operating-view-service.ts
|
|
7
|
-
function
|
|
7
|
+
function projectTaskLane(card) {
|
|
8
8
|
if (card.phase === "closed") return "done";
|
|
9
|
-
if (card.
|
|
9
|
+
if (card.attention.some((item) => item.kind === "input_required" || item.kind === "approval_required")) return "needs_user";
|
|
10
10
|
if ([
|
|
11
11
|
"queued",
|
|
12
12
|
"running",
|
|
13
13
|
"verifying"
|
|
14
14
|
].includes(card.operationalState)) return "moving";
|
|
15
|
+
if (card.operationalState === "waiting" || card.operationalState === "blocked") return "waiting";
|
|
15
16
|
return "ready";
|
|
16
17
|
}
|
|
17
18
|
var ProjectOperatingViewService = class {
|
|
@@ -48,7 +49,7 @@ var ProjectOperatingViewService = class {
|
|
|
48
49
|
};
|
|
49
50
|
return {
|
|
50
51
|
...base,
|
|
51
|
-
lane:
|
|
52
|
+
lane: projectTaskLane(base)
|
|
52
53
|
};
|
|
53
54
|
});
|
|
54
55
|
const recentReceipts = projectTasks.flatMap((task) => this.#runs.listReceipts(task.id, 10)).sort((a, b) => b.finalizedAt - a.finalizedAt).slice(0, 10);
|
|
@@ -56,6 +57,7 @@ var ProjectOperatingViewService = class {
|
|
|
56
57
|
return {
|
|
57
58
|
project,
|
|
58
59
|
tasks: cards.sort((a, b) => b.updatedAt - a.updatedAt),
|
|
60
|
+
dependencyEdges: this.#dependencies.listProjectEdges(project.id),
|
|
59
61
|
blockers: cards.flatMap((card) => card.attention.map((item) => ({
|
|
60
62
|
id: item.sourceId ?? `${card.id}:${item.kind}`,
|
|
61
63
|
kind: item.kind,
|
|
@@ -74,4 +76,4 @@ var ProjectOperatingViewService = class {
|
|
|
74
76
|
}
|
|
75
77
|
};
|
|
76
78
|
//#endregion
|
|
77
|
-
export { ProjectOperatingViewService };
|
|
79
|
+
export { ProjectOperatingViewService, projectTaskLane };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TaskDependencySummary } from '@xopcai/gateway-contract';
|
|
1
|
+
import type { ProjectTaskDependencyEdge, TaskDependencySummary } from '@xopcai/gateway-contract';
|
|
2
2
|
import { type TaskAggregate } from './task-repository.js';
|
|
3
3
|
export type TaskDependencyErrorCode = 'not_found' | 'conflict' | 'invalid_dependency' | 'cycle';
|
|
4
4
|
export declare class TaskDependencyError extends Error {
|
|
@@ -10,6 +10,7 @@ export declare class TaskDependencyService {
|
|
|
10
10
|
listDependencies(taskId: string): TaskDependencySummary[];
|
|
11
11
|
listDependents(taskId: string): TaskDependencySummary[];
|
|
12
12
|
listBlocking(taskId: string): TaskDependencySummary[];
|
|
13
|
+
listProjectEdges(projectId: string): ProjectTaskDependencyEdge[];
|
|
13
14
|
listReadyDependents(taskId: string): TaskAggregate[];
|
|
14
15
|
replace(input: {
|
|
15
16
|
taskId: string;
|
|
@@ -23,6 +23,21 @@ var TaskDependencyService = class {
|
|
|
23
23
|
listBlocking(taskId) {
|
|
24
24
|
return this.listDependencies(taskId).filter((dependency) => dependency.phase !== "closed" || dependency.resolution !== "done");
|
|
25
25
|
}
|
|
26
|
+
listProjectEdges(projectId) {
|
|
27
|
+
return getSqliteDatabase().prepare(`SELECT edge.depends_on_task_id AS dependency_task_id,
|
|
28
|
+
edge.task_id AS dependent_task_id
|
|
29
|
+
FROM task_dependencies edge
|
|
30
|
+
JOIN tasks dependency ON dependency.task_id = edge.depends_on_task_id
|
|
31
|
+
JOIN tasks dependent ON dependent.task_id = edge.task_id
|
|
32
|
+
WHERE dependency.project_id = ? AND dependent.project_id = ?
|
|
33
|
+
ORDER BY edge.created_at ASC, edge.depends_on_task_id ASC, edge.task_id ASC`).all(projectId, projectId).map((row) => {
|
|
34
|
+
const edge = row;
|
|
35
|
+
return {
|
|
36
|
+
dependencyTaskId: edge.dependency_task_id,
|
|
37
|
+
dependentTaskId: edge.dependent_task_id
|
|
38
|
+
};
|
|
39
|
+
});
|
|
40
|
+
}
|
|
26
41
|
listReadyDependents(taskId) {
|
|
27
42
|
return getSqliteDatabase().prepare(`SELECT dependent.task_id
|
|
28
43
|
FROM task_dependencies completed_edge
|
|
@@ -6,8 +6,8 @@ import { tmpdir } from "node:os";
|
|
|
6
6
|
import { join } from "node:path";
|
|
7
7
|
import { chmodSync, createWriteStream, existsSync, mkdirSync, rmSync } from "node:fs";
|
|
8
8
|
import { randomBytes } from "node:crypto";
|
|
9
|
-
import { Readable } from "node:stream";
|
|
10
9
|
import { pipeline } from "node:stream/promises";
|
|
10
|
+
import { Readable } from "node:stream";
|
|
11
11
|
//#region src/tunnel/frpc-binary.ts
|
|
12
12
|
init_paths();
|
|
13
13
|
init_logger();
|
|
@@ -14,7 +14,8 @@ export type UserContextScope = {
|
|
|
14
14
|
type: 'global' | 'workspace' | 'project' | 'session';
|
|
15
15
|
id?: string;
|
|
16
16
|
};
|
|
17
|
-
export
|
|
17
|
+
export declare const UNDERSTANDING_KINDS: readonly ["preference", "boundary", "relationship", "routine", "current_state", "long_term_goal", "project_context", "task_lesson", "derived_insight"];
|
|
18
|
+
export type UnderstandingKind = typeof UNDERSTANDING_KINDS[number];
|
|
18
19
|
export type UnderstandingStatus = 'candidate' | 'active' | 'needs_review' | 'stale' | 'archived' | 'rejected';
|
|
19
20
|
export type UserUnderstanding = {
|
|
20
21
|
id: string;
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
//#region src/user-context/domain.ts
|
|
2
2
|
const USER_CONTEXT_PRINCIPAL_ID = "local-owner";
|
|
3
|
+
const UNDERSTANDING_KINDS = [
|
|
4
|
+
"preference",
|
|
5
|
+
"boundary",
|
|
6
|
+
"relationship",
|
|
7
|
+
"routine",
|
|
8
|
+
"current_state",
|
|
9
|
+
"long_term_goal",
|
|
10
|
+
"project_context",
|
|
11
|
+
"task_lesson",
|
|
12
|
+
"derived_insight"
|
|
13
|
+
];
|
|
3
14
|
//#endregion
|
|
4
|
-
export { USER_CONTEXT_PRINCIPAL_ID };
|
|
15
|
+
export { UNDERSTANDING_KINDS, USER_CONTEXT_PRINCIPAL_ID };
|