@vm0/cli 9.207.0 → 9.208.1
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/{chunk-CGFTLXDK.js → chunk-HJC27CUJ.js} +221 -188
- package/{chunk-CGFTLXDK.js.map → chunk-HJC27CUJ.js.map} +1 -1
- package/index.js +9 -9
- package/package.json +1 -1
- package/zero.js +24 -4
- package/zero.js.map +1 -1
|
@@ -80408,7 +80408,7 @@ if (DSN) {
|
|
|
80408
80408
|
init2({
|
|
80409
80409
|
dsn: DSN,
|
|
80410
80410
|
environment: process.env.SENTRY_ENVIRONMENT ?? "production",
|
|
80411
|
-
release: "9.
|
|
80411
|
+
release: "9.208.1",
|
|
80412
80412
|
sendDefaultPii: false,
|
|
80413
80413
|
tracesSampleRate: 0,
|
|
80414
80414
|
shutdownTimeout: 500,
|
|
@@ -80427,7 +80427,7 @@ if (DSN) {
|
|
|
80427
80427
|
}
|
|
80428
80428
|
});
|
|
80429
80429
|
setContext("cli", {
|
|
80430
|
-
version: "9.
|
|
80430
|
+
version: "9.208.1",
|
|
80431
80431
|
command: process.argv.slice(2).join(" ")
|
|
80432
80432
|
});
|
|
80433
80433
|
setContext("runtime", {
|
|
@@ -88060,6 +88060,218 @@ var VM0_MODEL_CREDIT_MULTIPLIER = Object.freeze({
|
|
|
88060
88060
|
"gpt-5.4-mini": 0.3
|
|
88061
88061
|
});
|
|
88062
88062
|
|
|
88063
|
+
// ../../packages/api-contracts/src/contracts/model-provider-firewalls.ts
|
|
88064
|
+
init_esm_shims();
|
|
88065
|
+
var MODEL_PROVIDER_ENV_PLACEHOLDERS = {
|
|
88066
|
+
// Placeholder: sk-ant-api03-{93 word/hyphen chars}AA (108 chars total)
|
|
88067
|
+
// Source: Semgrep regex \Bsk-ant-api03-[\w\-]{93}AA\B
|
|
88068
|
+
// https://semgrep.dev/blog/2025/secrets-story-and-prefixed-secrets/
|
|
88069
|
+
ANTHROPIC_API_KEY: "sk-ant-api03-CoffeeSafeLocalCoffeeSafeLocalCoffeeSafeLocalCoffeeSafeLocalCoffeeSafeLocalCoffeeSafeLocalCofAA",
|
|
88070
|
+
// Placeholder: sk-ant-oat01-{93 word/hyphen chars}AA (108 chars total)
|
|
88071
|
+
// Source: same structure as API key; prefix from claude setup-token output
|
|
88072
|
+
// https://github.com/anthropics/claude-code/issues/18340
|
|
88073
|
+
// Example: sk-ant-oat01-xxxxx...xxxxx (1-year OAuth token)
|
|
88074
|
+
CLAUDE_CODE_OAUTH_TOKEN: "sk-ant-oat01-CoffeeSafeLocalCoffeeSafeLocalCoffeeSafeLocalCoffeeSafeLocalCoffeeSafeLocalCoffeeSafeLocalCofAA",
|
|
88075
|
+
// Generic bearer-token marker for Claude-compatible gateways that map
|
|
88076
|
+
// provider-specific secrets into ANTHROPIC_AUTH_TOKEN.
|
|
88077
|
+
ANTHROPIC_AUTH_TOKEN: "sk-CoffeeSafeLocalCoffeeSafeLocalCo",
|
|
88078
|
+
// Placeholder: sk-proj-{chars}T3BlbkFJ{chars} (typical project key shape)
|
|
88079
|
+
// Source: matches turbo/packages/connectors/src/firewalls/openai.generated.ts
|
|
88080
|
+
OPENAI_API_KEY: "sk-proj-CoffeeSafeLocalCoffeeSafeLocalCoffeeSafeLocalCoffeeSafeLocaT3BlbkFJCoffeeSafeLocalCoffeeSafeLocalCoffeeSafeLocalCoffeeSafeLoca",
|
|
88081
|
+
// Opaque fake marker, not a JWT. Codex ChatGPT mode reads auth.json, while
|
|
88082
|
+
// firewall auth substitutes this marker at egress.
|
|
88083
|
+
CHATGPT_ACCESS_TOKEN: "chatgpt-token-CoffeeSafeLocalCoffeeSafeLocalCoffeeSafeLocalCoffeeSafeLocal",
|
|
88084
|
+
CHATGPT_ACCOUNT_ID: "ws_VM0_PLACEHOLDER_DO_NOT_TRUST",
|
|
88085
|
+
CHATGPT_REFRESH_TOKEN: "rt_VM0_PLACEHOLDER_DO_NOT_TRUST"
|
|
88086
|
+
};
|
|
88087
|
+
var MODEL_PROVIDER_FIREWALL_PROVIDER_CONFIGS = {
|
|
88088
|
+
"anthropic-api-key": {
|
|
88089
|
+
framework: "claude-code",
|
|
88090
|
+
secretName: "ANTHROPIC_API_KEY"
|
|
88091
|
+
},
|
|
88092
|
+
"claude-code-oauth-token": {
|
|
88093
|
+
framework: "claude-code",
|
|
88094
|
+
secretName: "CLAUDE_CODE_OAUTH_TOKEN"
|
|
88095
|
+
},
|
|
88096
|
+
"openrouter-api-key": {
|
|
88097
|
+
framework: "claude-code",
|
|
88098
|
+
secretName: "OPENROUTER_API_KEY",
|
|
88099
|
+
anthropicBaseUrl: "https://openrouter.ai/api"
|
|
88100
|
+
},
|
|
88101
|
+
"moonshot-api-key": {
|
|
88102
|
+
framework: "claude-code",
|
|
88103
|
+
secretName: "MOONSHOT_API_KEY",
|
|
88104
|
+
anthropicBaseUrl: "https://api.moonshot.ai/anthropic"
|
|
88105
|
+
},
|
|
88106
|
+
"minimax-api-key": {
|
|
88107
|
+
framework: "claude-code",
|
|
88108
|
+
secretName: "MINIMAX_API_KEY",
|
|
88109
|
+
anthropicBaseUrl: "https://api.minimax.io/anthropic"
|
|
88110
|
+
},
|
|
88111
|
+
"deepseek-api-key": {
|
|
88112
|
+
framework: "claude-code",
|
|
88113
|
+
secretName: "DEEPSEEK_API_KEY",
|
|
88114
|
+
anthropicBaseUrl: "https://api.deepseek.com/anthropic"
|
|
88115
|
+
},
|
|
88116
|
+
"zai-api-key": {
|
|
88117
|
+
framework: "claude-code",
|
|
88118
|
+
secretName: "ZAI_API_KEY",
|
|
88119
|
+
anthropicBaseUrl: "https://api.z.ai/api/anthropic"
|
|
88120
|
+
},
|
|
88121
|
+
"vercel-ai-gateway": {
|
|
88122
|
+
framework: "claude-code",
|
|
88123
|
+
secretName: "VERCEL_AI_GATEWAY_API_KEY",
|
|
88124
|
+
anthropicBaseUrl: "https://ai-gateway.vercel.sh"
|
|
88125
|
+
},
|
|
88126
|
+
"openrouter-codex": {
|
|
88127
|
+
framework: "codex",
|
|
88128
|
+
secretName: "OPENROUTER_API_KEY",
|
|
88129
|
+
openaiBaseUrl: "https://openrouter.ai/api/v1"
|
|
88130
|
+
},
|
|
88131
|
+
"vercel-ai-gateway-codex": {
|
|
88132
|
+
framework: "codex",
|
|
88133
|
+
secretName: "VERCEL_AI_GATEWAY_API_KEY",
|
|
88134
|
+
openaiBaseUrl: "https://ai-gateway.vercel.sh/v1"
|
|
88135
|
+
},
|
|
88136
|
+
"openai-api-key": {
|
|
88137
|
+
framework: "codex",
|
|
88138
|
+
secretName: "OPENAI_API_KEY"
|
|
88139
|
+
}
|
|
88140
|
+
};
|
|
88141
|
+
var ANTHROPIC_API_BASE = "https://api.anthropic.com";
|
|
88142
|
+
function isLegacySingleSecretProvider(type) {
|
|
88143
|
+
return type !== "codex-oauth-token";
|
|
88144
|
+
}
|
|
88145
|
+
function getFirewallBaseUrl(type) {
|
|
88146
|
+
if (!isLegacySingleSecretProvider(type)) {
|
|
88147
|
+
return "https://chatgpt.com/backend-api/codex";
|
|
88148
|
+
}
|
|
88149
|
+
const config3 = MODEL_PROVIDER_FIREWALL_PROVIDER_CONFIGS[type];
|
|
88150
|
+
if (config3.framework === "codex") {
|
|
88151
|
+
return config3.openaiBaseUrl?.replace(/\/+$/, "") ?? "https://api.openai.com/v1/responses";
|
|
88152
|
+
}
|
|
88153
|
+
const base = (config3.anthropicBaseUrl ?? ANTHROPIC_API_BASE).replace(
|
|
88154
|
+
/\/+$/,
|
|
88155
|
+
""
|
|
88156
|
+
);
|
|
88157
|
+
return `${base}/v1/messages`;
|
|
88158
|
+
}
|
|
88159
|
+
function mpFirewall(type, authHeader, placeholderValue) {
|
|
88160
|
+
const secretName = MODEL_PROVIDER_FIREWALL_PROVIDER_CONFIGS[type].secretName;
|
|
88161
|
+
const secretRef = `\${{ secrets.${secretName} }}`;
|
|
88162
|
+
const headerValue = authHeader.valuePrefix ? `${authHeader.valuePrefix} ${secretRef}` : secretRef;
|
|
88163
|
+
return {
|
|
88164
|
+
name: `model-provider:${type}`,
|
|
88165
|
+
apis: [
|
|
88166
|
+
{
|
|
88167
|
+
base: getFirewallBaseUrl(type),
|
|
88168
|
+
auth: { headers: { [authHeader.name]: headerValue } },
|
|
88169
|
+
permissions: []
|
|
88170
|
+
}
|
|
88171
|
+
],
|
|
88172
|
+
placeholders: { [secretName]: placeholderValue }
|
|
88173
|
+
};
|
|
88174
|
+
}
|
|
88175
|
+
var MODEL_PROVIDER_FIREWALL_CONFIGS = {
|
|
88176
|
+
"anthropic-api-key": mpFirewall(
|
|
88177
|
+
"anthropic-api-key",
|
|
88178
|
+
{ name: "x-api-key" },
|
|
88179
|
+
MODEL_PROVIDER_ENV_PLACEHOLDERS.ANTHROPIC_API_KEY
|
|
88180
|
+
),
|
|
88181
|
+
"claude-code-oauth-token": mpFirewall(
|
|
88182
|
+
"claude-code-oauth-token",
|
|
88183
|
+
{ name: "Authorization", valuePrefix: "Bearer" },
|
|
88184
|
+
MODEL_PROVIDER_ENV_PLACEHOLDERS.CLAUDE_CODE_OAUTH_TOKEN
|
|
88185
|
+
),
|
|
88186
|
+
"openrouter-api-key": mpFirewall(
|
|
88187
|
+
"openrouter-api-key",
|
|
88188
|
+
{ name: "Authorization", valuePrefix: "Bearer" },
|
|
88189
|
+
MODEL_PROVIDER_ENV_PLACEHOLDERS.ANTHROPIC_AUTH_TOKEN
|
|
88190
|
+
),
|
|
88191
|
+
"moonshot-api-key": mpFirewall(
|
|
88192
|
+
"moonshot-api-key",
|
|
88193
|
+
{ name: "Authorization", valuePrefix: "Bearer" },
|
|
88194
|
+
MODEL_PROVIDER_ENV_PLACEHOLDERS.ANTHROPIC_AUTH_TOKEN
|
|
88195
|
+
),
|
|
88196
|
+
"minimax-api-key": mpFirewall(
|
|
88197
|
+
"minimax-api-key",
|
|
88198
|
+
{ name: "Authorization", valuePrefix: "Bearer" },
|
|
88199
|
+
MODEL_PROVIDER_ENV_PLACEHOLDERS.ANTHROPIC_AUTH_TOKEN
|
|
88200
|
+
),
|
|
88201
|
+
"deepseek-api-key": mpFirewall(
|
|
88202
|
+
"deepseek-api-key",
|
|
88203
|
+
{ name: "Authorization", valuePrefix: "Bearer" },
|
|
88204
|
+
MODEL_PROVIDER_ENV_PLACEHOLDERS.ANTHROPIC_AUTH_TOKEN
|
|
88205
|
+
),
|
|
88206
|
+
"zai-api-key": mpFirewall(
|
|
88207
|
+
"zai-api-key",
|
|
88208
|
+
{ name: "Authorization", valuePrefix: "Bearer" },
|
|
88209
|
+
MODEL_PROVIDER_ENV_PLACEHOLDERS.ANTHROPIC_AUTH_TOKEN
|
|
88210
|
+
),
|
|
88211
|
+
"vercel-ai-gateway": mpFirewall(
|
|
88212
|
+
"vercel-ai-gateway",
|
|
88213
|
+
{ name: "Authorization", valuePrefix: "Bearer" },
|
|
88214
|
+
MODEL_PROVIDER_ENV_PLACEHOLDERS.ANTHROPIC_AUTH_TOKEN
|
|
88215
|
+
),
|
|
88216
|
+
// Codex-framework twin of openrouter-api-key. It reuses the same stored
|
|
88217
|
+
// OpenRouter secret, but the sandbox env name is OPENAI_API_KEY because codex
|
|
88218
|
+
// SDK hits OpenAI-compatible paths (/chat/completions, /responses) under
|
|
88219
|
+
// https://openrouter.ai/api/v1.
|
|
88220
|
+
"openrouter-codex": mpFirewall(
|
|
88221
|
+
"openrouter-codex",
|
|
88222
|
+
{ name: "Authorization", valuePrefix: "Bearer" },
|
|
88223
|
+
MODEL_PROVIDER_ENV_PLACEHOLDERS.OPENAI_API_KEY
|
|
88224
|
+
),
|
|
88225
|
+
// Codex-framework twin of vercel-ai-gateway. It reuses the same stored Vercel
|
|
88226
|
+
// secret, but the sandbox env name is OPENAI_API_KEY. Base URL is scoped to
|
|
88227
|
+
// the /v1 prefix so codex can use either /chat/completions or /responses.
|
|
88228
|
+
"vercel-ai-gateway-codex": mpFirewall(
|
|
88229
|
+
"vercel-ai-gateway-codex",
|
|
88230
|
+
{ name: "Authorization", valuePrefix: "Bearer" },
|
|
88231
|
+
MODEL_PROVIDER_ENV_PLACEHOLDERS.OPENAI_API_KEY
|
|
88232
|
+
),
|
|
88233
|
+
"openai-api-key": mpFirewall(
|
|
88234
|
+
"openai-api-key",
|
|
88235
|
+
{ name: "Authorization", valuePrefix: "Bearer" },
|
|
88236
|
+
MODEL_PROVIDER_ENV_PLACEHOLDERS.OPENAI_API_KEY
|
|
88237
|
+
),
|
|
88238
|
+
// ChatGPT OAuth provider: multi-header injection plus auth.openai.com deny.
|
|
88239
|
+
"codex-oauth-token": {
|
|
88240
|
+
name: "model-provider:codex-oauth-token",
|
|
88241
|
+
apis: [
|
|
88242
|
+
{
|
|
88243
|
+
base: "https://chatgpt.com/backend-api/codex",
|
|
88244
|
+
auth: {
|
|
88245
|
+
headers: {
|
|
88246
|
+
Authorization: "Bearer ${{ secrets.CHATGPT_ACCESS_TOKEN }}",
|
|
88247
|
+
"ChatGPT-Account-ID": "${{ secrets.CHATGPT_ACCOUNT_ID }}"
|
|
88248
|
+
}
|
|
88249
|
+
},
|
|
88250
|
+
permissions: [
|
|
88251
|
+
{
|
|
88252
|
+
name: "codex:api",
|
|
88253
|
+
rules: ["GET /{path*}", "POST /{path*}"]
|
|
88254
|
+
}
|
|
88255
|
+
]
|
|
88256
|
+
},
|
|
88257
|
+
{
|
|
88258
|
+
base: "https://auth.openai.com",
|
|
88259
|
+
auth: { headers: {} },
|
|
88260
|
+
permissions: [{ name: "denied", rules: ["ANY /*"] }]
|
|
88261
|
+
}
|
|
88262
|
+
],
|
|
88263
|
+
defaultPolicies: {
|
|
88264
|
+
deny: ["denied"],
|
|
88265
|
+
unknownPolicy: "deny"
|
|
88266
|
+
},
|
|
88267
|
+
placeholders: {
|
|
88268
|
+
CHATGPT_ACCESS_TOKEN: MODEL_PROVIDER_ENV_PLACEHOLDERS.CHATGPT_ACCESS_TOKEN,
|
|
88269
|
+
CHATGPT_ACCOUNT_ID: MODEL_PROVIDER_ENV_PLACEHOLDERS.CHATGPT_ACCOUNT_ID,
|
|
88270
|
+
CHATGPT_REFRESH_TOKEN: MODEL_PROVIDER_ENV_PLACEHOLDERS.CHATGPT_REFRESH_TOKEN
|
|
88271
|
+
}
|
|
88272
|
+
}
|
|
88273
|
+
};
|
|
88274
|
+
|
|
88063
88275
|
// ../../packages/api-contracts/src/contracts/model-providers.ts
|
|
88064
88276
|
var supportedRunModelSchema = external_exports.enum(SUPPORTED_RUN_MODELS);
|
|
88065
88277
|
var modelProviderCredentialScopeSchema = external_exports.enum(["org", "member"]);
|
|
@@ -88553,28 +88765,6 @@ var HIDDEN_PROVIDER_LIST = ["aws-bedrock", "azure-foundry"];
|
|
|
88553
88765
|
var HIDDEN_PROVIDER_TYPES = new Set(
|
|
88554
88766
|
HIDDEN_PROVIDER_LIST
|
|
88555
88767
|
);
|
|
88556
|
-
var MODEL_PROVIDER_ENV_PLACEHOLDERS = {
|
|
88557
|
-
// Placeholder: sk-ant-api03-{93 word/hyphen chars}AA (108 chars total)
|
|
88558
|
-
// Source: Semgrep regex \Bsk-ant-api03-[\w\-]{93}AA\B
|
|
88559
|
-
// https://semgrep.dev/blog/2025/secrets-story-and-prefixed-secrets/
|
|
88560
|
-
ANTHROPIC_API_KEY: "sk-ant-api03-CoffeeSafeLocalCoffeeSafeLocalCoffeeSafeLocalCoffeeSafeLocalCoffeeSafeLocalCoffeeSafeLocalCofAA",
|
|
88561
|
-
// Placeholder: sk-ant-oat01-{93 word/hyphen chars}AA (108 chars total)
|
|
88562
|
-
// Source: same structure as API key; prefix from claude setup-token output
|
|
88563
|
-
// https://github.com/anthropics/claude-code/issues/18340
|
|
88564
|
-
// Example: sk-ant-oat01-xxxxx...xxxxx (1-year OAuth token)
|
|
88565
|
-
CLAUDE_CODE_OAUTH_TOKEN: "sk-ant-oat01-CoffeeSafeLocalCoffeeSafeLocalCoffeeSafeLocalCoffeeSafeLocalCoffeeSafeLocalCoffeeSafeLocalCofAA",
|
|
88566
|
-
// Generic bearer-token marker for Claude-compatible gateways that map
|
|
88567
|
-
// provider-specific secrets into ANTHROPIC_AUTH_TOKEN.
|
|
88568
|
-
ANTHROPIC_AUTH_TOKEN: "sk-CoffeeSafeLocalCoffeeSafeLocalCo",
|
|
88569
|
-
// Placeholder: sk-proj-{chars}T3BlbkFJ{chars} (typical project key shape)
|
|
88570
|
-
// Source: matches turbo/packages/connectors/src/firewalls/openai.generated.ts
|
|
88571
|
-
OPENAI_API_KEY: "sk-proj-CoffeeSafeLocalCoffeeSafeLocalCoffeeSafeLocalCoffeeSafeLocaT3BlbkFJCoffeeSafeLocalCoffeeSafeLocalCoffeeSafeLocalCoffeeSafeLoca",
|
|
88572
|
-
// Opaque fake marker, not a JWT. Codex ChatGPT mode reads auth.json, while
|
|
88573
|
-
// firewall auth substitutes this marker at egress.
|
|
88574
|
-
CHATGPT_ACCESS_TOKEN: "chatgpt-token-CoffeeSafeLocalCoffeeSafeLocalCoffeeSafeLocalCoffeeSafeLocal",
|
|
88575
|
-
CHATGPT_ACCOUNT_ID: "ws_VM0_PLACEHOLDER_DO_NOT_TRUST",
|
|
88576
|
-
CHATGPT_REFRESH_TOKEN: "rt_VM0_PLACEHOLDER_DO_NOT_TRUST"
|
|
88577
|
-
};
|
|
88578
88768
|
function getSelectableProviderTypes() {
|
|
88579
88769
|
return Object.keys(MODEL_PROVIDER_TYPES).filter(
|
|
88580
88770
|
(type) => {
|
|
@@ -88582,162 +88772,6 @@ function getSelectableProviderTypes() {
|
|
|
88582
88772
|
}
|
|
88583
88773
|
);
|
|
88584
88774
|
}
|
|
88585
|
-
var ANTHROPIC_API_BASE = "https://api.anthropic.com";
|
|
88586
|
-
function getFirewallBaseUrl(type) {
|
|
88587
|
-
if (type === "codex-oauth-token") {
|
|
88588
|
-
return "https://chatgpt.com/backend-api/codex";
|
|
88589
|
-
}
|
|
88590
|
-
if (getFrameworkForType(type) === "codex") {
|
|
88591
|
-
const overrideBase = getModelProviderEnvBindings(type)?.OPENAI_BASE_URL;
|
|
88592
|
-
if (overrideBase) {
|
|
88593
|
-
return overrideBase.replace(/\/+$/, "");
|
|
88594
|
-
}
|
|
88595
|
-
return "https://api.openai.com/v1/responses";
|
|
88596
|
-
}
|
|
88597
|
-
const base = (getModelProviderEnvBindings(type)?.ANTHROPIC_BASE_URL ?? ANTHROPIC_API_BASE).replace(/\/+$/, "");
|
|
88598
|
-
return `${base}/v1/messages`;
|
|
88599
|
-
}
|
|
88600
|
-
function mpFirewall(type, authHeader, placeholderValue) {
|
|
88601
|
-
const secretName = MODEL_PROVIDER_TYPES[type].secretName;
|
|
88602
|
-
const secretRef = `\${{ secrets.${secretName} }}`;
|
|
88603
|
-
const headerValue = authHeader.valuePrefix ? `${authHeader.valuePrefix} ${secretRef}` : secretRef;
|
|
88604
|
-
return {
|
|
88605
|
-
name: `model-provider:${type}`,
|
|
88606
|
-
apis: [
|
|
88607
|
-
{
|
|
88608
|
-
base: getFirewallBaseUrl(type),
|
|
88609
|
-
auth: { headers: { [authHeader.name]: headerValue } },
|
|
88610
|
-
permissions: []
|
|
88611
|
-
}
|
|
88612
|
-
],
|
|
88613
|
-
placeholders: { [secretName]: placeholderValue }
|
|
88614
|
-
};
|
|
88615
|
-
}
|
|
88616
|
-
var MODEL_PROVIDER_FIREWALL_CONFIGS = {
|
|
88617
|
-
"anthropic-api-key": mpFirewall(
|
|
88618
|
-
"anthropic-api-key",
|
|
88619
|
-
{ name: "x-api-key" },
|
|
88620
|
-
MODEL_PROVIDER_ENV_PLACEHOLDERS.ANTHROPIC_API_KEY
|
|
88621
|
-
),
|
|
88622
|
-
"claude-code-oauth-token": mpFirewall(
|
|
88623
|
-
"claude-code-oauth-token",
|
|
88624
|
-
{ name: "Authorization", valuePrefix: "Bearer" },
|
|
88625
|
-
MODEL_PROVIDER_ENV_PLACEHOLDERS.CLAUDE_CODE_OAUTH_TOKEN
|
|
88626
|
-
),
|
|
88627
|
-
"openrouter-api-key": mpFirewall(
|
|
88628
|
-
"openrouter-api-key",
|
|
88629
|
-
{ name: "Authorization", valuePrefix: "Bearer" },
|
|
88630
|
-
MODEL_PROVIDER_ENV_PLACEHOLDERS.ANTHROPIC_AUTH_TOKEN
|
|
88631
|
-
),
|
|
88632
|
-
"moonshot-api-key": mpFirewall(
|
|
88633
|
-
"moonshot-api-key",
|
|
88634
|
-
{ name: "Authorization", valuePrefix: "Bearer" },
|
|
88635
|
-
MODEL_PROVIDER_ENV_PLACEHOLDERS.ANTHROPIC_AUTH_TOKEN
|
|
88636
|
-
),
|
|
88637
|
-
"minimax-api-key": mpFirewall(
|
|
88638
|
-
"minimax-api-key",
|
|
88639
|
-
{ name: "Authorization", valuePrefix: "Bearer" },
|
|
88640
|
-
MODEL_PROVIDER_ENV_PLACEHOLDERS.ANTHROPIC_AUTH_TOKEN
|
|
88641
|
-
),
|
|
88642
|
-
"deepseek-api-key": mpFirewall(
|
|
88643
|
-
"deepseek-api-key",
|
|
88644
|
-
{ name: "Authorization", valuePrefix: "Bearer" },
|
|
88645
|
-
MODEL_PROVIDER_ENV_PLACEHOLDERS.ANTHROPIC_AUTH_TOKEN
|
|
88646
|
-
),
|
|
88647
|
-
"zai-api-key": mpFirewall(
|
|
88648
|
-
"zai-api-key",
|
|
88649
|
-
{ name: "Authorization", valuePrefix: "Bearer" },
|
|
88650
|
-
MODEL_PROVIDER_ENV_PLACEHOLDERS.ANTHROPIC_AUTH_TOKEN
|
|
88651
|
-
),
|
|
88652
|
-
"vercel-ai-gateway": mpFirewall(
|
|
88653
|
-
"vercel-ai-gateway",
|
|
88654
|
-
{ name: "Authorization", valuePrefix: "Bearer" },
|
|
88655
|
-
MODEL_PROVIDER_ENV_PLACEHOLDERS.ANTHROPIC_AUTH_TOKEN
|
|
88656
|
-
),
|
|
88657
|
-
// Codex-framework twin of openrouter-api-key. It reuses the same stored
|
|
88658
|
-
// OpenRouter secret, but the sandbox env name is OPENAI_API_KEY because codex
|
|
88659
|
-
// SDK hits OpenAI-compatible paths (/chat/completions, /responses) under
|
|
88660
|
-
// https://openrouter.ai/api/v1, derived from the OPENAI_BASE_URL mapping by
|
|
88661
|
-
// getFirewallBaseUrl.
|
|
88662
|
-
"openrouter-codex": mpFirewall(
|
|
88663
|
-
"openrouter-codex",
|
|
88664
|
-
{ name: "Authorization", valuePrefix: "Bearer" },
|
|
88665
|
-
MODEL_PROVIDER_ENV_PLACEHOLDERS.OPENAI_API_KEY
|
|
88666
|
-
),
|
|
88667
|
-
// Codex-framework twin of vercel-ai-gateway. It reuses the same stored Vercel
|
|
88668
|
-
// secret, but the sandbox env name is OPENAI_API_KEY. Base URL is scoped to
|
|
88669
|
-
// the /v1 prefix by getFirewallBaseUrl so codex can use either
|
|
88670
|
-
// /chat/completions or /responses paths the gateway exposes.
|
|
88671
|
-
"vercel-ai-gateway-codex": mpFirewall(
|
|
88672
|
-
"vercel-ai-gateway-codex",
|
|
88673
|
-
{ name: "Authorization", valuePrefix: "Bearer" },
|
|
88674
|
-
MODEL_PROVIDER_ENV_PLACEHOLDERS.OPENAI_API_KEY
|
|
88675
|
-
),
|
|
88676
|
-
"openai-api-key": mpFirewall(
|
|
88677
|
-
"openai-api-key",
|
|
88678
|
-
{ name: "Authorization", valuePrefix: "Bearer" },
|
|
88679
|
-
MODEL_PROVIDER_ENV_PLACEHOLDERS.OPENAI_API_KEY
|
|
88680
|
-
),
|
|
88681
|
-
// ChatGPT OAuth provider — multi-header injection + auth.openai.com deny.
|
|
88682
|
-
// Sandbox holds placeholder strings; firewall replaces them with real
|
|
88683
|
-
// tokens at egress. The auth.openai.com entry is defense-in-depth: codex's
|
|
88684
|
-
// CODEX_REFRESH_TOKEN_URL_OVERRIDE already prevents in-sandbox refreshes,
|
|
88685
|
-
// but if codex ever ignores it, this firewall denies the egress at the
|
|
88686
|
-
// proxy layer.
|
|
88687
|
-
//
|
|
88688
|
-
// Placeholder values are opaque markers, NOT JWTs — codex doesn't read
|
|
88689
|
-
// CHATGPT_ACCESS_TOKEN from env in ChatGPT mode; it reads the real JWT
|
|
88690
|
-
// from ~/.codex/auth.json built by guest-agent (#11877). The placeholder
|
|
88691
|
-
// here only needs to be a stable, non-empty string the firewall can match
|
|
88692
|
-
// and substitute. Account-id placeholder still equals #11877's literal
|
|
88693
|
-
// since the architectural relationship across the two surfaces matters.
|
|
88694
|
-
"codex-oauth-token": {
|
|
88695
|
-
name: "model-provider:codex-oauth-token",
|
|
88696
|
-
apis: [
|
|
88697
|
-
{
|
|
88698
|
-
base: "https://chatgpt.com/backend-api/codex",
|
|
88699
|
-
auth: {
|
|
88700
|
-
headers: {
|
|
88701
|
-
Authorization: "Bearer ${{ secrets.CHATGPT_ACCESS_TOKEN }}",
|
|
88702
|
-
"ChatGPT-Account-ID": "${{ secrets.CHATGPT_ACCOUNT_ID }}"
|
|
88703
|
-
}
|
|
88704
|
-
},
|
|
88705
|
-
permissions: [
|
|
88706
|
-
{
|
|
88707
|
-
name: "codex:api",
|
|
88708
|
-
// Subtree-wildcard the codex backend: codex's path surface keeps
|
|
88709
|
-
// growing (#12099 added /responses, then /responses/compact 403'd
|
|
88710
|
-
// again). Method narrowing to GET/POST is the actual safety net —
|
|
88711
|
-
// it blocks accidental DELETE/PUT/PATCH on the user's ChatGPT
|
|
88712
|
-
// account if codex is ever prompt-injected. Base is already
|
|
88713
|
-
// locked to /backend-api/codex, so the blast radius is just
|
|
88714
|
-
// codex's own surface area.
|
|
88715
|
-
rules: ["GET /{path*}", "POST /{path*}"]
|
|
88716
|
-
}
|
|
88717
|
-
]
|
|
88718
|
-
},
|
|
88719
|
-
{
|
|
88720
|
-
base: "https://auth.openai.com",
|
|
88721
|
-
auth: { headers: {} },
|
|
88722
|
-
permissions: [{ name: "denied", rules: ["ANY /*"] }]
|
|
88723
|
-
}
|
|
88724
|
-
],
|
|
88725
|
-
defaultPolicies: {
|
|
88726
|
-
deny: ["denied"],
|
|
88727
|
-
unknownPolicy: "deny"
|
|
88728
|
-
},
|
|
88729
|
-
placeholders: {
|
|
88730
|
-
CHATGPT_ACCESS_TOKEN: MODEL_PROVIDER_ENV_PLACEHOLDERS.CHATGPT_ACCESS_TOKEN,
|
|
88731
|
-
CHATGPT_ACCOUNT_ID: MODEL_PROVIDER_ENV_PLACEHOLDERS.CHATGPT_ACCOUNT_ID,
|
|
88732
|
-
// refresh_token written by guest-agent into ~/.codex/auth.json (#12077).
|
|
88733
|
-
// Kept in this map so the firewall can substitute it on egress if codex
|
|
88734
|
-
// ever tries to use it directly — defense-in-depth alongside
|
|
88735
|
-
// CODEX_REFRESH_TOKEN_URL_OVERRIDE which redirects refresh attempts to
|
|
88736
|
-
// localhost. The sandbox never gets the real refresh_token (#7365).
|
|
88737
|
-
CHATGPT_REFRESH_TOKEN: MODEL_PROVIDER_ENV_PLACEHOLDERS.CHATGPT_REFRESH_TOKEN
|
|
88738
|
-
}
|
|
88739
|
-
}
|
|
88740
|
-
};
|
|
88741
88775
|
var modelProviderTypeSchema = external_exports.enum([
|
|
88742
88776
|
"claude-code-oauth-token",
|
|
88743
88777
|
"anthropic-api-key",
|
|
@@ -88756,9 +88790,6 @@ var modelProviderTypeSchema = external_exports.enum([
|
|
|
88756
88790
|
"vm0"
|
|
88757
88791
|
]);
|
|
88758
88792
|
var modelProviderFrameworkSchema = external_exports.enum(["claude-code", "codex"]);
|
|
88759
|
-
function getFrameworkForType(type) {
|
|
88760
|
-
return MODEL_PROVIDER_TYPES[type]?.framework ?? "claude-code";
|
|
88761
|
-
}
|
|
88762
88793
|
function hasAuthMethods(type) {
|
|
88763
88794
|
const config3 = MODEL_PROVIDER_TYPES[type];
|
|
88764
88795
|
if (!config3) return false;
|
|
@@ -88781,10 +88812,6 @@ function getSecretsForAuthMethod(type, authMethod) {
|
|
|
88781
88812
|
const method = authMethods[authMethod];
|
|
88782
88813
|
return method?.secrets;
|
|
88783
88814
|
}
|
|
88784
|
-
function getModelProviderEnvBindings(type) {
|
|
88785
|
-
const config3 = MODEL_PROVIDER_TYPES[type];
|
|
88786
|
-
return "envBindings" in config3 ? config3.envBindings : void 0;
|
|
88787
|
-
}
|
|
88788
88815
|
var modelProviderResponseSchema = external_exports.object({
|
|
88789
88816
|
id: external_exports.uuid(),
|
|
88790
88817
|
type: modelProviderTypeSchema,
|
|
@@ -91664,6 +91691,7 @@ var pagedChatMessageBaseSchema = external_exports.object({
|
|
|
91664
91691
|
content: external_exports.string().nullable(),
|
|
91665
91692
|
runId: external_exports.string().optional(),
|
|
91666
91693
|
runGroupId: external_exports.string().optional(),
|
|
91694
|
+
triggerSource: triggerSourceSchema.optional(),
|
|
91667
91695
|
isGoalRun: external_exports.boolean().optional(),
|
|
91668
91696
|
runEventId: external_exports.string().optional(),
|
|
91669
91697
|
goalEvent: zeroGoalEventSchema.optional(),
|
|
@@ -91684,6 +91712,11 @@ var pagedChatMessageBaseSchema = external_exports.object({
|
|
|
91684
91712
|
title: external_exports.string(),
|
|
91685
91713
|
description: external_exports.string().nullable()
|
|
91686
91714
|
}).optional(),
|
|
91715
|
+
workflowSnapshot: external_exports.object({
|
|
91716
|
+
name: external_exports.string(),
|
|
91717
|
+
displayName: external_exports.string().nullable(),
|
|
91718
|
+
description: external_exports.string().nullable()
|
|
91719
|
+
}).optional(),
|
|
91687
91720
|
createdAt: external_exports.string()
|
|
91688
91721
|
});
|
|
91689
91722
|
var chatMessageRecommendedFollowupSchema = external_exports.object({
|
|
@@ -114101,4 +114134,4 @@ undici/lib/web/fetch/body.js:
|
|
|
114101
114134
|
undici/lib/web/websocket/frame.js:
|
|
114102
114135
|
(*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> *)
|
|
114103
114136
|
*/
|
|
114104
|
-
//# sourceMappingURL=chunk-
|
|
114137
|
+
//# sourceMappingURL=chunk-HJC27CUJ.js.map
|