Skip to main content

企业托管设置参考

Copilot 客户端使用的企业托管设置架构参考文档。

在本文中

注意

此功能目前处于公开预览,可能会发生更改。

使用此参考了解当前支持的密钥 managed-settings.json

有关部署方法,请参阅 配置企业管理设置

优先规则

当存在多个设置源时,客户端按以下顺序应用设置:

  1. 由服务器管理的设置
  2. 受 MDM 管理的设置
  3. 基于文件的配置
  4. 用户级设置

由 MDM 管理的设置具有更高优先级。 如果 MDM 管理的设置不可用时,客户端会先应用服务器管理的设置,再应用基于文件的设置。

支持的密钥

密钥类型接受的值Purpose
permissions.disableBypassPermissionsModestring"disable"禁用绕过或 YOLO 样式允许的所有行为
enabledPluginsobject键格式: PLUGIN-NAME@MARKETPLACE-NAME; 值: true按密钥启用特定插件
extraKnownMarketplacesobject具有 source.source"github") 和 source.repoOWNER/REPO) 的命名市场对象添加用户可以访问的插件市场
strictKnownMarketplacesarray包含 source 值的市场对象数组("github" 具有 repo,或 "git" 具有 url仅允许从明确列出的应用市场安装插件
modelobject
default 设置为受支持的模型名称定义默认模型治理设置
telemetryobject
enabledboolean)、endpointstring)、protocol"otlp-http""otlp-grpc")、captureContentboolean)、lockCaptureContentboolean)、serviceNamestring)、resourceAttributesobject)、headersobject为 VS Code 配置 OpenTelemetry 导出

配置示例

以下示例在一个托管设置文件中显示这些密钥。

{
  "permissions": {
    "disableBypassPermissionsMode": "disable"
  },
  "enabledPlugins": {
    "my-plugin@agent-skills": true
  },
  "extraKnownMarketplaces": {
    "agent-skills": {
      "source": {
        "source": "github",
        "repo": "OWNER/REPO"
      }
    }
  },
  "strictKnownMarketplaces": [
    {
      "source": "github",
      "repo": "OWNER/REPO"
    }
  ],
  "model": {
    "default": "MODEL-NAME"
  },
  "telemetry": {
    "enabled": true,
    "endpoint": "https://otel-collector.example.com",
    "protocol": "otlp-http",
    "captureContent": false,
    "lockCaptureContent": true,
    "serviceName": "copilot",
    "resourceAttributes": {
      "deployment.environment": "production"
    },
    "headers": {
      "Authorization": "Bearer TOKEN"
    }
  }
}