1
>
/*---------------------------------------------------------------------------------------------
aiAgentEnv.ts
2
>
* Copyright (c) Microsoft Corporation. All rights reserved.
3
>
* Licensed under the MIT License. See License.txt in the project root for license information.
4
>
*--------------------------------------------------------------------------------------------*/
5
>
6
>
/**
7
>
* Cross-vendor convention env var that announces which AI agent is driving a
8
>
* process. Child processes inherit it; `gh` in particular reads it and reports
9
>
* the value in its `User-Agent`, which lets downstream activity be attributed to
10
>
* the originating AI experience without touching the user's global environment.
11
>
*/
12
>
export const AiAgentEnvVar = 'AI_AGENT';
13
>
14
>
/**
15
>
* The value VS Code announces for processes it spawns on behalf of an agent
16
>
* session, following the `github_copilot_<surface>` form asked of every GitHub
17
>
* Copilot surface. Must stay stable: it is a wire contract with the reporting
18
>
* pipeline, and `gh` only accepts values matching `[a-zA-Z0-9_-]+`.
19
>
*
20
>
* This must be set for *every* process an agent session spawns — the local
21
>
* (in-workbench) harness terminal tool, the agent host process and every agent
22
>
* SDK subprocess it launches — otherwise the surface is under-counted.
23
>
*/
24
>
export const AiAgentEnvValue = 'github_copilot_vscode_agent';