@xopcai/xopc 0.0.162 → 0.0.164
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/README.md +4 -2
- package/README.zh-CN.md +4 -2
- 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-hpcNv9MZ.js → activity-store-DkALQFJT.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-Zf9UQEmQ.js → agent-avatar-dicebear-RpxkQtQ3.js} +1 -1
- package/dist/gateway/static/root/assets/agents-CxpwxMPE.js +2 -0
- package/dist/gateway/static/root/assets/{api-Dnatri09.js → api-DPIXEcIq.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-BBTR9wJP.js → app-management-settings-panel-DLdjfMXB.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-C2zpLCHD.js → appearance-settings-C89-uxkq.js} +1 -1
- package/dist/gateway/static/root/assets/apps-page-k-tZbaRB.js +1 -0
- package/dist/gateway/static/root/assets/{archive-plugin-9eR_ODY1.js → archive-plugin-CqbH5geE.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-DPuWYUeX.js → attachment-load-CeU4Qiot.js} +1 -1
- package/dist/gateway/static/root/assets/{automation-suggestion-card-Dw49OJRl.js → automation-suggestion-card-WiOuqXq9.js} +1 -1
- package/dist/gateway/static/root/assets/automations-page-Bdn3dgC_.js +6 -0
- package/dist/gateway/static/root/assets/{binary-plugins-BdkJpDFm.js → binary-plugins-C5TdzrhJ.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-CAi7SXYU.js → block-editor-BjvWhphG.js} +39 -39
- package/dist/gateway/static/root/assets/browser-settings-page-GsVTGfGs.js +8 -0
- package/dist/gateway/static/root/assets/{browser-workflow-inputs-Dx6wkGz1.js → browser-workflow-inputs-DXmzQ3nk.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-workflows-page-Skertc-A.js → browser-workflows-page-C1-ptRe4.js} +2 -2
- package/dist/gateway/static/root/assets/capabilities-settings-panel-6d4kVjzl.js +2 -0
- package/dist/gateway/static/root/assets/{capability-presets-api-CNFl7dM3.js → capability-presets-api-C0pVlUyc.js} +1 -1
- package/dist/gateway/static/root/assets/capability-presets-settings-panel-DCxy5Ls_.js +2 -0
- package/dist/gateway/static/root/assets/{channel-recipient-api-DYQyGDw4.js → channel-recipient-api-B5rLegwk.js} +1 -1
- package/dist/gateway/static/root/assets/channels-settings-Bg3P8k0f.js +1 -0
- package/dist/gateway/static/root/assets/channels-status-swr-DZZq0upi.js +1 -0
- package/dist/gateway/static/root/assets/{connector-logo-Bng6kxYF.js → connector-logo-CuI5w4qM.js} +1 -1
- package/dist/gateway/static/root/assets/connectors-page-6UR7yhIZ.js +2 -0
- package/dist/gateway/static/root/assets/{desktop-pet-Bpf6oegd.js → desktop-pet-BvG8vDXZ.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-BVUyefSd.js → desktop-pet-settings-CR__kZ8C.js} +1 -1
- package/dist/gateway/static/root/assets/{directory-picker-path-field-DjSZAPz_.js → directory-picker-path-field-BblWMz3e.js} +1 -1
- package/dist/gateway/static/root/assets/{dreaming-settings-CAZk2AM4.js → dreaming-settings-DHMPugDE.js} +3 -3
- package/dist/gateway/static/root/assets/{extension-debug-page-C2F6vTTd.js → extension-debug-page-ByVY1gZg.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-AnIt4bn4.js → extension-page-DLCKKtbK.js} +1 -1
- package/dist/gateway/static/root/assets/extension-settings-page-M-rhlFBC.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-config-api-DLFyZv33.js → gateway-config-api-DZHqhbXH.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-settings-DnQAA-qq.js → gateway-settings-CZswIehx.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-startup-retry-DbzLyJ3R.js → gateway-startup-retry-ulwTJovP.js} +1 -1
- package/dist/gateway/static/root/assets/goal-create-dialog-TbyRfDas.js +1 -0
- package/dist/gateway/static/root/assets/goal-detail-page-B-QBVOf2.js +4 -0
- package/dist/gateway/static/root/assets/{goals-config-api-REmr3QCr.js → goals-config-api-DMxG6f0N.js} +1 -1
- package/dist/gateway/static/root/assets/goals-page-BGxki8BR.js +2 -0
- package/dist/gateway/static/root/assets/{goals-settings-Dz0F3uRO.js → goals-settings-G-w1gCYD.js} +1 -1
- package/dist/gateway/static/root/assets/{heartbeat-settings-CQFY5gYs.js → heartbeat-settings-Csb90R59.js} +1 -1
- package/dist/gateway/static/root/assets/index-BXtJvaQl.css +1 -0
- package/dist/gateway/static/root/assets/{index-C8JkTS6d.js → index-CGwuxvzr.js} +70 -70
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-BnOQXU5k.js → keyboard-shortcuts-settings-C_Bl3YOr.js} +1 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-BR2tBhO3.js +2 -0
- package/dist/gateway/static/root/assets/{local-apps-page-KsOtWOyM.js → local-apps-page-_8Rv-tSk.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-0lpYdNDr.js → locale-store-C_ax27uc.js} +1 -1
- package/dist/gateway/static/root/assets/logs-page-CwF0C_Z2.js +7 -0
- package/dist/gateway/static/root/assets/{markdown-split-D5GRg10r.js → markdown-split-CZnZS6gq.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-C1ryULGs.js → media-plugins-C2XLYC6G.js} +1 -1
- package/dist/gateway/static/root/assets/messages-C96Zjb0V.js +5 -0
- package/dist/gateway/static/root/assets/{notes-page-CIeZ1_DT.js → notes-page-BkuZxTFo.js} +1 -1
- package/dist/gateway/static/root/assets/notes-workbench-CD4FADi7.js +4 -0
- package/dist/gateway/static/root/assets/{page-tabs-Caj1-E_X.js → page-tabs-DR2FGC4E.js} +1 -1
- package/dist/gateway/static/root/assets/{preview-open-alternatives-DKwEce-9.js → preview-open-alternatives-B65O8wBL.js} +1 -1
- package/dist/gateway/static/root/assets/{product-open-page-B90ZskkN.js → product-open-page-Cag-utLH.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-COKtUblD.js +1 -0
- package/dist/gateway/static/root/assets/projects-page-QYmqanBN.js +1 -0
- package/dist/gateway/static/root/assets/remote-access-hub-BU_gBU0f.js +1 -0
- package/dist/gateway/static/root/assets/{save-bar-controls-BDYt53uQ.js → save-bar-controls-DCWpFnPc.js} +1 -1
- package/dist/gateway/static/root/assets/schedule-field-ClacZdvE.js +1 -0
- package/dist/gateway/static/root/assets/{schema-form-D7oCARF7.js → schema-form-BVlbEipU.js} +1 -1
- package/dist/gateway/static/root/assets/sessions-page-u-Pjbzfm.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-1Yck1PKq.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-CARTHCxH.js → settings-form-section-GSNlQWSW.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-loading-skeleton-DEwYqESe.js → settings-loading-skeleton-08Ae5sB_.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-B6vVdHeQ.js → settings-page-BseJD4I-.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-layout-D3srt5Bi.js → settings-page-layout-bSliH-Y3.js} +1 -1
- package/dist/gateway/static/root/assets/setup-status-panel-CGRhJVlt.js +1 -0
- package/dist/gateway/static/root/assets/{share-preview-page-Ck9SxiXw.js → share-preview-page-C114OpTx.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-BRFpWFgI.js +1 -0
- package/dist/gateway/static/root/assets/skill-reload-api-cVjU2GnN.js +1 -0
- package/dist/gateway/static/root/assets/skills-page-CoMTjtRT.js +2 -0
- package/dist/gateway/static/root/assets/{system-settings-panel-DLBUQSk2.js → system-settings-panel-El8cDcTY.js} +1 -1
- package/dist/gateway/static/root/assets/{theme-store-C1oaqeD2.js → theme-store-D37XLD_C.js} +1 -1
- package/dist/gateway/static/root/assets/time-picker-CU7hhD8T.js +1 -0
- package/dist/gateway/static/root/assets/{typed-models-lib-Divbg_C4.js → typed-models-lib-kToxD7Rc.js} +1 -1
- package/dist/gateway/static/root/assets/{use-channel-catalog-CP9a_rAf.js → use-channel-catalog-DBh0dOC9.js} +1 -1
- package/dist/gateway/static/root/assets/user-context-page-C0xYCSXB.js +1 -0
- package/dist/gateway/static/root/assets/voice-api-key-field-DzEpwYaU.js +1 -0
- package/dist/gateway/static/root/assets/work-discovery-page-DakZqR85.js +1 -0
- package/dist/gateway/static/root/assets/work-item-detail-page-CswqPbTT.js +1 -0
- package/dist/gateway/static/root/assets/work-page-DYRXEk8m.js +1 -0
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-DbDPYQwB.js → workflow-run-setup-panel-BwSxyVMM.js} +2 -2
- package/dist/gateway/static/root/assets/workflows-page-CiLSYGuN.js +11 -0
- package/dist/gateway/static/root/index.html +7 -7
- package/dist/package.js +1 -1
- package/dist/src/agent/client-error-format.d.ts +1 -1
- package/dist/src/agent/client-error-format.js +6 -2
- package/dist/src/agent/embedded/model-runtime.d.ts +4 -0
- package/dist/src/agent/embedded/model-runtime.js +49 -0
- package/dist/src/agent/embedded/run-for-session.js +38 -31
- package/dist/src/agent/embedded/session-runner.d.ts +1 -0
- package/dist/src/agent/embedded/session-runner.js +13 -5
- package/dist/src/agent/failover-error.d.ts +1 -1
- package/dist/src/agent/image/generation/openai-compatible-image-provider.d.ts +2 -6
- package/dist/src/agent/image/generation/openai-compatible-image-provider.js +1 -3
- package/dist/src/agent/image/generation/provider-registry.d.ts +5 -46
- package/dist/src/agent/image/generation/provider-registry.js +24 -73
- package/dist/{extensions/dashscope/src/image-generation-provider.d.ts → src/agent/image/generation/providers/dashscope.d.ts} +3 -6
- package/dist/{extensions/dashscope/src/image-generation-provider.js → src/agent/image/generation/providers/dashscope.js} +36 -59
- package/dist/{extensions/fal/src/image-generation-provider.d.ts → src/agent/image/generation/providers/fal.d.ts} +1 -1
- package/dist/{extensions/fal/src/image-generation-provider.js → src/agent/image/generation/providers/fal.js} +19 -29
- package/dist/{extensions/google/src/image-generation-provider.d.ts → src/agent/image/generation/providers/google.d.ts} +2 -2
- package/dist/{extensions/google/src/image-generation-provider.js → src/agent/image/generation/providers/google.js} +23 -30
- package/dist/{extensions/minimax/src/image-generation-provider.d.ts → src/agent/image/generation/providers/minimax.d.ts} +2 -5
- package/dist/{extensions/minimax/src/image-generation-provider.js → src/agent/image/generation/providers/minimax.js} +35 -51
- package/dist/{extensions/openai/src/image-generation-provider.d.ts → src/agent/image/generation/providers/openai.d.ts} +2 -2
- package/dist/{extensions/openai/src/image-generation-provider.js → src/agent/image/generation/providers/openai.js} +13 -38
- package/dist/src/agent/image/generation/runtime-types.d.ts +1 -0
- package/dist/src/agent/image/generation/runtime.d.ts +1 -3
- package/dist/src/agent/image/generation/runtime.js +6 -6
- package/dist/src/agent/image/generation/types.d.ts +23 -3
- package/dist/src/agent/image/index.d.ts +1 -1
- package/dist/src/agent/image/index.js +2 -2
- package/dist/src/agent/media-generation/runtime-shared.d.ts +2 -0
- package/dist/src/agent/media-generation/runtime-shared.js +1 -0
- package/dist/src/agent/tools/factory.js +4 -1
- package/dist/src/agent/tools/image-generate-tool.d.ts +2 -0
- package/dist/src/agent/tools/image-generate-tool.js +14 -7
- package/dist/src/auth/credentials.js +45 -2
- package/dist/src/auth/index.js +2 -1
- package/dist/src/auth/oauth/anthropic.js +27 -24
- package/dist/src/auth/oauth/github-copilot.js +20 -15
- package/dist/src/auth/oauth/google-antigravity.js +9 -2
- package/dist/src/auth/oauth/google-gemini-cli.js +9 -2
- package/dist/src/auth/oauth/google-oauth/google-antigravity.js +47 -40
- package/dist/src/auth/oauth/google-oauth/google-gemini-cli.js +48 -41
- package/dist/src/auth/oauth/google-oauth/oauth-page.js +7 -2
- package/dist/src/auth/oauth/google-oauth/pkce.js +4 -1
- package/dist/src/auth/oauth/index.d.ts +2 -0
- package/dist/src/auth/oauth/index.js +24 -10
- package/dist/src/auth/oauth/kimi-coding.js +76 -71
- package/dist/src/auth/oauth/minimax-cn.js +78 -73
- package/dist/src/auth/oauth/minimax.js +78 -73
- package/dist/src/auth/oauth/openai-codex.js +31 -25
- package/dist/src/auth/oauth/pkce.js +4 -1
- package/dist/src/auth/oauth/registry.d.ts +13 -0
- package/dist/src/auth/oauth/registry.js +65 -0
- package/dist/src/auth/oauth/xopc-cloud.d.ts +2 -0
- package/dist/src/auth/oauth/xopc-cloud.js +101 -0
- package/dist/src/auth/sync-provider-auth.d.ts +3 -0
- package/dist/src/auth/sync-provider-auth.js +17 -1
- package/dist/src/cli/commands/models.js +2 -5
- package/dist/src/cli/commands/onboard/model.js +3 -2
- package/dist/src/cli/commands/setup-shared/types.d.ts +1 -1
- package/dist/src/cli/utils/oauth-providers.d.ts +3 -26
- package/dist/src/cli/utils/oauth-providers.js +6 -80
- package/dist/src/config/index.js +2 -2
- package/dist/src/config/models-json.d.ts +6 -0
- package/dist/src/config/models-json.js +10 -6
- package/dist/src/config/schema.d.ts +26 -15
- package/dist/src/config/schema.js +23 -12
- package/dist/src/gateway/heartbeat/service.js +1 -1
- package/dist/src/gateway/hono/app.js +12 -6
- package/dist/src/gateway/hono/lib/safe-providers-config.d.ts +0 -3
- package/dist/src/gateway/hono/lib/safe-providers-config.js +1 -3
- package/dist/src/gateway/hono/middleware/strict-rate-limit.d.ts +4 -0
- package/dist/src/gateway/hono/middleware/strict-rate-limit.js +8 -1
- package/dist/src/gateway/hono/oauth-async.js +3 -19
- package/dist/src/gateway/hono/oauth.js +3 -19
- package/dist/src/gateway/hono/routes/config-patch/misc.js +2 -11
- package/dist/src/gateway/hono/routes/deps.d.ts +1 -0
- package/dist/src/gateway/hono/routes/lazy-bundles.js +9 -2
- package/dist/src/gateway/hono/routes/models.js +96 -128
- package/dist/src/gateway/image-generation-setup.d.ts +40 -0
- package/dist/src/gateway/image-generation-setup.js +130 -0
- package/dist/src/gateway/rate-limit/buckets.d.ts +3 -0
- package/dist/src/gateway/rate-limit/buckets.js +12 -0
- package/dist/src/gateway/service.d.ts +3 -0
- package/dist/src/gateway/service.js +10 -0
- package/dist/src/heartbeat/index.js +1 -1
- package/dist/src/media-shared/http/private-network.d.ts +1 -1
- package/dist/src/media-shared/http/private-network.js +1 -1
- package/dist/src/providers/auth-runtime/resolve-api-key.d.ts +2 -4
- package/dist/src/providers/auth-runtime/resolve-api-key.js +2 -4
- package/dist/src/providers/auth-runtime/resolve-auth.d.ts +3 -4
- package/dist/src/providers/auth-runtime/resolve-auth.js +18 -18
- package/dist/src/providers/domestic-presets.d.ts +2 -0
- package/dist/src/providers/index.js +9 -0
- package/dist/src/providers/model-catalog-store.d.ts +33 -0
- package/dist/src/providers/model-catalog-store.js +63 -0
- package/dist/src/providers/model-catalog-sync-service.d.ts +40 -0
- package/dist/src/providers/model-catalog-sync-service.js +132 -0
- package/dist/src/providers/model-reference-auditor.d.ts +14 -0
- package/dist/src/providers/model-reference-auditor.js +71 -0
- package/dist/src/providers/model-registry.d.ts +4 -1
- package/dist/src/providers/model-registry.js +33 -2
- package/dist/src/providers/presentation.js +2 -0
- package/dist/src/providers/xopc-cloud-model-source.d.ts +30 -0
- package/dist/src/providers/xopc-cloud-model-source.js +68 -0
- package/dist/src/session/index.d.ts +1 -1
- package/dist/src/session/index.js +2 -2
- package/dist/src/session/session-title.d.ts +2 -0
- package/dist/src/session/session-title.js +24 -3
- package/dist/src/work-discovery/analyzer.js +27 -14
- package/package.json +5 -7
- package/dist/extensions/dashscope/src/index.d.ts +0 -4
- package/dist/extensions/dashscope/src/index.js +0 -2
- package/dist/extensions/dashscope/xopc.extension.json +0 -15
- package/dist/extensions/fal/src/index.d.ts +0 -4
- package/dist/extensions/fal/src/index.js +0 -2
- package/dist/extensions/fal/xopc.extension.json +0 -14
- package/dist/extensions/google/src/index.d.ts +0 -4
- package/dist/extensions/google/src/index.js +0 -2
- package/dist/extensions/google/xopc.extension.json +0 -14
- package/dist/extensions/minimax/src/index.d.ts +0 -4
- package/dist/extensions/minimax/src/index.js +0 -2
- package/dist/extensions/minimax/xopc.extension.json +0 -15
- package/dist/extensions/openai/src/index.d.ts +0 -4
- package/dist/extensions/openai/src/index.js +0 -2
- package/dist/extensions/openai/xopc.extension.json +0 -14
- package/dist/gateway/static/root/assets/agents-DfVkZlHc.js +0 -2
- package/dist/gateway/static/root/assets/apps-page-BMtAa4Ra.js +0 -1
- package/dist/gateway/static/root/assets/automations-page-BiSAMYTr.js +0 -6
- package/dist/gateway/static/root/assets/browser-settings-page-DHmaEJS2.js +0 -8
- package/dist/gateway/static/root/assets/capabilities-settings-panel-B5wSgf4f.js +0 -2
- package/dist/gateway/static/root/assets/capability-presets-settings-panel-DyvFZwBj.js +0 -2
- package/dist/gateway/static/root/assets/channels-settings-BBKEqDZn.js +0 -1
- package/dist/gateway/static/root/assets/channels-status-swr-Drk110ve.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-HpgaUDQ1.js +0 -2
- package/dist/gateway/static/root/assets/extension-settings-page-CLSc6682.js +0 -1
- package/dist/gateway/static/root/assets/goal-create-dialog-DrnKFC6M.js +0 -1
- package/dist/gateway/static/root/assets/goal-detail-page-Cw1hpJkZ.js +0 -4
- package/dist/gateway/static/root/assets/goals-page-BDGkTVma.js +0 -2
- package/dist/gateway/static/root/assets/index-hmrG55qg.css +0 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-Bdef1b7F.js +0 -2
- package/dist/gateway/static/root/assets/logs-page-CwLPgrWh.js +0 -7
- package/dist/gateway/static/root/assets/messages-BwQ3WssU.js +0 -5
- package/dist/gateway/static/root/assets/notes-workbench-Cf06q19x.js +0 -4
- package/dist/gateway/static/root/assets/project-detail-page-SHTurM4t.js +0 -1
- package/dist/gateway/static/root/assets/projects-page-BcC2qUAw.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-6vGefBHv.js +0 -1
- package/dist/gateway/static/root/assets/schedule-field-Bcdni4Pj.js +0 -1
- package/dist/gateway/static/root/assets/sessions-page-C5014a53.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-CDY3ZI1K.js +0 -1
- package/dist/gateway/static/root/assets/settings-collapsible-section-6eNF8Jey.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-z-rF0Hdg.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-CHZFXE_d.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-B7p2QNXt.js +0 -1
- package/dist/gateway/static/root/assets/skills-page-ncw3tX9P.js +0 -2
- package/dist/gateway/static/root/assets/user-context-page-iYfeSLKI.js +0 -1
- package/dist/gateway/static/root/assets/voice-api-key-field-CrwkicvT.js +0 -1
- package/dist/gateway/static/root/assets/work-discovery-page-BQWxyPg8.js +0 -1
- package/dist/gateway/static/root/assets/work-item-detail-page-50ZzGay5.js +0 -1
- package/dist/gateway/static/root/assets/work-page-DPqEahx7.js +0 -1
- package/dist/gateway/static/root/assets/workflows-page-C3eIC5HZ.js +0 -11
- package/dist/src/agent/embedded/xopc-auth-storage.d.ts +0 -19
- package/dist/src/agent/embedded/xopc-auth-storage.js +0 -40
- package/dist/src/agent/image/generation/bundled-registry.d.ts +0 -18
- package/dist/src/agent/image/generation/bundled-registry.js +0 -35
- package/dist/src/agent/image/generation/bundled.d.ts +0 -10
- package/dist/src/agent/image/generation/bundled.js +0 -15
- package/dist/src/agent/image/generation/image-provider-ui.d.ts +0 -20
- package/dist/src/agent/image/generation/image-provider-ui.js +0 -1
- package/dist/src/gateway/image-capabilities.d.ts +0 -28
- package/dist/src/gateway/image-capabilities.js +0 -78
- package/dist/src/generated/bundled-image-generation-providers.d.ts +0 -14
- package/dist/src/generated/bundled-image-generation-providers.js +0 -17
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { getModelCatalogStore, init_model_catalog_store } from "./model-catalog-store.js";
|
|
2
|
+
import { getModelRegistry, init_model_registry } from "./model-registry.js";
|
|
3
|
+
import { getCredentialResolver, init_credentials } from "../auth/credentials.js";
|
|
4
|
+
//#region src/providers/xopc-cloud-model-source.ts
|
|
5
|
+
init_credentials();
|
|
6
|
+
init_model_catalog_store();
|
|
7
|
+
init_model_registry();
|
|
8
|
+
const DEFAULT_ROUTER_URL = "https://router.xopc.ai/v1";
|
|
9
|
+
var XopcCloudModelError = class extends Error {
|
|
10
|
+
constructor(message, status, code) {
|
|
11
|
+
super(message);
|
|
12
|
+
this.status = status;
|
|
13
|
+
this.code = code;
|
|
14
|
+
this.name = "XopcCloudModelError";
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
var XopcCloudModelSource = class {
|
|
18
|
+
fetchImpl;
|
|
19
|
+
routerUrl;
|
|
20
|
+
credentials;
|
|
21
|
+
catalogStore;
|
|
22
|
+
refreshModels;
|
|
23
|
+
constructor(options = {}) {
|
|
24
|
+
this.fetchImpl = options.fetchImpl ?? fetch;
|
|
25
|
+
this.routerUrl = (options.routerUrl ?? process.env.XOPC_MODEL_ROUTER_URL ?? DEFAULT_ROUTER_URL).replace(/\/+$/, "");
|
|
26
|
+
this.credentials = options.credentials ?? getCredentialResolver();
|
|
27
|
+
this.catalogStore = options.catalogStore ?? getModelCatalogStore();
|
|
28
|
+
this.refreshModels = options.refreshModels ?? (() => getModelRegistry().refresh());
|
|
29
|
+
}
|
|
30
|
+
async refresh() {
|
|
31
|
+
const accessToken = await this.credentials.resolveApiKey("xopc-cloud");
|
|
32
|
+
if (!accessToken) return {
|
|
33
|
+
status: "skipped",
|
|
34
|
+
reason: "not_configured"
|
|
35
|
+
};
|
|
36
|
+
const response = await this.fetchImpl(`${this.routerUrl}/models`, {
|
|
37
|
+
headers: {
|
|
38
|
+
authorization: `Bearer ${accessToken}`,
|
|
39
|
+
accept: "application/json"
|
|
40
|
+
},
|
|
41
|
+
signal: AbortSignal.timeout(3e4)
|
|
42
|
+
});
|
|
43
|
+
const body = await response.json().catch(() => null);
|
|
44
|
+
if (!response.ok) throw new XopcCloudModelError(typeof body?.error?.message === "string" ? body.error.message : `XOPC model discovery failed (${response.status})`, response.status, typeof body?.error?.code === "string" ? body.error.code : void 0);
|
|
45
|
+
if (!Array.isArray(body?.data)) throw new XopcCloudModelError("XOPC model discovery returned an invalid response", response.status, "invalid_response");
|
|
46
|
+
const models = [...new Set(body.data.map((model) => model.id).filter((id) => typeof id === "string" && id.length > 0))];
|
|
47
|
+
this.catalogStore.replaceSourceModels("xopc-cloud", {
|
|
48
|
+
providerId: "xopc-cloud",
|
|
49
|
+
baseUrl: this.routerUrl,
|
|
50
|
+
api: "openai-completions",
|
|
51
|
+
etag: response.headers.get("x-xopc-model-catalog-version"),
|
|
52
|
+
recommendedModel: models[0] ?? null,
|
|
53
|
+
lastSuccessAt: Date.now()
|
|
54
|
+
}, models.map((id) => ({
|
|
55
|
+
id,
|
|
56
|
+
name: id,
|
|
57
|
+
maxOutputTokens: null
|
|
58
|
+
})));
|
|
59
|
+
this.refreshModels();
|
|
60
|
+
return {
|
|
61
|
+
status: "updated",
|
|
62
|
+
modelCount: models.length,
|
|
63
|
+
models
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
//#endregion
|
|
68
|
+
export { XopcCloudModelError, XopcCloudModelSource };
|
|
@@ -17,7 +17,7 @@ export { initSessionTurn, type InitSessionTurnOptions, type InitSessionTurnResul
|
|
|
17
17
|
export { DEFAULT_RESET_TRIGGERS, RESET_OVERLAP_COMMANDS, bareResetAckMessage, matchResetTriggers, resolveResetTriggers, shouldSkipResetOverlapCommand, stripLeadingEnvelopeTimestamp, type ResetTriggerMatch, } from './reset-triggers.js';
|
|
18
18
|
export type { CompactionConfig, CompactionResult } from '../agent/memory/compaction.js';
|
|
19
19
|
export type { WindowConfig } from '../agent/memory/window.js';
|
|
20
|
-
export { maybeSetProvisionalSessionTitle, maybeRefineSessionTitleWithLlm, generateSessionTitleFromMessages, sanitizeSessionTitle, provisionalTitleFromUserText, fallbackTitleFromMessages, getSessionTitleSource, shouldRefineSessionTitleWithLlm, isWebchatSessionKey, shouldAutoTitleSessionKey, type SessionTitleSource, } from './session-title.js';
|
|
20
|
+
export { maybeSetProvisionalSessionTitle, maybeRefineSessionTitleWithLlm, generateSessionTitleFromMessages, sanitizeSessionTitle, sanitizeGeneratedSessionTitle, provisionalTitleFromUserText, fallbackTitleFromMessages, getSessionTitleSource, shouldRefineSessionTitleWithLlm, isWebchatSessionKey, shouldAutoTitleSessionKey, type SessionTitleSource, } from './session-title.js';
|
|
21
21
|
export { messagesToClientHistory, flattenMessageContent, type ClientHistoryMessage } from './client-history.js';
|
|
22
22
|
export { XOPC_SESSION_TRANSCRIPT_TYPE, CURRENT_SESSION_TRANSCRIPT_VERSION, } from './transcript-format.js';
|
|
23
23
|
export { buildSessionContextForLlm, isTranscriptContextEntry, mergeLlmMessagesPreservingContextRows, transcriptRowsFromJsonArray, type TranscriptStoredRow, type XopcTranscriptContextEntry, } from './session-context-for-llm.js';
|
|
@@ -2,7 +2,7 @@ import { SessionStatus } from "./types.js";
|
|
|
2
2
|
import { buildSessionContextForLlm, isTranscriptContextEntry, mergeLlmMessagesPreservingContextRows, transcriptRowsFromJsonArray } from "./session-context-for-llm.js";
|
|
3
3
|
import { effectiveWorkspacePathForSession, normalizeWorkingDirectoryInput, projectWorkspacePath } from "./session-workspace.js";
|
|
4
4
|
import { emitSessionTranscriptUpdate, onSessionTranscriptUpdate } from "./transcript-events.js";
|
|
5
|
-
import { fallbackTitleFromMessages, generateSessionTitleFromMessages, getSessionTitleSource, isWebchatSessionKey, maybeRefineSessionTitleWithLlm, maybeSetProvisionalSessionTitle, provisionalTitleFromUserText, sanitizeSessionTitle, shouldAutoTitleSessionKey, shouldRefineSessionTitleWithLlm } from "./session-title.js";
|
|
5
|
+
import { fallbackTitleFromMessages, generateSessionTitleFromMessages, getSessionTitleSource, isWebchatSessionKey, maybeRefineSessionTitleWithLlm, maybeSetProvisionalSessionTitle, provisionalTitleFromUserText, sanitizeGeneratedSessionTitle, sanitizeSessionTitle, shouldAutoTitleSessionKey, shouldRefineSessionTitleWithLlm } from "./session-title.js";
|
|
6
6
|
import { normalizeCompactionCheckpointId } from "./compaction-checkpoints.js";
|
|
7
7
|
import { flattenMessageContent, messagesToClientHistory } from "./client-history.js";
|
|
8
8
|
import { SessionStore } from "./store.js";
|
|
@@ -18,4 +18,4 @@ import { resolveSession, resolveSessionKeyForRequest } from "./resolve-session.j
|
|
|
18
18
|
import { DEFAULT_RESET_TRIGGERS, RESET_OVERLAP_COMMANDS, bareResetAckMessage, matchResetTriggers, resolveResetTriggers, shouldSkipResetOverlapCommand, stripLeadingEnvelopeTimestamp } from "./reset-triggers.js";
|
|
19
19
|
import { initSessionTurn } from "./init-session-turn.js";
|
|
20
20
|
import { CURRENT_SESSION_TRANSCRIPT_VERSION, XOPC_SESSION_TRANSCRIPT_TYPE } from "./transcript-format.js";
|
|
21
|
-
export { CURRENT_SESSION_TRANSCRIPT_VERSION, DEFAULT_IDLE_MINUTES, DEFAULT_RESET_AT_HOUR, DEFAULT_RESET_MODE, DEFAULT_RESET_TRIGGERS, RESET_OVERLAP_COMMANDS, SessionConfigStore, SessionIndex, SessionStatus, SessionStore, XOPC_SESSION_TRANSCRIPT_TYPE, applySessionPatchToMetadata, bareResetAckMessage, buildSessionContextForLlm, effectiveWorkspacePathForSession, emitSessionTranscriptUpdate, evaluateSessionFreshness, fallbackTitleFromMessages, flattenMessageContent, generateSessionTitleFromMessages, getSessionTitleSource, initSessionTurn, isTranscriptContextEntry, isWebchatSessionKey, matchResetTriggers, maybeRefineSessionTitleWithLlm, maybeSetProvisionalSessionTitle, mergeLlmMessagesPreservingContextRows, messagesToClientHistory, normalizeCompactionCheckpointId, normalizeWorkingDirectoryInput, onSessionTranscriptUpdate, projectWorkspacePath, provisionalTitleFromUserText, resolveChannelResetConfig, resolveDailyResetAtMs, resolveEffectiveReasoningLevel, resolveEffectiveThinkingLevel, resolveReasoningLevel, resolveResetTriggers, resolveSession, resolveSessionKeyForRequest, resolveSessionLifecycleTimestamps, resolveSessionResetPolicy, resolveSessionResetType, resolveThinkingLevel, resolveVerboseLevel, sanitizeSessionTitle, shouldAutoTitleSessionKey, shouldRefineSessionTitleWithLlm, shouldSkipResetOverlapCommand, shouldSkipWebchatInboundByAbortCutoff, stripLeadingEnvelopeTimestamp, transcriptRowsFromJsonArray };
|
|
21
|
+
export { CURRENT_SESSION_TRANSCRIPT_VERSION, DEFAULT_IDLE_MINUTES, DEFAULT_RESET_AT_HOUR, DEFAULT_RESET_MODE, DEFAULT_RESET_TRIGGERS, RESET_OVERLAP_COMMANDS, SessionConfigStore, SessionIndex, SessionStatus, SessionStore, XOPC_SESSION_TRANSCRIPT_TYPE, applySessionPatchToMetadata, bareResetAckMessage, buildSessionContextForLlm, effectiveWorkspacePathForSession, emitSessionTranscriptUpdate, evaluateSessionFreshness, fallbackTitleFromMessages, flattenMessageContent, generateSessionTitleFromMessages, getSessionTitleSource, initSessionTurn, isTranscriptContextEntry, isWebchatSessionKey, matchResetTriggers, maybeRefineSessionTitleWithLlm, maybeSetProvisionalSessionTitle, mergeLlmMessagesPreservingContextRows, messagesToClientHistory, normalizeCompactionCheckpointId, normalizeWorkingDirectoryInput, onSessionTranscriptUpdate, projectWorkspacePath, provisionalTitleFromUserText, resolveChannelResetConfig, resolveDailyResetAtMs, resolveEffectiveReasoningLevel, resolveEffectiveThinkingLevel, resolveReasoningLevel, resolveResetTriggers, resolveSession, resolveSessionKeyForRequest, resolveSessionLifecycleTimestamps, resolveSessionResetPolicy, resolveSessionResetType, resolveThinkingLevel, resolveVerboseLevel, sanitizeGeneratedSessionTitle, sanitizeSessionTitle, shouldAutoTitleSessionKey, shouldRefineSessionTitleWithLlm, shouldSkipResetOverlapCommand, shouldSkipWebchatInboundByAbortCutoff, stripLeadingEnvelopeTimestamp, transcriptRowsFromJsonArray };
|
|
@@ -7,6 +7,8 @@ export declare function isWebchatSessionKey(sessionKey: string): boolean;
|
|
|
7
7
|
/** Whether to run LLM/fallback session naming for this key (excludes cron, heartbeat). */
|
|
8
8
|
export declare function shouldAutoTitleSessionKey(sessionKey: string): boolean;
|
|
9
9
|
export declare function sanitizeSessionTitle(raw: string): string;
|
|
10
|
+
/** Strip leading reasoning blocks emitted as raw text by some model providers. */
|
|
11
|
+
export declare function sanitizeGeneratedSessionTitle(raw: string): string;
|
|
10
12
|
export type SessionTitleSource = 'provisional' | 'llm' | 'user';
|
|
11
13
|
export declare function getSessionTitleSource(meta: {
|
|
12
14
|
customData?: Record<string, unknown>;
|
|
@@ -86,6 +86,23 @@ function sanitizeSessionTitle(raw) {
|
|
|
86
86
|
if (s.length > MAX_TITLE_LEN) s = s.slice(0, MAX_TITLE_LEN - 1).trimEnd() + "…";
|
|
87
87
|
return s;
|
|
88
88
|
}
|
|
89
|
+
/** Strip leading reasoning blocks emitted as raw text by some model providers. */
|
|
90
|
+
function sanitizeGeneratedSessionTitle(raw) {
|
|
91
|
+
let s = raw.trim();
|
|
92
|
+
while (s) {
|
|
93
|
+
const opening = s.match(/^<\s*(think|analysis|reasoning)\s*>/i);
|
|
94
|
+
if (!opening) break;
|
|
95
|
+
const tag = opening[1]?.toLowerCase();
|
|
96
|
+
if (!tag) return "";
|
|
97
|
+
const remainder = s.slice(opening[0].length);
|
|
98
|
+
const closing = new RegExp(`<\\s*\\/\\s*${tag}\\s*>`, "i").exec(remainder);
|
|
99
|
+
if (!closing) return "";
|
|
100
|
+
s = remainder.slice(closing.index + closing[0].length).trim();
|
|
101
|
+
}
|
|
102
|
+
s = s.replace(/^(?:<\s*\/\s*(?:think|analysis|reasoning)\s*>\s*)+/i, "").trim();
|
|
103
|
+
if (/^<\s*\/?\s*(?:think|analysis|reasoning)\s*>$/i.test(s)) return "";
|
|
104
|
+
return sanitizeSessionTitle(s);
|
|
105
|
+
}
|
|
89
106
|
function getSessionTitleSource(meta) {
|
|
90
107
|
const raw = meta?.customData?.titleSource;
|
|
91
108
|
if (raw === "provisional" || raw === "llm" || raw === "user") return raw;
|
|
@@ -159,7 +176,7 @@ Title:`,
|
|
|
159
176
|
if (Array.isArray(result.content)) {
|
|
160
177
|
for (const c of result.content) if (c && typeof c === "object" && c.type === "text") text += String(c.text || "");
|
|
161
178
|
}
|
|
162
|
-
const cleaned =
|
|
179
|
+
const cleaned = sanitizeGeneratedSessionTitle(text);
|
|
163
180
|
return cleaned.length > 0 ? cleaned : null;
|
|
164
181
|
} catch (err) {
|
|
165
182
|
log.warn({ err }, "Session title LLM call failed");
|
|
@@ -171,7 +188,11 @@ function shouldRefineSessionTitleWithLlm(meta) {
|
|
|
171
188
|
if (!meta) return false;
|
|
172
189
|
const source = getSessionTitleSource(meta);
|
|
173
190
|
if (source === "user") return false;
|
|
174
|
-
if (meta.name?.trim())
|
|
191
|
+
if (meta.name?.trim()) {
|
|
192
|
+
if (source === "provisional") return true;
|
|
193
|
+
if (source === "llm") return sanitizeGeneratedSessionTitle(meta.name).length === 0;
|
|
194
|
+
return false;
|
|
195
|
+
}
|
|
175
196
|
return true;
|
|
176
197
|
}
|
|
177
198
|
function canAutoWriteTitle(meta) {
|
|
@@ -269,4 +290,4 @@ async function maybeRefineSessionTitleWithLlm(sessionStore, sessionKey, modelRef
|
|
|
269
290
|
}
|
|
270
291
|
}
|
|
271
292
|
//#endregion
|
|
272
|
-
export { fallbackTitleFromMessages, generateSessionTitleFromMessages, getSessionTitleSource, isWebchatSessionKey, maybeRefineSessionTitleWithLlm, maybeSetProvisionalSessionTitle, provisionalTitleFromUserText, sanitizeSessionTitle, shouldAutoTitleSessionKey, shouldRefineSessionTitleWithLlm };
|
|
293
|
+
export { fallbackTitleFromMessages, generateSessionTitleFromMessages, getSessionTitleSource, isWebchatSessionKey, maybeRefineSessionTitleWithLlm, maybeSetProvisionalSessionTitle, provisionalTitleFromUserText, sanitizeGeneratedSessionTitle, sanitizeSessionTitle, shouldAutoTitleSessionKey, shouldRefineSessionTitleWithLlm };
|
|
@@ -7,6 +7,7 @@ init_schema();
|
|
|
7
7
|
init_providers();
|
|
8
8
|
const MAX_MODEL_CONTEXT_CHARS = 12e4;
|
|
9
9
|
const MAX_PERSONAL_CONTEXT_CHARS = 1e5;
|
|
10
|
+
const WORK_ANALYSIS_MAX_TOKENS = 6e3;
|
|
10
11
|
function extractText(content) {
|
|
11
12
|
if (typeof content === "string") return content;
|
|
12
13
|
if (!Array.isArray(content)) return "";
|
|
@@ -17,16 +18,24 @@ function extractText(content) {
|
|
|
17
18
|
}).join("");
|
|
18
19
|
}
|
|
19
20
|
function parseJson(raw) {
|
|
20
|
-
const
|
|
21
|
+
const candidates = [];
|
|
22
|
+
for (const match of raw.matchAll(/```json\s*([\s\S]*?)```/gi)) if (match[1]) candidates.push(match[1]);
|
|
23
|
+
candidates.push(raw.trim());
|
|
24
|
+
for (const match of raw.matchAll(/```(?:[^\n]*)?\s*([\s\S]*?)```/g)) if (match[1]) candidates.push(match[1]);
|
|
21
25
|
const start = raw.indexOf("{");
|
|
22
26
|
const end = raw.lastIndexOf("}");
|
|
23
|
-
|
|
24
|
-
try {
|
|
27
|
+
if (start >= 0 && end > start) candidates.push(raw.slice(start, end + 1));
|
|
28
|
+
for (const candidate of new Set(candidates)) try {
|
|
25
29
|
const value = JSON.parse(candidate);
|
|
26
|
-
|
|
27
|
-
} catch {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
+
if (value && typeof value === "object" && !Array.isArray(value)) return value;
|
|
31
|
+
} catch {}
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
function invalidJsonError(label, response, raw) {
|
|
35
|
+
const outputChars = raw.length;
|
|
36
|
+
if (response.stopReason === "length") return /* @__PURE__ */ new Error(`${label} response was truncated before completing valid JSON (outputChars=${outputChars})`);
|
|
37
|
+
if (response.stopReason === "error" && typeof response.errorMessage === "string") return /* @__PURE__ */ new Error(`${label} model request failed: ${response.errorMessage}`);
|
|
38
|
+
return /* @__PURE__ */ new Error(`${label} did not return valid JSON (stopReason=${String(response.stopReason)}, outputChars=${outputChars})`);
|
|
30
39
|
}
|
|
31
40
|
function strings(value, max) {
|
|
32
41
|
return Array.isArray(value) ? value.filter((item) => typeof item === "string" && item.trim().length > 0).slice(0, max).map((item) => item.trim()) : [];
|
|
@@ -152,7 +161,7 @@ async function analyzeWorkContext(input) {
|
|
|
152
161
|
};
|
|
153
162
|
const model = resolveModel(modelRef);
|
|
154
163
|
const compactSnapshot = snapshotForModel(input.snapshot);
|
|
155
|
-
const
|
|
164
|
+
const response = await completeWithResolvedCredentials(model, { messages: [{
|
|
156
165
|
role: "user",
|
|
157
166
|
content: [
|
|
158
167
|
"You help a user resume real work in one explicitly selected local folder.",
|
|
@@ -188,11 +197,13 @@ async function analyzeWorkContext(input) {
|
|
|
188
197
|
].join("\n"),
|
|
189
198
|
timestamp: Date.now()
|
|
190
199
|
}] }, {
|
|
191
|
-
maxTokens:
|
|
200
|
+
maxTokens: WORK_ANALYSIS_MAX_TOKENS,
|
|
192
201
|
temperature: .1,
|
|
193
202
|
signal: input.signal
|
|
194
|
-
})
|
|
195
|
-
|
|
203
|
+
});
|
|
204
|
+
const raw = extractText(response.content);
|
|
205
|
+
const parsed = parseJson(raw);
|
|
206
|
+
if (!parsed) throw invalidJsonError("Analysis", response, raw);
|
|
196
207
|
if (parsed.lowConfidence === true) return {
|
|
197
208
|
modelRef,
|
|
198
209
|
result: lowConfidenceResult(input.snapshot, typeof parsed.contextQuestion === "string" ? parsed.contextQuestion.trim().slice(0, 500) : void 0)
|
|
@@ -266,7 +277,7 @@ async function analyzePersonalContext(input) {
|
|
|
266
277
|
input.workContext ? `Work-directory understanding from the same one-shot investigation:\n${JSON.stringify(input.workContext)}` : "",
|
|
267
278
|
JSON.stringify(items)
|
|
268
279
|
].join("\n");
|
|
269
|
-
const
|
|
280
|
+
const response = await completeWithResolvedCredentials(resolveModel(modelRef), { messages: [{
|
|
270
281
|
role: "user",
|
|
271
282
|
content: prompt,
|
|
272
283
|
timestamp: Date.now()
|
|
@@ -274,8 +285,10 @@ async function analyzePersonalContext(input) {
|
|
|
274
285
|
maxTokens: 1500,
|
|
275
286
|
temperature: .1,
|
|
276
287
|
signal: input.signal
|
|
277
|
-
})
|
|
278
|
-
|
|
288
|
+
});
|
|
289
|
+
const raw = extractText(response.content);
|
|
290
|
+
const parsed = parseJson(raw);
|
|
291
|
+
if (!parsed) throw invalidJsonError("Personal context analysis", response, raw);
|
|
279
292
|
const profileCandidates = Array.isArray(parsed.profileCandidates) ? parsed.profileCandidates.map(validateProfileCandidate).filter((value) => Boolean(value)).slice(0, 6) : [];
|
|
280
293
|
const allowedRefs = new Set(items.map((item) => item.ref));
|
|
281
294
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xopcai/xopc",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.164",
|
|
4
4
|
"description": "Local-first AI system that remembers context, coordinates AI, and sustains long-term progress.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
@@ -176,12 +176,10 @@
|
|
|
176
176
|
"scripts": {
|
|
177
177
|
"assets:brand": "node scripts/generate-brand-assets.mjs",
|
|
178
178
|
"assets:brand:check": "node scripts/generate-brand-assets.mjs --check",
|
|
179
|
-
"generate:bundled-image-providers": "node scripts/generate-bundled-image-providers.mjs",
|
|
180
|
-
"generate:bundled": "pnpm run generate:bundled-image-providers",
|
|
181
179
|
"build:node": "node scripts/tsdown-build.mjs",
|
|
182
180
|
"build:types": "tsc -p tsconfig.dts.json",
|
|
183
|
-
"build:ci": "pnpm run
|
|
184
|
-
"build": "pnpm run
|
|
181
|
+
"build:ci": "pnpm run build:node && pnpm run build:web",
|
|
182
|
+
"build": "pnpm run build:node && pnpm run build:types && pnpm run build:web",
|
|
185
183
|
"docker:build": "sh -c 'docker buildx version >/dev/null 2>&1 || { echo \"Docker buildx is required. Install it with: brew install docker-buildx && mkdir -p ~/.docker/cli-plugins && ln -sf $(brew --prefix)/opt/docker-buildx/bin/docker-buildx ~/.docker/cli-plugins/docker-buildx\" >&2; exit 1; }; DOCKER_BUILDKIT=1 docker build --build-arg XOPC_APT_MIRROR=\"${XOPC_APT_MIRROR:-}\" -t xopc:local .'",
|
|
186
184
|
"docker:run": "docker run --rm -it -p 18790:18790 -v ${HOME}/.xopc:/home/node/.xopc xopc:local",
|
|
187
185
|
"docker:compose:up": "sh -c 'if docker compose version >/dev/null 2>&1; then DOCKER_BUILDKIT=1 docker compose up --build xopc-gateway; else COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker-compose up --build xopc-gateway; fi'",
|
|
@@ -202,7 +200,7 @@
|
|
|
202
200
|
"dev:init": "sh -c 'mkdir -p \"$HOME/.xopc-dev\" && XOPC_STATE_DIR=\"$HOME/.xopc-dev\" XOPC_CONFIG_PATH=\"$HOME/.xopc-dev/xopc.json\" XOPC_CONFIG=\"$HOME/.xopc-dev/xopc.json\" XOPC_LOG_DIR=\"$HOME/.xopc-dev/logs\" XOPC_LOG_LEVEL=info tsx src/cli/bin.ts init \"$@\"' --",
|
|
203
201
|
"dev:gateway": "sh -c 'mkdir -p \"$HOME/.xopc-dev\" && XOPC_STATE_DIR=\"$HOME/.xopc-dev\" XOPC_CONFIG_PATH=\"$HOME/.xopc-dev/xopc.json\" XOPC_CONFIG=\"$HOME/.xopc-dev/xopc.json\" XOPC_LOG_DIR=\"$HOME/.xopc-dev/logs\" XOPC_LOG_LEVEL=info tsx src/cli/bin.ts gateway \"$@\"' --",
|
|
204
202
|
"start": "node dist/src/cli/bin.js",
|
|
205
|
-
"test": "vitest run src extensions/telegram/src extensions/feishu/src extensions/weixin/src
|
|
203
|
+
"test": "vitest run src extensions/telegram/src extensions/feishu/src extensions/weixin/src",
|
|
206
204
|
"test:skills": "vitest run src/agent/skills/__tests__",
|
|
207
205
|
"test:skills:regression": "./scripts/test-skills.sh",
|
|
208
206
|
"test:skills:all": "npm run test:skills && npm run test:skills:regression",
|
|
@@ -250,7 +248,7 @@
|
|
|
250
248
|
"electron:build:artifacts": "pnpm run electron:native:build && pnpm run electron:vite:build:package && pnpm run electron:server:build && pnpm run electron:extensions:build",
|
|
251
249
|
"electron:frpc:download": "node --import tsx/esm scripts/download-frpc-binaries.mjs",
|
|
252
250
|
"electron:frpc:download:all": "node --import tsx/esm scripts/download-frpc-binaries.mjs --all",
|
|
253
|
-
"electron:build": "pnpm run
|
|
251
|
+
"electron:build": "pnpm run build:node && pnpm run build:web && pnpm run electron:build:artifacts && pnpm run electron:package",
|
|
254
252
|
"electron:preview": "cross-env ELECTRON_ENTRY=out/main/index.js electron-vite preview"
|
|
255
253
|
}
|
|
256
254
|
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Bundled DashScope (Alibaba) image-generation extension entry.
|
|
3
|
-
*/
|
|
4
|
-
export { buildDashScopeCnImageGenerationProvider, buildDashScopeIntlImageGenerationProvider, generateDashScopeImages, resolveDashScopeImageGenerationUrl, mapSizeToDashScopeFormat, mapSizeToWan27Format, isWan27ImageModel, DASHSCOPE_IMAGE_ENDPOINTS, DASHSCOPE_DEFAULT_IMAGE_MODEL, DASHSCOPE_IMAGE_MODELS, type DashScopeImageRegion, } from './image-generation-provider.js';
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { DASHSCOPE_DEFAULT_IMAGE_MODEL, DASHSCOPE_IMAGE_ENDPOINTS, DASHSCOPE_IMAGE_MODELS, buildDashScopeCnImageGenerationProvider, buildDashScopeIntlImageGenerationProvider, generateDashScopeImages, isWan27ImageModel, mapSizeToDashScopeFormat, mapSizeToWan27Format, resolveDashScopeImageGenerationUrl } from "./image-generation-provider.js";
|
|
2
|
-
export { DASHSCOPE_DEFAULT_IMAGE_MODEL, DASHSCOPE_IMAGE_ENDPOINTS, DASHSCOPE_IMAGE_MODELS, buildDashScopeCnImageGenerationProvider, buildDashScopeIntlImageGenerationProvider, generateDashScopeImages, isWan27ImageModel, mapSizeToDashScopeFormat, mapSizeToWan27Format, resolveDashScopeImageGenerationUrl };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"id": "dashscope",
|
|
3
|
-
"name": "DashScope (Alibaba)",
|
|
4
|
-
"description": "Image generation via Alibaba Model Studio (DashScope). Configure the China or international provider under Settings → Images.",
|
|
5
|
-
"version": "1.0.0",
|
|
6
|
-
"kind": "image-generation",
|
|
7
|
-
"main": "src/index.js",
|
|
8
|
-
"autoEnableWhenConfiguredProviders": [
|
|
9
|
-
"dashscope-cn",
|
|
10
|
-
"dashscope-intl"
|
|
11
|
-
],
|
|
12
|
-
"engines": {
|
|
13
|
-
"xopc": ">=0.0.106 <1.0.0"
|
|
14
|
-
}
|
|
15
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { FAL_DEFAULT_IMAGE_MODEL, FAL_IMAGE_MODELS, buildFalImageGenerationProvider, generateFalImages, resolveFalBaseUrl } from "./image-generation-provider.js";
|
|
2
|
-
export { FAL_DEFAULT_IMAGE_MODEL, FAL_IMAGE_MODELS, buildFalImageGenerationProvider, generateFalImages, resolveFalBaseUrl };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"id": "fal",
|
|
3
|
-
"name": "Fal.ai",
|
|
4
|
-
"description": "Image generation via Fal.ai queue API. Configure API keys and queue base URL under Settings → Images, or here — both edit the same providers.fal entry.",
|
|
5
|
-
"version": "1.0.0",
|
|
6
|
-
"kind": "image-generation",
|
|
7
|
-
"main": "src/index.js",
|
|
8
|
-
"autoEnableWhenConfiguredProviders": [
|
|
9
|
-
"fal"
|
|
10
|
-
],
|
|
11
|
-
"engines": {
|
|
12
|
-
"xopc": ">=0.0.106 <1.0.0"
|
|
13
|
-
}
|
|
14
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { GOOGLE_DEFAULT_IMAGE_MODEL, GOOGLE_IMAGE_MODELS, buildGoogleImageGenerationProvider, generateGoogleImages, resolveGoogleBaseUrl } from "./image-generation-provider.js";
|
|
2
|
-
export { GOOGLE_DEFAULT_IMAGE_MODEL, GOOGLE_IMAGE_MODELS, buildGoogleImageGenerationProvider, generateGoogleImages, resolveGoogleBaseUrl };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"id": "google",
|
|
3
|
-
"name": "Google Gemini (images)",
|
|
4
|
-
"description": "Gemini image generation and editing. Configure API keys and optional base URL under Settings → Images, or here — both edit the same providers.google entry.",
|
|
5
|
-
"version": "1.0.0",
|
|
6
|
-
"kind": "image-generation",
|
|
7
|
-
"main": "src/index.js",
|
|
8
|
-
"autoEnableWhenConfiguredProviders": [
|
|
9
|
-
"google"
|
|
10
|
-
],
|
|
11
|
-
"engines": {
|
|
12
|
-
"xopc": ">=0.0.106 <1.0.0"
|
|
13
|
-
}
|
|
14
|
-
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Bundled MiniMax image-generation extension entry.
|
|
3
|
-
*/
|
|
4
|
-
export { buildMinimaxCnImageGenerationProvider, buildMinimaxImageGenerationProvider, generateMinimaxImages, resolveMinimaxBaseUrl, mapSizeToMinimaxAspectRatio, MINIMAX_DEFAULT_IMAGE_MODEL, MINIMAX_IMAGE_MODELS, type MinimaxAspectRatio, } from './image-generation-provider.js';
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { MINIMAX_DEFAULT_IMAGE_MODEL, MINIMAX_IMAGE_MODELS, buildMinimaxCnImageGenerationProvider, buildMinimaxImageGenerationProvider, generateMinimaxImages, mapSizeToMinimaxAspectRatio, resolveMinimaxBaseUrl } from "./image-generation-provider.js";
|
|
2
|
-
export { MINIMAX_DEFAULT_IMAGE_MODEL, MINIMAX_IMAGE_MODELS, buildMinimaxCnImageGenerationProvider, buildMinimaxImageGenerationProvider, generateMinimaxImages, mapSizeToMinimaxAspectRatio, resolveMinimaxBaseUrl };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"id": "minimax",
|
|
3
|
-
"name": "MiniMax (images)",
|
|
4
|
-
"description": "MiniMax image generation. Configure the China or international provider under Settings → Images.",
|
|
5
|
-
"version": "1.0.0",
|
|
6
|
-
"kind": "image-generation",
|
|
7
|
-
"main": "src/index.js",
|
|
8
|
-
"autoEnableWhenConfiguredProviders": [
|
|
9
|
-
"minimax",
|
|
10
|
-
"minimax-cn"
|
|
11
|
-
],
|
|
12
|
-
"engines": {
|
|
13
|
-
"xopc": ">=0.0.106 <1.0.0"
|
|
14
|
-
}
|
|
15
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"id": "openai",
|
|
3
|
-
"name": "OpenAI (images)",
|
|
4
|
-
"description": "DALL·E / GPT image APIs. Configure API keys and optional base URL under Settings → Images, or here — both edit the same providers.openai entry.",
|
|
5
|
-
"version": "1.0.0",
|
|
6
|
-
"kind": "image-generation",
|
|
7
|
-
"main": "src/index.js",
|
|
8
|
-
"autoEnableWhenConfiguredProviders": [
|
|
9
|
-
"openai"
|
|
10
|
-
],
|
|
11
|
-
"engines": {
|
|
12
|
-
"xopc": ">=0.0.106 <1.0.0"
|
|
13
|
-
}
|
|
14
|
-
}
|