@xopcai/xopc 0.0.258 → 0.0.260
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 +6 -2
- package/README.zh-CN.md +6 -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-DYb6xFC3.js → activity-store-C3PGOKZ2.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-D7tpOS12.js → agent-avatar-dicebear-DQXGuDU1.js} +1 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-B-adIdqU.js +1 -0
- package/dist/gateway/static/root/assets/agents-tEnV2m4V.js +1 -0
- package/dist/gateway/static/root/assets/{api-NADZ8X8B.js → api-B9Ujaa2n.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-xtMKAVbv.js → app-management-settings-panel-DpPFwi9Y.js} +1 -1
- package/dist/gateway/static/root/assets/appearance-settings-CMZNnWrt.js +1 -0
- package/dist/gateway/static/root/assets/apps-page-CjUC3jZ3.js +1 -0
- package/dist/gateway/static/root/assets/{archive-plugin-DXKFrMNm.js → archive-plugin-CDO9Z4tl.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-DLYGTBVf.js → attachment-load-B0OLG7F4.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-BTp6bGo4.js → automations-page-DkRGPgbA.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-DToID01H.js +6 -0
- package/dist/gateway/static/root/assets/{binary-plugins-BcvVtSvZ.js → binary-plugins-C9cQvqON.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-hZg3H6K-.js → block-editor-CuhEms-L.js} +29 -29
- package/dist/gateway/static/root/assets/{browser-automation-inputs-rA2QROKe.js → browser-automation-inputs-C5CkGZTi.js} +1 -1
- package/dist/gateway/static/root/assets/browser-automations-page-D4ylF3c0.js +3 -0
- package/dist/gateway/static/root/assets/browser-settings-page-BIYTKzLB.js +8 -0
- package/dist/gateway/static/root/assets/{button-CtTvuElV.js → button-B11EPpor.js} +1 -1
- package/dist/gateway/static/root/assets/capabilities-settings-panel-DLaPx1nq.js +7 -0
- package/dist/gateway/static/root/assets/channels-settings-jIVF8Nin.js +1 -0
- package/dist/gateway/static/root/assets/{channels-status-swr-B2aMPOSM.js → channels-status-swr-0RbeaCb4.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-terminal-dock-CmV1RMyj.js → chat-terminal-dock-BIdsO11x.js} +2 -2
- package/dist/gateway/static/root/assets/connectors-page-CIslIJFt.js +2 -0
- package/dist/gateway/static/root/assets/{cron-expression-DsEb7fyV.js → cron-expression-Dgkeyu7p.js} +1 -1
- package/dist/gateway/static/root/assets/{date-picker-ChR8KQ7f.js → date-picker-De7tAQEZ.js} +1 -1
- package/dist/gateway/static/root/assets/dependency-picker-BzPt6TdE.js +1 -0
- package/dist/gateway/static/root/assets/{desktop-pet-_nHlkhRg.js → desktop-pet-BPOx0awZ.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-B_tVwGUL.js → desktop-pet-settings-CLo3YMLt.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-DJttDDUz.js → extension-debug-page-DDEyLbVr.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-vv7-Kg1n.js → extension-page-D1NUZpPd.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-BpsPHT1o.js → extension-settings-page-BJhuMrU_.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-swr-DEKSw3d-.js → gateway-config-swr-DftrkBXi.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-settings-v2JeDF9-.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-startup-retry-Dlyt2VhF.js → gateway-startup-retry-BgI4nHyS.js} +1 -1
- package/dist/gateway/static/root/assets/heartbeat-settings-1W8w4lhI.js +1 -0
- package/dist/gateway/static/root/assets/home-page-BSKKIfeQ.js +1 -0
- package/dist/gateway/static/root/assets/{image-generation-api-CJIPVk_d.js → image-generation-api-SZomqErK.js} +1 -1
- package/dist/gateway/static/root/assets/index-BKCWDzbV.css +2 -0
- package/dist/gateway/static/root/assets/index-BXdV0Oia.js +74 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-CjUFDVZk.js → keyboard-shortcuts-settings-COT94SO3.js} +1 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-DUs-vc7c.js +2 -0
- package/dist/gateway/static/root/assets/local-apps-page-C6rKhNyX.js +1 -0
- package/dist/gateway/static/root/assets/{locale-store-DJPCr2mb.js → locale-store-CHtOF1kO.js} +1 -1
- package/dist/gateway/static/root/assets/logs-page-D_qfxg72.js +2 -0
- package/dist/gateway/static/root/assets/management-settings-DSH7NnVw.js +1 -0
- package/dist/gateway/static/root/assets/{markdown-view-k_PJsY2C.js → markdown-view-D-FLW0dt.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-BFQxVZ03.js → media-plugins-Cf6kUNl_.js} +1 -1
- package/dist/gateway/static/root/assets/messages-CIDIpI4Y.js +3 -0
- package/dist/gateway/static/root/assets/{mobile-pairing-wizard-DfT_mH8L.js → mobile-pairing-wizard-CILSkJVm.js} +1 -1
- package/dist/gateway/static/root/assets/note-detail-panel-p09JcANK.js +5 -0
- package/dist/gateway/static/root/assets/notes-page-CFNvIB8t.js +8 -0
- package/dist/gateway/static/root/assets/{page-tabs-CMZs-2FR.js → page-tabs-BE7aDmYf.js} +1 -1
- package/dist/gateway/static/root/assets/{preview-open-alternatives-BUprGPfS.js → preview-open-alternatives-C9TdeSFT.js} +1 -1
- package/dist/gateway/static/root/assets/{product-open-page-CeStuxSl.js → product-open-page-UiLKUjzS.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-CM2vs8CY.js +1 -0
- package/dist/gateway/static/root/assets/projects-page-DA-zzY8B.js +1 -0
- package/dist/gateway/static/root/assets/{registry-api-Dalzf2w0.js → registry-api-BbSVGn6X.js} +1 -1
- package/dist/gateway/static/root/assets/remote-access-hub--sgDiADe.js +1 -0
- package/dist/gateway/static/root/assets/runtime-tools-settings-panel-DkshrVpk.js +5 -0
- package/dist/gateway/static/root/assets/{schema-form-CjQ582_7.js → schema-form-tLOl1ZAH.js} +1 -1
- package/dist/gateway/static/root/assets/sessions-page-C_TdKlUD.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-Cpf80P_r.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-d1SWWFyj.js → settings-form-section-Dxkw4v4H.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-CeSoibS9.js → settings-page-Bqk8W4z_.js} +1 -1
- package/dist/gateway/static/root/assets/settings-page-layout-DYelDcMV.js +1 -0
- package/dist/gateway/static/root/assets/setup-status-panel-DWd6faoE.js +1 -0
- package/dist/gateway/static/root/assets/{share-preview-page-D7MJNTsV.js → share-preview-page-j2tIceho.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-oDcCqSFK.js +1 -0
- package/dist/gateway/static/root/assets/skill-reload-api-CwBaDY-N.js +1 -0
- package/dist/gateway/static/root/assets/skills-page-CTmhlyZc.js +2 -0
- package/dist/gateway/static/root/assets/{skills-page.utils-Co0GHVOk.js → skills-page.utils-DOvugRyA.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-Cu9GTXm7.js → system-settings-panel-BnYP6VIv.js} +1 -1
- package/dist/gateway/static/root/assets/task-detail-page-A2JXlr_r.js +1 -0
- package/dist/gateway/static/root/assets/{theme-store-DYDrhfnD.js → theme-store-CyYxQYpT.js} +1 -1
- package/dist/gateway/static/root/assets/{tunnel-api-cyxe_LpB.js → tunnel-api-BmDqq1-x.js} +1 -1
- package/dist/gateway/static/root/assets/use-autosave-BzsVGQQM.js +1 -0
- package/dist/gateway/static/root/assets/user-model-page-CkO83New.js +2 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-1e1_bhD3.js → voice-api-key-field-BjOEAtzw.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-Ds0z9O11.js → voice-config-api-BS1ozT6b.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-Ur-4XdYe.js → work-discovery-overlay-CrtXygYb.js} +1 -1
- package/dist/gateway/static/root/assets/workflow-run-setup-panel-Darl4tuN.js +3 -0
- package/dist/gateway/static/root/assets/workflows-page-BTdeeQSn.js +6 -0
- package/dist/gateway/static/root/index.html +11 -11
- package/dist/package.js +1 -1
- package/dist/src/agent/agent-manager.js +4 -4
- package/dist/src/agent/background-review/run-background-review.js +1 -1
- package/dist/src/agent/embedded/model-runtime.js +1 -1
- package/dist/src/agent/embedded/run-for-session.js +1 -1
- package/dist/src/agent/image/tool-model-config.js +1 -1
- package/dist/src/agent/mcp/oauth/mcp-oauth-store.js +1 -1
- package/dist/src/agent/service.js +2 -2
- package/dist/src/agent/session/session-inspector.js +1 -1
- package/dist/src/agent/skills/hub-lock.js +1 -1
- package/dist/src/agent/tasks/task-judge-service.js +3 -3
- package/dist/src/ai-assist/text-assist.js +1 -1
- package/dist/src/auth/credentials.js +2 -2
- package/dist/src/auth/oauth/xopc-cloud.js +1 -1
- package/dist/src/auth/profiles/store.js +1 -1
- package/dist/src/auth/sync-provider-auth.js +2 -2
- package/dist/src/browser/providers/browser-ext-install.js +1 -1
- package/dist/src/cli/commands/doctor/checks/provider-auth.js +1 -1
- package/dist/src/cli/commands/gateway/lifecycle.js +1 -1
- package/dist/src/cli/commands/models.js +1 -1
- package/dist/src/cli/commands/onboard.js +1 -1
- package/dist/src/cli/utils/init-workspace-core.js +7 -15
- package/dist/src/config/index.js +4 -4
- package/dist/src/config/loader.js +3 -5
- package/dist/src/config/models-json.js +1 -1
- package/dist/src/extensions/lockfile.js +1 -1
- package/dist/src/gateway/agents-admin.js +1 -1
- package/dist/src/gateway/file-path-classifier.js +1 -1
- package/dist/src/gateway/global-defaults-admin.d.ts +1 -0
- package/dist/src/gateway/global-defaults-admin.js +10 -6
- package/dist/src/gateway/hono/lib/config-payload.js +1 -1
- package/dist/src/gateway/hono/routes/connectors.js +1 -1
- package/dist/src/gateway/hono/routes/global-defaults.js +4 -0
- package/dist/src/gateway/hono/routes/models.js +1 -1
- package/dist/src/gateway/hono/routes/workflows.js +2 -2
- package/dist/src/gateway/service/config-coordinator.js +1 -1
- package/dist/src/gateway/service.js +4 -4
- package/dist/src/infra/update-restart.js +1 -1
- package/dist/src/providers/auth-runtime/resolve-auth.js +1 -1
- package/dist/src/providers/index.js +2 -2
- package/dist/src/providers/model-registry.js +1 -1
- package/dist/src/providers/register-runtime-providers.js +1 -1
- package/dist/src/tui/tui-startup-resources.js +1 -1
- package/dist/src/tui/tui.js +2 -2
- package/dist/src/work-discovery/service.js +1 -1
- package/dist/src/workflows/service/workflow-run-service.js +1 -1
- package/package.json +3 -3
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-DGHLpxj_.js +0 -1
- package/dist/gateway/static/root/assets/agents-DDiR9MCE.js +0 -1
- package/dist/gateway/static/root/assets/appearance-settings-Cngeu2w8.js +0 -1
- package/dist/gateway/static/root/assets/apps-page-CXiCvD0B.js +0 -1
- package/dist/gateway/static/root/assets/automations-workspace-CuyEKO6M.js +0 -6
- package/dist/gateway/static/root/assets/browser-automations-page-COsWjB_N.js +0 -3
- package/dist/gateway/static/root/assets/browser-settings-page-D9CfpBLt.js +0 -8
- package/dist/gateway/static/root/assets/capabilities-settings-panel-CEOmYG_f.js +0 -7
- package/dist/gateway/static/root/assets/channels-settings-DS3vq4cr.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-C51TR-Ov.js +0 -2
- package/dist/gateway/static/root/assets/dependency-picker-DGz0raEu.js +0 -1
- package/dist/gateway/static/root/assets/gateway-settings-BrIcafAP.js +0 -1
- package/dist/gateway/static/root/assets/heartbeat-settings-BIqk_r9f.js +0 -1
- package/dist/gateway/static/root/assets/home-page-DQxTTwVp.js +0 -1
- package/dist/gateway/static/root/assets/index-B1zcAf8-.css +0 -2
- package/dist/gateway/static/root/assets/index-DfvY-SO6.js +0 -76
- package/dist/gateway/static/root/assets/local-app-workbench-page-Cl4VINRc.js +0 -2
- package/dist/gateway/static/root/assets/local-apps-page-DNK11iaj.js +0 -1
- package/dist/gateway/static/root/assets/logs-page-Cqy0hmu5.js +0 -2
- package/dist/gateway/static/root/assets/management-settings-LejmrKSf.js +0 -1
- package/dist/gateway/static/root/assets/messages-BeIiRpmk.js +0 -3
- package/dist/gateway/static/root/assets/note-detail-panel-CvFzG1Bp.js +0 -5
- package/dist/gateway/static/root/assets/notes-page-k297u-gH.js +0 -8
- package/dist/gateway/static/root/assets/project-detail-page-CXcG3Su-.js +0 -1
- package/dist/gateway/static/root/assets/projects-page-BaOV7aDd.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-WY2alRLt.js +0 -1
- package/dist/gateway/static/root/assets/runtime-tools-settings-panel-BIrnrKec.js +0 -5
- package/dist/gateway/static/root/assets/sessions-page-CUIrWSsD.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-BOdZicC_.js +0 -1
- package/dist/gateway/static/root/assets/settings-page-layout-BRQNel6r.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-DfUt3_r7.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-BS2kgw-8.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-BrEpq0C1.js +0 -1
- package/dist/gateway/static/root/assets/skills-page-DTFxG_j4.js +0 -2
- package/dist/gateway/static/root/assets/task-detail-page-Dg3NARt6.js +0 -1
- package/dist/gateway/static/root/assets/use-autosave-YQ_35Glb.js +0 -1
- package/dist/gateway/static/root/assets/user-model-page-BZMPfbEY.js +0 -2
- package/dist/gateway/static/root/assets/workflow-run-setup-panel-Bn8Y5Xq4.js +0 -3
- package/dist/gateway/static/root/assets/workflows-page-DCh0jiOu.js +0 -6
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { init_paths, resolveSkillsLockPath } from "../../config/paths.js";
|
|
2
1
|
import { init_write_file_atomic, writeTextAtomicSync } from "../../infra/write-file-atomic.js";
|
|
2
|
+
import { init_paths, resolveSkillsLockPath } from "../../config/paths.js";
|
|
3
3
|
import { existsSync, readFileSync } from "node:fs";
|
|
4
4
|
//#region src/agent/skills/hub-lock.ts
|
|
5
5
|
/**
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
3
|
import { TaskRunRepository } from "../../tasks/task-run-repository.js";
|
|
4
|
+
import { extractAssistantText, getAssistantMessageErrorReason, stripCodeFences } from "../../providers/model-response.js";
|
|
4
5
|
import { getAgentDefaultModelRef, init_schema } from "../../config/schema.js";
|
|
5
|
-
import { resolveEffectiveAgentProfileForSession } from "../../config/agent-profile.js";
|
|
6
6
|
import { getApiKey, init_providers, resolveModel } from "../../providers/index.js";
|
|
7
|
+
import { completeWithResolvedCredentials } from "../../providers/model-call.js";
|
|
8
|
+
import { resolveEffectiveAgentProfileForSession } from "../../config/agent-profile.js";
|
|
7
9
|
import { TaskRepository } from "../../tasks/task-repository.js";
|
|
8
10
|
import { TaskConversationRepository } from "../../tasks/task-conversation-repository.js";
|
|
9
11
|
import { readWorkspaceRevision } from "../coding/workspace-revision.js";
|
|
10
|
-
import { completeWithResolvedCredentials } from "../../providers/model-call.js";
|
|
11
12
|
import { TaskApplicationService } from "../../tasks/task-application-service.js";
|
|
12
|
-
import { extractAssistantText, getAssistantMessageErrorReason, stripCodeFences } from "../../providers/model-response.js";
|
|
13
13
|
//#region src/agent/tasks/task-judge-service.ts
|
|
14
14
|
init_schema();
|
|
15
15
|
init_providers();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
|
+
import { getAssistantMessageErrorReason, stripCodeFences } from "../providers/model-response.js";
|
|
3
4
|
import { getDefaultModelSync, init_providers, resolveModel } from "../providers/index.js";
|
|
4
5
|
import { createExtensionAwareStreamFn } from "../providers/extension-stream-bridge.js";
|
|
5
6
|
import { isLocalModelBaseUrl, resolveModelCallApiKey, resolveModelCallOptions } from "../providers/model-call.js";
|
|
6
|
-
import { getAssistantMessageErrorReason, stripCodeFences } from "../providers/model-response.js";
|
|
7
7
|
//#region src/ai-assist/text-assist.ts
|
|
8
8
|
init_providers();
|
|
9
9
|
init_logger();
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { createLogger } from "../utils/logger/index.js";
|
|
3
3
|
import { init_logger } from "../utils/logger.js";
|
|
4
|
-
import { init_paths, resolveAgentAuthProfilesPath, resolveAuthProfilesPath, resolveCredentialsDir, resolveOAuthPath } from "../config/paths.js";
|
|
5
4
|
import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
|
|
6
|
-
import {
|
|
5
|
+
import { init_paths, resolveAgentAuthProfilesPath, resolveAuthProfilesPath, resolveCredentialsDir, resolveOAuthPath } from "../config/paths.js";
|
|
7
6
|
import { getApiKeyFromEnv, init_env_keys } from "../providers/env-keys.js";
|
|
7
|
+
import { getOAuthProviderDefinition, init_registry } from "./oauth/registry.js";
|
|
8
8
|
import { init_oauth_provider_lock, withOAuthProviderLock } from "./oauth-provider-lock.js";
|
|
9
9
|
import { dirname, join } from "path";
|
|
10
10
|
import { mkdir, readFile, readdir, rm } from "fs/promises";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __esmMin } from "../../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { init_resolution, resolveConnectedPlatformEndpoint } from "../../platform/resolution.js";
|
|
3
2
|
import { generatePKCE, init_pkce } from "./pkce.js";
|
|
3
|
+
import { init_resolution, resolveConnectedPlatformEndpoint } from "../../platform/resolution.js";
|
|
4
4
|
import { hostname } from "node:os";
|
|
5
5
|
import { randomBytes } from "node:crypto";
|
|
6
6
|
import http from "node:http";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { init_paths, resolveCredentialsDir } from "../../config/paths.js";
|
|
2
1
|
import { init_write_file_atomic, writeTextAtomicSync } from "../../infra/write-file-atomic.js";
|
|
2
|
+
import { init_paths, resolveCredentialsDir } from "../../config/paths.js";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { chmodSync, existsSync, mkdirSync, readFileSync } from "node:fs";
|
|
5
5
|
//#region src/auth/profiles/store.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { getDefaultAgentId, init_resolve_route } from "../routing/resolve-route.js";
|
|
3
2
|
import { init_paths, resolveAgentAuthProfilesPath, resolveAuthProfilesPath, resolveOAuthPath } from "../config/paths.js";
|
|
4
|
-
import { init_loader, loadConfig } from "../config/loader.js";
|
|
5
3
|
import { init_registry, isOAuthOnlyProvider } from "./oauth/registry.js";
|
|
4
|
+
import { init_loader, loadConfig } from "../config/loader.js";
|
|
5
|
+
import { getDefaultAgentId, init_resolve_route } from "../routing/resolve-route.js";
|
|
6
6
|
import { existsSync, readFileSync } from "node:fs";
|
|
7
7
|
//#region src/auth/sync-provider-auth.ts
|
|
8
8
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { PACKAGE_VERSION, init_package_version } from "../../package-version.js";
|
|
2
2
|
import { createLogger } from "../../utils/logger/index.js";
|
|
3
3
|
import { init_logger } from "../../utils/logger.js";
|
|
4
|
-
import { init_paths, resolveBinDir } from "../../config/paths.js";
|
|
5
4
|
import { init_write_file_atomic, writeTextAtomic } from "../../infra/write-file-atomic.js";
|
|
5
|
+
import { init_paths, resolveBinDir } from "../../config/paths.js";
|
|
6
6
|
import { assertCacheDir } from "../cache-dir-policy.js";
|
|
7
7
|
import { resolvePackageRoot } from "../../infra/update-check.js";
|
|
8
8
|
import { dirname, join } from "node:path";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getAgentDefaultModelRef, init_schema, parseModelRef } from "../../../../config/schema.js";
|
|
2
|
-
import { init_loader, loadConfig } from "../../../../config/loader.js";
|
|
3
2
|
import { PROVIDER_ENV_MAP, getApiKeyFromEnv, init_env_keys } from "../../../../providers/env-keys.js";
|
|
3
|
+
import { init_loader, loadConfig } from "../../../../config/loader.js";
|
|
4
4
|
import { existsSync } from "node:fs";
|
|
5
5
|
//#region src/cli/commands/doctor/checks/provider-auth.ts
|
|
6
6
|
init_loader();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { init_paths, resolveConfigPath } from "../../../config/paths.js";
|
|
2
2
|
import { loadConfig } from "../../../config/loader.js";
|
|
3
3
|
import "../../../config/index.js";
|
|
4
|
-
import { isRestartEnabled } from "../../../config/commands.flags.js";
|
|
5
4
|
import { resolveGatewayService } from "../../../daemon/service.js";
|
|
5
|
+
import { isRestartEnabled } from "../../../config/commands.flags.js";
|
|
6
6
|
import { authorizeGatewaySigusr1Restart, writeGatewayRestartIntentSync } from "../../../infra/restart.js";
|
|
7
7
|
import { findVerifiedGatewayListenerPidsOnPortSync, formatGatewayPidList, signalVerifiedGatewayPidSync } from "../../../infra/gateway-processes.js";
|
|
8
8
|
import { runServiceRestart, runServiceStop } from "./lifecycle-core.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getAgentDefaultModelRef, init_schema } from "../../config/schema.js";
|
|
2
|
-
import { loadConfig, saveConfig } from "../../config/loader.js";
|
|
3
2
|
import { CredentialResolver, init_credentials } from "../../auth/credentials.js";
|
|
3
|
+
import { loadConfig, saveConfig } from "../../config/loader.js";
|
|
4
4
|
import { getAllModels, getAvailableModels, getConfiguredProviders, getProviderAuthState, getProviderDisplayName, init_providers, isProviderConfigured, providerSupportsApiKey, providerSupportsOAuth, resolveModel } from "../../providers/index.js";
|
|
5
5
|
import { formatExamples, register } from "../registry.js";
|
|
6
6
|
import { getContextWithOpts } from "../context.js";
|
|
@@ -4,8 +4,8 @@ import { saveConfig } from "../../config/loader.js";
|
|
|
4
4
|
import { resolveGatewayLocalClientHost } from "../../config/gateway-bind.js";
|
|
5
5
|
import { formatExamples, register } from "../registry.js";
|
|
6
6
|
import "../../config/index.js";
|
|
7
|
-
import { provisionEagerRuntimes } from "../../runtime-tools/bootstrap.js";
|
|
8
7
|
import { colors } from "../utils/colors.js";
|
|
8
|
+
import { provisionEagerRuntimes } from "../../runtime-tools/bootstrap.js";
|
|
9
9
|
import { initWorkspace } from "../utils/init-workspace.js";
|
|
10
10
|
import { setupModel } from "./onboard/model.js";
|
|
11
11
|
import { getChannelConfigurators } from "./onboard/channels/registry.js";
|
|
@@ -16,15 +16,11 @@ async function serializeConfig(cfg, assertChannelPlugins) {
|
|
|
16
16
|
await assertChannelPluginsIfNeeded(validated, assertChannelPlugins);
|
|
17
17
|
return JSON.stringify(validated, null, 2);
|
|
18
18
|
}
|
|
19
|
-
async function
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
return cfg;
|
|
25
|
-
} catch {
|
|
26
|
-
return null;
|
|
27
|
-
}
|
|
19
|
+
async function readDiskConfig(configPath, assertChannelPlugins) {
|
|
20
|
+
const raw = readFileSync(configPath, "utf-8");
|
|
21
|
+
const cfg = ConfigSchema.parse(JSON.parse(raw));
|
|
22
|
+
await assertChannelPluginsIfNeeded(cfg, assertChannelPlugins);
|
|
23
|
+
return cfg;
|
|
28
24
|
}
|
|
29
25
|
/**
|
|
30
26
|
* Workspace + config initialisation without importing bundled channel plugins.
|
|
@@ -40,7 +36,7 @@ async function initWorkspaceCore(options) {
|
|
|
40
36
|
if (configExisted) runBootstrapMigrationsSync(configPath, { stateDir: dirname(configPath) });
|
|
41
37
|
const workspaceExisted = existsSync(workspacePath);
|
|
42
38
|
let config;
|
|
43
|
-
if (configExisted) config = await
|
|
39
|
+
if (configExisted) config = await readDiskConfig(configPath, assertChannelPlugins);
|
|
44
40
|
else {
|
|
45
41
|
config = ConfigSchema.parse(void 0);
|
|
46
42
|
await assertChannelPluginsIfNeeded(config, assertChannelPlugins);
|
|
@@ -75,11 +71,7 @@ async function initWorkspaceCore(options) {
|
|
|
75
71
|
const nextFinal = ConfigSchema.parse(starterResult.config);
|
|
76
72
|
await assertChannelPluginsIfNeeded(nextFinal, assertChannelPlugins);
|
|
77
73
|
let needsWrite = configCreated || starterResult.changed;
|
|
78
|
-
if (!needsWrite)
|
|
79
|
-
const disk = await tryReadDiskConfig(configPath, assertChannelPlugins);
|
|
80
|
-
if (!disk) needsWrite = true;
|
|
81
|
-
else needsWrite = await serializeConfig(disk, assertChannelPlugins) !== await serializeConfig(nextFinal, assertChannelPlugins);
|
|
82
|
-
}
|
|
74
|
+
if (!needsWrite) needsWrite = await serializeConfig(await readDiskConfig(configPath, assertChannelPlugins), assertChannelPlugins) !== await serializeConfig(nextFinal, assertChannelPlugins);
|
|
83
75
|
if (needsWrite) if (assertChannelPlugins) await saveConfig(nextFinal, configPath);
|
|
84
76
|
else writeFileSync(configPath, `${JSON.stringify(nextFinal, null, 2)}\n`, "utf8");
|
|
85
77
|
return {
|
package/dist/src/config/index.js
CHANGED
|
@@ -2,15 +2,15 @@ import { ENV_VARS, XOPC_DB_FILENAME, resolveHomeDir, resolveStateDir, resolveXop
|
|
|
2
2
|
import { TelegramAccountConfigSchema, TelegramConfigSchema, TelegramGroupConfigSchema, TelegramTopicConfigSchema } from "../../extensions/telegram/src/config-schema.js";
|
|
3
3
|
import { WeixinAccountConfigSchema, WeixinConfigSchema } from "../../extensions/weixin/src/config-schema.js";
|
|
4
4
|
import { AgentImageGenerationModelSchema, AgentModelRefSchema, AgentModelsSchema, AgentsConfigSchema, BindingMatchSchema, BindingRuleSchema, BindingsConfigSchema, BrowserConfigSchema, ChannelsConfigSchema, CommandsConfigSchema, ConfigSchema, ConnectorsConfigSchema, ExperimentalConfigSchema, ExtensionSecurityConfigSchema, ExtensionSlotsConfigSchema, ExtensionsConfigSchema, GatewayAuthRateLimitSchema, GatewayAuthSchema, GatewayBindModeSchema, GatewayChannelConnectDeferModeSchema, GatewayConfigSchema, GatewayModeSchema, GatewayRemoteSchema, GatewaySecuritySchema, GatewayTailscaleConsentSchema, GatewayTailscaleSchema, GatewayTlsSchema, GatewayTrustedProxySchema, GatewayWebchatConfigSchema, HeartbeatConfigSchema, McpConfigSchema, McpOAuthConfigSchema, McpServerSchema, MediaUnderstandingCapabilitiesSchema, MediaUnderstandingModelSchema, MessagesConfigSchema, ModelCatalogConfigSchema, ModelsDevConfigSchema, ProviderAuthConfigSchema, ProviderAzureConfigSchema, ProviderRequestOverridesSchema, ProvidersConfigSchema, RuntimeToolsConfigSchema, STTConfigSchema, STTFallbackConfigSchema, STTProviderConfigSchema, SearchProviderEntrySchema, SessionConfigSchema, SessionDmScopeSchema, SessionResetByTypeSchema, SessionResetConfigSchema, SessionResetModeSchema, SessionScopeSchema, SessionStorageConfigSchema, TTSConfigSchema, TTSEdgeConfigSchema, TTSFallbackConfigSchema, TTSModelOverridesConfigSchema, TTSProviderConfigSchema, TTSSummarizationConfigSchema, ToolsConfigSchema, ToolsMediaAudioConfigSchema, ToolsMediaConfigSchema, TuiConfigSchema, TunnelConfigSchema, TunnelConsentSchema, UpdateAutoConfigSchema, UpdateConfigSchema, VoiceConfigSchema, VoiceRefinementConfigSchema, WebSearchConfigSchema, WebToolsConfigSchema, WebsiteBlocklistSchema, WorkspaceConfigSchema, WorkspaceImportConfigSchema, getAgentDefaultImageGenerationModelConfig, getAgentDefaultImageModelConfig, getAgentDefaultModelRef, init_schema, parseModelRef } from "./schema.js";
|
|
5
|
-
import {
|
|
5
|
+
import { clearConfigValueCache, getAllowedCommands, getCacheStats, init_resolve_config_value, resolveConfigValue, resolveHeaders, testApiKeyResolution } from "./resolve-config-value.js";
|
|
6
6
|
import { expandWorkspacePathString, init_workspace_path, normalizeWorkspaceDir, resolveWorkspaceRoot } from "./workspace-path.js";
|
|
7
7
|
import { resolveDefaultAgentWorkspaceDir } from "./workspace-defaults.js";
|
|
8
8
|
import { resolveAgentDir as resolveAgentDir$1, resolveAgentHomeDir as resolveAgentHomeDir$1, resolveAgentWorkspaceDir } from "../agent/agent-scope.js";
|
|
9
|
-
import { extractProfileAgentId, resolveEffectiveAgentConfigForAgent, resolveEffectiveAgentConfigForSession, resolveEffectiveAgentProfile, resolveEffectiveAgentProfileForSession } from "./agent-profile.js";
|
|
10
9
|
import { FILENAMES, WORKSPACE_FILES, existsSync, hasBundledExtensionManifest, init_paths, resolveAgentAuthProfilesPath, resolveAgentDir, resolveAgentHomeDir, resolveAgentProfileDir, resolveAgentProfileMarkdownPath, resolveAuthProfilesPath, resolveBinDir, resolveBundledExtensionsDir, resolveBundledSkillsDir, resolveConfigPath, resolveCredentialsDir, resolveExtensionSdkPath, resolveExtensionsDir, resolveExtensionsLockPath, resolveInboxDir, resolveInboxMessagePath, resolveInboxPendingDir, resolveInboxProcessedDir, resolveLogPath, resolveLogsDir, resolveMcpOAuthPath, resolveModelsJsonPath, resolveNodeBinDir, resolveNodeBinPath, resolveNodeToolsDir, resolveNpmBinPath, resolveOAuthPath, resolvePidPath, resolveSkillPath, resolveSkillsCachePath, resolveSkillsDir, resolveSkillsLockPath, resolveSocketPath, resolveStatusPath, resolveToolsDir, resolveWorkspaceExtensionsDir, resolveWorkspaceFile, resolveWorkspaceStateDir, resolveWorkspaceStatePath, resolveXopcBinPath } from "./paths.js";
|
|
11
|
-
import { init_loader, loadConfig, saveConfig } from "./loader.js";
|
|
12
|
-
import { clearConfigValueCache, getAllowedCommands, getCacheStats, init_resolve_config_value, resolveConfigValue, resolveHeaders, testApiKeyResolution } from "./resolve-config-value.js";
|
|
13
10
|
import { CustomModelSchema, ImageGenerationCapabilitiesSchema, ImageGenerationModelSchema, ImageGenerationProviderSchema, ModelOverrideSchema, ModelsJsonSchema, OpenAICompatSchema, OpenAICompletionsCompatSchema, OpenAIResponsesCompatSchema, OpenRouterRoutingSchema, ProviderConfigSchema, VercelGatewayRoutingSchema, getDefaultModelValues, init_models_json, loadModelsJson, modelsJsonExists, saveModelsJson, validateModelsConfig } from "./models-json.js";
|
|
11
|
+
import { init_loader, loadConfig, saveConfig } from "./loader.js";
|
|
12
|
+
import { applyConfigOverrides, getConfigOverrides, resetConfigOverrides, setConfigOverride, unsetConfigOverride } from "./runtime-overrides.js";
|
|
13
|
+
import { extractProfileAgentId, resolveEffectiveAgentConfigForAgent, resolveEffectiveAgentConfigForSession, resolveEffectiveAgentProfile, resolveEffectiveAgentProfileForSession } from "./agent-profile.js";
|
|
14
14
|
import { canonicalizeConfiguredMcpServer, isKnownCliMcpTypeAlias, normalizeConfiguredMcpServers, resolveXopcMcpTransportAlias } from "./mcp-config-normalize.js";
|
|
15
15
|
import { formatThinkingLevels, listThinkingLevels, normalizeElevatedMode, normalizeReasoningLevel, normalizeThinkLevel, normalizeVerboseLevel, thinkLevelToNumber } from "../agent/transcript/thinking-types.js";
|
|
16
16
|
import { getWorkspacePath } from "./workspace-path-helpers.js";
|
|
@@ -2,10 +2,10 @@ import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
|
2
2
|
import { createLogger } from "../utils/logger/index.js";
|
|
3
3
|
import { init_logger } from "../utils/logger.js";
|
|
4
4
|
import { ConfigSchema, init_schema } from "./schema.js";
|
|
5
|
-
import { init_paths, resolveConfigPath } from "./paths.js";
|
|
6
5
|
import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
|
|
7
|
-
import {
|
|
6
|
+
import { init_paths, resolveConfigPath } from "./paths.js";
|
|
8
7
|
import { init_resolution, setActivePlatformDiscovery } from "../platform/resolution.js";
|
|
8
|
+
import { assertChannelPluginConfigs, init_validate_channel_configs } from "./validate-channel-configs.js";
|
|
9
9
|
import { dirname } from "path";
|
|
10
10
|
import { existsSync, mkdirSync, promises, readFileSync } from "fs";
|
|
11
11
|
import { config } from "dotenv";
|
|
@@ -50,9 +50,7 @@ function loadConfig(configPath) {
|
|
|
50
50
|
err: error,
|
|
51
51
|
path
|
|
52
52
|
}, `Failed to load config`);
|
|
53
|
-
|
|
54
|
-
assertChannelPluginConfigs(cfg);
|
|
55
|
-
return activateConfig(cfg);
|
|
53
|
+
throw error;
|
|
56
54
|
}
|
|
57
55
|
const cfg = ConfigSchema.parse(void 0);
|
|
58
56
|
assertChannelPluginConfigs(cfg);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { init_paths, resolveModelsJsonPath } from "./paths.js";
|
|
3
2
|
import { init_write_file_atomic, writeTextAtomicSync } from "../infra/write-file-atomic.js";
|
|
3
|
+
import { init_paths, resolveModelsJsonPath } from "./paths.js";
|
|
4
4
|
import { existsSync, readFileSync } from "fs";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
//#region src/config/models-json.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
|
-
import { init_paths, resolveExtensionsDir, resolveExtensionsLockPath } from "../config/paths.js";
|
|
4
3
|
import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
|
|
4
|
+
import { init_paths, resolveExtensionsDir, resolveExtensionsLockPath } from "../config/paths.js";
|
|
5
5
|
import { dirname, join } from "path";
|
|
6
6
|
import { existsSync } from "fs";
|
|
7
7
|
import { mkdir, readFile } from "fs/promises";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { init_agent_scope, listAgentEntries, normalizeAgentId, resolveAgentDir, resolveAgentProfileDir, resolveAgentWorkspaceDir, resolveDefaultAgentId, resolveUserPath, validateAgentIdForNewAgent } from "../agent/agent-scope.js";
|
|
2
|
-
import { resolveEffectiveAgentProfile } from "../config/agent-profile.js";
|
|
3
2
|
import { WORKSPACE_FILES, init_paths } from "../config/paths.js";
|
|
3
|
+
import { resolveEffectiveAgentProfile } from "../config/agent-profile.js";
|
|
4
4
|
import { AGENT_PROFILE_MARKDOWN_SYSTEM_FILES, REQUIRED_AGENT_PROFILE_MARKDOWN_FILE_SET } from "../agent/context/workspace.js";
|
|
5
5
|
import { isPathUnderWorkspace, resolveWorkspaceSafePath } from "./workspace-editor-path.js";
|
|
6
6
|
import { seedAgentProfileMarkdownFiles } from "../agent/context/workspace-seed.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { init_paths_state, resolveStateDir } from "../config/paths-state.js";
|
|
2
2
|
import { init_agent_scope, resolveAgentProfileDir } from "../agent/agent-scope.js";
|
|
3
|
-
import { extractProfileAgentId } from "../config/agent-profile.js";
|
|
4
3
|
import { init_paths, resolveConfigPath, resolveSkillsDir } from "../config/paths.js";
|
|
4
|
+
import { extractProfileAgentId } from "../config/agent-profile.js";
|
|
5
5
|
import { isBareProfileMarkdownFileName, resolveProfileMarkdownPathIfBareName } from "../agent/tools/tool-paths.js";
|
|
6
6
|
import { isPathUnderWorkspace, resolveWorkspaceSafePath } from "./workspace-editor-path.js";
|
|
7
7
|
import { basename, isAbsolute, resolve } from "node:path";
|
|
@@ -19,4 +19,5 @@ export type GlobalDefaultsAdminResult<T> = {
|
|
|
19
19
|
export declare function listGlobalDefaults(cfg: Config): GlobalDefaultsPayload;
|
|
20
20
|
export declare function prepareUpdateGlobalDefaults(cfg: Config, body: UpdateGlobalDefaultsBody): GlobalDefaultsAdminResult<{
|
|
21
21
|
nextConfig: Config;
|
|
22
|
+
changed: boolean;
|
|
22
23
|
}>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AgentDefaultsSchema } from "../agent-config/schema.js";
|
|
2
2
|
import { init_agent_config } from "../agent-config/index.js";
|
|
3
3
|
import { GATEWAY_BUILTIN_TOOLS } from "./agent-builtin-tools.js";
|
|
4
|
+
import { isDeepStrictEqual } from "node:util";
|
|
4
5
|
//#region src/gateway/global-defaults-admin.ts
|
|
5
6
|
init_agent_config();
|
|
6
7
|
function listGlobalDefaults(cfg) {
|
|
@@ -21,13 +22,16 @@ function prepareUpdateGlobalDefaults(cfg, body) {
|
|
|
21
22
|
};
|
|
22
23
|
return {
|
|
23
24
|
ok: true,
|
|
24
|
-
data: {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
...cfg
|
|
28
|
-
|
|
25
|
+
data: {
|
|
26
|
+
changed: !isDeepStrictEqual(cfg.agents.defaults, parsed.data),
|
|
27
|
+
nextConfig: {
|
|
28
|
+
...cfg,
|
|
29
|
+
agents: {
|
|
30
|
+
...cfg.agents,
|
|
31
|
+
defaults: parsed.data
|
|
32
|
+
}
|
|
29
33
|
}
|
|
30
|
-
}
|
|
34
|
+
}
|
|
31
35
|
};
|
|
32
36
|
}
|
|
33
37
|
//#endregion
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ContextPlanningConfigSchema, KnowledgeMemoryConfigSchema, UserModelConfigSchema, init_config } from "../../../user-context/config.js";
|
|
2
2
|
import { init_agent_scope, listAgentEntries, normalizeAgentId, resolveDefaultAgentId } from "../../../agent/agent-scope.js";
|
|
3
3
|
import { resolveModelsJsonPath } from "../../../config/paths.js";
|
|
4
|
-
import { buildChannelCatalogForConfig, buildChannelCatalogFromSnapshot, getChannelSetupStatus, init_channel_catalog_service } from "../../../channels/catalog/channel-catalog-service.js";
|
|
5
4
|
import { init_models_json, loadModelsJson } from "../../../config/models-json.js";
|
|
6
5
|
import { CredentialResolver, init_credentials } from "../../../auth/credentials.js";
|
|
6
|
+
import { buildChannelCatalogForConfig, buildChannelCatalogFromSnapshot, getChannelSetupStatus, init_channel_catalog_service } from "../../../channels/catalog/channel-catalog-service.js";
|
|
7
7
|
import { getProviderRegistry, init_plugin_registry } from "../../../providers/plugin-registry.js";
|
|
8
8
|
import { getAllProviders, init_providers, isProviderConfigured } from "../../../providers/index.js";
|
|
9
9
|
import { normalizeConfiguredMcpServers } from "../../../config/mcp-config-normalize.js";
|
|
@@ -15,13 +15,13 @@ import { getConnectorDefinition, listConnectorCatalog } from "../../../connector
|
|
|
15
15
|
import { recordConnectorHealthUsage } from "../../../connectors/usage.js";
|
|
16
16
|
import { getConnectorInstance, getInstalledConnectorDefinition, listConnectorInstances } from "../../../connectors/instances.js";
|
|
17
17
|
import { installConnector, installConnectorDefinition, uninstallConnector, updateConnectorConfig } from "../../../connectors/install.js";
|
|
18
|
-
import { ConfigPersistenceError, persistConfigMutation } from "../../../config/config-mutation.js";
|
|
19
18
|
import { getMcpOAuthManager } from "../../../agent/mcp/oauth/mcp-oauth-manager.js";
|
|
20
19
|
import { startConnectorAuthorization } from "../../../connectors/auth-provider-registry.js";
|
|
21
20
|
import { composioLogoResponse } from "../../../connectors/composio-logo.js";
|
|
22
21
|
import { inspectManagedComposioStatus } from "../../../connectors/composio-managed-client.js";
|
|
23
22
|
import { appendComposioTriggerEvent, listComposioTriggerEvents } from "../../../connectors/composio-triggers.js";
|
|
24
23
|
import { ingestLocalFolderSource } from "../../../connectors/connected-source-ingestion.js";
|
|
24
|
+
import { ConfigPersistenceError, persistConfigMutation } from "../../../config/config-mutation.js";
|
|
25
25
|
import { previewConnectorDefinition, testConnectorInstance } from "../../../connectors/health.js";
|
|
26
26
|
import { listUnderstandingSourceGrants, revokeUnderstandingSourceGrant } from "../../../user-context/sources/repository.js";
|
|
27
27
|
import { setConnectorEnabled } from "../../../connectors/lifecycle.js";
|
|
@@ -40,6 +40,10 @@ function registerGlobalDefaultsRoutes(authenticated, deps) {
|
|
|
40
40
|
ok: false,
|
|
41
41
|
error: { message: prep.error }
|
|
42
42
|
}, prep.status ?? 400);
|
|
43
|
+
if (!prep.data.changed) return c.json({
|
|
44
|
+
ok: true,
|
|
45
|
+
payload: await listGlobalDefaults(service.currentConfig)
|
|
46
|
+
});
|
|
43
47
|
const save = await service.saveConfig(prep.data.nextConfig);
|
|
44
48
|
if (!save.saved) return c.json({
|
|
45
49
|
ok: false,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { resolveModelsJsonPath } from "../../../config/paths.js";
|
|
2
1
|
import { init_resolve_config_value, testApiKeyResolution } from "../../../config/resolve-config-value.js";
|
|
2
|
+
import { resolveModelsJsonPath } from "../../../config/paths.js";
|
|
3
3
|
import { init_models_json, loadModelsJson, saveModelsJson, validateModelsConfig } from "../../../config/models-json.js";
|
|
4
4
|
import { getModelCatalogStore, init_model_catalog_store } from "../../../providers/model-catalog-store.js";
|
|
5
5
|
import { getModelRegistry } from "../../../providers/model-registry.js";
|
|
@@ -7,10 +7,10 @@ import { WorkflowNameConflictError, WorkflowRevisionConflictError, createWorkflo
|
|
|
7
7
|
import "../../../workflows/domain/index.js";
|
|
8
8
|
import { resolveWorkflowRunArtifactsDir } from "../../../workflows/store/paths.js";
|
|
9
9
|
import { WorkflowDraftService } from "../../../workflows/draft/workflow-draft-service.js";
|
|
10
|
-
import "../../../workflows/draft/index.js";
|
|
11
|
-
import { ProjectWorkflowPresetRepository } from "../../../workflows/project-presets/project-workflow-preset-repository.js";
|
|
12
10
|
import { WorkflowDraftConflictError, WorkflowDraftStore } from "../../../workflows/authoring/workflow-draft-store.js";
|
|
13
11
|
import "../../../workflows/authoring/index.js";
|
|
12
|
+
import "../../../workflows/draft/index.js";
|
|
13
|
+
import { ProjectWorkflowPresetRepository } from "../../../workflows/project-presets/project-workflow-preset-repository.js";
|
|
14
14
|
import { basename, join } from "node:path";
|
|
15
15
|
import { readFile, stat } from "node:fs/promises";
|
|
16
16
|
//#region src/gateway/hono/routes/workflows.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
-
import { loadConfig, saveConfig } from "../../config/loader.js";
|
|
4
3
|
import { getModelRegistry } from "../../providers/model-registry.js";
|
|
4
|
+
import { loadConfig, saveConfig } from "../../config/loader.js";
|
|
5
5
|
import { init_providers } from "../../providers/index.js";
|
|
6
6
|
import { disposeAllSessionMcpRuntimes } from "../../agent/mcp/bundle-mcp-runtime.js";
|
|
7
7
|
import { reloadImageGenerationProviders } from "../../agent/image/generation/provider-registry.js";
|
|
@@ -12,16 +12,16 @@ import { getSessionConfig } from "../storage/sqlite/config-repository.js";
|
|
|
12
12
|
import "../storage/sqlite/index.js";
|
|
13
13
|
import { getAgentDefaultModelRef, init_schema } from "../config/schema.js";
|
|
14
14
|
import { init_agent_scope, listAgentEntries, normalizeAgentId, resolveAgentWorkspaceDir, resolveDefaultAgentId } from "../agent/agent-scope.js";
|
|
15
|
-
import { buildSessionKey, init_session_key, sanitizeSegment } from "../routing/session-key.js";
|
|
16
|
-
import { getDefaultAgentId, init_resolve_route } from "../routing/resolve-route.js";
|
|
17
|
-
import { resolveEffectiveAgentProfileForSession } from "../config/agent-profile.js";
|
|
18
15
|
import { init_paths, resolveConfigPath, resolveExtensionsDir } from "../config/paths.js";
|
|
16
|
+
import { prewarmModelRegistry } from "../providers/model-registry.js";
|
|
19
17
|
import { areExtensionsGloballyDisabled } from "../extensions/discover-extensions.js";
|
|
20
18
|
import { buildExtensionMetadataSnapshot } from "../extensions/extension-metadata-snapshot.js";
|
|
21
19
|
import { buildChannelCatalogForConfig, buildChannelCatalogFromSnapshot, init_channel_catalog_service } from "../channels/catalog/channel-catalog-service.js";
|
|
22
20
|
import { loadConfig, saveConfig } from "../config/loader.js";
|
|
23
|
-
import {
|
|
21
|
+
import { buildSessionKey, init_session_key, sanitizeSegment } from "../routing/session-key.js";
|
|
22
|
+
import { getDefaultAgentId, init_resolve_route } from "../routing/resolve-route.js";
|
|
24
23
|
import { init_providers, providers_exports } from "../providers/index.js";
|
|
24
|
+
import { resolveEffectiveAgentProfileForSession } from "../config/agent-profile.js";
|
|
25
25
|
import { TaskRepository } from "../tasks/task-repository.js";
|
|
26
26
|
import { TaskConversationRepository } from "../tasks/task-conversation-repository.js";
|
|
27
27
|
import { getEmbeddedExecutionSession } from "../agent/embedded/execution-context.js";
|
|
@@ -2,8 +2,8 @@ import { createLogger } from "../utils/logger/index.js";
|
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
3
|
import { init_paths, resolveConfigPath } from "../config/paths.js";
|
|
4
4
|
import { init_loader, loadConfig } from "../config/loader.js";
|
|
5
|
-
import { isRestartEnabled } from "../config/commands.flags.js";
|
|
6
5
|
import { resolveGatewayService } from "../daemon/service.js";
|
|
6
|
+
import { isRestartEnabled } from "../config/commands.flags.js";
|
|
7
7
|
import { authorizeGatewaySigusr1Restart, writeGatewayRestartIntentSync } from "./restart.js";
|
|
8
8
|
import { findVerifiedGatewayListenerPidsOnPortSync, signalVerifiedGatewayPidSync } from "./gateway-processes.js";
|
|
9
9
|
import { refreshGatewayServiceAfterUpdate } from "./update-service-refresh.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { init_sync_provider_auth, resolveProviderApiKeyForAgentSync } from "../../auth/sync-provider-auth.js";
|
|
2
1
|
import { getApiKeyFromEnv, init_env_keys } from "../env-keys.js";
|
|
2
|
+
import { init_sync_provider_auth, resolveProviderApiKeyForAgentSync } from "../../auth/sync-provider-auth.js";
|
|
3
3
|
import { getDefaultAuthProfileStore } from "./auth-profile-store.js";
|
|
4
4
|
//#region src/providers/auth-runtime/resolve-auth.ts
|
|
5
5
|
init_env_keys();
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { __esmMin, __exportAll } from "../../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { getAgentDefaultModelRef, init_schema } from "../config/schema.js";
|
|
3
|
-
import { getModelOAuthProviderIds, init_registry } from "../auth/oauth/registry.js";
|
|
4
|
-
import { hasProviderAuthOnDiskSync, init_sync_provider_auth } from "../auth/sync-provider-auth.js";
|
|
5
3
|
import { PROVIDER_ENV_MAP, getApiKeyFromEnv, init_env_keys } from "./env-keys.js";
|
|
6
4
|
import { init_model_ref, splitProviderModelRef } from "./model-ref.js";
|
|
7
5
|
import { ModelRegistry, getModelRegistry, init_model_registry, prewarmModelRegistry, resetModelRegistry } from "./model-registry.js";
|
|
6
|
+
import { getModelOAuthProviderIds, init_registry } from "../auth/oauth/registry.js";
|
|
8
7
|
import { CredentialResolver, hasCredentials, init_credentials } from "../auth/credentials.js";
|
|
8
|
+
import { hasProviderAuthOnDiskSync, init_sync_provider_auth } from "../auth/sync-provider-auth.js";
|
|
9
9
|
import { EXTENSION_PROVIDER_BASE_URL, init_constants } from "./constants.js";
|
|
10
10
|
import { applyOfficialModelMetadataCorrections, getSupplementalModels, init_model_supplements } from "./model-supplements.js";
|
|
11
11
|
import { getProviderRegistry, init_plugin_registry } from "./plugin-registry.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { createLogger } from "../utils/logger/index.js";
|
|
3
3
|
import { init_logger } from "../utils/logger.js";
|
|
4
|
-
import { resolveModelsJsonPath } from "../config/paths.js";
|
|
5
4
|
import { init_resolve_config_value, resolveConfigValue, resolveHeaders } from "../config/resolve-config-value.js";
|
|
5
|
+
import { resolveModelsJsonPath } from "../config/paths.js";
|
|
6
6
|
import { getDefaultModelValues, init_models_json, validateModelsConfig } from "../config/models-json.js";
|
|
7
7
|
import { getApiKeyFromEnv, init_env_keys } from "./env-keys.js";
|
|
8
8
|
import { getModelCatalogStore, init_model_catalog_store } from "./model-catalog-store.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { getOAuthProviderDefinition, init_registry } from "../auth/oauth/registry.js";
|
|
3
2
|
import { getModelCatalogStore, init_model_catalog_store } from "./model-catalog-store.js";
|
|
3
|
+
import { getOAuthProviderDefinition, init_registry } from "../auth/oauth/registry.js";
|
|
4
4
|
import { XOPC_CLOUD_PROVIDER_ID, init_xopc_cloud_config, resolveXopcModelRouterUrl } from "./xopc-cloud-config.js";
|
|
5
5
|
//#region src/providers/register-runtime-providers.ts
|
|
6
6
|
function registerRuntimeProvider(modelRuntime, source) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { resolveStateDir } from "../config/paths-state.js";
|
|
2
|
-
import { resolveEffectiveAgentProfileForSession } from "../config/agent-profile.js";
|
|
3
2
|
import { init_paths, resolveAgentProfileDir, resolveBundledSkillsDir } from "../config/paths.js";
|
|
3
|
+
import { resolveEffectiveAgentProfileForSession } from "../config/agent-profile.js";
|
|
4
4
|
import { resolveBootstrapFilesSync } from "../agent/bootstrap/bootstrap-files.js";
|
|
5
5
|
import { createSkillConfigManager, isSkillEnabled } from "../agent/skills/config.js";
|
|
6
6
|
import { loadSkills } from "../agent/skills/index.js";
|
package/dist/src/tui/tui.js
CHANGED
|
@@ -2,10 +2,10 @@ import { version } from "../../package.js";
|
|
|
2
2
|
import { resolveStateDir, resolveXopcDatabasePath } from "../config/paths-state.js";
|
|
3
3
|
import { parseAgentSessionKey } from "../routing/session-key-utils.js";
|
|
4
4
|
import { init_agent_session_key, normalizeAgentId } from "../routing/agent-session-key.js";
|
|
5
|
-
import { resolveEffectiveAgentProfileForSession } from "../config/agent-profile.js";
|
|
6
5
|
import { init_paths } from "../config/paths.js";
|
|
7
6
|
import { loadConfig } from "../config/loader.js";
|
|
8
7
|
import { getAllModels, getAllProviders, getApiKey, init_providers, isProviderConfiguredSync } from "../providers/index.js";
|
|
8
|
+
import { resolveEffectiveAgentProfileForSession } from "../config/agent-profile.js";
|
|
9
9
|
import { ProjectTrustStore, hasTrustRequiringProjectResources } from "../project-trust/trust-store.js";
|
|
10
10
|
import { renderWorkflowFinalSummary, renderWorkflowPanel } from "../agent/workflow/snapshot.js";
|
|
11
11
|
import { ensureStarterAgentsInitialized } from "../agent/starter-agents.js";
|
|
@@ -14,6 +14,7 @@ import { MAX_WEBCHAT_ATTACHMENT_FILE_BYTES } from "../gateway/chat-limits.js";
|
|
|
14
14
|
import { isTerminalWorkflowRunStatus } from "../workflows/domain/run.js";
|
|
15
15
|
import "../workflows/domain/index.js";
|
|
16
16
|
import { runViewToSnapshot } from "../workflows/service/run-view-to-snapshot.js";
|
|
17
|
+
import { resolveTuiSessionKey, resolveTuiStartupSessionKey } from "../routing/resolve-tui-session-key.js";
|
|
17
18
|
import { applyThemeById, getBashExcludeBorderColor, getBashModeBorderColor, getCustomThemesDir, getThemeExports, getThinkingBorderColor, initTuiTheme, listAvailableThemeIds, resolveThemePalette } from "./theme-manager.js";
|
|
18
19
|
import { editorTheme, theme } from "./theme.js";
|
|
19
20
|
import { extensionForImageMimeType, readClipboardImage } from "./clipboard-image.js";
|
|
@@ -45,7 +46,6 @@ import { installTuiStdioFilter } from "./tui-stdio-filter.js";
|
|
|
45
46
|
import { createEditorSubmitHandler, createSubmitBurstCoalescer, shouldEnableWindowsGitBashPasteFallback } from "./tui-submit.js";
|
|
46
47
|
import { withTuiSuspended } from "./tui-suspend.js";
|
|
47
48
|
import { createInitialState } from "./tui-types.js";
|
|
48
|
-
import { resolveTuiSessionKey, resolveTuiStartupSessionKey } from "../routing/resolve-tui-session-key.js";
|
|
49
49
|
import { EmbeddedBackend } from "./backends/embedded-backend.js";
|
|
50
50
|
import { GatewayRealtimeBackend } from "./backends/gateway-realtime-backend.js";
|
|
51
51
|
import { ChatLog } from "./components/chat-log.js";
|
|
@@ -6,12 +6,12 @@ import { getAgentDefaultModelRef, init_schema } from "../config/schema.js";
|
|
|
6
6
|
import { buildSessionKey, init_session_key } from "../routing/session-key.js";
|
|
7
7
|
import { getDefaultAgentId, init_resolve_route } from "../routing/resolve-route.js";
|
|
8
8
|
import { init_providers, resolveModel } from "../providers/index.js";
|
|
9
|
+
import { isLocalModelBaseUrl } from "../providers/model-call.js";
|
|
9
10
|
import { writeKnowledgeItem } from "../knowledge-memory/repository.js";
|
|
10
11
|
import "../knowledge-memory/index.js";
|
|
11
12
|
import { createPriorityWindow, createUserGoal } from "../user-model/goals.js";
|
|
12
13
|
import { getAssertionSlot, getUserAssertion, linkAssertionEvidence, reconcileAssertion, setAssertionStatus } from "../user-model/repository.js";
|
|
13
14
|
import "../user-model/index.js";
|
|
14
|
-
import { isLocalModelBaseUrl } from "../providers/model-call.js";
|
|
15
15
|
import { allowsRemoteSourceProcessing } from "../user-context/sources/processing-policy.js";
|
|
16
16
|
import { analyzeUnderstandingSources, analyzeWorkContext, workDiscoveryResultMarkdown } from "./analyzer.js";
|
|
17
17
|
import { createUnderstandingSourceRun, getUnderstandingSourceRun, updateUnderstandingSourceGrantCheckpoint, updateUnderstandingSourceGrantPolicies, updateUnderstandingSourceRun, upsertUnderstandingSourceGrant } from "../user-context/sources/repository.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TaskRunRepository } from "../../tasks/task-run-repository.js";
|
|
2
2
|
import { getDefaultAgentId, init_resolve_route } from "../../routing/resolve-route.js";
|
|
3
|
-
import { extractProfileAgentId, resolveEffectiveAgentProfileForSession } from "../../config/agent-profile.js";
|
|
4
3
|
import { init_providers, resolveModel } from "../../providers/index.js";
|
|
4
|
+
import { extractProfileAgentId, resolveEffectiveAgentProfileForSession } from "../../config/agent-profile.js";
|
|
5
5
|
import { TaskRepository } from "../../tasks/task-repository.js";
|
|
6
6
|
import { TaskConversationRepository } from "../../tasks/task-conversation-repository.js";
|
|
7
7
|
import { getProjectWorkspacePathForSession } from "../../projects/workspace.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xopcai/xopc",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.260",
|
|
4
4
|
"description": "Local-first personal AI assistant with reviewable user understanding, durable tasks, workflows, automations, and local or cloud models.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
@@ -163,10 +163,10 @@
|
|
|
163
163
|
"vitest": "4.1.5",
|
|
164
164
|
"vue": "^3.5.35",
|
|
165
165
|
"@xopcai/browser-control-contract": "0.1.0",
|
|
166
|
-
"@xopcai/
|
|
166
|
+
"@xopcai/endpoint-tools-protocol": "0.0.0",
|
|
167
167
|
"@xopcai/realtime-client": "0.0.0",
|
|
168
168
|
"@xopcai/realtime-protocol": "0.0.0",
|
|
169
|
-
"@xopcai/
|
|
169
|
+
"@xopcai/gateway-contract": "0.0.0"
|
|
170
170
|
},
|
|
171
171
|
"scripts": {
|
|
172
172
|
"assets:brand": "node scripts/generate-brand-assets.mjs",
|