Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/import{ isObject }from'../../../base/common/types.js';import{ localize }from'../../../nls.js';import{ createSchema, schemaProperty }from'./agentHostSchema.js';import{ reasoningEffortLevels }from'./reasoningEffort.js';/**
* Root-config keys consumed exclusively by the Copilot CLI provider
* (`CopilotSessionLauncher` / `CopilotAgent`) — kept out of the
* provider-agnostic `agentHostCustomizationConfigSchema`.
*/exportconstenum CopilotCliConfigKey {/** Use Agent Host's custom terminal tool instead of the SDK's default. Off by default. */
EnableCustomTerminalTool ='enableCustomTerminalTool',/** Log level passed to the Copilot SDK client. */
CopilotSdkLogLevel ='copilotSdkLogLevel',/** Enable the rubber duck critic subagent. */
RubberDuck
Opus48Prompt
ToolSearchEnabled
ToolSearchDeferThreshold
ReasoningEffortOverride
ReasoningSummary
MultiTurnContextRouting
AutoModeTiers
SubagentModelGuidance
ModelCapabilityOverrides
CopilotCliVSCodeAssignmentContextKey
AgentHostCustomTerminalToolEnabledSettingId
AgentHostCopilotSdkLogLevelSettingId
AgentHostOpus48PromptEnabledSettingId
AgentHostToolSearchEnabledSettingId
AgentHostToolSearchDeferThresholdSettingId
AgentHostReasoningEffortOverrideSettingId
AgentHostReasoningSummaryEnabledSettingId
AgentHostMultiTurnContextRoutingEnabledSettingId
AgentHostAutoModeTiersEnabledSettingId
AutoModeTiersExperimentName
CopilotSubagentModelGuidanceEnabledSettingId
AgentHostModelCapabilityOverridesSettingId
AgentHostCopilotModelCapabilityOverridesSettingId
copilotSdkLogLevelSettingValues
copilotSdkLogLevelSettingValues
value
value Numbervalue value Mathvalue
family
reasoningEffort
availableTools
excludedTools
modelCapabilities Record
Record ICopilotCliModelCapabilityOverride
overrides CopilotCliModelCapabilityOverrides
modelId
field
value value
onInvalid value
entryKeys modelId modelId
modelId
entryKey entryKeys
entry overridesentryKey
value entry entryfield
value
value
value
onInvalidvalue
copilotCliConfigSchema
CopilotCliConfigKeyEnableCustomTerminalTool
type
title
description
CopilotCliConfigKeyCopilotSdkLogLevel
type
title
description
copilotSdkLogLevelSettingValues
enumLabels
CopilotCliConfigKeyRubberDuck
type
title
description
CopilotCliConfigKeyOpus48Prompt
type
title
description
CopilotCliConfigKeyToolSearchEnabled
type
title
description
CopilotCliConfigKeyToolSearchDeferThreshold
type
title
description
CopilotCliConfigKeyReasoningSummary
type
title
description
CopilotCliConfigKeyMultiTurnContextRouting
type
title
description
CopilotCliConfigKeyAutoModeTiers
type
title
description
CopilotCliConfigKeySubagentModelGuidance
type
title
description
CopilotCliConfigKeyModelCapabilityOverrides
type
title
description
additionalProperties
type
title
description
properties
family
type
title
description
reasoningEffort
type
reasoningEffortLevels
title
description
availableTools
type
items type title
title
description
excludedTools
type
items type title
title
description
modelCapabilities
type
title
description
value
value valuelength valuelength
value value value value
/** Apply Opus 4.8-tuned system-prompt overrides on Opus 4.8 models. Off by default. */
=
'opus48Prompt'
,
/** Enable runtime tool search (deferred-tool loading) for Copilot SDK sessions. On by default. */
=
'toolSearchEnabled'
,
/** Minimum tool count before MCP/external tools are deferred behind tool search. 0 = always defer. */
=
'toolSearchDeferThreshold'
,
/** Override reasoning effort regardless of the picker value; unsupported values are ignored. */
=
'reasoningEffortOverride'
,
/** Enable concise reasoning summaries for supported models. Off by default. */
=
'reasoningSummary'
,
/** Let the Auto router score prior turns instead of the latest message alone. Off by default. */
=
'multiTurnContextRouting'
,
/**
* Offer the Auto model's routing-profile ("Optimize for") picker. Off by default. Separate from
* the extension's gate, which tracks CAPI readiness rather than the bundled runtime's support.
*/
=
'autoModeTiers'
,
/** Tell the model to keep subagents on their default model unless the user asks otherwise. Off by default. */
=
'subagentModelGuidance'
,
/** Per-model capability overrides (family aliases) keyed by model id. */
=
'modelCapabilityOverrides'
,
}
export
const
=
'copilotCliVSCodeAssignmentContext'
;
// VS Code `chat.agentHost.*` / `chat.copilot.*` setting IDs that feed the root-config
// keys above, kept beside the keys they forward to. Registered in `chat.shared.contribution.ts`
// and forwarded into the host's root config by `AgentHostCopilotCliSettingsContribution`
// (and, for the terminal-tool toggle, `AgentHostTerminalContribution`).
/**
* ExP treatment gating the Auto routing-profile picker. The Copilot extension gates its own picker
* on this same name, so one assignment turns tiers on for both harnesses.
*/
export
const
=
'copilotchat.autoModeTiersEnabled'
;
export
const
=
'chat.copilot.subagentModelGuidance.enabled'
;
export
const
=
'chat.agentHost.modelCapabilityOverrides'
;
export
const
=
'chat.agentHost.copilot.modelCapabilityOverrides'
;
export
const
=
[
'info'
,
'trace'
]
as
const
;
export
type
CopilotSdkLogLevelSetting
=
typeof
[
number
]
;
export
const
DEFAULT_COPILOT_RUBBER_DUCK_ENABLED
=
true
;
/** Floors valid tool-search thresholds and returns the default for invalid values. */
export
function
normalizeToolSearchDeferThreshold
(
:
number
|
undefined
)
:
number
{
return
!==
undefined
&&
.
isFinite
(
)
&&
>=
0
?
.
floor
(
)
:
1
;
}
/** Per-model capability override; the agent-host equivalent of the extension's `IModelCapabilityOverride`. */
export
interface
ICopilotCliModelCapabilityOverride
{
/** Family alias (e.g. `"claude-opus-4.8"`) for prompt and tool-capability routing. */
readonly
?
:
string
;
/** Wins over the model picker's thinking level; unrecognized values are ignored. */
readonly
?
:
string
;
/** SDK tool allowlist (pattern syntax, e.g. `builtin:*`, `mcp:<name>`, or bare names). */
readonly
?
:
readonly
string
[
]
;
/** SDK tool denylist; takes precedence over {@link availableTools}. */
readonly
?
:
readonly
string
[
]
;
/** Deep-merged over the runtime's resolved defaults (e.g. `supports.vision`). */
readonly
?
:
<
string
,
unknown
>
;
}
/** Map of model id → capability override. */
export
type
CopilotCliModelCapabilityOverrides
=
<
string
,
>
;
/** Wildcard entry key matching every model id; a specific model-id entry wins field-by-field. */
export
const
MODEL_CAPABILITY_OVERRIDE_WILDCARD
=
'*'
;
/**
* Resolves one field from the specific entry and then the wildcard. Invalid
* specific values are ignored rather than masking a usable wildcard default.
*/
"When enabled, Copilot SDK sessions use Agent Host's terminal tool override instead of the SDK's default terminal behavior."
)
,
default
:
false
,
}
)
,
[
.
]
:
schemaProperty<CopilotSdkLogLevelSetting>
(
{
:
'string'
,
:
localize
(
'agentHost.config.copilotSdkLogLevel.title'
,
"Copilot SDK Log Level"
)
,
:
localize
(
'agentHost.config.copilotSdkLogLevel.description'
,
"Controls logging from the Copilot SDK runtime. Agent host trace logging always enables trace output."
)
,
enum
:
[
...
]
,
:
[
localize
(
'agentHost.config.copilotSdkLogLevel.info'
,
"Info"
)
,
localize
(
'agentHost.config.copilotSdkLogLevel.trace'
,
"Trace"
)
,
]
,
default
:
'info'
,
}
)
,
[
.
]
:
schemaProperty<boolean>
(
{
:
'boolean'
,
:
localize
(
'agentHost.config.rubberDuck.title'
,
"Rubber Duck Agent"
)
,
:
localize
(
'agentHost.config.rubberDuck.description'
,
"When enabled, the coding agent uses a rubber duck critic subagent to review code changes using a complementary model."
)
,
default
:
DEFAULT_COPILOT_RUBBER_DUCK_ENABLED
,
}
)
,
[
.
]
:
schemaProperty<boolean>
(
{
:
'boolean'
,
:
localize
(
'agentHost.config.opus48Prompt.title'
,
"Opus 4.8 Agent Prompt"
)
,
:
localize
(
'agentHost.config.opus48Prompt.description'
,
"When enabled, Copilot SDK sessions running a Claude Opus 4.8 model apply Opus 4.8-tuned system-prompt section overrides on top of the default system message."
)
,
default
:
false
,
}
)
,
[
.
]
:
schemaProperty<boolean>
(
{
:
'boolean'
,
:
localize
(
'agentHost.config.toolSearchEnabled.title'
,
"Agent Host Tool Search"
)
,
:
localize
(
'agentHost.config.toolSearchEnabled.description'
,
"When enabled, Copilot SDK sessions defer MCP and non-core VS Code tools behind a tool-search tool so the model discovers them on demand instead of loading every tool definition up front."
"Minimum number of tools before MCP and external tools are deferred behind tool search. Set to 0 to always defer external tools. Only effective when tool search is enabled."
"When enabled, Auto model selection sends prior user messages to the router so it scores the conversation so far instead of the latest message alone."
)
,
default
:
false
,
}
)
,
[
.
]
:
schemaProperty<boolean>
(
{
:
'boolean'
,
:
localize
(
'agentHost.config.autoModeTiers.title'
,
"Auto Routing Profiles"
)
,
:
localize
(
'agentHost.config.autoModeTiers.description'
,
"When enabled, the Auto model offers an \"Optimize for\" picker that biases routing toward efficiency, balance, or intelligence. The profile is chosen before a session starts and applies for its lifetime."
"Per-model capability overrides for Copilot SDK sessions, keyed by model id (`*` matches every model; a specific entry wins field-by-field). Aliasing a model id to a known `family` routes it to that family's tuned system prompt and tool profile without changing the model id sent to the runtime; the remaining fields override reasoning effort, tool enablement, and model capability limits per model. Only affects Copilot SDK sessions; intended for experimentation."
"Route the model to another family's tuned system prompt and tool profile (e.g. `claude-opus-4.8`). The model id sent to the runtime is unaffected, so the session still runs on the selected model."
"When set, only matching tools are available to sessions on this model. Patterns: bare tool names, `builtin:*` or `builtin:<name>` (Copilot runtime tools), `mcp:*` or `mcp:<name>` (MCP server tools), and `custom:*` or `custom:<name>` (every tool VS Code registers with the SDK, including the agent host's own terminal tools); a bare `*` expands to all three sources. Applied when the session launches or resumes."
"Tools disabled for sessions on this model; same pattern syntax as `availableTools` and takes precedence over it. Note that `custom:*` and a bare `*` also disable the agent host's own terminal tools registered with the SDK. Applied when the session launches or resumes."
"Per-property model capability overrides passed through to the Copilot SDK's `modelCapabilities` session field (e.g. `{ \"supports\": { \"vision\": false }, \"limits\": { \"max_context_window_tokens\": 64000 } }`), deep-merged over the runtime's resolved defaults for this model. Applied when the session launches or resumes."
)
,
}
,
}
,
}
,
default
:
{
}
,
}
)
,
}
)
;
// The alias only feeds the host's prompt registry, whose contributors match on
// model-id shapes of their own choosing; an allow-list of id shapes here would
// silently reject valid ones (`vendor/model`). Reject only what cannot be an
// id at all.
const
MODEL_FAMILY_MAX_LENGTH
=
128
;
const
MODEL_FAMILY_CONTROL_CHARS
=
/[\u0000-\u001F\u007F]/
;
/** Returns a usable model-family alias, or `undefined` for malformed values. */