claude-use 11.8.2 → 11.9.0
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/cli.cjs +1227 -112
- package/dist/index.cjs +93 -11
- package/dist/index.mjs +93 -11
- package/dist/types/index.d.ts +121 -5
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -222,9 +222,15 @@ function expandAllCategoryKey(pairs) {
|
|
|
222
222
|
const expanded = Object.fromEntries(OVERRIDABLE_CATEGORIES.filter((category) => !all || category !== "runtime").map((category) => [category, all]));
|
|
223
223
|
return { ...expanded, ...rest };
|
|
224
224
|
}
|
|
225
|
+
function isHttpProvider(provider) {
|
|
226
|
+
return provider.kind === void 0 || provider.kind === "http";
|
|
227
|
+
}
|
|
225
228
|
function isCodexProvider(provider) {
|
|
226
229
|
return provider.kind === "codex";
|
|
227
230
|
}
|
|
231
|
+
function isAntigravityProvider(provider) {
|
|
232
|
+
return provider.kind === "antigravity";
|
|
233
|
+
}
|
|
228
234
|
function poolMemberIdentity(member) {
|
|
229
235
|
return typeof member === "string" ? member : member.identity;
|
|
230
236
|
}
|
|
@@ -236,7 +242,7 @@ function isTimeZone(name) {
|
|
|
236
242
|
return false;
|
|
237
243
|
}
|
|
238
244
|
}
|
|
239
|
-
var import_node_path2, import_zod, import_trilean, CATEGORY_NAMES, OVERRIDABLE_CATEGORIES, CategoryMapSchema, DURATION_RE, DurationSchema, WhenConditionObjectSchema, WhenSchema, EntryValueSchema, ENTRY_KEY_RE, EntriesSchema, LaunchSchema, CREDENTIAL_TARGETS, PROVIDER_CREDENTIAL_TARGETS, CREDENTIAL_TARGET_VARS, ArgvSchema, CommandSourceOptions, EnvCredentialSourceSchema, FileCredentialSourceSchema, CommandCredentialSourceSchema, OpCredentialSourceSchema, KeychainCredentialSourceSchema, LiteralCredentialSourceSchema, CredentialSourceSchema, RemoteCredentialSourceSchema, CREDENTIAL_CACHE_STORES, CredentialCacheSchema, CredentialSchema, ProviderCredentialSchema, RESERVED_PROVIDER_ENV_KEYS, ProviderEnvSchema, PROVIDER_KINDS, CODEX_EFFORTS, CODEX_LOGINS, CODEX_DEFAULT_TIER_MODELS, CodexProviderConfigSchema, ProviderRouteSchema, HttpProviderSchema, CodexProviderSchema, ProviderSchema, ConfigProfileSchema, POOL_SELECTOR_PREFIX, POOL_NAME_PATTERN, IDENTITY_NAME_PATTERN, PoolNameSchema, SELECTOR_RE, IdentitySelectorSchema, PoolMemberSchema, POOL_PREFERENCES, PoolPreferenceSchema, PoolSchema, WEEKDAYS, AnchorSchema, JOB_WINDOWS, JobTriggerSchema, JobTargetSchema, JobSchema, DirectoryRuleSchema, DirectoryRulesSchema, PortableConfigSchema, HEADROOM_MODES, HEADROOM_CCR_MODES, HEADROOM_ROLLOUT_CHANNELS, INTERCEPT_CHANNELS, READ_MATURATION_CHANNELS, HeadroomGlobalConfigObjectSchema, HeadroomGlobalConfigSchema, HEADROOM_DEFAULT_SOURCE, HEADROOM_DEFAULT_IDLE_SHUTDOWN_MINUTES, FrontDoorGlobalConfigSchema, UPDATE_MODES, UpdateGlobalConfigSchema, GlobalConfigSchema, IdentitySchema, CategoryClassificationSchema, CategoryClassificationOverlaySchema, SHIPPED_CATEGORY_DEFAULTS;
|
|
245
|
+
var import_node_path2, import_zod, import_trilean, CATEGORY_NAMES, OVERRIDABLE_CATEGORIES, CategoryMapSchema, DURATION_RE, DurationSchema, WhenConditionObjectSchema, WhenSchema, EntryValueSchema, ENTRY_KEY_RE, EntriesSchema, LaunchSchema, CREDENTIAL_TARGETS, PROVIDER_CREDENTIAL_TARGETS, CREDENTIAL_TARGET_VARS, ArgvSchema, CommandSourceOptions, EnvCredentialSourceSchema, FileCredentialSourceSchema, CommandCredentialSourceSchema, OpCredentialSourceSchema, KeychainCredentialSourceSchema, LiteralCredentialSourceSchema, CredentialSourceSchema, RemoteCredentialSourceSchema, CREDENTIAL_CACHE_STORES, CredentialCacheSchema, CredentialSchema, ProviderCredentialSchema, RESERVED_PROVIDER_ENV_KEYS, ProviderEnvSchema, PROVIDER_KINDS, ANTIGRAVITY_MODES, ANTIGRAVITY_EFFORTS, ANTIGRAVITY_DEFAULT_MODE, ANTIGRAVITY_DEFAULT_TIER_MODELS, AntigravityProviderConfigSchema, CODEX_EFFORTS, CODEX_LOGINS, CODEX_DEFAULT_TIER_MODELS, CodexProviderConfigSchema, ProviderRouteSchema, HttpProviderSchema, CodexProviderSchema, AntigravityProviderSchema, ProviderSchema, ConfigProfileSchema, POOL_SELECTOR_PREFIX, POOL_NAME_PATTERN, IDENTITY_NAME_PATTERN, PoolNameSchema, SELECTOR_RE, IdentitySelectorSchema, PoolMemberSchema, POOL_PREFERENCES, PoolPreferenceSchema, PoolSchema, WEEKDAYS, AnchorSchema, JOB_WINDOWS, JobTriggerSchema, JobTargetSchema, JobSchema, DirectoryRuleSchema, DirectoryRulesSchema, PortableConfigSchema, HEADROOM_MODES, HEADROOM_CCR_MODES, HEADROOM_ROLLOUT_CHANNELS, INTERCEPT_CHANNELS, READ_MATURATION_CHANNELS, HeadroomGlobalConfigObjectSchema, HeadroomGlobalConfigSchema, HEADROOM_DEFAULT_SOURCE, HEADROOM_DEFAULT_IDLE_SHUTDOWN_MINUTES, FrontDoorGlobalConfigSchema, UPDATE_MODES, UpdateGlobalConfigSchema, GlobalConfigSchema, IdentitySchema, CategoryClassificationSchema, CategoryClassificationOverlaySchema, SHIPPED_CATEGORY_DEFAULTS;
|
|
240
246
|
var init_schema = __esm({
|
|
241
247
|
"src/config/schema.ts"() {
|
|
242
248
|
"use strict";
|
|
@@ -335,7 +341,47 @@ var init_schema = __esm({
|
|
|
335
341
|
ProviderEnvSchema = import_zod.z.record(import_zod.z.string().min(1), import_zod.z.string()).refine((env) => !Object.keys(env).some((key) => RESERVED_PROVIDER_ENV_KEYS.includes(key)), {
|
|
336
342
|
message: `env may not set ${RESERVED_PROVIDER_ENV_KEYS.join(", ")}: the credential block's target sets one and agent-shim removes the others`
|
|
337
343
|
});
|
|
338
|
-
PROVIDER_KINDS = ["http", "codex"];
|
|
344
|
+
PROVIDER_KINDS = ["http", "codex", "antigravity"];
|
|
345
|
+
ANTIGRAVITY_MODES = ["cloud", "local"];
|
|
346
|
+
ANTIGRAVITY_EFFORTS = ["none", "low", "medium", "high", "xhigh", "max"];
|
|
347
|
+
ANTIGRAVITY_DEFAULT_MODE = "cloud";
|
|
348
|
+
ANTIGRAVITY_DEFAULT_TIER_MODELS = Object.freeze({
|
|
349
|
+
fable: "gemini-2.5-pro",
|
|
350
|
+
opus: "gemini-2.5-pro",
|
|
351
|
+
sonnet: "gemini-2.5-flash",
|
|
352
|
+
haiku: "gemini-2.5-flash"
|
|
353
|
+
});
|
|
354
|
+
AntigravityProviderConfigSchema = import_zod.z.strictObject({
|
|
355
|
+
/** Operational mode: direct cloud endpoint or local ACP daemon. Defaults to `cloud`. */
|
|
356
|
+
mode: import_zod.z.enum(ANTIGRAVITY_MODES).optional(),
|
|
357
|
+
/** The model a request maps to when no tier matches its model name. */
|
|
358
|
+
defaultModel: import_zod.z.string().min(1).optional(),
|
|
359
|
+
/** Per-tier overrides of the shipped mapping, matched by substring of the requested model name in `ANTIGRAVITY_TIERS` order. */
|
|
360
|
+
models: import_zod.z.strictObject({
|
|
361
|
+
fable: import_zod.z.string().min(1).optional(),
|
|
362
|
+
opus: import_zod.z.string().min(1).optional(),
|
|
363
|
+
sonnet: import_zod.z.string().min(1).optional(),
|
|
364
|
+
haiku: import_zod.z.string().min(1).optional()
|
|
365
|
+
}).optional(),
|
|
366
|
+
/** The reasoning effort used when the request's own effort is not one the backend accepts. */
|
|
367
|
+
effort: import_zod.z.enum(ANTIGRAVITY_EFFORTS).optional(),
|
|
368
|
+
/** Cloud-specific settings (for `mode: "cloud"`). */
|
|
369
|
+
cloud: import_zod.z.strictObject({
|
|
370
|
+
/** Google Gemini API or custom gateway endpoint. Defaults to `https://generativelanguage.googleapis.com`. */
|
|
371
|
+
endpoint: import_zod.z.url().optional(),
|
|
372
|
+
/** Google Cloud Project ID (when using Vertex AI). */
|
|
373
|
+
projectId: import_zod.z.string().min(1).optional(),
|
|
374
|
+
/** Google Cloud location/region (when using Vertex AI). */
|
|
375
|
+
location: import_zod.z.string().min(1).optional()
|
|
376
|
+
}).optional(),
|
|
377
|
+
/** Local-specific settings (for `mode: "local"`). */
|
|
378
|
+
local: import_zod.z.strictObject({
|
|
379
|
+
/** Command and arguments to spawn the ACP server process. */
|
|
380
|
+
command: import_zod.z.array(import_zod.z.string().min(1)).min(1).optional(),
|
|
381
|
+
/** Path to an existing Unix domain socket to connect to instead of spawning a process. */
|
|
382
|
+
socketPath: import_zod.z.string().min(1).optional()
|
|
383
|
+
}).optional()
|
|
384
|
+
});
|
|
339
385
|
CODEX_EFFORTS = ["none", "low", "medium", "high"];
|
|
340
386
|
CODEX_LOGINS = ["codex-cli", "chatgpt-sign-in"];
|
|
341
387
|
CODEX_DEFAULT_TIER_MODELS = Object.freeze({
|
|
@@ -385,7 +431,15 @@ var init_schema = __esm({
|
|
|
385
431
|
env: ProviderEnvSchema.optional(),
|
|
386
432
|
codex: CodexProviderConfigSchema.optional()
|
|
387
433
|
});
|
|
388
|
-
|
|
434
|
+
AntigravityProviderSchema = import_zod.z.strictObject({
|
|
435
|
+
$schema: import_zod.z.string().optional(),
|
|
436
|
+
kind: import_zod.z.literal("antigravity"),
|
|
437
|
+
displayName: import_zod.z.string().min(1),
|
|
438
|
+
credential: ProviderCredentialSchema,
|
|
439
|
+
env: ProviderEnvSchema.optional(),
|
|
440
|
+
antigravity: AntigravityProviderConfigSchema.optional()
|
|
441
|
+
});
|
|
442
|
+
ProviderSchema = import_zod.z.discriminatedUnion("kind", [HttpProviderSchema, CodexProviderSchema, AntigravityProviderSchema]);
|
|
389
443
|
ConfigProfileSchema = import_zod.z.strictObject({
|
|
390
444
|
$schema: import_zod.z.string().optional(),
|
|
391
445
|
description: import_zod.z.string().optional(),
|
|
@@ -2787,7 +2841,7 @@ var init_package = __esm({
|
|
|
2787
2841
|
"package.json"() {
|
|
2788
2842
|
package_default = {
|
|
2789
2843
|
name: "claude-use",
|
|
2790
|
-
version: "11.
|
|
2844
|
+
version: "11.9.0",
|
|
2791
2845
|
description: "A profile manager and launcher for Claude Code that lets one person run multiple logins from one machine while controlling what gets shared between them.",
|
|
2792
2846
|
license: "MIT",
|
|
2793
2847
|
author: "Joseph Mearman <joseph@mearman.co.uk>",
|
|
@@ -3215,7 +3269,7 @@ function daemonIdentity(commandLine, socketPath) {
|
|
|
3215
3269
|
function earlierReleaseAllowlistHash(providers, doorOrigin) {
|
|
3216
3270
|
const entries = /* @__PURE__ */ new Set([EARLIER_RELEASE_ANTHROPIC_UPSTREAM]);
|
|
3217
3271
|
for (const provider of providers) {
|
|
3218
|
-
if (
|
|
3272
|
+
if (isHttpProvider(provider)) {
|
|
3219
3273
|
entries.add(provider.baseUrl);
|
|
3220
3274
|
}
|
|
3221
3275
|
}
|
|
@@ -6338,11 +6392,20 @@ function listProviderNames(readdir, providersDir) {
|
|
|
6338
6392
|
return entries.filter((entry) => entry.endsWith(".json")).map((entry) => entry.slice(0, -".json".length)).sort();
|
|
6339
6393
|
}
|
|
6340
6394
|
function describeProviderEndpoint(provider) {
|
|
6341
|
-
|
|
6395
|
+
if (isCodexProvider(provider)) {
|
|
6396
|
+
return "codex translation daemon";
|
|
6397
|
+
}
|
|
6398
|
+
if (isAntigravityProvider(provider)) {
|
|
6399
|
+
return (provider.antigravity?.mode ?? ANTIGRAVITY_DEFAULT_MODE) === "local" ? "antigravity local (ACP daemon)" : "antigravity cloud (Gemini API)";
|
|
6400
|
+
}
|
|
6401
|
+
return provider.baseUrl;
|
|
6342
6402
|
}
|
|
6343
6403
|
function isEmptyCodexConfig(config) {
|
|
6344
6404
|
return config === void 0 || config.defaultModel === void 0 && config.effort === void 0 && config.login === void 0 && (config.models === void 0 || Object.keys(config.models).length === 0);
|
|
6345
6405
|
}
|
|
6406
|
+
function isEmptyAntigravityConfig(config) {
|
|
6407
|
+
return config === void 0 || config.mode === void 0 && config.defaultModel === void 0 && config.effort === void 0 && config.cloud === void 0 && config.local === void 0 && (config.models === void 0 || Object.keys(config.models).length === 0);
|
|
6408
|
+
}
|
|
6346
6409
|
function addProvider(paths, name, input) {
|
|
6347
6410
|
if (providerExists(paths, name)) {
|
|
6348
6411
|
throw new ProviderAlreadyExistsError(name);
|
|
@@ -6354,19 +6417,25 @@ function addProvider(paths, name, input) {
|
|
|
6354
6417
|
if (kind === "codex" && input.baseUrl !== void 0) {
|
|
6355
6418
|
throw new ProviderKindMismatchError("A codex provider has no base URL: the launcher points its sessions at the front-door daemon. Drop --base-url.");
|
|
6356
6419
|
}
|
|
6420
|
+
if (kind === "antigravity" && input.baseUrl !== void 0) {
|
|
6421
|
+
throw new ProviderKindMismatchError("An antigravity provider has no base URL: the launcher points its sessions at the front-door daemon. Drop --base-url.");
|
|
6422
|
+
}
|
|
6357
6423
|
if (kind === "http" && input.baseUrl === void 0) {
|
|
6358
6424
|
throw new ProviderKindMismatchError("An http provider needs --base-url.");
|
|
6359
6425
|
}
|
|
6360
|
-
if (kind
|
|
6426
|
+
if (kind !== "codex" && !isEmptyCodexConfig(input.codex)) {
|
|
6361
6427
|
throw new ProviderKindMismatchError("Codex settings apply only to a codex provider (--kind codex).");
|
|
6362
6428
|
}
|
|
6429
|
+
if (kind !== "antigravity" && !isEmptyAntigravityConfig(input.antigravity)) {
|
|
6430
|
+
throw new ProviderKindMismatchError("Antigravity settings apply only to an antigravity provider (--kind antigravity).");
|
|
6431
|
+
}
|
|
6363
6432
|
const shared = {
|
|
6364
6433
|
displayName: input.displayName,
|
|
6365
6434
|
credential: { sources: input.sources, ...input.target === void 0 ? {} : { target: input.target } },
|
|
6366
6435
|
...input.env === void 0 || Object.keys(input.env).length === 0 ? {} : { env: input.env }
|
|
6367
6436
|
};
|
|
6368
6437
|
const parsed = ProviderSchema.safeParse(
|
|
6369
|
-
kind === "codex" ? { kind, ...shared, ...isEmptyCodexConfig(input.codex) ? {} : { codex: input.codex } } : { ...shared, baseUrl: input.baseUrl }
|
|
6438
|
+
kind === "codex" ? { kind, ...shared, ...isEmptyCodexConfig(input.codex) ? {} : { codex: input.codex } } : kind === "antigravity" ? { kind, ...shared, ...isEmptyAntigravityConfig(input.antigravity) ? {} : { antigravity: input.antigravity } } : { ...shared, baseUrl: input.baseUrl }
|
|
6370
6439
|
);
|
|
6371
6440
|
if (!parsed.success) {
|
|
6372
6441
|
throw new ConfigValidationError(providerJsonPath(paths, name), parsed.error.issues);
|
|
@@ -6386,8 +6455,14 @@ function updateProvider(paths, name, input) {
|
|
|
6386
6455
|
if (isCodexProvider(existing) && input.baseUrl !== void 0) {
|
|
6387
6456
|
throw new ProviderKindMismatchError(`Provider "${name}" is a codex provider, which has no base URL.`);
|
|
6388
6457
|
}
|
|
6458
|
+
if (isAntigravityProvider(existing) && input.baseUrl !== void 0) {
|
|
6459
|
+
throw new ProviderKindMismatchError(`Provider "${name}" is an antigravity provider, which has no base URL.`);
|
|
6460
|
+
}
|
|
6389
6461
|
if (!isCodexProvider(existing) && !isEmptyCodexConfig(input.codex)) {
|
|
6390
|
-
throw new ProviderKindMismatchError(`Provider "${name}" is
|
|
6462
|
+
throw new ProviderKindMismatchError(`Provider "${name}" is not a codex provider; codex settings apply only to a codex provider.`);
|
|
6463
|
+
}
|
|
6464
|
+
if (!isAntigravityProvider(existing) && !isEmptyAntigravityConfig(input.antigravity)) {
|
|
6465
|
+
throw new ProviderKindMismatchError(`Provider "${name}" is not an antigravity provider; antigravity settings apply only to an antigravity provider.`);
|
|
6391
6466
|
}
|
|
6392
6467
|
const shared = {
|
|
6393
6468
|
...input.displayName === void 0 ? {} : { displayName: input.displayName },
|
|
@@ -6406,6 +6481,13 @@ function updateProvider(paths, name, input) {
|
|
|
6406
6481
|
...existing.codex?.models === void 0 && input.codex?.models === void 0 ? {} : { models: { ...existing.codex?.models, ...input.codex?.models } }
|
|
6407
6482
|
};
|
|
6408
6483
|
candidate = { ...existing, ...shared, codex: isEmptyCodexConfig(codex) ? void 0 : codex };
|
|
6484
|
+
} else if (isAntigravityProvider(existing)) {
|
|
6485
|
+
const antigravity = {
|
|
6486
|
+
...existing.antigravity,
|
|
6487
|
+
...input.antigravity,
|
|
6488
|
+
...existing.antigravity?.models === void 0 && input.antigravity?.models === void 0 ? {} : { models: { ...existing.antigravity?.models, ...input.antigravity?.models } }
|
|
6489
|
+
};
|
|
6490
|
+
candidate = { ...existing, ...shared, antigravity: isEmptyAntigravityConfig(antigravity) ? void 0 : antigravity };
|
|
6409
6491
|
} else {
|
|
6410
6492
|
candidate = { ...existing, ...shared, ...input.baseUrl === void 0 ? {} : { baseUrl: input.baseUrl } };
|
|
6411
6493
|
}
|
|
@@ -15253,7 +15335,7 @@ function providerValue(name, provider) {
|
|
|
15253
15335
|
name,
|
|
15254
15336
|
kind: provider.kind ?? "http",
|
|
15255
15337
|
displayName: provider.displayName,
|
|
15256
|
-
...isCodexProvider(provider) ? provider.codex === void 0 ? {} : { codex: provider.codex } : { baseUrl: provider.baseUrl },
|
|
15338
|
+
...isCodexProvider(provider) ? provider.codex === void 0 ? {} : { codex: provider.codex } : isAntigravityProvider(provider) ? provider.antigravity === void 0 ? {} : { antigravity: provider.antigravity } : { baseUrl: provider.baseUrl },
|
|
15257
15339
|
credential: summariseCredential(provider.credential),
|
|
15258
15340
|
...provider.env === void 0 ? {} : { env: provider.env }
|
|
15259
15341
|
};
|
|
@@ -15432,7 +15514,7 @@ function createConfigApiRouter(deps) {
|
|
|
15432
15514
|
throw new ProviderNotFoundError(input.name);
|
|
15433
15515
|
}
|
|
15434
15516
|
const credential = input.credential;
|
|
15435
|
-
if (input.baseUrl !== void 0 &&
|
|
15517
|
+
if (input.baseUrl !== void 0 && isHttpProvider(existing) && input.baseUrl !== existing.baseUrl && credential?.sources === void 0) {
|
|
15436
15518
|
throw new import_client2.ORPCError("BAD_REQUEST", { message: `Changing the base URL of provider "${input.name}" requires a credential block in the same call: the stored credential is not sent to a different endpoint.` });
|
|
15437
15519
|
}
|
|
15438
15520
|
const cache = credential?.cache === void 0 ? void 0 : mergeCredentialCache(credential.cache === false ? { enabled: false } : { ...credential.cache, enabled: true }, existing.credential.cache);
|
package/dist/index.mjs
CHANGED
|
@@ -203,9 +203,15 @@ function expandAllCategoryKey(pairs) {
|
|
|
203
203
|
const expanded = Object.fromEntries(OVERRIDABLE_CATEGORIES.filter((category) => !all || category !== "runtime").map((category) => [category, all]));
|
|
204
204
|
return { ...expanded, ...rest };
|
|
205
205
|
}
|
|
206
|
+
function isHttpProvider(provider) {
|
|
207
|
+
return provider.kind === void 0 || provider.kind === "http";
|
|
208
|
+
}
|
|
206
209
|
function isCodexProvider(provider) {
|
|
207
210
|
return provider.kind === "codex";
|
|
208
211
|
}
|
|
212
|
+
function isAntigravityProvider(provider) {
|
|
213
|
+
return provider.kind === "antigravity";
|
|
214
|
+
}
|
|
209
215
|
function poolMemberIdentity(member) {
|
|
210
216
|
return typeof member === "string" ? member : member.identity;
|
|
211
217
|
}
|
|
@@ -217,7 +223,7 @@ function isTimeZone(name) {
|
|
|
217
223
|
return false;
|
|
218
224
|
}
|
|
219
225
|
}
|
|
220
|
-
var CATEGORY_NAMES, OVERRIDABLE_CATEGORIES, CategoryMapSchema, DURATION_RE, DurationSchema, WhenConditionObjectSchema, WhenSchema, EntryValueSchema, ENTRY_KEY_RE, EntriesSchema, LaunchSchema, CREDENTIAL_TARGETS, PROVIDER_CREDENTIAL_TARGETS, CREDENTIAL_TARGET_VARS, ArgvSchema, CommandSourceOptions, EnvCredentialSourceSchema, FileCredentialSourceSchema, CommandCredentialSourceSchema, OpCredentialSourceSchema, KeychainCredentialSourceSchema, LiteralCredentialSourceSchema, CredentialSourceSchema, RemoteCredentialSourceSchema, CREDENTIAL_CACHE_STORES, CredentialCacheSchema, CredentialSchema, ProviderCredentialSchema, RESERVED_PROVIDER_ENV_KEYS, ProviderEnvSchema, PROVIDER_KINDS, CODEX_EFFORTS, CODEX_LOGINS, CODEX_DEFAULT_TIER_MODELS, CodexProviderConfigSchema, ProviderRouteSchema, HttpProviderSchema, CodexProviderSchema, ProviderSchema, ConfigProfileSchema, POOL_SELECTOR_PREFIX, POOL_NAME_PATTERN, IDENTITY_NAME_PATTERN, PoolNameSchema, SELECTOR_RE, IdentitySelectorSchema, PoolMemberSchema, POOL_PREFERENCES, PoolPreferenceSchema, PoolSchema, WEEKDAYS, AnchorSchema, JOB_WINDOWS, JobTriggerSchema, JobTargetSchema, JobSchema, DirectoryRuleSchema, DirectoryRulesSchema, PortableConfigSchema, HEADROOM_MODES, HEADROOM_CCR_MODES, HEADROOM_ROLLOUT_CHANNELS, INTERCEPT_CHANNELS, READ_MATURATION_CHANNELS, HeadroomGlobalConfigObjectSchema, HeadroomGlobalConfigSchema, HEADROOM_DEFAULT_SOURCE, HEADROOM_DEFAULT_IDLE_SHUTDOWN_MINUTES, FrontDoorGlobalConfigSchema, UPDATE_MODES, UpdateGlobalConfigSchema, GlobalConfigSchema, IdentitySchema, CategoryClassificationSchema, CategoryClassificationOverlaySchema, SHIPPED_CATEGORY_DEFAULTS;
|
|
226
|
+
var CATEGORY_NAMES, OVERRIDABLE_CATEGORIES, CategoryMapSchema, DURATION_RE, DurationSchema, WhenConditionObjectSchema, WhenSchema, EntryValueSchema, ENTRY_KEY_RE, EntriesSchema, LaunchSchema, CREDENTIAL_TARGETS, PROVIDER_CREDENTIAL_TARGETS, CREDENTIAL_TARGET_VARS, ArgvSchema, CommandSourceOptions, EnvCredentialSourceSchema, FileCredentialSourceSchema, CommandCredentialSourceSchema, OpCredentialSourceSchema, KeychainCredentialSourceSchema, LiteralCredentialSourceSchema, CredentialSourceSchema, RemoteCredentialSourceSchema, CREDENTIAL_CACHE_STORES, CredentialCacheSchema, CredentialSchema, ProviderCredentialSchema, RESERVED_PROVIDER_ENV_KEYS, ProviderEnvSchema, PROVIDER_KINDS, ANTIGRAVITY_MODES, ANTIGRAVITY_EFFORTS, ANTIGRAVITY_DEFAULT_MODE, ANTIGRAVITY_DEFAULT_TIER_MODELS, AntigravityProviderConfigSchema, CODEX_EFFORTS, CODEX_LOGINS, CODEX_DEFAULT_TIER_MODELS, CodexProviderConfigSchema, ProviderRouteSchema, HttpProviderSchema, CodexProviderSchema, AntigravityProviderSchema, ProviderSchema, ConfigProfileSchema, POOL_SELECTOR_PREFIX, POOL_NAME_PATTERN, IDENTITY_NAME_PATTERN, PoolNameSchema, SELECTOR_RE, IdentitySelectorSchema, PoolMemberSchema, POOL_PREFERENCES, PoolPreferenceSchema, PoolSchema, WEEKDAYS, AnchorSchema, JOB_WINDOWS, JobTriggerSchema, JobTargetSchema, JobSchema, DirectoryRuleSchema, DirectoryRulesSchema, PortableConfigSchema, HEADROOM_MODES, HEADROOM_CCR_MODES, HEADROOM_ROLLOUT_CHANNELS, INTERCEPT_CHANNELS, READ_MATURATION_CHANNELS, HeadroomGlobalConfigObjectSchema, HeadroomGlobalConfigSchema, HEADROOM_DEFAULT_SOURCE, HEADROOM_DEFAULT_IDLE_SHUTDOWN_MINUTES, FrontDoorGlobalConfigSchema, UPDATE_MODES, UpdateGlobalConfigSchema, GlobalConfigSchema, IdentitySchema, CategoryClassificationSchema, CategoryClassificationOverlaySchema, SHIPPED_CATEGORY_DEFAULTS;
|
|
221
227
|
var init_schema = __esm({
|
|
222
228
|
"src/config/schema.ts"() {
|
|
223
229
|
"use strict";
|
|
@@ -313,7 +319,47 @@ var init_schema = __esm({
|
|
|
313
319
|
ProviderEnvSchema = z.record(z.string().min(1), z.string()).refine((env) => !Object.keys(env).some((key) => RESERVED_PROVIDER_ENV_KEYS.includes(key)), {
|
|
314
320
|
message: `env may not set ${RESERVED_PROVIDER_ENV_KEYS.join(", ")}: the credential block's target sets one and agent-shim removes the others`
|
|
315
321
|
});
|
|
316
|
-
PROVIDER_KINDS = ["http", "codex"];
|
|
322
|
+
PROVIDER_KINDS = ["http", "codex", "antigravity"];
|
|
323
|
+
ANTIGRAVITY_MODES = ["cloud", "local"];
|
|
324
|
+
ANTIGRAVITY_EFFORTS = ["none", "low", "medium", "high", "xhigh", "max"];
|
|
325
|
+
ANTIGRAVITY_DEFAULT_MODE = "cloud";
|
|
326
|
+
ANTIGRAVITY_DEFAULT_TIER_MODELS = Object.freeze({
|
|
327
|
+
fable: "gemini-2.5-pro",
|
|
328
|
+
opus: "gemini-2.5-pro",
|
|
329
|
+
sonnet: "gemini-2.5-flash",
|
|
330
|
+
haiku: "gemini-2.5-flash"
|
|
331
|
+
});
|
|
332
|
+
AntigravityProviderConfigSchema = z.strictObject({
|
|
333
|
+
/** Operational mode: direct cloud endpoint or local ACP daemon. Defaults to `cloud`. */
|
|
334
|
+
mode: z.enum(ANTIGRAVITY_MODES).optional(),
|
|
335
|
+
/** The model a request maps to when no tier matches its model name. */
|
|
336
|
+
defaultModel: z.string().min(1).optional(),
|
|
337
|
+
/** Per-tier overrides of the shipped mapping, matched by substring of the requested model name in `ANTIGRAVITY_TIERS` order. */
|
|
338
|
+
models: z.strictObject({
|
|
339
|
+
fable: z.string().min(1).optional(),
|
|
340
|
+
opus: z.string().min(1).optional(),
|
|
341
|
+
sonnet: z.string().min(1).optional(),
|
|
342
|
+
haiku: z.string().min(1).optional()
|
|
343
|
+
}).optional(),
|
|
344
|
+
/** The reasoning effort used when the request's own effort is not one the backend accepts. */
|
|
345
|
+
effort: z.enum(ANTIGRAVITY_EFFORTS).optional(),
|
|
346
|
+
/** Cloud-specific settings (for `mode: "cloud"`). */
|
|
347
|
+
cloud: z.strictObject({
|
|
348
|
+
/** Google Gemini API or custom gateway endpoint. Defaults to `https://generativelanguage.googleapis.com`. */
|
|
349
|
+
endpoint: z.url().optional(),
|
|
350
|
+
/** Google Cloud Project ID (when using Vertex AI). */
|
|
351
|
+
projectId: z.string().min(1).optional(),
|
|
352
|
+
/** Google Cloud location/region (when using Vertex AI). */
|
|
353
|
+
location: z.string().min(1).optional()
|
|
354
|
+
}).optional(),
|
|
355
|
+
/** Local-specific settings (for `mode: "local"`). */
|
|
356
|
+
local: z.strictObject({
|
|
357
|
+
/** Command and arguments to spawn the ACP server process. */
|
|
358
|
+
command: z.array(z.string().min(1)).min(1).optional(),
|
|
359
|
+
/** Path to an existing Unix domain socket to connect to instead of spawning a process. */
|
|
360
|
+
socketPath: z.string().min(1).optional()
|
|
361
|
+
}).optional()
|
|
362
|
+
});
|
|
317
363
|
CODEX_EFFORTS = ["none", "low", "medium", "high"];
|
|
318
364
|
CODEX_LOGINS = ["codex-cli", "chatgpt-sign-in"];
|
|
319
365
|
CODEX_DEFAULT_TIER_MODELS = Object.freeze({
|
|
@@ -363,7 +409,15 @@ var init_schema = __esm({
|
|
|
363
409
|
env: ProviderEnvSchema.optional(),
|
|
364
410
|
codex: CodexProviderConfigSchema.optional()
|
|
365
411
|
});
|
|
366
|
-
|
|
412
|
+
AntigravityProviderSchema = z.strictObject({
|
|
413
|
+
$schema: z.string().optional(),
|
|
414
|
+
kind: z.literal("antigravity"),
|
|
415
|
+
displayName: z.string().min(1),
|
|
416
|
+
credential: ProviderCredentialSchema,
|
|
417
|
+
env: ProviderEnvSchema.optional(),
|
|
418
|
+
antigravity: AntigravityProviderConfigSchema.optional()
|
|
419
|
+
});
|
|
420
|
+
ProviderSchema = z.discriminatedUnion("kind", [HttpProviderSchema, CodexProviderSchema, AntigravityProviderSchema]);
|
|
367
421
|
ConfigProfileSchema = z.strictObject({
|
|
368
422
|
$schema: z.string().optional(),
|
|
369
423
|
description: z.string().optional(),
|
|
@@ -2763,7 +2817,7 @@ var init_package = __esm({
|
|
|
2763
2817
|
"package.json"() {
|
|
2764
2818
|
package_default = {
|
|
2765
2819
|
name: "claude-use",
|
|
2766
|
-
version: "11.
|
|
2820
|
+
version: "11.9.0",
|
|
2767
2821
|
description: "A profile manager and launcher for Claude Code that lets one person run multiple logins from one machine while controlling what gets shared between them.",
|
|
2768
2822
|
license: "MIT",
|
|
2769
2823
|
author: "Joseph Mearman <joseph@mearman.co.uk>",
|
|
@@ -3191,7 +3245,7 @@ function daemonIdentity(commandLine, socketPath) {
|
|
|
3191
3245
|
function earlierReleaseAllowlistHash(providers, doorOrigin) {
|
|
3192
3246
|
const entries = /* @__PURE__ */ new Set([EARLIER_RELEASE_ANTHROPIC_UPSTREAM]);
|
|
3193
3247
|
for (const provider of providers) {
|
|
3194
|
-
if (
|
|
3248
|
+
if (isHttpProvider(provider)) {
|
|
3195
3249
|
entries.add(provider.baseUrl);
|
|
3196
3250
|
}
|
|
3197
3251
|
}
|
|
@@ -6313,11 +6367,20 @@ function listProviderNames(readdir, providersDir) {
|
|
|
6313
6367
|
return entries.filter((entry) => entry.endsWith(".json")).map((entry) => entry.slice(0, -".json".length)).sort();
|
|
6314
6368
|
}
|
|
6315
6369
|
function describeProviderEndpoint(provider) {
|
|
6316
|
-
|
|
6370
|
+
if (isCodexProvider(provider)) {
|
|
6371
|
+
return "codex translation daemon";
|
|
6372
|
+
}
|
|
6373
|
+
if (isAntigravityProvider(provider)) {
|
|
6374
|
+
return (provider.antigravity?.mode ?? ANTIGRAVITY_DEFAULT_MODE) === "local" ? "antigravity local (ACP daemon)" : "antigravity cloud (Gemini API)";
|
|
6375
|
+
}
|
|
6376
|
+
return provider.baseUrl;
|
|
6317
6377
|
}
|
|
6318
6378
|
function isEmptyCodexConfig(config) {
|
|
6319
6379
|
return config === void 0 || config.defaultModel === void 0 && config.effort === void 0 && config.login === void 0 && (config.models === void 0 || Object.keys(config.models).length === 0);
|
|
6320
6380
|
}
|
|
6381
|
+
function isEmptyAntigravityConfig(config) {
|
|
6382
|
+
return config === void 0 || config.mode === void 0 && config.defaultModel === void 0 && config.effort === void 0 && config.cloud === void 0 && config.local === void 0 && (config.models === void 0 || Object.keys(config.models).length === 0);
|
|
6383
|
+
}
|
|
6321
6384
|
function addProvider(paths, name, input) {
|
|
6322
6385
|
if (providerExists(paths, name)) {
|
|
6323
6386
|
throw new ProviderAlreadyExistsError(name);
|
|
@@ -6329,19 +6392,25 @@ function addProvider(paths, name, input) {
|
|
|
6329
6392
|
if (kind === "codex" && input.baseUrl !== void 0) {
|
|
6330
6393
|
throw new ProviderKindMismatchError("A codex provider has no base URL: the launcher points its sessions at the front-door daemon. Drop --base-url.");
|
|
6331
6394
|
}
|
|
6395
|
+
if (kind === "antigravity" && input.baseUrl !== void 0) {
|
|
6396
|
+
throw new ProviderKindMismatchError("An antigravity provider has no base URL: the launcher points its sessions at the front-door daemon. Drop --base-url.");
|
|
6397
|
+
}
|
|
6332
6398
|
if (kind === "http" && input.baseUrl === void 0) {
|
|
6333
6399
|
throw new ProviderKindMismatchError("An http provider needs --base-url.");
|
|
6334
6400
|
}
|
|
6335
|
-
if (kind
|
|
6401
|
+
if (kind !== "codex" && !isEmptyCodexConfig(input.codex)) {
|
|
6336
6402
|
throw new ProviderKindMismatchError("Codex settings apply only to a codex provider (--kind codex).");
|
|
6337
6403
|
}
|
|
6404
|
+
if (kind !== "antigravity" && !isEmptyAntigravityConfig(input.antigravity)) {
|
|
6405
|
+
throw new ProviderKindMismatchError("Antigravity settings apply only to an antigravity provider (--kind antigravity).");
|
|
6406
|
+
}
|
|
6338
6407
|
const shared = {
|
|
6339
6408
|
displayName: input.displayName,
|
|
6340
6409
|
credential: { sources: input.sources, ...input.target === void 0 ? {} : { target: input.target } },
|
|
6341
6410
|
...input.env === void 0 || Object.keys(input.env).length === 0 ? {} : { env: input.env }
|
|
6342
6411
|
};
|
|
6343
6412
|
const parsed = ProviderSchema.safeParse(
|
|
6344
|
-
kind === "codex" ? { kind, ...shared, ...isEmptyCodexConfig(input.codex) ? {} : { codex: input.codex } } : { ...shared, baseUrl: input.baseUrl }
|
|
6413
|
+
kind === "codex" ? { kind, ...shared, ...isEmptyCodexConfig(input.codex) ? {} : { codex: input.codex } } : kind === "antigravity" ? { kind, ...shared, ...isEmptyAntigravityConfig(input.antigravity) ? {} : { antigravity: input.antigravity } } : { ...shared, baseUrl: input.baseUrl }
|
|
6345
6414
|
);
|
|
6346
6415
|
if (!parsed.success) {
|
|
6347
6416
|
throw new ConfigValidationError(providerJsonPath(paths, name), parsed.error.issues);
|
|
@@ -6361,8 +6430,14 @@ function updateProvider(paths, name, input) {
|
|
|
6361
6430
|
if (isCodexProvider(existing) && input.baseUrl !== void 0) {
|
|
6362
6431
|
throw new ProviderKindMismatchError(`Provider "${name}" is a codex provider, which has no base URL.`);
|
|
6363
6432
|
}
|
|
6433
|
+
if (isAntigravityProvider(existing) && input.baseUrl !== void 0) {
|
|
6434
|
+
throw new ProviderKindMismatchError(`Provider "${name}" is an antigravity provider, which has no base URL.`);
|
|
6435
|
+
}
|
|
6364
6436
|
if (!isCodexProvider(existing) && !isEmptyCodexConfig(input.codex)) {
|
|
6365
|
-
throw new ProviderKindMismatchError(`Provider "${name}" is
|
|
6437
|
+
throw new ProviderKindMismatchError(`Provider "${name}" is not a codex provider; codex settings apply only to a codex provider.`);
|
|
6438
|
+
}
|
|
6439
|
+
if (!isAntigravityProvider(existing) && !isEmptyAntigravityConfig(input.antigravity)) {
|
|
6440
|
+
throw new ProviderKindMismatchError(`Provider "${name}" is not an antigravity provider; antigravity settings apply only to an antigravity provider.`);
|
|
6366
6441
|
}
|
|
6367
6442
|
const shared = {
|
|
6368
6443
|
...input.displayName === void 0 ? {} : { displayName: input.displayName },
|
|
@@ -6381,6 +6456,13 @@ function updateProvider(paths, name, input) {
|
|
|
6381
6456
|
...existing.codex?.models === void 0 && input.codex?.models === void 0 ? {} : { models: { ...existing.codex?.models, ...input.codex?.models } }
|
|
6382
6457
|
};
|
|
6383
6458
|
candidate = { ...existing, ...shared, codex: isEmptyCodexConfig(codex) ? void 0 : codex };
|
|
6459
|
+
} else if (isAntigravityProvider(existing)) {
|
|
6460
|
+
const antigravity = {
|
|
6461
|
+
...existing.antigravity,
|
|
6462
|
+
...input.antigravity,
|
|
6463
|
+
...existing.antigravity?.models === void 0 && input.antigravity?.models === void 0 ? {} : { models: { ...existing.antigravity?.models, ...input.antigravity?.models } }
|
|
6464
|
+
};
|
|
6465
|
+
candidate = { ...existing, ...shared, antigravity: isEmptyAntigravityConfig(antigravity) ? void 0 : antigravity };
|
|
6384
6466
|
} else {
|
|
6385
6467
|
candidate = { ...existing, ...shared, ...input.baseUrl === void 0 ? {} : { baseUrl: input.baseUrl } };
|
|
6386
6468
|
}
|
|
@@ -14840,7 +14922,7 @@ function providerValue(name, provider) {
|
|
|
14840
14922
|
name,
|
|
14841
14923
|
kind: provider.kind ?? "http",
|
|
14842
14924
|
displayName: provider.displayName,
|
|
14843
|
-
...isCodexProvider(provider) ? provider.codex === void 0 ? {} : { codex: provider.codex } : { baseUrl: provider.baseUrl },
|
|
14925
|
+
...isCodexProvider(provider) ? provider.codex === void 0 ? {} : { codex: provider.codex } : isAntigravityProvider(provider) ? provider.antigravity === void 0 ? {} : { antigravity: provider.antigravity } : { baseUrl: provider.baseUrl },
|
|
14844
14926
|
credential: summariseCredential(provider.credential),
|
|
14845
14927
|
...provider.env === void 0 ? {} : { env: provider.env }
|
|
14846
14928
|
};
|
|
@@ -15019,7 +15101,7 @@ function createConfigApiRouter(deps) {
|
|
|
15019
15101
|
throw new ProviderNotFoundError(input.name);
|
|
15020
15102
|
}
|
|
15021
15103
|
const credential = input.credential;
|
|
15022
|
-
if (input.baseUrl !== void 0 &&
|
|
15104
|
+
if (input.baseUrl !== void 0 && isHttpProvider(existing) && input.baseUrl !== existing.baseUrl && credential?.sources === void 0) {
|
|
15023
15105
|
throw new ORPCError2("BAD_REQUEST", { message: `Changing the base URL of provider "${input.name}" requires a credential block in the same call: the stored credential is not sent to a different endpoint.` });
|
|
15024
15106
|
}
|
|
15025
15107
|
const cache = credential?.cache === void 0 ? void 0 : mergeCredentialCache(credential.cache === false ? { enabled: false } : { ...credential.cache, enabled: true }, existing.credential.cache);
|
package/dist/types/index.d.ts
CHANGED
|
@@ -380,7 +380,41 @@ declare const CredentialSchema: z.ZodObject<{
|
|
|
380
380
|
}, z.core.$strict>;
|
|
381
381
|
type Credential = z.infer<typeof CredentialSchema>;
|
|
382
382
|
/** The kinds of provider: `http` is an Anthropic Messages endpoint at a fixed `baseUrl` (the default when `kind` is absent), and `codex` is ChatGPT's Codex backend reached through agent-shim's own supervised translation daemon. */
|
|
383
|
-
declare const PROVIDER_KINDS: readonly ["http", "codex"];
|
|
383
|
+
declare const PROVIDER_KINDS: readonly ["http", "codex", "antigravity"];
|
|
384
|
+
/**
|
|
385
|
+
* How an Antigravity provider translates Claude Code's requests and connects to its backend.
|
|
386
|
+
*/
|
|
387
|
+
declare const AntigravityProviderConfigSchema: z.ZodObject<{
|
|
388
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
389
|
+
cloud: "cloud";
|
|
390
|
+
local: "local";
|
|
391
|
+
}>>;
|
|
392
|
+
defaultModel: z.ZodOptional<z.ZodString>;
|
|
393
|
+
models: z.ZodOptional<z.ZodObject<{
|
|
394
|
+
fable: z.ZodOptional<z.ZodString>;
|
|
395
|
+
opus: z.ZodOptional<z.ZodString>;
|
|
396
|
+
sonnet: z.ZodOptional<z.ZodString>;
|
|
397
|
+
haiku: z.ZodOptional<z.ZodString>;
|
|
398
|
+
}, z.core.$strict>>;
|
|
399
|
+
effort: z.ZodOptional<z.ZodEnum<{
|
|
400
|
+
none: "none";
|
|
401
|
+
max: "max";
|
|
402
|
+
low: "low";
|
|
403
|
+
medium: "medium";
|
|
404
|
+
high: "high";
|
|
405
|
+
xhigh: "xhigh";
|
|
406
|
+
}>>;
|
|
407
|
+
cloud: z.ZodOptional<z.ZodObject<{
|
|
408
|
+
endpoint: z.ZodOptional<z.ZodURL>;
|
|
409
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
410
|
+
location: z.ZodOptional<z.ZodString>;
|
|
411
|
+
}, z.core.$strict>>;
|
|
412
|
+
local: z.ZodOptional<z.ZodObject<{
|
|
413
|
+
command: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
414
|
+
socketPath: z.ZodOptional<z.ZodString>;
|
|
415
|
+
}, z.core.$strict>>;
|
|
416
|
+
}, z.core.$strict>;
|
|
417
|
+
type AntigravityProviderConfig = z.infer<typeof AntigravityProviderConfigSchema>;
|
|
384
418
|
/**
|
|
385
419
|
* How a codex provider translates Claude Code's requests. Every field is optional and defaults to the shipped mapping (`CODEX_DEFAULT_MODEL`, `CODEX_DEFAULT_TIER_MODELS`, `CODEX_DEFAULT_EFFORT`), so an absent block means the stock behaviour. A requested model that already names a codex model (`gpt-...`) passes through untouched whatever this says.
|
|
386
420
|
*/
|
|
@@ -404,7 +438,7 @@ declare const CodexProviderConfigSchema: z.ZodObject<{
|
|
|
404
438
|
}>>;
|
|
405
439
|
}, z.core.$strict>;
|
|
406
440
|
type CodexProviderConfig = z.infer<typeof CodexProviderConfigSchema>;
|
|
407
|
-
/**
|
|
441
|
+
/** All kinds of provider; see `HttpProviderSchema` for the shared fields. */
|
|
408
442
|
declare const ProviderSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
409
443
|
$schema: z.ZodOptional<z.ZodString>;
|
|
410
444
|
kind: z.ZodOptional<z.ZodLiteral<"http">>;
|
|
@@ -581,6 +615,76 @@ declare const ProviderSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
581
615
|
"chatgpt-sign-in": "chatgpt-sign-in";
|
|
582
616
|
}>>;
|
|
583
617
|
}, z.core.$strict>>;
|
|
618
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
619
|
+
$schema: z.ZodOptional<z.ZodString>;
|
|
620
|
+
kind: z.ZodLiteral<"antigravity">;
|
|
621
|
+
displayName: z.ZodString;
|
|
622
|
+
credential: z.ZodObject<{
|
|
623
|
+
sources: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
624
|
+
env: z.ZodString;
|
|
625
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
626
|
+
file: z.ZodString;
|
|
627
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
628
|
+
interactive: z.ZodOptional<z.ZodBoolean>;
|
|
629
|
+
timeoutMs: z.ZodOptional<z.ZodInt>;
|
|
630
|
+
command: z.ZodTuple<[z.ZodString], z.ZodString>;
|
|
631
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
632
|
+
interactive: z.ZodOptional<z.ZodBoolean>;
|
|
633
|
+
timeoutMs: z.ZodOptional<z.ZodInt>;
|
|
634
|
+
op: z.ZodString;
|
|
635
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
636
|
+
interactive: z.ZodOptional<z.ZodBoolean>;
|
|
637
|
+
timeoutMs: z.ZodOptional<z.ZodInt>;
|
|
638
|
+
keychain: z.ZodObject<{
|
|
639
|
+
service: z.ZodString;
|
|
640
|
+
account: z.ZodOptional<z.ZodString>;
|
|
641
|
+
}, z.core.$strict>;
|
|
642
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
643
|
+
literal: z.ZodString;
|
|
644
|
+
}, z.core.$strict>]>>;
|
|
645
|
+
cache: z.ZodOptional<z.ZodObject<{
|
|
646
|
+
ttl: z.ZodOptional<z.ZodString>;
|
|
647
|
+
store: z.ZodOptional<z.ZodEnum<{
|
|
648
|
+
file: "file";
|
|
649
|
+
keychain: "keychain";
|
|
650
|
+
}>>;
|
|
651
|
+
}, z.core.$strict>>;
|
|
652
|
+
target: z.ZodOptional<z.ZodEnum<{
|
|
653
|
+
apiKey: "apiKey";
|
|
654
|
+
bearer: "bearer";
|
|
655
|
+
}>>;
|
|
656
|
+
}, z.core.$strict>;
|
|
657
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
658
|
+
antigravity: z.ZodOptional<z.ZodObject<{
|
|
659
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
660
|
+
cloud: "cloud";
|
|
661
|
+
local: "local";
|
|
662
|
+
}>>;
|
|
663
|
+
defaultModel: z.ZodOptional<z.ZodString>;
|
|
664
|
+
models: z.ZodOptional<z.ZodObject<{
|
|
665
|
+
fable: z.ZodOptional<z.ZodString>;
|
|
666
|
+
opus: z.ZodOptional<z.ZodString>;
|
|
667
|
+
sonnet: z.ZodOptional<z.ZodString>;
|
|
668
|
+
haiku: z.ZodOptional<z.ZodString>;
|
|
669
|
+
}, z.core.$strict>>;
|
|
670
|
+
effort: z.ZodOptional<z.ZodEnum<{
|
|
671
|
+
none: "none";
|
|
672
|
+
max: "max";
|
|
673
|
+
low: "low";
|
|
674
|
+
medium: "medium";
|
|
675
|
+
high: "high";
|
|
676
|
+
xhigh: "xhigh";
|
|
677
|
+
}>>;
|
|
678
|
+
cloud: z.ZodOptional<z.ZodObject<{
|
|
679
|
+
endpoint: z.ZodOptional<z.ZodURL>;
|
|
680
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
681
|
+
location: z.ZodOptional<z.ZodString>;
|
|
682
|
+
}, z.core.$strict>>;
|
|
683
|
+
local: z.ZodOptional<z.ZodObject<{
|
|
684
|
+
command: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
685
|
+
socketPath: z.ZodOptional<z.ZodString>;
|
|
686
|
+
}, z.core.$strict>>;
|
|
687
|
+
}, z.core.$strict>>;
|
|
584
688
|
}, z.core.$strict>], "kind">;
|
|
585
689
|
type Provider = z.infer<typeof ProviderSchema>;
|
|
586
690
|
/**
|
|
@@ -6122,6 +6226,7 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
|
|
|
6122
6226
|
kind: zod.ZodOptional<zod.ZodEnum<{
|
|
6123
6227
|
http: "http";
|
|
6124
6228
|
codex: "codex";
|
|
6229
|
+
antigravity: "antigravity";
|
|
6125
6230
|
}>>;
|
|
6126
6231
|
displayName: zod.ZodString;
|
|
6127
6232
|
baseUrl: zod.ZodOptional<zod.ZodString>;
|
|
@@ -6184,6 +6289,7 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
|
|
|
6184
6289
|
kind: zod.ZodEnum<{
|
|
6185
6290
|
http: "http";
|
|
6186
6291
|
codex: "codex";
|
|
6292
|
+
antigravity: "antigravity";
|
|
6187
6293
|
}>;
|
|
6188
6294
|
displayName: zod.ZodString;
|
|
6189
6295
|
baseUrl: zod.ZodOptional<zod.ZodString>;
|
|
@@ -6305,6 +6411,7 @@ declare function createConfigApiRouter(deps: ConfigApiDeps): {
|
|
|
6305
6411
|
kind: zod.ZodEnum<{
|
|
6306
6412
|
http: "http";
|
|
6307
6413
|
codex: "codex";
|
|
6414
|
+
antigravity: "antigravity";
|
|
6308
6415
|
}>;
|
|
6309
6416
|
displayName: zod.ZodString;
|
|
6310
6417
|
baseUrl: zod.ZodOptional<zod.ZodString>;
|
|
@@ -9072,6 +9179,7 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
9072
9179
|
kind: zod.ZodOptional<zod.ZodEnum<{
|
|
9073
9180
|
http: "http";
|
|
9074
9181
|
codex: "codex";
|
|
9182
|
+
antigravity: "antigravity";
|
|
9075
9183
|
}>>;
|
|
9076
9184
|
displayName: zod.ZodString;
|
|
9077
9185
|
baseUrl: zod.ZodOptional<zod.ZodString>;
|
|
@@ -9134,6 +9242,7 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
9134
9242
|
kind: zod.ZodEnum<{
|
|
9135
9243
|
http: "http";
|
|
9136
9244
|
codex: "codex";
|
|
9245
|
+
antigravity: "antigravity";
|
|
9137
9246
|
}>;
|
|
9138
9247
|
displayName: zod.ZodString;
|
|
9139
9248
|
baseUrl: zod.ZodOptional<zod.ZodString>;
|
|
@@ -9255,6 +9364,7 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
9255
9364
|
kind: zod.ZodEnum<{
|
|
9256
9365
|
http: "http";
|
|
9257
9366
|
codex: "codex";
|
|
9367
|
+
antigravity: "antigravity";
|
|
9258
9368
|
}>;
|
|
9259
9369
|
displayName: zod.ZodString;
|
|
9260
9370
|
baseUrl: zod.ZodOptional<zod.ZodString>;
|
|
@@ -11180,6 +11290,7 @@ declare const ConfigProviderAddInputSchema: z.ZodObject<{
|
|
|
11180
11290
|
kind: z.ZodOptional<z.ZodEnum<{
|
|
11181
11291
|
http: "http";
|
|
11182
11292
|
codex: "codex";
|
|
11293
|
+
antigravity: "antigravity";
|
|
11183
11294
|
}>>;
|
|
11184
11295
|
displayName: z.ZodString;
|
|
11185
11296
|
baseUrl: z.ZodOptional<z.ZodString>;
|
|
@@ -11243,6 +11354,7 @@ declare const ConfigProviderAddOutputSchema: z.ZodObject<{
|
|
|
11243
11354
|
kind: z.ZodEnum<{
|
|
11244
11355
|
http: "http";
|
|
11245
11356
|
codex: "codex";
|
|
11357
|
+
antigravity: "antigravity";
|
|
11246
11358
|
}>;
|
|
11247
11359
|
displayName: z.ZodString;
|
|
11248
11360
|
baseUrl: z.ZodOptional<z.ZodString>;
|
|
@@ -11366,6 +11478,7 @@ declare const ConfigProviderSetOutputSchema: z.ZodObject<{
|
|
|
11366
11478
|
kind: z.ZodEnum<{
|
|
11367
11479
|
http: "http";
|
|
11368
11480
|
codex: "codex";
|
|
11481
|
+
antigravity: "antigravity";
|
|
11369
11482
|
}>;
|
|
11370
11483
|
displayName: z.ZodString;
|
|
11371
11484
|
baseUrl: z.ZodOptional<z.ZodString>;
|
|
@@ -13216,9 +13329,9 @@ declare function listProviders(paths: LayoutPaths): readonly ProviderListEntry[]
|
|
|
13216
13329
|
type ProviderCredentialTarget = (typeof PROVIDER_CREDENTIAL_TARGETS)[number];
|
|
13217
13330
|
/** The kinds of provider. */
|
|
13218
13331
|
type ProviderKind = (typeof PROVIDER_KINDS)[number];
|
|
13219
|
-
/** Where a provider sends its sessions, for display: an `http` provider's base URL, or the front door for a codex provider (whose address exists only at launch). */
|
|
13332
|
+
/** Where a provider sends its sessions, for display: an `http` provider's base URL, or the front door for a codex/antigravity provider (whose address exists only at launch). */
|
|
13220
13333
|
declare function describeProviderEndpoint(provider: Provider): string;
|
|
13221
|
-
/** Everything `addProvider` writes into a fresh provider file. `baseUrl` is required for an `http` provider and refused for
|
|
13334
|
+
/** Everything `addProvider` writes into a fresh provider file. `baseUrl` is required for an `http` provider and refused for codex/antigravity ones; `codex` applies only to codex, `antigravity` applies only to antigravity. */
|
|
13222
13335
|
interface AddProviderInput {
|
|
13223
13336
|
readonly kind?: ProviderKind;
|
|
13224
13337
|
readonly displayName: string;
|
|
@@ -13227,8 +13340,9 @@ interface AddProviderInput {
|
|
|
13227
13340
|
readonly target?: ProviderCredentialTarget;
|
|
13228
13341
|
readonly env?: Readonly<Record<string, string>>;
|
|
13229
13342
|
readonly codex?: CodexProviderConfig;
|
|
13343
|
+
readonly antigravity?: AntigravityProviderConfig;
|
|
13230
13344
|
}
|
|
13231
|
-
/** Raised when a provider option does not fit the provider's kind
|
|
13345
|
+
/** Raised when a provider option does not fit the provider's kind. */
|
|
13232
13346
|
declare class ProviderKindMismatchError extends UsageError {
|
|
13233
13347
|
constructor(message: string);
|
|
13234
13348
|
}
|
|
@@ -13250,6 +13364,8 @@ interface UpdateProviderInput {
|
|
|
13250
13364
|
readonly unsetEnv?: readonly string[];
|
|
13251
13365
|
/** Merged over a codex provider's existing settings: a field given here replaces that field, and `models` entries merge per tier. */
|
|
13252
13366
|
readonly codex?: CodexProviderConfig;
|
|
13367
|
+
/** Merged over an antigravity provider's existing settings: a field given here replaces that field, and `models` entries merge per tier. */
|
|
13368
|
+
readonly antigravity?: AntigravityProviderConfig;
|
|
13253
13369
|
}
|
|
13254
13370
|
/**
|
|
13255
13371
|
* Updates an existing provider definition in place. Throws `ProviderNotFoundError` when it does not exist, and `ConfigValidationError` when the updated definition fails `ProviderSchema`, leaving the file untouched.
|