@xopcai/xopc 0.0.468 → 0.0.469
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/dist/sidepanel.js +5 -0
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/gateway/static/root/assets/{agents-CIV2R_El.js → agents-DZftplJc.js} +3 -3
- package/dist/gateway/static/root/assets/{api-Cl08_xtM.js → api-BnS9d0p6.js} +1 -1
- package/dist/gateway/static/root/assets/{app-link-BkEO3eBe.js → app-link-CauYDM-y.js} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-CncU5JvR.js → apps-page-CXKTWj1s.js} +1 -1
- package/dist/gateway/static/root/assets/arrow-down-to-line-C5D8Vt-L.js +1 -0
- package/dist/gateway/static/root/assets/{attachment-load-DrVGNxJm.js → attachment-load-C9iZLUHv.js} +1 -1
- package/dist/gateway/static/root/assets/attachment-preview-renderer-_6GhoCYk.js +12 -0
- package/dist/gateway/static/root/assets/attachment-utils-core-BPYdUI6y.js +1 -0
- package/dist/gateway/static/root/assets/{automation-task-card-sR61FFLn.js → automation-task-card-BNT3n0qu.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-BNzj3R7A.js → automations-page-DqrAOReO.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-BYmFhO8E.js +9 -0
- package/dist/gateway/static/root/assets/binary-plugins-CnFVuJtL.js +2 -0
- package/dist/gateway/static/root/assets/{block-editor-B4Yqbxab.js → block-editor-jy5CCmhH.js} +9 -9
- package/dist/gateway/static/root/assets/{capabilities-CBSMm_jo.js → capabilities-CaJjMTli.js} +1 -1
- package/dist/gateway/static/root/assets/capabilities-YmBD7oK8.js +1 -0
- package/dist/gateway/static/root/assets/capabilities-page-XgIRdqCb.js +2 -0
- package/dist/gateway/static/root/assets/capabilities-settings-panel-DfyND0IO.js +8 -0
- package/dist/gateway/static/root/assets/channels-DwUmMnA1.js +1 -0
- package/dist/gateway/static/root/assets/{chat-chart-block-CS-cORJt.js → chat-chart-block-B_c5sy7q.js} +1 -1
- package/dist/gateway/static/root/assets/chat-page-DfFXhDRv.js +72 -0
- package/dist/gateway/static/root/assets/{chat-terminal-dock-D6LH3W5H.js → chat-terminal-dock-Dn7Cm1O4.js} +1 -1
- package/dist/gateway/static/root/assets/{connected-providers-grid-CxeXJKxg.js → connected-providers-grid-DUHMZjyV.js} +1 -1
- package/dist/gateway/static/root/assets/{connector-service-page-Bsec3-eZ.js → connector-service-page-DLbBblN2.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-page-C0ZCUtxF.js → connectors-page-HHGB3r3Q.js} +1 -1
- package/dist/gateway/static/root/assets/constants-D5Z-mUto.js +1 -0
- package/dist/gateway/static/root/assets/{device-pairing-wizard-diuSsk-H.js → device-pairing-wizard-eWeHH6Ru.js} +1 -1
- package/dist/gateway/static/root/assets/extension-authoritative-grants-BqtUnmq-.js +1 -0
- package/dist/gateway/static/root/assets/{extension-debug-page-DrpE2lQ3.js → extension-debug-page-DIAyDA-a.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-iframe-host-hr60GwXQ.js → extension-iframe-host-CCe4R7L7.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-message-router-aoF3x4-X.js → extension-message-router-BD0ZamBV.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-BfM8zli6.js → extension-page-C09dlV3J.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-provider-BcSgVeKW.js → extension-provider-BhluafoX.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-Db5t2Mz0.js → extension-settings-page-CB8KLYoG.js} +1 -1
- package/dist/gateway/static/root/assets/file-CStvVK2S.js +1 -0
- package/dist/gateway/static/root/assets/{file-BqMS_3DT.js → file-code-corner-byQA1VfD.js} +1 -1
- package/dist/gateway/static/root/assets/file-icon-N6WjUhq_.js +1 -0
- package/dist/gateway/static/root/assets/file-tree-CYUkQR1t.js +1 -0
- package/dist/gateway/static/root/assets/{home-page-DsS2UT08.js → home-page-8KwhWlYt.js} +3 -3
- package/dist/gateway/static/root/assets/index-CZUfwwLp.css +1 -0
- package/dist/gateway/static/root/assets/index-D5hovYIw.js +11 -0
- package/dist/gateway/static/root/assets/{install-connector-dialog-0_PeJJqO.js → install-connector-dialog-BZjodnUC.js} +1 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-DmzgjJNj.js +1 -0
- package/dist/gateway/static/root/assets/{local-apps-page-yBqRl5Bi.js → local-apps-page-Ct8z2B7R.js} +1 -1
- package/dist/gateway/static/root/assets/logs-page-CH9amuGc.js +2 -0
- package/dist/gateway/static/root/assets/{management-settings-D9HGIYXx.js → management-settings-CUQd0FJ3.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-view-CiGdWuN3.js → markdown-view-Dm01GIXv.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-C2lp7UmI.js → media-plugins-jsWNdARw.js} +1 -1
- package/dist/gateway/static/root/assets/models-hub-cache-B2QcrY4n.js +1 -0
- package/dist/gateway/static/root/assets/note-detail-panel-DeFb2HEC.js +7 -0
- package/dist/gateway/static/root/assets/note-image-lightbox-DUzoWZEe.js +1 -0
- package/dist/gateway/static/root/assets/notes-api-BMSPkAm8.js +1 -0
- package/dist/gateway/static/root/assets/notes-page-nvqpOeHp.js +8 -0
- package/dist/gateway/static/root/assets/{oauth-provider-connect-BW7zcXfb.js → oauth-provider-connect-BexlZuZ4.js} +1 -1
- package/dist/gateway/static/root/assets/{page-context-capture-button-Cw58-5P3.js → page-context-capture-button-Cn4zi3Mt.js} +1 -1
- package/dist/gateway/static/root/assets/page-header-store-1-lflHAx.js +1 -0
- package/dist/gateway/static/root/assets/personal-avatar-CM3vUGhL.js +1 -0
- package/dist/gateway/static/root/assets/personal-avatar-DsEp8QJ7.css +1 -0
- package/dist/gateway/static/root/assets/personal-page-HFjWZacf.js +1 -0
- package/dist/gateway/static/root/assets/{personal-profile-settings-CDrzvI35.js → personal-profile-settings-CNI5Eor6.js} +1 -1
- package/dist/gateway/static/root/assets/{personal-settings-panel-CoZ3qWSr.js → personal-settings-panel-BcrpYRn9.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-model-connection-UHVwbC3H.js → phone-model-connection-DKvOEjWH.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-settings-page-fS2IT-dK.js → phone-settings-page-DvX6okzz.js} +1 -1
- package/dist/gateway/static/root/assets/playback-coordinator-CWHIf0wr.js +1 -0
- package/dist/gateway/static/root/assets/presentation-D-Ui_vVA.js +1 -0
- package/dist/gateway/static/root/assets/preview-runtime-RnBDP-Lq.js +15 -0
- package/dist/gateway/static/root/assets/product-automation-feedback-xAcXeJM2.js +7 -0
- package/dist/gateway/static/root/assets/product-delivery-4gEqUIsK.js +1 -0
- package/dist/gateway/static/root/assets/{product-open-page-BMJ2x5m3.js → product-open-page-DXwOPgRP.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-content-lkkZPvMa.js → product-preview-content-DiQbeaCK.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-modal-DtUBJGs5.js → product-preview-modal-BU7Qojpq.js} +2 -2
- package/dist/gateway/static/root/assets/project-detail-page-Dr5_WPRB.js +7 -0
- package/dist/gateway/static/root/assets/{projects-page-Dua6taaG.js → projects-page-DGATZB23.js} +1 -1
- package/dist/gateway/static/root/assets/{providers-api-B6eZLEnh.js → providers-api-BXa2Aheb.js} +1 -1
- package/dist/gateway/static/root/assets/recording-upload-CQdhrRq3.js +1 -0
- package/dist/gateway/static/root/assets/{remote-access-hub-Dy3-oGK1.js → remote-access-hub-_7tmWand.js} +1 -1
- package/dist/gateway/static/root/assets/right-workspace-store-NXMrEuwH.js +1 -0
- package/dist/gateway/static/root/assets/route-preload-D-pdVwIK.js +2 -0
- package/dist/gateway/static/root/assets/routine-panel-rjq-8nZ8.js +2 -0
- package/dist/gateway/static/root/assets/scan-search-CSIGkseh.js +1 -0
- package/dist/gateway/static/root/assets/{service-recommendation-list-CsU74h1b.js → service-recommendation-list-2UOjV0Mx.js} +1 -1
- package/dist/gateway/static/root/assets/session-manager-BVS3zxRZ.js +22 -0
- package/dist/gateway/static/root/assets/{settings-page-ByFNIBfp.js → settings-page-bCW4rave.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-interaction-page-Bsn4Wa4p.js → setup-interaction-page-BYXDX0F2.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-status-panel-CstjOb7g.js → setup-status-panel-Bhda3jS2.js} +1 -1
- package/dist/gateway/static/root/assets/share-preview-page-nzWjWhqF.js +2 -0
- package/dist/gateway/static/root/assets/shares-settings-LB3SYKFS.js +1 -0
- package/dist/gateway/static/root/assets/sheet-C2H8iR8Y.js +1 -0
- package/dist/gateway/static/root/assets/{skills-page-CkkHufmv.js → skills-page-CfhEcU8L.js} +1 -1
- package/dist/gateway/static/root/assets/space-api-DaKpHc_7.js +1 -0
- package/dist/gateway/static/root/assets/space-page-BXyQdUvp.js +2 -0
- package/dist/gateway/static/root/assets/star-BuMAkjC9.js +1 -0
- package/dist/gateway/static/root/assets/task-detail-page-gffrDRvW.js +3 -0
- package/dist/gateway/static/root/assets/task-header-title-DwtjUOBg.js +1 -0
- package/dist/gateway/static/root/assets/{task-result-evidence-dtN1sSjU.js → task-result-evidence-Bmgta9z9.js} +1 -1
- package/dist/gateway/static/root/assets/tasks-BIehlq7k.js +1 -0
- package/dist/gateway/static/root/assets/turn-outcome-BSbEJx8h.js +1 -0
- package/dist/gateway/static/root/assets/use-composer-attachments-sszsCdh5.js +2 -0
- package/dist/gateway/static/root/assets/use-file-preview-expanded-D4b4fDeu.js +1 -0
- package/dist/gateway/static/root/assets/use-personal-profile-CNPszzzT.js +1 -0
- package/dist/gateway/static/root/assets/use-personal-work-C-rw8XVO.js +1 -0
- package/dist/gateway/static/root/assets/{use-realtime-voice-lRHVixh4.js → use-realtime-voice-cugjs8cK.js} +1 -1
- package/dist/gateway/static/root/assets/{use-workspace-tree-DrWnW1aA.js → use-workspace-tree-Crfx5ctU.js} +1 -1
- package/dist/gateway/static/root/assets/{user-model-page-Bw1_PGdD.js → user-model-page-BvnLbTYx.js} +1 -1
- package/dist/gateway/static/root/assets/video-generation-Cec49Jwg.js +1 -0
- package/dist/gateway/static/root/assets/voice-player-store-DZGlzjva.js +1 -0
- package/dist/gateway/static/root/assets/voice-settings-BzfNK5Jm.js +1 -0
- package/dist/gateway/static/root/assets/{work-discovery-overlay-DcZS4OMj.js → work-discovery-overlay-DpEYgcG2.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-page-CZF9iWPT.js → work-discovery-page-DappIHQq.js} +1 -1
- package/dist/gateway/static/root/assets/workspace-api-g-wCKoQU.js +2 -0
- package/dist/gateway/static/root/assets/workspace-file-preview-dialog-DxaxVC3q.js +1 -0
- package/dist/gateway/static/root/assets/workspace-preview-store-DoIjn_2j.js +1 -0
- package/dist/gateway/static/root/index.html +90 -77
- package/dist/package.js +1 -1
- package/dist/packages/gateway-contract/src/automations.js +7 -0
- package/dist/packages/gateway-contract/src/capabilities.js +1 -1
- package/dist/packages/gateway-contract/src/clarifications.js +20 -2
- package/dist/packages/gateway-contract/src/index.js +6 -4
- package/dist/packages/gateway-contract/src/space.js +23 -0
- package/dist/packages/gateway-contract/src/task-lifecycle.js +1 -0
- package/dist/packages/gateway-contract/src/task-result-delivery.js +1 -0
- package/dist/packages/gateway-contract/src/task-runs.js +1 -0
- package/dist/packages/gateway-contract/src/tasks.js +118 -6
- package/dist/packages/gateway-contract/src/turn-outcome.js +16 -2
- package/dist/packages/gateway-contract/src/video-generation.js +29 -4
- package/dist/src/agent/agent-manager.js +2 -2
- package/dist/src/agent/embedded/agent-profile-context.js +1 -1
- package/dist/src/agent/inbound/attachment-pipeline.js +1 -1
- package/dist/src/agent/orchestration/delegation-budget.d.ts +2 -2
- package/dist/src/agent/orchestration/turn-recovery.d.ts +12 -3
- package/dist/src/agent/orchestration/turn-recovery.js +25 -6
- package/dist/src/agent/service/process-direct-streaming.js +1 -1
- package/dist/src/agent/service/webchat-tts.js +1 -1
- package/dist/src/agent/service.js +1 -1
- package/dist/src/agent/tasks/task-judge-service.js +1 -1
- package/dist/src/agent/tools/apply-patch.js +1 -1
- package/dist/src/agent/tools/factory.js +1 -1
- package/dist/src/agent/tools/image-generate-tool.js +1 -0
- package/dist/src/agent/tools/language-diagnostics.js +1 -1
- package/dist/src/agent/tools/personal-task-tool.d.ts +1 -0
- package/dist/src/agent/tools/personal-task-tool.js +12 -7
- package/dist/src/agent/tools/publish-artifacts.js +2 -1
- package/dist/src/agent/tools/review-workspace.js +1 -1
- package/dist/src/agent/tools/send-media.js +1 -0
- package/dist/src/agent/tools/tool-media.d.ts +3 -1
- package/dist/src/agent/tools/tool-media.js +2 -0
- package/dist/src/agent/tools/xopc-use-tool.js +21 -4
- package/dist/src/agent-catalog/test-support.js +1 -1
- package/dist/src/agent-matching/delegation-service.js +1 -1
- package/dist/src/automations/capabilities/drafts.js +1 -1
- package/dist/src/automations/capabilities/write.d.ts +30 -6
- package/dist/src/automations/capabilities/write.js +2 -2
- package/dist/src/automations/configuration-conversation.js +1 -1
- package/dist/src/automations/domain/types.d.ts +6 -0
- package/dist/src/automations/domain/validation.d.ts +60 -12
- package/dist/src/automations/domain/validation.js +7 -0
- package/dist/src/automations/draft/automation-draft-validator.d.ts +12 -3
- package/dist/src/automations/draft/automation-draft-validator.js +1 -0
- package/dist/src/automations/service/action-executor.js +14 -2
- package/dist/src/automations/service/automation-service.js +2 -2
- package/dist/src/browser/providers/browser-ext-install.js +1 -1
- package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
- package/dist/src/computer/diagnostics.d.ts +9 -9
- package/dist/src/computer/errors.d.ts +2 -2
- package/dist/src/computer/evaluation.d.ts +7 -7
- package/dist/src/computer/runtime.d.ts +4 -4
- package/dist/src/config/schema.d.ts +2 -2
- package/dist/src/discussions/action-tasks.d.ts +2 -2
- package/dist/src/execution-environments/local-worktree-manager.js +1 -1
- package/dist/src/extensions/agent-plugins/inventory.d.ts +2 -2
- package/dist/src/extensions/agent-plugins/setup.d.ts +3 -3
- package/dist/src/gateway/hono/routes/commands-skills.js +1 -1
- package/dist/src/gateway/hono/routes/connectors.js +2 -2
- package/dist/src/gateway/hono/routes/context-sources.js +1 -1
- package/dist/src/gateway/hono/routes/lazy-bundles.js +8 -0
- package/dist/src/gateway/hono/routes/music-generation.js +2 -0
- package/dist/src/gateway/hono/routes/personal-agent.js +214 -5
- package/dist/src/gateway/hono/routes/phone-setup.js +1 -1
- package/dist/src/gateway/hono/routes/space.d.ts +3 -0
- package/dist/src/gateway/hono/routes/space.js +105 -0
- package/dist/src/gateway/hono/routes/tasks.js +27 -28
- package/dist/src/gateway/hono/routes/video-generation.js +8 -5
- package/dist/src/gateway/html-preview-shell.d.ts +1 -1
- package/dist/src/gateway/html-preview-shell.js +3 -0
- package/dist/src/gateway/media-access.js +2 -2
- package/dist/src/gateway/security/gateway-scopes.js +2 -0
- package/dist/src/gateway/service/config-coordinator.d.ts +1 -1
- package/dist/src/gateway/service.d.ts +1 -0
- package/dist/src/gateway/service.js +10 -3
- package/dist/src/gateway/session-context-summary.js +1 -1
- package/dist/src/gateway/xopc-cloud-capability-setup.d.ts +2 -0
- package/dist/src/gateway/xopc-cloud-capability-setup.js +18 -1
- package/dist/src/home-intelligence/follow-ups.js +2 -1
- package/dist/src/home-intelligence/routines.js +1 -1
- package/dist/src/local-apps/automation-proposals.d.ts +54 -12
- package/dist/src/local-apps/capabilities/projections.d.ts +7 -7
- package/dist/src/local-apps/preview-fixtures.d.ts +1 -1
- package/dist/src/media/session-references.d.ts +4 -1
- package/dist/src/media/session-references.js +40 -8
- package/dist/src/music-generation/artifact.js +3 -1
- package/dist/src/music-generation/providers.js +26 -15
- package/dist/src/music-generation/repository.js +8 -1
- package/dist/src/music-generation/xopc-cloud.d.ts +2 -0
- package/dist/src/music-generation/xopc-cloud.js +38 -0
- package/dist/src/personal-agent/capability-service.js +1 -1
- package/dist/src/personal-agent/proactivity/service.js +1 -1
- package/dist/src/personal-agent/prompt-context.js +1 -1
- package/dist/src/personal-agent/prompts.js +1 -1
- package/dist/src/personal-agent/reply-composer.js +16 -7
- package/dist/src/personal-agent/repository.js +1 -1
- package/dist/src/personal-agent/request-delivery.js +17 -7
- package/dist/src/personal-agent/request-service.js +6 -10
- package/dist/src/personal-agent/result-extraction.js +13 -13
- package/dist/src/personal-agent/schedules.d.ts +9 -0
- package/dist/src/personal-agent/schedules.js +44 -0
- package/dist/src/personal-agent/service.js +1 -1
- package/dist/src/providers/model-catalog-persistence.js +6 -1
- package/dist/src/providers/model-catalog-store.js +1 -0
- package/dist/src/providers/model-catalog-types.d.ts +2 -0
- package/dist/src/providers/xopc-cloud-media-manifest.d.ts +24 -0
- package/dist/src/providers/xopc-cloud-media-manifest.js +28 -0
- package/dist/src/providers/xopc-cloud-media.d.ts +28 -0
- package/dist/src/providers/xopc-cloud-media.js +67 -0
- package/dist/src/providers/xopc-cloud-model-source.js +4 -0
- package/dist/src/runtime-tools/archive.js +1 -1
- package/dist/src/runtime-tools/manager.js +1 -1
- package/dist/src/runtime-tools/phone-dependencies.js +1 -1
- package/dist/src/session/client-history.d.ts +4 -1
- package/dist/src/session/client-history.js +18 -0
- package/dist/src/session/compact-history.js +30 -1
- package/dist/src/session/turn-outcome-projector.js +1 -1
- package/dist/src/space/ingest.d.ts +36 -0
- package/dist/src/space/ingest.js +149 -0
- package/dist/src/space/repository.d.ts +39 -0
- package/dist/src/space/repository.js +325 -0
- package/dist/src/space/worker.d.ts +14 -0
- package/dist/src/space/worker.js +199 -0
- package/dist/src/storage/sqlite/clarification-wait-repository.js +7 -4
- package/dist/src/storage/sqlite/row-mappers.d.ts +1 -0
- package/dist/src/storage/sqlite/row-mappers.js +9 -2
- package/dist/src/storage/sqlite/schema.d.ts +2 -2
- package/dist/src/storage/sqlite/schema.js +8 -7
- package/dist/src/storage/sqlite/schema.sql +103 -0
- package/dist/src/storage/sqlite/transcript-repository.js +8 -0
- package/dist/src/storage/sqlite/upgrades/279_task_model_cutover.sql +288 -0
- package/dist/src/storage/sqlite/upgrades/280_space.sql +61 -0
- package/dist/src/tasks/capabilities/management.d.ts +15 -2
- package/dist/src/tasks/capabilities/management.js +8 -2
- package/dist/src/tasks/capabilities/read.js +14 -2
- package/dist/src/tasks/capabilities/relations.d.ts +13 -7
- package/dist/src/tasks/capabilities/write.d.ts +118 -2
- package/dist/src/tasks/capabilities/write.js +2 -0
- package/dist/src/tasks/home-query-service.js +7 -9
- package/dist/src/tasks/task-allocation-service.js +2 -2
- package/dist/src/tasks/task-application-service.d.ts +8 -2
- package/dist/src/tasks/task-application-service.js +94 -27
- package/dist/src/tasks/task-collaboration-repository.js +12 -1
- package/dist/src/tasks/task-context-assembler.js +9 -3
- package/dist/src/tasks/task-contract-planner.js +1 -3
- package/dist/src/tasks/task-conversation-summary.d.ts +33 -2
- package/dist/src/tasks/task-conversation-summary.js +3 -1
- package/dist/src/tasks/task-criterion-review-repository.d.ts +31 -2
- package/dist/src/tasks/task-criterion-review-repository.js +70 -23
- package/dist/src/tasks/task-deliverables.d.ts +7 -0
- package/dist/src/tasks/task-deliverables.js +112 -0
- package/dist/src/tasks/task-handoff-service.js +1 -1
- package/dist/src/tasks/task-instruction-sequence.js +10 -3
- package/dist/src/tasks/task-json-acceptance.js +3 -5
- package/dist/src/tasks/task-origin-repository.d.ts +99 -1
- package/dist/src/tasks/task-origin-repository.js +67 -5
- package/dist/src/tasks/task-read-model-projector.d.ts +4 -1
- package/dist/src/tasks/task-read-model-projector.js +123 -9
- package/dist/src/tasks/task-repository.d.ts +4 -1
- package/dist/src/tasks/task-repository.js +34 -11
- package/dist/src/tasks/task-research-repair.d.ts +2 -2
- package/dist/src/tasks/task-research-result.d.ts +1 -0
- package/dist/src/tasks/task-research-result.js +13 -3
- package/dist/src/tasks/task-result-delivery-repository.d.ts +4 -3
- package/dist/src/tasks/task-result-delivery-repository.js +35 -17
- package/dist/src/tasks/task-result-delivery-service.js +22 -7
- package/dist/src/tasks/task-result-versions.d.ts +11 -0
- package/dist/src/tasks/task-result-versions.js +34 -0
- package/dist/src/tasks/task-run-coordinator.js +28 -15
- package/dist/src/tasks/task-run-dispatcher.js +29 -4
- package/dist/src/tasks/task-run-repository.d.ts +2 -0
- package/dist/src/tasks/task-run-repository.js +62 -19
- package/dist/src/tasks/task-workspace-verification.d.ts +16 -0
- package/dist/src/tasks/task-workspace-verification.js +95 -0
- package/dist/src/tui/backends/embedded-backend.js +2 -2
- package/dist/src/video-generation/artifact.js +3 -1
- package/dist/src/video-generation/drafts.js +4 -0
- package/dist/src/video-generation/providers.d.ts +1 -0
- package/dist/src/video-generation/providers.js +37 -5
- package/dist/src/video-generation/repository.js +8 -1
- package/dist/src/video-generation/settings.d.ts +1 -0
- package/dist/src/video-generation/settings.js +10 -4
- package/dist/src/voice/realtime/runtime.js +1 -1
- package/package.json +1 -1
- package/dist/gateway/static/root/assets/attachment-preview-renderer-DdOEgexg.js +0 -12
- package/dist/gateway/static/root/assets/attachment-utils-core-BIOUBrpT.js +0 -1
- package/dist/gateway/static/root/assets/automations-workspace-BWpA-X_S.js +0 -9
- package/dist/gateway/static/root/assets/binary-plugins-BjEE5sVq.js +0 -2
- package/dist/gateway/static/root/assets/capabilities-EmBa4Blq.js +0 -1
- package/dist/gateway/static/root/assets/capabilities-page-BQf7oyqc.js +0 -2
- package/dist/gateway/static/root/assets/capabilities-settings-panel-hlByP8SE.js +0 -8
- package/dist/gateway/static/root/assets/channels-oyMymJDx.js +0 -1
- package/dist/gateway/static/root/assets/chat-page-hcsqrv-7.js +0 -71
- package/dist/gateway/static/root/assets/constants-Bg1wM2nv.js +0 -1
- package/dist/gateway/static/root/assets/extension-authoritative-grants-CVQ7q0DU.js +0 -1
- package/dist/gateway/static/root/assets/file-tree-CFlZnV3Y.js +0 -1
- package/dist/gateway/static/root/assets/index-DFa0pZhC.js +0 -11
- package/dist/gateway/static/root/assets/index-DHPaL7Ku.css +0 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-OSinc6m6.js +0 -1
- package/dist/gateway/static/root/assets/local-apps-DeqzkJiF.js +0 -1
- package/dist/gateway/static/root/assets/logs-page-BJxQ_Jd5.js +0 -2
- package/dist/gateway/static/root/assets/models-hub-cache-CmdULYFt.js +0 -1
- package/dist/gateway/static/root/assets/note-detail-panel-CVEG1JdF.js +0 -7
- package/dist/gateway/static/root/assets/note-image-lightbox-WA8FiHsm.js +0 -1
- package/dist/gateway/static/root/assets/notes-api-BQXOYFQ5.js +0 -1
- package/dist/gateway/static/root/assets/notes-page-Cc-c1Yhg.js +0 -8
- package/dist/gateway/static/root/assets/page-header-store-DwFwq_lI.js +0 -1
- package/dist/gateway/static/root/assets/personal-avatar-B-Oes3ef.js +0 -1
- package/dist/gateway/static/root/assets/personal-avatar-BUCb7OiW.css +0 -1
- package/dist/gateway/static/root/assets/personal-page-DWPu-iwK.js +0 -1
- package/dist/gateway/static/root/assets/phone-DdhTnt6X.js +0 -1
- package/dist/gateway/static/root/assets/product-automation-feedback-DrBclzH1.js +0 -7
- package/dist/gateway/static/root/assets/product-delivery-CnvCn9L-.js +0 -1
- package/dist/gateway/static/root/assets/project-detail-page-DGFUj6jS.js +0 -7
- package/dist/gateway/static/root/assets/recording-upload-DXxD6grq.js +0 -1
- package/dist/gateway/static/root/assets/right-workspace-store-BzXnZDK5.js +0 -1
- package/dist/gateway/static/root/assets/route-preload-8KCgPcjp.js +0 -2
- package/dist/gateway/static/root/assets/routine-panel-BALhliq6.js +0 -2
- package/dist/gateway/static/root/assets/session-manager-Cby6Nkib.js +0 -25
- package/dist/gateway/static/root/assets/share-preview-page-9pOnypJv.js +0 -2
- package/dist/gateway/static/root/assets/shares-settings-CJdVDQqf.js +0 -1
- package/dist/gateway/static/root/assets/star-CnYNmpLd.js +0 -1
- package/dist/gateway/static/root/assets/task-detail-page-BjBkKeIf.js +0 -3
- package/dist/gateway/static/root/assets/tasks-BTLabOMp.js +0 -1
- package/dist/gateway/static/root/assets/use-composer-attachments-BEYkb8cs.js +0 -2
- package/dist/gateway/static/root/assets/use-file-preview-expanded-CQeo2Ztn.js +0 -15
- package/dist/gateway/static/root/assets/use-personal-profile-CKm5FaTl.js +0 -1
- package/dist/gateway/static/root/assets/video-generation-D08uZbsu.js +0 -1
- package/dist/gateway/static/root/assets/voice-settings-CssuMBjt.js +0 -1
- package/dist/gateway/static/root/assets/with-selector-xonYxPoM.js +0 -1
- package/dist/gateway/static/root/assets/workspace-api-BfApIXLw.js +0 -2
- package/dist/gateway/static/root/assets/workspace-file-preview-dialog-BRhsCs1S.js +0 -1
- package/dist/gateway/static/root/assets/workspace-preview-store-BrofEVle.js +0 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Automation, AutomationAction } from '../automations/domain/types.js';
|
|
2
|
+
type PersonalTaskAction = Extract<AutomationAction, {
|
|
3
|
+
kind: 'personal_task';
|
|
4
|
+
}>;
|
|
5
|
+
export declare function isPersonalSchedule(automation: Automation | null, conversationId: string, agentId: string): automation is Automation & {
|
|
6
|
+
action: PersonalTaskAction;
|
|
7
|
+
};
|
|
8
|
+
export declare function startScheduledPersonalTask(title: string, action: PersonalTaskAction, runId: string): string;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { TaskCreateRequestSchema } from "../../packages/gateway-contract/src/tasks.js";
|
|
2
|
+
import { init_src } from "../../packages/gateway-contract/src/index.js";
|
|
3
|
+
import { getPersonalAgent } from "./repository.js";
|
|
4
|
+
import { TaskApplicationService } from "../tasks/task-application-service.js";
|
|
5
|
+
//#region src/personal-agent/schedules.ts
|
|
6
|
+
init_src();
|
|
7
|
+
function isPersonalSchedule(automation, conversationId, agentId) {
|
|
8
|
+
return automation?.action.kind === "personal_task" && automation.action.conversationId === conversationId && automation.action.agentId === agentId;
|
|
9
|
+
}
|
|
10
|
+
function startScheduledPersonalTask(title, action, runId) {
|
|
11
|
+
const profile = getPersonalAgent("local-owner");
|
|
12
|
+
if (profile?.state !== "ready" || profile.conversationId !== action.conversationId || profile.agentId !== action.agentId) throw new Error("The Personal Agent for this schedule is unavailable");
|
|
13
|
+
const result = new TaskApplicationService().create(TaskCreateRequestSchema.parse({
|
|
14
|
+
idempotencyKey: `personal-schedule:${runId}`,
|
|
15
|
+
title,
|
|
16
|
+
body: action.instruction,
|
|
17
|
+
originConversationId: action.conversationId,
|
|
18
|
+
locale: action.locale,
|
|
19
|
+
contract: {
|
|
20
|
+
objective: action.instruction.slice(0, 4e3),
|
|
21
|
+
expectedOutputs: [],
|
|
22
|
+
acceptanceCriteria: [],
|
|
23
|
+
constraints: [],
|
|
24
|
+
approvalRequired: [],
|
|
25
|
+
assumptions: [],
|
|
26
|
+
risks: [],
|
|
27
|
+
outputDestinations: []
|
|
28
|
+
},
|
|
29
|
+
activation: {
|
|
30
|
+
mode: "start",
|
|
31
|
+
executor: {
|
|
32
|
+
kind: "agent",
|
|
33
|
+
agentId: action.agentId
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}), {
|
|
37
|
+
kind: "system",
|
|
38
|
+
id: "personal-schedule"
|
|
39
|
+
}, { linkRunningOriginInput: false });
|
|
40
|
+
if (result.ok === false) throw new Error(result.reason);
|
|
41
|
+
return result.model.task.id;
|
|
42
|
+
}
|
|
43
|
+
//#endregion
|
|
44
|
+
export { isPersonalSchedule, startScheduledPersonalTask };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { AgentCatalogRepository, init_repository } from "../agent-catalog/repository.js";
|
|
1
2
|
import { getSessionMetadata } from "../storage/sqlite/session-read-repository.js";
|
|
2
3
|
import { init_session_repository, patchSessionMetadata } from "../storage/sqlite/session-repository.js";
|
|
3
4
|
import { setSessionConfig } from "../storage/sqlite/config-repository.js";
|
|
4
|
-
import { AgentCatalogRepository, init_repository } from "../agent-catalog/repository.js";
|
|
5
5
|
import { createConversation, init_conversation_repository } from "../storage/sqlite/conversation-repository.js";
|
|
6
6
|
import { getAvailableModels, init_providers } from "../providers/index.js";
|
|
7
7
|
import { getPersonalAgent, personalAgentId } from "./repository.js";
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { init_paths_state, resolveXopcCloudCatalogCachePath } from "../config/paths-state.js";
|
|
3
|
-
import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
|
|
4
3
|
import { voiceManifestSchema } from "../../packages/realtime-protocol/src/voice-catalog.js";
|
|
5
4
|
import { init_voice } from "../../packages/realtime-protocol/src/voice.js";
|
|
5
|
+
import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
|
|
6
6
|
import { PhoneModelMetadataSchema, init_contracts } from "../phone/contracts.js";
|
|
7
7
|
import { ComputerProfileSchema, init_src } from "../../packages/computer-control-contract/src/index.js";
|
|
8
8
|
import { ImageGenerationCapabilitiesSchema, init_models_json } from "../config/models-json.js";
|
|
9
|
+
import { cloudMediaManifestSchema, init_xopc_cloud_media_manifest } from "./xopc-cloud-media-manifest.js";
|
|
9
10
|
import { readFileSync, rmSync } from "node:fs";
|
|
10
11
|
import { z } from "zod";
|
|
11
12
|
import { rm } from "node:fs/promises";
|
|
12
13
|
//#region src/providers/model-catalog-persistence.ts
|
|
13
14
|
var MAX_CATALOG_BYTES, imageGenerationSchema, sttSchema, ttsSchema, searchSchema, catalogModelSchema, persistedCatalogSchema, ModelCatalogPersistence;
|
|
14
15
|
var init_model_catalog_persistence = __esmMin((() => {
|
|
16
|
+
init_xopc_cloud_media_manifest();
|
|
15
17
|
init_contracts();
|
|
16
18
|
init_models_json();
|
|
17
19
|
init_voice();
|
|
@@ -129,6 +131,7 @@ var init_model_catalog_persistence = __esmMin((() => {
|
|
|
129
131
|
"tts"
|
|
130
132
|
]), z.string()).optional(),
|
|
131
133
|
search: searchSchema.optional(),
|
|
134
|
+
mediaGeneration: cloudMediaManifestSchema.optional(),
|
|
132
135
|
models: z.array(catalogModelSchema)
|
|
133
136
|
}).strict();
|
|
134
137
|
ModelCatalogPersistence = class {
|
|
@@ -149,6 +152,7 @@ var init_model_catalog_persistence = __esmMin((() => {
|
|
|
149
152
|
recommendedModel: parsed.data.recommendedModel,
|
|
150
153
|
recommended: parsed.data.recommended,
|
|
151
154
|
search: parsed.data.search,
|
|
155
|
+
...parsed.data.mediaGeneration ? { mediaGeneration: parsed.data.mediaGeneration } : {},
|
|
152
156
|
lastSuccessAt: parsed.data.fetchedAt,
|
|
153
157
|
models: parsed.data.models
|
|
154
158
|
};
|
|
@@ -168,6 +172,7 @@ var init_model_catalog_persistence = __esmMin((() => {
|
|
|
168
172
|
recommendedModel: source.recommendedModel,
|
|
169
173
|
recommended: source.recommended,
|
|
170
174
|
search: source.search,
|
|
175
|
+
mediaGeneration: source.mediaGeneration,
|
|
171
176
|
models: source.models
|
|
172
177
|
});
|
|
173
178
|
const serialized = `${JSON.stringify(payload, null, 2)}\n`;
|
|
@@ -71,6 +71,7 @@ var init_model_catalog_store = __esmMin((() => {
|
|
|
71
71
|
cloneSource(source) {
|
|
72
72
|
return {
|
|
73
73
|
...source,
|
|
74
|
+
...source.mediaGeneration ? { mediaGeneration: structuredClone(source.mediaGeneration) } : {},
|
|
74
75
|
...source.search ? { search: structuredClone(source.search) } : {},
|
|
75
76
|
models: source.models.map((model) => ({
|
|
76
77
|
...model,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { CloudMediaManifest } from './xopc-cloud-media-manifest.js';
|
|
1
2
|
import type { ComputerProfile } from '@xopcai/computer-control-contract';
|
|
2
3
|
import type { VoiceManifest } from '@xopcai/realtime-protocol/voice';
|
|
3
4
|
export interface CatalogModel {
|
|
@@ -52,6 +53,7 @@ export interface CatalogSource {
|
|
|
52
53
|
etag: string | null;
|
|
53
54
|
recommendedModel: string | null;
|
|
54
55
|
recommended?: Partial<Record<'vision' | 'image-generation' | 'stt' | 'tts', string>>;
|
|
56
|
+
mediaGeneration?: CloudMediaManifest;
|
|
55
57
|
search?: {
|
|
56
58
|
schemaVersion: 1;
|
|
57
59
|
endpoint: string;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const cloudMediaManifestSchema: z.ZodObject<{
|
|
3
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
4
|
+
models: z.ZodArray<z.ZodObject<{
|
|
5
|
+
id: z.ZodString;
|
|
6
|
+
kind: z.ZodEnum<{
|
|
7
|
+
video: "video";
|
|
8
|
+
music: "music";
|
|
9
|
+
}>;
|
|
10
|
+
name: z.ZodString;
|
|
11
|
+
sourceRef: z.ZodString;
|
|
12
|
+
prices: z.ZodRecord<z.ZodEnum<{
|
|
13
|
+
"480P": "480P";
|
|
14
|
+
"720P": "720P";
|
|
15
|
+
"1080P": "1080P";
|
|
16
|
+
track: "track";
|
|
17
|
+
}> & z.core.$partial, z.ZodNumber>;
|
|
18
|
+
}, z.core.$strip>>;
|
|
19
|
+
defaults: z.ZodObject<{
|
|
20
|
+
music: z.ZodOptional<z.ZodString>;
|
|
21
|
+
video: z.ZodOptional<z.ZodString>;
|
|
22
|
+
}, z.core.$strip>;
|
|
23
|
+
}, z.core.$strip>;
|
|
24
|
+
export type CloudMediaManifest = z.infer<typeof cloudMediaManifestSchema>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/providers/xopc-cloud-media-manifest.ts
|
|
4
|
+
var cloudMediaManifestSchema;
|
|
5
|
+
var init_xopc_cloud_media_manifest = __esmMin((() => {
|
|
6
|
+
cloudMediaManifestSchema = z.object({
|
|
7
|
+
schemaVersion: z.literal(1),
|
|
8
|
+
models: z.array(z.object({
|
|
9
|
+
id: z.string().regex(/^[a-z0-9.-]{1,64}$/),
|
|
10
|
+
kind: z.enum(["music", "video"]),
|
|
11
|
+
name: z.string().min(1).max(128),
|
|
12
|
+
sourceRef: z.string().min(1).max(128),
|
|
13
|
+
prices: z.partialRecord(z.enum([
|
|
14
|
+
"track",
|
|
15
|
+
"480P",
|
|
16
|
+
"720P",
|
|
17
|
+
"1080P"
|
|
18
|
+
]), z.number().int().positive().max(1e8))
|
|
19
|
+
})).max(32),
|
|
20
|
+
defaults: z.object({
|
|
21
|
+
music: z.string().optional(),
|
|
22
|
+
video: z.string().optional()
|
|
23
|
+
})
|
|
24
|
+
});
|
|
25
|
+
}));
|
|
26
|
+
//#endregion
|
|
27
|
+
init_xopc_cloud_media_manifest();
|
|
28
|
+
export { cloudMediaManifestSchema, init_xopc_cloud_media_manifest };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export declare const CLOUD_MEDIA_PROVIDER = "xopc-cloud";
|
|
2
|
+
export declare function getCloudMediaModels(kind: 'music' | 'video'): {
|
|
3
|
+
id: string;
|
|
4
|
+
kind: "video" | "music";
|
|
5
|
+
name: string;
|
|
6
|
+
sourceRef: string;
|
|
7
|
+
prices: Partial<Record<"480P" | "720P" | "1080P" | "track", number>>;
|
|
8
|
+
}[];
|
|
9
|
+
export declare function getCloudMediaDefault(kind: 'music' | 'video'): string | undefined;
|
|
10
|
+
export declare function resolveCloudMediaToken(): Promise<string | undefined>;
|
|
11
|
+
export declare class CloudMediaError extends Error {
|
|
12
|
+
readonly status: number;
|
|
13
|
+
constructor(status: number);
|
|
14
|
+
}
|
|
15
|
+
export declare function submitCloudMedia(kind: 'music' | 'videos', token: string, input: object): Promise<string>;
|
|
16
|
+
export declare function queryCloudMedia(kind: 'music' | 'videos', token: string, task: string): Promise<{
|
|
17
|
+
state: "submitted";
|
|
18
|
+
} | {
|
|
19
|
+
state: "running";
|
|
20
|
+
} | {
|
|
21
|
+
state: "failed";
|
|
22
|
+
reason: "The media provider could not complete the task.";
|
|
23
|
+
} | {
|
|
24
|
+
state: "completed";
|
|
25
|
+
url: string;
|
|
26
|
+
durationMs?: number;
|
|
27
|
+
expiresAt?: number;
|
|
28
|
+
}>;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { getModelCatalogStore, init_model_catalog_store } from "./model-catalog-store.js";
|
|
2
|
+
import { init_xopc_cloud_config, resolveXopcModelRouterUrl } from "./xopc-cloud-config.js";
|
|
3
|
+
import { getProviderAuthService, init_provider_auth_service } from "./provider-auth-service.js";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
//#region src/providers/xopc-cloud-media.ts
|
|
6
|
+
init_model_catalog_store();
|
|
7
|
+
init_provider_auth_service();
|
|
8
|
+
init_xopc_cloud_config();
|
|
9
|
+
const CLOUD_MEDIA_PROVIDER = "xopc-cloud";
|
|
10
|
+
function getCloudMediaModels(kind) {
|
|
11
|
+
return getModelCatalogStore().getSource("xopc-cloud")?.mediaGeneration?.models.filter((model) => model.kind === kind) ?? [];
|
|
12
|
+
}
|
|
13
|
+
function getCloudMediaDefault(kind) {
|
|
14
|
+
const manifest = getModelCatalogStore().getSource(CLOUD_MEDIA_PROVIDER)?.mediaGeneration;
|
|
15
|
+
const id = manifest?.defaults[kind];
|
|
16
|
+
return id && manifest?.models.some((model) => model.id === id && model.kind === kind) ? `${CLOUD_MEDIA_PROVIDER}/${id}` : void 0;
|
|
17
|
+
}
|
|
18
|
+
async function resolveCloudMediaToken() {
|
|
19
|
+
return await getProviderAuthService().resolveApiKey("xopc-cloud") || void 0;
|
|
20
|
+
}
|
|
21
|
+
var CloudMediaError = class extends Error {
|
|
22
|
+
constructor(status) {
|
|
23
|
+
super(status === 402 ? "XOPC Cloud Credit balance or workspace budget is insufficient." : `XOPC Cloud media request returned HTTP ${status}.`);
|
|
24
|
+
this.status = status;
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
const taskSchema = z.object({ id: z.string().uuid() });
|
|
28
|
+
const statusSchema = z.discriminatedUnion("state", [
|
|
29
|
+
z.object({ state: z.literal("submitted") }),
|
|
30
|
+
z.object({ state: z.literal("running") }),
|
|
31
|
+
z.object({
|
|
32
|
+
state: z.literal("failed"),
|
|
33
|
+
reason: z.literal("The media provider could not complete the task.")
|
|
34
|
+
}),
|
|
35
|
+
z.object({
|
|
36
|
+
state: z.literal("completed"),
|
|
37
|
+
url: z.string().url(),
|
|
38
|
+
durationMs: z.number().int().positive().nullable().optional(),
|
|
39
|
+
expiresAt: z.number().int().positive().optional()
|
|
40
|
+
})
|
|
41
|
+
]);
|
|
42
|
+
async function request(kind, token, task, input) {
|
|
43
|
+
const path = `/${kind}/generations${task ? `/${encodeURIComponent(task)}` : ""}`;
|
|
44
|
+
const response = await fetch(`${resolveXopcModelRouterUrl()}${path}`, {
|
|
45
|
+
method: input ? "POST" : "GET",
|
|
46
|
+
headers: {
|
|
47
|
+
Authorization: `Bearer ${token}`,
|
|
48
|
+
...input ? { "Content-Type": "application/json" } : {}
|
|
49
|
+
},
|
|
50
|
+
body: input && JSON.stringify(input),
|
|
51
|
+
signal: AbortSignal.timeout(35e3),
|
|
52
|
+
redirect: "error"
|
|
53
|
+
});
|
|
54
|
+
if (!response.ok) {
|
|
55
|
+
await response.body?.cancel().catch(() => void 0);
|
|
56
|
+
throw new CloudMediaError(response.status);
|
|
57
|
+
}
|
|
58
|
+
return response.json();
|
|
59
|
+
}
|
|
60
|
+
async function submitCloudMedia(kind, token, input) {
|
|
61
|
+
return taskSchema.parse(await request(kind, token, void 0, input)).id;
|
|
62
|
+
}
|
|
63
|
+
async function queryCloudMedia(kind, token, task) {
|
|
64
|
+
return statusSchema.parse(await request(kind, token, task));
|
|
65
|
+
}
|
|
66
|
+
//#endregion
|
|
67
|
+
export { CLOUD_MEDIA_PROVIDER, CloudMediaError, getCloudMediaDefault, getCloudMediaModels, queryCloudMedia, resolveCloudMediaToken, submitCloudMedia };
|
|
@@ -3,9 +3,11 @@ import { init_voice } from "../../packages/realtime-protocol/src/voice.js";
|
|
|
3
3
|
import { PhoneModelMetadataSchema, init_contracts } from "../phone/contracts.js";
|
|
4
4
|
import { init_model_policy, isDedicatedComputerProfile } from "../computer/model-policy.js";
|
|
5
5
|
import { ImageGenerationCapabilitiesSchema, init_models_json } from "../config/models-json.js";
|
|
6
|
+
import { cloudMediaManifestSchema, init_xopc_cloud_media_manifest } from "./xopc-cloud-media-manifest.js";
|
|
6
7
|
import { init_xopc_cloud_config, resolveXopcModelRouterUrl } from "./xopc-cloud-config.js";
|
|
7
8
|
import { getProviderAuthService, init_provider_auth_service } from "./provider-auth-service.js";
|
|
8
9
|
//#region src/providers/xopc-cloud-model-source.ts
|
|
10
|
+
init_xopc_cloud_media_manifest();
|
|
9
11
|
init_contracts();
|
|
10
12
|
init_models_json();
|
|
11
13
|
init_voice();
|
|
@@ -87,6 +89,7 @@ var XopcCloudModelSource = class {
|
|
|
87
89
|
})).values()];
|
|
88
90
|
const recommended = parseRecommendations(body.xopc?.defaults, models);
|
|
89
91
|
const search = parseSearchCapability(body.xopc?.search);
|
|
92
|
+
const mediaGeneration = cloudMediaManifestSchema.safeParse(body.xopc?.mediaGeneration).data;
|
|
90
93
|
return {
|
|
91
94
|
status: "fetched",
|
|
92
95
|
source: {
|
|
@@ -97,6 +100,7 @@ var XopcCloudModelSource = class {
|
|
|
97
100
|
recommendedModel: models.find((model) => model.id === "auto")?.id ?? models.find((model) => !model.phoneUse && !isDedicatedComputerProfile(model.computerUse?.profile))?.id ?? null,
|
|
98
101
|
...Object.keys(recommended).length > 0 ? { recommended } : {},
|
|
99
102
|
...search ? { search } : {},
|
|
103
|
+
...mediaGeneration ? { mediaGeneration } : {},
|
|
100
104
|
lastSuccessAt: Date.now()
|
|
101
105
|
},
|
|
102
106
|
models
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { RuntimeError } from "./errors.js";
|
|
2
2
|
import { isAbsolute, join, posix, relative, resolve } from "node:path";
|
|
3
3
|
import { spawn } from "node:child_process";
|
|
4
|
-
import AdmZip from "adm-zip";
|
|
5
4
|
import { lstat, mkdir, readdir, readlink, rename, rm, stat } from "node:fs/promises";
|
|
5
|
+
import AdmZip from "adm-zip";
|
|
6
6
|
//#region src/runtime-tools/archive.ts
|
|
7
7
|
const MAX_ARCHIVE_ENTRIES = 5e4;
|
|
8
8
|
const MAX_TAR_OUTPUT_BYTES = 16 * 1024 * 1024;
|
|
@@ -14,8 +14,8 @@ import { bundledPythonArchiveName, resolveOfflineBundleArtifact } from "./offlin
|
|
|
14
14
|
import { normalizeRuntimeVersionRequest, parseRuntimeVersion, probeSystemRuntime, resolveInstallVersion, versionSatisfies } from "./probe.js";
|
|
15
15
|
import { dirname, join } from "node:path";
|
|
16
16
|
import { randomUUID } from "node:crypto";
|
|
17
|
-
import { EventEmitter } from "node:events";
|
|
18
17
|
import { access, mkdir, realpath, rename, rm } from "node:fs/promises";
|
|
18
|
+
import { EventEmitter } from "node:events";
|
|
19
19
|
//#region src/runtime-tools/manager.ts
|
|
20
20
|
init_logger();
|
|
21
21
|
const log = createLogger("RuntimeManager");
|
|
@@ -9,8 +9,8 @@ import { runtimeDownloadPath } from "./paths.js";
|
|
|
9
9
|
import { HarmonyDependencyManager } from "./harmony-dependencies.js";
|
|
10
10
|
import { dirname, isAbsolute, join } from "node:path";
|
|
11
11
|
import { randomUUID } from "node:crypto";
|
|
12
|
-
import { EventEmitter } from "node:events";
|
|
13
12
|
import { chmod, copyFile, mkdir, rename, rm, stat } from "node:fs/promises";
|
|
13
|
+
import { EventEmitter } from "node:events";
|
|
14
14
|
//#region src/runtime-tools/phone-dependencies.ts
|
|
15
15
|
const operations = /* @__PURE__ */ new Set();
|
|
16
16
|
async function probePhoneAdb(path) {
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { type PersonalProvenance } from '@xopcai/gateway-contract';
|
|
2
|
-
import { type TaskResultDelivery, type TurnOutcome, type UserTurnDocument } from '@xopcai/gateway-contract';
|
|
2
|
+
import { type ClarificationChoiceReceipt, type TaskResultDelivery, type TurnOutcome, type UserTurnDocument } from '@xopcai/gateway-contract';
|
|
3
3
|
import type { Message } from './types.js';
|
|
4
4
|
import type { TaskUpdateTrigger } from '../storage/sqlite/session-input-repository.js';
|
|
5
5
|
import type { TranscriptStoredRow } from './session-context-for-llm.js';
|
|
6
6
|
/** Transcript row for TUI and HTTP clients (flattened from persisted session messages). */
|
|
7
7
|
export interface ClientHistoryMessage {
|
|
8
8
|
id?: string;
|
|
9
|
+
transcriptEntryId?: string;
|
|
9
10
|
turnId?: string;
|
|
10
11
|
/** A background Agent turn starts a new visible assistant bubble without a visible user row. */
|
|
11
12
|
startsNewBubble?: boolean;
|
|
@@ -19,6 +20,7 @@ export interface ClientHistoryMessage {
|
|
|
19
20
|
/** Persisted inbound attachment metadata used by chat clients to reload media. */
|
|
20
21
|
media?: Message['media'];
|
|
21
22
|
deliveries?: import('@xopcai/gateway-contract').ProductDeliveryEnvelope[];
|
|
23
|
+
generatedMediaIds?: string[];
|
|
22
24
|
timestamp?: number;
|
|
23
25
|
/** Whitelisted display metadata; never includes source snapshot text. */
|
|
24
26
|
metadata?: {
|
|
@@ -42,6 +44,7 @@ export interface ClientHistoryMessage {
|
|
|
42
44
|
turnOutcome?: TurnOutcome;
|
|
43
45
|
taskResultDelivery?: TaskResultDelivery;
|
|
44
46
|
personalProvenance?: PersonalProvenance;
|
|
47
|
+
clarificationChoice?: ClarificationChoiceReceipt;
|
|
45
48
|
};
|
|
46
49
|
kind?: 'message' | 'compaction' | 'context' | 'bash' | 'custom' | 'branch';
|
|
47
50
|
tokensBefore?: number;
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { parseTurnOutcome } from "../../packages/gateway-contract/src/turn-outcome.js";
|
|
2
2
|
import { isUserTurnDocument } from "../../packages/gateway-contract/src/user-turn-document.js";
|
|
3
|
+
import { clarificationChoiceReceiptSchema } from "../../packages/gateway-contract/src/clarifications.js";
|
|
3
4
|
import { parseTaskResultDelivery } from "../../packages/gateway-contract/src/task-result-delivery.js";
|
|
4
5
|
import { PersonalProvenanceSchema, parsePersonalProactiveMessage } from "../../packages/gateway-contract/src/personal-proactivity.js";
|
|
5
6
|
import { init_src } from "../../packages/gateway-contract/src/index.js";
|
|
6
7
|
import { init_task_allocation_status, isRoutineTaskAllocationStatus } from "./task-allocation-status.js";
|
|
7
8
|
import { init_voice_transcript, isVoiceConversationMessage } from "./voice-transcript.js";
|
|
9
|
+
import { init_row_mappers, storedTranscriptEntryId } from "../storage/sqlite/row-mappers.js";
|
|
8
10
|
import { stripRuntimeContextFromUserMessage } from "./user-message-display.js";
|
|
9
11
|
import { buildTranscriptOutline } from "./transcript-outline.js";
|
|
10
12
|
//#region src/session/client-history.ts
|
|
11
13
|
init_src();
|
|
14
|
+
init_row_mappers();
|
|
12
15
|
init_task_allocation_status();
|
|
13
16
|
init_voice_transcript();
|
|
14
17
|
function taskTriggerFromMetadata(metadata) {
|
|
@@ -335,6 +338,19 @@ function customRowToClientHistory(row) {
|
|
|
335
338
|
if (r.role !== "custom" && r.type !== "custom_message") return null;
|
|
336
339
|
const customType = optionalString(r.customType)?.trim();
|
|
337
340
|
if (!customType) return null;
|
|
341
|
+
if (customType === "clarification_answers" && r.display !== false) {
|
|
342
|
+
const details = r.details;
|
|
343
|
+
const parsed = clarificationChoiceReceiptSchema.safeParse(details?.choice);
|
|
344
|
+
const label = parsed.success ? parsed.data.choices.find((choice) => choice.id === parsed.data.choiceId)?.label : void 0;
|
|
345
|
+
if (parsed.success && label && typeof details?.waitId === "string") return {
|
|
346
|
+
role: "user",
|
|
347
|
+
kind: "message",
|
|
348
|
+
turnId: `clarification-choice:${details.waitId}`,
|
|
349
|
+
content: label,
|
|
350
|
+
timestamp: parseTimestampValue(typeof r.timestamp === "number" ? r.timestamp : void 0),
|
|
351
|
+
metadata: { clarificationChoice: parsed.data }
|
|
352
|
+
};
|
|
353
|
+
}
|
|
338
354
|
if (customType === "task_allocation_status" && (r.display === false || isRoutineTaskAllocationStatus(r.details))) return null;
|
|
339
355
|
if (customType === "personal_request_status" || customType === "task_allocation_status") {
|
|
340
356
|
const content = typeof r.content === "string" ? r.content : "";
|
|
@@ -613,8 +629,10 @@ function transcriptRowsToClientHistory(rows, opts) {
|
|
|
613
629
|
continue;
|
|
614
630
|
}
|
|
615
631
|
const rawContent = rawAssistantContent(messageRow.content);
|
|
632
|
+
const transcriptEntryId = storedTranscriptEntryId(row);
|
|
616
633
|
out.push({
|
|
617
634
|
id,
|
|
635
|
+
...transcriptEntryId ? { transcriptEntryId } : {},
|
|
618
636
|
...messageRow.stopReason === "aborted" || messageRow.stopReason === "error" ? { stopReason: messageRow.stopReason } : {},
|
|
619
637
|
...messageRow.turnId ? { turnId: messageRow.turnId } : {},
|
|
620
638
|
...PersonalProvenanceSchema.safeParse(messageRow.metadata?.personalProvenance).success ? {
|
|
@@ -14,9 +14,36 @@ function productDeliveries(result) {
|
|
|
14
14
|
const delivery = parseProductDeliveryEnvelope(details?.delivery) ?? parseProductDeliveryEnvelope(details) ?? parseProductDeliveryText(text);
|
|
15
15
|
return delivery ? [delivery] : [];
|
|
16
16
|
}
|
|
17
|
+
function generatedMediaId(call) {
|
|
18
|
+
if (call.isError || call.name !== "music_generation" && call.name !== "video_draft" || !call.result) return;
|
|
19
|
+
try {
|
|
20
|
+
const id = JSON.parse(call.result)?.id;
|
|
21
|
+
if (typeof id !== "string") return;
|
|
22
|
+
return (call.name === "music_generation" ? /^[a-f0-9]{64}$/ : /^[a-f0-9]{8}(?:-[a-f0-9]{4}){3}-[a-f0-9]{12}$/).test(id) ? id : void 0;
|
|
23
|
+
} catch {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
17
27
|
/** Transport-only projection: stored transcripts and default clients remain unchanged. */
|
|
18
28
|
function compactHistory(messages) {
|
|
19
|
-
|
|
29
|
+
const replyIndex = /* @__PURE__ */ new Map();
|
|
30
|
+
const mediaByReply = /* @__PURE__ */ new Map();
|
|
31
|
+
const seenMedia = /* @__PURE__ */ new Set();
|
|
32
|
+
messages.forEach((message, index) => {
|
|
33
|
+
if (message.role === "assistant" && message.turnId && !message.toolCalls?.length && message.content.trim()) replyIndex.set(message.turnId, index);
|
|
34
|
+
});
|
|
35
|
+
messages.forEach((message, index) => {
|
|
36
|
+
for (const call of message.toolCalls ?? []) {
|
|
37
|
+
const id = generatedMediaId(call);
|
|
38
|
+
if (!id || seenMedia.has(id)) continue;
|
|
39
|
+
seenMedia.add(id);
|
|
40
|
+
const target = (message.turnId ? replyIndex.get(message.turnId) : void 0) ?? index;
|
|
41
|
+
const ids = mediaByReply.get(target) ?? /* @__PURE__ */ new Set();
|
|
42
|
+
ids.add(id);
|
|
43
|
+
mediaByReply.set(target, ids);
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
return messages.flatMap((message, index) => {
|
|
20
47
|
if (message.role === "system") return [];
|
|
21
48
|
if (message.role === "user") return [message];
|
|
22
49
|
const narration = !!message.toolCalls?.length;
|
|
@@ -38,6 +65,7 @@ function compactHistory(messages) {
|
|
|
38
65
|
if (!content && !mediaAndReview.length && !message.media?.length && !outcome && !deliveries.length && !activities.length) return [];
|
|
39
66
|
return [{
|
|
40
67
|
id: message.id,
|
|
68
|
+
...!narration && message.transcriptEntryId ? { transcriptEntryId: message.transcriptEntryId } : {},
|
|
41
69
|
turnId: message.turnId,
|
|
42
70
|
startsNewBubble: message.startsNewBubble,
|
|
43
71
|
...message.stopReason ? { stopReason: message.stopReason } : {},
|
|
@@ -46,6 +74,7 @@ function compactHistory(messages) {
|
|
|
46
74
|
timestamp: message.timestamp,
|
|
47
75
|
media: message.media,
|
|
48
76
|
deliveries,
|
|
77
|
+
...mediaByReply.has(index) ? { generatedMediaIds: [...mediaByReply.get(index) ?? []] } : {},
|
|
49
78
|
rawContent: [
|
|
50
79
|
...content ? [{
|
|
51
80
|
type: "text",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TurnOutcomeDeliverableSchema, fileResourceArtifactUri, mergeTurnOutcomeDeliverables, parseTurnOutcome, turnOutcomeKindFromFileName, turnOutcomeMimeTypeFromFileName } from "../../packages/gateway-contract/src/turn-outcome.js";
|
|
2
1
|
import { parseProductDeliveryEnvelope } from "../../packages/gateway-contract/src/product-delivery.js";
|
|
2
|
+
import { TurnOutcomeDeliverableSchema, fileResourceArtifactUri, mergeTurnOutcomeDeliverables, parseTurnOutcome, turnOutcomeKindFromFileName, turnOutcomeMimeTypeFromFileName } from "../../packages/gateway-contract/src/turn-outcome.js";
|
|
3
3
|
import { init_src } from "../../packages/gateway-contract/src/index.js";
|
|
4
4
|
import { parseFileResourceId } from "../files/file-service.js";
|
|
5
5
|
//#region src/session/turn-outcome-projector.ts
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { DatabaseSync } from 'node:sqlite';
|
|
2
|
+
import { type TaskResultDelivery } from '@xopcai/gateway-contract';
|
|
3
|
+
type Origin = {
|
|
4
|
+
key: string;
|
|
5
|
+
kind: 'chat' | 'task' | 'automation';
|
|
6
|
+
conversationId: string;
|
|
7
|
+
transcriptId?: string;
|
|
8
|
+
entryId?: string;
|
|
9
|
+
projectId?: string;
|
|
10
|
+
taskId?: string;
|
|
11
|
+
automationRunId?: string;
|
|
12
|
+
label?: string;
|
|
13
|
+
createdAt: number;
|
|
14
|
+
};
|
|
15
|
+
export declare const SPACE_VIDEO_MAX_BYTES: number;
|
|
16
|
+
type Content = {
|
|
17
|
+
fileName: string;
|
|
18
|
+
mimeType: string;
|
|
19
|
+
size: number;
|
|
20
|
+
kind: string;
|
|
21
|
+
mediaId?: string;
|
|
22
|
+
body?: string;
|
|
23
|
+
sha256?: string;
|
|
24
|
+
};
|
|
25
|
+
export declare function archiveSpaceContent(db: DatabaseSync, origin: Origin, identity: string, title: string, content: Content, userInitiated?: boolean): string | null;
|
|
26
|
+
export declare function spaceMarkdown(title: string, body: string): Content;
|
|
27
|
+
export declare function archiveSpaceTurn(db: DatabaseSync, source: {
|
|
28
|
+
conversationId: string;
|
|
29
|
+
transcriptId: string;
|
|
30
|
+
entryId: string;
|
|
31
|
+
createdAt: number;
|
|
32
|
+
outcome: unknown;
|
|
33
|
+
}): void;
|
|
34
|
+
export declare function archiveSpaceTaskDelivery(db: DatabaseSync, delivery: TaskResultDelivery, entryId?: string): void;
|
|
35
|
+
export declare function archiveSpaceGeneratedMedia(db: DatabaseSync, kind: 'music' | 'video', id: string): void;
|
|
36
|
+
export {};
|