@xopcai/xopc 0.0.366 → 0.0.367
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-SVmnh__i.js → activity-store-Cuf3JFFJ.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-CS9lg5h2.js → agent-avatar-dicebear-DyATPNTe.js} +1 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-gT9_j4tr.js +1 -0
- package/dist/gateway/static/root/assets/agent-plugin-dialog-CLXCJ6JN.js +1 -0
- package/dist/gateway/static/root/assets/agents-BAUfOMsq.js +66 -0
- package/dist/gateway/static/root/assets/{agents-admin-api-CVdFV-cU.js → agents-admin-api-D842OcNo.js} +1 -1
- package/dist/gateway/static/root/assets/app-link-4gpFbdsr.js +1 -0
- package/dist/gateway/static/root/assets/{app-management-settings-panel-CaxnUxvy.js → app-management-settings-panel-CoIFxQKH.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-6NKquG3v.js → appearance-settings-DQr0o6Lm.js} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-BoB3MbsB.js → apps-page-CltMV4Xp.js} +1 -1
- package/dist/gateway/static/root/assets/{archive-plugin-BWtLZtK1.js → archive-plugin-DT8Nio-r.js} +1 -1
- package/dist/gateway/static/root/assets/automation-display-DCkjVzA0.js +2 -0
- package/dist/gateway/static/root/assets/{automations-page-CNngHw2c.js → automations-page-BIfWS_3Y.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-BCGPjsdU.js +6 -0
- package/dist/gateway/static/root/assets/binary-plugins-7qs3qcW9.js +2 -0
- package/dist/gateway/static/root/assets/{block-editor-BhstSZNE.js → block-editor-BFPUlxJ6.js} +28 -28
- package/dist/gateway/static/root/assets/{browser-automation-inputs-B6sOBxVA.js → browser-automation-inputs-BUAIKIX0.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automations-page-HZAKkVVt.js → browser-automations-page-CSwu1U1F.js} +2 -2
- package/dist/gateway/static/root/assets/browser-settings-page-C1ReMNqX.js +3 -0
- package/dist/gateway/static/root/assets/capabilities-BzWFO_x_.js +1 -0
- package/dist/gateway/static/root/assets/{capabilities-CAIQmCrH.js → capabilities-K0Zb_lH0.js} +1 -1
- package/dist/gateway/static/root/assets/capabilities-page-BdTSqloI.js +2 -0
- package/dist/gateway/static/root/assets/{capabilities-settings-panel-BP2roWcM.js → capabilities-settings-panel-BUblBMZC.js} +4 -4
- package/dist/gateway/static/root/assets/{capability-header-actions-BA1M7RRP.js → capability-header-actions-AMn_vTNv.js} +1 -1
- package/dist/gateway/static/root/assets/channels-CXCf5qO6.js +1 -0
- package/dist/gateway/static/root/assets/{chat-terminal-dock-KS_yk1H7.js → chat-terminal-dock-C7nAROhF.js} +2 -2
- package/dist/gateway/static/root/assets/chevron-left-DqFhpbvK.js +1 -0
- package/dist/gateway/static/root/assets/computer-settings-page-B5SuSZ3G.js +1 -0
- package/dist/gateway/static/root/assets/{connector-service-page-CY_3H_l9.js → connector-service-page-CTx1B8wx.js} +1 -1
- package/dist/gateway/static/root/assets/connectors-page-DfnK1crf.js +2 -0
- package/dist/gateway/static/root/assets/date-formatters-CUZAyDEg.js +1 -0
- package/dist/gateway/static/root/assets/date-picker-Cx_xIKvN.js +1 -0
- package/dist/gateway/static/root/assets/{dependency-picker-CyNH4m20.js → dependency-picker-DYm96PDu.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-BsZQsQ2_.js → desktop-pet-D90OzgeR.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-DMgkUy6g.js → desktop-pet-settings-CmdCecjm.js} +1 -1
- package/dist/gateway/static/root/assets/{device-pairing-wizard-JjbUN8y-.js → device-pairing-wizard-s2ogSa4l.js} +1 -1
- package/dist/gateway/static/root/assets/{directory-picker-path-field-CBTI3tKh.js → directory-picker-path-field-DZpaoeNa.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-C7nSpOKj.js → extension-debug-page-Bv6QE8kC.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-BYUjAvsZ.js → extension-page-CEsq71Cm.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-provider-DaLt3bC-.js → extension-provider-CX-sK0Tw.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-CRasspq0.js → extension-settings-page-UyOHF39P.js} +1 -1
- package/dist/gateway/static/root/assets/{fallback-models-BLJFYASE.js → fallback-models-CKv_Wqg8.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-swr-DIIzvDLQ.js → gateway-config-swr-Cjnkle5J.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-realtime-DD70L42G.js → gateway-realtime-DCCLdyQD.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-C_Th8kGg.js +1 -0
- package/dist/gateway/static/root/assets/gateway-settings-CZ73IpbP.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-startup-retry-D_EwU7-6.js → gateway-startup-retry-CXKmdVzN.js} +1 -1
- package/dist/gateway/static/root/assets/home-page-BQWq4kYi.js +2 -0
- package/dist/gateway/static/root/assets/{image-generation-api-BkK22JsL.js → image-generation-api-NLHzm4Nc.js} +1 -1
- package/dist/gateway/static/root/assets/{imports-page-YJKcTKKr.js → imports-page-C7qvlBTQ.js} +1 -1
- package/dist/gateway/static/root/assets/index-BQgqzhQj.js +106 -0
- package/dist/gateway/static/root/assets/index-COB4QIJp.css +1 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-BG_kM_Rm.js → keyboard-shortcuts-settings-pkgFWJb-.js} +1 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-dMDhZXAi.js +1 -0
- package/dist/gateway/static/root/assets/{local-apps-page-jqthjcQO.js → local-apps-page-TpUAfOn2.js} +1 -1
- package/dist/gateway/static/root/assets/{local-session-drafts-C4et6msJ.js → local-session-drafts-Cvv7I0fw.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-CvNO-hbt.js → locale-store-C8TMD2gn.js} +1 -1
- package/dist/gateway/static/root/assets/logs-page-B-Y9oZLh.js +2 -0
- package/dist/gateway/static/root/assets/management-settings-B2lzsw6X.js +1 -0
- package/dist/gateway/static/root/assets/markdown-view-Dse7rkio.js +201 -0
- package/dist/gateway/static/root/assets/{media-plugins-C25mOgs2.js → media-plugins-BZrnzaBM.js} +1 -1
- package/dist/gateway/static/root/assets/messages-Dy26npMy.js +3 -0
- package/dist/gateway/static/root/assets/models-hub-cache-B1C86nRp.js +1 -0
- package/dist/gateway/static/root/assets/note-detail-panel-DL__qP6U.js +5 -0
- package/dist/gateway/static/root/assets/{notes-api-CKLw9vjk.js → notes-api-DKiVeQKG.js} +1 -1
- package/dist/gateway/static/root/assets/notes-page-DTBbg9Hs.js +8 -0
- package/dist/gateway/static/root/assets/{oauth-api-CC5KkSgG.js → oauth-api-BwpzpRwC.js} +1 -1
- package/dist/gateway/static/root/assets/open-route-MyZ2sB9C.js +1 -0
- package/dist/gateway/static/root/assets/{page-context-capture-button-KX9mrcJW.js → page-context-capture-button-Cxzd4QPB.js} +1 -1
- package/dist/gateway/static/root/assets/personal-page-CzaTnHeD.js +1 -0
- package/dist/gateway/static/root/assets/product-open-page-D4hoEWiu.js +1 -0
- package/dist/gateway/static/root/assets/product-preview-content-aR38El2E.js +1 -0
- package/dist/gateway/static/root/assets/project-detail-page-D20QH4YB.js +1 -0
- package/dist/gateway/static/root/assets/projects-page-Bf3BIcT6.js +1 -0
- package/dist/gateway/static/root/assets/{registry-api-CiN49wvk.js → registry-api-AdnxowbH.js} +1 -1
- package/dist/gateway/static/root/assets/remote-access-hub-CKxqncqW.js +1 -0
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-wZjlSBiM.js → runtime-tools-settings-panel-CBN3raz1.js} +1 -1
- package/dist/gateway/static/root/assets/scenes-page-Cv_5ozfX.js +2 -0
- package/dist/gateway/static/root/assets/{schema-form-CMB61TV1.js → schema-form-CxrMGsT9.js} +1 -1
- package/dist/gateway/static/root/assets/{send-session-input-jH6MQwdZ.js → send-session-input-CgOzhDZ0.js} +1 -1
- package/dist/gateway/static/root/assets/{session-api-CW2X7g_U.js → session-api-_HIN8or3.js} +1 -1
- package/dist/gateway/static/root/assets/session-manager-CzCto5zT.js +16 -0
- package/dist/gateway/static/root/assets/sessions-page-DZcu6NLJ.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-DazqeDQ7.js +1 -0
- package/dist/gateway/static/root/assets/{settings-page-Ch71KQjb.js → settings-page-D8Q3H3-o.js} +1 -1
- package/dist/gateway/static/root/assets/setup-status-panel-DvLMMiuS.js +1 -0
- package/dist/gateway/static/root/assets/{share-link-dialog-DCSmx-Rl.js → share-link-dialog-Dg5os066.js} +1 -1
- package/dist/gateway/static/root/assets/{share-preview-page-C93IM3QK.js → share-preview-page-DMvohAyr.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-api-B4rLfG3l.js → shares-api-C96IO4qJ.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-settings-C_6idV8e.js → shares-settings-CsDATuCw.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-api-sKX8SSlQ.js → skill-api-C10ML0CH.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-reload-api-Ro-s69NW.js → skill-reload-api-DNbJzSfB.js} +1 -1
- package/dist/gateway/static/root/assets/skills-page-DObMKvA6.js +2 -0
- package/dist/gateway/static/root/assets/{system-settings-panel-DIjaUlla.js → system-settings-panel-Bn3khdzb.js} +1 -1
- package/dist/gateway/static/root/assets/task-detail-page-BR2L1L8l.js +2 -0
- package/dist/gateway/static/root/assets/task-expandable-content-DL2Q2gre.js +1 -0
- package/dist/gateway/static/root/assets/{tasks-CH6KoBeY.js → tasks-DwKXgZ-I.js} +1 -1
- package/dist/gateway/static/root/assets/{theme-store-DbRLBHVY.js → theme-store-DQ6KJa4l.js} +1 -1
- package/dist/gateway/static/root/assets/{tracing-settings-page-IgY26AYH.js → tracing-settings-page-Ed8_GYUT.js} +1 -1
- package/dist/gateway/static/root/assets/{tunnel-api-CgARwbus.js → tunnel-api-D3X8jDwo.js} +1 -1
- package/dist/gateway/static/root/assets/{usage-page-CKju62Cm.js → usage-page-BqzRyyb9.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-C889OTsP.js → use-autosave-CRFefpzO.js} +1 -1
- package/dist/gateway/static/root/assets/use-composer-attachments-OLrvSjn5.js +2 -0
- package/dist/gateway/static/root/assets/{use-file-preview-expanded-BOpcSApw.js → use-file-preview-expanded-CJvzfQvw.js} +2 -2
- package/dist/gateway/static/root/assets/user-model-page-CG6wqIKP.js +2 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-evWflGY6.js → voice-api-key-field-R9zNWYR_.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-CZoV2Lt4.js → voice-config-api-DLudE9Rc.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-B2-2F39_.js → work-discovery-overlay-DVmQrolV.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-cOGM8Nug.js → workflow-run-setup-panel-DEkmuD3T.js} +2 -2
- package/dist/gateway/static/root/assets/workflows-page-pqCB3sh4.js +6 -0
- package/dist/gateway/static/root/assets/workspace-api-CdVUhyPo.js +2 -0
- package/dist/gateway/static/root/index.html +32 -30
- package/dist/package.js +1 -1
- package/dist/packages/gateway-contract/src/automations.js +1 -0
- package/dist/packages/gateway-contract/src/home.js +14 -0
- package/dist/packages/gateway-contract/src/index.js +2 -0
- package/dist/packages/gateway-contract/src/notifications.js +2 -1
- package/dist/packages/gateway-contract/src/personal-proactivity.js +139 -0
- package/dist/packages/image-providers/src/catalog.js +373 -0
- package/dist/packages/image-providers/src/execute.js +372 -0
- package/dist/packages/image-providers/src/http.js +94 -0
- package/dist/packages/image-providers/src/index.js +5 -0
- package/dist/packages/image-providers/src/types.d.ts +95 -0
- package/dist/packages/image-providers/src/validation.js +52 -0
- package/dist/src/agent/commands/command-registry.js +1 -1
- package/dist/src/agent/failover-error.d.ts +1 -1
- package/dist/src/agent/failover-error.js +7 -0
- package/dist/src/agent/image/generation/native-provider.d.ts +2 -0
- package/dist/src/agent/image/generation/native-provider.js +118 -0
- package/dist/src/agent/image/generation/openai-images-provider.d.ts +1 -1
- package/dist/src/agent/image/generation/openai-images-provider.js +48 -32
- package/dist/src/agent/image/generation/provider-registry.js +4 -13
- package/dist/src/agent/image/generation/providers/xopc-cloud.js +5 -34
- package/dist/src/agent/image/generation/runtime-types.d.ts +2 -4
- package/dist/src/agent/image/generation/runtime.js +28 -23
- package/dist/src/agent/image/generation/types.d.ts +3 -50
- package/dist/src/agent/image/generation/validation.d.ts +6 -0
- package/dist/src/agent/image/generation/validation.js +16 -0
- package/dist/src/agent/tools/factory.js +5 -0
- package/dist/src/agent/tools/image-generate-tool.js +5 -19
- package/dist/src/agent/tools/personal-attention-tool.d.ts +21 -0
- package/dist/src/agent/tools/personal-attention-tool.js +191 -0
- package/dist/src/automations/capabilities/write.d.ts +2 -0
- package/dist/src/automations/domain/types.d.ts +1 -1
- package/dist/src/automations/domain/validation.d.ts +4 -0
- package/dist/src/automations/domain/validation.js +1 -0
- package/dist/src/automations/draft/automation-draft-validator.d.ts +1 -1
- package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
- package/dist/src/cli/commands/models.js +3 -8
- package/dist/src/config/models-json.d.ts +170 -0
- package/dist/src/config/models-json.js +23 -8
- package/dist/src/files/file-service.d.ts +6 -0
- package/dist/src/files/file-service.js +38 -1
- package/dist/src/gateway/custom-image-providers.d.ts +34 -0
- package/dist/src/gateway/file-path-classifier.js +12 -3
- package/dist/src/gateway/hono/routes/files.js +13 -2
- package/dist/src/gateway/hono/routes/personal-agent.js +41 -0
- package/dist/src/gateway/service.d.ts +1 -0
- package/dist/src/gateway/service.js +50 -11
- package/dist/src/home-intelligence/host.js +2 -2
- package/dist/src/notifications/planner.js +32 -0
- package/dist/src/notifications/service.d.ts +2 -0
- package/dist/src/personal-agent/notifications.d.ts +4 -0
- package/dist/src/personal-agent/notifications.js +40 -0
- package/dist/src/personal-agent/policy.d.ts +1 -1
- package/dist/src/personal-agent/policy.js +2 -0
- package/dist/src/personal-agent/proactivity/automation.d.ts +3 -0
- package/dist/src/personal-agent/proactivity/automation.js +41 -0
- package/dist/src/personal-agent/proactivity/follow-up-request.d.ts +5 -0
- package/dist/src/personal-agent/proactivity/follow-up-request.js +44 -0
- package/dist/src/personal-agent/proactivity/repository.d.ts +128 -0
- package/dist/src/personal-agent/proactivity/repository.js +403 -0
- package/dist/src/personal-agent/proactivity/routes.d.ts +3 -0
- package/dist/src/personal-agent/proactivity/routes.js +182 -0
- package/dist/src/personal-agent/proactivity/service.d.ts +32 -0
- package/dist/src/personal-agent/proactivity/service.js +496 -0
- package/dist/src/personal-agent/prompts.js +13 -2
- package/dist/src/personal-agent/reply-composer.js +2 -2
- package/dist/src/personal-agent/unread.d.ts +10 -0
- package/dist/src/personal-agent/unread.js +43 -0
- package/dist/src/providers/env-keys.js +6 -0
- package/dist/src/providers/model-catalog-persistence.js +3 -22
- package/dist/src/providers/model-catalog-store.js +1 -8
- package/dist/src/providers/model-catalog-types.d.ts +1 -9
- package/dist/src/providers/xopc-cloud-model-source.js +4 -25
- package/dist/src/session/client-history.d.ts +2 -0
- package/dist/src/session/client-history.js +26 -0
- package/dist/src/session/session-context-for-llm.js +28 -0
- package/dist/src/storage/sqlite/migrations/236_personal_proactivity.sql +53 -0
- package/dist/src/storage/sqlite/migrations/237_personal_strategy_versions.sql +18 -0
- package/dist/src/storage/sqlite/migrations/runner.d.ts +1 -1
- package/dist/src/storage/sqlite/migrations/runner.js +3 -3
- package/dist/src/storage/sqlite/schema.js +1 -1
- package/dist/src/tasks/home-query-service.js +27 -1
- package/dist/src/voice/platform-catalog.d.ts +1 -9
- package/package.json +4 -3
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-CvUPtxS4.js +0 -1
- package/dist/gateway/static/root/assets/agent-plugin-dialog-1tRxDfjI.js +0 -1
- package/dist/gateway/static/root/assets/agents-gdT0whx9.js +0 -66
- package/dist/gateway/static/root/assets/app-link-DRL0YnPs.js +0 -1
- package/dist/gateway/static/root/assets/automations-workspace-BKHsdiQ8.js +0 -7
- package/dist/gateway/static/root/assets/binary-plugins-fIhH-wg6.js +0 -2
- package/dist/gateway/static/root/assets/browser-settings-page-D8IpVQI6.js +0 -3
- package/dist/gateway/static/root/assets/capabilities-C4grvUkw.js +0 -1
- package/dist/gateway/static/root/assets/capabilities-page-DK8FJRW4.js +0 -2
- package/dist/gateway/static/root/assets/channels-EQGCxr8W.js +0 -1
- package/dist/gateway/static/root/assets/computer-settings-page-CGBR0KFw.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-CUOL6JX0.js +0 -2
- package/dist/gateway/static/root/assets/date-picker-CDSZ-PWV.js +0 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-DeUVEPPE.js +0 -1
- package/dist/gateway/static/root/assets/gateway-settings-B9n5naCr.js +0 -1
- package/dist/gateway/static/root/assets/home-page-BP6qAgBt.js +0 -1
- package/dist/gateway/static/root/assets/index-6JNNrzCq.js +0 -106
- package/dist/gateway/static/root/assets/index-CbJNcWAn.css +0 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-lHi21M1T.js +0 -1
- package/dist/gateway/static/root/assets/logs-page-CH7W-dm5.js +0 -2
- package/dist/gateway/static/root/assets/management-settings-DVgI_KNm.js +0 -1
- package/dist/gateway/static/root/assets/markdown-view-DDJlD5jR.js +0 -201
- package/dist/gateway/static/root/assets/messages-pGa2qMzG.js +0 -3
- package/dist/gateway/static/root/assets/models-hub-cache-DzFiL4xV.js +0 -1
- package/dist/gateway/static/root/assets/note-detail-panel-kyX-n1db.js +0 -5
- package/dist/gateway/static/root/assets/notes-page-CLZygZlm.js +0 -8
- package/dist/gateway/static/root/assets/personal-page-DnXlcJNJ.js +0 -1
- package/dist/gateway/static/root/assets/product-open-page-D7pknlCh.js +0 -1
- package/dist/gateway/static/root/assets/project-detail-page-DhV9DPj8.js +0 -1
- package/dist/gateway/static/root/assets/projects-page-D181xkFw.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-CQnBARQW.js +0 -1
- package/dist/gateway/static/root/assets/scenes-page-DWt54veq.js +0 -2
- package/dist/gateway/static/root/assets/session-manager-BDpdi3lF.js +0 -16
- package/dist/gateway/static/root/assets/sessions-page-DPEdjUdR.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-B6WGnTLY.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-C7sLy8Hl.js +0 -1
- package/dist/gateway/static/root/assets/skills-page-TsrjLYcI.js +0 -2
- package/dist/gateway/static/root/assets/task-detail-page-B4Lby289.js +0 -2
- package/dist/gateway/static/root/assets/use-composer-attachments-Dlm9EFTO.js +0 -2
- package/dist/gateway/static/root/assets/user-model-page-CTkCLRhE.js +0 -2
- package/dist/gateway/static/root/assets/workflows-page-Csk8xrRk.js +0 -6
- package/dist/gateway/static/root/assets/workspace-api-B9M9ECTB.js +0 -2
- package/dist/src/agent/image/generation/normalization.d.ts +0 -38
- package/dist/src/agent/image/generation/normalization.js +0 -181
- package/dist/src/agent/image/generation/providers/dashscope.d.ts +0 -35
- package/dist/src/agent/image/generation/providers/dashscope.js +0 -257
- package/dist/src/agent/image/generation/providers/fal.d.ts +0 -15
- package/dist/src/agent/image/generation/providers/fal.js +0 -323
- package/dist/src/agent/image/generation/providers/google.d.ts +0 -16
- package/dist/src/agent/image/generation/providers/google.js +0 -244
- package/dist/src/agent/image/generation/providers/minimax.d.ts +0 -23
- package/dist/src/agent/image/generation/providers/minimax.js +0 -215
- package/dist/src/agent/image/generation/providers/openai.d.ts +0 -5
- package/dist/src/agent/image/generation/providers/openai.js +0 -134
|
@@ -99,9 +99,33 @@ export declare const ImageGenerationCapabilitiesSchema: z.ZodObject<{
|
|
|
99
99
|
}, z.core.$strict>>;
|
|
100
100
|
edit: z.ZodOptional<z.ZodObject<{
|
|
101
101
|
enabled: z.ZodBoolean;
|
|
102
|
+
inputFormats: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
103
|
+
png: "png";
|
|
104
|
+
jpeg: "jpeg";
|
|
105
|
+
webp: "webp";
|
|
106
|
+
}>>>;
|
|
107
|
+
maxInputBytes: z.ZodOptional<z.ZodNumber>;
|
|
102
108
|
maxInputImages: z.ZodOptional<z.ZodNumber>;
|
|
103
109
|
supportsSize: z.ZodOptional<z.ZodBoolean>;
|
|
104
110
|
supportsAspectRatio: z.ZodOptional<z.ZodBoolean>;
|
|
111
|
+
supportsResolution: z.ZodOptional<z.ZodBoolean>;
|
|
112
|
+
geometry: z.ZodOptional<z.ZodObject<{
|
|
113
|
+
sizes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
114
|
+
aspectRatios: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
115
|
+
resolutions: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
116
|
+
"1K": "1K";
|
|
117
|
+
"2K": "2K";
|
|
118
|
+
"4K": "4K";
|
|
119
|
+
}>>>;
|
|
120
|
+
pixels: z.ZodOptional<z.ZodObject<{
|
|
121
|
+
minPixels: z.ZodNumber;
|
|
122
|
+
maxPixels: z.ZodNumber;
|
|
123
|
+
minEdge: z.ZodNumber;
|
|
124
|
+
maxEdge: z.ZodNumber;
|
|
125
|
+
step: z.ZodNumber;
|
|
126
|
+
maxRatio: z.ZodNumber;
|
|
127
|
+
}, z.core.$strict>>;
|
|
128
|
+
}, z.core.$strict>>;
|
|
105
129
|
}, z.core.$strict>>;
|
|
106
130
|
geometry: z.ZodOptional<z.ZodObject<{
|
|
107
131
|
sizes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -111,12 +135,22 @@ export declare const ImageGenerationCapabilitiesSchema: z.ZodObject<{
|
|
|
111
135
|
"2K": "2K";
|
|
112
136
|
"4K": "4K";
|
|
113
137
|
}>>>;
|
|
138
|
+
pixels: z.ZodOptional<z.ZodObject<{
|
|
139
|
+
minPixels: z.ZodNumber;
|
|
140
|
+
maxPixels: z.ZodNumber;
|
|
141
|
+
minEdge: z.ZodNumber;
|
|
142
|
+
maxEdge: z.ZodNumber;
|
|
143
|
+
step: z.ZodNumber;
|
|
144
|
+
maxRatio: z.ZodNumber;
|
|
145
|
+
}, z.core.$strict>>;
|
|
114
146
|
}, z.core.$strict>>;
|
|
115
147
|
output: z.ZodOptional<z.ZodObject<{
|
|
116
148
|
qualities: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
117
149
|
low: "low";
|
|
118
150
|
high: "high";
|
|
119
151
|
medium: "medium";
|
|
152
|
+
xhigh: "xhigh";
|
|
153
|
+
max: "max";
|
|
120
154
|
auto: "auto";
|
|
121
155
|
}>>>;
|
|
122
156
|
formats: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
@@ -143,9 +177,33 @@ export declare const ImageGenerationModelSchema: z.ZodObject<{
|
|
|
143
177
|
}, z.core.$strict>>;
|
|
144
178
|
edit: z.ZodOptional<z.ZodObject<{
|
|
145
179
|
enabled: z.ZodBoolean;
|
|
180
|
+
inputFormats: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
181
|
+
png: "png";
|
|
182
|
+
jpeg: "jpeg";
|
|
183
|
+
webp: "webp";
|
|
184
|
+
}>>>;
|
|
185
|
+
maxInputBytes: z.ZodOptional<z.ZodNumber>;
|
|
146
186
|
maxInputImages: z.ZodOptional<z.ZodNumber>;
|
|
147
187
|
supportsSize: z.ZodOptional<z.ZodBoolean>;
|
|
148
188
|
supportsAspectRatio: z.ZodOptional<z.ZodBoolean>;
|
|
189
|
+
supportsResolution: z.ZodOptional<z.ZodBoolean>;
|
|
190
|
+
geometry: z.ZodOptional<z.ZodObject<{
|
|
191
|
+
sizes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
192
|
+
aspectRatios: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
193
|
+
resolutions: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
194
|
+
"1K": "1K";
|
|
195
|
+
"2K": "2K";
|
|
196
|
+
"4K": "4K";
|
|
197
|
+
}>>>;
|
|
198
|
+
pixels: z.ZodOptional<z.ZodObject<{
|
|
199
|
+
minPixels: z.ZodNumber;
|
|
200
|
+
maxPixels: z.ZodNumber;
|
|
201
|
+
minEdge: z.ZodNumber;
|
|
202
|
+
maxEdge: z.ZodNumber;
|
|
203
|
+
step: z.ZodNumber;
|
|
204
|
+
maxRatio: z.ZodNumber;
|
|
205
|
+
}, z.core.$strict>>;
|
|
206
|
+
}, z.core.$strict>>;
|
|
149
207
|
}, z.core.$strict>>;
|
|
150
208
|
geometry: z.ZodOptional<z.ZodObject<{
|
|
151
209
|
sizes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -155,12 +213,22 @@ export declare const ImageGenerationModelSchema: z.ZodObject<{
|
|
|
155
213
|
"2K": "2K";
|
|
156
214
|
"4K": "4K";
|
|
157
215
|
}>>>;
|
|
216
|
+
pixels: z.ZodOptional<z.ZodObject<{
|
|
217
|
+
minPixels: z.ZodNumber;
|
|
218
|
+
maxPixels: z.ZodNumber;
|
|
219
|
+
minEdge: z.ZodNumber;
|
|
220
|
+
maxEdge: z.ZodNumber;
|
|
221
|
+
step: z.ZodNumber;
|
|
222
|
+
maxRatio: z.ZodNumber;
|
|
223
|
+
}, z.core.$strict>>;
|
|
158
224
|
}, z.core.$strict>>;
|
|
159
225
|
output: z.ZodOptional<z.ZodObject<{
|
|
160
226
|
qualities: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
161
227
|
low: "low";
|
|
162
228
|
high: "high";
|
|
163
229
|
medium: "medium";
|
|
230
|
+
xhigh: "xhigh";
|
|
231
|
+
max: "max";
|
|
164
232
|
auto: "auto";
|
|
165
233
|
}>>>;
|
|
166
234
|
formats: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
@@ -218,9 +286,33 @@ export declare const ImageGenerationProviderSchema: z.ZodObject<{
|
|
|
218
286
|
}, z.core.$strict>>;
|
|
219
287
|
edit: z.ZodOptional<z.ZodObject<{
|
|
220
288
|
enabled: z.ZodBoolean;
|
|
289
|
+
inputFormats: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
290
|
+
png: "png";
|
|
291
|
+
jpeg: "jpeg";
|
|
292
|
+
webp: "webp";
|
|
293
|
+
}>>>;
|
|
294
|
+
maxInputBytes: z.ZodOptional<z.ZodNumber>;
|
|
221
295
|
maxInputImages: z.ZodOptional<z.ZodNumber>;
|
|
222
296
|
supportsSize: z.ZodOptional<z.ZodBoolean>;
|
|
223
297
|
supportsAspectRatio: z.ZodOptional<z.ZodBoolean>;
|
|
298
|
+
supportsResolution: z.ZodOptional<z.ZodBoolean>;
|
|
299
|
+
geometry: z.ZodOptional<z.ZodObject<{
|
|
300
|
+
sizes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
301
|
+
aspectRatios: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
302
|
+
resolutions: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
303
|
+
"1K": "1K";
|
|
304
|
+
"2K": "2K";
|
|
305
|
+
"4K": "4K";
|
|
306
|
+
}>>>;
|
|
307
|
+
pixels: z.ZodOptional<z.ZodObject<{
|
|
308
|
+
minPixels: z.ZodNumber;
|
|
309
|
+
maxPixels: z.ZodNumber;
|
|
310
|
+
minEdge: z.ZodNumber;
|
|
311
|
+
maxEdge: z.ZodNumber;
|
|
312
|
+
step: z.ZodNumber;
|
|
313
|
+
maxRatio: z.ZodNumber;
|
|
314
|
+
}, z.core.$strict>>;
|
|
315
|
+
}, z.core.$strict>>;
|
|
224
316
|
}, z.core.$strict>>;
|
|
225
317
|
geometry: z.ZodOptional<z.ZodObject<{
|
|
226
318
|
sizes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -230,12 +322,22 @@ export declare const ImageGenerationProviderSchema: z.ZodObject<{
|
|
|
230
322
|
"2K": "2K";
|
|
231
323
|
"4K": "4K";
|
|
232
324
|
}>>>;
|
|
325
|
+
pixels: z.ZodOptional<z.ZodObject<{
|
|
326
|
+
minPixels: z.ZodNumber;
|
|
327
|
+
maxPixels: z.ZodNumber;
|
|
328
|
+
minEdge: z.ZodNumber;
|
|
329
|
+
maxEdge: z.ZodNumber;
|
|
330
|
+
step: z.ZodNumber;
|
|
331
|
+
maxRatio: z.ZodNumber;
|
|
332
|
+
}, z.core.$strict>>;
|
|
233
333
|
}, z.core.$strict>>;
|
|
234
334
|
output: z.ZodOptional<z.ZodObject<{
|
|
235
335
|
qualities: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
236
336
|
low: "low";
|
|
237
337
|
high: "high";
|
|
238
338
|
medium: "medium";
|
|
339
|
+
xhigh: "xhigh";
|
|
340
|
+
max: "max";
|
|
239
341
|
auto: "auto";
|
|
240
342
|
}>>>;
|
|
241
343
|
formats: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
@@ -617,9 +719,33 @@ export declare const ProviderConfigSchema: z.ZodObject<{
|
|
|
617
719
|
}, z.core.$strict>>;
|
|
618
720
|
edit: z.ZodOptional<z.ZodObject<{
|
|
619
721
|
enabled: z.ZodBoolean;
|
|
722
|
+
inputFormats: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
723
|
+
png: "png";
|
|
724
|
+
jpeg: "jpeg";
|
|
725
|
+
webp: "webp";
|
|
726
|
+
}>>>;
|
|
727
|
+
maxInputBytes: z.ZodOptional<z.ZodNumber>;
|
|
620
728
|
maxInputImages: z.ZodOptional<z.ZodNumber>;
|
|
621
729
|
supportsSize: z.ZodOptional<z.ZodBoolean>;
|
|
622
730
|
supportsAspectRatio: z.ZodOptional<z.ZodBoolean>;
|
|
731
|
+
supportsResolution: z.ZodOptional<z.ZodBoolean>;
|
|
732
|
+
geometry: z.ZodOptional<z.ZodObject<{
|
|
733
|
+
sizes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
734
|
+
aspectRatios: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
735
|
+
resolutions: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
736
|
+
"1K": "1K";
|
|
737
|
+
"2K": "2K";
|
|
738
|
+
"4K": "4K";
|
|
739
|
+
}>>>;
|
|
740
|
+
pixels: z.ZodOptional<z.ZodObject<{
|
|
741
|
+
minPixels: z.ZodNumber;
|
|
742
|
+
maxPixels: z.ZodNumber;
|
|
743
|
+
minEdge: z.ZodNumber;
|
|
744
|
+
maxEdge: z.ZodNumber;
|
|
745
|
+
step: z.ZodNumber;
|
|
746
|
+
maxRatio: z.ZodNumber;
|
|
747
|
+
}, z.core.$strict>>;
|
|
748
|
+
}, z.core.$strict>>;
|
|
623
749
|
}, z.core.$strict>>;
|
|
624
750
|
geometry: z.ZodOptional<z.ZodObject<{
|
|
625
751
|
sizes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -629,12 +755,22 @@ export declare const ProviderConfigSchema: z.ZodObject<{
|
|
|
629
755
|
"2K": "2K";
|
|
630
756
|
"4K": "4K";
|
|
631
757
|
}>>>;
|
|
758
|
+
pixels: z.ZodOptional<z.ZodObject<{
|
|
759
|
+
minPixels: z.ZodNumber;
|
|
760
|
+
maxPixels: z.ZodNumber;
|
|
761
|
+
minEdge: z.ZodNumber;
|
|
762
|
+
maxEdge: z.ZodNumber;
|
|
763
|
+
step: z.ZodNumber;
|
|
764
|
+
maxRatio: z.ZodNumber;
|
|
765
|
+
}, z.core.$strict>>;
|
|
632
766
|
}, z.core.$strict>>;
|
|
633
767
|
output: z.ZodOptional<z.ZodObject<{
|
|
634
768
|
qualities: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
635
769
|
low: "low";
|
|
636
770
|
high: "high";
|
|
637
771
|
medium: "medium";
|
|
772
|
+
xhigh: "xhigh";
|
|
773
|
+
max: "max";
|
|
638
774
|
auto: "auto";
|
|
639
775
|
}>>>;
|
|
640
776
|
formats: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
@@ -866,9 +1002,33 @@ export declare const ModelsJsonSchema: z.ZodObject<{
|
|
|
866
1002
|
}, z.core.$strict>>;
|
|
867
1003
|
edit: z.ZodOptional<z.ZodObject<{
|
|
868
1004
|
enabled: z.ZodBoolean;
|
|
1005
|
+
inputFormats: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
1006
|
+
png: "png";
|
|
1007
|
+
jpeg: "jpeg";
|
|
1008
|
+
webp: "webp";
|
|
1009
|
+
}>>>;
|
|
1010
|
+
maxInputBytes: z.ZodOptional<z.ZodNumber>;
|
|
869
1011
|
maxInputImages: z.ZodOptional<z.ZodNumber>;
|
|
870
1012
|
supportsSize: z.ZodOptional<z.ZodBoolean>;
|
|
871
1013
|
supportsAspectRatio: z.ZodOptional<z.ZodBoolean>;
|
|
1014
|
+
supportsResolution: z.ZodOptional<z.ZodBoolean>;
|
|
1015
|
+
geometry: z.ZodOptional<z.ZodObject<{
|
|
1016
|
+
sizes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1017
|
+
aspectRatios: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1018
|
+
resolutions: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
1019
|
+
"1K": "1K";
|
|
1020
|
+
"2K": "2K";
|
|
1021
|
+
"4K": "4K";
|
|
1022
|
+
}>>>;
|
|
1023
|
+
pixels: z.ZodOptional<z.ZodObject<{
|
|
1024
|
+
minPixels: z.ZodNumber;
|
|
1025
|
+
maxPixels: z.ZodNumber;
|
|
1026
|
+
minEdge: z.ZodNumber;
|
|
1027
|
+
maxEdge: z.ZodNumber;
|
|
1028
|
+
step: z.ZodNumber;
|
|
1029
|
+
maxRatio: z.ZodNumber;
|
|
1030
|
+
}, z.core.$strict>>;
|
|
1031
|
+
}, z.core.$strict>>;
|
|
872
1032
|
}, z.core.$strict>>;
|
|
873
1033
|
geometry: z.ZodOptional<z.ZodObject<{
|
|
874
1034
|
sizes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -878,12 +1038,22 @@ export declare const ModelsJsonSchema: z.ZodObject<{
|
|
|
878
1038
|
"2K": "2K";
|
|
879
1039
|
"4K": "4K";
|
|
880
1040
|
}>>>;
|
|
1041
|
+
pixels: z.ZodOptional<z.ZodObject<{
|
|
1042
|
+
minPixels: z.ZodNumber;
|
|
1043
|
+
maxPixels: z.ZodNumber;
|
|
1044
|
+
minEdge: z.ZodNumber;
|
|
1045
|
+
maxEdge: z.ZodNumber;
|
|
1046
|
+
step: z.ZodNumber;
|
|
1047
|
+
maxRatio: z.ZodNumber;
|
|
1048
|
+
}, z.core.$strict>>;
|
|
881
1049
|
}, z.core.$strict>>;
|
|
882
1050
|
output: z.ZodOptional<z.ZodObject<{
|
|
883
1051
|
qualities: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
884
1052
|
low: "low";
|
|
885
1053
|
high: "high";
|
|
886
1054
|
medium: "medium";
|
|
1055
|
+
xhigh: "xhigh";
|
|
1056
|
+
max: "max";
|
|
887
1057
|
auto: "auto";
|
|
888
1058
|
}>>>;
|
|
889
1059
|
formats: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
@@ -224,7 +224,7 @@ function saveModelsJson(path, config) {
|
|
|
224
224
|
function modelsJsonExists(path = resolveModelsJsonPath()) {
|
|
225
225
|
return existsSync(path);
|
|
226
226
|
}
|
|
227
|
-
var OpenRouterRoutingSchema, VercelGatewayRoutingSchema, OpenAICompletionsCompatSchema, OpenAIResponsesCompatSchema, OpenAICompatSchema, ImageGenerationResolutionSchema, ImageGenerationQualitySchema, ImageGenerationOutputFormatSchema, ImageGenerationBackgroundSchema, ImageGenerationCapabilitiesSchema, ImageGenerationModelSchema, ImageGenerationProviderSchema, CustomModelSchema, ModelOverrideSchema, ProviderConfigSchema, ModelsJsonSchema, PROVIDER_ID_REGEX, RESERVED_PROVIDER_IDS;
|
|
227
|
+
var OpenRouterRoutingSchema, VercelGatewayRoutingSchema, OpenAICompletionsCompatSchema, OpenAIResponsesCompatSchema, OpenAICompatSchema, ImageGenerationResolutionSchema, ImageGenerationQualitySchema, ImageGenerationOutputFormatSchema, ImageGenerationBackgroundSchema, ImageGeometrySchema, ImageGenerationCapabilitiesSchema, ImageGenerationModelSchema, ImageGenerationProviderSchema, CustomModelSchema, ModelOverrideSchema, ProviderConfigSchema, ModelsJsonSchema, PROVIDER_ID_REGEX, RESERVED_PROVIDER_IDS;
|
|
228
228
|
var init_models_json = __esmMin((() => {
|
|
229
229
|
init_src();
|
|
230
230
|
init_write_file_atomic();
|
|
@@ -277,6 +277,8 @@ var init_models_json = __esmMin((() => {
|
|
|
277
277
|
"low",
|
|
278
278
|
"medium",
|
|
279
279
|
"high",
|
|
280
|
+
"xhigh",
|
|
281
|
+
"max",
|
|
280
282
|
"auto"
|
|
281
283
|
]);
|
|
282
284
|
ImageGenerationOutputFormatSchema = z.enum([
|
|
@@ -289,6 +291,19 @@ var init_models_json = __esmMin((() => {
|
|
|
289
291
|
"opaque",
|
|
290
292
|
"auto"
|
|
291
293
|
]);
|
|
294
|
+
ImageGeometrySchema = z.object({
|
|
295
|
+
sizes: z.array(z.string().min(1)).optional(),
|
|
296
|
+
aspectRatios: z.array(z.string().min(1)).optional(),
|
|
297
|
+
resolutions: z.array(ImageGenerationResolutionSchema).optional(),
|
|
298
|
+
pixels: z.object({
|
|
299
|
+
minPixels: z.number().int().positive(),
|
|
300
|
+
maxPixels: z.number().int().positive(),
|
|
301
|
+
minEdge: z.number().int().positive(),
|
|
302
|
+
maxEdge: z.number().int().positive(),
|
|
303
|
+
step: z.number().int().positive(),
|
|
304
|
+
maxRatio: z.number().positive()
|
|
305
|
+
}).strict().optional()
|
|
306
|
+
}).strict();
|
|
292
307
|
ImageGenerationCapabilitiesSchema = z.object({
|
|
293
308
|
generate: z.object({
|
|
294
309
|
maxCount: z.number().int().positive().optional(),
|
|
@@ -298,15 +313,15 @@ var init_models_json = __esmMin((() => {
|
|
|
298
313
|
}).strict().optional(),
|
|
299
314
|
edit: z.object({
|
|
300
315
|
enabled: z.boolean(),
|
|
301
|
-
|
|
316
|
+
inputFormats: z.array(ImageGenerationOutputFormatSchema).optional(),
|
|
317
|
+
maxInputBytes: z.number().int().positive().optional(),
|
|
318
|
+
maxInputImages: z.number().int().nonnegative().optional(),
|
|
302
319
|
supportsSize: z.boolean().optional(),
|
|
303
|
-
supportsAspectRatio: z.boolean().optional()
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
sizes: z.array(z.string().min(1)).optional(),
|
|
307
|
-
aspectRatios: z.array(z.string().min(1)).optional(),
|
|
308
|
-
resolutions: z.array(ImageGenerationResolutionSchema).optional()
|
|
320
|
+
supportsAspectRatio: z.boolean().optional(),
|
|
321
|
+
supportsResolution: z.boolean().optional(),
|
|
322
|
+
geometry: ImageGeometrySchema.optional()
|
|
309
323
|
}).strict().optional(),
|
|
324
|
+
geometry: ImageGeometrySchema.optional(),
|
|
310
325
|
output: z.object({
|
|
311
326
|
qualities: z.array(ImageGenerationQualitySchema).optional(),
|
|
312
327
|
formats: z.array(ImageGenerationOutputFormatSchema).optional(),
|
|
@@ -34,6 +34,12 @@ export declare class FileSpaceService {
|
|
|
34
34
|
list(): Promise<ResolvedFileSpace[]>;
|
|
35
35
|
forContext(kind: 'agent' | 'project' | 'session', id: string): Promise<ResolvedFileSpace>;
|
|
36
36
|
defaultSpace(): Promise<ResolvedFileSpace>;
|
|
37
|
+
/** Host spaces support explicit local file links without adding whole disks to discovery. */
|
|
38
|
+
private hostSpace;
|
|
39
|
+
resolveLocalResource(space: ResolvedFileSpace, candidate: string): Promise<{
|
|
40
|
+
resource: FileResource;
|
|
41
|
+
absolutePath?: string;
|
|
42
|
+
}>;
|
|
37
43
|
get(id: string): Promise<ResolvedFileSpace>;
|
|
38
44
|
resource(id: string): Promise<{
|
|
39
45
|
space: ResolvedFileSpace;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { init_agent_scope, listAgentEntries, resolveAgentWorkspaceDir, resolveDefaultAgentId } from "../agent/agent-scope.js";
|
|
2
2
|
import { resolveProjectAgentId } from "../projects/project-agent.js";
|
|
3
3
|
import "../projects/index.js";
|
|
4
|
-
import { basename, dirname, isAbsolute, relative, resolve, sep } from "node:path";
|
|
4
|
+
import { basename, dirname, isAbsolute, parse, relative, resolve, sep } from "node:path";
|
|
5
5
|
import { constants } from "node:fs";
|
|
6
6
|
import { createHash } from "node:crypto";
|
|
7
7
|
import { access, lstat, open, opendir, realpath, stat } from "node:fs/promises";
|
|
@@ -469,7 +469,42 @@ var FileSpaceService = class {
|
|
|
469
469
|
defaultSpace() {
|
|
470
470
|
return this.forContext("agent", resolveDefaultAgentId());
|
|
471
471
|
}
|
|
472
|
+
/** Host spaces support explicit local file links without adding whole disks to discovery. */
|
|
473
|
+
async hostSpace(path) {
|
|
474
|
+
const root = parse(resolve(path)).root;
|
|
475
|
+
return {
|
|
476
|
+
id: `host-${Buffer.from(root).toString("base64url")}`,
|
|
477
|
+
title: "Local files",
|
|
478
|
+
kind: "workspace",
|
|
479
|
+
bindings: [],
|
|
480
|
+
writable: false,
|
|
481
|
+
root
|
|
482
|
+
};
|
|
483
|
+
}
|
|
484
|
+
async resolveLocalResource(space, candidate) {
|
|
485
|
+
const absolutePath = await realpath(candidate).catch((error) => {
|
|
486
|
+
if (error.code === "ENOENT" || error.code === "ENOTDIR") throw new FileServiceError(404, "File not found");
|
|
487
|
+
if (error.code === "EACCES" || error.code === "EPERM") throw new FileServiceError(403, "File access denied");
|
|
488
|
+
throw error;
|
|
489
|
+
});
|
|
490
|
+
const info = await stat(absolutePath);
|
|
491
|
+
if (!info.isFile() && !info.isDirectory()) throw new FileServiceError(400, "Not a file or directory");
|
|
492
|
+
await access(absolutePath, constants.R_OK).catch(() => {
|
|
493
|
+
throw new FileServiceError(403, "File access denied");
|
|
494
|
+
});
|
|
495
|
+
if (isWithin(await realpath(space.root), absolutePath)) return { resource: await fileResourceFromPath(space, absolutePath) };
|
|
496
|
+
return {
|
|
497
|
+
resource: await fileResourceFromPath(await this.hostSpace(absolutePath), absolutePath),
|
|
498
|
+
absolutePath
|
|
499
|
+
};
|
|
500
|
+
}
|
|
472
501
|
async get(id) {
|
|
502
|
+
if (id.startsWith("host-")) {
|
|
503
|
+
const root = Buffer.from(id.slice(5), "base64url").toString("utf8");
|
|
504
|
+
const space = await this.hostSpace(root);
|
|
505
|
+
if (space.id !== id || space.root !== root) throw new FileServiceError(400, "Invalid host file space");
|
|
506
|
+
return space;
|
|
507
|
+
}
|
|
473
508
|
const hadCache = this.cache !== null;
|
|
474
509
|
let space = (await this.list()).find((item) => item.id === id);
|
|
475
510
|
if (!space && hadCache) {
|
|
@@ -483,6 +518,8 @@ var FileSpaceService = class {
|
|
|
483
518
|
const locator = parseFileResourceId(id);
|
|
484
519
|
const space = await this.get(locator.spaceId);
|
|
485
520
|
const absolutePath = await resolveFilePath(space.root, locator.relativePath);
|
|
521
|
+
const info = await stat(absolutePath);
|
|
522
|
+
if (!info.isFile() && !info.isDirectory()) throw new FileServiceError(400, "Not a file or directory");
|
|
486
523
|
return {
|
|
487
524
|
space,
|
|
488
525
|
resource: await fileResourceFromPath(space, absolutePath, resolve(space.root, locator.relativePath)),
|
|
@@ -36,9 +36,33 @@ export declare const CustomImageProviderInputSchema: z.ZodObject<{
|
|
|
36
36
|
}, z.core.$strict>>;
|
|
37
37
|
edit: z.ZodOptional<z.ZodObject<{
|
|
38
38
|
enabled: z.ZodBoolean;
|
|
39
|
+
inputFormats: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
40
|
+
png: "png";
|
|
41
|
+
jpeg: "jpeg";
|
|
42
|
+
webp: "webp";
|
|
43
|
+
}>>>;
|
|
44
|
+
maxInputBytes: z.ZodOptional<z.ZodNumber>;
|
|
39
45
|
maxInputImages: z.ZodOptional<z.ZodNumber>;
|
|
40
46
|
supportsSize: z.ZodOptional<z.ZodBoolean>;
|
|
41
47
|
supportsAspectRatio: z.ZodOptional<z.ZodBoolean>;
|
|
48
|
+
supportsResolution: z.ZodOptional<z.ZodBoolean>;
|
|
49
|
+
geometry: z.ZodOptional<z.ZodObject<{
|
|
50
|
+
sizes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
51
|
+
aspectRatios: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
52
|
+
resolutions: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
53
|
+
"1K": "1K";
|
|
54
|
+
"2K": "2K";
|
|
55
|
+
"4K": "4K";
|
|
56
|
+
}>>>;
|
|
57
|
+
pixels: z.ZodOptional<z.ZodObject<{
|
|
58
|
+
minPixels: z.ZodNumber;
|
|
59
|
+
maxPixels: z.ZodNumber;
|
|
60
|
+
minEdge: z.ZodNumber;
|
|
61
|
+
maxEdge: z.ZodNumber;
|
|
62
|
+
step: z.ZodNumber;
|
|
63
|
+
maxRatio: z.ZodNumber;
|
|
64
|
+
}, z.core.$strict>>;
|
|
65
|
+
}, z.core.$strict>>;
|
|
42
66
|
}, z.core.$strict>>;
|
|
43
67
|
geometry: z.ZodOptional<z.ZodObject<{
|
|
44
68
|
sizes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -48,12 +72,22 @@ export declare const CustomImageProviderInputSchema: z.ZodObject<{
|
|
|
48
72
|
"2K": "2K";
|
|
49
73
|
"4K": "4K";
|
|
50
74
|
}>>>;
|
|
75
|
+
pixels: z.ZodOptional<z.ZodObject<{
|
|
76
|
+
minPixels: z.ZodNumber;
|
|
77
|
+
maxPixels: z.ZodNumber;
|
|
78
|
+
minEdge: z.ZodNumber;
|
|
79
|
+
maxEdge: z.ZodNumber;
|
|
80
|
+
step: z.ZodNumber;
|
|
81
|
+
maxRatio: z.ZodNumber;
|
|
82
|
+
}, z.core.$strict>>;
|
|
51
83
|
}, z.core.$strict>>;
|
|
52
84
|
output: z.ZodOptional<z.ZodObject<{
|
|
53
85
|
qualities: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
54
86
|
low: "low";
|
|
55
87
|
high: "high";
|
|
56
88
|
medium: "medium";
|
|
89
|
+
xhigh: "xhigh";
|
|
90
|
+
max: "max";
|
|
57
91
|
auto: "auto";
|
|
58
92
|
}>>>;
|
|
59
93
|
formats: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
@@ -3,7 +3,8 @@ import { init_agent_scope, resolveAgentProfileDir } from "../agent/agent-scope.j
|
|
|
3
3
|
import { init_paths, resolveConfigPath, resolveSkillsDir } from "../config/paths.js";
|
|
4
4
|
import { extractProfileAgentId } from "../config/agent-profile.js";
|
|
5
5
|
import { isBareProfileMarkdownFileName, resolveProfileMarkdownPathIfBareName } from "../agent/tools/tool-paths.js";
|
|
6
|
-
import { isPathUnderWorkspace
|
|
6
|
+
import { isPathUnderWorkspace } from "./workspace-editor-path.js";
|
|
7
|
+
import { homedir } from "node:os";
|
|
7
8
|
import { basename, isAbsolute, resolve } from "node:path";
|
|
8
9
|
import { stat } from "node:fs/promises";
|
|
9
10
|
//#region src/gateway/file-path-classifier.ts
|
|
@@ -72,15 +73,23 @@ async function resolveFileReferenceCandidate(rawPath, workspaceRoot, ctx) {
|
|
|
72
73
|
...ctx,
|
|
73
74
|
workspaceRoot: displayRoot
|
|
74
75
|
};
|
|
76
|
+
if (rawPath.includes("\0")) return {
|
|
77
|
+
candidate: null,
|
|
78
|
+
invalid: true
|
|
79
|
+
};
|
|
80
|
+
if (rawPath === "~" || rawPath.startsWith("~/")) return {
|
|
81
|
+
candidate: resolve(homedir(), rawPath.slice(2)),
|
|
82
|
+
invalid: false
|
|
83
|
+
};
|
|
75
84
|
if (looksLikeHostAbsolutePath(rawPath)) return {
|
|
76
85
|
candidate: resolve(rawPath),
|
|
77
86
|
invalid: false
|
|
78
87
|
};
|
|
79
|
-
|
|
80
|
-
if (!wsPath) return {
|
|
88
|
+
if (/^[a-z][a-z0-9+.-]*:/i.test(rawPath)) return {
|
|
81
89
|
candidate: null,
|
|
82
90
|
invalid: true
|
|
83
91
|
};
|
|
92
|
+
const wsPath = resolve(workspaceRoot, rawPath);
|
|
84
93
|
try {
|
|
85
94
|
await stat(wsPath);
|
|
86
95
|
return {
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { TaskRunRepository, init_task_run_repository } from "../../../tasks/task-run-repository.js";
|
|
1
2
|
import { FileServiceError, fileResourceFromPath, parseFileResourceId, resolveFilePath } from "../../../files/file-service.js";
|
|
3
|
+
import { buildFilePathClassifierContext, resolveFileReferenceCandidate } from "../../file-path-classifier.js";
|
|
2
4
|
import { getGatewayFileSpaceService } from "../../file-space-service.js";
|
|
3
5
|
import { getSessionPreparation } from "../../../storage/sqlite/session-creation-repository.js";
|
|
4
6
|
import { fuzzySearchWorkspaceFiles, fuzzySubsequenceScore } from "../../workspace-file-search.js";
|
|
@@ -6,6 +8,7 @@ import { registerFileReferenceRoutes } from "./file-references.js";
|
|
|
6
8
|
import { basename, join } from "node:path";
|
|
7
9
|
import { readFile, unlink, writeFile } from "node:fs/promises";
|
|
8
10
|
//#region src/gateway/hono/routes/files.ts
|
|
11
|
+
init_task_run_repository();
|
|
9
12
|
const mutationLocks = /* @__PURE__ */ new Map();
|
|
10
13
|
async function withMutationLock(key, action) {
|
|
11
14
|
const previous = mutationLocks.get(key) ?? Promise.resolve();
|
|
@@ -115,8 +118,16 @@ function registerFilesRoutes(authenticated, deps) {
|
|
|
115
118
|
const body = await c.req.json();
|
|
116
119
|
if (!body.spaceId || !body.path) throw new FileServiceError(400, "spaceId and path are required");
|
|
117
120
|
const space = await files.get(body.spaceId);
|
|
118
|
-
const
|
|
119
|
-
|
|
121
|
+
const sourceConversationId = body.taskRunId ? new TaskRunRepository().get(body.taskRunId)?.conversationId : void 0;
|
|
122
|
+
if (body.taskRunId && !sourceConversationId) throw new FileServiceError(404, "Task file context not found");
|
|
123
|
+
const sourceSpace = sourceConversationId ? await files.forContext("session", sourceConversationId) : space;
|
|
124
|
+
const ctx = {
|
|
125
|
+
...buildFilePathClassifierContext(deps.service.currentConfig, sourceConversationId),
|
|
126
|
+
workspaceRoot: sourceSpace.root
|
|
127
|
+
};
|
|
128
|
+
const { candidate, invalid } = await resolveFileReferenceCandidate(body.path, sourceSpace.root, ctx);
|
|
129
|
+
if (!candidate || invalid) throw new FileServiceError(400, "Invalid file path");
|
|
130
|
+
return c.json(await files.resolveLocalResource(space, candidate));
|
|
120
131
|
} catch (error) {
|
|
121
132
|
return errorResponse(c, error);
|
|
122
133
|
}
|
|
@@ -6,6 +6,8 @@ import { cancelPersonalRequest, personalRequestSnapshot, publishPersonalRequest
|
|
|
6
6
|
import { PersonalOnboardingDraftSchema, PersonalOnboardingStepSchema, finishPersonalWelcome, getPersonalOnboarding, savePersonalOnboarding } from "../../../personal-agent/onboarding.js";
|
|
7
7
|
import { PersonalAppearanceSchema, PersonalPreferencesSchema, createOrResumePersonalAgent, ensurePersonalConversationVisibility, listPersonalModels, patchPersonalProfile, refreshPersonalDelegationGuidance } from "../../../personal-agent/service.js";
|
|
8
8
|
import { getGatewayPrincipal } from "../../security/gateway-principal.js";
|
|
9
|
+
import { markPersonalRead, personalUnreadSnapshot } from "../../../personal-agent/unread.js";
|
|
10
|
+
import { registerProactivityRoutes } from "../../../personal-agent/proactivity/routes.js";
|
|
9
11
|
import { z } from "zod";
|
|
10
12
|
//#region src/gateway/hono/routes/personal-agent.ts
|
|
11
13
|
init_device_access_repository();
|
|
@@ -51,6 +53,7 @@ function registerPersonalAgentRoutes(authenticated, deps) {
|
|
|
51
53
|
const platform = getDevice(principal.deviceId)?.platform;
|
|
52
54
|
return platform === "harmonyos" || platform === "ios" || platform === "android" ? "local-owner" : null;
|
|
53
55
|
};
|
|
56
|
+
registerProactivityRoutes(authenticated, deps, owner);
|
|
54
57
|
authenticated.get("/api/personal-agent", async (c) => {
|
|
55
58
|
const ownerId = owner(c);
|
|
56
59
|
if (!ownerId) return c.json({
|
|
@@ -64,6 +67,44 @@ function registerPersonalAgentRoutes(authenticated, deps) {
|
|
|
64
67
|
payload: getPersonalAgent(ownerId)
|
|
65
68
|
});
|
|
66
69
|
});
|
|
70
|
+
authenticated.get("/api/personal-agent/unread", (c) => {
|
|
71
|
+
const ownerId = owner(c);
|
|
72
|
+
if (!ownerId) return c.json({
|
|
73
|
+
ok: false,
|
|
74
|
+
error: "Owner access is required"
|
|
75
|
+
}, 403);
|
|
76
|
+
const record = getPersonalAgent(ownerId);
|
|
77
|
+
return c.json({
|
|
78
|
+
ok: true,
|
|
79
|
+
payload: record ? personalUnreadSnapshot(record.conversationId) : null
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
authenticated.post("/api/personal-agent/read", async (c) => {
|
|
83
|
+
const ownerId = owner(c);
|
|
84
|
+
if (!ownerId) return c.json({
|
|
85
|
+
ok: false,
|
|
86
|
+
error: "Owner access is required"
|
|
87
|
+
}, 403);
|
|
88
|
+
const parsed = z.object({
|
|
89
|
+
transcriptId: z.string().min(1),
|
|
90
|
+
lastSeq: z.number().int().nonnegative()
|
|
91
|
+
}).strict().safeParse(await c.req.json().catch(() => null));
|
|
92
|
+
if (!parsed.success) return c.json({
|
|
93
|
+
ok: false,
|
|
94
|
+
error: "Invalid read snapshot"
|
|
95
|
+
}, 400);
|
|
96
|
+
const record = getPersonalAgent(ownerId);
|
|
97
|
+
if (!record) return c.json({
|
|
98
|
+
ok: false,
|
|
99
|
+
error: "Personal Agent is unavailable"
|
|
100
|
+
}, 404);
|
|
101
|
+
markPersonalRead(record.conversationId, parsed.data.transcriptId, parsed.data.lastSeq);
|
|
102
|
+
deps.service.emit("personal.unread.updated", { conversationId: record.conversationId });
|
|
103
|
+
return c.json({
|
|
104
|
+
ok: true,
|
|
105
|
+
payload: personalUnreadSnapshot(record.conversationId)
|
|
106
|
+
});
|
|
107
|
+
});
|
|
67
108
|
authenticated.get("/api/personal-agent/models", async (c) => {
|
|
68
109
|
if (!owner(c)) return c.json({
|
|
69
110
|
ok: false,
|
|
@@ -129,6 +129,7 @@ export declare class GatewayService {
|
|
|
129
129
|
private createNotificationService;
|
|
130
130
|
private readonly taskRunDispatch;
|
|
131
131
|
private readonly taskMainUpdateDispatch;
|
|
132
|
+
private readonly personalProactivity;
|
|
132
133
|
private readonly taskResultDispatch;
|
|
133
134
|
dispatchTaskRuns(): void;
|
|
134
135
|
ensureTaskConversation(taskId: string, options?: {
|