@xopcai/xopc 0.0.400 → 0.0.402
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-B7GhbbJl.js → agent-avatar-dicebear-DF_bLVLU.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-defaults-settings-panel-Bu_K45Ek.js → agent-defaults-settings-panel-CB96Cbva.js} +1 -1
- package/dist/gateway/static/root/assets/{agents-ChQ0rVqM.js → agents-C97HREhT.js} +3 -3
- package/dist/gateway/static/root/assets/{app-management-settings-panel-DXe_yRwn.js → app-management-settings-panel-Cr_dcDOi.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-BzHQv_NH.js → appearance-settings-C5TsJu_t.js} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-DRwxXHjg.js → apps-page-erjVBKui.js} +1 -1
- package/dist/gateway/static/root/assets/{archive-plugin-D4OpAzgH.js → archive-plugin-CpsVjh9E.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-CvoN7NI-.js → automations-page-Db1YnE2r.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-workspace-KgjR_a8V.js → automations-workspace-iTSZBSZf.js} +1 -1
- package/dist/gateway/static/root/assets/{binary-plugins-BQ51byO-.js → binary-plugins-DYdnW_Fa.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-CuaGcDNj.js → block-editor-HZ37eyhY.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automation-inputs-BEj3E3Wg.js → browser-automation-inputs-B-V9Vc6B.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automations-page-bf2wLb_U.js → browser-automations-page-D0lBDbJO.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-settings-page-B3B4j-fo.js → browser-settings-page-DIbXx7Ux.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-page-CrMVZkHU.js → capabilities-page-DEZJFRU_.js} +2 -2
- package/dist/gateway/static/root/assets/{capabilities-settings-panel-brKKbjb1.js → capabilities-settings-panel-BfdoIjPK.js} +1 -1
- package/dist/gateway/static/root/assets/{capability-header-actions-DrOc-yzD.js → capability-header-actions-BBPBfpGd.js} +1 -1
- package/dist/gateway/static/root/assets/{channels-DwL_FBhH.js → channels-CapZyaWK.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-terminal-dock-DmNnS6TM.js → chat-terminal-dock-DQWv9Smb.js} +1 -1
- package/dist/gateway/static/root/assets/{computer-settings-page-CzgZGc6E.js → computer-settings-page-CyPqxL6X.js} +1 -1
- package/dist/gateway/static/root/assets/{connector-service-page-BIfX9zNS.js → connector-service-page-DmCt-Kgx.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-page-e7r6aMEp.js → connectors-page-3xUE-PGt.js} +1 -1
- package/dist/gateway/static/root/assets/{date-picker-CbrbJS2K.js → date-picker-aOgNPu_Y.js} +1 -1
- package/dist/gateway/static/root/assets/{dependency-picker-58ZbwNby.js → dependency-picker-oALjIlhN.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-DwZJ9V8G.js → desktop-pet-pp9_jT3M.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-miynV1MT.js → desktop-pet-settings-BZCCh5T4.js} +1 -1
- package/dist/gateway/static/root/assets/{device-pairing-wizard-CcOeWnx0.js → device-pairing-wizard-DpKzQlqA.js} +1 -1
- package/dist/gateway/static/root/assets/{directory-picker-path-field-6MGZG98P.js → directory-picker-path-field-LSNVNUaG.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-Dp_IJP6-.js → extension-debug-page-Bvy_tPme.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-pWuoYmVL.js → extension-page-D3J8-8AM.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-SJ4T9oXh.js → extension-settings-page-F6KLsxCY.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-settings-Ds5gFBVs.js → gateway-settings-_YecsQF1.js} +1 -1
- package/dist/gateway/static/root/assets/{highlighted-body-KQOG7T2V-ChdUhMyZ.js → highlighted-body-KQOG7T2V-BCCIvIlA.js} +1 -1
- package/dist/gateway/static/root/assets/{home-page-BGjlHbXQ.js → home-page-DUoecphg.js} +1 -1
- package/dist/gateway/static/root/assets/{image-generation-api-xTanSnq4.js → image-generation-api-DjQXmXWa.js} +1 -1
- package/dist/gateway/static/root/assets/{imports-page-DstG_R0Z.js → imports-page-Bg5N_9Vg.js} +1 -1
- package/dist/gateway/static/root/assets/{index-fDaRYOv1.js → index-cmsFpzI8.js} +8 -8
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-CtSA2o-v.js → keyboard-shortcuts-settings-BxH3LBLL.js} +1 -1
- package/dist/gateway/static/root/assets/{local-app-workbench-page-Bjy2vPj-.js → local-app-workbench-page-C7RejhJl.js} +1 -1
- package/dist/gateway/static/root/assets/{local-apps-page-BDApBgtY.js → local-apps-page-CsTZ1d01.js} +1 -1
- package/dist/gateway/static/root/assets/{logs-page-DePchbyj.js → logs-page-uLju0b0e.js} +1 -1
- package/dist/gateway/static/root/assets/{management-settings-CfnxE6K5.js → management-settings-BkTmllrn.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-Bai9Og3V.js → media-plugins-CGq_o7tI.js} +1 -1
- package/dist/gateway/static/root/assets/mermaid-MCJ5UELQ-DdlL1T6J.js +1 -0
- package/dist/gateway/static/root/assets/{note-detail-panel-D9IfcVdl.js → note-detail-panel-Cps8VMV6.js} +3 -3
- package/dist/gateway/static/root/assets/{notes-page-KGS9DAHs.js → notes-page-CdmoFpQ9.js} +1 -1
- package/dist/gateway/static/root/assets/{page-context-capture-button-Hwj5mgvr.js → page-context-capture-button-BH9WwSgw.js} +1 -1
- package/dist/gateway/static/root/assets/{personal-page-Bmkhjsrb.js → personal-page-UKNVJRDn.js} +1 -1
- package/dist/gateway/static/root/assets/{plugin-details-dialog-F3p7hZfb.js → plugin-details-dialog-gvBSFAhm.js} +1 -1
- package/dist/gateway/static/root/assets/{plugin-presentation-BTc9eGAc.js → plugin-presentation-C0la7V8t.js} +1 -1
- package/dist/gateway/static/root/assets/{preview-open-alternatives-DAmgAXI9.js → preview-open-alternatives-rJ3l8Ii4.js} +1 -1
- package/dist/gateway/static/root/assets/{product-open-page-Cvujq-at.js → product-open-page-CuzuFyIk.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-content-S1EfBQSH.js → product-preview-content-Dw2DstzN.js} +1 -1
- package/dist/gateway/static/root/assets/{project-detail-page-nbeJjhHu.js → project-detail-page-C0XssfWQ.js} +1 -1
- package/dist/gateway/static/root/assets/{projects-page-DKnFWTzc.js → projects-page-cT6yy_Xk.js} +1 -1
- package/dist/gateway/static/root/assets/{remote-access-hub-DGjIoklN.js → remote-access-hub-CpEq4PU0.js} +1 -1
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-CZHb7XN3.js → runtime-tools-settings-panel-CNar1-_V.js} +1 -1
- package/dist/gateway/static/root/assets/{schema-form-P6uo4aTB.js → schema-form-D_cAMxj5.js} +1 -1
- package/dist/gateway/static/root/assets/{sessions-page-B-4njnNj.js → sessions-page-D5qR92KP.js} +1 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-eKqVXNOq.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-h0HhEpiF.js → settings-form-section-DvLxOebb.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-AknPfAp8.js → settings-page-C6Tl6TD4.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-status-panel-BWfAXtFX.js → setup-status-panel-DuN4e4iO.js} +1 -1
- package/dist/gateway/static/root/assets/{share-preview-page-DELcrD4H.js → share-preview-page-BLraXBAe.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-settings-BPuThYz5.js → shares-settings-u2Y5Ljhu.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-api-BZa6K-ss.js → skill-api-BE_i8VdM.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-reload-api-kkS6CsDm.js → skill-reload-api-1xNCuBFH.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page-CgbbAh89.js → skills-page-Clye5gro.js} +1 -1
- package/dist/gateway/static/root/assets/{style-p3jWw92_.js → style-pk3FR76e.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-CnW46J1H.js → system-settings-panel-M550B6Mj.js} +1 -1
- package/dist/gateway/static/root/assets/{task-detail-page-Cse314-c.js → task-detail-page-DqFhFqWu.js} +1 -1
- package/dist/gateway/static/root/assets/{tracing-settings-page-DukbNSbs.js → tracing-settings-page-nXw76P46.js} +1 -1
- package/dist/gateway/static/root/assets/{tunnel-api-CnUDRk-U.js → tunnel-api-CC_TCY7S.js} +1 -1
- package/dist/gateway/static/root/assets/{usage-page-LsoUOpYt.js → usage-page-BZ0t4KYM.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-DmXcbSNm.js → use-autosave-DrxAqqzV.js} +1 -1
- package/dist/gateway/static/root/assets/{user-model-page-CfyppZWW.js → user-model-page-BAQOJoHC.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-api-key-field-BS5WRLuc.js → voice-api-key-field-Bu4paIbu.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-9rVKP_hV.js → work-discovery-overlay-3TAUYZF4.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-qk5NOkwL.js → workflow-run-setup-panel-sgFaaLoB.js} +1 -1
- package/dist/gateway/static/root/assets/{workflows-page--iOSBqMk.js → workflows-page-CxNXNDNc.js} +1 -1
- package/dist/gateway/static/root/assets/{xopc-cloud-account-card-B14g2TWE.js → xopc-cloud-account-card-DMZelX5s.js} +1 -1
- package/dist/gateway/static/root/index.html +1 -1
- package/dist/package.js +1 -1
- package/dist/src/agent/agent-manager.d.ts +1 -0
- package/dist/src/agent/agent-manager.js +8 -4
- package/dist/src/agent/background-review/run-background-review.js +2 -2
- package/dist/src/agent/commands/command-registry.js +1 -1
- package/dist/src/agent/embedded/run-for-session.js +6 -0
- package/dist/src/agent/external-tools/cliProvider.js +2 -2
- package/dist/src/agent/external-tools/composio-provider.js +2 -2
- package/dist/src/agent/external-tools/endpoint-provider.js +2 -2
- package/dist/src/agent/image/tool-model-config.js +1 -1
- package/dist/src/agent/mcp/connection-drafts.js +2 -2
- package/dist/src/agent/mcp/connection-setup.js +1 -1
- package/dist/src/agent/mcp/credential-store-modules.d.ts +5 -0
- package/dist/src/agent/mcp/credential-store-modules.js +13 -0
- package/dist/src/agent/mcp/credential-store.js +2 -3
- package/dist/src/agent/service/process-direct-streaming.js +1 -1
- package/dist/src/agent/service.js +2 -2
- package/dist/src/agent/skills/index.js +1 -1
- package/dist/src/agent/skills/managed-store.js +1 -1
- package/dist/src/agent/skills/skill-manage-ops.js +1 -1
- package/dist/src/agent/skills/skill-manager.js +2 -1
- package/dist/src/agent/skills/skill-sources.js +9 -4
- package/dist/src/agent/tasks/task-judge-service.js +1 -1
- package/dist/src/agent/tools/fetch-text.js +1 -1
- package/dist/src/agent/tools/personal-read-tool.js +1 -1
- package/dist/src/agent/tools/xopc-use-tool.js +2 -2
- package/dist/src/agent-catalog/capabilities.js +2 -2
- package/dist/src/agent-catalog/migrations/legacy-config-cutover.js +1 -1
- package/dist/src/agent-catalog/repository.js +1 -1
- package/dist/src/auth/oauth/xopc-cloud.js +1 -1
- package/dist/src/auth/sync-provider-auth.js +1 -1
- package/dist/src/automations/capabilities/drafts.js +1 -1
- package/dist/src/automations/service/action-executor.js +1 -1
- package/dist/src/bootstrap/application-state.js +1 -1
- package/dist/src/browser/providers/browser-ext-install.js +1 -1
- package/dist/src/capabilities/runtime/dispatcher.js +1 -1
- package/dist/src/capabilities/runtime/product.js +1 -1
- package/dist/src/capabilities/store-connector.js +48 -13
- package/dist/src/chat-commands/agent-edit.js +1 -1
- package/dist/src/chat-commands/builtins/config.js +1 -1
- package/dist/src/chat-commands/context.js +1 -1
- package/dist/src/cli/commands/agent.js +1 -1
- package/dist/src/cli/commands/agents.js +1 -1
- package/dist/src/cli/commands/doctor/checks/provider-auth.js +1 -1
- package/dist/src/cli/commands/extension-agent-plugin.js +2 -2
- package/dist/src/cli/commands/extension-marketplace.js +1 -1
- package/dist/src/cli/commands/gateway/lifecycle.js +1 -1
- package/dist/src/cli/commands/mcp.js +1 -1
- package/dist/src/cli/commands/models.js +1 -1
- package/dist/src/cli/commands/onboard/model.js +2 -2
- package/dist/src/cli/utils/init-workspace-core.js +1 -1
- package/dist/src/config/agent-model-intents.js +1 -1
- package/dist/src/config/agent-profile.js +1 -1
- package/dist/src/config/index.js +2 -2
- package/dist/src/config/loader.js +1 -1
- package/dist/src/config/models-json.js +1 -1
- package/dist/src/config/schema.d.ts +69 -3
- package/dist/src/config/schema.js +13 -8
- package/dist/src/connectors/endpoint-policy.d.ts +7 -0
- package/dist/src/connectors/endpoint-policy.js +14 -0
- package/dist/src/connectors/materialize.js +16 -1
- package/dist/src/connectors/secret-store.js +4 -1
- package/dist/src/connectors/types.d.ts +2 -0
- package/dist/src/execution-environments/local-worktree-manager.js +1 -1
- package/dist/src/extensions/agent-plugins/auth.js +1 -1
- package/dist/src/extensions/agent-plugins/capability-access.d.ts +23 -0
- package/dist/src/extensions/agent-plugins/capability-access.js +101 -0
- package/dist/src/extensions/agent-plugins/cli-authorization.d.ts +1 -0
- package/dist/src/extensions/agent-plugins/cli-authorization.js +2 -2
- package/dist/src/extensions/agent-plugins/credentials.js +1 -1
- package/dist/src/extensions/agent-plugins/inventory.js +1 -1
- package/dist/src/extensions/agent-plugins/mcp-adapter.js +4 -4
- package/dist/src/extensions/agent-plugins/refresh-runtime-access.d.ts +3 -0
- package/dist/src/extensions/agent-plugins/refresh-runtime-access.js +36 -0
- package/dist/src/extensions/agent-plugins/setup-contract.d.ts +1 -0
- package/dist/src/extensions/agent-plugins/setup-contract.js +1 -0
- package/dist/src/extensions/agent-plugins/setup.d.ts +4 -1
- package/dist/src/extensions/agent-plugins/setup.js +71 -38
- package/dist/src/extensions/agent-plugins/skill-catalog.js +2 -2
- package/dist/src/extensions/agent-plugins/source-http-fetch.js +1 -1
- package/dist/src/extensions/agent-plugins/store.d.ts +1 -0
- package/dist/src/extensions/agent-plugins/store.js +9 -2
- package/dist/src/extensions/agent-plugins/user-config.js +1 -1
- package/dist/src/extensions/agent-plugins/validation.js +12 -2
- package/dist/src/extensions/install.js +1 -1
- package/dist/src/extensions/update.js +1 -1
- package/dist/src/gateway/agents-admin.js +2 -2
- package/dist/src/gateway/file-path-classifier.js +1 -1
- package/dist/src/gateway/hono/lib/config-payload.js +1 -1
- package/dist/src/gateway/hono/routes/agent-plugins.js +3 -3
- package/dist/src/gateway/hono/routes/agents.js +1 -1
- package/dist/src/gateway/hono/routes/config-patch/misc.js +5 -5
- package/dist/src/gateway/hono/routes/connectors.js +1 -1
- package/dist/src/gateway/hono/routes/mcp.js +1 -1
- package/dist/src/gateway/hono/routes/memory-learning.js +1 -1
- package/dist/src/gateway/hono/routes/models.js +1 -1
- package/dist/src/gateway/hono/routes/notes.js +2 -2
- package/dist/src/gateway/hono/routes/projects.js +2 -2
- package/dist/src/gateway/hono/routes/session-input-handler.js +1 -1
- package/dist/src/gateway/hono/routes/tasks.js +1 -1
- package/dist/src/gateway/image-generation-setup.js +2 -2
- package/dist/src/gateway/service/config-coordinator.d.ts +23 -1
- package/dist/src/gateway/service/marketplace-service.js +2 -2
- package/dist/src/gateway/service.js +9 -9
- package/dist/src/gateway/session-context-summary.js +1 -1
- package/dist/src/gateway/xopc-cloud-capability-setup.js +1 -1
- package/dist/src/home-intelligence/host.js +2 -2
- package/dist/src/imports/importService.js +1 -1
- package/dist/src/imports/inventory.js +1 -1
- package/dist/src/imports/productImport.js +1 -1
- package/dist/src/infra/update-restart.js +1 -1
- package/dist/src/local-apps/service.js +1 -1
- package/dist/src/memory-learning/source-learning.js +1 -1
- package/dist/src/personal-agent/onboarding.d.ts +1 -1
- package/dist/src/personal-agent/service.js +1 -1
- package/dist/src/process/run-process.js +1 -1
- package/dist/src/providers/model-registry.js +1 -1
- package/dist/src/runtime-tools/archive.js +1 -1
- package/dist/src/tasks/capabilities/read.js +2 -2
- package/dist/src/tasks/capabilities/write.js +1 -1
- package/dist/src/tui/backends/embedded-backend.js +3 -3
- package/dist/src/tui/tui-commands.js +1 -1
- package/dist/src/tui/tui-startup-resources.js +1 -1
- package/dist/src/tui/tui.js +1 -1
- package/dist/src/user-context/access-policy.js +1 -1
- package/dist/src/voice/realtime/memory-context.js +1 -1
- package/dist/src/voice/realtime/persona-context.js +1 -1
- package/dist/src/work-discovery/service.js +1 -1
- package/package.json +5 -5
- package/dist/gateway/static/root/assets/mermaid-MCJ5UELQ-bXnI7rUg.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-DfsiUGi6.js +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { creditDecimal } from "../../../packages/gateway-contract/src/cloud-credits.js";
|
|
2
2
|
import { init_src } from "../../../packages/gateway-contract/src/index.js";
|
|
3
3
|
import { AgentCatalogRepository, init_repository } from "../../agent-catalog/repository.js";
|
|
4
|
-
import { AgentCatalogService } from "../../agent-catalog/service.js";
|
|
5
4
|
import { getAgentDefaultModelRef, init_schema } from "../../config/schema.js";
|
|
6
5
|
import { CredentialResolver, init_credentials } from "../../auth/credentials.js";
|
|
7
6
|
import { getAllModels, getAvailableModels, getConfiguredProviders, getProviderAuthState, getProviderDisplayName, init_providers, isProviderConfigured, providerSupportsApiKey, providerSupportsOAuth, resolveModel } from "../../providers/index.js";
|
|
8
7
|
import { XopcCloudAccountService } from "../../providers/xopc-cloud-account-service.js";
|
|
8
|
+
import { AgentCatalogService } from "../../agent-catalog/service.js";
|
|
9
9
|
import { listImageProviderSpecs } from "../../../packages/image-providers/src/catalog.js";
|
|
10
10
|
import "../../../packages/image-providers/src/index.js";
|
|
11
11
|
import { loadConfig } from "../../config/loader.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { AgentCatalogRepository, init_repository } from "../../../agent-catalog/repository.js";
|
|
2
|
-
import { AgentCatalogService } from "../../../agent-catalog/service.js";
|
|
3
|
-
import { ConfigSchema, getAgentDefaultModelRef, init_schema } from "../../../config/schema.js";
|
|
4
2
|
import { resolveModelsJsonPath } from "../../../config/paths.js";
|
|
3
|
+
import { ConfigSchema, getAgentDefaultModelRef, init_schema } from "../../../config/schema.js";
|
|
5
4
|
import { init_models_json, loadModelsJson, saveModelsJson } from "../../../config/models-json.js";
|
|
6
5
|
import { getApiKeyFromEnv } from "../../../providers/env-keys.js";
|
|
7
6
|
import { getModelRegistry } from "../../../providers/model-registry.js";
|
|
8
7
|
import { CredentialResolver, init_credentials } from "../../../auth/credentials.js";
|
|
9
8
|
import { getAllProviders, getModelsByProvider, getProviderDisplayName, init_providers, providerSupportsApiKey, providerSupportsOAuth } from "../../../providers/index.js";
|
|
9
|
+
import { AgentCatalogService } from "../../../agent-catalog/service.js";
|
|
10
10
|
import { prepareUpdateGlobalDefaults } from "../../../gateway/global-defaults-admin.js";
|
|
11
11
|
import { discoverProviderModels, isProviderApiDiscoverable } from "../../../providers/model-discovery.js";
|
|
12
12
|
import { getXopcCloudCatalogCoordinator } from "../../../providers/xopc-cloud-catalog-coordinator.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AgentCatalogRepository, init_repository } from "../../agent-catalog/repository.js";
|
|
2
|
-
import { AgentCatalogService } from "../../agent-catalog/service.js";
|
|
3
2
|
import { ConfigSchema, init_schema } from "../../config/schema.js";
|
|
3
|
+
import { AgentCatalogService } from "../../agent-catalog/service.js";
|
|
4
4
|
import { assertConfigRewriteSafeForRunningGateway, saveConfig } from "../../config/loader.js";
|
|
5
5
|
import { ensureStarterAgentsInitialized } from "../../agent/starter-agents.js";
|
|
6
6
|
import { bootstrapApplicationStateSync } from "../../bootstrap/application-state.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ModelIntentSchema } from "../agent-config/schema.js";
|
|
2
2
|
import { init_agent_config } from "../agent-config/index.js";
|
|
3
3
|
import { getModelUsageOrigin, init_model_usage } from "../providers/model-usage.js";
|
|
4
|
-
import { resolveEffectiveAgentConfigForAgent } from "./agent-profile.js";
|
|
5
4
|
import { init_schema, parseModelRef } from "./schema.js";
|
|
5
|
+
import { resolveEffectiveAgentConfigForAgent } from "./agent-profile.js";
|
|
6
6
|
//#region src/config/agent-model-intents.ts
|
|
7
7
|
init_model_usage();
|
|
8
8
|
init_agent_config();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { normalizeAgentId } from "../agent-catalog/id.js";
|
|
1
2
|
import { resolveEffectiveAgentConfig } from "../agent-config/resolver.js";
|
|
2
3
|
import { init_agent_config } from "../agent-config/index.js";
|
|
3
|
-
import { normalizeAgentId } from "../agent-catalog/id.js";
|
|
4
4
|
import { AgentCatalogRepository, init_repository } from "../agent-catalog/repository.js";
|
|
5
5
|
import { init_agent_scope, resolveAgentWorkspaceDir } from "../agent/agent-scope.js";
|
|
6
6
|
import { getConversationRouting } from "../storage/sqlite/conversation-repository.js";
|
package/dist/src/config/index.js
CHANGED
|
@@ -2,12 +2,12 @@ import { ENV_VARS, XOPC_DB_FILENAME, resolveHomeDir, resolveStateDir, resolveXop
|
|
|
2
2
|
import { expandWorkspacePathString, init_workspace_path, normalizeWorkspaceDir, resolveWorkspaceRoot } from "./workspace-path.js";
|
|
3
3
|
import { resolveDefaultAgentWorkspaceDir } from "./workspace-defaults.js";
|
|
4
4
|
import { resolveAgentWorkspaceDir } from "../agent/agent-scope.js";
|
|
5
|
-
import {
|
|
5
|
+
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, resolveModelsJsonPath, resolveNodeBinDir, resolveNodeBinPath, resolveNodeToolsDir, resolveNpmBinPath, resolveOAuthPath, resolvePidPath, resolveSkillPath, resolveSkillsCachePath, resolveSkillsDir, resolveSkillsLockPath, resolveSocketPath, resolveStatusPath, resolveToolsDir, resolveWorkspaceExtensionsDir, resolveWorkspaceFile, resolveWorkspaceStateDir, resolveWorkspaceStatePath, resolveXopcBinPath } from "./paths.js";
|
|
6
6
|
import { TelegramAccountConfigSchema, TelegramConfigSchema, TelegramGroupConfigSchema, TelegramTopicConfigSchema } from "../../extensions/telegram/src/config-schema.js";
|
|
7
7
|
import { WeixinAccountConfigSchema, WeixinConfigSchema } from "../../extensions/weixin/src/config-schema.js";
|
|
8
8
|
import { AgentImageGenerationModelSchema, AgentModelRefSchema, AgentModelsSchema, BrowserConfigSchema, ChannelsConfigSchema, CommandsConfigSchema, ConfigSchema, ConnectorsConfigSchema, ExperimentalConfigSchema, ExtensionSecurityConfigSchema, ExtensionSlotsConfigSchema, ExtensionsConfigSchema, GatewayAuthRateLimitSchema, GatewayAuthSchema, GatewayBindModeSchema, GatewayChannelConnectDeferModeSchema, GatewayConfigSchema, GatewayModeSchema, GatewayRemoteSchema, GatewaySecuritySchema, GatewayTailscaleConsentSchema, GatewayTailscaleSchema, GatewayTlsSchema, GatewayTrustedProxySchema, GatewayWebchatConfigSchema, 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, TunnelBrokerUrlSchema, TunnelConfigSchema, TunnelConsentSchema, UpdateAutoConfigSchema, UpdateConfigSchema, VoiceConfigSchema, VoiceRefinementConfigSchema, WebSearchConfigSchema, WebToolsConfigSchema, WebsiteBlocklistSchema, WorkspaceConfigSchema, WorkspaceImportConfigSchema, getAgentDefaultChatModelConfig, getAgentDefaultImageGenerationModelConfig, getAgentDefaultImageModelConfig, getAgentDefaultModelRef, init_schema, parseModelRef } from "./schema.js";
|
|
9
|
+
import { extractProfileAgentId, resolveEffectiveAgentConfigForAgent, resolveEffectiveAgentConfigForSession, resolveEffectiveAgentProfile, resolveEffectiveAgentProfileForSession } from "./agent-profile.js";
|
|
9
10
|
import { clearConfigValueCache, getAllowedCommands, getCacheStats, init_resolve_config_value, resolveConfigValue, resolveHeaders, testApiKeyResolution } from "./resolve-config-value.js";
|
|
10
|
-
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, resolveModelsJsonPath, resolveNodeBinDir, resolveNodeBinPath, resolveNodeToolsDir, resolveNpmBinPath, resolveOAuthPath, resolvePidPath, resolveSkillPath, resolveSkillsCachePath, resolveSkillsDir, resolveSkillsLockPath, resolveSocketPath, resolveStatusPath, resolveToolsDir, resolveWorkspaceExtensionsDir, resolveWorkspaceFile, resolveWorkspaceStateDir, resolveWorkspaceStatePath, resolveXopcBinPath } from "./paths.js";
|
|
11
11
|
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";
|
|
12
12
|
import { getWorkspacePath } from "./workspace-path-helpers.js";
|
|
13
13
|
import { applyConfigOverrides, getConfigOverrides, resetConfigOverrides, setConfigOverride, unsetConfigOverride } from "./runtime-overrides.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
3
|
import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
|
|
4
|
-
import { ConfigSchema, init_schema } from "./schema.js";
|
|
5
4
|
import { init_paths, resolveConfigPath } from "./paths.js";
|
|
5
|
+
import { ConfigSchema, init_schema } from "./schema.js";
|
|
6
6
|
import { init_resolution, setActivePlatformDiscovery } from "../platform/resolution.js";
|
|
7
7
|
import { assertChannelPluginConfigs } from "./validate-channel-configs.js";
|
|
8
8
|
import { isGatewayConfigLockedByAnotherProcessSync } from "../gateway/lock.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { init_write_file_atomic, writeTextAtomicSync } from "../infra/write-file-atomic.js";
|
|
3
|
-
import { ComputerProfileSchema, init_src } from "../../packages/computer-control-contract/src/index.js";
|
|
4
3
|
import { init_paths, resolveModelsJsonPath } from "./paths.js";
|
|
4
|
+
import { ComputerProfileSchema, init_src } from "../../packages/computer-control-contract/src/index.js";
|
|
5
5
|
import { init_model_policy, isComputerModel } from "../computer/model-policy.js";
|
|
6
6
|
import { assertCurrentModelProvider, init_provider_policy } from "../providers/provider-policy.js";
|
|
7
7
|
import { existsSync, readFileSync } from "fs";
|
|
@@ -1173,16 +1173,38 @@ export declare const McpServerSchema: z.ZodObject<{
|
|
|
1173
1173
|
fieldKey: z.ZodString;
|
|
1174
1174
|
prefix: z.ZodOptional<z.ZodString>;
|
|
1175
1175
|
suffix: z.ZodOptional<z.ZodString>;
|
|
1176
|
+
urlPolicy: z.ZodOptional<z.ZodObject<{
|
|
1177
|
+
domains: z.ZodArray<z.ZodString>;
|
|
1178
|
+
pathPrefixes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1179
|
+
encodeValue: z.ZodOptional<z.ZodBoolean>;
|
|
1180
|
+
}, z.core.$strict>>;
|
|
1176
1181
|
}, z.core.$strip>;
|
|
1177
1182
|
}, z.core.$strip>]>>>;
|
|
1178
1183
|
cwd: z.ZodOptional<z.ZodString>;
|
|
1179
|
-
url: z.ZodOptional<z.ZodString
|
|
1184
|
+
url: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
1185
|
+
xopcSecretRef: z.ZodObject<{
|
|
1186
|
+
provider: z.ZodString;
|
|
1187
|
+
fieldKey: z.ZodString;
|
|
1188
|
+
prefix: z.ZodOptional<z.ZodString>;
|
|
1189
|
+
suffix: z.ZodOptional<z.ZodString>;
|
|
1190
|
+
urlPolicy: z.ZodOptional<z.ZodObject<{
|
|
1191
|
+
domains: z.ZodArray<z.ZodString>;
|
|
1192
|
+
pathPrefixes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1193
|
+
encodeValue: z.ZodOptional<z.ZodBoolean>;
|
|
1194
|
+
}, z.core.$strict>>;
|
|
1195
|
+
}, z.core.$strip>;
|
|
1196
|
+
}, z.core.$strip>]>>;
|
|
1180
1197
|
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
1181
1198
|
xopcSecretRef: z.ZodObject<{
|
|
1182
1199
|
provider: z.ZodString;
|
|
1183
1200
|
fieldKey: z.ZodString;
|
|
1184
1201
|
prefix: z.ZodOptional<z.ZodString>;
|
|
1185
1202
|
suffix: z.ZodOptional<z.ZodString>;
|
|
1203
|
+
urlPolicy: z.ZodOptional<z.ZodObject<{
|
|
1204
|
+
domains: z.ZodArray<z.ZodString>;
|
|
1205
|
+
pathPrefixes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1206
|
+
encodeValue: z.ZodOptional<z.ZodBoolean>;
|
|
1207
|
+
}, z.core.$strict>>;
|
|
1186
1208
|
}, z.core.$strip>;
|
|
1187
1209
|
}, z.core.$strip>]>>>;
|
|
1188
1210
|
oauth: z.ZodOptional<z.ZodObject<{
|
|
@@ -1238,16 +1260,38 @@ export declare const McpConfigSchema: z.ZodOptional<z.ZodObject<{
|
|
|
1238
1260
|
fieldKey: z.ZodString;
|
|
1239
1261
|
prefix: z.ZodOptional<z.ZodString>;
|
|
1240
1262
|
suffix: z.ZodOptional<z.ZodString>;
|
|
1263
|
+
urlPolicy: z.ZodOptional<z.ZodObject<{
|
|
1264
|
+
domains: z.ZodArray<z.ZodString>;
|
|
1265
|
+
pathPrefixes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1266
|
+
encodeValue: z.ZodOptional<z.ZodBoolean>;
|
|
1267
|
+
}, z.core.$strict>>;
|
|
1241
1268
|
}, z.core.$strip>;
|
|
1242
1269
|
}, z.core.$strip>]>>>;
|
|
1243
1270
|
cwd: z.ZodOptional<z.ZodString>;
|
|
1244
|
-
url: z.ZodOptional<z.ZodString
|
|
1271
|
+
url: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
1272
|
+
xopcSecretRef: z.ZodObject<{
|
|
1273
|
+
provider: z.ZodString;
|
|
1274
|
+
fieldKey: z.ZodString;
|
|
1275
|
+
prefix: z.ZodOptional<z.ZodString>;
|
|
1276
|
+
suffix: z.ZodOptional<z.ZodString>;
|
|
1277
|
+
urlPolicy: z.ZodOptional<z.ZodObject<{
|
|
1278
|
+
domains: z.ZodArray<z.ZodString>;
|
|
1279
|
+
pathPrefixes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1280
|
+
encodeValue: z.ZodOptional<z.ZodBoolean>;
|
|
1281
|
+
}, z.core.$strict>>;
|
|
1282
|
+
}, z.core.$strip>;
|
|
1283
|
+
}, z.core.$strip>]>>;
|
|
1245
1284
|
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
1246
1285
|
xopcSecretRef: z.ZodObject<{
|
|
1247
1286
|
provider: z.ZodString;
|
|
1248
1287
|
fieldKey: z.ZodString;
|
|
1249
1288
|
prefix: z.ZodOptional<z.ZodString>;
|
|
1250
1289
|
suffix: z.ZodOptional<z.ZodString>;
|
|
1290
|
+
urlPolicy: z.ZodOptional<z.ZodObject<{
|
|
1291
|
+
domains: z.ZodArray<z.ZodString>;
|
|
1292
|
+
pathPrefixes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1293
|
+
encodeValue: z.ZodOptional<z.ZodBoolean>;
|
|
1294
|
+
}, z.core.$strict>>;
|
|
1251
1295
|
}, z.core.$strip>;
|
|
1252
1296
|
}, z.core.$strip>]>>>;
|
|
1253
1297
|
oauth: z.ZodOptional<z.ZodObject<{
|
|
@@ -1895,16 +1939,38 @@ export declare const ConfigSchema: z.ZodDefault<z.ZodObject<{
|
|
|
1895
1939
|
fieldKey: z.ZodString;
|
|
1896
1940
|
prefix: z.ZodOptional<z.ZodString>;
|
|
1897
1941
|
suffix: z.ZodOptional<z.ZodString>;
|
|
1942
|
+
urlPolicy: z.ZodOptional<z.ZodObject<{
|
|
1943
|
+
domains: z.ZodArray<z.ZodString>;
|
|
1944
|
+
pathPrefixes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1945
|
+
encodeValue: z.ZodOptional<z.ZodBoolean>;
|
|
1946
|
+
}, z.core.$strict>>;
|
|
1898
1947
|
}, z.core.$strip>;
|
|
1899
1948
|
}, z.core.$strip>]>>>;
|
|
1900
1949
|
cwd: z.ZodOptional<z.ZodString>;
|
|
1901
|
-
url: z.ZodOptional<z.ZodString
|
|
1950
|
+
url: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
1951
|
+
xopcSecretRef: z.ZodObject<{
|
|
1952
|
+
provider: z.ZodString;
|
|
1953
|
+
fieldKey: z.ZodString;
|
|
1954
|
+
prefix: z.ZodOptional<z.ZodString>;
|
|
1955
|
+
suffix: z.ZodOptional<z.ZodString>;
|
|
1956
|
+
urlPolicy: z.ZodOptional<z.ZodObject<{
|
|
1957
|
+
domains: z.ZodArray<z.ZodString>;
|
|
1958
|
+
pathPrefixes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1959
|
+
encodeValue: z.ZodOptional<z.ZodBoolean>;
|
|
1960
|
+
}, z.core.$strict>>;
|
|
1961
|
+
}, z.core.$strip>;
|
|
1962
|
+
}, z.core.$strip>]>>;
|
|
1902
1963
|
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
1903
1964
|
xopcSecretRef: z.ZodObject<{
|
|
1904
1965
|
provider: z.ZodString;
|
|
1905
1966
|
fieldKey: z.ZodString;
|
|
1906
1967
|
prefix: z.ZodOptional<z.ZodString>;
|
|
1907
1968
|
suffix: z.ZodOptional<z.ZodString>;
|
|
1969
|
+
urlPolicy: z.ZodOptional<z.ZodObject<{
|
|
1970
|
+
domains: z.ZodArray<z.ZodString>;
|
|
1971
|
+
pathPrefixes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1972
|
+
encodeValue: z.ZodOptional<z.ZodBoolean>;
|
|
1973
|
+
}, z.core.$strict>>;
|
|
1908
1974
|
}, z.core.$strip>;
|
|
1909
1975
|
}, z.core.$strip>]>>>;
|
|
1910
1976
|
oauth: z.ZodOptional<z.ZodObject<{
|
|
@@ -3,11 +3,11 @@ import { AgentModelsOverrideSchema, ImageGenerationRouteSchema, ModelRouteSchema
|
|
|
3
3
|
import { resolveEffectiveAgentConfig } from "../agent-config/resolver.js";
|
|
4
4
|
import { init_agent_config } from "../agent-config/index.js";
|
|
5
5
|
import { AgentCatalogRepository, init_repository } from "../agent-catalog/repository.js";
|
|
6
|
-
import { DEFAULT_CONTEXT_COMPACTION_POLICY, UserContextConfigSchema, init_config } from "../user-context/config.js";
|
|
7
6
|
import { getModelUsageOrigin, init_model_usage } from "../providers/model-usage.js";
|
|
8
|
-
import { TracingConfigSchema, init_config
|
|
7
|
+
import { TracingConfigSchema, init_config } from "../observability/config.js";
|
|
9
8
|
import { OutboundProxySchema, init_outbound_proxy } from "./outbound-proxy.js";
|
|
10
|
-
import { ComputerConfigSchema, init_config as init_config$
|
|
9
|
+
import { ComputerConfigSchema, init_config as init_config$1 } from "../computer/config.js";
|
|
10
|
+
import { DEFAULT_CONTEXT_COMPACTION_POLICY, UserContextConfigSchema, init_config as init_config$2 } from "../user-context/config.js";
|
|
11
11
|
import { init_public_url, validatePublicUrl } from "./public-url.js";
|
|
12
12
|
import { PlatformConfigSchema, init_contracts } from "../platform/contracts.js";
|
|
13
13
|
import { deepseekSearchEndpoint, init_deepseek_protocol } from "../agent/tools/search/providers/deepseek-protocol.js";
|
|
@@ -53,12 +53,12 @@ function parseModelRef(ref) {
|
|
|
53
53
|
var AgentModelRefSchema, AgentImageGenerationModelSchema, AgentModelsSchema, BrowserDriverSchema, BrowserHostnameSchema, BrowserConfigSchema, SessionDmScopeSchema, SessionStorageConfigSchema, SessionResetModeSchema, SessionResetConfigSchema, SessionResetByTypeSchema, SessionScopeSchema, SessionConfigSchema, ChannelsConfigSchema, SearchProviderEntrySchema, WebSearchConfigSchema, WebsiteBlocklistSchema, WebToolsConfigSchema, ToolsConfigSchema, RuntimePreferenceSchema, RuntimeProvisionSchema, RuntimeVersionRequestSchema, LanguageRuntimeSchema, DEFAULT_RUNTIME_TOOLS_CONFIG, RuntimeToolsConfigSchema, GatewayAuthRateLimitSchema, GatewaySecuritySchema, GatewayTrustedProxySchema, GatewayAuthSchema, GatewayTailscaleConsentSchema, GatewayTailscaleSchema, GatewayRemoteSchema, GatewayTlsSchema, GatewayModeSchema, GatewayChannelConnectDeferModeSchema, TunnelConsentSchema, TunnelBrokerUrlSchema, TunnelConfigSchema, WorkspaceImportConfigSchema, WorkspaceConfigSchema, GatewayBindModeSchema, GatewayWebchatConfigSchema, GatewayConfigSchema, ModelsDevConfigSchema, ModelCatalogConfigSchema, SttProviderConfigCatchallSchema, STTProviderConfigSchema, STTFallbackConfigSchema, MediaUnderstandingCapabilitiesSchema, MediaUnderstandingModelSchema, STTConfigSchema, TtsProviderConfigCatchallSchema, TTSProviderConfigSchema, TTSFallbackConfigSchema, TTSModelOverridesConfigSchema, TTSEdgeConfigSchema, TTSSummarizationConfigSchema, TTSConfigSchema, VoiceRefinementConfigSchema, VoiceConfigSchema, MessagesConfigSchema, ToolsMediaAudioConfigSchema, ToolsMediaConfigSchema, ProviderAzureConfigSchema, ProviderRequestOverridesSchema, ProviderAuthConfigSchema, ProvidersConfigSchema, ExtensionSecurityConfigSchema, ExtensionSlotsConfigSchema, ExtensionsConfigSchema, UpdateAutoConfigSchema, UpdateConfigSchema, CommandsConfigSchema, McpHttpUrlSchema, ConnectorSecretReferenceSchema, McpConfigScalarSchema, McpExposureSchema, McpOAuthConfigSchema, McpServerSchema, McpConfigSchema, ConnectorsConfigSchema, ExperimentalConfigSchema, ConfigSchema;
|
|
54
54
|
var init_schema = __esmMin((() => {
|
|
55
55
|
init_model_usage();
|
|
56
|
-
init_config
|
|
56
|
+
init_config();
|
|
57
57
|
init_outbound_proxy();
|
|
58
|
-
init_config$
|
|
58
|
+
init_config$1();
|
|
59
59
|
init_agent_config();
|
|
60
60
|
init_repository();
|
|
61
|
-
init_config();
|
|
61
|
+
init_config$2();
|
|
62
62
|
init_public_url();
|
|
63
63
|
init_contracts();
|
|
64
64
|
init_deepseek_protocol();
|
|
@@ -928,7 +928,12 @@ tts: TTSConfigSchema.optional() }).optional();
|
|
|
928
928
|
provider: z.string().min(1),
|
|
929
929
|
fieldKey: z.string().min(1),
|
|
930
930
|
prefix: z.string().optional(),
|
|
931
|
-
suffix: z.string().optional()
|
|
931
|
+
suffix: z.string().optional(),
|
|
932
|
+
urlPolicy: z.object({
|
|
933
|
+
domains: z.array(z.string()).min(1),
|
|
934
|
+
pathPrefixes: z.array(z.string()).optional(),
|
|
935
|
+
encodeValue: z.boolean().optional()
|
|
936
|
+
}).strict().optional()
|
|
932
937
|
}) });
|
|
933
938
|
McpConfigScalarSchema = z.union([z.string(), ConnectorSecretReferenceSchema]);
|
|
934
939
|
McpExposureSchema = z.enum([
|
|
@@ -959,7 +964,7 @@ tts: TTSConfigSchema.optional() }).optional();
|
|
|
959
964
|
args: z.array(z.string()).optional(),
|
|
960
965
|
env: z.record(z.string(), McpConfigScalarSchema).optional(),
|
|
961
966
|
cwd: z.string().optional(),
|
|
962
|
-
url: McpHttpUrlSchema.optional(),
|
|
967
|
+
url: z.union([McpHttpUrlSchema, ConnectorSecretReferenceSchema]).optional(),
|
|
963
968
|
headers: z.record(z.string(), McpConfigScalarSchema).optional(),
|
|
964
969
|
oauth: McpOAuthConfigSchema.optional(),
|
|
965
970
|
auth: z.object({ provider: z.string().min(1) }).strict().optional(),
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type ConnectorEndpointPolicy = {
|
|
2
|
+
domains: string[];
|
|
3
|
+
pathPrefixes?: string[];
|
|
4
|
+
encodeValue?: boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare function validEndpointDomain(domain: string): boolean;
|
|
7
|
+
export declare function assertConnectorEndpoint(value: string, policy: ConnectorEndpointPolicy): string;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { isIP } from "node:net";
|
|
2
|
+
//#region src/connectors/endpoint-policy.ts
|
|
3
|
+
function validEndpointDomain(domain) {
|
|
4
|
+
return /^(?:\*\.)?(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z]{2,}$/i.test(domain) && !domain.endsWith(".localhost") && !domain.endsWith(".local");
|
|
5
|
+
}
|
|
6
|
+
function assertConnectorEndpoint(value, policy) {
|
|
7
|
+
const url = new URL(value);
|
|
8
|
+
const host = url.hostname.toLowerCase();
|
|
9
|
+
if (url.protocol !== "https:" || url.username || url.password || url.hash || isIP(host) || !policy.domains.length || policy.domains.some((domain) => !validEndpointDomain(domain)) || !policy.domains.some((domain) => domain.startsWith("*.") ? host.endsWith(domain.slice(1)) && host !== domain.slice(2) : host === domain.toLowerCase())) throw new Error("Connector endpoint must use HTTPS on a declared provider domain.");
|
|
10
|
+
if (policy.pathPrefixes?.length && !policy.pathPrefixes.some((prefix) => url.pathname === prefix || url.pathname.startsWith(`${prefix.replace(/\/$/, "")}/`))) throw new Error("Connector endpoint is outside the declared MCP path.");
|
|
11
|
+
return value;
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
14
|
+
export { assertConnectorEndpoint, validEndpointDomain };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { McpServerSchema, init_schema } from "../config/schema.js";
|
|
2
|
-
import {
|
|
2
|
+
import { assertConnectorEndpoint } from "./endpoint-policy.js";
|
|
3
|
+
import { createConnectorSecretReference, isConnectorSecretReference } from "./secret-store.js";
|
|
3
4
|
//#region src/connectors/materialize.ts
|
|
4
5
|
init_schema();
|
|
5
6
|
const SERVER_ID_PATTERN = /^[a-z][a-z0-9_-]{0,63}$/;
|
|
@@ -62,6 +63,20 @@ function materializeConnectorMcpServer(definition, input) {
|
|
|
62
63
|
assertValidConnectorServerId(serverId);
|
|
63
64
|
const rawServer = materializeTemplate(definition.runtime.serverTemplate, definition, input);
|
|
64
65
|
if (!rawServer || typeof rawServer !== "object" || Array.isArray(rawServer)) throw new Error("Connector MCP server template must resolve to a JSON object.");
|
|
66
|
+
const remote = rawServer;
|
|
67
|
+
if (isConnectorSecretReference(remote.url)) {
|
|
68
|
+
const templateUrl = definition.runtime.serverTemplate.url;
|
|
69
|
+
if (typeof templateUrl !== "string") throw new Error("Connector endpoint template is missing.");
|
|
70
|
+
const embedded = !TEMPLATE_PATTERN.test(templateUrl);
|
|
71
|
+
const policy = definition.runtime.endpointPolicy ?? { domains: [new URL(templateUrl.replace(EMBEDDED_SECRET_PATTERN, "credential")).hostname] };
|
|
72
|
+
remote.url.xopcSecretRef.urlPolicy = {
|
|
73
|
+
...policy,
|
|
74
|
+
...embedded ? { encodeValue: true } : {}
|
|
75
|
+
};
|
|
76
|
+
const key = remote.url.xopcSecretRef.fieldKey;
|
|
77
|
+
const rawInput = input.secrets?.[key];
|
|
78
|
+
if (typeof rawInput === "string" && !rawInput.startsWith("secret://")) assertConnectorEndpoint(`${remote.url.xopcSecretRef.prefix ?? ""}${embedded ? encodeURIComponent(rawInput) : rawInput}${remote.url.xopcSecretRef.suffix ?? ""}`, policy);
|
|
79
|
+
}
|
|
65
80
|
const marker = {
|
|
66
81
|
managed: true,
|
|
67
82
|
connectorId: definition.id,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CredentialResolver, init_credentials } from "../auth/credentials.js";
|
|
2
2
|
import { consumeConnectorSetupSecretRef } from "./setup-secrets.js";
|
|
3
|
+
import { assertConnectorEndpoint } from "./endpoint-policy.js";
|
|
3
4
|
//#region src/connectors/secret-store.ts
|
|
4
5
|
init_credentials();
|
|
5
6
|
function normalizeSecretSegment(value) {
|
|
@@ -32,7 +33,9 @@ async function saveConnectorSecrets(definition, input, resolver = new Credential
|
|
|
32
33
|
async function resolveSecretReference(reference, resolver) {
|
|
33
34
|
const value = await resolver.resolveApiKey(reference.xopcSecretRef.provider);
|
|
34
35
|
if (!value) return void 0;
|
|
35
|
-
|
|
36
|
+
const policy = reference.xopcSecretRef.urlPolicy;
|
|
37
|
+
const resolved = `${reference.xopcSecretRef.prefix ?? ""}${policy?.encodeValue ? encodeURIComponent(value) : value}${reference.xopcSecretRef.suffix ?? ""}`;
|
|
38
|
+
return policy ? assertConnectorEndpoint(resolved, policy) : resolved;
|
|
36
39
|
}
|
|
37
40
|
async function resolveConnectorSecretReferences(value, resolver = new CredentialResolver()) {
|
|
38
41
|
if (isConnectorSecretReference(value)) return resolveSecretReference(value, resolver);
|
|
@@ -43,6 +43,7 @@ export type ConnectorSecretReference = {
|
|
|
43
43
|
fieldKey: string;
|
|
44
44
|
prefix?: string;
|
|
45
45
|
suffix?: string;
|
|
46
|
+
urlPolicy?: import('./endpoint-policy.js').ConnectorEndpointPolicy;
|
|
46
47
|
};
|
|
47
48
|
};
|
|
48
49
|
export type ConnectorSecretField = {
|
|
@@ -74,6 +75,7 @@ export type ConnectorRuntimeDefinition = {
|
|
|
74
75
|
type: 'mcp';
|
|
75
76
|
serverId: string;
|
|
76
77
|
serverTemplate: Record<string, unknown>;
|
|
78
|
+
endpointPolicy?: import('./endpoint-policy.js').ConnectorEndpointPolicy;
|
|
77
79
|
localPackage?: {
|
|
78
80
|
registry: 'npm';
|
|
79
81
|
name: string;
|
|
@@ -8,8 +8,8 @@ import { assertManagedWorktreePath, assertNoNestedRegisteredWorktrees, readDirec
|
|
|
8
8
|
import { dirname, resolve } from "node:path";
|
|
9
9
|
import { existsSync } from "node:fs";
|
|
10
10
|
import { randomUUID } from "node:crypto";
|
|
11
|
-
import { mkdir, rm, stat } from "node:fs/promises";
|
|
12
11
|
import lockfile from "proper-lockfile";
|
|
12
|
+
import { mkdir, rm, stat } from "node:fs/promises";
|
|
13
13
|
//#region src/execution-environments/local-worktree-manager.ts
|
|
14
14
|
init_logger();
|
|
15
15
|
const log = createLogger("ExecutionEnvironment:LocalWorktree");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { init_paths_state, resolveStateDir } from "../../config/paths-state.js";
|
|
2
2
|
import { init_write_file_atomic, writeTextAtomic, writeTextAtomicSync } from "../../infra/write-file-atomic.js";
|
|
3
|
+
import { pluginName } from "./validation.js";
|
|
3
4
|
import { CredentialResolver, init_credentials } from "../../auth/credentials.js";
|
|
4
5
|
import { isDangerousHostEnvVarName } from "../../infra/host-env-security.js";
|
|
5
|
-
import { pluginName } from "./validation.js";
|
|
6
6
|
import { join } from "node:path";
|
|
7
7
|
import { existsSync, readFileSync } from "node:fs";
|
|
8
8
|
import { createHash } from "node:crypto";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { AgentPluginStore, InstalledAgentPlugin } from './store.js';
|
|
2
|
+
export declare function pluginCapabilityAccess(manifest: InstalledAgentPlugin['manifest']): {
|
|
3
|
+
skills: Record<string, {
|
|
4
|
+
authorizations: (string | {
|
|
5
|
+
id: string;
|
|
6
|
+
scopes: string[];
|
|
7
|
+
})[];
|
|
8
|
+
servers: string[];
|
|
9
|
+
}>;
|
|
10
|
+
mcp: Record<string, {
|
|
11
|
+
authorizations: (string | {
|
|
12
|
+
id: string;
|
|
13
|
+
scopes: string[];
|
|
14
|
+
})[];
|
|
15
|
+
servers: string[];
|
|
16
|
+
}>;
|
|
17
|
+
};
|
|
18
|
+
/** One fail-closed access decision shared by Skill discovery and MCP projection. */
|
|
19
|
+
export declare function resolvePluginCapabilityAccess(plugin: InstalledAgentPlugin, store: AgentPluginStore, now?: number): {
|
|
20
|
+
skill: (_name: string) => boolean;
|
|
21
|
+
server: (_name: string) => boolean;
|
|
22
|
+
};
|
|
23
|
+
export declare function pluginRuntimeAccessKey(store: AgentPluginStore, workspace: string, agentId?: string): string;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { pluginAuthorizations } from "./setup-contract.js";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
//#region src/extensions/agent-plugins/capability-access.ts
|
|
6
|
+
const authorization = z.union([z.string().min(1), z.strictObject({
|
|
7
|
+
id: z.string().min(1),
|
|
8
|
+
scopes: z.array(z.string().min(1)).max(100)
|
|
9
|
+
})]);
|
|
10
|
+
const requirement = z.strictObject({
|
|
11
|
+
authorizations: z.array(authorization).max(20).default([]),
|
|
12
|
+
servers: z.array(z.string().min(1)).max(20).default([])
|
|
13
|
+
});
|
|
14
|
+
const accessSchema = z.strictObject({
|
|
15
|
+
skills: z.record(z.string(), requirement).default({}),
|
|
16
|
+
mcp: z.record(z.string(), requirement).default({})
|
|
17
|
+
});
|
|
18
|
+
function pluginCapabilityAccess(manifest) {
|
|
19
|
+
const extension = manifest.extensions?.["ai.xopc"];
|
|
20
|
+
return accessSchema.parse(extension?.setup?.capabilityAccess ?? {});
|
|
21
|
+
}
|
|
22
|
+
const stateSchema = z.object({
|
|
23
|
+
packageRevision: z.string(),
|
|
24
|
+
state: z.string(),
|
|
25
|
+
installed: z.boolean().optional(),
|
|
26
|
+
resources: z.string(),
|
|
27
|
+
connections: z.array(z.object({
|
|
28
|
+
name: z.string(),
|
|
29
|
+
state: z.string()
|
|
30
|
+
})),
|
|
31
|
+
authorizations: z.array(z.object({
|
|
32
|
+
id: z.string(),
|
|
33
|
+
state: z.string(),
|
|
34
|
+
expiresAt: z.number().finite().optional(),
|
|
35
|
+
issues: z.array(z.object({ scopes: z.array(z.string()).default([]) })).default([])
|
|
36
|
+
})).default([])
|
|
37
|
+
});
|
|
38
|
+
/** One fail-closed access decision shared by Skill discovery and MCP projection. */
|
|
39
|
+
function resolvePluginCapabilityAccess(plugin, store, now = Date.now()) {
|
|
40
|
+
let declarations, access;
|
|
41
|
+
try {
|
|
42
|
+
declarations = pluginAuthorizations(plugin.manifest);
|
|
43
|
+
access = pluginCapabilityAccess(plugin.manifest);
|
|
44
|
+
} catch {
|
|
45
|
+
return {
|
|
46
|
+
skill: (_name) => false,
|
|
47
|
+
server: (_name) => false
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
const path = join(store.stateDir, "plugin-setup", `${plugin.id}.json`);
|
|
51
|
+
let state, damaged = false;
|
|
52
|
+
if (existsSync(path)) try {
|
|
53
|
+
const parsed = stateSchema.parse(JSON.parse(readFileSync(path, "utf8")));
|
|
54
|
+
if (parsed.packageRevision === plugin.receipt.revision) state = parsed;
|
|
55
|
+
} catch {
|
|
56
|
+
damaged = true;
|
|
57
|
+
}
|
|
58
|
+
const extension = plugin.manifest.extensions?.["ai.xopc"];
|
|
59
|
+
const prepared = !damaged && plugin.readiness !== "blocked" && (state ? state.resources === "ready" && (state.installed === true || state.state === "completed") && state.state !== "cancelled" : !extension?.setup?.resources?.length);
|
|
60
|
+
const connected = (name) => state?.connections.find((value) => value.name === name)?.state === "connected";
|
|
61
|
+
const requiresConnection = (name) => {
|
|
62
|
+
const server = plugin.servers[name];
|
|
63
|
+
if (!server) return true;
|
|
64
|
+
return server.type !== "stdio" ? server.connectionAuth?.mode !== "none" : Object.values(server.env ?? {}).some((value) => Object.entries(plugin.layout?.userConfig ?? {}).some(([key, field]) => field.sensitive && value.includes(`\${user_config.${key}}`)));
|
|
65
|
+
};
|
|
66
|
+
const granted = (entry) => {
|
|
67
|
+
const id = typeof entry === "string" ? entry : entry.id;
|
|
68
|
+
const declaration = declarations.find((value) => value.id === id);
|
|
69
|
+
const saved = state?.authorizations.find((value) => value.id === id);
|
|
70
|
+
if (!declaration || saved?.state !== "connected" || saved.expiresAt !== void 0 && saved.expiresAt <= now || !declaration.servers.every(connected)) return false;
|
|
71
|
+
return saved.issues.every((issue) => typeof entry !== "string" && issue.scopes.length > 0 && !issue.scopes.some((scope) => entry.scopes.includes(scope)));
|
|
72
|
+
};
|
|
73
|
+
const allows = (rule) => prepared && rule.authorizations.every(granted) && rule.servers.every(connected);
|
|
74
|
+
const defaults = {
|
|
75
|
+
authorizations: declarations.map((value) => value.id),
|
|
76
|
+
servers: declarations.length ? [] : Object.keys(plugin.servers).filter(requiresConnection)
|
|
77
|
+
};
|
|
78
|
+
return {
|
|
79
|
+
skill: (name) => allows(access.skills[name] ?? defaults),
|
|
80
|
+
server: (name) => {
|
|
81
|
+
const owners = declarations.filter((value) => value.servers.includes(name));
|
|
82
|
+
return allows(access.mcp[name] ?? {
|
|
83
|
+
authorizations: (owners.length ? owners : declarations).map((value) => value.id),
|
|
84
|
+
servers: []
|
|
85
|
+
}) && (state ? connected(name) : !requiresConnection(name));
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
function pluginRuntimeAccessKey(store, workspace, agentId) {
|
|
90
|
+
return JSON.stringify(store.active(agentId, workspace).map((plugin) => {
|
|
91
|
+
const access = resolvePluginCapabilityAccess(plugin, store);
|
|
92
|
+
return [
|
|
93
|
+
plugin.id,
|
|
94
|
+
plugin.receipt.revision,
|
|
95
|
+
plugin.skills.filter((skill) => access.skill(skill.name)).map((skill) => skill.name),
|
|
96
|
+
Object.keys(plugin.servers).filter(access.server)
|
|
97
|
+
];
|
|
98
|
+
}));
|
|
99
|
+
}
|
|
100
|
+
//#endregion
|
|
101
|
+
export { pluginCapabilityAccess, pluginRuntimeAccessKey, resolvePluginCapabilityAccess };
|
|
@@ -24,6 +24,7 @@ export declare function inspectPluginCliAuthorization(store: AgentPluginStore, p
|
|
|
24
24
|
method?: string;
|
|
25
25
|
helpUrl?: string;
|
|
26
26
|
}[];
|
|
27
|
+
expiresAt?: number;
|
|
27
28
|
}>;
|
|
28
29
|
export declare function checkPluginCliAuthorization(store: AgentPluginStore, plugin: InstalledAgentPlugin, authorization: string, method: CliMethod, signal: AbortSignal): Promise<boolean>;
|
|
29
30
|
export declare function startPluginCliAuthorization(store: AgentPluginStore, plugin: InstalledAgentPlugin, authorization: string, method: CliMethod, owner: string): PluginCliAuthorization;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { CredentialResolver, init_credentials } from "../../auth/credentials.js";
|
|
2
|
-
import { spawnProcess } from "../../process/run-process.js";
|
|
3
1
|
import { parsePluginAuthorizationCheck, pluginAuthorizations, safeAuthorizationUrl } from "./setup-contract.js";
|
|
4
2
|
import { containedPath, expandPluginVariables, resolvePluginCwd, validatePluginServer } from "./validation.js";
|
|
3
|
+
import { spawnProcess } from "../../process/run-process.js";
|
|
4
|
+
import { CredentialResolver, init_credentials } from "../../auth/credentials.js";
|
|
5
5
|
import { expandUserConfig, readPluginUserConfig } from "./user-config.js";
|
|
6
6
|
import { homedir } from "node:os";
|
|
7
7
|
import { join, resolve } from "node:path";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { init_paths_state, resolveStateDir } from "../../config/paths-state.js";
|
|
2
|
-
import { CredentialResolver, init_credentials } from "../../auth/credentials.js";
|
|
3
2
|
import { pluginName, pluginServerId } from "./validation.js";
|
|
3
|
+
import { CredentialResolver, init_credentials } from "../../auth/credentials.js";
|
|
4
4
|
import { createNativeMcpCredentials } from "../../agent/mcp/credential-store.js";
|
|
5
5
|
import { pluginCredentialProviderPrefix } from "./auth.js";
|
|
6
6
|
import { pluginOAuthCredentialId } from "./mcp-adapter.js";
|
|
@@ -16,7 +16,7 @@ function agentPluginInventoryRow(plugin, store = new AgentPluginStore()) {
|
|
|
16
16
|
try {
|
|
17
17
|
authorizations = pluginAuthorizations(plugin.manifest);
|
|
18
18
|
} catch {}
|
|
19
|
-
const needsAuthorization = !!job && ((job.missingConfig?.length ?? 0) > 0 || job.connections?.some((value) => value.state !== "connected") || job.authorizations?.some((value) => value.state !== "connected" || !!value.issues?.length));
|
|
19
|
+
const needsAuthorization = !job && (authorizations.length > 0 || Object.values(plugin.servers).some((server) => server.type !== "stdio" && server.connectionAuth?.mode !== "none")) || !!job && ((job.missingConfig?.length ?? 0) > 0 || job.connections?.some((value) => value.state !== "connected") || job.authorizations?.some((value) => value.state !== "connected" || !!value.issues?.length || value.expiresAt !== void 0 && value.expiresAt <= Date.now()));
|
|
20
20
|
return {
|
|
21
21
|
id: `plugin:${plugin.id}`,
|
|
22
22
|
pluginId: plugin.id,
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { resolvePluginCapabilityAccess } from "./capability-access.js";
|
|
1
2
|
import { containedPath, expandPluginVariables, pluginServerId, resolvePluginCwd } from "./validation.js";
|
|
2
3
|
import { AgentPluginStore } from "./store.js";
|
|
3
4
|
import { applyPluginAuthBinding, readPluginAuthBinding } from "./auth.js";
|
|
4
5
|
import { expandUserConfig, readPluginUserConfig } from "./user-config.js";
|
|
5
6
|
import { homedir } from "node:os";
|
|
6
7
|
import { join, resolve } from "node:path";
|
|
7
|
-
import {
|
|
8
|
+
import { mkdirSync } from "node:fs";
|
|
8
9
|
import { createHash } from "node:crypto";
|
|
9
10
|
//#region src/extensions/agent-plugins/mcp-adapter.ts
|
|
10
11
|
function pluginOAuthCredentialId(pluginId, revision, serverName) {
|
|
@@ -28,10 +29,9 @@ function materializePluginServers(plugin, store = new AgentPluginStore(), diagno
|
|
|
28
29
|
};
|
|
29
30
|
const expand = (value) => expandUserConfig(expandPluginVariables(value.replace(/\$\{PLUGIN_ACCOUNTS\}/g, join(data, "accounts", plugin.receipt.revision)).replace(/\$\{PLUGIN_RESOURCES\}/g, join(data, "resources", plugin.receipt.revision)), root, data), values);
|
|
30
31
|
const servers = Object.create(null);
|
|
31
|
-
const
|
|
32
|
-
const job = !setup && existsSync(setupPath) ? JSON.parse(readFileSync(setupPath, "utf8")) : void 0;
|
|
32
|
+
const access = setup ? void 0 : resolvePluginCapabilityAccess(plugin, store);
|
|
33
33
|
for (const [name, server] of Object.entries(plugin.servers)) try {
|
|
34
|
-
if (
|
|
34
|
+
if (access && !access.server(name)) continue;
|
|
35
35
|
const origin = {
|
|
36
36
|
id: plugin.id,
|
|
37
37
|
serverName: name,
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { Config } from '../../config/schema.js';
|
|
2
|
+
/** Check provider-defined credentials before constructing a new turn's Skill index and MCP config. */
|
|
3
|
+
export declare function refreshPluginRuntimeAccess(config: Config, workspace: string, agentId?: string): Promise<boolean>;
|