@yanlinglabs/winter-runtime-sdk 0.0.2 → 0.0.4

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/index.js CHANGED
@@ -1,348 +1,49 @@
1
+ import {
2
+ EXECUTION_INDIRECTION_ENV_NAMES,
3
+ EXECUTION_INDIRECTION_ENV_PREFIXES,
4
+ NotImplementedYet,
5
+ OFFICIAL_DISCLOSURES,
6
+ OfficialConfigurationError,
7
+ OfficialConnectionError,
8
+ OfficialContainmentBreachError,
9
+ OfficialExecutableNotFoundError,
10
+ OfficialInvalidResumeError,
11
+ OfficialKilledError,
12
+ OfficialMcpError,
13
+ OfficialNonzeroExitError,
14
+ OfficialStdoutUnterminatedError,
15
+ PINNED_OFFICIAL_RUNTIME,
16
+ RuntimeHandoffRequiredError,
17
+ RuntimeLaunchInputError,
18
+ RuntimeSdkDisposedError,
19
+ RuntimeSdkError,
20
+ RuntimeSdkVersionError,
21
+ TRAFFIC_OPT_OUT_VARIABLES,
22
+ TRAFFIC_OPT_OUT_VARIABLE_NAMES,
23
+ UnaddressableEntryError,
24
+ VENDOR_HOME_SEGMENT_RE,
25
+ authVariableSetKey,
26
+ buildOfficialChildEnv,
27
+ containmentDecisionFor,
28
+ containmentDispositions,
29
+ containmentPaths,
30
+ fetchAuthCredentials,
31
+ isExecutionIndirectionVariable,
32
+ minimalOsEnvironmentFrom,
33
+ officialBranchLabel,
34
+ officialDisallowedTools,
35
+ officialToolAliases,
36
+ resolveSavedApprovalDisposition,
37
+ targetsForbiddenPath
38
+ } from "./index-294jzb3e.js";
39
+
1
40
  // src/index.ts
2
41
  export * from "@yanlinglabs/winter-agent-sdk";
3
42
 
4
- // src/errors.ts
5
- class RuntimeSdkError extends Error {
6
- constructor(message, options) {
7
- super(message, options);
8
- this.name = new.target.name;
9
- const capture = Error.captureStackTrace;
10
- if (typeof capture === "function")
11
- capture(this, new.target);
12
- }
13
- }
14
-
15
- class RuntimeHandoffRequiredError extends RuntimeSdkError {
16
- from;
17
- to;
18
- address;
19
- constructor(args) {
20
- super(`winter-runtime-sdk: ${args.address} is persisted on the ${args.from} runtime and this query asks for ${args.to}. A runtime change mid-session is \`sdk.handoff(session, "${args.to}")\` — WS-05 §12's certified transfer — or a visible fork (\`forkSession\`); serving the new runtime on the old transcript would be the silent rewrite D13 forbids`);
21
- this.from = args.from;
22
- this.to = args.to;
23
- this.address = args.address;
24
- }
25
- }
26
-
27
- class RuntimeLaunchInputError extends RuntimeSdkError {
28
- field;
29
- constructor(args) {
30
- super(`winter-runtime-sdk: ${args.leg === undefined ? "" : `the ${args.leg} leg: `}\`${args.field}\` — ${args.reason}`);
31
- this.field = args.field;
32
- }
33
- }
34
-
35
- class UnaddressableEntryError extends RuntimeSdkError {
36
- address;
37
- constructor(address) {
38
- super(`winter-runtime-sdk: ${JSON.stringify(address)} is not a canonical runtime address, so a directory row under it would be listed to the model by ListAgents and refused by every resolution door (WS-15 §6.1). Build it with serializeRuntimeAddress(buildSessionAddress(<winter session id>)) — the canonical forms are "session:<id>" and "agent:<parent>:<child>"`);
39
- this.address = address;
40
- }
41
- }
42
-
43
- class RuntimeSdkVersionError extends RuntimeSdkError {
44
- expected;
45
- actual;
46
- constructor(args) {
47
- super(args.message ?? `winter-runtime-sdk: version matrix refuses this peer set — expected ${args.expected}, got ${args.actual}`);
48
- this.expected = args.expected;
49
- this.actual = args.actual;
50
- }
51
- }
52
-
53
- class NotImplementedYet extends RuntimeSdkError {
54
- lane;
55
- seam;
56
- constructor(lane, seam) {
57
- super(`winter-runtime-sdk: ${seam} is not implemented yet — Phase 7b ${lane} owns it (the spine ships the signature, not the behaviour)`);
58
- this.lane = lane;
59
- this.seam = seam;
60
- }
61
- }
62
-
63
- class RuntimeSdkDisposedError extends RuntimeSdkError {
64
- constructor(method) {
65
- super(`winter-runtime-sdk: ${method}() was called after dispose()`);
66
- }
67
- }
68
-
69
43
  // src/door.ts
70
44
  import { buildChildAddress, buildSessionAddress, serializeRuntimeAddress } from "@yanlinglabs/winter-agent-sdk/messaging";
71
45
  import { transcriptSourceForSessionKey } from "@yanlinglabs/winter-agent-sdk/tools";
72
46
 
73
- // src/official/branding.ts
74
- function officialBranchLabel(brand) {
75
- return `${brand.processLabel}-claude-agent`;
76
- }
77
-
78
- // src/official/aliases.ts
79
- import { mcpToolName } from "@yanlinglabs/winter-agent-sdk";
80
- var ALIASED_BUILTINS = [
81
- { builtin: "SendMessage", tool: "send_message" },
82
- { builtin: "ListAgents", tool: "list_agents" },
83
- { builtin: "ReadNotifications", tool: "read_notifications" },
84
- { builtin: "advisor", tool: "advisor" }
85
- ];
86
- function officialToolAliases(brand) {
87
- return Object.fromEntries(ALIASED_BUILTINS.map(({ builtin, tool }) => [builtin, mcpToolName(brand, tool)]));
88
- }
89
- function aliasTargetFor(builtin, brand) {
90
- const entry = ALIASED_BUILTINS.find((candidate) => candidate.builtin === builtin);
91
- if (entry === undefined)
92
- throw new TypeError(`not an aliased builtin: ${String(builtin)}`);
93
- return mcpToolName(brand, entry.tool);
94
- }
95
- function aliasDenyNames(builtin, brand) {
96
- return [builtin, aliasTargetFor(builtin, brand)];
97
- }
98
-
99
- // src/official/errors.ts
100
- class OfficialBranchError extends RuntimeSdkError {
101
- crashClass;
102
- branch;
103
- constructor(message, branchLabel, options) {
104
- super(message, options);
105
- this.branch = branchLabel;
106
- }
107
- }
108
-
109
- class OfficialConfigurationError extends OfficialBranchError {
110
- code = "official_configuration_invalid";
111
- winterClass = "WinterSDKError";
112
- option;
113
- constructor(args) {
114
- super(`${args.branchLabel}: ${args.option} — ${args.reason}`, args.branchLabel);
115
- this.option = args.option;
116
- }
117
- }
118
-
119
- class OfficialExecutableNotFoundError extends OfficialBranchError {
120
- code = "official_executable_not_found";
121
- winterClass = "CLIConnectionError";
122
- crashClass = "executable-not-found";
123
- path;
124
- constructor(args) {
125
- super(`${args.branchLabel}: the vendored runtime was not found at ${args.path}`, args.branchLabel, args.cause === undefined ? undefined : { cause: args.cause });
126
- this.path = args.path;
127
- }
128
- }
129
-
130
- class OfficialConnectionError extends OfficialBranchError {
131
- code = "official_connection_failure";
132
- winterClass = "CLIConnectionError";
133
- crashClass = "connection-failure";
134
- constructor(args) {
135
- super(`${args.branchLabel}: the runtime connection failed — ${args.reason}`, args.branchLabel, args.cause === undefined ? undefined : { cause: args.cause });
136
- }
137
- }
138
- class OfficialNonzeroExitError extends OfficialBranchError {
139
- code = "official_nonzero_exit";
140
- winterClass = "ProcessError";
141
- crashClass = "nonzero-exit";
142
- exitCode;
143
- signal;
144
- stderrTail;
145
- constructor(args) {
146
- super(`${args.branchLabel}: the runtime exited with code ${String(args.exitCode)}${args.signal === null ? "" : ` (signal ${args.signal})`}`, args.branchLabel);
147
- this.exitCode = args.exitCode;
148
- this.signal = args.signal;
149
- this.stderrTail = args.stderrTail;
150
- }
151
- }
152
-
153
- class OfficialKilledError extends OfficialBranchError {
154
- code = "official_killed";
155
- winterClass = "ProcessError";
156
- crashClass = "killed";
157
- signal;
158
- constructor(args) {
159
- super(`${args.branchLabel}: the runtime was killed with ${args.signal} — ${args.reason}`, args.branchLabel);
160
- this.signal = args.signal;
161
- }
162
- }
163
-
164
- class OfficialContainmentBreachError extends OfficialBranchError {
165
- code = "official_containment_breach";
166
- winterClass = "WinterSDKError";
167
- tool;
168
- created;
169
- removed;
170
- retained;
171
- constructor(args) {
172
- super(`${args.branchLabel}: ${args.toolName} created ${args.created.length} vendor-named path(s) that the pre-hoc scan did not see; ${args.removed.length} removed, ${args.retained.length} retained (WS-14 §8)`, args.branchLabel);
173
- this.tool = args.toolName;
174
- this.created = [...args.created];
175
- this.removed = [...args.removed];
176
- this.retained = [...args.retained];
177
- }
178
- }
179
-
180
- class OfficialStdoutUnterminatedError extends OfficialBranchError {
181
- code = "official_stdout_unterminated";
182
- winterClass = "ProcessError";
183
- crashClass = "stdout-unterminated";
184
- graceMs;
185
- constructor(args) {
186
- super(`${args.branchLabel}: the runtime exited but its stdout did not close within ${args.graceMs}ms; the exit was forwarded on the grace timer`, args.branchLabel);
187
- this.graceMs = args.graceMs;
188
- }
189
- }
190
- class OfficialMcpError extends OfficialBranchError {
191
- code = "official_mcp_failure";
192
- winterClass = "WinterSDKError";
193
- server;
194
- constructor(args) {
195
- super(`${args.branchLabel}: the MCP server ${args.server} failed — ${args.reason}`, args.branchLabel);
196
- this.server = args.server;
197
- }
198
- }
199
- class OfficialInvalidResumeError extends OfficialBranchError {
200
- code = "official_invalid_resume";
201
- winterClass = "WinterSDKError";
202
- constructor(args) {
203
- super(`${args.branchLabel}: invalid resume/fork — ${args.reason}`, args.branchLabel);
204
- }
205
- }
206
-
207
- // src/official/containment.ts
208
- var FORBIDDEN_TARGETS = {
209
- instructionsFile: "CLAUDE.md",
210
- projectDir: ".claude",
211
- userPlansDir: ".claude/plans"
212
- };
213
- function containmentPaths(brand) {
214
- return {
215
- worktrees: `${brand.projectDirName}/worktrees`,
216
- workflows: `${brand.projectDirName}/workflows`,
217
- plans: `${brand.projectDirName}/plans`,
218
- localSettings: `${brand.projectDirName}/settings.local.json`
219
- };
220
- }
221
- function resolveSavedApprovalDisposition(policy, branchLabel) {
222
- const disposition = policy.savedWebFetchApprovals ?? "disable";
223
- if (disposition === "redirect") {
224
- throw new OfficialConfigurationError({
225
- option: "containment.savedWebFetchApprovals",
226
- reason: "`redirect` cannot be honoured on this branch: nothing routes a durable approval anywhere, so passing it through means the RUNTIME writes its own project settings file — measured, with an ordinary broker. §8 denies that write either way, so this branch supports `disable` until a host replacement exists (WS-14 §8/§16 q2)",
227
- branchLabel
228
- });
229
- }
230
- return disposition;
231
- }
232
- function officialDisallowedTools(policy = {}, brand) {
233
- const denied = ["CronCreate"];
234
- if (policy.deniedAliasedBuiltins !== undefined && brand !== undefined) {
235
- for (const builtin of policy.deniedAliasedBuiltins)
236
- denied.push(...aliasDenyNames(builtin, brand));
237
- }
238
- return denied;
239
- }
240
- var norm = (path) => path.replace(/\\/g, "/").replace(/\/+/g, "/");
241
- var fold = (value) => value.normalize("NFKC").toLowerCase();
242
- var FORBIDDEN_PROJECT_DIR = fold(FORBIDDEN_TARGETS.projectDir);
243
- var FORBIDDEN_INSTRUCTIONS_FILE = fold(FORBIDDEN_TARGETS.instructionsFile);
244
- function targetsForbiddenPath(rawPath) {
245
- const segments = norm(rawPath).split("/").filter((segment) => segment.length > 0).map(fold);
246
- const index = segments.indexOf(FORBIDDEN_PROJECT_DIR);
247
- if (index >= 0) {
248
- return { forbidden: true, target: segments[index + 1] === "plans" ? FORBIDDEN_TARGETS.userPlansDir : FORBIDDEN_TARGETS.projectDir };
249
- }
250
- if (segments[segments.length - 1] === FORBIDDEN_INSTRUCTIONS_FILE)
251
- return { forbidden: true, target: FORBIDDEN_TARGETS.instructionsFile };
252
- return { forbidden: false, target: "" };
253
- }
254
- var VENDOR_HOME_SEGMENT_RE = /(^|\/)\.claude(\/|$)/i;
255
- var PATH_FIELDS = [
256
- "file_path",
257
- "filePath",
258
- "path",
259
- "notebook_path",
260
- "notebookPath",
261
- "directory",
262
- "dir",
263
- "target_file",
264
- "targetFile",
265
- "file",
266
- "plan_file_path",
267
- "planFilePath"
268
- ];
269
- var COMMAND_PROJECT_DIR_RE = /(?:^|[^A-Za-z0-9_.\\-])\.claude(?![A-Za-z0-9_-])/i;
270
- var COMMAND_INSTRUCTIONS_FILE_RE = /(?:^|[^A-Za-z0-9_\\-])claude\.md(?![A-Za-z0-9_.-])/i;
271
- function isTruthy(value) {
272
- if (value === true)
273
- return true;
274
- if (typeof value === "number")
275
- return value !== 0;
276
- if (typeof value !== "string")
277
- return false;
278
- return ["true", "1", "yes", "on"].includes(value.trim().toLowerCase());
279
- }
280
- var WORKTREE_TOOLS = ["EnterWorktree", "ExitWorktree", "WorktreeCreate"];
281
- var AGENT_TOOLS = ["Task", "Agent"];
282
- var WORKFLOW_TOOLS = ["Workflow"];
283
- function containmentDecisionFor(toolName, input, policy = {}) {
284
- const deny = (target, what) => ({
285
- allow: false,
286
- target,
287
- reason: `${toolName} may not create or modify ${what}: this session runs on the product's own project layout, and the vendor-named path is redirected (WS-14 §8)`
288
- });
289
- for (const field of PATH_FIELDS) {
290
- const value = input[field];
291
- if (typeof value !== "string")
292
- continue;
293
- const hit = targetsForbiddenPath(value);
294
- if (hit.forbidden)
295
- return deny(hit.target, value);
296
- }
297
- for (const field of ["command", "script", "code"]) {
298
- const value = input[field];
299
- if (typeof value !== "string")
300
- continue;
301
- const command = value.normalize("NFKC");
302
- if (COMMAND_PROJECT_DIR_RE.test(command))
303
- return deny(FORBIDDEN_TARGETS.projectDir, value);
304
- if (COMMAND_INSTRUCTIONS_FILE_RE.test(command))
305
- return deny(FORBIDDEN_TARGETS.instructionsFile, value);
306
- const unquoted = command.replace(/[\\'"`]/g, "");
307
- if (COMMAND_PROJECT_DIR_RE.test(unquoted))
308
- return deny(FORBIDDEN_TARGETS.projectDir, value);
309
- if (COMMAND_INSTRUCTIONS_FILE_RE.test(unquoted))
310
- return deny(FORBIDDEN_TARGETS.instructionsFile, value);
311
- }
312
- const paths = containmentPaths({ projectDirName: policy.projectDirName ?? "" });
313
- if ((policy.worktrees ?? "deny") === "deny") {
314
- if (WORKTREE_TOOLS.includes(toolName)) {
315
- return {
316
- allow: false,
317
- target: `${FORBIDDEN_TARGETS.projectDir}/worktrees/`,
318
- reason: `${toolName} writes the vendor's own worktree directory; on this branch worktrees belong under ${paths.worktrees || "the product's project directory"} and the host's schema-compatible replacement owns them (WS-14 §8)`
319
- };
320
- }
321
- if (AGENT_TOOLS.includes(toolName) && String(input["isolation"] ?? "") === "worktree") {
322
- return {
323
- allow: false,
324
- target: `${FORBIDDEN_TARGETS.projectDir}/worktrees/`,
325
- reason: `an isolated agent worktree writes the vendor's own worktree directory; on this branch it belongs under ${paths.worktrees || "the product's project directory"} (WS-14 §8)`
326
- };
327
- }
328
- }
329
- if ((policy.workflows ?? "deny") === "deny" && WORKFLOW_TOOLS.includes(toolName)) {
330
- return {
331
- allow: false,
332
- target: `${FORBIDDEN_TARGETS.projectDir}/workflows/`,
333
- reason: `named workflow resolution reads the vendor's own workflows directory; on this branch workflows resolve under ${paths.workflows || "the product's project directory"} (WS-14 §8, D8)`
334
- };
335
- }
336
- if (toolName === "CronCreate" && isTruthy(input["durable"])) {
337
- return {
338
- allow: false,
339
- target: `${FORBIDDEN_TARGETS.projectDir}/scheduled_tasks.json`,
340
- reason: "durable scheduled tasks are unavailable on this branch: the vendor's durable variant persists into its own project directory (WS-14 §8)"
341
- };
342
- }
343
- return { allow: true };
344
- }
345
-
346
47
  // src/official/callbacks.ts
347
48
  var DURABLE_APPROVAL_DESTINATIONS = ["userSettings", "projectSettings", "localSettings"];
348
49
  function createApprovalBridge(options) {
@@ -406,995 +107,8 @@ function createContainmentHooks(options) {
406
107
  return { PreToolUse: [{ hooks: [guard] }] };
407
108
  }
408
109
 
409
- // src/official/auth.ts
410
- var AUTH_FAMILY_VARIABLES = {
411
- "api-key": ["ANTHROPIC_API_KEY"],
412
- "console-oauth": ["ANTHROPIC_AUTH_TOKEN", "ANTHROPIC_BASE_URL"],
413
- bedrock: ["CLAUDE_CODE_USE_BEDROCK", "AWS_REGION", "AWS_PROFILE", "AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_SESSION_TOKEN", "AWS_BEARER_TOKEN_BEDROCK", "ANTHROPIC_BEDROCK_BASE_URL"],
414
- vertex: ["CLAUDE_CODE_USE_VERTEX", "ANTHROPIC_VERTEX_PROJECT_ID", "CLOUD_ML_REGION", "GOOGLE_APPLICATION_CREDENTIALS", "ANTHROPIC_VERTEX_BASE_URL"],
415
- "claude-oauth": [],
416
- "local-none": []
417
- };
418
- var AUTH_SHAPED_RE = /^(?:ANTHROPIC_|AWS_|GOOGLE_|GCP_|AZURE_|CLOUD_ML_|VERTEX_|BEDROCK_|CLAUDE_(?:CODE_)?(?:USE_|SKIP_|HOST_|OAUTH_|SESSION_|BRIDGE_|LOCAL_|SECURESTORAGE_|IDENTITY_))|_(?:API_KEY|AUTH_TOKEN|TOKEN|SECRET|CREDENTIALS|CREDS|PASSWORD|PASSWD)$/;
419
- function isAuthShapedVariable(name) {
420
- return AUTH_SHAPED_RE.test(name) || /_(?:API_KEY|AUTH_TOKEN|TOKEN|SECRET|CREDENTIALS|CREDS|PASSWORD|PASSWD)$/.test(name);
421
- }
422
- var ALL_AUTH_VARIABLES = Object.values(AUTH_FAMILY_VARIABLES).flat().filter((name, index, all) => all.indexOf(name) === index);
423
- var NEVER_INJECTED_AUTH_VARIABLES = ["CLAUDE_CODE_OAUTH_TOKEN"];
424
- function authVariableSetKey(selection) {
425
- switch (selection.authFamily) {
426
- case "cloud-credential-chain":
427
- return selection.providerId.toLowerCase().includes("vertex") ? "vertex" : "bedrock";
428
- case "custom":
429
- return "custom";
430
- default:
431
- return selection.authFamily;
432
- }
433
- }
434
- function allowedAuthVariables(selection) {
435
- const key = authVariableSetKey(selection);
436
- return key === "custom" ? undefined : AUTH_FAMILY_VARIABLES[key];
437
- }
438
- function validateAuthEnvironment(args) {
439
- const names = Object.keys(args.credentials);
440
- for (const name of names) {
441
- if (NEVER_INJECTED_AUTH_VARIABLES.includes(name)) {
442
- throw new OfficialConfigurationError({
443
- option: `env.${name}`,
444
- reason: "this credential is never injected on this branch: D14 gates the subscription-OAuth route, and its supported flow stores credentials inside the spool namespace instead (WS-14 §12, WS-01 §2.5)",
445
- branchLabel: args.branchLabel
446
- });
447
- }
448
- }
449
- if (args.selection.authFamily === "claude-oauth") {
450
- if (!args.gate.approved) {
451
- throw new OfficialConfigurationError({
452
- option: "selection.authFamily",
453
- reason: "the Claude OAuth branch is ship-gated pending written approval (D14); the shippable branch uses API-key, cloud-credential-chain or gateway auth only",
454
- branchLabel: args.branchLabel
455
- });
456
- }
457
- if (names.length > 0) {
458
- throw new OfficialConfigurationError({
459
- option: "credentials",
460
- reason: `the Claude OAuth family injects NO credential variable — its stored subscription state lives inside the spool namespace — but ${names.join(", ")} was supplied`,
461
- branchLabel: args.branchLabel
462
- });
463
- }
464
- return;
465
- }
466
- const allowed = allowedAuthVariables(args.selection);
467
- if (allowed !== undefined) {
468
- const stray = names.filter((name) => !allowed.includes(name));
469
- if (stray.length > 0) {
470
- throw new OfficialConfigurationError({
471
- option: "credentials",
472
- reason: `${stray.join(", ")} does not belong to the ${args.selection.authFamily} family (${allowed.length === 0 ? "which injects nothing" : allowed.join(", ")}); two families in one child are resolved by the runtime's own precedence order, not by the host's selection`,
473
- branchLabel: args.branchLabel
474
- });
475
- }
476
- if (allowed.includes("ANTHROPIC_AUTH_TOKEN") && names.includes("ANTHROPIC_BASE_URL") && !names.includes("ANTHROPIC_AUTH_TOKEN")) {
477
- throw new OfficialConfigurationError({
478
- option: "credentials.ANTHROPIC_BASE_URL",
479
- reason: "a gateway endpoint without its bearer token leaves a stored subscription credential active behind the new endpoint (WS-14 §12's gateway caveat) — set the full pair or neither",
480
- branchLabel: args.branchLabel
481
- });
482
- }
483
- }
484
- }
485
- async function fetchAuthCredentials(args) {
486
- const out = {};
487
- for (const entry of args.plan) {
488
- const material = await args.keychain.read(entry.ref);
489
- if (material === undefined || material.length === 0) {
490
- throw new OfficialConfigurationError({
491
- option: `credentials.${entry.variable}`,
492
- reason: `the host's keychain holds no material for this session's ${entry.ref.kind} credential reference; launching without it would fall through the runtime's precedence order to whatever the spool holds`,
493
- branchLabel: args.branchLabel
494
- });
495
- }
496
- out[entry.variable] = material;
497
- }
498
- return out;
499
- }
500
-
501
- // src/official/env-registry.ts
502
- var NON_CREDENTIAL_ENV_REGISTRY = [
503
- "AI_AGENT",
504
- "ALACRITTY_LOG",
505
- "ALLOW_ANT_COMPUTER_USE_MCP",
506
- "ANTHROPIC_BEDROCK_SERVICE_TIER",
507
- "ANTHROPIC_BETAS",
508
- "ANTHROPIC_CUSTOM_MODEL_OPTION",
509
- "ANTHROPIC_CUSTOM_MODEL_OPTION_DESCRIPTION",
510
- "ANTHROPIC_CUSTOM_MODEL_OPTION_NAME",
511
- "ANTHROPIC_DEFAULT_FABLE_MODEL",
512
- "ANTHROPIC_DEFAULT_FABLE_MODEL_DESCRIPTION",
513
- "ANTHROPIC_DEFAULT_FABLE_MODEL_NAME",
514
- "ANTHROPIC_DEFAULT_HAIKU_MODEL",
515
- "ANTHROPIC_DEFAULT_HAIKU_MODEL_DESCRIPTION",
516
- "ANTHROPIC_DEFAULT_HAIKU_MODEL_NAME",
517
- "ANTHROPIC_DEFAULT_MODEL",
518
- "ANTHROPIC_DEFAULT_OPUS_MODEL",
519
- "ANTHROPIC_DEFAULT_OPUS_MODEL_DESCRIPTION",
520
- "ANTHROPIC_DEFAULT_OPUS_MODEL_NAME",
521
- "ANTHROPIC_DEFAULT_SONNET_MODEL",
522
- "ANTHROPIC_DEFAULT_SONNET_MODEL_DESCRIPTION",
523
- "ANTHROPIC_DEFAULT_SONNET_MODEL_NAME",
524
- "ANTHROPIC_FEDERATION_RULE_ID",
525
- "ANTHROPIC_FOUNDRY_RESOURCE",
526
- "ANTHROPIC_GOOGLE_CLOUD_LOCATION",
527
- "ANTHROPIC_MODEL",
528
- "ANTHROPIC_SMALL_FAST_MODEL",
529
- "ANT_OTEL_EXPORTER_OTLP_PROTOCOL",
530
- "ANT_OTEL_LOGS_EXPORTER",
531
- "ANT_OTEL_METRICS_EXPORTER",
532
- "ANT_OTEL_RESOURCE_ATTRIBUTES",
533
- "ANT_OTEL_TRACES_EXPORTER",
534
- "API_FORCE_IDLE_TIMEOUT",
535
- "API_TIMEOUT_MS",
536
- "AWS_CONFIG_FILE",
537
- "AWS_EXECUTION_ENV",
538
- "AWS_LAMBDA_FUNCTION_NAME",
539
- "AWS_ROLE_ARN",
540
- "AZURE_FUNCTIONS_ENVIRONMENT",
541
- "BASH_ENV",
542
- "BASH_MAX_OUTPUT_LENGTH",
543
- "BAT_THEME",
544
- "BIGINT_FORMAT_RANGES",
545
- "BUN_CHROME_PATH",
546
- "BUN_CONFIG_FILE",
547
- "BUN_INSTALL",
548
- "CARGO_HOME",
549
- "CCR_ENABLE_BUNDLE",
550
- "CCR_FORCE_BUNDLE",
551
- "CCR_ON_BRANCH_DEFAULT_GUARD",
552
- "CF_PAGES",
553
- "CLAUDE_AFK_COUNTDOWN_MS",
554
- "CLAUDE_AFK_TIMEOUT_MS",
555
- "CLAUDE_AFTER_LAST_COMPACT",
556
- "CLAUDE_AGENTS_SELECT",
557
- "CLAUDE_AGENT_SDK_CLIENT_APP",
558
- "CLAUDE_AGENT_SDK_DISABLE_BUILTIN_AGENTS",
559
- "CLAUDE_AGENT_SDK_MCP_NO_PREFIX",
560
- "CLAUDE_AGENT_SDK_VERSION",
561
- "CLAUDE_ASYNC_AGENT_STALL_TIMEOUT_MS",
562
- "CLAUDE_AUTOCOMPACT_PCT_OVERRIDE",
563
- "CLAUDE_AUTO_BACKGROUND_TASKS",
564
- "CLAUDE_AX_PREPARK_MS",
565
- "CLAUDE_AX_SCREEN_READER",
566
- "CLAUDE_AX_STARTUP_QUIET_MS",
567
- "CLAUDE_BG_BACKEND",
568
- "CLAUDE_BG_ISOLATION",
569
- "CLAUDE_BG_MEMORY_TOGGLED_OFF",
570
- "CLAUDE_BG_POST_CLEAR_RESPAWN",
571
- "CLAUDE_BG_RENDEZVOUS_SOCK",
572
- "CLAUDE_BG_SOURCE",
573
- "CLAUDE_BG_STARTUP_WEDGE_MS",
574
- "CLAUDE_BG_TCC_DISCLAIMED",
575
- "CLAUDE_BRIDGE_REATTACH_GROUPING",
576
- "CLAUDE_BRIDGE_REATTACH_NO_BACKFILL",
577
- "CLAUDE_BRIDGE_REATTACH_OUTBOUND_ONLY",
578
- "CLAUDE_BRIDGE_REATTACH_OWNER_ACCT",
579
- "CLAUDE_BRIDGE_REATTACH_OWNER_ORG",
580
- "CLAUDE_BRIDGE_REATTACH_SEQ",
581
- "CLAUDE_BYTE_STREAM_IDLE_TIMEOUT_MS",
582
- "CLAUDE_CHROME_CLASSIFIER_FLOOR",
583
- "CLAUDE_CHROME_PERMISSION_MODE",
584
- "CLAUDE_CLIENT_PRESENCE_FILE",
585
- "CLAUDE_CODE_3P_PROBE_WROTE_OPUS_DEFAULT",
586
- "CLAUDE_CODE_3P_PROBE_WROTE_SONNET_DEFAULT",
587
- "CLAUDE_CODE_ACCESSIBILITY",
588
- "CLAUDE_CODE_ACTION",
589
- "CLAUDE_CODE_ACT_DONT_REDERIVE",
590
- "CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD",
591
- "CLAUDE_CODE_ADDITIONAL_PROTECTION",
592
- "CLAUDE_CODE_ADOPT_UNDERIVABLE_PARKED_PERMISSION",
593
- "CLAUDE_CODE_AGENT",
594
- "CLAUDE_CODE_ALT_SCREEN_FULL_REPAINT",
595
- "CLAUDE_CODE_ALWAYS_ENABLE_EFFORT",
596
- "CLAUDE_CODE_AMBER_ASTROLABE",
597
- "CLAUDE_CODE_ARTIFACT",
598
- "CLAUDE_CODE_ARTIFACT_ASSETS",
599
- "CLAUDE_CODE_ARTIFACT_AUTO_OPEN",
600
- "CLAUDE_CODE_ARTIFACT_COMMENTS",
601
- "CLAUDE_CODE_ARTIFACT_COMMENTS_AUTOREACT",
602
- "CLAUDE_CODE_ARTIFACT_COMMENT_FAST_ACK",
603
- "CLAUDE_CODE_ARTIFACT_COMMENT_FAST_ACK_FIXED",
604
- "CLAUDE_CODE_ARTIFACT_COMMENT_RESPONDER",
605
- "CLAUDE_CODE_ARTIFACT_DB",
606
- "CLAUDE_CODE_ARTIFACT_DELETE",
607
- "CLAUDE_CODE_ARTIFACT_PREVIEW",
608
- "CLAUDE_CODE_ARTIFACT_ROOM",
609
- "CLAUDE_CODE_ARTIFACT_TYPES",
610
- "CLAUDE_CODE_ARTIFACT_TYPE_CATALOG",
611
- "CLAUDE_CODE_ARTIFACT_TYPE_CLOUD_CREATE",
612
- "CLAUDE_CODE_ARTIFACT_VERIFY",
613
- "CLAUDE_CODE_ATTRIBUTION_HEADER",
614
- "CLAUDE_CODE_AUTO_BACKGROUND_WORKER_CHECKIN_SECONDS",
615
- "CLAUDE_CODE_AUTO_COMPACT_WINDOW",
616
- "CLAUDE_CODE_AUTO_CONNECT_IDE",
617
- "CLAUDE_CODE_AUTO_MODE_EXTERNAL_PERMISSIONS",
618
- "CLAUDE_CODE_AUTO_MODE_MODEL",
619
- "CLAUDE_CODE_AWS_CHAIN_RESOLVE_TIMEOUT_MS",
620
- "CLAUDE_CODE_BASALT_COVE",
621
- "CLAUDE_CODE_BASE_REF",
622
- "CLAUDE_CODE_BASE_REFS",
623
- "CLAUDE_CODE_BASH_OUTPUT_AUDIENCE_NOTE",
624
- "CLAUDE_CODE_BASH_SANDBOX_SHOW_INDICATOR",
625
- "CLAUDE_CODE_BENCH_LIVE_COUNTS",
626
- "CLAUDE_CODE_BG_CLASSIFIER_MODEL",
627
- "CLAUDE_CODE_BG_TASKS_REPORT_RUNNING",
628
- "CLAUDE_CODE_BISON_CAIRN",
629
- "CLAUDE_CODE_BLOCKING_LIMIT_OVERRIDE",
630
- "CLAUDE_CODE_BREEZY_HORIZON",
631
- "CLAUDE_CODE_BRIDGE_MCP_CARRIER",
632
- "CLAUDE_CODE_BRIDGE_PROMPT_SHA256",
633
- "CLAUDE_CODE_BRIEF",
634
- "CLAUDE_CODE_BRIEF_UPLOAD",
635
- "CLAUDE_CODE_BUBBLEWRAP",
636
- "CLAUDE_CODE_BYOC_ENABLE_DATADOG",
637
- "CLAUDE_CODE_CCR_LAZY_SUBAGENT_HYDRATE",
638
- "CLAUDE_CODE_CLASSIFIER_SUMMARY",
639
- "CLAUDE_CODE_COLD_COMPACT",
640
- "CLAUDE_CODE_CONTAINER_ID",
641
- "CLAUDE_CODE_COORDINATOR_FORCE_WORKER_INHERIT_MODEL",
642
- "CLAUDE_CODE_COORDINATOR_WORKER_CHECKIN_SECONDS",
643
- "CLAUDE_CODE_COWORK_FRAME_ARTIFACTS",
644
- "CLAUDE_CODE_DAEMON_COLD_START",
645
- "CLAUDE_CODE_DATADOG_FLUSH_INTERVAL_MS",
646
- "CLAUDE_CODE_DD_ERROR_TRACKING_FLUSH_INTERVAL_MS",
647
- "CLAUDE_CODE_DEBUG_LOGS_DIR",
648
- "CLAUDE_CODE_DEBUG_LOG_LEVEL",
649
- "CLAUDE_CODE_DEBUG_REPAINTS",
650
- "CLAUDE_CODE_DECSTBM",
651
- "CLAUDE_CODE_DIAGNOSTICS_FILE",
652
- "CLAUDE_CODE_DIR_SYNC_DISABLE_ANCHORING",
653
- "CLAUDE_CODE_DIR_SYNC_ENGINE",
654
- "CLAUDE_CODE_DIR_SYNC_FFWD",
655
- "CLAUDE_CODE_DIR_SYNC_GIT",
656
- "CLAUDE_CODE_DIR_SYNC_STREAM",
657
- "CLAUDE_CODE_DISABLE_1M_CONTEXT",
658
- "CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING",
659
- "CLAUDE_CODE_DISABLE_ADMIN_ENV_UNION",
660
- "CLAUDE_CODE_DISABLE_ADVISOR_TOOL",
661
- "CLAUDE_CODE_DISABLE_AGENT_VIEW",
662
- "CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN",
663
- "CLAUDE_CODE_DISABLE_ARTIFACT",
664
- "CLAUDE_CODE_DISABLE_ATTACHMENTS",
665
- "CLAUDE_CODE_DISABLE_AUTO_MEMORY",
666
- "CLAUDE_CODE_DISABLE_BACKGROUND_TASKS",
667
- "CLAUDE_CODE_DISABLE_BEDROCK_CONTENT_TYPE_DEFAULT",
668
- "CLAUDE_CODE_DISABLE_BEDROCK_CONTENT_TYPE_GUARD",
669
- "CLAUDE_CODE_DISABLE_BG_EXIT_HANDOFF",
670
- "CLAUDE_CODE_DISABLE_BG_SHELL_PRESSURE_REAP",
671
- "CLAUDE_CODE_DISABLE_BUNDLED_SKILLS",
672
- "CLAUDE_CODE_DISABLE_CLAUDE_API_SKILL",
673
- "CLAUDE_CODE_DISABLE_CLAUDE_CODE_SKILL",
674
- "CLAUDE_CODE_DISABLE_CLAUDE_MDS",
675
- "CLAUDE_CODE_DISABLE_CRON",
676
- "CLAUDE_CODE_DISABLE_DIR_SYNC",
677
- "CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS",
678
- "CLAUDE_CODE_DISABLE_EXPLORE_INHERIT_CAP",
679
- "CLAUDE_CODE_DISABLE_EXPLORE_PLAN_AGENTS",
680
- "CLAUDE_CODE_DISABLE_FAST_MODE",
681
- "CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY",
682
- "CLAUDE_CODE_DISABLE_FILE_CHECKPOINTING",
683
- "CLAUDE_CODE_DISABLE_GIT_INSTRUCTIONS",
684
- "CLAUDE_CODE_DISABLE_HOOK_FORWARDING",
685
- "CLAUDE_CODE_DISABLE_LAUNCH_COMPOSER",
686
- "CLAUDE_CODE_DISABLE_LEGACY_MODEL_REMAP",
687
- "CLAUDE_CODE_DISABLE_MEMORY_BULK_INFLATE",
688
- "CLAUDE_CODE_DISABLE_MEMORY_MASS_DELETE_HOLD",
689
- "CLAUDE_CODE_DISABLE_MEMORY_PERIODIC_RESYNC",
690
- "CLAUDE_CODE_DISABLE_MEMORY_RO_UNSAVED_NOTICE",
691
- "CLAUDE_CODE_DISABLE_MEMORY_STREAM_LIST",
692
- "CLAUDE_CODE_DISABLE_MOUSE",
693
- "CLAUDE_CODE_DISABLE_MOUSE_CLICKS",
694
- "CLAUDE_CODE_DISABLE_NESTED_CHAIN_IDLE",
695
- "CLAUDE_CODE_DISABLE_NESTED_USER_REPAIR",
696
- "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC",
697
- "CLAUDE_CODE_DISABLE_NONSTREAMING_FALLBACK",
698
- "CLAUDE_CODE_DISABLE_NOTIFICATION_PRESENCE_CHECK",
699
- "CLAUDE_CODE_DISABLE_OFFICIAL_MARKETPLACE_AUTOINSTALL",
700
- "CLAUDE_CODE_DISABLE_ORG_MEMORY",
701
- "CLAUDE_CODE_DISABLE_PERMISSION_PROMPT_NOTIFY_HOOKS",
702
- "CLAUDE_CODE_DISABLE_PLUGIN_FORWARDING",
703
- "CLAUDE_CODE_DISABLE_POLICY_SKILLS",
704
- "CLAUDE_CODE_DISABLE_PRECOMPACT_SKIP",
705
- "CLAUDE_CODE_DISABLE_REFUSAL_FALLBACK",
706
- "CLAUDE_CODE_DISABLE_TERMINAL_TITLE",
707
- "CLAUDE_CODE_DISABLE_THINKING",
708
- "CLAUDE_CODE_DISABLE_UNKNOWN_MODEL_WINDOW_ENFORCEMENT",
709
- "CLAUDE_CODE_DISABLE_VIRTUAL_SCROLL",
710
- "CLAUDE_CODE_DISABLE_VITALS_EMITTER",
711
- "CLAUDE_CODE_DISABLE_WORKFLOWS",
712
- "CLAUDE_CODE_DISABLE_WORKING_SYNC",
713
- "CLAUDE_CODE_DONT_INHERIT_ENV",
714
- "CLAUDE_CODE_DOWNLOAD_DEADLINE_MS_FOR_TESTING",
715
- "CLAUDE_CODE_EAGER_FLUSH",
716
- "CLAUDE_CODE_EFFORT_LEVEL",
717
- "CLAUDE_CODE_EMIT_TOOL_USE_SUMMARIES",
718
- "CLAUDE_CODE_ENABLE_APPEND_SUBAGENT_PROMPT",
719
- "CLAUDE_CODE_ENABLE_AWAY_SUMMARY",
720
- "CLAUDE_CODE_ENABLE_BACKGROUND_PLUGIN_REFRESH",
721
- "CLAUDE_CODE_ENABLE_CFC",
722
- "CLAUDE_CODE_ENABLE_EXPERIMENTAL_ADVISOR_TOOL",
723
- "CLAUDE_CODE_ENABLE_FEEDBACK_SURVEY_FOR_OTEL",
724
- "CLAUDE_CODE_ENABLE_FINE_GRAINED_TOOL_STREAMING",
725
- "CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY",
726
- "CLAUDE_CODE_ENABLE_LAUNCH_COMPOSER",
727
- "CLAUDE_CODE_ENABLE_MENU_KIND_LANES",
728
- "CLAUDE_CODE_ENABLE_NARRATION",
729
- "CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION",
730
- "CLAUDE_CODE_ENABLE_REFRESH_MCP_TOOLS",
731
- "CLAUDE_CODE_ENABLE_REMOTE_RECAP",
732
- "CLAUDE_CODE_ENABLE_SDK_FILE_CHECKPOINTING",
733
- "CLAUDE_CODE_ENABLE_TASKS",
734
- "CLAUDE_CODE_ENABLE_TODO_TOOLS",
735
- "CLAUDE_CODE_ENABLE_XAA",
736
- "CLAUDE_CODE_ENHANCED_TELEMETRY_BETA",
737
- "CLAUDE_CODE_ENTRYPOINT",
738
- "CLAUDE_CODE_ENVIRONMENT_KIND",
739
- "CLAUDE_CODE_ENVIRONMENT_RUNNER_VERSION",
740
- "CLAUDE_CODE_EXIT_AFTER_FIRST_RENDER",
741
- "CLAUDE_CODE_EXIT_AFTER_STOP_DELAY",
742
- "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS",
743
- "CLAUDE_CODE_EXPERIMENTAL_OBSERVER_AGENTS",
744
- "CLAUDE_CODE_EXTRA_BODY",
745
- "CLAUDE_CODE_EXTRA_METADATA",
746
- "CLAUDE_CODE_FEDERATION_CACHE_DIR",
747
- "CLAUDE_CODE_FLEETVIEW_SIMPLE",
748
- "CLAUDE_CODE_FORCE_BRIDGE",
749
- "CLAUDE_CODE_FORCE_EVALUATE_MEMORY",
750
- "CLAUDE_CODE_FORCE_FULLSCREEN_UPSELL",
751
- "CLAUDE_CODE_FORCE_MEMORY_SURVEY",
752
- "CLAUDE_CODE_FORCE_MID_CONVERSATION_SYSTEM",
753
- "CLAUDE_CODE_FORCE_STRIKETHROUGH",
754
- "CLAUDE_CODE_FORCE_SYNC_OUTPUT",
755
- "CLAUDE_CODE_FORCE_TIP_ID",
756
- "CLAUDE_CODE_FORK_SUBAGENT",
757
- "CLAUDE_CODE_FORWARD_SUBAGENT_TEXT",
758
- "CLAUDE_CODE_FRAME_TIMING_LOG",
759
- "CLAUDE_CODE_FRAME_TIMING_SAMPLE_EVERY",
760
- "CLAUDE_CODE_GAULT_KESTREL",
761
- "CLAUDE_CODE_GB_DISK_CACHE_WHEN_TELEMETRY_OFF",
762
- "CLAUDE_CODE_GB_REFRESH_INTERVAL_MS",
763
- "CLAUDE_CODE_GIT_BASH_PATH",
764
- "CLAUDE_CODE_GLOB_HIDDEN",
765
- "CLAUDE_CODE_GLOB_NO_IGNORE",
766
- "CLAUDE_CODE_GLOB_TIMEOUT_SECONDS",
767
- "CLAUDE_CODE_GOAL_CHECKIN_MINUTES",
768
- "CLAUDE_CODE_GORSE_PLOVER",
769
- "CLAUDE_CODE_GZIP_CCR_REQUEST_BODIES",
770
- "CLAUDE_CODE_GZIP_REQUEST_BODIES",
771
- "CLAUDE_CODE_HARBOR_KITE",
772
- "CLAUDE_CODE_HARBOR_KITE_CLOUD",
773
- "CLAUDE_CODE_HARBOR_KITE_PACING_OFF",
774
- "CLAUDE_CODE_HIDE_CWD",
775
- "CLAUDE_CODE_HIDE_SETTINGS_HINT",
776
- "CLAUDE_CODE_HOLD_REPORT_PARK_AT_INIT",
777
- "CLAUDE_CODE_HOLD_UNANSWERED_PARKED_PERMISSION",
778
- "CLAUDE_CODE_HOME_SEED_HOLD_TIMEOUT_MS",
779
- "CLAUDE_CODE_HOME_SEED_VERDICT_TIMEOUT_MS",
780
- "CLAUDE_CODE_HOOKS_SAME_THREAD",
781
- "CLAUDE_CODE_HOVER_REST",
782
- "CLAUDE_CODE_IDE_SKIP_AUTO_INSTALL",
783
- "CLAUDE_CODE_IDE_SKIP_VALID_CHECK",
784
- "CLAUDE_CODE_IDLE_THRESHOLD_MINUTES",
785
- "CLAUDE_CODE_INCLUDE_PARTIAL_MESSAGES",
786
- "CLAUDE_CODE_INTRO_FRAME",
787
- "CLAUDE_CODE_IS_COWORK",
788
- "CLAUDE_CODE_JUNIPER_SUNDIAL",
789
- "CLAUDE_CODE_KB_COHESION_FIXES",
790
- "CLAUDE_CODE_LANTERN_PRISM",
791
- "CLAUDE_CODE_LARCH_CISTERN",
792
- "CLAUDE_CODE_LEGACY_BUNDLE",
793
- "CLAUDE_CODE_LOOP_KEEPALIVE",
794
- "CLAUDE_CODE_LOOP_PERSISTENT",
795
- "CLAUDE_CODE_MANAGED_SETTINGS_PATH",
796
- "CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS",
797
- "CLAUDE_CODE_MAX_RETRIES",
798
- "CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH",
799
- "CLAUDE_CODE_MAX_TOOL_USE_CONCURRENCY",
800
- "CLAUDE_CODE_MAX_TURNS",
801
- "CLAUDE_CODE_MCP_ALLOWLIST_ENV",
802
- "CLAUDE_CODE_MCP_AUTO_BACKGROUND_MS",
803
- "CLAUDE_CODE_MCP_MEMORY_CGROUP",
804
- "CLAUDE_CODE_MCP_TOOL_IDLE_TIMEOUT",
805
- "CLAUDE_CODE_MEMORY_PUSH_DELETE_MODE",
806
- "CLAUDE_CODE_MOCK_REMOTE_SETTINGS",
807
- "CLAUDE_CODE_MOCK_TRIAL",
808
- "CLAUDE_CODE_NANKEEN_KESTREL",
809
- "CLAUDE_CODE_NATIVE_CURSOR",
810
- "CLAUDE_CODE_NEW_INIT",
811
- "CLAUDE_CODE_NO_FLICKER",
812
- "CLAUDE_CODE_NO_MODEL_FALLBACK",
813
- "CLAUDE_CODE_OTEL_CONTENT_MAX_LENGTH",
814
- "CLAUDE_CODE_OTEL_DIAG_STDERR",
815
- "CLAUDE_CODE_OTEL_FLUSH_TIMEOUT_MS",
816
- "CLAUDE_CODE_OTEL_SHUTDOWN_TIMEOUT_MS",
817
- "CLAUDE_CODE_OVERRIDE_DATE",
818
- "CLAUDE_CODE_PACKAGE_MANAGER_AUTO_UPDATE",
819
- "CLAUDE_CODE_PARCHMENT_FERN",
820
- "CLAUDE_CODE_PARKED_PERMISSION_WAIT_MS",
821
- "CLAUDE_CODE_PARKED_STOP_RETIRES",
822
- "CLAUDE_CODE_PERFETTO_TRACE",
823
- "CLAUDE_CODE_PERFETTO_WRITE_INTERVAL_S",
824
- "CLAUDE_CODE_PERFORCE_MODE",
825
- "CLAUDE_CODE_PEWTER_OWL",
826
- "CLAUDE_CODE_PEWTER_OWL_TOOL",
827
- "CLAUDE_CODE_PLAN_MODE_REQUIRED",
828
- "CLAUDE_CODE_PLAN_V2_AGENT_COUNT",
829
- "CLAUDE_CODE_PLAN_V2_EXPLORE_AGENT_COUNT",
830
- "CLAUDE_CODE_PLUGIN_ATTRIBUTION",
831
- "CLAUDE_CODE_PLUGIN_BINARY_ASSETS",
832
- "CLAUDE_CODE_PLUGIN_CACHE_DIR",
833
- "CLAUDE_CODE_PLUGIN_GIT_TIMEOUT_MS",
834
- "CLAUDE_CODE_PLUGIN_KEEP_MARKETPLACE_ON_FAILURE",
835
- "CLAUDE_CODE_PLUGIN_PREFER_HTTPS",
836
- "CLAUDE_CODE_PLUGIN_SEED_DIR",
837
- "CLAUDE_CODE_PLUGIN_USE_ZIP_CACHE",
838
- "CLAUDE_CODE_POLL_EVENTS",
839
- "CLAUDE_CODE_POWERSHELL_RESPECT_EXECUTION_POLICY",
840
- "CLAUDE_CODE_POWERUP_ONBOARDING",
841
- "CLAUDE_CODE_PRINT_BG_WAIT_CEILING_MS",
842
- "CLAUDE_CODE_PRINT_ENGINE_LOOP",
843
- "CLAUDE_CODE_PROACTIVE",
844
- "CLAUDE_CODE_PROMPT_CACHE_TTL",
845
- "CLAUDE_CODE_PROPAGATE_TRACEPARENT",
846
- "CLAUDE_CODE_PWSH_PARSE_TIMEOUT_MS",
847
- "CLAUDE_CODE_QUESTION_PREVIEW_FORMAT",
848
- "CLAUDE_CODE_RATE_LIMIT_TIER",
849
- "CLAUDE_CODE_REFUSAL_FALLBACK_CATCH_ALL",
850
- "CLAUDE_CODE_RELAUNCH_TERMINAL_SIZE",
851
- "CLAUDE_CODE_REMOTE",
852
- "CLAUDE_CODE_REMOTE_ENVIRONMENT_TYPE",
853
- "CLAUDE_CODE_REMOTE_HERMETIC_MODE",
854
- "CLAUDE_CODE_REMOTE_MEMORY_DIR",
855
- "CLAUDE_CODE_REMOTE_RAW_EVENTS_FILE",
856
- "CLAUDE_CODE_REMOTE_SEND_KEEPALIVES",
857
- "CLAUDE_CODE_REMOTE_SETTINGS_PATH",
858
- "CLAUDE_CODE_REMOTE_SETTINGS_POLL_MS",
859
- "CLAUDE_CODE_REPL",
860
- "CLAUDE_CODE_REPORT_FINDINGS",
861
- "CLAUDE_CODE_REPO_CHECKOUTS",
862
- "CLAUDE_CODE_RESTRICTED",
863
- "CLAUDE_CODE_RESUME_INTERRUPTED_TURN",
864
- "CLAUDE_CODE_RESUME_INTERRUPTED_TURN_MAX_AGE_MS",
865
- "CLAUDE_CODE_RESUME_PROMPT",
866
- "CLAUDE_CODE_RESUME_SOURCE_ALIVE",
867
- "CLAUDE_CODE_RESUME_THRESHOLD_MINUTES",
868
- "CLAUDE_CODE_RESUME_TOLERATES_CONTEXT_APPENDS",
869
- "CLAUDE_CODE_RETIRE_UNANSWERED_PARKED_PERMISSION",
870
- "CLAUDE_CODE_RETRY_WATCHDOG",
871
- "CLAUDE_CODE_SABLE_THRUSH",
872
- "CLAUDE_CODE_SAFE_MODE",
873
- "CLAUDE_CODE_SANDBOXED",
874
- "CLAUDE_CODE_SCRIPT_CAPS",
875
- "CLAUDE_CODE_SCROLL_SPEED",
876
- "CLAUDE_CODE_SEND_FEEDBACK",
877
- "CLAUDE_CODE_SHELL",
878
- "CLAUDE_CODE_SHELL_PREFIX",
879
- "CLAUDE_CODE_SILENT_TURN_REMINDER",
880
- "CLAUDE_CODE_SILENT_TURN_REMINDER_TEXT",
881
- "CLAUDE_CODE_SILENT_TURN_REMINDER_TURNS",
882
- "CLAUDE_CODE_SIMPLE",
883
- "CLAUDE_CODE_SIMPLE_SYSTEM_PROMPT",
884
- "CLAUDE_CODE_SKILL_PROPOSALS",
885
- "CLAUDE_CODE_SKIP_FAST_MODE_NETWORK_ERRORS",
886
- "CLAUDE_CODE_SKIP_FAST_MODE_ORG_CHECK",
887
- "CLAUDE_CODE_SKIP_HFI_VERSION_CHECK",
888
- "CLAUDE_CODE_SKIP_PLUGIN_MCP_SERVERS",
889
- "CLAUDE_CODE_SKIP_PLUGIN_MCP_SERVERS_EXCEPT",
890
- "CLAUDE_CODE_SKIP_PROMPT_HISTORY",
891
- "CLAUDE_CODE_SKIP_REPO_UPLOAD",
892
- "CLAUDE_CODE_SLOW_OPERATION_THRESHOLD_MS",
893
- "CLAUDE_CODE_SPAWN_TIMESTAMP_MS",
894
- "CLAUDE_CODE_SSE_PORT",
895
- "CLAUDE_CODE_STALL_TIMEOUT_MS_FOR_TESTING",
896
- "CLAUDE_CODE_STOP_HOOK_BLOCK_CAP",
897
- "CLAUDE_CODE_SUBAGENT_CACHE_EVICT",
898
- "CLAUDE_CODE_SUBAGENT_MODEL",
899
- "CLAUDE_CODE_SUBAGENT_PROMPT_CACHE_TTL",
900
- "CLAUDE_CODE_SUBPROCESS_ENV_SCRUB",
901
- "CLAUDE_CODE_SUBSCRIPTION_TYPE",
902
- "CLAUDE_CODE_SUPERVISED",
903
- "CLAUDE_CODE_SYNC_PLUGINS",
904
- "CLAUDE_CODE_SYNC_PLUGINS_BUFFERED_DOWNLOAD",
905
- "CLAUDE_CODE_SYNC_PLUGINS_DOWNLOAD_STALL_MS",
906
- "CLAUDE_CODE_SYNC_PLUGINS_INSTALL_TIMEOUT_MS",
907
- "CLAUDE_CODE_SYNC_PLUGINS_MCP_TIMEOUT_MS",
908
- "CLAUDE_CODE_SYNC_PLUGIN_INSTALL",
909
- "CLAUDE_CODE_SYNC_PLUGIN_INSTALL_TIMEOUT_MS",
910
- "CLAUDE_CODE_SYNC_SKILLS",
911
- "CLAUDE_CODE_SYNC_SKILLS_INSTALL_TIMEOUT_MS",
912
- "CLAUDE_CODE_SYNC_SKILLS_WAIT_TIMEOUT_MS",
913
- "CLAUDE_CODE_SYNTAX_HIGHLIGHT",
914
- "CLAUDE_CODE_SYSTEM_PROMPT_GB_FEATURE",
915
- "CLAUDE_CODE_TAGS",
916
- "CLAUDE_CODE_TAG_ISMETA_MESSAGES",
917
- "CLAUDE_CODE_TASK_LIST_ID",
918
- "CLAUDE_CODE_TEAM_TEARDOWN_PARK_TIMEOUT_MS",
919
- "CLAUDE_CODE_TEE_SDK_STDOUT",
920
- "CLAUDE_CODE_TERMINAL_MCP_TOOLS",
921
- "CLAUDE_CODE_TERMINAL_RECORDING",
922
- "CLAUDE_CODE_TEST_ALLOW_REAL_NETWORK",
923
- "CLAUDE_CODE_TEST_FIXTURES_ROOT",
924
- "CLAUDE_CODE_TEST_FORCE_DENY",
925
- "CLAUDE_CODE_TEST_NO_GIT_BASH",
926
- "CLAUDE_CODE_TEST_NO_PWSH",
927
- "CLAUDE_CODE_THINKING_DISPLAY_UPDATES",
928
- "CLAUDE_CODE_THISTLE_GREBE",
929
- "CLAUDE_CODE_THRIFTY_SONIC",
930
- "CLAUDE_CODE_TMPDIR",
931
- "CLAUDE_CODE_TMUX_PREFIX",
932
- "CLAUDE_CODE_TMUX_PREFIX_CONFLICTS",
933
- "CLAUDE_CODE_TMUX_TRUECOLOR",
934
- "CLAUDE_CODE_TOASTY_THIMBLE",
935
- "CLAUDE_CODE_TODO_REMINDER_MODE",
936
- "CLAUDE_CODE_TOOL_MEMORY_CGROUP_EXCLUDE",
937
- "CLAUDE_CODE_TOOL_MEMORY_LIMIT",
938
- "CLAUDE_CODE_TRANSCRIPT_LOCAL_GC",
939
- "CLAUDE_CODE_TRIGGER_ID",
940
- "CLAUDE_CODE_TUI_JUST_SWITCHED",
941
- "CLAUDE_CODE_TUI_TRIAL",
942
- "CLAUDE_CODE_TURN_UPDATES",
943
- "CLAUDE_CODE_TWO_STAGE_CLASSIFIER",
944
- "CLAUDE_CODE_ULTRAREVIEW_PREFLIGHT_FIXTURE",
945
- "CLAUDE_CODE_ULTRAREVIEW_QUOTA_FIXTURE",
946
- "CLAUDE_CODE_USER_DIALOG_TIMEOUT_MS",
947
- "CLAUDE_CODE_USER_EMAIL",
948
- "CLAUDE_CODE_USE_ANTHROPIC_AWS",
949
- "CLAUDE_CODE_USE_ANTHROPIC_GOOGLE_CLOUD",
950
- "CLAUDE_CODE_USE_BEDROCK",
951
- "CLAUDE_CODE_USE_COWORK_PLUGINS",
952
- "CLAUDE_CODE_USE_FOUNDRY",
953
- "CLAUDE_CODE_USE_GATEWAY",
954
- "CLAUDE_CODE_USE_MANTLE",
955
- "CLAUDE_CODE_USE_NATIVE_FILE_SEARCH",
956
- "CLAUDE_CODE_USE_POWERSHELL_TOOL",
957
- "CLAUDE_CODE_USE_VERTEX",
958
- "CLAUDE_CODE_VOICE_FORWARD_INTERIMS_TYPED",
959
- "CLAUDE_CODE_WALNUT_SPIRE",
960
- "CLAUDE_CODE_WEBFETCH_CACHE_TTL_MS",
961
- "CLAUDE_CODE_WEB_FETCH_AGENT",
962
- "CLAUDE_CODE_WILLOW_TERN",
963
- "CLAUDE_CODE_WORKER_EPOCH",
964
- "CLAUDE_CODE_WORKFLOWS",
965
- "CLAUDE_CODE_WORKFLOW_PREFIX_STAGGER_MS",
966
- "CLAUDE_CODE_WORKFLOW_SIZE_WARNING_AGENTS",
967
- "CLAUDE_CONTEXT_COLLAPSE",
968
- "CLAUDE_CONTEXT_COLLAPSE_MODEL",
969
- "CLAUDE_COWORK_MEMORY_EXTRA_GUIDELINES",
970
- "CLAUDE_COWORK_MEMORY_GUIDELINES",
971
- "CLAUDE_COWORK_MEMORY_INDEX_CONTENT",
972
- "CLAUDE_COWORK_MEMORY_PATH_OVERRIDE",
973
- "CLAUDE_DEBUG",
974
- "CLAUDE_DISABLE_ADOPT",
975
- "CLAUDE_ENABLE_BYTE_WATCHDOG",
976
- "CLAUDE_ENABLE_BYTE_WATCHDOG_BEDROCK",
977
- "CLAUDE_ENABLE_STREAM_WATCHDOG",
978
- "CLAUDE_ENV_FILE",
979
- "CLAUDE_FORCE_DISPLAY_SURVEY",
980
- "CLAUDE_GATEWAY_ALLOW_LOOPBACK",
981
- "CLAUDE_GATEWAY_LOG_LEVEL",
982
- "CLAUDE_IMPORT_CONVERSATIONS",
983
- "CLAUDE_INTERNAL_ASSISTANT_TEAM_NAME",
984
- "CLAUDE_INTERNAL_FC_OVERRIDES",
985
- "CLAUDE_JOB_DIR",
986
- "CLAUDE_MOCK_HEADERLESS_429",
987
- "CLAUDE_PTY_HEARTBEAT_MS",
988
- "CLAUDE_PTY_ORPHAN_CHECK_MS",
989
- "CLAUDE_PTY_RECORD",
990
- "CLAUDE_REMOTE_WORKFLOW_ARGS",
991
- "CLAUDE_REMOTE_WORKFLOW_SCRIPT",
992
- "CLAUDE_REPL_VARIANT",
993
- "CLAUDE_RUNNER_ACTIVITY_FD",
994
- "CLAUDE_RUNNER_DISABLE_AWAITING_ACTION_OVERRIDE",
995
- "CLAUDE_RUNNER_FETCH_DEPTH",
996
- "CLAUDE_SERVE_DRAIN_TIMEOUT_MS",
997
- "CLAUDE_SLOW_FIRST_BYTE_MS",
998
- "CLAUDE_SNIP",
999
- "CLAUDE_SSH_LOCAL_BINARY",
1000
- "CLAUDE_SSH_VERSION",
1001
- "CLAUDE_STAGE_FILE_ROOT",
1002
- "CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS",
1003
- "CLAUDE_STREAM_IDLE_TIMEOUT_MS",
1004
- "CLAUDE_SUBAGENT_BG_SHELL_MAX_MS",
1005
- "CLAUDE_TMPDIR",
1006
- "CLAUDE_WORKFLOW_NAME_ONLY",
1007
- "CLOUDSDK_CONFIG",
1008
- "CONTAINER_SANDBOX_MOUNT_POINT",
1009
- "CURSOR_TRACE_ID",
1010
- "DAYTONA_WS_ID",
1011
- "DEBUG_CLAUDE_AGENT_SDK",
1012
- "DEBUG_SDK",
1013
- "DEMO_VERSION",
1014
- "DENO_DEPLOYMENT_ID",
1015
- "DISABLE_AUTOUPDATER",
1016
- "DISABLE_AUTO_COMPACT",
1017
- "DISABLE_BRIEF_MODE_STOP_HOOK",
1018
- "DISABLE_BUG_COMMAND",
1019
- "DISABLE_COST_WARNINGS",
1020
- "DISABLE_DOCTOR_COMMAND",
1021
- "DISABLE_ERROR_REPORTING",
1022
- "DISABLE_EXTRA_USAGE_COMMAND",
1023
- "DISABLE_FEEDBACK_COMMAND",
1024
- "DISABLE_GROWTHBOOK",
1025
- "DISABLE_INSTALL_GITHUB_APP_COMMAND",
1026
- "DISABLE_INTERLEAVED_THINKING",
1027
- "DISABLE_LOGOUT_COMMAND",
1028
- "DISABLE_PROMPT_CACHING",
1029
- "DISABLE_PROMPT_CACHING_FABLE",
1030
- "DISABLE_PROMPT_CACHING_HAIKU",
1031
- "DISABLE_PROMPT_CACHING_MYTHOS",
1032
- "DISABLE_PROMPT_CACHING_OPUS",
1033
- "DISABLE_PROMPT_CACHING_SONNET",
1034
- "DISABLE_TELEMETRY",
1035
- "DISABLE_UPDATES",
1036
- "DISABLE_UPGRADE_COMMAND",
1037
- "DOCKER_CONFIG",
1038
- "DO_NOT_TRACK",
1039
- "EMBEDDED_SEARCH_TOOLS",
1040
- "EMPTY_PATH",
1041
- "ENABLE_BETA_TRACING_DETAILED",
1042
- "ENABLE_CLAUDEAI_MCP_SERVERS",
1043
- "ENABLE_ENHANCED_TELEMETRY_BETA",
1044
- "ENABLE_LOCKLESS_UPDATES",
1045
- "ENABLE_LSP_TOOL",
1046
- "ENABLE_MCP_LARGE_OUTPUT_FILES",
1047
- "ENABLE_PID_BASED_VERSION_LOCKING",
1048
- "ENABLE_PROMPT_CACHING_1H",
1049
- "ENABLE_PROMPT_CACHING_1H_BEDROCK",
1050
- "ENABLE_TOOL_SEARCH",
1051
- "FALLBACK_FOR_ALL_PRIMARY_MODELS",
1052
- "FORCE_AUTOUPDATE_PLUGINS",
1053
- "FORCE_CODE_TERMINAL",
1054
- "FORCE_COLOR",
1055
- "FORCE_PROMPT_CACHING_5M",
1056
- "FORCE_VCR",
1057
- "GCM_INTERACTIVE",
1058
- "GITHUB_ACTIONS",
1059
- "GITHUB_ACTION_INPUTS",
1060
- "GITHUB_ACTION_PATH",
1061
- "GITHUB_ACTOR",
1062
- "GITHUB_ACTOR_ID",
1063
- "GITHUB_ENV",
1064
- "GITHUB_EVENT_NAME",
1065
- "GITHUB_EVENT_PATH",
1066
- "GITHUB_REPOSITORY",
1067
- "GITHUB_REPOSITORY_ID",
1068
- "GITHUB_REPOSITORY_OWNER",
1069
- "GITHUB_REPOSITORY_OWNER_ID",
1070
- "GITLAB_CI",
1071
- "GIT_ASKPASS",
1072
- "GIT_CONFIG_COUNT",
1073
- "GIT_CONFIG_GLOBAL",
1074
- "GIT_CONFIG_SYSTEM",
1075
- "GIT_SSH_COMMAND",
1076
- "GIT_TERMINAL_PROMPT",
1077
- "GNOME_TERMINAL_SERVICE",
1078
- "GOOGLE_CLOUD_WORKSTATIONS",
1079
- "GRADLE_USER_HOME",
1080
- "INK_SCREEN_READER",
1081
- "INTELLIJ_TERMINAL_COMMAND_BLOCKS",
1082
- "INTELLIJ_TERMINAL_COMMAND_BLOCKS_REWORKED",
1083
- "IS_DEMO",
1084
- "IS_SANDBOX",
1085
- "JAVA_HOME",
1086
- "JAVA_TOOL_OPTIONS",
1087
- "KITTY_WINDOW_ID",
1088
- "KONSOLE_VERSION",
1089
- "K_SERVICE",
1090
- "LC_ALL",
1091
- "LC_TERMINAL",
1092
- "LC_TIME",
1093
- "LOCAL_BRIDGE",
1094
- "MAX_STRUCTURED_OUTPUT_RETRIES",
1095
- "MCP_CONNECTION_NONBLOCKING",
1096
- "MCP_CONNECT_TIMEOUT_MS",
1097
- "MCP_DISCOVERY_CACHE",
1098
- "MCP_DISCOVERY_CACHE_MAX_STALE_S",
1099
- "MCP_DISCOVERY_CACHE_STRIKES",
1100
- "MCP_DISCOVERY_CACHE_TTL_S",
1101
- "MCP_PROTOCOL_NEGOTIATION",
1102
- "MCP_REMOTE_SERVER_CONNECTION_BATCH_SIZE",
1103
- "MCP_SDK_GENERATION",
1104
- "MCP_SERVER_CONNECTION_BATCH_SIZE",
1105
- "MCP_TIMEOUT",
1106
- "MCP_TOOL_TIMEOUT",
1107
- "MCP_TRUNCATION_PROMPT_OVERRIDE",
1108
- "NODE_OPTIONS",
1109
- "NO_COLOR",
1110
- "NPM_CONFIG_GLOBALCONFIG",
1111
- "NPM_CONFIG_USERCONFIG",
1112
- "NUMBER_FORMAT_RANGES",
1113
- "OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT",
1114
- "OTEL_EXPORTER_OTLP_LOGS_PROTOCOL",
1115
- "OTEL_EXPORTER_OTLP_METRICS_PROTOCOL",
1116
- "OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE",
1117
- "OTEL_EXPORTER_OTLP_PROTOCOL",
1118
- "OTEL_EXPORTER_OTLP_TRACES_PROTOCOL",
1119
- "OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT",
1120
- "OTEL_LOGS_EXPORTER",
1121
- "OTEL_LOGS_EXPORT_INTERVAL",
1122
- "OTEL_LOG_ASSISTANT_RESPONSES",
1123
- "OTEL_LOG_RAW_API_BODIES",
1124
- "OTEL_LOG_TOOL_CONTENT",
1125
- "OTEL_LOG_TOOL_DETAILS",
1126
- "OTEL_LOG_USER_PROMPTS",
1127
- "OTEL_METRICS_EXPORTER",
1128
- "OTEL_METRIC_EXPORT_INTERVAL",
1129
- "OTEL_RESOURCE_ATTRIBUTES",
1130
- "OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT",
1131
- "OTEL_TRACES_EXPORTER",
1132
- "OTEL_TRACES_EXPORT_INTERVAL",
1133
- "PIP_CONFIG_FILE",
1134
- "PLAYWRIGHT_BROWSERS_PATH",
1135
- "REPL_ID",
1136
- "REPL_SLUG",
1137
- "RUNNER_ENVIRONMENT",
1138
- "RUNNER_OS",
1139
- "RUSTUP_HOME",
1140
- "SDK_NATIVE_BIN",
1141
- "SLASH_COMMAND_TOOL_CHAR_BUDGET",
1142
- "SPACE_CREATOR_USER_ID",
1143
- "SSH_CLIENT",
1144
- "SSH_CONNECTION",
1145
- "SSH_TTY",
1146
- "SUDO_GID",
1147
- "SUDO_UID",
1148
- "SUDO_USER",
1149
- "TASK_MAX_OUTPUT_LENGTH",
1150
- "TERMINAL_EMULATOR",
1151
- "TERMINATOR_UUID",
1152
- "TERMUX_VERSION",
1153
- "TERM_PROGRAM",
1154
- "TERM_PROGRAM_VERSION",
1155
- "TILIX_ID",
1156
- "TMUX_PANE",
1157
- "ULTRAPLAN_PROMPT_FILE",
1158
- "USE_API_CONTEXT_MANAGEMENT",
1159
- "USE_BUILTIN_RIPGREP",
1160
- "UV_THREADPOOL_SIZE",
1161
- "VCR_RECORD",
1162
- "VITALS_EMITTER_BIN",
1163
- "VSCODE_GIT_ASKPASS_MAIN",
1164
- "VTE_VERSION",
1165
- "WAYLAND_DISPLAY",
1166
- "WEBSITE_SITE_NAME",
1167
- "WEBSITE_SKU",
1168
- "WSL_DISTRO_NAME",
1169
- "WSL_INTEROP",
1170
- "XDG_CONFIG_HOME",
1171
- "XDG_DATA_HOME",
1172
- "XDG_RUNTIME_DIR",
1173
- "XTERM_VERSION",
1174
- "ZED_TERM"
1175
- ];
1176
-
1177
- // src/official/env-allowlist.ts
1178
- var MINIMAL_OS_VARIABLES = ["PATH", "HOME", "USER", "SHELL", "TERM", "LANG"];
1179
- var MINIMAL_OS_VARIABLE_PREFIXES = ["LC_"];
1180
- var OFFICIAL_RUNTIME_VARIABLES = {
1181
- configDir: "CLAUDE_CONFIG_DIR",
1182
- projectDirName: "CLAUDE_CODE_PROJECT_DIR_NAME",
1183
- tmpdir: "CLAUDE_CODE_TMPDIR"
1184
- };
1185
- var PROXY_AND_TELEMETRY_VARIABLES = [
1186
- "HTTP_PROXY",
1187
- "HTTPS_PROXY",
1188
- "ALL_PROXY",
1189
- "NO_PROXY",
1190
- "http_proxy",
1191
- "https_proxy",
1192
- "all_proxy",
1193
- "no_proxy",
1194
- "CLAUDE_CODE_ENABLE_TELEMETRY",
1195
- "DISABLE_TELEMETRY",
1196
- "DISABLE_ERROR_REPORTING"
1197
- ];
1198
- var PROXY_AND_TELEMETRY_PREFIXES = ["OTEL_"];
1199
- var TRAFFIC_OPT_OUT_VARIABLES = {
1200
- CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: "1",
1201
- DISABLE_TELEMETRY: "1",
1202
- DISABLE_ERROR_REPORTING: "1",
1203
- DISABLE_AUTOUPDATER: "1"
1204
- };
1205
- var TRAFFIC_OPT_OUT_VARIABLE_NAMES = Object.keys(TRAFFIC_OPT_OUT_VARIABLES);
1206
- var PATH_LIST_VARIABLES = ["PATH"];
1207
- function sanitizePathListValue(value) {
1208
- return value.split(":").filter((entry) => entry.length > 0 && !VENDOR_HOME_SEGMENT_RE.test(entry)).join(":");
1209
- }
1210
- var EXECUTION_INDIRECTION_ENV_NAMES = [
1211
- "BASH_ENV",
1212
- "ENV",
1213
- "SHELLOPTS",
1214
- "BASHOPTS",
1215
- "PS4",
1216
- "IFS",
1217
- "CDPATH",
1218
- "FPATH",
1219
- "ZDOTDIR",
1220
- "COMSPEC",
1221
- "PATH",
1222
- "PSMODULEPATH",
1223
- "PROMPT_COMMAND",
1224
- "NODE_OPTIONS",
1225
- "NODE_PATH",
1226
- "NODE_REPL_EXTERNAL_MODULE",
1227
- "PERLLIB",
1228
- "GEM_PATH",
1229
- "GEM_HOME",
1230
- "JAVA_TOOL_OPTIONS",
1231
- "_JAVA_OPTIONS",
1232
- "JDK_JAVA_OPTIONS",
1233
- "IBM_JAVA_OPTIONS",
1234
- "OPENJ9_JAVA_OPTIONS",
1235
- "CLASSPATH",
1236
- "BUN_OPTIONS",
1237
- "BUN_INSPECT",
1238
- "MONO_PATH",
1239
- "R_PROFILE_USER",
1240
- "DEVPATH",
1241
- "GCONV_PATH",
1242
- "PHPRC",
1243
- "PHP_INI_SCAN_DIR",
1244
- "OPENSSL_CONF",
1245
- "OPENSSL_MODULES",
1246
- "OPENSSL_ENGINES",
1247
- "KRB5_CONFIG",
1248
- "GTK_PATH",
1249
- "QT_PLUGIN_PATH",
1250
- "GIO_MODULE_DIR",
1251
- "SASL_PATH",
1252
- "XDG_CONFIG_HOME",
1253
- "SSH_ASKPASS",
1254
- "SSH_ASKPASS_REQUIRE",
1255
- "SUDO_ASKPASS",
1256
- "VSCODE_GIT_ASKPASS_MAIN",
1257
- "PAGER",
1258
- "EDITOR",
1259
- "VISUAL",
1260
- "CLAUDE_CODE_SHELL",
1261
- "CLAUDE_CODE_SHELL_PREFIX",
1262
- "CLAUDE_CODE_GIT_BASH_PATH",
1263
- "CLAUDE_ENV_FILE",
1264
- "CLAUDE_CODE_MANAGED_SETTINGS_PATH",
1265
- "CLAUDE_CODE_REMOTE_SETTINGS_PATH",
1266
- "CLAUDE_CODE_MOCK_REMOTE_SETTINGS",
1267
- "CLAUDE_CODE_PLUGIN_SEED_DIR",
1268
- "CLAUDE_CODE_PLUGIN_CACHE_DIR",
1269
- "BUN_CONFIG_FILE",
1270
- "NPM_CONFIG_USERCONFIG",
1271
- "NPM_CONFIG_GLOBALCONFIG",
1272
- "PIP_CONFIG_FILE",
1273
- "CLOUDSDK_CONFIG",
1274
- "DOCKER_CONFIG",
1275
- "VITALS_EMITTER_BIN",
1276
- "CLAUDE_SSH_LOCAL_BINARY",
1277
- "SDK_NATIVE_BIN",
1278
- "BUN_CHROME_PATH",
1279
- "PLAYWRIGHT_BROWSERS_PATH"
1280
- ];
1281
- var EXECUTION_INDIRECTION_ENV_PREFIXES = [
1282
- "LD_",
1283
- "DYLD_",
1284
- "BASH_FUNC_",
1285
- "__BASH_FUNC",
1286
- "PYTHON",
1287
- "PERL5",
1288
- "RUBY",
1289
- "LUA_",
1290
- "DOTNET_",
1291
- "COMPLUS_",
1292
- "COR_",
1293
- "CORECLR_",
1294
- "APPDOMAIN_MANAGER_",
1295
- "GIT_"
1296
- ];
1297
- var EXECUTION_INDIRECTION_FOLDED = new Set(EXECUTION_INDIRECTION_ENV_NAMES.map((name) => name.toUpperCase()));
1298
- function isExecutionIndirectionVariable(name) {
1299
- const folded = name.toUpperCase();
1300
- return EXECUTION_INDIRECTION_FOLDED.has(folded) || EXECUTION_INDIRECTION_ENV_PREFIXES.some((prefix) => folded.startsWith(prefix));
1301
- }
1302
- var NON_CREDENTIAL_ENV_REGISTRY_FOLDED = new Set(NON_CREDENTIAL_ENV_REGISTRY.map((name) => name.toUpperCase()));
1303
- function buildOfficialChildEnv(input, policy = {}) {
1304
- const branchLabel = officialBranchLabel(input.brand);
1305
- if (input.configDir.length === 0) {
1306
- throw new OfficialConfigurationError({
1307
- option: "env.CLAUDE_CONFIG_DIR",
1308
- reason: "a child with no config dir writes its transcript wherever the SDK parent's own environment points, which on a developer machine is the real vendor home (WS-14 §1/§3)",
1309
- branchLabel
1310
- });
1311
- }
1312
- validateAuthEnvironment({ selection: input.selection, credentials: input.credentials, gate: policy.claudeOauth ?? { approved: false }, branchLabel });
1313
- const env = {
1314
- [OFFICIAL_RUNTIME_VARIABLES.configDir]: input.configDir
1315
- };
1316
- if (input.projectKey !== undefined && input.projectKey.length > 0) {
1317
- if (!new RegExp(PINNED_PROJECT_DIR_NAME_PATTERN).test(input.projectKey)) {
1318
- throw new OfficialConfigurationError({
1319
- option: `env.${OFFICIAL_RUNTIME_VARIABLES.projectDirName}`,
1320
- reason: `${JSON.stringify(input.projectKey)} (${input.projectKey.length} characters) does not match the pinned runtime's own rule ${PINNED_PROJECT_DIR_NAME_PATTERN}, and a key it rejects does not fail — it falls back to the runtime's own cwd-derived name, leaving the directory row, this environment and the auto-memory directory all naming a transcript that is somewhere else (WS-14 §1/§3, R-7b-13). Name a conforming key in \`runtime.official.projectKey\`; the door's own default is the Winter SDK's \`transcriptProjectKey(cwd)\`, which a deep working directory can push past this rule`,
1321
- branchLabel
1322
- });
1323
- }
1324
- env[OFFICIAL_RUNTIME_VARIABLES.projectDirName] = input.projectKey;
1325
- }
1326
- if (input.sharedTempRoot !== undefined && input.sharedTempRoot.length > 0)
1327
- env[OFFICIAL_RUNTIME_VARIABLES.tmpdir] = input.sharedTempRoot;
1328
- if ((policy.remoteConfig ?? "deny") === "deny")
1329
- for (const [name, value] of Object.entries(TRAFFIC_OPT_OUT_VARIABLES))
1330
- env[name] = value;
1331
- for (const [name, value] of Object.entries(input.credentials))
1332
- env[name] = value;
1333
- for (const [name, value] of Object.entries(input.base ?? {})) {
1334
- const wanted = MINIMAL_OS_VARIABLES.includes(name) || MINIMAL_OS_VARIABLE_PREFIXES.some((prefix) => name.startsWith(prefix));
1335
- if (wanted)
1336
- env[name] = PATH_LIST_VARIABLES.includes(name) ? sanitizePathListValue(value) : value;
1337
- }
1338
- for (const [name, value] of Object.entries(policy.configuredExtras ?? {}))
1339
- env[name] = value;
1340
- assertNoForbiddenChildVariables(env, { brand: input.brand, selection: input.selection, policy, branchLabel });
1341
- return Object.fromEntries(Object.entries(env).sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0));
1342
- }
1343
- function assertNoForbiddenChildVariables(env, args) {
1344
- const branchLabel = args.branchLabel ?? officialBranchLabel(args.brand);
1345
- const declared = new Set(Object.keys(args.policy?.configuredExtras ?? {}));
1346
- const reviewedExtras = args.policy?.reviewedCredentialShapedExtras ?? [];
1347
- const reviewedExecution = args.policy?.reviewedExecutionExtras ?? [];
1348
- const prefixes = [args.brand.envPrefix, ...args.policy?.hostEnvPrefixes ?? []];
1349
- const runtimeVariables = Object.values(OFFICIAL_RUNTIME_VARIABLES);
1350
- const familyVariables = args.selection === undefined ? undefined : allowedAuthVariables(args.selection);
1351
- for (const [name, value] of Object.entries(env)) {
1352
- const refuse = (reason) => {
1353
- throw new OfficialConfigurationError({ option: `env.${name}`, reason, branchLabel });
1354
- };
1355
- if (prefixes.some((prefix) => prefix.length > 0 && name.startsWith(prefix))) {
1356
- refuse("product/daemon variables never reach this child: it is a vendor runtime configured entirely by the allowlist, and Winter itself never reads the vendor's variables either (WS-14 §3, WS-01 §1 principle 4)");
1357
- }
1358
- if (NEVER_INJECTED_AUTH_VARIABLES.includes(name)) {
1359
- refuse("this credential is never injected on this branch (WS-14 §12 / WS-01 §2.5); the supported subscription flow stores its state inside the spool namespace");
1360
- }
1361
- if (familyVariables !== undefined && ALL_AUTH_VARIABLES.includes(name) && !familyVariables.includes(name)) {
1362
- refuse(`it is a credential variable outside this session's ${args.selection?.authFamily} family (${familyVariables.length === 0 ? "which injects nothing" : familyVariables.join(", ")}); the runtime resolves two families by its own precedence order, not by the host's selection (WS-14 §12)`);
1363
- }
1364
- const foldedName = name.toUpperCase();
1365
- const isThisFamilysVariable = (familyVariables ?? []).includes(name);
1366
- if (declared.has(name) && isExecutionIndirectionVariable(name) && !runtimeVariables.includes(name) && !reviewedExecution.includes(name)) {
1367
- refuse("it is refused explicitly: this name changes how the child EXECUTES code or authenticates (a shell startup file or command prefix, a loader/runtime hook, or an askpass/credential helper the child runs), " + "which no credential-shape rule can see and which the artifact's own registry legitimately declares — so neither of the extras door's two rules would stop it. " + "A deployment that has REVIEWED this exact name and needs it names it in `reviewedExecutionExtras` (WS-14 §3/§12, item 22)");
1368
- }
1369
- if (declared.has(name) && isAuthShapedVariable(foldedName) && !runtimeVariables.includes(name) && !isThisFamilysVariable && !reviewedExtras.includes(name)) {
1370
- refuse("it is credential-bearing by shape, and the configured-extras door carries non-credential variables only: the runtime resolves credentials by its own precedence order, so one of these re-points billing, rate limits and audit at an account this session's persisted selection does not name (WS-14 §12). " + "A deployment that has REVIEWED a specific auth-shaped variable and needs it names it in `reviewedCredentialShapedExtras` — a reviewed compatibility event under WS-17's drift gate, never a silent addition");
1371
- }
1372
- if (declared.has(name) && !runtimeVariables.includes(name) && !isThisFamilysVariable && !reviewedExtras.includes(name) && !NON_CREDENTIAL_ENV_REGISTRY_FOLDED.has(foldedName)) {
1373
- refuse("the configured-extras door is a positive allowlist: only names the PINNED artifact's own environment registry declares, and that an independent name rule classifies as non-credential, ride it. " + "An unknown name is refused because nothing has classified it — name it in `reviewedCredentialShapedExtras` if this deployment has reviewed it (WS-14 §3/§12, review r3 NEW-10)");
1374
- }
1375
- if (declared.has(name) && runtimeVariables.includes(name)) {
1376
- refuse("a configured extra may not override a variable this branch owns: the config dir, the transcript project key and the shared temp root are §1/§3's own, and the record is written against them");
1377
- }
1378
- if (declared.has(name) && TRAFFIC_OPT_OUT_VARIABLE_NAMES.includes(name)) {
1379
- refuse('this is one of the four traffic opt-outs this branch sets itself (R-7b-11), and setting it through the extras door would leave the session\'s recorded `remoteConfig` describing a surface the child does not have — use `OfficialEnvPolicy.remoteConfig` ("allow" opts back in, and the choice is recorded)');
1380
- }
1381
- if (!declared.has(name) && !TRAFFIC_OPT_OUT_VARIABLE_NAMES.includes(name) && (PROXY_AND_TELEMETRY_VARIABLES.includes(name) || PROXY_AND_TELEMETRY_PREFIXES.some((prefix) => name.startsWith(prefix)))) {
1382
- refuse("proxy and telemetry variables reach this child only when the deployment configures them explicitly (WS-14 §3); an inherited one redirects or duplicates traffic invisibly");
1383
- }
1384
- if (VENDOR_HOME_SEGMENT_RE.test(value)) {
1385
- refuse(`its value (${value}) points into the vendor's user-level home; this branch is isolated from it by construction (WS-14 §3, WS-17 row 4)`);
1386
- }
1387
- const known = runtimeVariables.includes(name) || TRAFFIC_OPT_OUT_VARIABLE_NAMES.includes(name) || ALL_AUTH_VARIABLES.includes(name) || MINIMAL_OS_VARIABLES.includes(name) || MINIMAL_OS_VARIABLE_PREFIXES.some((prefix) => name.startsWith(prefix)) || declared.has(name);
1388
- if (!known) {
1389
- refuse("it is not a variable this branch owns, an auth variable for this session, a minimal OS variable, or an explicitly configured addition — the child environment is an allowlist, and anything else is a leak from somewhere (WS-14 §3)");
1390
- }
1391
- }
1392
- }
1393
- var PINNED_OFFICIAL_RUNTIME = "0.3.250";
1394
- var PINNED_PROJECT_DIR_NAME_PATTERN = "^[A-Za-z0-9_-]{1,64}$";
1395
-
1396
110
  // src/official/options-template.ts
1397
- import { mcpToolName as mcpToolName2 } from "@yanlinglabs/winter-agent-sdk";
111
+ import { mcpToolName } from "@yanlinglabs/winter-agent-sdk";
1398
112
  var PINNED_SYSTEM_PROMPT_PRESET = "claude_code";
1399
113
  var AUTO_MEMORY_LOAD_CAP = { lines: 200, bytes: 25 * 1024 };
1400
114
  var DEFAULT_EXCLUDE_DYNAMIC_SECTIONS = { code: true, dispatch: true, chat: true };
@@ -1505,7 +219,7 @@ function assertOptionsInvariants(options, branchLabel) {
1505
219
  }
1506
220
 
1507
221
  // src/official/mcp-descriptors.ts
1508
- import { isWinterMcpServerInstance, mcpToolName as mcpToolName3 } from "@yanlinglabs/winter-agent-sdk";
222
+ import { isWinterMcpServerInstance, mcpToolName as mcpToolName2 } from "@yanlinglabs/winter-agent-sdk";
1509
223
  import {
1510
224
  WINTER_DEFAULT_TOOL_DEFINITIONS,
1511
225
  createAdvisorToolHandler,
@@ -1605,6 +319,9 @@ function capabilityInputSchema(raw, server, tool) {
1605
319
  ...typeof additionalProperties === "boolean" ? { additionalProperties } : {}
1606
320
  };
1607
321
  }
322
+ function canonicalToolNames(descriptor, brand) {
323
+ return descriptor.tools.map((tool) => mcpToolName2(brand, tool.tool));
324
+ }
1608
325
  function materializeOfficialMcpServer(args) {
1609
326
  const { createSdkMcpServer, tool } = args.module;
1610
327
  if (typeof createSdkMcpServer !== "function" || typeof tool !== "function") {
@@ -1617,6 +334,7 @@ function materializeOfficialMcpServer(args) {
1617
334
  const tools = args.descriptor.tools.map((descriptor) => tool(descriptor.tool, descriptor.description, args.toInputShape(descriptor.inputSchema), async (rawArgs, extra) => descriptor.handler(rawArgs, extra), descriptor.annotations === undefined ? undefined : { annotations: descriptor.annotations }));
1618
335
  return createSdkMcpServer({ name: args.descriptor.name, version: args.descriptor.version, tools });
1619
336
  }
337
+ var OFFICIAL_MATERIALIZATION_DROPS = ["outputSchema", "exposure"];
1620
338
  function officialMcpServers(args) {
1621
339
  return { [args.descriptor.name]: materializeOfficialMcpServer(args) };
1622
340
  }
@@ -1738,9 +456,11 @@ function officialUserTurn(text, sessionId) {
1738
456
  return { type: "user", message: { role: "user", content: text }, parent_tool_use_id: null, session_id: sessionId };
1739
457
  }
1740
458
  function officialCredentialPlan(args) {
459
+ const family = authVariableSetKey(args.selection);
460
+ if (family === "console-profile")
461
+ return [];
1741
462
  if (args.explicit !== undefined)
1742
463
  return args.explicit;
1743
- const family = authVariableSetKey(args.selection);
1744
464
  if (family === "claude-oauth" || family === "local-none")
1745
465
  return [];
1746
466
  const ref = args.provider?.authRef;
@@ -6704,6 +5424,7 @@ function createRuntimeSdk(opts) {
6704
5424
  return sdk;
6705
5425
  }
6706
5426
  export {
5427
+ winterMcpServerDescriptor,
6707
5428
  selectionVersionsFrom,
6708
5429
  selectRuntime,
6709
5430
  selectChildRuntimePairing,
@@ -6714,15 +5435,22 @@ export {
6714
5435
  reviewPersistedSelection,
6715
5436
  resumeStagingRoot,
6716
5437
  resumeChildSelection,
5438
+ renderAttributedTurn,
6717
5439
  readResolvedManifestVersion,
6718
5440
  readExportedVersion,
6719
5441
  parseVersion,
6720
5442
  officialUserTurn,
5443
+ officialMcpServers,
5444
+ officialDisallowedTools,
6721
5445
  officialCredentialPlan,
6722
5446
  officialConnectionEnv,
5447
+ officialBranchLabel,
5448
+ minimalOsEnvironmentFrom,
6723
5449
  materializedResumeReportForPin,
5450
+ materializeOfficialMcpServer,
6724
5451
  isSelectionRefusal,
6725
5452
  isResumeStagingRoot,
5453
+ isOurApprovalBridge,
6726
5454
  isOfficialQuery,
6727
5455
  isExecutionIndirectionVariable,
6728
5456
  forwardableOptions,
@@ -6731,6 +5459,10 @@ export {
6731
5459
  createOfficialInputStream,
6732
5460
  createInMemoryRuntimeDirectoryStore,
6733
5461
  createAttachedSessionRegistry,
5462
+ createApprovalBridge,
5463
+ containmentDispositions,
5464
+ canonicalToolNames,
5465
+ buildOfficialChildEnv,
6734
5466
  assertVersionMatrix,
6735
5467
  VERSION_EXPORT_NAMES,
6736
5468
  UnaddressableEntryError,
@@ -6748,6 +5480,8 @@ export {
6748
5480
  RuntimeHandoffRequiredError,
6749
5481
  ROUTER_ONLY_OPTION_KEYS,
6750
5482
  RESUME_STAGING_PREFIX,
5483
+ OFFICIAL_MATERIALIZATION_DROPS,
5484
+ OFFICIAL_DISCLOSURES,
6751
5485
  NotImplementedYet,
6752
5486
  MATERIALIZED_RESUME_PROBE_REPORTS,
6753
5487
  EXECUTION_INDIRECTION_ENV_PREFIXES,