|
12 | 12 | import { |
13 | 13 | DEFAULT_TRUNCATE_TOOL_OUTPUT_THRESHOLD, |
14 | 14 | DEFAULT_MODEL_CONFIGS, |
| 15 | + AuthProviderType, |
15 | 16 | type MCPServerConfig, |
| 17 | + type RequiredMcpServerConfig, |
16 | 18 | type BugCommandSettings, |
17 | 19 | type TelemetrySettings, |
18 | 20 | type AuthType, |
@@ -2435,14 +2437,28 @@ const SETTINGS_SCHEMA = { |
2435 | 2437 | category: 'Admin', |
2436 | 2438 | requiresRestart: false, |
2437 | 2439 | default: {} as Record<string, MCPServerConfig>, |
2438 | | - description: 'Admin-configured MCP servers.', |
| 2440 | + description: 'Admin-configured MCP servers (allowlist).', |
2439 | 2441 | showInDialog: false, |
2440 | 2442 | mergeStrategy: MergeStrategy.REPLACE, |
2441 | 2443 | additionalProperties: { |
2442 | 2444 | type: 'object', |
2443 | 2445 | ref: 'MCPServerConfig', |
2444 | 2446 | }, |
2445 | 2447 | }, |
| 2448 | + requiredConfig: { |
| 2449 | + type: 'object', |
| 2450 | + label: 'Required MCP Config', |
| 2451 | + category: 'Admin', |
| 2452 | + requiresRestart: false, |
| 2453 | + default: {} as Record<string, RequiredMcpServerConfig>, |
| 2454 | + description: 'Admin-required MCP servers that are always injected.', |
| 2455 | + showInDialog: false, |
| 2456 | + mergeStrategy: MergeStrategy.REPLACE, |
| 2457 | + additionalProperties: { |
| 2458 | + type: 'object', |
| 2459 | + ref: 'RequiredMcpServerConfig', |
| 2460 | + }, |
| 2461 | + }, |
2446 | 2462 | }, |
2447 | 2463 | }, |
2448 | 2464 | skills: { |
@@ -2567,11 +2583,72 @@ export const SETTINGS_SCHEMA_DEFINITIONS: Record< |
2567 | 2583 | type: 'string', |
2568 | 2584 | description: |
2569 | 2585 | 'Authentication provider used for acquiring credentials (for example `dynamic_discovery`).', |
2570 | | - enum: [ |
2571 | | - 'dynamic_discovery', |
2572 | | - 'google_credentials', |
2573 | | - 'service_account_impersonation', |
2574 | | - ], |
| 2586 | + enum: Object.values(AuthProviderType), |
| 2587 | + }, |
| 2588 | + targetAudience: { |
| 2589 | + type: 'string', |
| 2590 | + description: |
| 2591 | + 'OAuth target audience (CLIENT_ID.apps.googleusercontent.com).', |
| 2592 | + }, |
| 2593 | + targetServiceAccount: { |
| 2594 | + type: 'string', |
| 2595 | + description: |
| 2596 | + 'Service account email to impersonate (name@project.iam.gserviceaccount.com).', |
| 2597 | + }, |
| 2598 | + }, |
| 2599 | + }, |
| 2600 | + RequiredMcpServerConfig: { |
| 2601 | + type: 'object', |
| 2602 | + description: |
| 2603 | + 'Admin-required MCP server configuration (remote transports only).', |
| 2604 | + additionalProperties: false, |
| 2605 | + properties: { |
| 2606 | + url: { |
| 2607 | + type: 'string', |
| 2608 | + description: 'URL for the required MCP server.', |
| 2609 | + }, |
| 2610 | + type: { |
| 2611 | + type: 'string', |
| 2612 | + description: 'Transport type for the required server.', |
| 2613 | + enum: ['sse', 'http'], |
| 2614 | + }, |
| 2615 | + headers: { |
| 2616 | + type: 'object', |
| 2617 | + description: 'Additional HTTP headers sent to the server.', |
| 2618 | + additionalProperties: { type: 'string' }, |
| 2619 | + }, |
| 2620 | + timeout: { |
| 2621 | + type: 'number', |
| 2622 | + description: 'Timeout in milliseconds for MCP requests.', |
| 2623 | + }, |
| 2624 | + trust: { |
| 2625 | + type: 'boolean', |
| 2626 | + description: |
| 2627 | + 'Marks the server as trusted. Defaults to true for admin-required servers.', |
| 2628 | + }, |
| 2629 | + description: { |
| 2630 | + type: 'string', |
| 2631 | + description: 'Human-readable description of the server.', |
| 2632 | + }, |
| 2633 | + includeTools: { |
| 2634 | + type: 'array', |
| 2635 | + description: 'Subset of tools enabled for this server.', |
| 2636 | + items: { type: 'string' }, |
| 2637 | + }, |
| 2638 | + excludeTools: { |
| 2639 | + type: 'array', |
| 2640 | + description: 'Tools disabled for this server.', |
| 2641 | + items: { type: 'string' }, |
| 2642 | + }, |
| 2643 | + oauth: { |
| 2644 | + type: 'object', |
| 2645 | + description: 'OAuth configuration for authenticating with the server.', |
| 2646 | + additionalProperties: true, |
| 2647 | + }, |
| 2648 | + authProviderType: { |
| 2649 | + type: 'string', |
| 2650 | + description: 'Authentication provider used for acquiring credentials.', |
| 2651 | + enum: Object.values(AuthProviderType), |
2575 | 2652 | }, |
2576 | 2653 | targetAudience: { |
2577 | 2654 | type: 'string', |
|
0 commit comments