claude-use 12.0.0 → 12.1.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 +678 -380
- package/dist/index.cjs +828 -547
- package/dist/index.mjs +820 -540
- package/dist/types/index.d.ts +1062 -1002
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -23762,9 +23762,9 @@ var require_env_paths = __commonJS({
|
|
|
23762
23762
|
"node_modules/.pnpm/env-paths@2.2.1/node_modules/env-paths/index.js"(exports2, module2) {
|
|
23763
23763
|
"use strict";
|
|
23764
23764
|
var path101 = require("path");
|
|
23765
|
-
var
|
|
23766
|
-
var homedir =
|
|
23767
|
-
var tmpdir2 =
|
|
23765
|
+
var os25 = require("os");
|
|
23766
|
+
var homedir = os25.homedir();
|
|
23767
|
+
var tmpdir2 = os25.tmpdir();
|
|
23768
23768
|
var { env } = process;
|
|
23769
23769
|
var macos = (name) => {
|
|
23770
23770
|
const library = path101.join(homedir, "Library");
|
|
@@ -32078,6 +32078,9 @@ async function realRunningAmong(pids, psTimeoutMs = PS_TIMEOUT_MS) {
|
|
|
32078
32078
|
const states = await readProcessStates(existing, psTimeoutMs);
|
|
32079
32079
|
return new Set(existing.filter((pid) => states.get(pid)?.startsWith("Z") !== true));
|
|
32080
32080
|
}
|
|
32081
|
+
function definedEntries(env) {
|
|
32082
|
+
return Object.fromEntries(Object.entries(env).filter((entry) => entry[1] !== void 0));
|
|
32083
|
+
}
|
|
32081
32084
|
function realRunAsyncWithin(timeoutMs) {
|
|
32082
32085
|
return async (command, args) => await new Promise((resolve3) => {
|
|
32083
32086
|
(0, import_node_child_process3.execFile)(command, [...args], { encoding: "utf8", timeout: timeoutMs }, (error63, stdout2, stderr) => {
|
|
@@ -32543,8 +32546,14 @@ var init_realPorts = __esm({
|
|
|
32543
32546
|
BYTES_PER_MIB2 = 1048576;
|
|
32544
32547
|
RUN_OUTPUT_LIMIT_BYTES = RUN_OUTPUT_LIMIT_MIB * BYTES_PER_MIB2;
|
|
32545
32548
|
realRunPort = {
|
|
32546
|
-
run(command, args, input2) {
|
|
32547
|
-
const result = spawnSyncBlocking("an external command", command, args, {
|
|
32549
|
+
run(command, args, input2, options) {
|
|
32550
|
+
const result = spawnSyncBlocking("an external command", command, args, {
|
|
32551
|
+
encoding: "utf8",
|
|
32552
|
+
maxBuffer: RUN_OUTPUT_LIMIT_BYTES,
|
|
32553
|
+
...input2 === void 0 ? {} : { input: input2 },
|
|
32554
|
+
...options?.env === void 0 ? {} : { env: definedEntries(options.env) },
|
|
32555
|
+
...options?.timeoutMs === void 0 ? {} : { timeout: options.timeoutMs }
|
|
32556
|
+
});
|
|
32548
32557
|
return { status: result.status, stdout: result.stdout, stderr: result.stderr };
|
|
32549
32558
|
}
|
|
32550
32559
|
};
|
|
@@ -33350,6 +33359,23 @@ function identityIdResolver(identitiesDir, fs37) {
|
|
|
33350
33359
|
return identityIdIn(records, name);
|
|
33351
33360
|
};
|
|
33352
33361
|
}
|
|
33362
|
+
function identityReader(identitiesDir, fs37) {
|
|
33363
|
+
const read = /* @__PURE__ */ new Map();
|
|
33364
|
+
const readOnce = (file2) => {
|
|
33365
|
+
if (!read.has(file2)) {
|
|
33366
|
+
read.set(file2, fs37.readConfigFile(file2));
|
|
33367
|
+
}
|
|
33368
|
+
return read.get(file2);
|
|
33369
|
+
};
|
|
33370
|
+
const idOf = identityIdResolver(identitiesDir, { readdir: fs37.readdir, readConfigFile: readOnce });
|
|
33371
|
+
return {
|
|
33372
|
+
idOf,
|
|
33373
|
+
load: (name) => {
|
|
33374
|
+
const id2 = idOf(name);
|
|
33375
|
+
return id2 === void 0 ? void 0 : loadConfigFile(import_node_path15.default.join(identitiesDir, id2, IDENTITY_FILE), IdentitySchema, readOnce)?.config;
|
|
33376
|
+
}
|
|
33377
|
+
};
|
|
33378
|
+
}
|
|
33353
33379
|
function loadIdentity(identitiesDir, name, fs37) {
|
|
33354
33380
|
if (!isFileName(name)) {
|
|
33355
33381
|
throw new UnsafeNameError(name, "identity", FILE_NAME_RULE);
|
|
@@ -35040,9 +35066,224 @@ var init_identityToken = __esm({
|
|
|
35040
35066
|
}
|
|
35041
35067
|
});
|
|
35042
35068
|
|
|
35069
|
+
// src/headroom/headers.ts
|
|
35070
|
+
function mergeAnthropicCustomHeaders(existing, additions) {
|
|
35071
|
+
const merged = /* @__PURE__ */ new Map();
|
|
35072
|
+
for (const block2 of existing) {
|
|
35073
|
+
if (block2 === void 0) {
|
|
35074
|
+
continue;
|
|
35075
|
+
}
|
|
35076
|
+
for (const line of block2.split("\n")) {
|
|
35077
|
+
const entry = parseCustomHeaderLine(line);
|
|
35078
|
+
if (entry === void 0) {
|
|
35079
|
+
continue;
|
|
35080
|
+
}
|
|
35081
|
+
merged.set(entry.name, entry.value);
|
|
35082
|
+
}
|
|
35083
|
+
}
|
|
35084
|
+
for (const entry of additions) {
|
|
35085
|
+
merged.set(entry.name, entry.value);
|
|
35086
|
+
}
|
|
35087
|
+
return [...merged].map(([name, value3]) => `${name}: ${value3}`).join("\n");
|
|
35088
|
+
}
|
|
35089
|
+
function parseAnthropicCustomHeaders(block2) {
|
|
35090
|
+
return block2.split("\n").flatMap((line) => {
|
|
35091
|
+
const entry = parseCustomHeaderLine(line);
|
|
35092
|
+
return entry === void 0 ? [] : [entry];
|
|
35093
|
+
});
|
|
35094
|
+
}
|
|
35095
|
+
function withoutAnthropicCustomHeaders(block2, remove) {
|
|
35096
|
+
const lines = block2.split("\n");
|
|
35097
|
+
const kept = lines.filter((line) => {
|
|
35098
|
+
const entry = parseCustomHeaderLine(line);
|
|
35099
|
+
return entry === void 0 || !remove(entry);
|
|
35100
|
+
});
|
|
35101
|
+
return kept.length === lines.length ? block2 : kept.join("\n");
|
|
35102
|
+
}
|
|
35103
|
+
function parseCustomHeaderLine(line) {
|
|
35104
|
+
const trimmed = line.trim();
|
|
35105
|
+
if (trimmed === "") {
|
|
35106
|
+
return void 0;
|
|
35107
|
+
}
|
|
35108
|
+
const colon = trimmed.indexOf(":");
|
|
35109
|
+
if (colon <= 0) {
|
|
35110
|
+
return void 0;
|
|
35111
|
+
}
|
|
35112
|
+
return { name: trimmed.slice(0, colon).trim(), value: trimmed.slice(colon + 1).trim() };
|
|
35113
|
+
}
|
|
35114
|
+
var init_headers = __esm({
|
|
35115
|
+
"src/headroom/headers.ts"() {
|
|
35116
|
+
"use strict";
|
|
35117
|
+
}
|
|
35118
|
+
});
|
|
35119
|
+
|
|
35120
|
+
// src/launcher/injected.ts
|
|
35121
|
+
function listKey(list2) {
|
|
35122
|
+
return `${list2},appended`;
|
|
35123
|
+
}
|
|
35124
|
+
function digest(value3) {
|
|
35125
|
+
return (0, import_node_crypto5.createHash)("sha256").update(value3).digest("hex");
|
|
35126
|
+
}
|
|
35127
|
+
function recordedDigests(env) {
|
|
35128
|
+
const raw = env[INJECTED_ENV];
|
|
35129
|
+
if (raw === void 0 || raw === "") {
|
|
35130
|
+
return {};
|
|
35131
|
+
}
|
|
35132
|
+
let parsed;
|
|
35133
|
+
try {
|
|
35134
|
+
parsed = JSON.parse(raw);
|
|
35135
|
+
} catch {
|
|
35136
|
+
return {};
|
|
35137
|
+
}
|
|
35138
|
+
const result = InjectedSchema.safeParse(parsed);
|
|
35139
|
+
return result.success ? result.data : {};
|
|
35140
|
+
}
|
|
35141
|
+
function recordInjections(base) {
|
|
35142
|
+
const env = { ...base };
|
|
35143
|
+
const digests = new Map(Object.entries(recordedDigests(env)));
|
|
35144
|
+
return {
|
|
35145
|
+
env,
|
|
35146
|
+
set: (name, value3) => {
|
|
35147
|
+
env[name] = value3;
|
|
35148
|
+
digests.set(name, digest(value3));
|
|
35149
|
+
},
|
|
35150
|
+
unset: (name) => {
|
|
35151
|
+
env[name] = void 0;
|
|
35152
|
+
digests.delete(name);
|
|
35153
|
+
},
|
|
35154
|
+
recordHeaders: (names) => {
|
|
35155
|
+
const block2 = env[CUSTOM_HEADERS_ENV];
|
|
35156
|
+
for (const entry of block2 === void 0 ? [] : parseAnthropicCustomHeaders(block2)) {
|
|
35157
|
+
if (names.includes(entry.name)) {
|
|
35158
|
+
digests.set(`${HEADER_KEY_PREFIX}${entry.name.toLowerCase()}`, digest(entry.value));
|
|
35159
|
+
}
|
|
35160
|
+
}
|
|
35161
|
+
},
|
|
35162
|
+
recordBypassHosts: (list2, hosts) => {
|
|
35163
|
+
const recordedHosts = [.../* @__PURE__ */ new Set([...digests.get(listKey(list2))?.split(",") ?? [], ...hosts.map((host) => host.trim().toLowerCase()).filter((host) => host !== "")])];
|
|
35164
|
+
if (recordedHosts.length > 0) {
|
|
35165
|
+
digests.set(listKey(list2), recordedHosts.join(","));
|
|
35166
|
+
}
|
|
35167
|
+
},
|
|
35168
|
+
finish: () => {
|
|
35169
|
+
if (digests.size > 0) {
|
|
35170
|
+
env[INJECTED_ENV] = JSON.stringify(Object.fromEntries(digests));
|
|
35171
|
+
}
|
|
35172
|
+
}
|
|
35173
|
+
};
|
|
35174
|
+
}
|
|
35175
|
+
function withoutRecordedHosts(list2, value3, digests) {
|
|
35176
|
+
const recordedHosts = new Set(digests[listKey(list2)]?.split(","));
|
|
35177
|
+
const entries = value3.split(",");
|
|
35178
|
+
const kept = entries.filter((entry) => !recordedHosts.has(entry.trim().toLowerCase()));
|
|
35179
|
+
return kept.length === entries.length ? value3 : kept.join(",");
|
|
35180
|
+
}
|
|
35181
|
+
function launchEnvironment(env, configDirEscapeHatch) {
|
|
35182
|
+
return configDirEscapeHatch ? env : withoutInjected(env);
|
|
35183
|
+
}
|
|
35184
|
+
function withoutInjected(env) {
|
|
35185
|
+
const digests = recordedDigests(env);
|
|
35186
|
+
const entries = Object.entries(env).flatMap(([name, value3]) => {
|
|
35187
|
+
if (name === INJECTED_ENV) {
|
|
35188
|
+
return [];
|
|
35189
|
+
}
|
|
35190
|
+
if (value3 === void 0) {
|
|
35191
|
+
return [[name, value3]];
|
|
35192
|
+
}
|
|
35193
|
+
if (name === CUSTOM_HEADERS_ENV) {
|
|
35194
|
+
const remaining = withoutAnthropicCustomHeaders(value3, (entry) => digests[`${HEADER_KEY_PREFIX}${entry.name.toLowerCase()}`] === digest(entry.value));
|
|
35195
|
+
return remaining !== value3 && remaining.trim() === "" ? [] : [[name, remaining]];
|
|
35196
|
+
}
|
|
35197
|
+
if (name === "NO_PROXY" || name === "no_proxy") {
|
|
35198
|
+
const remaining = withoutRecordedHosts(name, value3, digests);
|
|
35199
|
+
return remaining !== value3 && remaining.split(",").every((entry) => entry.trim() === "") ? [] : [[name, remaining]];
|
|
35200
|
+
}
|
|
35201
|
+
return digests[name] === digest(value3) ? [] : [[name, value3]];
|
|
35202
|
+
});
|
|
35203
|
+
return Object.fromEntries(entries);
|
|
35204
|
+
}
|
|
35205
|
+
var import_node_crypto5, INJECTED_ENV, CUSTOM_HEADERS_ENV, HEADER_KEY_PREFIX, InjectedSchema;
|
|
35206
|
+
var init_injected = __esm({
|
|
35207
|
+
"src/launcher/injected.ts"() {
|
|
35208
|
+
"use strict";
|
|
35209
|
+
import_node_crypto5 = require("node:crypto");
|
|
35210
|
+
init_zod();
|
|
35211
|
+
init_headers();
|
|
35212
|
+
INJECTED_ENV = "AGENT_SHIM_INJECTED";
|
|
35213
|
+
CUSTOM_HEADERS_ENV = "ANTHROPIC_CUSTOM_HEADERS";
|
|
35214
|
+
HEADER_KEY_PREFIX = `${CUSTOM_HEADERS_ENV}:`;
|
|
35215
|
+
InjectedSchema = external_exports.record(external_exports.string(), external_exports.string());
|
|
35216
|
+
}
|
|
35217
|
+
});
|
|
35218
|
+
|
|
35219
|
+
// src/launcher/guard.ts
|
|
35220
|
+
function detectAmbientCredential(env, injected) {
|
|
35221
|
+
for (const variable of AMBIENT_CREDENTIAL_VARS) {
|
|
35222
|
+
const value3 = env[variable];
|
|
35223
|
+
if (value3 === void 0 || value3 === "") {
|
|
35224
|
+
continue;
|
|
35225
|
+
}
|
|
35226
|
+
if (injected?.variable === variable && value3 === injected.token) {
|
|
35227
|
+
continue;
|
|
35228
|
+
}
|
|
35229
|
+
return { variable };
|
|
35230
|
+
}
|
|
35231
|
+
return void 0;
|
|
35232
|
+
}
|
|
35233
|
+
function formatAmbientCredentialGuardMessage(variable, identityName) {
|
|
35234
|
+
const identitySetCommand = identityName === void 0 ? "agent-shim identity set <name> --allow-ambient-credential" : `agent-shim identity set ${identityName} --allow-ambient-credential`;
|
|
35235
|
+
return [
|
|
35236
|
+
`error: ${variable} is set in the environment. This identity's isolated`,
|
|
35237
|
+
"credential would be bypassed \u2014 every identity authenticates as this same key",
|
|
35238
|
+
"while it's set. Unset it, or if this is deliberate, opt in per-launch with",
|
|
35239
|
+
"AGENT_SHIM_ALLOW_AMBIENT_CREDENTIAL=1, or persistently for this identity with",
|
|
35240
|
+
`\`${identitySetCommand}\`.`
|
|
35241
|
+
].join("\n");
|
|
35242
|
+
}
|
|
35243
|
+
function evaluateAmbientCredentialGuard(params) {
|
|
35244
|
+
const detected = detectAmbientCredential(params.env, params.injectedCredential);
|
|
35245
|
+
if (detected === void 0) {
|
|
35246
|
+
return { ok: true };
|
|
35247
|
+
}
|
|
35248
|
+
if (params.allowAmbientCredentialOverride || params.allowAmbientCredential || params.providerSelected === true) {
|
|
35249
|
+
return { ok: true };
|
|
35250
|
+
}
|
|
35251
|
+
return {
|
|
35252
|
+
ok: false,
|
|
35253
|
+
variable: detected.variable,
|
|
35254
|
+
message: formatAmbientCredentialGuardMessage(detected.variable, params.identityName)
|
|
35255
|
+
};
|
|
35256
|
+
}
|
|
35257
|
+
function ambientCredentialFinding(env) {
|
|
35258
|
+
const named = detectAmbientCredential(launchEnvironment(env, false));
|
|
35259
|
+
if (named !== void 0) {
|
|
35260
|
+
return { severity: "warn", message: formatAmbientCredentialGuardMessage(named.variable) };
|
|
35261
|
+
}
|
|
35262
|
+
const bare = env.CLAUDE_CONFIG_DIR === void 0 || env.CLAUDE_CONFIG_DIR === "" ? void 0 : detectAmbientCredential(env);
|
|
35263
|
+
if (bare !== void 0) {
|
|
35264
|
+
return { severity: "warn", message: `${bare.variable} was set in this session by the launcher that started it. A launch that names an identity drops it, but a launch naming none keeps the session's CLAUDE_CONFIG_DIR and environment and is refused. Name an identity, as in \`claude @<name>\`.` };
|
|
35265
|
+
}
|
|
35266
|
+
return { severity: "pass", message: "No ambient-credential environment variable is set." };
|
|
35267
|
+
}
|
|
35268
|
+
var AMBIENT_CREDENTIAL_VARS;
|
|
35269
|
+
var init_guard = __esm({
|
|
35270
|
+
"src/launcher/guard.ts"() {
|
|
35271
|
+
"use strict";
|
|
35272
|
+
init_injected();
|
|
35273
|
+
AMBIENT_CREDENTIAL_VARS = [
|
|
35274
|
+
"ANTHROPIC_API_KEY",
|
|
35275
|
+
"ANTHROPIC_AUTH_TOKEN",
|
|
35276
|
+
"CLAUDE_CODE_OAUTH_TOKEN",
|
|
35277
|
+
"CLAUDE_CODE_USE_BEDROCK",
|
|
35278
|
+
"CLAUDE_CODE_USE_VERTEX",
|
|
35279
|
+
"CLAUDE_CODE_USE_FOUNDRY"
|
|
35280
|
+
];
|
|
35281
|
+
}
|
|
35282
|
+
});
|
|
35283
|
+
|
|
35043
35284
|
// src/usage/signIn.ts
|
|
35044
35285
|
function claudeCodeKeychainService(configDir) {
|
|
35045
|
-
return `${KEYCHAIN_SERVICE_PREFIX}-${(0,
|
|
35286
|
+
return `${KEYCHAIN_SERVICE_PREFIX}-${(0, import_node_crypto6.createHash)("sha256").update(configDir).digest("hex").slice(0, KEYCHAIN_SERVICE_HASH_DIGITS)}`;
|
|
35046
35287
|
}
|
|
35047
35288
|
function keychainHasItem(run, configDir) {
|
|
35048
35289
|
return run.run("security", ["find-generic-password", "-s", claudeCodeKeychainService(configDir)]).status === 0;
|
|
@@ -35075,15 +35316,35 @@ function identitySignIn(fs37, probe, identity) {
|
|
|
35075
35316
|
platform: probe.platform
|
|
35076
35317
|
});
|
|
35077
35318
|
}
|
|
35078
|
-
|
|
35319
|
+
function storedLoginUsable(run, claudeBin, configDir, env) {
|
|
35320
|
+
const childEnv = { ...env, CLAUDE_CONFIG_DIR: configDir };
|
|
35321
|
+
for (const variable of AMBIENT_CREDENTIAL_VARS) {
|
|
35322
|
+
childEnv[variable] = void 0;
|
|
35323
|
+
}
|
|
35324
|
+
const result = run.run(claudeBin, ["auth", "status"], void 0, { env: childEnv, timeoutMs: AUTH_STATUS_TIMEOUT_MS });
|
|
35325
|
+
if (result.status === null) {
|
|
35326
|
+
return void 0;
|
|
35327
|
+
}
|
|
35328
|
+
try {
|
|
35329
|
+
const status = JSON.parse(result.stdout);
|
|
35330
|
+
if (typeof status === "object" && status !== null && "loggedIn" in status && typeof status.loggedIn === "boolean") {
|
|
35331
|
+
return status.loggedIn;
|
|
35332
|
+
}
|
|
35333
|
+
} catch {
|
|
35334
|
+
}
|
|
35335
|
+
return void 0;
|
|
35336
|
+
}
|
|
35337
|
+
var import_node_crypto6, import_node_path19, CREDENTIALS_FILE, KEYCHAIN_SERVICE_PREFIX, KEYCHAIN_SERVICE_HASH_DIGITS, AUTH_STATUS_TIMEOUT_MS;
|
|
35079
35338
|
var init_signIn = __esm({
|
|
35080
35339
|
"src/usage/signIn.ts"() {
|
|
35081
35340
|
"use strict";
|
|
35082
|
-
|
|
35341
|
+
import_node_crypto6 = require("node:crypto");
|
|
35083
35342
|
import_node_path19 = __toESM(require("node:path"), 1);
|
|
35343
|
+
init_guard();
|
|
35084
35344
|
CREDENTIALS_FILE = ".credentials.json";
|
|
35085
35345
|
KEYCHAIN_SERVICE_PREFIX = "Claude Code-credentials";
|
|
35086
35346
|
KEYCHAIN_SERVICE_HASH_DIGITS = 8;
|
|
35347
|
+
AUTH_STATUS_TIMEOUT_MS = 1e4;
|
|
35087
35348
|
}
|
|
35088
35349
|
});
|
|
35089
35350
|
|
|
@@ -35302,7 +35563,7 @@ function serialisedFor(entry, owner) {
|
|
|
35302
35563
|
return JSON.stringify({ owner, ...withoutOwner(entry) });
|
|
35303
35564
|
}
|
|
35304
35565
|
function tempPathFor(target) {
|
|
35305
|
-
return import_node_path20.default.join(import_node_path20.default.dirname(target), `${TEMP_PREFIX}${String(process.pid)}-${(0,
|
|
35566
|
+
return import_node_path20.default.join(import_node_path20.default.dirname(target), `${TEMP_PREFIX}${String(process.pid)}-${(0, import_node_crypto7.randomUUID)()}`);
|
|
35306
35567
|
}
|
|
35307
35568
|
function processRuns(pid) {
|
|
35308
35569
|
try {
|
|
@@ -35505,12 +35766,12 @@ function createAsyncRealCredentialCache(root) {
|
|
|
35505
35766
|
function realAsyncCredentialCacheEnv(paths) {
|
|
35506
35767
|
return { port: createAsyncRealCredentialCache(paths.root), platform: process.platform, now: () => Date.now() };
|
|
35507
35768
|
}
|
|
35508
|
-
var import_node_child_process4,
|
|
35769
|
+
var import_node_child_process4, import_node_crypto7, import_node_fs9, import_node_path20, CACHE_DIR_MODE, CACHE_FILE_MODE, TEMP_PREFIX, TEMP_NAME, RELEASED_TEMP_NAME;
|
|
35509
35770
|
var init_realCredentialCache = __esm({
|
|
35510
35771
|
"src/realCredentialCache.ts"() {
|
|
35511
35772
|
"use strict";
|
|
35512
35773
|
import_node_child_process4 = require("node:child_process");
|
|
35513
|
-
|
|
35774
|
+
import_node_crypto7 = require("node:crypto");
|
|
35514
35775
|
import_node_fs9 = __toESM(require("node:fs"), 1);
|
|
35515
35776
|
import_node_path20 = __toESM(require("node:path"), 1);
|
|
35516
35777
|
init_blockingSpawn();
|
|
@@ -35557,7 +35818,7 @@ function acquireIdentityLock(params) {
|
|
|
35557
35818
|
const staleAfterMs = params.staleAfterMs ?? DEFAULT_STALE_AFTER_MS;
|
|
35558
35819
|
const retryDelayMs = params.retryDelayMs ?? DEFAULT_RETRY_DELAY_MS;
|
|
35559
35820
|
const maxAttempts = params.maxAttempts ?? DEFAULT_MAX_ATTEMPTS;
|
|
35560
|
-
const token = (0,
|
|
35821
|
+
const token = (0, import_node_crypto8.randomUUID)();
|
|
35561
35822
|
if (params.fs.lstat(params.dir) === void 0) {
|
|
35562
35823
|
params.fs.mkdirp(params.dir);
|
|
35563
35824
|
}
|
|
@@ -35613,11 +35874,11 @@ function acquireIdentityLock(params) {
|
|
|
35613
35874
|
}
|
|
35614
35875
|
throw new IdentityLockBusyError(params.identity, lockPath, lastHolderPid);
|
|
35615
35876
|
}
|
|
35616
|
-
var
|
|
35877
|
+
var import_node_crypto8, import_node_path21, DEFAULT_STALE_AFTER_MS, DEFAULT_RETRY_DELAY_MS, DEFAULT_MAX_ATTEMPTS, IdentityLockLostError, IdentityLockBusyError;
|
|
35617
35878
|
var init_lock = __esm({
|
|
35618
35879
|
"src/launcher/lock.ts"() {
|
|
35619
35880
|
"use strict";
|
|
35620
|
-
|
|
35881
|
+
import_node_crypto8 = require("node:crypto");
|
|
35621
35882
|
import_node_path21 = __toESM(require("node:path"), 1);
|
|
35622
35883
|
init_cliError();
|
|
35623
35884
|
DEFAULT_STALE_AFTER_MS = 12e4;
|
|
@@ -36113,7 +36374,8 @@ var init_conditions = __esm({
|
|
|
36113
36374
|
function candidateHeading(candidate) {
|
|
36114
36375
|
const score = candidate.score === void 0 ? "" : ` score ${candidate.score.toFixed(2)}${candidate.scoreWindow === "fiveHour" ? " by 5h reset" : " by 7d reset"}`;
|
|
36115
36376
|
const dry = candidate.feasible ? "" : " (5h would run dry)";
|
|
36116
|
-
|
|
36377
|
+
const onProvider = candidate.provider === void 0 ? "" : ` on provider ${candidate.provider}`;
|
|
36378
|
+
return `[${candidate.class}${score}]${dry}${onProvider}`;
|
|
36117
36379
|
}
|
|
36118
36380
|
function percent(fraction) {
|
|
36119
36381
|
return `${String(Math.round(fraction * PERCENT))}%`;
|
|
@@ -36155,6 +36417,9 @@ function planOf(account) {
|
|
|
36155
36417
|
}
|
|
36156
36418
|
return { kind: "subscription", capacity: 1, recognised: BASE_TIER.test(tier), ...tierField };
|
|
36157
36419
|
}
|
|
36420
|
+
function planOfProviderQuota(quota) {
|
|
36421
|
+
return planOf(quota?.level === void 0 ? void 0 : { organizationRateLimitTier: quota.level });
|
|
36422
|
+
}
|
|
36158
36423
|
var PlanClassSchema, TIER_MULTIPLIER, ZERO_TIER, BASE_TIER;
|
|
36159
36424
|
var init_plan = __esm({
|
|
36160
36425
|
"src/usage/plan.ts"() {
|
|
@@ -36700,12 +36965,58 @@ var init_middleware = __esm({
|
|
|
36700
36965
|
}
|
|
36701
36966
|
});
|
|
36702
36967
|
|
|
36968
|
+
// src/usage/windowLengths.ts
|
|
36969
|
+
var MS_PER_HOUR2, HOURS_PER_DAY3, FIVE_HOURS, SEVEN_DAYS, FIVE_HOUR_WINDOW_MS, SEVEN_DAY_WINDOW_MS;
|
|
36970
|
+
var init_windowLengths = __esm({
|
|
36971
|
+
"src/usage/windowLengths.ts"() {
|
|
36972
|
+
"use strict";
|
|
36973
|
+
MS_PER_HOUR2 = 36e5;
|
|
36974
|
+
HOURS_PER_DAY3 = 24;
|
|
36975
|
+
FIVE_HOURS = 5;
|
|
36976
|
+
SEVEN_DAYS = 7;
|
|
36977
|
+
FIVE_HOUR_WINDOW_MS = FIVE_HOURS * MS_PER_HOUR2;
|
|
36978
|
+
SEVEN_DAY_WINDOW_MS = SEVEN_DAYS * HOURS_PER_DAY3 * MS_PER_HOUR2;
|
|
36979
|
+
}
|
|
36980
|
+
});
|
|
36981
|
+
|
|
36982
|
+
// src/usage/providerWindows.ts
|
|
36983
|
+
function bindingWindow(quota, periodMs) {
|
|
36984
|
+
const same2 = quota.windows.filter((window) => window.periodMs === periodMs);
|
|
36985
|
+
const tightest = same2.reduce((binding, window) => binding === void 0 || window.utilization > binding.utilization ? window : binding, void 0);
|
|
36986
|
+
if (tightest === void 0) {
|
|
36987
|
+
return void 0;
|
|
36988
|
+
}
|
|
36989
|
+
return { utilization: tightest.utilization, ...tightest.resetsAt === void 0 ? {} : { resetsAt: tightest.resetsAt }, status: tightest.utilization >= 1 ? "rejected" : "allowed" };
|
|
36990
|
+
}
|
|
36991
|
+
function unifiedFromQuota(quota) {
|
|
36992
|
+
const fiveHour = bindingWindow(quota, FIVE_HOUR_WINDOW_MS);
|
|
36993
|
+
const sevenDay = bindingWindow(quota, SEVEN_DAY_WINDOW_MS);
|
|
36994
|
+
return fiveHour === void 0 && sevenDay === void 0 ? void 0 : { ...fiveHour === void 0 ? {} : { fiveHour }, ...sevenDay === void 0 ? {} : { sevenDay } };
|
|
36995
|
+
}
|
|
36996
|
+
function rankingWindowsOf(provider, state) {
|
|
36997
|
+
const recorded = state?.rateLimit;
|
|
36998
|
+
if (provider === void 0) {
|
|
36999
|
+
return recorded?.unified === void 0 ? void 0 : { unified: recorded.unified, observedAt: recorded.observedAt };
|
|
37000
|
+
}
|
|
37001
|
+
if (recorded?.unified !== void 0 && (recorded.unified.fiveHour !== void 0 || recorded.unified.sevenDay !== void 0)) {
|
|
37002
|
+
return { unified: recorded.unified, observedAt: recorded.observedAt };
|
|
37003
|
+
}
|
|
37004
|
+
const pulled = state?.quota === void 0 ? void 0 : unifiedFromQuota(state.quota);
|
|
37005
|
+
return state?.quota === void 0 || pulled === void 0 ? void 0 : { unified: pulled, observedAt: state.quota.observedAt };
|
|
37006
|
+
}
|
|
37007
|
+
var init_providerWindows = __esm({
|
|
37008
|
+
"src/usage/providerWindows.ts"() {
|
|
37009
|
+
"use strict";
|
|
37010
|
+
init_windowLengths();
|
|
37011
|
+
}
|
|
37012
|
+
});
|
|
37013
|
+
|
|
36703
37014
|
// src/usage/quotaFacts.ts
|
|
36704
37015
|
function windowFacts(window, nowMs) {
|
|
36705
37016
|
if (window?.utilization === void 0 || window.resetsAt === void 0) {
|
|
36706
37017
|
return void 0;
|
|
36707
37018
|
}
|
|
36708
|
-
return { remaining: Math.max(0, 1 - window.utilization), utilization: window.utilization, hoursUntilReset: Math.max(0, (Date.parse(window.resetsAt) - nowMs) /
|
|
37019
|
+
return { remaining: Math.max(0, 1 - window.utilization), utilization: window.utilization, hoursUntilReset: Math.max(0, (Date.parse(window.resetsAt) - nowMs) / MS_PER_HOUR3) };
|
|
36709
37020
|
}
|
|
36710
37021
|
function quotaFactsOf(unified, nowMs) {
|
|
36711
37022
|
const fiveHour = windowFacts(unified?.fiveHour, nowMs);
|
|
@@ -36713,19 +37024,16 @@ function quotaFactsOf(unified, nowMs) {
|
|
|
36713
37024
|
const extraUsage = windowFacts(unified === void 0 ? void 0 : soleOverageWindow(unified), nowMs);
|
|
36714
37025
|
return { ...fiveHour === void 0 ? {} : { fiveHour }, ...sevenDay === void 0 ? {} : { sevenDay }, ...extraUsage === void 0 ? {} : { extraUsage } };
|
|
36715
37026
|
}
|
|
36716
|
-
var
|
|
37027
|
+
var MS_PER_HOUR3;
|
|
36717
37028
|
var init_quotaFacts = __esm({
|
|
36718
37029
|
"src/usage/quotaFacts.ts"() {
|
|
36719
37030
|
"use strict";
|
|
36720
37031
|
init_rateLimit();
|
|
36721
|
-
|
|
37032
|
+
MS_PER_HOUR3 = 36e5;
|
|
36722
37033
|
}
|
|
36723
37034
|
});
|
|
36724
37035
|
|
|
36725
37036
|
// src/usage/pick.ts
|
|
36726
|
-
function unifiedOf(state) {
|
|
36727
|
-
return state?.rateLimit?.unified;
|
|
36728
|
-
}
|
|
36729
37037
|
function limitBlockedUntil(state, nowMs) {
|
|
36730
37038
|
const limit = state?.lastLimit;
|
|
36731
37039
|
if (state === void 0 || limit === void 0) {
|
|
@@ -36815,6 +37123,10 @@ function assessRefusedNested(member, nested, nowMs) {
|
|
|
36815
37123
|
};
|
|
36816
37124
|
}
|
|
36817
37125
|
function assess(member, nowMs) {
|
|
37126
|
+
const assessment = assessMember(member, nowMs);
|
|
37127
|
+
return member.provider === void 0 ? assessment : { ...assessment, candidate: { ...assessment.candidate, provider: member.provider } };
|
|
37128
|
+
}
|
|
37129
|
+
function assessMember(member, nowMs) {
|
|
36818
37130
|
if (member.sameLoginAs !== void 0) {
|
|
36819
37131
|
return { candidate: { identity: member.identity, class: "ineligible", plan: planOf(member.account), reasons: [`same login as ${member.sameLoginAs}`] } };
|
|
36820
37132
|
}
|
|
@@ -36828,22 +37140,43 @@ function assess(member, nowMs) {
|
|
|
36828
37140
|
const assessment = assessIdentity(member, nowMs);
|
|
36829
37141
|
return { ...assessment, candidate: { ...assessment.candidate, reasons: [`picked by pool "${nested.pool}"`, ...nested.reasons] } };
|
|
36830
37142
|
}
|
|
37143
|
+
function sliceOf(member) {
|
|
37144
|
+
return member.snapshot?.providers[member.provider ?? ANTHROPIC_PROVIDER];
|
|
37145
|
+
}
|
|
37146
|
+
function assessProviderWithoutWindows(member, provider, state, base, planReasons, nowMs) {
|
|
37147
|
+
const blockedUntil = limitBlockedUntil(state, nowMs);
|
|
37148
|
+
if (blockedUntil !== void 0) {
|
|
37149
|
+
return { candidate: { ...base, class: "ineligible", blockedUntilMs: blockedUntil, reasons: [`refused until ${new Date(blockedUntil).toISOString()} (in ${formatAge(blockedUntil - nowMs)})`, ...planReasons] } };
|
|
37150
|
+
}
|
|
37151
|
+
if (base.plan.kind === "pay-per-use") {
|
|
37152
|
+
return { candidate: { ...base, class: "pay-per-use", usageUnrecorded: true, reasons: [...planReasons, `provider ${provider} reports no plan windows, so its spend is not tracked`] } };
|
|
37153
|
+
}
|
|
37154
|
+
const why = state === void 0 ? `no usage recorded for provider ${provider} yet, so its quota is unknown` : `provider ${provider} reports no plan windows, so its quota is unknown`;
|
|
37155
|
+
return { candidate: { ...base, class: "unknown", reasons: [why, ...planReasons] } };
|
|
37156
|
+
}
|
|
36831
37157
|
function assessIdentity(member, nowMs) {
|
|
36832
|
-
const
|
|
37158
|
+
const state = sliceOf(member);
|
|
37159
|
+
const plan = member.provider === void 0 ? planOf(member.account) : planOfProviderQuota(state?.quota);
|
|
36833
37160
|
const planReasons = plan.kind === "pay-per-use" ? ["billed by use (no plan allowance)"] : plan.recognised ? [`${String(plan.capacity)}x plan`] : [`plan tier ${plan.tier === void 0 ? "not known" : `"${plan.tier}" not recognised`}, counted as 1x`];
|
|
36834
37161
|
const base = { identity: member.identity, plan };
|
|
36835
37162
|
if (member.readError !== void 0) {
|
|
36836
37163
|
return { candidate: { ...base, class: "unknown", reasons: [`usage state unreadable: ${member.readError}`, ...planReasons] } };
|
|
36837
37164
|
}
|
|
36838
|
-
|
|
36839
|
-
|
|
36840
|
-
|
|
37165
|
+
if (member.providerError !== void 0) {
|
|
37166
|
+
return { candidate: { ...base, class: "unknown", reasons: [`provider configuration unreadable: ${member.providerError}`, ...planReasons] } };
|
|
37167
|
+
}
|
|
37168
|
+
const windows = rankingWindowsOf(member.provider, state);
|
|
37169
|
+
if (member.snapshot === void 0 || state === void 0 || windows === void 0) {
|
|
37170
|
+
if (member.provider !== void 0) {
|
|
37171
|
+
return assessProviderWithoutWindows(member, member.provider, state, base, planReasons, nowMs);
|
|
37172
|
+
}
|
|
36841
37173
|
if (plan.kind === "pay-per-use") {
|
|
36842
37174
|
return { candidate: { ...base, class: "pay-per-use", usageUnrecorded: true, reasons: [...planReasons, "no usage recorded yet, so its spend is not tracked (turn on trackUsage for it)"] } };
|
|
36843
37175
|
}
|
|
36844
37176
|
return { candidate: { ...base, class: "unknown", reasons: ["no usage recorded yet, so its quota is unknown (turn on trackUsage for it)", ...planReasons] } };
|
|
36845
37177
|
}
|
|
36846
|
-
const
|
|
37178
|
+
const { unified } = windows;
|
|
37179
|
+
const observedAgo = ` (last seen ${formatAge(nowMs - Date.parse(windows.observedAt))} ago)`;
|
|
36847
37180
|
const fiveHourWindow = unified.fiveHour;
|
|
36848
37181
|
const sevenDayWindow = unified.sevenDay;
|
|
36849
37182
|
const five = fiveHourWindow === void 0 ? void 0 : effectiveWindow(fiveHourWindow, nowMs);
|
|
@@ -36855,6 +37188,15 @@ function assessIdentity(member, nowMs) {
|
|
|
36855
37188
|
const overageWindow = soleOverageWindow(unified);
|
|
36856
37189
|
const overage = overageWindow === void 0 ? void 0 : effectiveWindow(overageWindow, nowMs);
|
|
36857
37190
|
const overageReasons = overageWindow === void 0 || overage === void 0 ? [] : [describeWindow("extra usage", overageWindow, overage, nowMs)];
|
|
37191
|
+
if (member.provider !== void 0) {
|
|
37192
|
+
const spent = [
|
|
37193
|
+
{ name: "5h", window: five },
|
|
37194
|
+
{ name: "7d", window: seven }
|
|
37195
|
+
].filter(({ window }) => window?.status === "rejected" && window.resetsAtMs === void 0).map(({ name }) => name);
|
|
37196
|
+
if (spent.length > 0) {
|
|
37197
|
+
return { candidate: { ...base, class: "ineligible", reasons: [`provider ${member.provider} ${spent.join(" and ")} window used in full with no reset time reported, so it is refused until it reports one`, ...windowReasons, ...planReasons] } };
|
|
37198
|
+
}
|
|
37199
|
+
}
|
|
36858
37200
|
const blockedUntil = Math.max(
|
|
36859
37201
|
windowBlockedUntil([five, seven, overage].flatMap((window) => window === void 0 ? [] : [window])) ?? 0,
|
|
36860
37202
|
limitBlockedUntil(state, nowMs) ?? 0
|
|
@@ -36875,11 +37217,11 @@ function assessIdentity(member, nowMs) {
|
|
|
36875
37217
|
}
|
|
36876
37218
|
const remaining = Math.max(0, 1 - basis.window.utilization);
|
|
36877
37219
|
const untilResetMs = basis.window.resetsAtMs === void 0 ? basis.windowMs : Math.max(basis.window.resetsAtMs - nowMs, MS_PER_SECOND4);
|
|
36878
|
-
const weeklyScore = remaining * plan.capacity / (untilResetMs /
|
|
37220
|
+
const weeklyScore = remaining * plan.capacity / (untilResetMs / MS_PER_HOUR4);
|
|
36879
37221
|
const fiveRemaining = five?.utilization === void 0 ? void 0 : Math.max(0, 1 - five.utilization);
|
|
36880
37222
|
const fiveUntil = five?.resetsAtMs === void 0 ? FIVE_HOUR_WINDOW_MS : Math.max(five.resetsAtMs - nowMs, MS_PER_SECOND4);
|
|
36881
37223
|
const ratio = windowRatio(member.records);
|
|
36882
|
-
const fiveHourScore = basis.name === "sevenDay" && fiveRemaining !== void 0 && ratio !== void 0 ? Math.min(fiveRemaining * ratio, remaining) * plan.capacity / (fiveUntil /
|
|
37224
|
+
const fiveHourScore = basis.name === "sevenDay" && fiveRemaining !== void 0 && ratio !== void 0 ? Math.min(fiveRemaining * ratio, remaining) * plan.capacity / (fiveUntil / MS_PER_HOUR4) : void 0;
|
|
36883
37225
|
const fiveHourLeads = fiveHourScore !== void 0 && fiveHourScore > weeklyScore;
|
|
36884
37226
|
const score = fiveHourLeads ? fiveHourScore : weeklyScore;
|
|
36885
37227
|
const scoreWindow = fiveHourLeads ? "fiveHour" : basis.name;
|
|
@@ -36897,15 +37239,15 @@ function assessIdentity(member, nowMs) {
|
|
|
36897
37239
|
};
|
|
36898
37240
|
}
|
|
36899
37241
|
function poolFactsOf(member, nowMs, resuming, sticky) {
|
|
36900
|
-
const { fiveHour, sevenDay, extraUsage } = quotaFactsOf(member.
|
|
37242
|
+
const { fiveHour, sevenDay, extraUsage } = quotaFactsOf(rankingWindowsOf(member.provider, sliceOf(member))?.unified, nowMs);
|
|
36901
37243
|
const burn = windowBurn(member.records, "fiveHour");
|
|
36902
37244
|
return {
|
|
36903
37245
|
...fiveHour === void 0 ? {} : { fiveHour },
|
|
36904
37246
|
...sevenDay === void 0 ? {} : { sevenDay },
|
|
36905
37247
|
...extraUsage === void 0 ? {} : { extraUsage },
|
|
36906
|
-
...burn === void 0 ? {} : { burnPerHour: burn *
|
|
37248
|
+
...burn === void 0 ? {} : { burnPerHour: burn * MS_PER_HOUR4 },
|
|
36907
37249
|
resuming,
|
|
36908
|
-
...sticky?.identity === member.identity ? { lastPickHoursAgo: Math.max(0, (nowMs - Date.parse(sticky.at)) /
|
|
37250
|
+
...sticky?.identity === member.identity ? { lastPickHoursAgo: Math.max(0, (nowMs - Date.parse(sticky.at)) / MS_PER_HOUR4) } : {}
|
|
36909
37251
|
};
|
|
36910
37252
|
}
|
|
36911
37253
|
function rankPool(input2) {
|
|
@@ -37000,7 +37342,7 @@ function rankPool(input2) {
|
|
|
37000
37342
|
...holdForReturn === void 0 ? {} : { holdForReturn }
|
|
37001
37343
|
};
|
|
37002
37344
|
}
|
|
37003
|
-
var MS_PER_SECOND4,
|
|
37345
|
+
var MS_PER_SECOND4, MS_PER_HOUR4, PROMPT_CACHE_TTL_HOURS, PROMPT_CACHE_TTL_MS, CLASS_ORDER;
|
|
37004
37346
|
var init_pick = __esm({
|
|
37005
37347
|
"src/usage/pick.ts"() {
|
|
37006
37348
|
"use strict";
|
|
@@ -37009,17 +37351,14 @@ var init_pick = __esm({
|
|
|
37009
37351
|
init_plan();
|
|
37010
37352
|
init_middleware();
|
|
37011
37353
|
init_preflight();
|
|
37354
|
+
init_providerWindows();
|
|
37012
37355
|
init_quotaFacts();
|
|
37356
|
+
init_windowLengths();
|
|
37013
37357
|
init_rateLimit();
|
|
37014
37358
|
MS_PER_SECOND4 = 1e3;
|
|
37015
|
-
|
|
37016
|
-
HOURS_PER_DAY3 = 24;
|
|
37017
|
-
FIVE_HOURS = 5;
|
|
37359
|
+
MS_PER_HOUR4 = 36e5;
|
|
37018
37360
|
PROMPT_CACHE_TTL_HOURS = 1;
|
|
37019
|
-
|
|
37020
|
-
FIVE_HOUR_WINDOW_MS = FIVE_HOURS * MS_PER_HOUR3;
|
|
37021
|
-
SEVEN_DAY_WINDOW_MS = SEVEN_DAYS * HOURS_PER_DAY3 * MS_PER_HOUR3;
|
|
37022
|
-
PROMPT_CACHE_TTL_MS = PROMPT_CACHE_TTL_HOURS * MS_PER_HOUR3;
|
|
37361
|
+
PROMPT_CACHE_TTL_MS = PROMPT_CACHE_TTL_HOURS * MS_PER_HOUR4;
|
|
37023
37362
|
CLASS_ORDER = { scored: 0, unknown: 1, "pay-per-use": 2, ineligible: 3 };
|
|
37024
37363
|
}
|
|
37025
37364
|
});
|
|
@@ -37154,7 +37493,7 @@ var init_store2 = __esm({
|
|
|
37154
37493
|
function errorMessage(error63) {
|
|
37155
37494
|
return error63 instanceof Error ? error63.message : String(error63);
|
|
37156
37495
|
}
|
|
37157
|
-
function loadPoolMembers(fs37, paths, identities, nowMs, idOf) {
|
|
37496
|
+
function loadPoolMembers(fs37, paths, identities, nowMs, idOf, providerOf) {
|
|
37158
37497
|
const windowStartMs = nowMs - FIVE_HOUR_WINDOW_MS;
|
|
37159
37498
|
const log = readUsageLog(fs37, paths.usageLogDir, { sinceMs: windowStartMs });
|
|
37160
37499
|
return identities.map((identity) => {
|
|
@@ -37162,14 +37501,20 @@ function loadPoolMembers(fs37, paths, identities, nowMs, idOf) {
|
|
|
37162
37501
|
if (id2 === void 0) {
|
|
37163
37502
|
return { identity, records: [] };
|
|
37164
37503
|
}
|
|
37165
|
-
const
|
|
37504
|
+
const resolved = providerOf?.(identity);
|
|
37505
|
+
const provider = typeof resolved === "object" ? resolved.named : resolved;
|
|
37506
|
+
const providerField = {
|
|
37507
|
+
...provider === void 0 ? {} : { provider },
|
|
37508
|
+
...typeof resolved === "object" ? { providerError: resolved.reason } : {}
|
|
37509
|
+
};
|
|
37510
|
+
const records = log.records.filter((record3) => record3.identity === id2 && record3.provider === (provider ?? ANTHROPIC_PROVIDER) && Date.parse(record3.at) >= windowStartMs);
|
|
37166
37511
|
try {
|
|
37167
37512
|
const snapshot = readUsageSnapshot(fs37, paths.usageSnapshotsDir, id2);
|
|
37168
37513
|
const account = readAccountMetadata(fs37, paths.identitiesDir, id2) ?? snapshot?.account;
|
|
37169
|
-
return { identity, records, ...snapshot === void 0 ? {} : { snapshot }, ...account === void 0 ? {} : { account } };
|
|
37514
|
+
return { identity, records, ...providerField, ...snapshot === void 0 ? {} : { snapshot }, ...account === void 0 ? {} : { account } };
|
|
37170
37515
|
} catch (error63) {
|
|
37171
37516
|
if (error63 instanceof UsageSnapshotError || error63 instanceof AccountMetadataError) {
|
|
37172
|
-
return { identity, records, readError: errorMessage(error63) };
|
|
37517
|
+
return { identity, records, ...providerField, readError: errorMessage(error63) };
|
|
37173
37518
|
}
|
|
37174
37519
|
throw error63;
|
|
37175
37520
|
}
|
|
@@ -37179,7 +37524,7 @@ function snapshotAgeKey(member) {
|
|
|
37179
37524
|
return member.snapshot === void 0 ? Number.NEGATIVE_INFINITY : Date.parse(member.snapshot.updatedAt);
|
|
37180
37525
|
}
|
|
37181
37526
|
function collapseSharedLogins(members2) {
|
|
37182
|
-
const groups = groupSharedLogins(members2, (member) => member.nested === void 0 && member.account !== void 0 ? loginKeyOf(member.account) : void 0);
|
|
37527
|
+
const groups = groupSharedLogins(members2, (member) => member.nested === void 0 && member.provider === void 0 && member.account !== void 0 ? loginKeyOf(member.account) : void 0);
|
|
37183
37528
|
const representativeOf = /* @__PURE__ */ new Map();
|
|
37184
37529
|
for (const group of groups) {
|
|
37185
37530
|
const representative = group.reduce((freshest, member) => snapshotAgeKey(member) > snapshotAgeKey(freshest) ? member : freshest);
|
|
@@ -37209,7 +37554,7 @@ function rankNamedPool(input2, poolName, stack, sticky) {
|
|
|
37209
37554
|
const childStack = [...stack, poolName];
|
|
37210
37555
|
const direct = pool.identities.filter((entry) => poolNameOf(poolMemberIdentity(entry)) === void 0);
|
|
37211
37556
|
const missing = direct.filter((entry) => input2.identityIdOf(poolMemberIdentity(entry)) === void 0).map((entry) => ({ pool: poolName, identity: poolMemberIdentity(entry) }));
|
|
37212
|
-
const loaded = new Map(loadPoolMembers(input2.fs, input2.paths, direct.filter((entry) => input2.identityIdOf(poolMemberIdentity(entry)) !== void 0).map(poolMemberIdentity), input2.nowMs, input2.identityIdOf).map((member) => [member.identity, member]));
|
|
37557
|
+
const loaded = new Map(loadPoolMembers(input2.fs, input2.paths, direct.filter((entry) => input2.identityIdOf(poolMemberIdentity(entry)) !== void 0).map(poolMemberIdentity), input2.nowMs, input2.identityIdOf, input2.providerOf).map((member) => [member.identity, member]));
|
|
37213
37558
|
const members2 = [];
|
|
37214
37559
|
for (const entry of pool.identities) {
|
|
37215
37560
|
const nestedName = poolNameOf(poolMemberIdentity(entry));
|
|
@@ -37250,7 +37595,7 @@ function nestedMember(input2, nestedName, childStack, sticky) {
|
|
|
37250
37595
|
const nested = rankNamedPool(input2, nestedName, childStack, sticky);
|
|
37251
37596
|
const pick2 = nested.ranking.pick;
|
|
37252
37597
|
if (pick2 !== void 0) {
|
|
37253
|
-
const [member] = loadPoolMembers(input2.fs, input2.paths, [pick2.identity], input2.nowMs, input2.identityIdOf);
|
|
37598
|
+
const [member] = loadPoolMembers(input2.fs, input2.paths, [pick2.identity], input2.nowMs, input2.identityIdOf, input2.providerOf);
|
|
37254
37599
|
return { member: { ...member ?? { identity: pick2.identity, records: [] }, nested: { kind: "pick", pool: nestedName, reasons: pick2.reasons } }, missing: nested.missing };
|
|
37255
37600
|
}
|
|
37256
37601
|
const earliestReturn = nested.ranking.earliestReturn;
|
|
@@ -37326,6 +37671,7 @@ var init_poolPick = __esm({
|
|
|
37326
37671
|
init_read();
|
|
37327
37672
|
init_middleware();
|
|
37328
37673
|
init_store2();
|
|
37674
|
+
init_windowLengths();
|
|
37329
37675
|
PoolGraphError = class extends CliError {
|
|
37330
37676
|
constructor(message) {
|
|
37331
37677
|
super(message);
|
|
@@ -37346,7 +37692,7 @@ function renameJournalFile(directory, from, to2) {
|
|
|
37346
37692
|
return import_node_path24.default.join(directory, renamePairFileName(from, to2, JOURNAL_SUFFIX));
|
|
37347
37693
|
}
|
|
37348
37694
|
function renamePairFileName(from, to2, suffix) {
|
|
37349
|
-
return `${(0,
|
|
37695
|
+
return `${(0, import_node_crypto9.createHash)("sha256").update(`${from}\0${to2}`).digest("hex").slice(0, FILE_NAME_HASH_DIGITS)}${suffix}`;
|
|
37350
37696
|
}
|
|
37351
37697
|
function readRenameJournal(fs37, file2) {
|
|
37352
37698
|
const raw = fs37.readFileUtf8(file2);
|
|
@@ -37442,11 +37788,11 @@ function requireNameFreeOfUnfinishedRename(fs37, directory, name, action, sameNa
|
|
|
37442
37788
|
throw new NameHeldByUnfinishedRenameError(action, name, held, finishabilityOf(held, exists));
|
|
37443
37789
|
}
|
|
37444
37790
|
}
|
|
37445
|
-
var
|
|
37791
|
+
var import_node_crypto9, import_node_path24, RenameJournalSchema, FILE_NAME_HASH_DIGITS, JOURNAL_SUFFIX, RenameJournalUnreadableError, NameHeldByUnfinishedRenameError;
|
|
37446
37792
|
var init_identityRenameJournal = __esm({
|
|
37447
37793
|
"src/identityRenameJournal.ts"() {
|
|
37448
37794
|
"use strict";
|
|
37449
|
-
|
|
37795
|
+
import_node_crypto9 = require("node:crypto");
|
|
37450
37796
|
import_node_path24 = __toESM(require("node:path"), 1);
|
|
37451
37797
|
init_zod();
|
|
37452
37798
|
init_cliError();
|
|
@@ -37614,7 +37960,7 @@ var init_identityNameRenameRecord = __esm({
|
|
|
37614
37960
|
|
|
37615
37961
|
// src/launcher/launchRecords.ts
|
|
37616
37962
|
function recordFile2(directory, pid) {
|
|
37617
|
-
return import_node_path26.default.join(directory, `${String(pid)}.${(0,
|
|
37963
|
+
return import_node_path26.default.join(directory, `${String(pid)}.${(0, import_node_crypto10.randomUUID)()}${RECORD_SUFFIX2}`);
|
|
37618
37964
|
}
|
|
37619
37965
|
function readRecord(fs37, directory, name) {
|
|
37620
37966
|
if (!name.endsWith(RECORD_SUFFIX2)) {
|
|
@@ -37655,12 +38001,12 @@ function liveLaunchesOn(fs37, directory, identity, isRunning) {
|
|
|
37655
38001
|
return record3?.identity === identity && isRunning(record3.pid) ? [record3.pid] : [];
|
|
37656
38002
|
}).sort((left, right) => left - right);
|
|
37657
38003
|
}
|
|
37658
|
-
var import_node_path26,
|
|
38004
|
+
var import_node_path26, import_node_crypto10, LaunchRecordSchema, RECORD_SUFFIX2;
|
|
37659
38005
|
var init_launchRecords = __esm({
|
|
37660
38006
|
"src/launcher/launchRecords.ts"() {
|
|
37661
38007
|
"use strict";
|
|
37662
38008
|
import_node_path26 = __toESM(require("node:path"), 1);
|
|
37663
|
-
|
|
38009
|
+
import_node_crypto10 = require("node:crypto");
|
|
37664
38010
|
init_zod();
|
|
37665
38011
|
LaunchRecordSchema = external_exports.strictObject({
|
|
37666
38012
|
/** The launcher's process id, which is what tells a launch in progress from a record a crashed launcher left behind. */
|
|
@@ -40205,7 +40551,7 @@ function ipBytes(address) {
|
|
|
40205
40551
|
return bytes;
|
|
40206
40552
|
}
|
|
40207
40553
|
function keyIdentifier(publicKey) {
|
|
40208
|
-
return (0,
|
|
40554
|
+
return (0, import_node_crypto11.createHash)("sha1").update(publicKey.export({ type: "pkcs1", format: "der" })).digest();
|
|
40209
40555
|
}
|
|
40210
40556
|
function readElement(buffer2, offset) {
|
|
40211
40557
|
const tag = buffer2[offset];
|
|
@@ -40251,7 +40597,7 @@ ${body.join("\n")}
|
|
|
40251
40597
|
`;
|
|
40252
40598
|
}
|
|
40253
40599
|
function randomSerial() {
|
|
40254
|
-
const bytes = (0,
|
|
40600
|
+
const bytes = (0, import_node_crypto11.randomBytes)(SERIAL_NUMBER_BYTES);
|
|
40255
40601
|
bytes[0] = (bytes[0] ?? 0) & BASE_128_PAYLOAD_MASK | HIGH_BIT >> 1;
|
|
40256
40602
|
return bytes;
|
|
40257
40603
|
}
|
|
@@ -40266,7 +40612,7 @@ function assemble(spec) {
|
|
|
40266
40612
|
spec.subjectPublicKey.export({ type: "spki", format: "der" }),
|
|
40267
40613
|
tlv(TAG_EXTENSIONS, sequence(...spec.extensions))
|
|
40268
40614
|
);
|
|
40269
|
-
const signature = (0,
|
|
40615
|
+
const signature = (0, import_node_crypto11.sign)("sha256", tbs, spec.signingKey);
|
|
40270
40616
|
return sequence(tbs, SIGNATURE_ALGORITHM, wholeBitString(signature));
|
|
40271
40617
|
}
|
|
40272
40618
|
function subjectKeyIdentifierExtension(publicKey) {
|
|
@@ -40276,7 +40622,7 @@ function basicConstraintsExtension(isCa) {
|
|
|
40276
40622
|
return extension(OID_BASIC_CONSTRAINTS, true, sequence(...isCa ? [boolean4(true)] : []));
|
|
40277
40623
|
}
|
|
40278
40624
|
function rsaKeyPair() {
|
|
40279
|
-
return (0,
|
|
40625
|
+
return (0, import_node_crypto11.generateKeyPairSync)("rsa", { modulusLength: RSA_MODULUS_BITS });
|
|
40280
40626
|
}
|
|
40281
40627
|
function keyPem(privateKey) {
|
|
40282
40628
|
return privateKey.export({ type: "pkcs8", format: "pem" });
|
|
@@ -40300,8 +40646,8 @@ function issueLeafCertificate(ca2, names, notBefore, notAfter) {
|
|
|
40300
40646
|
if (commonName === void 0) {
|
|
40301
40647
|
throw new Error("a leaf certificate needs at least one name");
|
|
40302
40648
|
}
|
|
40303
|
-
const caCertificate = new
|
|
40304
|
-
const caPrivateKey = (0,
|
|
40649
|
+
const caCertificate = new import_node_crypto11.X509Certificate(ca2.certPem);
|
|
40650
|
+
const caPrivateKey = (0, import_node_crypto11.createPrivateKey)(ca2.keyPem);
|
|
40305
40651
|
const { publicKey, privateKey } = rsaKeyPair();
|
|
40306
40652
|
const generalNames = names.map((name) => import_node_net.default.isIP(name) === 0 ? tlv(TAG_GENERAL_NAME_DNS, Buffer.from(name, "ascii")) : tlv(TAG_GENERAL_NAME_IP, ipBytes(name)));
|
|
40307
40653
|
const der = assemble({
|
|
@@ -40322,11 +40668,11 @@ function issueLeafCertificate(ca2, names, notBefore, notAfter) {
|
|
|
40322
40668
|
});
|
|
40323
40669
|
return { certPem: toPem("CERTIFICATE", der), keyPem: keyPem(privateKey) };
|
|
40324
40670
|
}
|
|
40325
|
-
var
|
|
40671
|
+
var import_node_crypto11, import_node_net, TAG_BOOLEAN, TAG_INTEGER, TAG_BIT_STRING, TAG_OCTET_STRING, TAG_NULL, TAG_OID, TAG_UTF8_STRING, TAG_UTC_TIME, TAG_GENERALIZED_TIME, TAG_SEQUENCE, TAG_SET, TAG_VERSION, TAG_EXTENSIONS, TAG_GENERAL_NAME_DNS, TAG_GENERAL_NAME_IP, TAG_KEY_IDENTIFIER, OID_COMMON_NAME, OID_SHA256_WITH_RSA, OID_SUBJECT_KEY_IDENTIFIER, OID_KEY_USAGE, OID_SUBJECT_ALT_NAME, OID_BASIC_CONSTRAINTS, OID_AUTHORITY_KEY_IDENTIFIER, OID_EXT_KEY_USAGE, OID_SERVER_AUTH, VERSION_3, SERIAL_NUMBER_BYTES, RSA_MODULUS_BITS, BITS_PER_BYTE, BYTE_MASK, HIGH_BIT, BASE_128_PAYLOAD_MASK, FIRST_ARC_WEIGHT, SHORT_FORM_MAX_LENGTH, MS_PER_SECOND6, UTC_TIME_LAST_YEAR, YEAR_DIGITS, TWO_DIGIT_YEAR_DIGITS, COMPACT_TIME_DIGITS, KEY_USAGE, SIGNATURE_ALGORITHM, IPV6_GROUPS, HEX_RADIX, BYTES_PER_IPV6_GROUP;
|
|
40326
40672
|
var init_x509 = __esm({
|
|
40327
40673
|
"src/frontdoor/x509.ts"() {
|
|
40328
40674
|
"use strict";
|
|
40329
|
-
|
|
40675
|
+
import_node_crypto11 = require("node:crypto");
|
|
40330
40676
|
import_node_net = __toESM(require("node:net"), 1);
|
|
40331
40677
|
TAG_BOOLEAN = 1;
|
|
40332
40678
|
TAG_INTEGER = 2;
|
|
@@ -40449,23 +40795,23 @@ function capabilityFromProxyAuthorization(value3) {
|
|
|
40449
40795
|
const password = userPass.slice(colon + 1);
|
|
40450
40796
|
return password === "" ? void 0 : password;
|
|
40451
40797
|
}
|
|
40452
|
-
function
|
|
40453
|
-
return (0,
|
|
40798
|
+
function digest2(token) {
|
|
40799
|
+
return (0, import_node_crypto12.createHash)("sha256").update(token, "utf8").digest();
|
|
40454
40800
|
}
|
|
40455
40801
|
function isLiveCapability(presented, live) {
|
|
40456
|
-
const presentedDigest =
|
|
40802
|
+
const presentedDigest = digest2(presented);
|
|
40457
40803
|
let matched = false;
|
|
40458
40804
|
for (const token of live) {
|
|
40459
|
-
const equal = (0,
|
|
40805
|
+
const equal = (0, import_node_crypto12.timingSafeEqual)(presentedDigest, digest2(token));
|
|
40460
40806
|
matched = equal || matched;
|
|
40461
40807
|
}
|
|
40462
40808
|
return matched;
|
|
40463
40809
|
}
|
|
40464
|
-
var
|
|
40810
|
+
var import_node_crypto12, CONNECT_PROXY_USER, CONNECT_PROXY_REALM, BASIC_SCHEME;
|
|
40465
40811
|
var init_capability = __esm({
|
|
40466
40812
|
"src/frontdoor/capability.ts"() {
|
|
40467
40813
|
"use strict";
|
|
40468
|
-
|
|
40814
|
+
import_node_crypto12 = require("node:crypto");
|
|
40469
40815
|
CONNECT_PROXY_USER = "agent-shim";
|
|
40470
40816
|
CONNECT_PROXY_REALM = "agent-shim front door";
|
|
40471
40817
|
BASIC_SCHEME = "basic";
|
|
@@ -40815,8 +41161,8 @@ function ensureCa(store, generate) {
|
|
|
40815
41161
|
}
|
|
40816
41162
|
function caParses(ca2) {
|
|
40817
41163
|
try {
|
|
40818
|
-
new
|
|
40819
|
-
(0,
|
|
41164
|
+
new import_node_crypto13.X509Certificate(ca2.certPem);
|
|
41165
|
+
(0, import_node_crypto13.createPrivateKey)(ca2.keyPem);
|
|
40820
41166
|
return true;
|
|
40821
41167
|
} catch {
|
|
40822
41168
|
return false;
|
|
@@ -41153,11 +41499,11 @@ function realConnectCertStore(paths) {
|
|
|
41153
41499
|
}
|
|
41154
41500
|
};
|
|
41155
41501
|
}
|
|
41156
|
-
var
|
|
41502
|
+
var import_node_crypto13, fs14, CONNECT_INTERCEPT_HOST, CONNECT_INTERCEPT_HOSTS, CONNECT_TAP_HOSTS, ROUTED_PATH_PREFIX, HTTPS_PORT, HTTP_BAD_GATEWAY, CA_KEY_FILE_MODE, CONNECT_LINE_TOKENS, HEAD_TERMINATOR, MAX_CONNECT_HEAD_BYTES, CONNECT_ESTABLISHED, REFUSAL, CONNECT_LIMITS, CA_VALIDITY_DAYS, LEAF_VALIDITY_DAYS, CA_SUBJECT_COMMON_NAME, MS_PER_DAY2, HOP_BY_HOP_HEADERS, LOOPBACK_LEAF_NAMES, TAP_ALPN_PROTOCOLS;
|
|
41157
41503
|
var init_connect = __esm({
|
|
41158
41504
|
"src/frontdoor/connect.ts"() {
|
|
41159
41505
|
"use strict";
|
|
41160
|
-
|
|
41506
|
+
import_node_crypto13 = require("node:crypto");
|
|
41161
41507
|
fs14 = __toESM(require("node:fs"), 1);
|
|
41162
41508
|
init_x509();
|
|
41163
41509
|
init_tap();
|
|
@@ -41831,13 +42177,19 @@ function cascadeProviderName(cascade, identityProvider) {
|
|
|
41831
42177
|
}
|
|
41832
42178
|
return name ?? identityProvider;
|
|
41833
42179
|
}
|
|
41834
|
-
function
|
|
42180
|
+
function selectedProviderName(params) {
|
|
41835
42181
|
const cliName = params.cliProvider !== void 0 && params.cliProvider !== "" ? params.cliProvider : void 0;
|
|
41836
42182
|
const named = cliName ?? (params.cascade === void 0 ? params.identityProvider : cascadeProviderName(params.cascade, params.identityProvider));
|
|
41837
42183
|
if (named === void 0) {
|
|
41838
42184
|
return void 0;
|
|
41839
42185
|
}
|
|
41840
|
-
|
|
42186
|
+
return canonicalProviderName(named, (candidate) => loadProvider(params.paths.providersDir, candidate, params.port) !== void 0, () => loadProviderAliases(params.paths.providerAliasesFile, params.port));
|
|
42187
|
+
}
|
|
42188
|
+
function selectProvider(params) {
|
|
42189
|
+
const name = selectedProviderName(params);
|
|
42190
|
+
if (name === void 0) {
|
|
42191
|
+
return void 0;
|
|
42192
|
+
}
|
|
41841
42193
|
const definition = loadProvider(params.paths.providersDir, name, params.port);
|
|
41842
42194
|
if (definition === void 0) {
|
|
41843
42195
|
const known = listProviderNames(params.port.readdir, params.paths.providersDir);
|
|
@@ -41989,7 +42341,7 @@ var init_package = __esm({
|
|
|
41989
42341
|
"package.json"() {
|
|
41990
42342
|
package_default = {
|
|
41991
42343
|
name: "claude-use",
|
|
41992
|
-
version: "12.
|
|
42344
|
+
version: "12.1.0",
|
|
41993
42345
|
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.",
|
|
41994
42346
|
license: "MIT",
|
|
41995
42347
|
author: "Joseph Mearman <joseph@mearman.co.uk>",
|
|
@@ -42125,6 +42477,81 @@ var init_envBool = __esm({
|
|
|
42125
42477
|
}
|
|
42126
42478
|
});
|
|
42127
42479
|
|
|
42480
|
+
// src/launcher/memberProvider.ts
|
|
42481
|
+
function unreadableFileReason(error63) {
|
|
42482
|
+
if (error63 instanceof ConfigValidationError) {
|
|
42483
|
+
return `${error63.filepath} is invalid`;
|
|
42484
|
+
}
|
|
42485
|
+
if (error63 instanceof ConfigFileNotJsonError) {
|
|
42486
|
+
return error63.message.replace(/\.$/, "");
|
|
42487
|
+
}
|
|
42488
|
+
if (error63 instanceof LegacyProviderFileError) {
|
|
42489
|
+
return `${error63.filePath} uses ${error63.conversion.fields.join(", ")}, which a credential block replaced`;
|
|
42490
|
+
}
|
|
42491
|
+
return void 0;
|
|
42492
|
+
}
|
|
42493
|
+
function memberProviderResolver(params) {
|
|
42494
|
+
if (params.cliProvider === false) {
|
|
42495
|
+
return () => void 0;
|
|
42496
|
+
}
|
|
42497
|
+
const cliProvider = params.cliProvider;
|
|
42498
|
+
const identities = identityReader(params.paths.identitiesDir, params.fs);
|
|
42499
|
+
const cascades = /* @__PURE__ */ new Map();
|
|
42500
|
+
const cascadeOver = (baseConfigProfile) => {
|
|
42501
|
+
const cached2 = cascades.get(baseConfigProfile);
|
|
42502
|
+
if (cached2 !== void 0) {
|
|
42503
|
+
return cached2;
|
|
42504
|
+
}
|
|
42505
|
+
const loaded = params.loadCascade(baseConfigProfile);
|
|
42506
|
+
cascades.set(baseConfigProfile, loaded);
|
|
42507
|
+
return loaded;
|
|
42508
|
+
};
|
|
42509
|
+
return (name) => {
|
|
42510
|
+
let declared;
|
|
42511
|
+
try {
|
|
42512
|
+
declared = identities.load(name);
|
|
42513
|
+
} catch (error63) {
|
|
42514
|
+
if (!(error63 instanceof ConfigValidationError)) {
|
|
42515
|
+
throw error63;
|
|
42516
|
+
}
|
|
42517
|
+
}
|
|
42518
|
+
const profile = decideConfigProfile({
|
|
42519
|
+
env: params.env,
|
|
42520
|
+
...params.cliFlagConfigProfile === void 0 ? {} : { cliFlagConfigProfile: params.cliFlagConfigProfile },
|
|
42521
|
+
...params.directoryRuleConfigProfile === void 0 ? {} : { directoryRuleConfigProfile: params.directoryRuleConfigProfile },
|
|
42522
|
+
...declared?.defaultConfigProfile === void 0 ? {} : { identityDefaultConfigProfile: declared.defaultConfigProfile },
|
|
42523
|
+
...params.globalDefaultConfigProfile === void 0 ? {} : { globalDefaultConfigProfile: params.globalDefaultConfigProfile }
|
|
42524
|
+
});
|
|
42525
|
+
const flagged = cliProvider !== void 0 && cliProvider !== "" ? cliProvider : void 0;
|
|
42526
|
+
let named = flagged ?? declared?.provider;
|
|
42527
|
+
try {
|
|
42528
|
+
const cascade = cascadeOver(profile.name);
|
|
42529
|
+
named = flagged ?? cascadeProviderName(cascade, declared?.provider);
|
|
42530
|
+
return selectedProviderName({
|
|
42531
|
+
paths: params.paths,
|
|
42532
|
+
port: params.fs,
|
|
42533
|
+
...cliProvider === void 0 ? {} : { cliProvider },
|
|
42534
|
+
cascade,
|
|
42535
|
+
...declared?.provider === void 0 ? {} : { identityProvider: declared.provider }
|
|
42536
|
+
});
|
|
42537
|
+
} catch (error63) {
|
|
42538
|
+
const reason = unreadableFileReason(error63);
|
|
42539
|
+
if (reason === void 0) {
|
|
42540
|
+
throw error63;
|
|
42541
|
+
}
|
|
42542
|
+
return { ...named === void 0 ? {} : { named }, reason };
|
|
42543
|
+
}
|
|
42544
|
+
};
|
|
42545
|
+
}
|
|
42546
|
+
var init_memberProvider = __esm({
|
|
42547
|
+
"src/launcher/memberProvider.ts"() {
|
|
42548
|
+
"use strict";
|
|
42549
|
+
init_load();
|
|
42550
|
+
init_providersStore();
|
|
42551
|
+
init_identity();
|
|
42552
|
+
}
|
|
42553
|
+
});
|
|
42554
|
+
|
|
42128
42555
|
// src/launcher/claudeVersion.ts
|
|
42129
42556
|
function validated2(value3, origin) {
|
|
42130
42557
|
if (!NUMERIC_DOTTED_VERSION_RE.test(value3)) {
|
|
@@ -42162,221 +42589,6 @@ var init_claudeVersion = __esm({
|
|
|
42162
42589
|
}
|
|
42163
42590
|
});
|
|
42164
42591
|
|
|
42165
|
-
// src/headroom/headers.ts
|
|
42166
|
-
function mergeAnthropicCustomHeaders(existing, additions) {
|
|
42167
|
-
const merged = /* @__PURE__ */ new Map();
|
|
42168
|
-
for (const block2 of existing) {
|
|
42169
|
-
if (block2 === void 0) {
|
|
42170
|
-
continue;
|
|
42171
|
-
}
|
|
42172
|
-
for (const line of block2.split("\n")) {
|
|
42173
|
-
const entry = parseCustomHeaderLine(line);
|
|
42174
|
-
if (entry === void 0) {
|
|
42175
|
-
continue;
|
|
42176
|
-
}
|
|
42177
|
-
merged.set(entry.name, entry.value);
|
|
42178
|
-
}
|
|
42179
|
-
}
|
|
42180
|
-
for (const entry of additions) {
|
|
42181
|
-
merged.set(entry.name, entry.value);
|
|
42182
|
-
}
|
|
42183
|
-
return [...merged].map(([name, value3]) => `${name}: ${value3}`).join("\n");
|
|
42184
|
-
}
|
|
42185
|
-
function parseAnthropicCustomHeaders(block2) {
|
|
42186
|
-
return block2.split("\n").flatMap((line) => {
|
|
42187
|
-
const entry = parseCustomHeaderLine(line);
|
|
42188
|
-
return entry === void 0 ? [] : [entry];
|
|
42189
|
-
});
|
|
42190
|
-
}
|
|
42191
|
-
function withoutAnthropicCustomHeaders(block2, remove) {
|
|
42192
|
-
const lines = block2.split("\n");
|
|
42193
|
-
const kept = lines.filter((line) => {
|
|
42194
|
-
const entry = parseCustomHeaderLine(line);
|
|
42195
|
-
return entry === void 0 || !remove(entry);
|
|
42196
|
-
});
|
|
42197
|
-
return kept.length === lines.length ? block2 : kept.join("\n");
|
|
42198
|
-
}
|
|
42199
|
-
function parseCustomHeaderLine(line) {
|
|
42200
|
-
const trimmed = line.trim();
|
|
42201
|
-
if (trimmed === "") {
|
|
42202
|
-
return void 0;
|
|
42203
|
-
}
|
|
42204
|
-
const colon = trimmed.indexOf(":");
|
|
42205
|
-
if (colon <= 0) {
|
|
42206
|
-
return void 0;
|
|
42207
|
-
}
|
|
42208
|
-
return { name: trimmed.slice(0, colon).trim(), value: trimmed.slice(colon + 1).trim() };
|
|
42209
|
-
}
|
|
42210
|
-
var init_headers = __esm({
|
|
42211
|
-
"src/headroom/headers.ts"() {
|
|
42212
|
-
"use strict";
|
|
42213
|
-
}
|
|
42214
|
-
});
|
|
42215
|
-
|
|
42216
|
-
// src/launcher/injected.ts
|
|
42217
|
-
function listKey(list2) {
|
|
42218
|
-
return `${list2},appended`;
|
|
42219
|
-
}
|
|
42220
|
-
function digest2(value3) {
|
|
42221
|
-
return (0, import_node_crypto13.createHash)("sha256").update(value3).digest("hex");
|
|
42222
|
-
}
|
|
42223
|
-
function recordedDigests(env) {
|
|
42224
|
-
const raw = env[INJECTED_ENV];
|
|
42225
|
-
if (raw === void 0 || raw === "") {
|
|
42226
|
-
return {};
|
|
42227
|
-
}
|
|
42228
|
-
let parsed;
|
|
42229
|
-
try {
|
|
42230
|
-
parsed = JSON.parse(raw);
|
|
42231
|
-
} catch {
|
|
42232
|
-
return {};
|
|
42233
|
-
}
|
|
42234
|
-
const result = InjectedSchema.safeParse(parsed);
|
|
42235
|
-
return result.success ? result.data : {};
|
|
42236
|
-
}
|
|
42237
|
-
function recordInjections(base) {
|
|
42238
|
-
const env = { ...base };
|
|
42239
|
-
const digests = new Map(Object.entries(recordedDigests(env)));
|
|
42240
|
-
return {
|
|
42241
|
-
env,
|
|
42242
|
-
set: (name, value3) => {
|
|
42243
|
-
env[name] = value3;
|
|
42244
|
-
digests.set(name, digest2(value3));
|
|
42245
|
-
},
|
|
42246
|
-
unset: (name) => {
|
|
42247
|
-
env[name] = void 0;
|
|
42248
|
-
digests.delete(name);
|
|
42249
|
-
},
|
|
42250
|
-
recordHeaders: (names) => {
|
|
42251
|
-
const block2 = env[CUSTOM_HEADERS_ENV];
|
|
42252
|
-
for (const entry of block2 === void 0 ? [] : parseAnthropicCustomHeaders(block2)) {
|
|
42253
|
-
if (names.includes(entry.name)) {
|
|
42254
|
-
digests.set(`${HEADER_KEY_PREFIX}${entry.name.toLowerCase()}`, digest2(entry.value));
|
|
42255
|
-
}
|
|
42256
|
-
}
|
|
42257
|
-
},
|
|
42258
|
-
recordBypassHosts: (list2, hosts) => {
|
|
42259
|
-
const recordedHosts = [.../* @__PURE__ */ new Set([...digests.get(listKey(list2))?.split(",") ?? [], ...hosts.map((host) => host.trim().toLowerCase()).filter((host) => host !== "")])];
|
|
42260
|
-
if (recordedHosts.length > 0) {
|
|
42261
|
-
digests.set(listKey(list2), recordedHosts.join(","));
|
|
42262
|
-
}
|
|
42263
|
-
},
|
|
42264
|
-
finish: () => {
|
|
42265
|
-
if (digests.size > 0) {
|
|
42266
|
-
env[INJECTED_ENV] = JSON.stringify(Object.fromEntries(digests));
|
|
42267
|
-
}
|
|
42268
|
-
}
|
|
42269
|
-
};
|
|
42270
|
-
}
|
|
42271
|
-
function withoutRecordedHosts(list2, value3, digests) {
|
|
42272
|
-
const recordedHosts = new Set(digests[listKey(list2)]?.split(","));
|
|
42273
|
-
const entries = value3.split(",");
|
|
42274
|
-
const kept = entries.filter((entry) => !recordedHosts.has(entry.trim().toLowerCase()));
|
|
42275
|
-
return kept.length === entries.length ? value3 : kept.join(",");
|
|
42276
|
-
}
|
|
42277
|
-
function launchEnvironment(env, configDirEscapeHatch) {
|
|
42278
|
-
return configDirEscapeHatch ? env : withoutInjected(env);
|
|
42279
|
-
}
|
|
42280
|
-
function withoutInjected(env) {
|
|
42281
|
-
const digests = recordedDigests(env);
|
|
42282
|
-
const entries = Object.entries(env).flatMap(([name, value3]) => {
|
|
42283
|
-
if (name === INJECTED_ENV) {
|
|
42284
|
-
return [];
|
|
42285
|
-
}
|
|
42286
|
-
if (value3 === void 0) {
|
|
42287
|
-
return [[name, value3]];
|
|
42288
|
-
}
|
|
42289
|
-
if (name === CUSTOM_HEADERS_ENV) {
|
|
42290
|
-
const remaining = withoutAnthropicCustomHeaders(value3, (entry) => digests[`${HEADER_KEY_PREFIX}${entry.name.toLowerCase()}`] === digest2(entry.value));
|
|
42291
|
-
return remaining !== value3 && remaining.trim() === "" ? [] : [[name, remaining]];
|
|
42292
|
-
}
|
|
42293
|
-
if (name === "NO_PROXY" || name === "no_proxy") {
|
|
42294
|
-
const remaining = withoutRecordedHosts(name, value3, digests);
|
|
42295
|
-
return remaining !== value3 && remaining.split(",").every((entry) => entry.trim() === "") ? [] : [[name, remaining]];
|
|
42296
|
-
}
|
|
42297
|
-
return digests[name] === digest2(value3) ? [] : [[name, value3]];
|
|
42298
|
-
});
|
|
42299
|
-
return Object.fromEntries(entries);
|
|
42300
|
-
}
|
|
42301
|
-
var import_node_crypto13, INJECTED_ENV, CUSTOM_HEADERS_ENV, HEADER_KEY_PREFIX, InjectedSchema;
|
|
42302
|
-
var init_injected = __esm({
|
|
42303
|
-
"src/launcher/injected.ts"() {
|
|
42304
|
-
"use strict";
|
|
42305
|
-
import_node_crypto13 = require("node:crypto");
|
|
42306
|
-
init_zod();
|
|
42307
|
-
init_headers();
|
|
42308
|
-
INJECTED_ENV = "AGENT_SHIM_INJECTED";
|
|
42309
|
-
CUSTOM_HEADERS_ENV = "ANTHROPIC_CUSTOM_HEADERS";
|
|
42310
|
-
HEADER_KEY_PREFIX = `${CUSTOM_HEADERS_ENV}:`;
|
|
42311
|
-
InjectedSchema = external_exports.record(external_exports.string(), external_exports.string());
|
|
42312
|
-
}
|
|
42313
|
-
});
|
|
42314
|
-
|
|
42315
|
-
// src/launcher/guard.ts
|
|
42316
|
-
function detectAmbientCredential(env, injected) {
|
|
42317
|
-
for (const variable of AMBIENT_CREDENTIAL_VARS) {
|
|
42318
|
-
const value3 = env[variable];
|
|
42319
|
-
if (value3 === void 0 || value3 === "") {
|
|
42320
|
-
continue;
|
|
42321
|
-
}
|
|
42322
|
-
if (injected?.variable === variable && value3 === injected.token) {
|
|
42323
|
-
continue;
|
|
42324
|
-
}
|
|
42325
|
-
return { variable };
|
|
42326
|
-
}
|
|
42327
|
-
return void 0;
|
|
42328
|
-
}
|
|
42329
|
-
function formatAmbientCredentialGuardMessage(variable, identityName) {
|
|
42330
|
-
const identitySetCommand = identityName === void 0 ? "agent-shim identity set <name> --allow-ambient-credential" : `agent-shim identity set ${identityName} --allow-ambient-credential`;
|
|
42331
|
-
return [
|
|
42332
|
-
`error: ${variable} is set in the environment. This identity's isolated`,
|
|
42333
|
-
"credential would be bypassed \u2014 every identity authenticates as this same key",
|
|
42334
|
-
"while it's set. Unset it, or if this is deliberate, opt in per-launch with",
|
|
42335
|
-
"AGENT_SHIM_ALLOW_AMBIENT_CREDENTIAL=1, or persistently for this identity with",
|
|
42336
|
-
`\`${identitySetCommand}\`.`
|
|
42337
|
-
].join("\n");
|
|
42338
|
-
}
|
|
42339
|
-
function evaluateAmbientCredentialGuard(params) {
|
|
42340
|
-
const detected = detectAmbientCredential(params.env, params.injectedCredential);
|
|
42341
|
-
if (detected === void 0) {
|
|
42342
|
-
return { ok: true };
|
|
42343
|
-
}
|
|
42344
|
-
if (params.allowAmbientCredentialOverride || params.allowAmbientCredential || params.providerSelected === true) {
|
|
42345
|
-
return { ok: true };
|
|
42346
|
-
}
|
|
42347
|
-
return {
|
|
42348
|
-
ok: false,
|
|
42349
|
-
variable: detected.variable,
|
|
42350
|
-
message: formatAmbientCredentialGuardMessage(detected.variable, params.identityName)
|
|
42351
|
-
};
|
|
42352
|
-
}
|
|
42353
|
-
function ambientCredentialFinding(env) {
|
|
42354
|
-
const named = detectAmbientCredential(launchEnvironment(env, false));
|
|
42355
|
-
if (named !== void 0) {
|
|
42356
|
-
return { severity: "warn", message: formatAmbientCredentialGuardMessage(named.variable) };
|
|
42357
|
-
}
|
|
42358
|
-
const bare = env.CLAUDE_CONFIG_DIR === void 0 || env.CLAUDE_CONFIG_DIR === "" ? void 0 : detectAmbientCredential(env);
|
|
42359
|
-
if (bare !== void 0) {
|
|
42360
|
-
return { severity: "warn", message: `${bare.variable} was set in this session by the launcher that started it. A launch that names an identity drops it, but a launch naming none keeps the session's CLAUDE_CONFIG_DIR and environment and is refused. Name an identity, as in \`claude @<name>\`.` };
|
|
42361
|
-
}
|
|
42362
|
-
return { severity: "pass", message: "No ambient-credential environment variable is set." };
|
|
42363
|
-
}
|
|
42364
|
-
var AMBIENT_CREDENTIAL_VARS;
|
|
42365
|
-
var init_guard = __esm({
|
|
42366
|
-
"src/launcher/guard.ts"() {
|
|
42367
|
-
"use strict";
|
|
42368
|
-
init_injected();
|
|
42369
|
-
AMBIENT_CREDENTIAL_VARS = [
|
|
42370
|
-
"ANTHROPIC_API_KEY",
|
|
42371
|
-
"ANTHROPIC_AUTH_TOKEN",
|
|
42372
|
-
"CLAUDE_CODE_OAUTH_TOKEN",
|
|
42373
|
-
"CLAUDE_CODE_USE_BEDROCK",
|
|
42374
|
-
"CLAUDE_CODE_USE_VERTEX",
|
|
42375
|
-
"CLAUDE_CODE_USE_FOUNDRY"
|
|
42376
|
-
];
|
|
42377
|
-
}
|
|
42378
|
-
});
|
|
42379
|
-
|
|
42380
42592
|
// node_modules/.pnpm/undici@7.30.1/node_modules/undici/lib/core/symbols.js
|
|
42381
42593
|
var require_symbols = __commonJS({
|
|
42382
42594
|
"node_modules/.pnpm/undici@7.30.1/node_modules/undici/lib/core/symbols.js"(exports2, module2) {
|
|
@@ -69635,7 +69847,7 @@ function realFrontDoorPort(paths, spawnDaemon) {
|
|
|
69635
69847
|
const cache2 = parseCatalogueCache(realFarmFs.readFileUtf8(catalogueCachePath(paths, name, supervisorPid, owner.generation)));
|
|
69636
69848
|
let fingerprint;
|
|
69637
69849
|
try {
|
|
69638
|
-
fingerprint = savedCatalogueFingerprint(provider, paths, { ...process.env, CODEX_HOME: owner.codexHome },
|
|
69850
|
+
fingerprint = savedCatalogueFingerprint(provider, paths, { ...process.env, CODEX_HOME: owner.codexHome }, import_node_os10.default.homedir(), realFarmFs.readFileUtf8);
|
|
69639
69851
|
} catch (error63) {
|
|
69640
69852
|
warnings.add(`Cannot read catalogue credentials for ${name}: ${error63 instanceof Error ? error63.message : String(error63)}`);
|
|
69641
69853
|
return false;
|
|
@@ -69685,12 +69897,12 @@ function realFrontDoorPort(paths, spawnDaemon) {
|
|
|
69685
69897
|
}
|
|
69686
69898
|
};
|
|
69687
69899
|
}
|
|
69688
|
-
var import_node_fs20,
|
|
69900
|
+
var import_node_fs20, import_node_os10, realTrustBundleFs;
|
|
69689
69901
|
var init_realFrontDoorPort = __esm({
|
|
69690
69902
|
"src/frontdoor/realFrontDoorPort.ts"() {
|
|
69691
69903
|
"use strict";
|
|
69692
69904
|
import_node_fs20 = __toESM(require("node:fs"), 1);
|
|
69693
|
-
|
|
69905
|
+
import_node_os10 = __toESM(require("node:os"), 1);
|
|
69694
69906
|
init_providersStore();
|
|
69695
69907
|
init_providerCatalogue();
|
|
69696
69908
|
init_catalogueCredential();
|
|
@@ -70066,7 +70278,7 @@ var init_anthropicUsageRefresh = __esm({
|
|
|
70066
70278
|
init_schema();
|
|
70067
70279
|
init_identity();
|
|
70068
70280
|
init_middleware();
|
|
70069
|
-
|
|
70281
|
+
init_windowLengths();
|
|
70070
70282
|
init_plan();
|
|
70071
70283
|
PERCENT2 = 100;
|
|
70072
70284
|
ANTHROPIC_USAGE_FRESHNESS_MS = FIVE_HOUR_WINDOW_MS / PERCENT2;
|
|
@@ -70978,7 +71190,7 @@ function formatPeriod(window) {
|
|
|
70978
71190
|
if (window.periodMs === void 0) {
|
|
70979
71191
|
return window.period ?? "unknown period";
|
|
70980
71192
|
}
|
|
70981
|
-
const hours = window.periodMs /
|
|
71193
|
+
const hours = window.periodMs / MS_PER_HOUR5;
|
|
70982
71194
|
return hours >= HOURS_PER_DAY4 && Number.isInteger(hours / HOURS_PER_DAY4) ? `${String(hours / HOURS_PER_DAY4)}d` : `${String(hours)}h`;
|
|
70983
71195
|
}
|
|
70984
71196
|
function groupOf(row) {
|
|
@@ -71023,13 +71235,13 @@ function formatResetRow(row, nowMs) {
|
|
|
71023
71235
|
const when = row.resetsAt === void 0 ? "no reset time reported" : row.reset ? `reset at ${row.resetsAt}` : `resets ${row.resetsAt} (in ${formatAge(Date.parse(row.resetsAt) - nowMs)})`;
|
|
71024
71236
|
return `${row.identity} / ${row.provider}: ${row.window} ${used}, ${when}${row.status === void 0 ? "" : ` (${row.status})`}`;
|
|
71025
71237
|
}
|
|
71026
|
-
var
|
|
71238
|
+
var MS_PER_HOUR5, HOURS_PER_DAY4, PERCENT3;
|
|
71027
71239
|
var init_resets = __esm({
|
|
71028
71240
|
"src/usage/resets.ts"() {
|
|
71029
71241
|
"use strict";
|
|
71030
71242
|
init_preflight();
|
|
71031
71243
|
init_rateLimit();
|
|
71032
|
-
|
|
71244
|
+
MS_PER_HOUR5 = 36e5;
|
|
71033
71245
|
HOURS_PER_DAY4 = 24;
|
|
71034
71246
|
PERCENT3 = 100;
|
|
71035
71247
|
}
|
|
@@ -71038,7 +71250,10 @@ var init_resets = __esm({
|
|
|
71038
71250
|
// src/launcher/launchReport.ts
|
|
71039
71251
|
function poolDetail(pool) {
|
|
71040
71252
|
const [reason] = pool.reasons;
|
|
71041
|
-
|
|
71253
|
+
if (reason === void 0) {
|
|
71254
|
+
return {};
|
|
71255
|
+
}
|
|
71256
|
+
return { detail: pool.provider === void 0 ? reason : `${reason} (ranked on provider ${pool.provider})` };
|
|
71042
71257
|
}
|
|
71043
71258
|
function rankingNotes(ranking, picked) {
|
|
71044
71259
|
return ranking.flatMap((candidate, index) => [
|
|
@@ -72787,6 +73002,7 @@ function resolvePoolLaunch(params) {
|
|
|
72787
73002
|
resuming,
|
|
72788
73003
|
...params.resumeContextTokens === void 0 ? {} : { resumeContextTokens: params.resumeContextTokens },
|
|
72789
73004
|
...params.committedContextTokens === void 0 ? {} : { committedContextTokens: params.committedContextTokens },
|
|
73005
|
+
...params.providerOf === void 0 ? {} : { providerOf: params.providerOf },
|
|
72790
73006
|
identityIdOf: identityIdResolver(params.paths.identitiesDir, params.fs),
|
|
72791
73007
|
...stickyRead.sticky === void 0 ? {} : { sticky: stickyRead.sticky }
|
|
72792
73008
|
});
|
|
@@ -72828,6 +73044,7 @@ function resolvePoolLaunch(params) {
|
|
|
72828
73044
|
explanation: `pool ${poolName}: ${move}${pick2.reasons.slice(0, REASONS_LOGGED).join("; ")}`,
|
|
72829
73045
|
reasons: pick2.reasons,
|
|
72830
73046
|
candidates: graph.ranking.candidates,
|
|
73047
|
+
...pick2.provider === void 0 ? {} : { provider: pick2.provider },
|
|
72831
73048
|
...movedOff === void 0 ? {} : { movedOff },
|
|
72832
73049
|
...stickyRead.sticky === void 0 ? {} : { lastRanAs: stickyRead.sticky }
|
|
72833
73050
|
};
|
|
@@ -72865,7 +73082,7 @@ function childExitCode(result) {
|
|
|
72865
73082
|
return result.status;
|
|
72866
73083
|
}
|
|
72867
73084
|
if (result.signal !== null) {
|
|
72868
|
-
return SIGNAL_EXIT_CODE_OFFSET +
|
|
73085
|
+
return SIGNAL_EXIT_CODE_OFFSET + import_node_os12.default.constants.signals[result.signal];
|
|
72869
73086
|
}
|
|
72870
73087
|
return 1;
|
|
72871
73088
|
}
|
|
@@ -72879,11 +73096,11 @@ function spawnClaude(params) {
|
|
|
72879
73096
|
}
|
|
72880
73097
|
return params.proc.exit(childExitCode(result));
|
|
72881
73098
|
}
|
|
72882
|
-
var
|
|
73099
|
+
var import_node_os12, SIGNAL_EXIT_CODE_OFFSET;
|
|
72883
73100
|
var init_spawn = __esm({
|
|
72884
73101
|
"src/launcher/spawn.ts"() {
|
|
72885
73102
|
"use strict";
|
|
72886
|
-
|
|
73103
|
+
import_node_os12 = __toESM(require("node:os"), 1);
|
|
72887
73104
|
SIGNAL_EXIT_CODE_OFFSET = 128;
|
|
72888
73105
|
}
|
|
72889
73106
|
});
|
|
@@ -72970,7 +73187,7 @@ function providerModels(paths) {
|
|
|
72970
73187
|
if (entry.provider.kind === "codex") {
|
|
72971
73188
|
if (catalogue !== void 0 && catalogue.supervisorPid !== supervisorPid) return [];
|
|
72972
73189
|
const env = doorHome === void 0 ? process.env : { ...process.env, CODEX_HOME: doorHome };
|
|
72973
|
-
const fingerprint = savedCatalogueFingerprint(entry.provider, paths, env,
|
|
73190
|
+
const fingerprint = savedCatalogueFingerprint(entry.provider, paths, env, import_node_os13.default.homedir(), realFsPort.readFileUtf8);
|
|
72974
73191
|
if (fingerprint === void 0 || catalogue?.credentialFingerprint !== fingerprint) return [];
|
|
72975
73192
|
}
|
|
72976
73193
|
return providerModelRows(entry.provider, catalogue?.models).map((row) => ({ provider: entry.name, model: row.model }));
|
|
@@ -72979,11 +73196,11 @@ function providerModels(paths) {
|
|
|
72979
73196
|
function targetRefs(paths) {
|
|
72980
73197
|
return providerModels(paths).map((entry) => `${entry.provider}/${entry.model}`);
|
|
72981
73198
|
}
|
|
72982
|
-
var
|
|
73199
|
+
var import_node_os13;
|
|
72983
73200
|
var init_targets = __esm({
|
|
72984
73201
|
"src/models/targets.ts"() {
|
|
72985
73202
|
"use strict";
|
|
72986
|
-
|
|
73203
|
+
import_node_os13 = __toESM(require("node:os"), 1);
|
|
72987
73204
|
init_catalogueCredential();
|
|
72988
73205
|
init_state();
|
|
72989
73206
|
init_modelPicker();
|
|
@@ -73001,7 +73218,7 @@ function resolveIdentityCredential(identity, credential, env, port) {
|
|
|
73001
73218
|
const resolution = resolveCredential({ credential, env, port, subject: `identity ${identity.name}`, cacheKey: identityCacheKey(identity.id) });
|
|
73002
73219
|
return resolution.ok ? resolution : { ok: false, status: CREDENTIAL_UNAVAILABLE_EXIT, message: `agent-shim: ${resolution.message}` };
|
|
73003
73220
|
}
|
|
73004
|
-
function pickFromPool(decided, params, parsedArgv, readOnly) {
|
|
73221
|
+
function pickFromPool(decided, params, parsedArgv, readOnly, providerSelections) {
|
|
73005
73222
|
const { paths, fs: fs37, proc, log } = params;
|
|
73006
73223
|
if (decided.pool === void 0) {
|
|
73007
73224
|
return { identityDecision: decided };
|
|
@@ -73016,6 +73233,17 @@ function pickFromPool(decided, params, parsedArgv, readOnly) {
|
|
|
73016
73233
|
return proc.exit(1);
|
|
73017
73234
|
}
|
|
73018
73235
|
const resumeContextTokens = resumedContextTokens(farmRuntime.fs, { claudeHome: farmRuntime.claudeHome, cwd: farmRuntime.cwd, passthrough: parsedArgv.rest });
|
|
73236
|
+
const cliFlagConfigProfile = params.cliFlagConfigProfile ?? parsedArgv.configProfile;
|
|
73237
|
+
const providerOf = memberProviderResolver({
|
|
73238
|
+
paths,
|
|
73239
|
+
fs: fs37,
|
|
73240
|
+
env: providerSelections.env,
|
|
73241
|
+
cliProvider: parsedArgv.provider,
|
|
73242
|
+
...cliFlagConfigProfile === void 0 ? {} : { cliFlagConfigProfile },
|
|
73243
|
+
...params.directoryRuleConfigProfile === void 0 ? {} : { directoryRuleConfigProfile: params.directoryRuleConfigProfile },
|
|
73244
|
+
...params.globalDefaultConfigProfile === void 0 ? {} : { globalDefaultConfigProfile: params.globalDefaultConfigProfile },
|
|
73245
|
+
loadCascade: (baseConfigProfile) => farmRuntime.loadCascade(baseConfigProfile, providerSelections.cliOverride)
|
|
73246
|
+
});
|
|
73019
73247
|
const resolution = resolvePoolLaunch({
|
|
73020
73248
|
poolName: decided.pool,
|
|
73021
73249
|
selectedVia: decided.source,
|
|
@@ -73027,6 +73255,7 @@ function pickFromPool(decided, params, parsedArgv, readOnly) {
|
|
|
73027
73255
|
now: farmRuntime.now,
|
|
73028
73256
|
sleep: farmRuntime.lock.sleep,
|
|
73029
73257
|
passthrough: parsedArgv.rest,
|
|
73258
|
+
providerOf,
|
|
73030
73259
|
...resumeContextTokens === void 0 ? {} : { resumeContextTokens },
|
|
73031
73260
|
// A read-only decision never sleeps for a refused pool and never records its pick, so asking what a launch would pick leaves the next real launch's keep-warm preference as it was.
|
|
73032
73261
|
wait: !readOnly && parsedArgv.wait === true,
|
|
@@ -73039,7 +73268,7 @@ function pickFromPool(decided, params, parsedArgv, readOnly) {
|
|
|
73039
73268
|
}
|
|
73040
73269
|
return {
|
|
73041
73270
|
identityDecision: { ...decided, name: resolution.identity },
|
|
73042
|
-
poolPick: { name: decided.pool, reasons: resolution.reasons, ...resolution.movedOff === void 0 ? {} : { movedOff: resolution.movedOff } },
|
|
73271
|
+
poolPick: { name: decided.pool, reasons: resolution.reasons, ...resolution.provider === void 0 ? {} : { provider: resolution.provider }, ...resolution.movedOff === void 0 ? {} : { movedOff: resolution.movedOff } },
|
|
73043
73272
|
poolRanking: resolution.candidates,
|
|
73044
73273
|
...resolution.lastRanAs === void 0 ? {} : { lastRanAs: { identity: resolution.lastRanAs.identity, agoMs: farmRuntime.now() - Date.parse(resolution.lastRanAs.at) } }
|
|
73045
73274
|
};
|
|
@@ -73075,7 +73304,7 @@ function decideLaunch(params, readOnly, onRecorded) {
|
|
|
73075
73304
|
shareFlags: parsedArgv.shareFlags,
|
|
73076
73305
|
hideFlags: parsedArgv.hideFlags
|
|
73077
73306
|
});
|
|
73078
|
-
const { identityDecision, poolPick, poolRanking, lastRanAs } = pickFromPool(decidedIdentity, params, parsedArgv, readOnly);
|
|
73307
|
+
const { identityDecision, poolPick, poolRanking, lastRanAs } = pickFromPool(decidedIdentity, params, parsedArgv, readOnly, { env, cliOverride });
|
|
73079
73308
|
const lockFarm = !readOnly && !configDirEscapeHatchApplies && identityDecision.name !== void 0 ? params.farm : void 0;
|
|
73080
73309
|
const lockPorts = params.namesLock ?? (lockFarm === void 0 ? realIdentityNamesLockPorts : { fs: lockFarm.fs, nowMs: lockFarm.now, ...lockFarm.lock });
|
|
73081
73310
|
const namesLock = readOnly || configDirEscapeHatchApplies || identityDecision.name === void 0 ? void 0 : acquireIdentityNamesLock(paths, lockPorts);
|
|
@@ -73234,10 +73463,22 @@ function decideLaunch(params, readOnly, onRecorded) {
|
|
|
73234
73463
|
...parsedArgv.delay === void 0 ? {} : { delay: parsedArgv.delay }
|
|
73235
73464
|
}
|
|
73236
73465
|
});
|
|
73237
|
-
const loginlessProvider =
|
|
73466
|
+
const loginlessProvider = (() => {
|
|
73467
|
+
if (!requestedFlags.remoteControl || selectedProvider === void 0 || farmIdentity === void 0 || identityDecision.name === void 0) {
|
|
73468
|
+
return void 0;
|
|
73469
|
+
}
|
|
73470
|
+
const stored2 = params.hasStoredLogin?.(farmIdentity);
|
|
73471
|
+
if (stored2 === false) {
|
|
73472
|
+
return { identity: identityDecision.name, provider: selectedProvider.name, why: "has no stored login" };
|
|
73473
|
+
}
|
|
73474
|
+
if (stored2 === true && params.hasUsableLogin?.(farmIdentity, discovered.path) === false) {
|
|
73475
|
+
return { identity: identityDecision.name, provider: selectedProvider.name, why: "has a stored login that is no longer usable" };
|
|
73476
|
+
}
|
|
73477
|
+
return void 0;
|
|
73478
|
+
})();
|
|
73238
73479
|
const notes = [];
|
|
73239
73480
|
if (loginlessProvider !== void 0) {
|
|
73240
|
-
notes.push(`${loginlessProvider.identity}
|
|
73481
|
+
notes.push(`${loginlessProvider.identity} ${loginlessProvider.why}, so Remote Control is off; provider ${loginlessProvider.provider} runs without it`);
|
|
73241
73482
|
}
|
|
73242
73483
|
const flags = loginlessProvider === void 0 ? requestedFlags : { ...requestedFlags, remoteControl: false };
|
|
73243
73484
|
const globalModels = loadConfigFile(paths.globalConfigFile, GlobalConfigSchema, params.fs.readConfigFile)?.config.models;
|
|
@@ -73264,12 +73505,12 @@ function decideLaunch(params, readOnly, onRecorded) {
|
|
|
73264
73505
|
if (definition.kind === "codex" && readOnly && cache !== void 0) {
|
|
73265
73506
|
const binding = parseCatalogueBinding(params.fs.readFileUtf8(catalogueBindingPath(paths, name, catalogueOwner, generation)));
|
|
73266
73507
|
const configuredHome = catalogueEnv.CODEX_HOME;
|
|
73267
|
-
const home = configuredHome === void 0 || configuredHome === "" ? import_node_path58.default.join(
|
|
73508
|
+
const home = configuredHome === void 0 || configuredHome === "" ? import_node_path58.default.join(import_node_os14.default.homedir(), ".codex") : configuredHome;
|
|
73268
73509
|
const source = definition.codex?.login === "chatgpt-sign-in" ? paths.chatgptSignInFile : import_node_path58.default.resolve(home, "auth.json");
|
|
73269
73510
|
const revision = params.fs.fileRevision?.(source);
|
|
73270
73511
|
if (binding === void 0 || binding.fingerprint !== cache.credentialFingerprint || binding.source !== source || revision === void 0 || revision !== binding.revision) return [];
|
|
73271
73512
|
}
|
|
73272
|
-
const fingerprint = definition.kind === "codex" && !readOnly ? savedCatalogueFingerprint(definition, paths, catalogueEnv,
|
|
73513
|
+
const fingerprint = definition.kind === "codex" && !readOnly ? savedCatalogueFingerprint(definition, paths, catalogueEnv, import_node_os14.default.homedir(), params.fs.readFileUtf8) : void 0;
|
|
73273
73514
|
if (definition.kind === "codex" && !readOnly && cache !== void 0 && (fingerprint === void 0 || cache.credentialFingerprint !== fingerprint)) return [];
|
|
73274
73515
|
return [[name, definition, cache?.models ?? []]];
|
|
73275
73516
|
} catch {
|
|
@@ -73537,12 +73778,12 @@ function runLaunchPlan(plan, spawn10) {
|
|
|
73537
73778
|
function runLauncher(params) {
|
|
73538
73779
|
params.proc.exit(runLaunchPlan(prepareLaunch(params), params.spawn));
|
|
73539
73780
|
}
|
|
73540
|
-
var import_node_crypto25,
|
|
73781
|
+
var import_node_crypto25, import_node_os14, import_node_util6, import_node_path58;
|
|
73541
73782
|
var init_launcher = __esm({
|
|
73542
73783
|
"src/launcher.ts"() {
|
|
73543
73784
|
"use strict";
|
|
73544
73785
|
import_node_crypto25 = require("node:crypto");
|
|
73545
|
-
|
|
73786
|
+
import_node_os14 = __toESM(require("node:os"), 1);
|
|
73546
73787
|
init_catalogueCredential();
|
|
73547
73788
|
import_node_util6 = require("node:util");
|
|
73548
73789
|
import_node_path58 = __toESM(require("node:path"), 1);
|
|
@@ -73568,6 +73809,7 @@ var init_launcher = __esm({
|
|
|
73568
73809
|
init_state();
|
|
73569
73810
|
init_providerCatalogue();
|
|
73570
73811
|
init_providersStore();
|
|
73812
|
+
init_memberProvider();
|
|
73571
73813
|
init_pool();
|
|
73572
73814
|
init_resumeContext();
|
|
73573
73815
|
init_lock();
|
|
@@ -73647,7 +73889,7 @@ var init_replayRun = __esm({
|
|
|
73647
73889
|
|
|
73648
73890
|
// src/launchWiring.ts
|
|
73649
73891
|
function buildFarmRuntime(paths, cwd, run = realRunPort) {
|
|
73650
|
-
const home =
|
|
73892
|
+
const home = import_node_os15.default.homedir();
|
|
73651
73893
|
const read = cosmiconfigReader();
|
|
73652
73894
|
const classification = loadClassification(paths);
|
|
73653
73895
|
const loaded = loadCascadeInput({ paths, home, cwd, read });
|
|
@@ -73700,6 +73942,7 @@ function realPrepareLaunchParams(paths, options) {
|
|
|
73700
73942
|
credentials: { ...realCredentialPort, cache: realCredentialCacheEnv(paths) },
|
|
73701
73943
|
hold: realHoldPort,
|
|
73702
73944
|
hasStoredLogin: (identity) => identitySignIn(realFarmFs, { platform: process.platform, run: options.run ?? realRunPort }, { farmRoot: import_node_path59.default.join(paths.identitiesDir, identity), hasCredentialBlock: false, provider: void 0 }).state !== "signed-out",
|
|
73945
|
+
hasUsableLogin: (identity, claudeBin) => storedLoginUsable(options.run ?? realRunPort, claudeBin, import_node_path59.default.join(paths.identitiesDir, identity), options.proc.env),
|
|
73703
73946
|
...farm.directoryIdentity === void 0 ? {} : { directoryPinnedIdentity: farm.directoryIdentity },
|
|
73704
73947
|
...farm.directoryConfigProfile === void 0 ? {} : { directoryRuleConfigProfile: farm.directoryConfigProfile },
|
|
73705
73948
|
...farm.globalDefaultConfigProfile === void 0 ? {} : { globalDefaultConfigProfile: farm.globalDefaultConfigProfile },
|
|
@@ -73741,11 +73984,11 @@ function resolveClaudeLaunch(options, run = realRunPort) {
|
|
|
73741
73984
|
async function resolveClaudeLaunchAsync(options, runAsync2 = realRunAsync) {
|
|
73742
73985
|
return await resolveWithAsyncRuns((run) => resolveClaudeLaunch(options, run), runAsync2);
|
|
73743
73986
|
}
|
|
73744
|
-
var
|
|
73987
|
+
var import_node_os15, import_node_path59, import_node_crypto26, LaunchRefusedError;
|
|
73745
73988
|
var init_launchWiring = __esm({
|
|
73746
73989
|
"src/launchWiring.ts"() {
|
|
73747
73990
|
"use strict";
|
|
73748
|
-
|
|
73991
|
+
import_node_os15 = __toESM(require("node:os"), 1);
|
|
73749
73992
|
import_node_path59 = __toESM(require("node:path"), 1);
|
|
73750
73993
|
import_node_crypto26 = require("node:crypto");
|
|
73751
73994
|
init_cliError();
|
|
@@ -89691,7 +89934,7 @@ async function l3e(e10, t10, n10, r10) {
|
|
|
89691
89934
|
if (d.length === 0) return [];
|
|
89692
89935
|
return qR(Buffer.from(b3(d)), { limit: r10.limit, offset: r10.offset }, l, c10);
|
|
89693
89936
|
}
|
|
89694
|
-
var import_node_module, import_crypto, import_path, import_node_fs22, import_node_process4, import_fs, import_os, import_path2, qS, import_fs2, import_promises, import_path3, import_promises2, import_path4, import_os2, import_path5, Ee, import_promises3, we, import_promises4, import_fs3, import_promises5, import_os3, import_path6, import_promises6, import_os4, import_node_path60, import_node_os15, import_node_process5, import_path7, import_events, import_fs4, import_promises7, import_path8, import_child_process, import_util9, import_fs5, import_path9, import_child_process2, import_fs6, import_path10, import_path11, import_crypto2, import_fs7, import_path12, import_promises8, import_path13, import_path14, import_promises9, import_path15, import_path16, import_fs8, import_promises10, import_path17, import_crypto3, import_path18, import_async_hooks, import_fs9, import_promises11, import_crypto4, import_fs10, import_promises12, import_path19, import_promises13, import_path20, import_crypto5, import_path21, import_path22, import_promises14, import_path23, import_path24, import_async_hooks2, import_buffer, import_promises15, import_fs11, import_promises16, import_path25, import_util10, import_path26, import_os5, import_path27, import_path28, import_crypto6, import_fs12, import_crypto7, import_path29, import_path30, import_path31, import_net, import_os6, import_child_process3, import_fs13, import_child_process4, import_crypto8, import_promises17, import_module, import_os7, import_path32, import_url, import_events2, import_child_process5, import_fs14, import_readline, import_string_decoder, import_fs15, import_promises18, import_os8, import_path33, import_crypto9, import_os9, import_fs16, import_path34, import_crypto10, import_fs17, import_promises19, import_path35, k3, P3, qy, I3, qv, L3, M3, Zv, Q, N3, Ar, $3, z3, H3, ft, mt, Qd, IT, ve, Fe, Yo, tp, aH, zT, HT, np, TH, gr, UH, zH, VT, BH, rp, op, Rh, sp, wh, Ej, tO, Pj, Uj, zj, Yj, Xj, nB, oB, iB, lB, dB, mB, yB, EB, AB, TB, Nh, kB, DB, NB, FB, iO, aO, qB, QB, tK, lK, dK, lO, hK, yK, bK, RK, wK, kK, DK, NK, FK, zK, jK, GK, VK, JK, e1, t1, uO, p1, g1, S1, Rf, Of, ob, sb, _b, yb, Eb, bb, Cb, Ab, C_, Jv, B3, K3, f3e, G3, ek, Kr, gs, Z3, Y3, tk, nk, rk, ok, hs, sk, ik, ak, lk, sJ, gf, iJ, aJ, Pt, lJ, qt, ck, cJ, uJ, su, uk, pJ, fJ, dk, gJ, hJ, pk, Vn, xt, SJ, EJ, bJ, CJ, Da, RJ, hf, fk, mk, OJ, wJ, Oo, vJ, kJ, PJ, IJ, DJ, LJ, MJ, gk, hk, Dn, $J, _s, zJ, wo, _k, yk, BJ, KJ, GJ, Sk, VJ, qJ, Ek, YJ, bk, Jy, Ck, Ak, ys, Rk, Tk, Ok, wk, Pi, s5, xk, Gr, a5, vk, kk, yf, Pk, Sf, p5, f5, Ef, g5, Ua, Ik, Fa, y5, S5, E5, b5, C5, A5, R5, T5, O5, w5, x5, v5, k5, Dk, Xy, Lk, $a, D5, et, bf, Mk, Cf, U5, F5, Nk, $5, za, Uk, $t, j5, Qy, Fk, K5, G5, W5, xo, $k, jk, zk, q5, Hk, Z5, Y5, Wr, J5, X5, Ss, eX, Ha, nX, rX, oX, sX, iX, aX, lX, cX, uX, dX, pX, fX, mX, gX, hX, _X, yX, SX, EX, bX, CX, AX, RX, TX, ot, Bk, ja, Kk, iu, xX, eS, vX, Vr, Gk, kX, Ba, PX, IX, wf, LX, Ka, xf, UX, Wk, FX, $X, Vk, qr, Zr, au, KX, GX, WX, qk, qX, vf, ZX, kf, YX, Es, JX, Pf, Zk, XX, Yk, Jk, Xk, Qk, QX, e8, t8, n8, r8, Ii, vo, o8, eP, tP, If, s8, nP, rP, Ga, Zt, l8, ke, sP, Di, tS, nS, oS, iS, bs, dP, aS, mP, uS, pS, _8, fS, mS, gS, hS, _S, yS, SS, ES, bS, CS, AS, RS, TS, OS, _P, wS, yP, xS, S8, E8, vS, kS, PS, IS, DS, LS, MS, NS, US, FS, $S, Pe, SP, b8, nQe, mn, A8, Nf, qa, w8, GS, TP, P8, zP, HP, Ff, $f, M8, jP, BP, xQe, vP, N8, WS, F8, DP, K8, eE, G8, nE, W8, WP, VP, mu, Ts, JP, QP, V8, rE, oE, sE, iE, nI, aE, lE, cE, uE, dE, pE, fE, mE, gE, hE, aI, ott, stt, itt, att, ltt, Y8, Zf, SE, pI, EE, bE, mI, Q8, t7, _I, hI, s7, gu, i7, a7, l7, It, d7, p7, AI, Qtt, m7, Ht, ze, k7, Qa, L7, Or, rm, om, IE, LE, Ent, MI, V7, q7, ME, Z7, Y7, J7, NE, nl, UE, UI, FI, sQ, GI, am, BI, iQ, lQ, uQ, YI, wr, Au, JI, rl, Dnt, Lnt, HE, Mnt, Nnt, Unt, Fnt, Cu, $nt, dQ, pQ, fQ, ZI, znt, Hnt, gQ, bQ, CQ, AQ, RQ, TQ, OQ, cD, wQ, xQ, vQ, kQ, PQ, IQ, DQ, LQ, iD, ED, il, Ui, pD, fD, hm, vs, nrt, rrt, HQ, mD, ym, jQ, BQ, KQ, GQ, WQ, cr, xr, VQ, bD, JE, CD, WE, VE, AD, RD, xs, qQ, ZQ, TD, xu, qE, gD, XE, OD, YQ, YE, BE, hD, KE, tee, nee, see, iee, vD, aee, ort, srt, lee, cee, _m, dee, PD, irt, art, pee, nb, hee, _ee, LD, yee, See, Eee, MD, bee, Aee, Tee, HD, jD, xee, vu, Fi, Iee, rb, Mee, Nee, Uee, Fee, $ee, u4, zee, Hee, jee, Bee, Kee, Gee, Wee, Vee, qee, Zee, Yee, Jee, Xee, Qee, ete, tte, nte, rte, ote, ste, ite, ate, lte, cte, ute, dte, pte, fte, mte, gte, hte, _te, yte, Ste, Ete, bte, Cte, Ate, Rte, Tte, Ote, wte, xte, vte, kte, Pte, Ite, Dte, Lte, Mte, Nte, Ute, Fte, $te, zte, Hte, jte, Bte, Kte, Gte, Wte, Vte, qte, Zte, Yte, Jte, Xte, Qte, ene, tne, nne, rne, one, sne, ine, ane, lne, cne, une, dne, pne, fne, mne, gne, hne, _ne, yne, Sne, Ene, bne, Cne, Ane, Rne, Tne, One, wne, xne, vne, kne, Pne, Ine, Dne, Lne, Mne, Nne, Une, Fne, $ne, zne, Hne, jne, Bne, Kne, Gne, Wne, Vne, qne, Zne, Yne, Jne, Xne, Qne, ere, tre, nre, rre, ore, sre, ire, are, lre, ZD, ure, Wrt, VD, dre, fre, XD, Sm, Zrt, Yrt, ul, Jrt, Xrt, Qrt, eot, QD, eL, ab, tL, gre, nL, rL, oL, hre, lb, cb, ub, _re, sL, iL, yre, rot, Sre, oot, Ere, bre, aL, sot, Cre, Are, Rre, Tre, Ore, wre, xre, iot, Ps, pb, dl, vre, kre, Pre, yot, Nre, Cot, Fre, $re, dL, uL, zre, mL, jre, _L, yL, AL, roe, TL, OL, poe, Iu, ml, moe, goe, hoe, _oe, yoe, Soe, Eoe, boe, Coe, Aoe, Roe, Toe, Ooe, woe, xoe, voe, koe, Poe, Ioe, Doe, Loe, Moe, Noe, Uoe, Foe, $oe, zoe, Hoe, joe, Boe, Koe, Goe, Woe, Voe, qoe, Zoe, Yoe, Joe, Xoe, Qoe, ese, tse, nse, rse, ose, sse, ise, ase, lse, cse, use, dse, pse, fse, mse, gse, hse, _se, yse, Sse, Ese, bse, Cse, Ase, Rse, Tse, Ose, wse, xse, vse, kse, Pse, Ise, Dse, Lse, Mse, Nse, Use, Fse, $se, zse, Hse, jse, Bse, Kse, Gse, Wse, Vse, qse, Zse, Yse, Jse, Xse, Qse, eie, tie, nie, rie, oie, sie, iie, aie, lie, cie, uie, die, pie, fie, mie, gie, hie, _ie, yie, Sie, Eie, bie, Cie, Aie, Rie, Tie, Oie, wie, xie, vie, kie, Pie, Iie, Die, Lie, Mie, Nie, Uie, Fie, $ie, zie, Hie, jie, Bie, Kie, Gie, Wie, Vie, qie, Zie, Yie, Jie, Xie, Qie, eae, tae, nae, rae, oae, sae, iae, aae, lae, cae, uae, dae, pae, fae, mae, gae, hae, _ae, yae, Sae, Eae, bae, Cae, Aae, Rae, Tae, Oae, wae, xae, vae, kae, Pae, Iae, Dae, Lae, Mae, Nae, Uae, Fae, $ae, zae, Hae, jae, Bae, Kae, Gae, Wae, Vae, qae, Zae, Yae, Jae, Xae, Qae, ele, tle, nle, rle, ole, sle, ile, ale, lle, cle, ule, dle, ple, fle, mle, gle, hle, _le, yle, Sle, Ele, ble, Cle, Ale, Rle, Tle, Ole, wle, xle, vle, kle, Ple, Ile, Dle, Lle, Mle, Nle, Ule, Fle, $le, zle, Hle, jle, Ble, Kle, Gle, Wle, Vle, qle, Zle, Yle, Jle, Xle, Qle, ece, tce, nce, rce, oce, sce, ice, ace, lce, cce, uce, dce, pce, fce, mce, gce, hce, _ce, yce, Sce, Ece, bce, Cce, Ace, Rce, Tce, Oce, wce, xce, vce, kce, Pce, Ice, Dce, Lce, Mce, Nce, Uce, Fce, $ce, zce, Hce, jce, Bce, Kce, Gce, Wce, Vce, qce, Zce, Yce, Jce, Xce, Qce, eue, tue, nue, rue, oue, sue, iue, aue, lue, cue, uue, due, pue, fue, mue, gue, hue, _ue, yue, Sue, Eue, bue, Cue, Aue, Rue, Tue, Oue, wue, xue, vue, kue, Pue, Iue, Due, Lue, Mue, Nue, Uue, Fue, $ue, zue, Hue, jue, Bue, Kue, Gue, Wue, Vue, que, Zue, Yue, Jue, Xue, Que, ede, tde, nde, rde, ode, sde, ide, ade, lde, cde, ude, dde, pde, fde, mde, gde, hde, _de, yde, Sde, Ede, bde, Cde, Ade, Rde, Tde, Ode, wde, xde, vde, kde, Pde, Ide, Dde, Lde, Mde, Nde, Ude, Fde, $de, zde, Hde, jde, Bde, Kde, Gde, Wde, Vde, qde, Zde, Yde, Jde, Xde, Qde, epe, tpe, npe, rpe, ope, spe, ipe, ape, lpe, cpe, upe, dpe, ppe, fpe, mpe, gpe, hpe, _pe, ype, Spe, Epe, bpe, Cpe, Ape, Rpe, Tpe, Ope, wpe, xpe, vpe, kpe, Ppe, Ipe, Dpe, Lpe, Mpe, Npe, Upe, Fpe, $pe, zpe, Hpe, jpe, Bpe, Kpe, Gpe, Wpe, Vpe, qpe, Zpe, Ype, Jpe, Xpe, Qpe, efe, tfe, nfe, rfe, ofe, sfe, ife, afe, lfe, cfe, ufe, dfe, pfe, ffe, mfe, gfe, hfe, _fe, yfe, Sfe, Efe, bfe, Cfe, Afe, Rfe, Tfe, Ofe, wfe, xfe, vfe, kfe, Pfe, Ife, Dfe, Lfe, Mfe, Nfe, Ufe, Ffe, $fe, zfe, Hfe, jfe, Bfe, Kfe, Gfe, Wfe, Vfe, qfe, Zfe, Yfe, Jfe, Xfe, Qfe, eme, tme, nme, rme, ome, sme, ime, ame, lme, cme, ume, dme, pme, fme, mme, gme, hme, _me, yme, Sme, Eme, bme, Cme, Ame, Rme, Tme, Ome, wme, xme, vme, kme, Pme, Ime, Dme, Lme, Mme, Nme, Ume, Fme, $me, zme, Hme, jme, Bme, Kme, Gme, Wme, Vme, qme, Zme, Yme, Jme, Xme, Qme, ege, tge, nge, rge, oge, sge, ige, age, lge, cge, uge, dge, pge, fge, mge, gge, hge, _ge, yge, Sge, Ege, bge, Cge, Age, Rge, Tge, Oge, wge, xge, vge, kge, Pge, Ige, Dge, Lge, Mge, Sb, Nge, Uge, Fge, $ge, zge, Hge, jge, Bge, Kge, Gge, Wge, Vge, qge, Zge, Yge, Jge, Xge, Qge, ehe, the, nhe, rhe, ohe, she, ihe, ahe, lhe, che, uhe, dhe, phe, fhe, mhe, ghe, hhe, _he, yhe, She, Ehe, bhe, Che, Ahe, Rhe, The, Ohe, whe, xhe, vhe, khe, Phe, Ihe, Dhe, Lhe, Mhe, Nhe, Uhe, Fhe, $he, zhe, Hhe, jhe, Bhe, Khe, Ghe, Whe, Vhe, qhe, Zhe, Yhe, Jhe, Xhe, Qhe, e_e, t_e, n_e, r_e, o_e, s_e, i_e, a_e, l_e, c_e, u_e, d_e, p_e, f_e, m_e, g_e, h_e, __e, y_e, S_e, E_e, b_e, C_e, A_e, R_e, T_e, O_e, w_e, x_e, v_e, k_e, P_e, I_e, D_e, L_e, M_e, N_e, U_e, F_e, $_e, z_e, H_e, j_e, B_e, K_e, G_e, W_e, V_e, q_e, Z_e, Y_e, J_e, X_e, Q_e, eye, tye, nye, rye, oye, sye, iye, aye, lye, cye, uye, dye, pye, fye, mye, gye, hye, _ye, yye, Sye, Eye, bye, Cye, Aye, Rye, Tye, Oye, wye, xye, vye, kye, Pye, Iye, Dye, Lye, Mye, Nye, Uye, Fye, $ye, zye, Hye, jye, Bye, Kye, Gye, Wye, Vye, qye, Zye, Yye, Jye, Xye, Qye, eSe, tSe, nSe, rSe, oSe, sSe, iSe, aSe, lSe, cSe, uSe, dSe, pSe, fSe, mSe, gSe, hSe, _Se, ySe, SSe, ESe, bSe, CSe, ASe, RSe, TSe, OSe, wSe, xSe, vSe, kSe, PSe, ISe, DSe, LSe, MSe, NSe, USe, FSe, $Se, zSe, HSe, jSe, BSe, KSe, GSe, WSe, VSe, qSe, ZSe, YSe, JSe, XSe, QSe, eEe, tEe, nEe, rEe, oEe, sEe, iEe, aEe, lEe, cEe, uEe, dEe, pEe, fEe, mEe, gEe, hEe, _Ee, yEe, SEe, EEe, bEe, CEe, AEe, REe, TEe, OEe, wEe, xEe, vEe, kEe, PEe, IEe, DEe, LEe, MEe, NEe, UEe, FEe, $Ee, zEe, HEe, jEe, BEe, KEe, GEe, WEe, VEe, qEe, ZEe, YEe, JEe, XEe, QEe, ebe, tbe, nbe, rbe, obe, sbe, ibe, abe, lbe, cbe, ube, dbe, pbe, fbe, mbe, gbe, hbe, _be, ybe, Sbe, Ebe, bbe, Cbe, Abe, Rbe, Tbe, Obe, wbe, xbe, vbe, kbe, Pbe, Ibe, Dbe, Lbe, Mbe, Nbe, Ube, Fbe, $be, zbe, Hbe, jbe, Bbe, Kbe, Gbe, Wbe, Vbe, qbe, Zbe, Ybe, Jbe, Xbe, Qbe, eCe, tCe, nCe, rCe, oCe, sCe, iCe, aCe, lCe, cCe, uCe, dCe, pCe, fCe, mCe, gCe, hCe, _Ce, yCe, SCe, ECe, bCe, CCe, ACe, RCe, TCe, OCe, wCe, xCe, vCe, kCe, PCe, ICe, DCe, LCe, MCe, NCe, UCe, FCe, $Ce, zCe, HCe, jCe, BCe, KCe, GCe, WCe, VCe, qCe, ZCe, YCe, JCe, XCe, QCe, eAe, tAe, vL, kL, nAe, rAe, oAe, sAe, iAe, aAe, lAe, cAe, uAe, dAe, pAe, fAe, mAe, gAe, hAe, _Ae, yAe, SAe, EAe, bAe, CAe, AAe, RAe, TAe, OAe, wAe, xAe, vAe, kAe, PAe, IAe, DAe, LAe, MAe, NAe, UAe, FAe, $Ae, zAe, HAe, jAe, BAe, KAe, GAe, WAe, VAe, qAe, ZAe, YAe, JAe, XAe, QAe, eRe, tRe, nRe, rRe, oRe, sRe, iRe, aRe, lRe, cRe, uRe, dRe, pRe, fRe, mRe, gRe, hRe, _Re, yRe, SRe, ERe, bRe, CRe, ARe, TRe, ORe, wRe, on, vRe, oit, kRe, sit, PRe, DL, IRe, DRe, NL, KRe, GRe, WRe, XRe, Sn, oTe, sTe, $L, Vit, qit, Uo, oM, sM, mTe, Tm, gTe, Nu, hTe, _Te, lM, uM, STe, Ib, ETe, bTe, Jit, gM, fM, Mb, CM, AM, Pm, Ub, ATe, Db, Ds, TTe, OTe, UM, jb, FM, to, Wu, bn, kTe, Kb, $M, zM, HM, Vu, qu, Vb, Zu, qb, Yu, Ju, Xu, Qu, DTe, LTe, Nm, Um, BM, KM, GM, WM, VM, qM, ZM, YM, JM, XM, QM, eN, tN, nN, oN, sN, Yb, iN, NTe, lN, cN, uN, dN, pN, fN, mN, gN, hN, _N, EN, Jb, ed, bN, CN, AN, RN, TN, jt, Xb, Fm, Qb, eC, ON, wN, xN, vN, kN, td, PN, IN, DN, LN, MN, NN, UN, tC, Ir, Be, ZN, nd, tt, oC, sC, iC, YN, JN, zTe, aC, lC, cC, uC, dC, pC, fC, mC, XN, QN, eU, tU, gC, KTe, hC, _C, yC, SC, EC, Hm, bC, CC, AC, jm, RC, TC, OC, wC, xC, vC, kC, qTe, PC, iU, Bm, IC, DC, LC, MC, NC, UC, Km, FC, $C, zC, HC, jC, BC, Gm, aU, KC, GC, WC, lU, uU, qC, cU, pU, rd, qm, od, Wm, Vm, XTe, eOe, fU, mU, Dr, CU, SU, AU, ld, Cl, Al, RU, vU, kU, PU, IU, TU, OU, wU, rOe, oOe, sOe, DU, VA, qA, ZA, LU, MU, YA, JA, NU, XA, UU, QA, FU, eR, tR, $U, zU, HU, jU, nR, BU, rR, KU, GU, oR, sR, iOe, iR, aR, WU, WA, lR, cR, uR, dR, pR, fR, mR, gR, hR, qU, ng, _R, xU, YU, mOe, Jn, JU, XU, QU, e0, t0, n0, r0, o0, s0, i0, a0, l0, Ze, d0, bR, yt, CR, p0, f0, m0, swe, iwe, og, awe, lwe, cwe, uwe, dwe, pwe, fwe, mwe, gwe, hwe, _we, ywe, Swe, Ewe, bwe, Cwe, AR, Awe, g0, Rwe, Twe, Owe, wwe, xwe, fd, h0, vwe, kwe, SR, ER, Pwe, Iwe, Tl, S0, Lwe, Mwe, Uwe, E0, lg, md, Hwe, jwe, Kwe, b0, ur, C0, O0, Zwe, Ywe, exe, txe, nxe, dg, sxe, Lt, cxe, Yi, M0, bct, F0, $0, z0, H0, gxe, hxe, j0, _xe, yxe, B0, Sxe, Exe, G0, Txe, W0, wxe, q0, xxe, vxe, fg, Z0, X0, Pxe, Q0, Dxe, Mxe, Uxe, Fxe, _d, eF, nF, rF, Gxe, N0, Wxe, Vxe, qxe, Jxe, Qxe, cF, uF, EF, Aut, bF, Ave, wve, OF, Lve, Mve, bd, Uve, wF, Hve, Vve, eke, oke, $F, ike, ake, Gdt, cke, fke, jR, HR, UF, WF, Ike, Mke, JF, Zke, Qke, ePe, tPe, rPe, Ne, p$, ee, Ko, F, Xn, aPe, Us, lPe, Tg, _n, _e, kl, Cn, YR, JR, Xi, wd, ae, Mr, f$, De, cPe, uPe, dPe, pPe, fPe, mPe, gPe, hPe, _Pe, XR, yPe, SPe, EPe, bPe, CPe, APe, m$, RPe, Wo, Il, Dl, Og, vd, wg, kd, Pd, xg, Qi, Vo, vg, no, bt, Id, Go, eT, Dd, qo, kg, Pg, Ll, xd, Ld, Md, ea, Nd, Ml, oo, ro, Fs, Ud, Fd, Ig, tT, Dg, $d, nft, j, rft, oft, sft, ift, aft, lft, cft, uft, dft, pft, fft, mft, gft, hft, _$, _ft, yft, Sft, Eft, bft, Cft, Aft, Rft, Tft, Oft, wft, xft, vft, kft, Pft, Ift, Dft, Lft, Mft, IPe, DPe, rT, E$, js, Fg, Gt, b$, C$, nmt, MPe, NPe, oT, Qn, zd, A$, ln, pr, fr, cn, $g, R$, sT, T$, O$, iT, Hd, ue, aT, w$, rmt, omt, zg, UPe, Hg, FPe, jd, Nl, x$, $Pe, zPe, HPe, jPe, BPe, KPe, lT, GPe, WPe, cT, jg, VPe, qPe, Bg, ZPe, Bd, Kd, YPe, Gd, Ul, JPe, Wd, Kg, Gg, Wg, smt, Vg, qg, Zg, v$, k$, P$, uT, I$, Vd, Fl, D$, XPe, Yg, QPe, Jg, eIe, dT, tIe, Xg, nIe, rIe, oIe, sIe, iIe, aIe, lIe, cIe, uIe, dIe, Qg, pIe, fIe, eh, pT, fT, mT, mIe, gIe, hIe, gT, _Ie, yIe, SIe, EIe, bIe, L$, th, CIe, nh, imt, AIe, $l, RIe, amt, qd, TIe, hT, OIe, wIe, xIe, vIe, kIe, PIe, IIe, Ug, DIe, LIe, MIe, Zd, _T, NIe, UIe, FIe, $Ie, zIe, HIe, jIe, BIe, KIe, GIe, WIe, VIe, qIe, ZIe, YIe, JIe, XIe, QIe, zl, eDe, tDe, nDe, rh, rDe, oDe, sDe, yT, iDe, lmt, cmt, umt, dmt, pmt, fmt, le, U$, $$, F$, z$, H$, oh, G$, aDe, lDe, bT, Nr, cDe, Yd, nz, az, lz, mz, gz, fDe, mDe, AT, hDe, OT, E1, b1, SO, EO, bO, T1, R1, tze, RO, OO, oze, up, aze, Xo, fze, mze, wO, gze, Eze, bze, Cze, Aze, Rze, P1, $1, Oze, wze, xze, vze, Ae, kze, e_, la, MO, es, j1, B1, K1, G1, W1, V1, NO, UO, kO, L1, Nze, Uze, $ze, q1, PO, Qh, DO, LO, Hze, jze, M1, ui, Y1, Vze, FO, J1, tG, qze, nG, rG, oG, sG, Zze, zO, X1, HO, iG, aG, lG, cG, uG, t_, tr, lc, rHe, cc, sHe, dG, pG, mG, gG, aHe, hG, uHe, yG, fHe, pp, CG, gHe, $r, RG, yHe, SHe, TG, n_, OG, r_, wG, THe, OHe, dc, xHe, xG, kHe, PHe, IHe, vG, Sr, LHe, nr, pi, kG, PG, IG, o_, HHe, jHe, DG, pc, LG, MG, NG, So, ZHe, fc, fi, JHe, XHe, mc, UG, s_, nje, gc, rje, oje, i_, FG, ije, aje, $G, Eo, hc, a_, fje, XCt, BG, gje, WG, Aje, ZG, kje, Pje, JG, XG, QG, eW, yc, nW, KO, rW, c_, tW, Fje, gi, oW, mp, Sc, u_, $je, aW, sW, ca, gW, Zje, EW, Jje, bW, p_, CW, BRt, nBe, AW, RW, wW, oBe, iBe, KRt, gp, hp, bo, Ec, xW, g_, cBe, uBe, IW, pBe, y_, S_, E_, _p, NW, DW, hBe, LW, MW, yp, bc, A_, R_, UW, bBe, FW, T_, $W, RBe, TBe, OBe, zW, wBe, xBe, O_, Sp, Er, HW, jW, KW, GW, WW, w_, VW, UBe, qW, FBe, $Be, zBe, ZW, jBe, x_, YW, JW, XW, WBe, un, QW, eV, tV, nV, rV, XBe, QBe, oV, sV, nKe, iV, aV, lV, cV, sKe, iKe, aKe, lKe, cKe, uKe, dKe, pKe, fKe, mKe, gKe, hKe, _Ke, yKe, SKe, EKe, bKe, CKe, AKe, uV, TKe, dV, pV, wKe, fV, xKe, mV, gV, kKe, hV, PKe, IKe, DKe, _V, LKe, MKe, NKe, UKe, yV, FKe, $Ke, zKe, SV, HKe, jKe, BKe, KKe, GKe, WKe, VKe, qKe, ZKe, YKe, JKe, XKe, QKe, e1e, t1e, n1e, nt, EV, bV, CV, AV, i1e, a1e, k_, RV, TV, OV, xV, vV, P_, f1e, m1e, g1e, h1e, Tn, kV, PV, S1e, IV, DV, LV, C1e, MV, NV, R1e, _i, UV, O1e, FV, da, $V, zV, HV, jV, BV, KV, GV, N1e, U1e, WV, F1e, VV, qV, H1e, ZV, j1e, Ep, Y1e, eGe, s2, rw, tGe, nGe, rGe, ow, oGe, sGe, iGe, aGe, lGe, cGe, uGe, dGe, pGe, _Ge, yGe, SGe, AGe, p2, f2, Cc, m2, OGe, L_, Ap, kGe, PGe, IGe, DGe, LGe, vkt, MGe, iw, NGe, UGe, FGe, os15, Ac, U_, b2, C2, $Ge, zGe, HGe, jGe, F_, Rc, $_, yi, aw, z_, H_, BGe, KGe, lw, pa, WGe, O2, Fkt, $kt, w2, x2, v2, k2, VGe, P2, I22, D2, L2, qGe, ZGe, cw, YGe, N2, XGe, QGe, Xkt, U2, F2, rPt, oPt, kPt, PPt, IPt, cWe, pWe, j_, nIt, rIt, fWe, wc, Si, mWe, G2, gWe, hWe, V2, _w, q2, _We, yWe, Z2, SWe, EWe, bWe, CWe, Sw, Ew, RWe, TWe, bw, OWe, K_, oIt, Op, wWe, xWe, cIt, vWe, kWe, AIt, PWe, IWe, RIt, LIt, MIt, J2, Rw, MWe, FWe, Q2, jWe, KWe, oq, wp, sq, G_, Tw, ga, VWe, lq, qWe, tDt, xp, ss, dq, On, aDt, lDt, cDt, ZWe, mq, JWe, xc, yq, Mw, eVe, kq, tVe, nVe, Pq, Iq, rVe, Fw, Dq, Lq, XDt, sVe, iVe, aVe, sr, _a3, Eq, bq, Pw, Iw, $w, zw, cVe, uVe, pVe, Hw, fVe, mVe, Z_, jw, Wn, hVe, QDt, Fq, _Ve, $q, zq, Hq, yVe, Bw, SVe, EVe, bVe, CVe, Kw, jq, Cq, AVe, Bq, Kq, Gq, Wq, Aq, RVe, TVe, Gw, Vq, OVe, wVe, xVe, qq, vVe, kVe, PVe, IVe, Zq, Yq, Jq, Xq, LVe, eLt, Qq, tZ, NVe, HVe, kp, Vw, tLt, nLt, rLt, BVe, qw, Y_, kw, iZ, KVe, WVe, aZ, VVe, qVe, ZVe, YVe, JVe, QVe, t2e, n2e, r2e, o2e, s2e, c2e, oLt, Dw, sLt, u2e, Tq, vc, iLt, aLt, uZ, d2e, p2e, f2e, lLt, m2e, g2e, cLt, uLt, h2e, dLt, X_, Pc, _2e, Yw, Q_, ELt, bLt, CLt, ey, y2e, E2e, tx, EZ, Mp, sy, A2e, pMt, R2e, T2e, ix, ax, lx, cx, iy, ay, MZ, O2e, w2e, I2e, M2e, N2e, bi, U2e, CZ, AZ, RZ, ry, UZ, F2e, $2e, z2e, H2e, j2e, B2e, K2e, G2e, yn, dx, nx, ny, ya, Z2e, fMt, J2e, Lp, TZ, X2e, OZ, Q2e, eqe, ly, tqe, wZ, fx, uy, Ci, KZ, Dc, Lc, nqe, dy, kZ, oqe, qZ, YZ, JZ, iqe, aqe, lqe, XZ, QZ, cqe, wMt, uqe, dqe, pqe, xMt, vMt, kMt, PMt, bx, Cx, fqe, mqe, IMt, Rx, nY, Tx, rY, oY, Ox, sY, iY, aY, lY, wx, _qe, ZMt, xx, yqe, vx, kx, Sqe, YMt, JMt, Eqe, Px, Ix, Dx, XMt, cY, bqe, Cqe, Aqe, Rqe, QMt, uY, dY, Lx, pY, fY, Tqe, Oqe, wqe, xqe, kqe, hY, Iqe, vNt, SY, $Nt, EY, my, Nx, Dqe, Lqe, Mqe, qNt, ZNt, bY, YNt, JNt, XNt, Nqe, cUt, CY, Mc, $qe, Up, zqe, kY, IY, Gqe, nZe, $Ut, sZe, iZe, BY, KY, GY, uZe, fZe, qY, XY, yZe, M0t, N0t, bZe, RZe, TZe, z0t, H0t, Y0t, s4, OZe, wZe, uFt, xZe, dFt, i4, a4, Hx, c4, u42, Ai, zZe, S4, yy, Sy, $p, Gx, E4, b4, C4, Ey, Ri, A4, wn, Kx, T4, ls, KZe, GZe, b$t, VZe, ZZe, XZe, eYe, pYe, I4, hYe, _Ye, N4, n9, $4, B4, xy, xYe, K4, Vp, Zx, V4, ZYe, JYe, sv, ba, y9, E9, r4e, iv, Uc, C9, o4e, c4e, O9, Oy, X4, x9, y4e, E4e, C4e, F9, M4e, H4e, Gc, B9, z9, j4e, K4e, V4e, q4e, t9e, Z9, n9e, r9e, o9e, s9e, l9e, CHt, c9e, AHt, RHt, u9e, THt, d9e, OHt, p9e, _v, f9e, xHt, J9, X9, m9e, Q9, e62, g9e, h9e, t6, n6, _9e, y9e, vHt, kHt, E9e, b9e, C9e, A9e, x9e, Sv, l6, v9e, c6, Iy, k9e, Cv, Vc, F9e, Ly, Av, f6, m6, g6, _6, y6, Rv, S6, E6, $9e, C6, My, qc, Ny, z9e, T6, cs, O6, w6, B9e, tf, nf, K9e, G9e, x6, vn, W9e, V9e, q9e, wi, Z9e, Y9e, k6, tBt, J9e, D6, L6, M6, X9e, Q9e, N6, e6e, t6e, Ov, n6e, Uy, wv, U6, xv, kv, r6e, H6, Pv, j6, Fy, $y, B6, MBt, o6e, s6e, Iv, q6, d6e, J6, YBt, O6e, k6e, P6e, $6e;
|
|
89937
|
+
var import_node_module, import_crypto, import_path, import_node_fs22, import_node_process4, import_fs, import_os, import_path2, qS, import_fs2, import_promises, import_path3, import_promises2, import_path4, import_os2, import_path5, Ee, import_promises3, we, import_promises4, import_fs3, import_promises5, import_os3, import_path6, import_promises6, import_os4, import_node_path60, import_node_os16, import_node_process5, import_path7, import_events, import_fs4, import_promises7, import_path8, import_child_process, import_util9, import_fs5, import_path9, import_child_process2, import_fs6, import_path10, import_path11, import_crypto2, import_fs7, import_path12, import_promises8, import_path13, import_path14, import_promises9, import_path15, import_path16, import_fs8, import_promises10, import_path17, import_crypto3, import_path18, import_async_hooks, import_fs9, import_promises11, import_crypto4, import_fs10, import_promises12, import_path19, import_promises13, import_path20, import_crypto5, import_path21, import_path22, import_promises14, import_path23, import_path24, import_async_hooks2, import_buffer, import_promises15, import_fs11, import_promises16, import_path25, import_util10, import_path26, import_os5, import_path27, import_path28, import_crypto6, import_fs12, import_crypto7, import_path29, import_path30, import_path31, import_net, import_os6, import_child_process3, import_fs13, import_child_process4, import_crypto8, import_promises17, import_module, import_os7, import_path32, import_url, import_events2, import_child_process5, import_fs14, import_readline, import_string_decoder, import_fs15, import_promises18, import_os8, import_path33, import_crypto9, import_os9, import_fs16, import_path34, import_crypto10, import_fs17, import_promises19, import_path35, k3, P3, qy, I3, qv, L3, M3, Zv, Q, N3, Ar, $3, z3, H3, ft, mt, Qd, IT, ve, Fe, Yo, tp, aH, zT, HT, np, TH, gr, UH, zH, VT, BH, rp, op, Rh, sp, wh, Ej, tO, Pj, Uj, zj, Yj, Xj, nB, oB, iB, lB, dB, mB, yB, EB, AB, TB, Nh, kB, DB, NB, FB, iO, aO, qB, QB, tK, lK, dK, lO, hK, yK, bK, RK, wK, kK, DK, NK, FK, zK, jK, GK, VK, JK, e1, t1, uO, p1, g1, S1, Rf, Of, ob, sb, _b, yb, Eb, bb, Cb, Ab, C_, Jv, B3, K3, f3e, G3, ek, Kr, gs, Z3, Y3, tk, nk, rk, ok, hs, sk, ik, ak, lk, sJ, gf, iJ, aJ, Pt, lJ, qt, ck, cJ, uJ, su, uk, pJ, fJ, dk, gJ, hJ, pk, Vn, xt, SJ, EJ, bJ, CJ, Da, RJ, hf, fk, mk, OJ, wJ, Oo, vJ, kJ, PJ, IJ, DJ, LJ, MJ, gk, hk, Dn, $J, _s, zJ, wo, _k, yk, BJ, KJ, GJ, Sk, VJ, qJ, Ek, YJ, bk, Jy, Ck, Ak, ys, Rk, Tk, Ok, wk, Pi, s5, xk, Gr, a5, vk, kk, yf, Pk, Sf, p5, f5, Ef, g5, Ua, Ik, Fa, y5, S5, E5, b5, C5, A5, R5, T5, O5, w5, x5, v5, k5, Dk, Xy, Lk, $a, D5, et, bf, Mk, Cf, U5, F5, Nk, $5, za, Uk, $t, j5, Qy, Fk, K5, G5, W5, xo, $k, jk, zk, q5, Hk, Z5, Y5, Wr, J5, X5, Ss, eX, Ha, nX, rX, oX, sX, iX, aX, lX, cX, uX, dX, pX, fX, mX, gX, hX, _X, yX, SX, EX, bX, CX, AX, RX, TX, ot, Bk, ja, Kk, iu, xX, eS, vX, Vr, Gk, kX, Ba, PX, IX, wf, LX, Ka, xf, UX, Wk, FX, $X, Vk, qr, Zr, au, KX, GX, WX, qk, qX, vf, ZX, kf, YX, Es, JX, Pf, Zk, XX, Yk, Jk, Xk, Qk, QX, e8, t8, n8, r8, Ii, vo, o8, eP, tP, If, s8, nP, rP, Ga, Zt, l8, ke, sP, Di, tS, nS, oS, iS, bs, dP, aS, mP, uS, pS, _8, fS, mS, gS, hS, _S, yS, SS, ES, bS, CS, AS, RS, TS, OS, _P, wS, yP, xS, S8, E8, vS, kS, PS, IS, DS, LS, MS, NS, US, FS, $S, Pe, SP, b8, nQe, mn, A8, Nf, qa, w8, GS, TP, P8, zP, HP, Ff, $f, M8, jP, BP, xQe, vP, N8, WS, F8, DP, K8, eE, G8, nE, W8, WP, VP, mu, Ts, JP, QP, V8, rE, oE, sE, iE, nI, aE, lE, cE, uE, dE, pE, fE, mE, gE, hE, aI, ott, stt, itt, att, ltt, Y8, Zf, SE, pI, EE, bE, mI, Q8, t7, _I, hI, s7, gu, i7, a7, l7, It, d7, p7, AI, Qtt, m7, Ht, ze, k7, Qa, L7, Or, rm, om, IE, LE, Ent, MI, V7, q7, ME, Z7, Y7, J7, NE, nl, UE, UI, FI, sQ, GI, am, BI, iQ, lQ, uQ, YI, wr, Au, JI, rl, Dnt, Lnt, HE, Mnt, Nnt, Unt, Fnt, Cu, $nt, dQ, pQ, fQ, ZI, znt, Hnt, gQ, bQ, CQ, AQ, RQ, TQ, OQ, cD, wQ, xQ, vQ, kQ, PQ, IQ, DQ, LQ, iD, ED, il, Ui, pD, fD, hm, vs, nrt, rrt, HQ, mD, ym, jQ, BQ, KQ, GQ, WQ, cr, xr, VQ, bD, JE, CD, WE, VE, AD, RD, xs, qQ, ZQ, TD, xu, qE, gD, XE, OD, YQ, YE, BE, hD, KE, tee, nee, see, iee, vD, aee, ort, srt, lee, cee, _m, dee, PD, irt, art, pee, nb, hee, _ee, LD, yee, See, Eee, MD, bee, Aee, Tee, HD, jD, xee, vu, Fi, Iee, rb, Mee, Nee, Uee, Fee, $ee, u4, zee, Hee, jee, Bee, Kee, Gee, Wee, Vee, qee, Zee, Yee, Jee, Xee, Qee, ete, tte, nte, rte, ote, ste, ite, ate, lte, cte, ute, dte, pte, fte, mte, gte, hte, _te, yte, Ste, Ete, bte, Cte, Ate, Rte, Tte, Ote, wte, xte, vte, kte, Pte, Ite, Dte, Lte, Mte, Nte, Ute, Fte, $te, zte, Hte, jte, Bte, Kte, Gte, Wte, Vte, qte, Zte, Yte, Jte, Xte, Qte, ene, tne, nne, rne, one, sne, ine, ane, lne, cne, une, dne, pne, fne, mne, gne, hne, _ne, yne, Sne, Ene, bne, Cne, Ane, Rne, Tne, One, wne, xne, vne, kne, Pne, Ine, Dne, Lne, Mne, Nne, Une, Fne, $ne, zne, Hne, jne, Bne, Kne, Gne, Wne, Vne, qne, Zne, Yne, Jne, Xne, Qne, ere, tre, nre, rre, ore, sre, ire, are, lre, ZD, ure, Wrt, VD, dre, fre, XD, Sm, Zrt, Yrt, ul, Jrt, Xrt, Qrt, eot, QD, eL, ab, tL, gre, nL, rL, oL, hre, lb, cb, ub, _re, sL, iL, yre, rot, Sre, oot, Ere, bre, aL, sot, Cre, Are, Rre, Tre, Ore, wre, xre, iot, Ps, pb, dl, vre, kre, Pre, yot, Nre, Cot, Fre, $re, dL, uL, zre, mL, jre, _L, yL, AL, roe, TL, OL, poe, Iu, ml, moe, goe, hoe, _oe, yoe, Soe, Eoe, boe, Coe, Aoe, Roe, Toe, Ooe, woe, xoe, voe, koe, Poe, Ioe, Doe, Loe, Moe, Noe, Uoe, Foe, $oe, zoe, Hoe, joe, Boe, Koe, Goe, Woe, Voe, qoe, Zoe, Yoe, Joe, Xoe, Qoe, ese, tse, nse, rse, ose, sse, ise, ase, lse, cse, use, dse, pse, fse, mse, gse, hse, _se, yse, Sse, Ese, bse, Cse, Ase, Rse, Tse, Ose, wse, xse, vse, kse, Pse, Ise, Dse, Lse, Mse, Nse, Use, Fse, $se, zse, Hse, jse, Bse, Kse, Gse, Wse, Vse, qse, Zse, Yse, Jse, Xse, Qse, eie, tie, nie, rie, oie, sie, iie, aie, lie, cie, uie, die, pie, fie, mie, gie, hie, _ie, yie, Sie, Eie, bie, Cie, Aie, Rie, Tie, Oie, wie, xie, vie, kie, Pie, Iie, Die, Lie, Mie, Nie, Uie, Fie, $ie, zie, Hie, jie, Bie, Kie, Gie, Wie, Vie, qie, Zie, Yie, Jie, Xie, Qie, eae, tae, nae, rae, oae, sae, iae, aae, lae, cae, uae, dae, pae, fae, mae, gae, hae, _ae, yae, Sae, Eae, bae, Cae, Aae, Rae, Tae, Oae, wae, xae, vae, kae, Pae, Iae, Dae, Lae, Mae, Nae, Uae, Fae, $ae, zae, Hae, jae, Bae, Kae, Gae, Wae, Vae, qae, Zae, Yae, Jae, Xae, Qae, ele, tle, nle, rle, ole, sle, ile, ale, lle, cle, ule, dle, ple, fle, mle, gle, hle, _le, yle, Sle, Ele, ble, Cle, Ale, Rle, Tle, Ole, wle, xle, vle, kle, Ple, Ile, Dle, Lle, Mle, Nle, Ule, Fle, $le, zle, Hle, jle, Ble, Kle, Gle, Wle, Vle, qle, Zle, Yle, Jle, Xle, Qle, ece, tce, nce, rce, oce, sce, ice, ace, lce, cce, uce, dce, pce, fce, mce, gce, hce, _ce, yce, Sce, Ece, bce, Cce, Ace, Rce, Tce, Oce, wce, xce, vce, kce, Pce, Ice, Dce, Lce, Mce, Nce, Uce, Fce, $ce, zce, Hce, jce, Bce, Kce, Gce, Wce, Vce, qce, Zce, Yce, Jce, Xce, Qce, eue, tue, nue, rue, oue, sue, iue, aue, lue, cue, uue, due, pue, fue, mue, gue, hue, _ue, yue, Sue, Eue, bue, Cue, Aue, Rue, Tue, Oue, wue, xue, vue, kue, Pue, Iue, Due, Lue, Mue, Nue, Uue, Fue, $ue, zue, Hue, jue, Bue, Kue, Gue, Wue, Vue, que, Zue, Yue, Jue, Xue, Que, ede, tde, nde, rde, ode, sde, ide, ade, lde, cde, ude, dde, pde, fde, mde, gde, hde, _de, yde, Sde, Ede, bde, Cde, Ade, Rde, Tde, Ode, wde, xde, vde, kde, Pde, Ide, Dde, Lde, Mde, Nde, Ude, Fde, $de, zde, Hde, jde, Bde, Kde, Gde, Wde, Vde, qde, Zde, Yde, Jde, Xde, Qde, epe, tpe, npe, rpe, ope, spe, ipe, ape, lpe, cpe, upe, dpe, ppe, fpe, mpe, gpe, hpe, _pe, ype, Spe, Epe, bpe, Cpe, Ape, Rpe, Tpe, Ope, wpe, xpe, vpe, kpe, Ppe, Ipe, Dpe, Lpe, Mpe, Npe, Upe, Fpe, $pe, zpe, Hpe, jpe, Bpe, Kpe, Gpe, Wpe, Vpe, qpe, Zpe, Ype, Jpe, Xpe, Qpe, efe, tfe, nfe, rfe, ofe, sfe, ife, afe, lfe, cfe, ufe, dfe, pfe, ffe, mfe, gfe, hfe, _fe, yfe, Sfe, Efe, bfe, Cfe, Afe, Rfe, Tfe, Ofe, wfe, xfe, vfe, kfe, Pfe, Ife, Dfe, Lfe, Mfe, Nfe, Ufe, Ffe, $fe, zfe, Hfe, jfe, Bfe, Kfe, Gfe, Wfe, Vfe, qfe, Zfe, Yfe, Jfe, Xfe, Qfe, eme, tme, nme, rme, ome, sme, ime, ame, lme, cme, ume, dme, pme, fme, mme, gme, hme, _me, yme, Sme, Eme, bme, Cme, Ame, Rme, Tme, Ome, wme, xme, vme, kme, Pme, Ime, Dme, Lme, Mme, Nme, Ume, Fme, $me, zme, Hme, jme, Bme, Kme, Gme, Wme, Vme, qme, Zme, Yme, Jme, Xme, Qme, ege, tge, nge, rge, oge, sge, ige, age, lge, cge, uge, dge, pge, fge, mge, gge, hge, _ge, yge, Sge, Ege, bge, Cge, Age, Rge, Tge, Oge, wge, xge, vge, kge, Pge, Ige, Dge, Lge, Mge, Sb, Nge, Uge, Fge, $ge, zge, Hge, jge, Bge, Kge, Gge, Wge, Vge, qge, Zge, Yge, Jge, Xge, Qge, ehe, the, nhe, rhe, ohe, she, ihe, ahe, lhe, che, uhe, dhe, phe, fhe, mhe, ghe, hhe, _he, yhe, She, Ehe, bhe, Che, Ahe, Rhe, The, Ohe, whe, xhe, vhe, khe, Phe, Ihe, Dhe, Lhe, Mhe, Nhe, Uhe, Fhe, $he, zhe, Hhe, jhe, Bhe, Khe, Ghe, Whe, Vhe, qhe, Zhe, Yhe, Jhe, Xhe, Qhe, e_e, t_e, n_e, r_e, o_e, s_e, i_e, a_e, l_e, c_e, u_e, d_e, p_e, f_e, m_e, g_e, h_e, __e, y_e, S_e, E_e, b_e, C_e, A_e, R_e, T_e, O_e, w_e, x_e, v_e, k_e, P_e, I_e, D_e, L_e, M_e, N_e, U_e, F_e, $_e, z_e, H_e, j_e, B_e, K_e, G_e, W_e, V_e, q_e, Z_e, Y_e, J_e, X_e, Q_e, eye, tye, nye, rye, oye, sye, iye, aye, lye, cye, uye, dye, pye, fye, mye, gye, hye, _ye, yye, Sye, Eye, bye, Cye, Aye, Rye, Tye, Oye, wye, xye, vye, kye, Pye, Iye, Dye, Lye, Mye, Nye, Uye, Fye, $ye, zye, Hye, jye, Bye, Kye, Gye, Wye, Vye, qye, Zye, Yye, Jye, Xye, Qye, eSe, tSe, nSe, rSe, oSe, sSe, iSe, aSe, lSe, cSe, uSe, dSe, pSe, fSe, mSe, gSe, hSe, _Se, ySe, SSe, ESe, bSe, CSe, ASe, RSe, TSe, OSe, wSe, xSe, vSe, kSe, PSe, ISe, DSe, LSe, MSe, NSe, USe, FSe, $Se, zSe, HSe, jSe, BSe, KSe, GSe, WSe, VSe, qSe, ZSe, YSe, JSe, XSe, QSe, eEe, tEe, nEe, rEe, oEe, sEe, iEe, aEe, lEe, cEe, uEe, dEe, pEe, fEe, mEe, gEe, hEe, _Ee, yEe, SEe, EEe, bEe, CEe, AEe, REe, TEe, OEe, wEe, xEe, vEe, kEe, PEe, IEe, DEe, LEe, MEe, NEe, UEe, FEe, $Ee, zEe, HEe, jEe, BEe, KEe, GEe, WEe, VEe, qEe, ZEe, YEe, JEe, XEe, QEe, ebe, tbe, nbe, rbe, obe, sbe, ibe, abe, lbe, cbe, ube, dbe, pbe, fbe, mbe, gbe, hbe, _be, ybe, Sbe, Ebe, bbe, Cbe, Abe, Rbe, Tbe, Obe, wbe, xbe, vbe, kbe, Pbe, Ibe, Dbe, Lbe, Mbe, Nbe, Ube, Fbe, $be, zbe, Hbe, jbe, Bbe, Kbe, Gbe, Wbe, Vbe, qbe, Zbe, Ybe, Jbe, Xbe, Qbe, eCe, tCe, nCe, rCe, oCe, sCe, iCe, aCe, lCe, cCe, uCe, dCe, pCe, fCe, mCe, gCe, hCe, _Ce, yCe, SCe, ECe, bCe, CCe, ACe, RCe, TCe, OCe, wCe, xCe, vCe, kCe, PCe, ICe, DCe, LCe, MCe, NCe, UCe, FCe, $Ce, zCe, HCe, jCe, BCe, KCe, GCe, WCe, VCe, qCe, ZCe, YCe, JCe, XCe, QCe, eAe, tAe, vL, kL, nAe, rAe, oAe, sAe, iAe, aAe, lAe, cAe, uAe, dAe, pAe, fAe, mAe, gAe, hAe, _Ae, yAe, SAe, EAe, bAe, CAe, AAe, RAe, TAe, OAe, wAe, xAe, vAe, kAe, PAe, IAe, DAe, LAe, MAe, NAe, UAe, FAe, $Ae, zAe, HAe, jAe, BAe, KAe, GAe, WAe, VAe, qAe, ZAe, YAe, JAe, XAe, QAe, eRe, tRe, nRe, rRe, oRe, sRe, iRe, aRe, lRe, cRe, uRe, dRe, pRe, fRe, mRe, gRe, hRe, _Re, yRe, SRe, ERe, bRe, CRe, ARe, TRe, ORe, wRe, on, vRe, oit, kRe, sit, PRe, DL, IRe, DRe, NL, KRe, GRe, WRe, XRe, Sn, oTe, sTe, $L, Vit, qit, Uo, oM, sM, mTe, Tm, gTe, Nu, hTe, _Te, lM, uM, STe, Ib, ETe, bTe, Jit, gM, fM, Mb, CM, AM, Pm, Ub, ATe, Db, Ds, TTe, OTe, UM, jb, FM, to, Wu, bn, kTe, Kb, $M, zM, HM, Vu, qu, Vb, Zu, qb, Yu, Ju, Xu, Qu, DTe, LTe, Nm, Um, BM, KM, GM, WM, VM, qM, ZM, YM, JM, XM, QM, eN, tN, nN, oN, sN, Yb, iN, NTe, lN, cN, uN, dN, pN, fN, mN, gN, hN, _N, EN, Jb, ed, bN, CN, AN, RN, TN, jt, Xb, Fm, Qb, eC, ON, wN, xN, vN, kN, td, PN, IN, DN, LN, MN, NN, UN, tC, Ir, Be, ZN, nd, tt, oC, sC, iC, YN, JN, zTe, aC, lC, cC, uC, dC, pC, fC, mC, XN, QN, eU, tU, gC, KTe, hC, _C, yC, SC, EC, Hm, bC, CC, AC, jm, RC, TC, OC, wC, xC, vC, kC, qTe, PC, iU, Bm, IC, DC, LC, MC, NC, UC, Km, FC, $C, zC, HC, jC, BC, Gm, aU, KC, GC, WC, lU, uU, qC, cU, pU, rd, qm, od, Wm, Vm, XTe, eOe, fU, mU, Dr, CU, SU, AU, ld, Cl, Al, RU, vU, kU, PU, IU, TU, OU, wU, rOe, oOe, sOe, DU, VA, qA, ZA, LU, MU, YA, JA, NU, XA, UU, QA, FU, eR, tR, $U, zU, HU, jU, nR, BU, rR, KU, GU, oR, sR, iOe, iR, aR, WU, WA, lR, cR, uR, dR, pR, fR, mR, gR, hR, qU, ng, _R, xU, YU, mOe, Jn, JU, XU, QU, e0, t0, n0, r0, o0, s0, i0, a0, l0, Ze, d0, bR, yt, CR, p0, f0, m0, swe, iwe, og, awe, lwe, cwe, uwe, dwe, pwe, fwe, mwe, gwe, hwe, _we, ywe, Swe, Ewe, bwe, Cwe, AR, Awe, g0, Rwe, Twe, Owe, wwe, xwe, fd, h0, vwe, kwe, SR, ER, Pwe, Iwe, Tl, S0, Lwe, Mwe, Uwe, E0, lg, md, Hwe, jwe, Kwe, b0, ur, C0, O0, Zwe, Ywe, exe, txe, nxe, dg, sxe, Lt, cxe, Yi, M0, bct, F0, $0, z0, H0, gxe, hxe, j0, _xe, yxe, B0, Sxe, Exe, G0, Txe, W0, wxe, q0, xxe, vxe, fg, Z0, X0, Pxe, Q0, Dxe, Mxe, Uxe, Fxe, _d, eF, nF, rF, Gxe, N0, Wxe, Vxe, qxe, Jxe, Qxe, cF, uF, EF, Aut, bF, Ave, wve, OF, Lve, Mve, bd, Uve, wF, Hve, Vve, eke, oke, $F, ike, ake, Gdt, cke, fke, jR, HR, UF, WF, Ike, Mke, JF, Zke, Qke, ePe, tPe, rPe, Ne, p$, ee, Ko, F, Xn, aPe, Us, lPe, Tg, _n, _e, kl, Cn, YR, JR, Xi, wd, ae, Mr, f$, De, cPe, uPe, dPe, pPe, fPe, mPe, gPe, hPe, _Pe, XR, yPe, SPe, EPe, bPe, CPe, APe, m$, RPe, Wo, Il, Dl, Og, vd, wg, kd, Pd, xg, Qi, Vo, vg, no, bt, Id, Go, eT, Dd, qo, kg, Pg, Ll, xd, Ld, Md, ea, Nd, Ml, oo, ro, Fs, Ud, Fd, Ig, tT, Dg, $d, nft, j, rft, oft, sft, ift, aft, lft, cft, uft, dft, pft, fft, mft, gft, hft, _$, _ft, yft, Sft, Eft, bft, Cft, Aft, Rft, Tft, Oft, wft, xft, vft, kft, Pft, Ift, Dft, Lft, Mft, IPe, DPe, rT, E$, js, Fg, Gt, b$, C$, nmt, MPe, NPe, oT, Qn, zd, A$, ln, pr, fr, cn, $g, R$, sT, T$, O$, iT, Hd, ue, aT, w$, rmt, omt, zg, UPe, Hg, FPe, jd, Nl, x$, $Pe, zPe, HPe, jPe, BPe, KPe, lT, GPe, WPe, cT, jg, VPe, qPe, Bg, ZPe, Bd, Kd, YPe, Gd, Ul, JPe, Wd, Kg, Gg, Wg, smt, Vg, qg, Zg, v$, k$, P$, uT, I$, Vd, Fl, D$, XPe, Yg, QPe, Jg, eIe, dT, tIe, Xg, nIe, rIe, oIe, sIe, iIe, aIe, lIe, cIe, uIe, dIe, Qg, pIe, fIe, eh, pT, fT, mT, mIe, gIe, hIe, gT, _Ie, yIe, SIe, EIe, bIe, L$, th, CIe, nh, imt, AIe, $l, RIe, amt, qd, TIe, hT, OIe, wIe, xIe, vIe, kIe, PIe, IIe, Ug, DIe, LIe, MIe, Zd, _T, NIe, UIe, FIe, $Ie, zIe, HIe, jIe, BIe, KIe, GIe, WIe, VIe, qIe, ZIe, YIe, JIe, XIe, QIe, zl, eDe, tDe, nDe, rh, rDe, oDe, sDe, yT, iDe, lmt, cmt, umt, dmt, pmt, fmt, le, U$, $$, F$, z$, H$, oh, G$, aDe, lDe, bT, Nr, cDe, Yd, nz, az, lz, mz, gz, fDe, mDe, AT, hDe, OT, E1, b1, SO, EO, bO, T1, R1, tze, RO, OO, oze, up, aze, Xo, fze, mze, wO, gze, Eze, bze, Cze, Aze, Rze, P1, $1, Oze, wze, xze, vze, Ae, kze, e_, la, MO, es, j1, B1, K1, G1, W1, V1, NO, UO, kO, L1, Nze, Uze, $ze, q1, PO, Qh, DO, LO, Hze, jze, M1, ui, Y1, Vze, FO, J1, tG, qze, nG, rG, oG, sG, Zze, zO, X1, HO, iG, aG, lG, cG, uG, t_, tr, lc, rHe, cc, sHe, dG, pG, mG, gG, aHe, hG, uHe, yG, fHe, pp, CG, gHe, $r, RG, yHe, SHe, TG, n_, OG, r_, wG, THe, OHe, dc, xHe, xG, kHe, PHe, IHe, vG, Sr, LHe, nr, pi, kG, PG, IG, o_, HHe, jHe, DG, pc, LG, MG, NG, So, ZHe, fc, fi, JHe, XHe, mc, UG, s_, nje, gc, rje, oje, i_, FG, ije, aje, $G, Eo, hc, a_, fje, XCt, BG, gje, WG, Aje, ZG, kje, Pje, JG, XG, QG, eW, yc, nW, KO, rW, c_, tW, Fje, gi, oW, mp, Sc, u_, $je, aW, sW, ca, gW, Zje, EW, Jje, bW, p_, CW, BRt, nBe, AW, RW, wW, oBe, iBe, KRt, gp, hp, bo, Ec, xW, g_, cBe, uBe, IW, pBe, y_, S_, E_, _p, NW, DW, hBe, LW, MW, yp, bc, A_, R_, UW, bBe, FW, T_, $W, RBe, TBe, OBe, zW, wBe, xBe, O_, Sp, Er, HW, jW, KW, GW, WW, w_, VW, UBe, qW, FBe, $Be, zBe, ZW, jBe, x_, YW, JW, XW, WBe, un, QW, eV, tV, nV, rV, XBe, QBe, oV, sV, nKe, iV, aV, lV, cV, sKe, iKe, aKe, lKe, cKe, uKe, dKe, pKe, fKe, mKe, gKe, hKe, _Ke, yKe, SKe, EKe, bKe, CKe, AKe, uV, TKe, dV, pV, wKe, fV, xKe, mV, gV, kKe, hV, PKe, IKe, DKe, _V, LKe, MKe, NKe, UKe, yV, FKe, $Ke, zKe, SV, HKe, jKe, BKe, KKe, GKe, WKe, VKe, qKe, ZKe, YKe, JKe, XKe, QKe, e1e, t1e, n1e, nt, EV, bV, CV, AV, i1e, a1e, k_, RV, TV, OV, xV, vV, P_, f1e, m1e, g1e, h1e, Tn, kV, PV, S1e, IV, DV, LV, C1e, MV, NV, R1e, _i, UV, O1e, FV, da, $V, zV, HV, jV, BV, KV, GV, N1e, U1e, WV, F1e, VV, qV, H1e, ZV, j1e, Ep, Y1e, eGe, s2, rw, tGe, nGe, rGe, ow, oGe, sGe, iGe, aGe, lGe, cGe, uGe, dGe, pGe, _Ge, yGe, SGe, AGe, p2, f2, Cc, m2, OGe, L_, Ap, kGe, PGe, IGe, DGe, LGe, vkt, MGe, iw, NGe, UGe, FGe, os16, Ac, U_, b2, C2, $Ge, zGe, HGe, jGe, F_, Rc, $_, yi, aw, z_, H_, BGe, KGe, lw, pa, WGe, O2, Fkt, $kt, w2, x2, v2, k2, VGe, P2, I22, D2, L2, qGe, ZGe, cw, YGe, N2, XGe, QGe, Xkt, U2, F2, rPt, oPt, kPt, PPt, IPt, cWe, pWe, j_, nIt, rIt, fWe, wc, Si, mWe, G2, gWe, hWe, V2, _w, q2, _We, yWe, Z2, SWe, EWe, bWe, CWe, Sw, Ew, RWe, TWe, bw, OWe, K_, oIt, Op, wWe, xWe, cIt, vWe, kWe, AIt, PWe, IWe, RIt, LIt, MIt, J2, Rw, MWe, FWe, Q2, jWe, KWe, oq, wp, sq, G_, Tw, ga, VWe, lq, qWe, tDt, xp, ss, dq, On, aDt, lDt, cDt, ZWe, mq, JWe, xc, yq, Mw, eVe, kq, tVe, nVe, Pq, Iq, rVe, Fw, Dq, Lq, XDt, sVe, iVe, aVe, sr, _a3, Eq, bq, Pw, Iw, $w, zw, cVe, uVe, pVe, Hw, fVe, mVe, Z_, jw, Wn, hVe, QDt, Fq, _Ve, $q, zq, Hq, yVe, Bw, SVe, EVe, bVe, CVe, Kw, jq, Cq, AVe, Bq, Kq, Gq, Wq, Aq, RVe, TVe, Gw, Vq, OVe, wVe, xVe, qq, vVe, kVe, PVe, IVe, Zq, Yq, Jq, Xq, LVe, eLt, Qq, tZ, NVe, HVe, kp, Vw, tLt, nLt, rLt, BVe, qw, Y_, kw, iZ, KVe, WVe, aZ, VVe, qVe, ZVe, YVe, JVe, QVe, t2e, n2e, r2e, o2e, s2e, c2e, oLt, Dw, sLt, u2e, Tq, vc, iLt, aLt, uZ, d2e, p2e, f2e, lLt, m2e, g2e, cLt, uLt, h2e, dLt, X_, Pc, _2e, Yw, Q_, ELt, bLt, CLt, ey, y2e, E2e, tx, EZ, Mp, sy, A2e, pMt, R2e, T2e, ix, ax, lx, cx, iy, ay, MZ, O2e, w2e, I2e, M2e, N2e, bi, U2e, CZ, AZ, RZ, ry, UZ, F2e, $2e, z2e, H2e, j2e, B2e, K2e, G2e, yn, dx, nx, ny, ya, Z2e, fMt, J2e, Lp, TZ, X2e, OZ, Q2e, eqe, ly, tqe, wZ, fx, uy, Ci, KZ, Dc, Lc, nqe, dy, kZ, oqe, qZ, YZ, JZ, iqe, aqe, lqe, XZ, QZ, cqe, wMt, uqe, dqe, pqe, xMt, vMt, kMt, PMt, bx, Cx, fqe, mqe, IMt, Rx, nY, Tx, rY, oY, Ox, sY, iY, aY, lY, wx, _qe, ZMt, xx, yqe, vx, kx, Sqe, YMt, JMt, Eqe, Px, Ix, Dx, XMt, cY, bqe, Cqe, Aqe, Rqe, QMt, uY, dY, Lx, pY, fY, Tqe, Oqe, wqe, xqe, kqe, hY, Iqe, vNt, SY, $Nt, EY, my, Nx, Dqe, Lqe, Mqe, qNt, ZNt, bY, YNt, JNt, XNt, Nqe, cUt, CY, Mc, $qe, Up, zqe, kY, IY, Gqe, nZe, $Ut, sZe, iZe, BY, KY, GY, uZe, fZe, qY, XY, yZe, M0t, N0t, bZe, RZe, TZe, z0t, H0t, Y0t, s4, OZe, wZe, uFt, xZe, dFt, i4, a4, Hx, c4, u42, Ai, zZe, S4, yy, Sy, $p, Gx, E4, b4, C4, Ey, Ri, A4, wn, Kx, T4, ls, KZe, GZe, b$t, VZe, ZZe, XZe, eYe, pYe, I4, hYe, _Ye, N4, n9, $4, B4, xy, xYe, K4, Vp, Zx, V4, ZYe, JYe, sv, ba, y9, E9, r4e, iv, Uc, C9, o4e, c4e, O9, Oy, X4, x9, y4e, E4e, C4e, F9, M4e, H4e, Gc, B9, z9, j4e, K4e, V4e, q4e, t9e, Z9, n9e, r9e, o9e, s9e, l9e, CHt, c9e, AHt, RHt, u9e, THt, d9e, OHt, p9e, _v, f9e, xHt, J9, X9, m9e, Q9, e62, g9e, h9e, t6, n6, _9e, y9e, vHt, kHt, E9e, b9e, C9e, A9e, x9e, Sv, l6, v9e, c6, Iy, k9e, Cv, Vc, F9e, Ly, Av, f6, m6, g6, _6, y6, Rv, S6, E6, $9e, C6, My, qc, Ny, z9e, T6, cs, O6, w6, B9e, tf, nf, K9e, G9e, x6, vn, W9e, V9e, q9e, wi, Z9e, Y9e, k6, tBt, J9e, D6, L6, M6, X9e, Q9e, N6, e6e, t6e, Ov, n6e, Uy, wv, U6, xv, kv, r6e, H6, Pv, j6, Fy, $y, B6, MBt, o6e, s6e, Iv, q6, d6e, J6, YBt, O6e, k6e, P6e, $6e;
|
|
89695
89938
|
var init_sdk = __esm({
|
|
89696
89939
|
"node_modules/.pnpm/@anthropic-ai+claude-agent-sdk@0.3.311_@anthropic-ai+sdk@0.131.0_zod@4.6.7__@modelconte_f9498c2b64a96ac063cd3cbedf632a81/node_modules/@anthropic-ai/claude-agent-sdk/sdk.mjs"() {
|
|
89697
89940
|
import_node_module = require("node:module");
|
|
@@ -89721,7 +89964,7 @@ var init_sdk = __esm({
|
|
|
89721
89964
|
import_promises6 = require("fs/promises");
|
|
89722
89965
|
import_os4 = require("os");
|
|
89723
89966
|
import_node_path60 = __toESM(require("node:path"), 1);
|
|
89724
|
-
|
|
89967
|
+
import_node_os16 = __toESM(require("node:os"), 1);
|
|
89725
89968
|
import_node_process5 = __toESM(require("node:process"), 1);
|
|
89726
89969
|
import_path7 = require("path");
|
|
89727
89970
|
import_events = require("events");
|
|
@@ -98519,8 +98762,8 @@ var init_sdk = __esm({
|
|
|
98519
98762
|
wre = "coordinator-relay";
|
|
98520
98763
|
xre = [iL, Tre, bre, Cre, Ere, Are, Rre, sL, Ore, wre, ul, XD, Sm, QD, eL];
|
|
98521
98764
|
iot = [..._re, ab, tL, gre, ...xre, aL, "system-reminder", "system_reminder", "function_results", "tool_use_error", "sandbox_violations", "persisted-output", "total_tokens", "user-prompt-submit-hook"];
|
|
98522
|
-
Ps =
|
|
98523
|
-
pb =
|
|
98765
|
+
Ps = import_node_os16.default.homedir();
|
|
98766
|
+
pb = import_node_os16.default.tmpdir();
|
|
98524
98767
|
({ env: dl } = import_node_process5.default);
|
|
98525
98768
|
vre = (e10) => {
|
|
98526
98769
|
let t10 = import_node_path60.default.join(Ps, "Library");
|
|
@@ -107337,14 +107580,14 @@ XA==
|
|
|
107337
107580
|
NGe = "When managed settings or a --settings file set allowUnsandboxedCommands: false, network.deniedDomains or a WebFetch(domain:\u2026) deny rule, when managed settings set network.allowManagedDomainsOnly: true, or when managed, --settings or user settings set network.strictAllowlist: true";
|
|
107338
107581
|
UGe = "When managed settings or a --settings file set allowUnsandboxedCommands: false, filesystem.denyRead, a Read(\u2026) deny rule or a credentials.files entry (deny or mask), or managed settings set network.allowManagedDomainsOnly: true";
|
|
107339
107582
|
FGe = "When managed settings or a --settings file set filesystem.denyRead, a Read(\u2026) deny rule or a credentials.files entry (deny or mask)";
|
|
107340
|
-
|
|
107341
|
-
Ac = `${iw}, values from ${
|
|
107342
|
-
U_ = `${iw}, true from ${
|
|
107343
|
-
b2 = `${iw}, and managed, --settings or user settings set true, false from ${
|
|
107344
|
-
C2 = `${NGe}, values from ${
|
|
107345
|
-
$Ge = `${UGe}, a value from ${
|
|
107346
|
-
zGe = `${Ac} ${FGe}, a value from ${
|
|
107347
|
-
HGe = k(() => R2({ allowedDomains: P(h2()).optional().describe("Domains sandboxed commands may reach without a prompt (wildcards such as *.example.com supported). Merged with WebFetch(domain:\u2026) allow rules and across settings sources. " + Ac + " With network.allowManagedDomainsOnly, only managed settings supply it."), deniedDomains: P(h2()).optional().describe("Domains that are always blocked, even if matched by allowedDomains. Supports the same wildcard syntax as allowedDomains. Merged from all settings sources regardless of allowManagedDomainsOnly."), strictAllowlist: x().optional().describe(`When true, the sandbox runtime deterministically denies hosts not in allowedDomains instead of prompting. Enforced for sandboxed commands only \u2014 in-process tools such as WebFetch are not gated by this setting. Only honored from user, managed/policy, or CLI (--settings) settings \u2014 ${
|
|
107583
|
+
os16 = "project settings (.claude/settings.json and .claude/settings.local.json)";
|
|
107584
|
+
Ac = `${iw}, values from ${os16} are ignored.`;
|
|
107585
|
+
U_ = `${iw}, true from ${os16} is ignored (false there still applies).`;
|
|
107586
|
+
b2 = `${iw}, and managed, --settings or user settings set true, false from ${os16} is ignored (true there still applies).`;
|
|
107587
|
+
C2 = `${NGe}, values from ${os16} are ignored. With network.allowManagedDomainsOnly, only managed settings may set it.`;
|
|
107588
|
+
$Ge = `${UGe}, a value from ${os16} that would re-open a path managed, --settings or user settings deny reading is ignored, as is one spelled as a glob or a network path (UNC or automount); one carving out of the project's own denyRead still applies. A value inside a directory sandboxed commands can write is re-checked before every command and dropped once it has been re-pointed into a denied path.`;
|
|
107589
|
+
zGe = `${Ac} ${FGe}, a value from ${os16} under or equal to a denied path, or spelled as a glob or a network path (UNC or automount), is ignored. A value inside a directory sandboxed commands can already write is re-checked before every command and dropped once it has been re-pointed into a denied read path.`;
|
|
107590
|
+
HGe = k(() => R2({ allowedDomains: P(h2()).optional().describe("Domains sandboxed commands may reach without a prompt (wildcards such as *.example.com supported). Merged with WebFetch(domain:\u2026) allow rules and across settings sources. " + Ac + " With network.allowManagedDomainsOnly, only managed settings supply it."), deniedDomains: P(h2()).optional().describe("Domains that are always blocked, even if matched by allowedDomains. Supports the same wildcard syntax as allowedDomains. Merged from all settings sources regardless of allowManagedDomainsOnly."), strictAllowlist: x().optional().describe(`When true, the sandbox runtime deterministically denies hosts not in allowedDomains instead of prompting. Enforced for sandboxed commands only \u2014 in-process tools such as WebFetch are not gated by this setting. Only honored from user, managed/policy, or CLI (--settings) settings \u2014 ${os16} are ignored, and while it is on their allowedDomains and WebFetch(domain:\u2026) allow rules are left out of the allowlist.`), allowManagedDomainsOnly: x().optional().describe("When true (and set in managed settings), only allowedDomains and WebFetch(domain:...) allow rules from managed settings are respected. User, project, local, and flag settings domains are ignored. Denied domains are still respected from all sources."), allowUnixSockets: P(h2()).optional().describe("macOS only: Unix socket paths to allow. Ignored on Linux (seccomp cannot filter by path). Merged across settings sources. " + Ac), allowAllUnixSockets: x().optional().describe("If true, allow all Unix sockets (disables blocking on both platforms). " + U_), allowLocalBinding: x().optional().describe("macOS only: If true, sandboxed commands can bind to localhost ports. " + U_), allowMachLookup: P(h2().refine((e10) => !(e10.endsWith("*") ? e10.slice(0, -1) : e10).includes("*"), { message: 'Wildcards are only allowed as a single trailing "*" (e.g., "com.example.*" or "*" for all services).' })).optional().describe('macOS only: Additional XPC/Mach service names to allow looking up. Supports trailing-wildcard prefix matching (e.g., "com.apple.coresimulator.*"). Needed for tools that communicate via XPC such as the iOS Simulator or Playwright. Merged across settings sources. ' + Ac), httpProxyPort: Z().optional().describe("Local TCP port of your own HTTP proxy for sandboxed traffic, used instead of the proxy Claude Code runs. " + C2), socksProxyPort: Z().optional().describe("Local TCP port of your own SOCKS5 proxy for sandboxed traffic, used instead of the proxy Claude Code runs. " + C2), tlsTerminate: R2({ caCertPath: h2().min(1).optional(), caKeyPath: h2().min(1).optional() }).optional().describe("[EXPERIMENTAL] Enable in-process TLS termination so the per-request filter can see HTTPS request bodies. Provide a CA cert+key, or omit both to have sandbox-runtime generate an ephemeral one for the session. On native Windows an ephemeral CA cannot pass the sandbox trust check, so omitting the paths uses a persistent CA managed by the sandbox runtime (set up and trusted via /sandbox install); configured paths are passed to the sandbox runtime verbatim, which rejects a bad or incomplete pair at sandbox initialization. Only honored from user, managed/policy, or CLI (`--settings`) settings \u2014 project settings (.claude/settings.json and .claude/settings.local.json) are ignored.") }).optional());
|
|
107348
107591
|
jGe = k(() => R2({ allowWrite: P(h2()).optional().describe("Additional paths to allow writing within the sandbox. Merged with paths from Edit(...) allow permission rules. " + zGe), denyWrite: P(h2()).optional().describe("Additional paths to deny writing within the sandbox. Merged with paths from Edit(...) deny permission rules."), denyRead: P(h2()).optional().describe("Additional paths to deny reading within the sandbox. Merged with paths from Read(...) deny permission rules."), allowRead: P(h2()).optional().describe("Paths to re-allow reading within denyRead regions. Takes precedence over denyRead for matching paths. " + $Ge), allowManagedReadPathsOnly: x().optional().describe("When true (set in managed settings), only allowRead paths from policySettings are used."), disabled: x().optional().describe("macOS and Linux/WSL only: skip filesystem isolation entirely while keeping network and seccomp isolation. Ignored on native Windows, where the sandboxed process runs as a separate user with no inherent rights, so skipping the filesystem rules would withhold every access grant rather than loosen them \u2014 filesystem isolation stays on there. Sandboxed commands get unrestricted read/write access to the host filesystem; network egress is still confined to network.allowedDomains. Intended for deployments whose goal is egress control rather than filesystem containment. Does not change Bash prompting: sandbox.autoAllowBashIfSandboxed is independent and still defaults to true, so set it to false to keep prompting for sandboxed commands. Drops the read protection from filesystem.denyRead and credentials.files deny entries for sandboxed commands, since both are enforced by the filesystem layer this turns off; credentials.files mask entries (sentinel binds) and credentials.envVars deny/mask are unaffected. Only honored from user, managed/policy, or CLI (`--settings`) settings \u2014 project settings (.claude/settings.json and .claude/settings.local.json) are ignored. If managed settings configure sandbox.filesystem at all, or list any sandbox.credentials.files deny entry, only managed settings can set this: an admin who deployed filesystem restrictions must not have them switched off by a user-writable file. (sandbox.credentials.envVars and credentials.files mask entries do not pin it \u2014 env scrubbing and sentinel binds are independent of the filesystem layer and survive this setting.) When unset, filesystem isolation stays on.") }).optional());
|
|
107349
107592
|
F_ = k(() => Le(T2, R2({ path: h2().min(1).describe("Path to a credential file or directory. Same resolution as sandbox.filesystem.* paths: absolute, ~ expanded, or relative to the settings file root (project root for project settings, ~/.claude for user settings)."), mode: B(["deny", "mask"]).describe("Access mode for this path. `deny` blocks reads inside the sandbox; `mask` shows sandboxed commands a sentinel-substituted copy (whole-file, or only the spans captured by `extract`) and the host proxy swaps sentinel\u2192real on egress to `injectHosts`. On macOS and Windows `mask` currently degrades to `deny`."), extract: h2().optional().describe("Optional regex for structured masking when mode is `mask`. Applied globally to the file; capture group 1 of each match is a credential value, and only those captured spans are replaced with sentinels \u2014 the rest of the file is preserved so a tool that parses it (.netrc, JSON, YAML) still succeeds. Without `extract`, the entire file content is replaced with one sentinel (whole-file masking, suited to single-secret files). If the regex matches nothing, behavior is governed by `onExtractNoMatch` (default `warn`). Accepted but ignored for `deny`."), onExtractNoMatch: B(["warn", "deny", "error"]).optional().describe("What to do when `extract` matches nothing in the file \u2014 or, with `decode`, when no candidate survives verification. `warn` (default) emits a stderr warning and leaves the file readable as-is inside the sandbox (fail-open, for credentials that may be legitimately absent); `deny` degrades the entry to mode `deny` so the file is unreadable (fail-closed) \u2014 under `sandbox.filesystem.disabled` it is treated as `error`, since read-denies are dropped in that mode; `error` aborts at sandbox setup so nothing runs until the config is fixed. Only meaningful when mode is `mask` and `extract` or `decode` is set; accepted but ignored otherwise."), decode: B(["jwt"]).optional().describe("Optional encoded-credential format for `mask` mode. `jwt`: candidates are located with a built-in JWT regex (or the explicit `extract` pattern, if set), verified to actually be JWTs before masking, and replaced with a structurally valid fake JWT so client-side token parsing inside the sandbox keeps working. If no candidate verifies, behavior is governed by `onExtractNoMatch` (default `warn`). Accepted but ignored for `deny`."), maskClaims: P(h2()).optional().describe("Names of top-level payload claims to mask inside each decoded value, instead of replacing the whole token. Each named claim present with a string value gets its own sentinel and the token is rebuilt around the modified payload; all other claims are preserved so a tool that decodes the token and reads a non-secret claim keeps working. Requires `decode`. If no named claim matches in any verified token, behavior is governed by `onExtractNoMatch` (default `warn`). Only meaningful when mode is `mask`; accepted but ignored for `deny`."), maskDuplicates: x().optional().describe("If true, verbatim occurrences of each captured credential value outside the regex-matched spans are also replaced with the corresponding sentinel \u2014 for a secret repeated where the regex does not reach (e.g. pasted into a comment). Matches raw substrings, so short or common values may corrupt unrelated content; intended for long, high-entropy secrets. Defaults to false. Only meaningful when mode is `mask` and `extract` or `decode` is set; accepted but ignored otherwise."), injectHosts: P(h2()).optional().describe("Optional narrowing of where the proxy substitutes this credential. Only meaningful when mode is `mask`; accepted but ignored for `deny`. If unset, defaults to `network.allowedDomains` \u2014 the credential is injected at every reachable host. Each entry must be reachable via `network.allowedDomains` (sandbox-runtime validates this).") }).superRefine((e10, t10) => {
|
|
107350
107593
|
if (e10.mode === "mask" && e10.path.endsWith("/")) t10.addIssue({ code: ur.custom, path: ["path"], message: 'Credential mode "mask" applies to a single file, not a directory. List the specific credential file(s), or use "deny" for the directory.' });
|
|
@@ -107386,7 +107629,7 @@ XA==
|
|
|
107386
107629
|
for (let a10 of i10) n10.add(a10);
|
|
107387
107630
|
}
|
|
107388
107631
|
}).optional());
|
|
107389
|
-
lw = k(() => R2({ enabled: x().optional().describe("Run Bash commands inside the sandbox. Default: false. " + b2), failIfUnavailable: x().optional().describe("Exit with an error at startup if sandbox.enabled is true but the sandbox cannot start (missing dependencies or unsupported platform). When false (default), a warning is shown and commands run unsandboxed. Intended for managed-settings deployments that require sandboxing as a hard gate. " + b2), autoAllowBashIfSandboxed: x().optional(), allowUnsandboxedCommands: x().optional().describe(`Allow commands to run outside the sandbox via the dangerouslyDisableSandbox parameter. When false, the dangerouslyDisableSandbox parameter is completely ignored and all commands must run sandboxed. Default: true. A false in managed, --settings or user settings holds whatever ${
|
|
107632
|
+
lw = k(() => R2({ enabled: x().optional().describe("Run Bash commands inside the sandbox. Default: false. " + b2), failIfUnavailable: x().optional().describe("Exit with an error at startup if sandbox.enabled is true but the sandbox cannot start (missing dependencies or unsupported platform). When false (default), a warning is shown and commands run unsandboxed. Intended for managed-settings deployments that require sandboxing as a hard gate. " + b2), autoAllowBashIfSandboxed: x().optional(), allowUnsandboxedCommands: x().optional().describe(`Allow commands to run outside the sandbox via the dangerouslyDisableSandbox parameter. When false, the dangerouslyDisableSandbox parameter is completely ignored and all commands must run sandboxed. Default: true. A false in managed, --settings or user settings holds whatever ${os16} say (false there still applies).`), network: HGe(), filesystem: jGe(), credentials: KGe(), ignoreViolations: q(h2(), P(h2())).optional().describe('Sandbox violations to leave unreported: a map of command patterns ("*" for every command) to the filesystem paths whose violations are ignored. Merged across settings sources. ' + Ac), enableWeakerNestedSandbox: x().optional().describe("Linux only: Run without the fresh /proc mount, for hosts such as unprivileged Docker containers that cannot create one. **Reduces security** \u2014 the host /proc stays readable by sandboxed commands. Default: false. " + U_), allowNestedUserNamespaces: x().optional().describe(`Linux/WSL only: Let sandboxed commands create user namespaces of their own, which the sandbox refuses by default. Needed by tools that sandbox themselves that way, such as Chromium's and Electron's sandbox, a nested bubblewrap, and \`unshare\`. **Removes code-execution isolation** \u2014 in any folder a hostile command may write, it can then bypass filesystem.denyWrite, filesystem.denyRead, credentials.files entries and the paths the sandbox always write-protects (such as .claude/settings.json, git hooks and git config), and so plant code that later runs outside the sandbox; while autoAllowBashIfSandboxed is on, the command that plants it needs no approval. Default: false. Only honored from user, managed/policy, or CLI (--settings) settings \u2014 true from ${os16} is ignored (false there still applies).`), enableWeakerNetworkIsolation: x().optional().describe("macOS only: Allow access to com.apple.trustd.agent in the sandbox. Needed for Go-based CLI tools (gh, gcloud, terraform, etc.) to verify TLS certificates when using httpProxyPort with a MITM proxy and custom CA. **Reduces security** \u2014 opens a potential data exfiltration vector through the trustd service. Default: false. " + U_), allowAppleEvents: x().optional().describe("macOS only: Allow sandboxed commands to send Apple Events (and look up the appleeventsd Mach service). Needed for `open`, `osascript`, and browser-based auth flows that open URLs. **Removes code-execution isolation** \u2014 sandboxed commands can launch other applications unsandboxed with no user prompt, and can script running apps (e.g. Terminal) subject to the user's per-app TCC automation consent. Only honored from user, managed/policy, or CLI (--settings) settings \u2014 project settings (.claude/settings.json and .claude/settings.local.json) are ignored. Default: false"), excludedCommands: P(h2()).optional().describe("Command patterns (Bash permission-rule syntax) that always run outside the sandbox. A convenience, not a security boundary: excluded commands still go through the permission flow. Merged across settings sources. " + Ac), ripgrep: R2({ command: h2(), args: P(h2()).optional() }).optional().describe("Custom ripgrep configuration for bundled ripgrep support. Only honored from user, managed/policy, or CLI (--settings) settings \u2014 project settings (.claude/settings.json and .claude/settings.local.json) are ignored."), bwrapPath: Le((e10) => typeof e10 === "string" && (0, import_path30.isAbsolute)(e10) ? e10 : void 0, h2()).optional().catch(void 0).describe("Linux/WSL only: Absolute path to the bwrap (bubblewrap) binary. Overrides auto-detection via PATH. Only honored from admin-controlled managed settings."), socatPath: Le((e10) => typeof e10 === "string" && (0, import_path30.isAbsolute)(e10) ? e10 : void 0, h2()).optional().catch(void 0).describe("Linux/WSL only: Absolute path to the socat binary used for the sandbox network proxy. Overrides auto-detection via PATH. Only honored from admin-controlled managed settings.") }).passthrough());
|
|
107390
107633
|
pa = ["acceptEdits", "auto", "bypassPermissions", "default", "dontAsk", "plan"];
|
|
107391
107634
|
WGe = [...pa];
|
|
107392
107635
|
O2 = WGe;
|
|
@@ -109991,14 +110234,14 @@ function createRealAnthropicUsageRefresher(params) {
|
|
|
109991
110234
|
},
|
|
109992
110235
|
now: () => Date.now(),
|
|
109993
110236
|
log: params.log,
|
|
109994
|
-
concurrency: (0,
|
|
110237
|
+
concurrency: (0, import_node_os17.availableParallelism)()
|
|
109995
110238
|
});
|
|
109996
110239
|
}
|
|
109997
|
-
var
|
|
110240
|
+
var import_node_os17, PROBE_LAUNCH_FLAGS;
|
|
109998
110241
|
var init_realAnthropicUsageProbe = __esm({
|
|
109999
110242
|
"src/usage/realAnthropicUsageProbe.ts"() {
|
|
110000
110243
|
"use strict";
|
|
110001
|
-
|
|
110244
|
+
import_node_os17 = require("node:os");
|
|
110002
110245
|
init_identityStore();
|
|
110003
110246
|
init_anthropicUsageRefresh();
|
|
110004
110247
|
init_identityClaude();
|
|
@@ -122960,7 +123203,7 @@ function namesMovedPath(text5, moved) {
|
|
|
122960
123203
|
// src/identityRename.ts
|
|
122961
123204
|
init_providersStore();
|
|
122962
123205
|
init_middleware();
|
|
122963
|
-
|
|
123206
|
+
init_windowLengths();
|
|
122964
123207
|
init_read();
|
|
122965
123208
|
init_schema2();
|
|
122966
123209
|
init_signIn();
|
|
@@ -124537,7 +124780,7 @@ var import_node_path46 = __toESM(require("node:path"), 1);
|
|
|
124537
124780
|
init_commandDeps();
|
|
124538
124781
|
|
|
124539
124782
|
// src/checkReport.ts
|
|
124540
|
-
var
|
|
124783
|
+
var import_node_os8 = __toESM(require("node:os"), 1);
|
|
124541
124784
|
init_cliError();
|
|
124542
124785
|
|
|
124543
124786
|
// src/codex/identity.ts
|
|
@@ -124574,6 +124817,7 @@ function candidateView(candidate) {
|
|
|
124574
124817
|
feasible: candidate.feasible,
|
|
124575
124818
|
...candidate.blockedUntilMs === void 0 ? {} : { blockedUntil: new Date(candidate.blockedUntilMs).toISOString() },
|
|
124576
124819
|
plan: candidate.plan,
|
|
124820
|
+
...candidate.provider === void 0 ? {} : { provider: candidate.provider },
|
|
124577
124821
|
reasons: [...candidate.reasons]
|
|
124578
124822
|
};
|
|
124579
124823
|
}
|
|
@@ -124587,6 +124831,7 @@ function collectPoolPick(params) {
|
|
|
124587
124831
|
nowMs: params.nowMs,
|
|
124588
124832
|
resuming: false,
|
|
124589
124833
|
identityIdOf: identityIdResolver(params.paths.identitiesDir, params.fs),
|
|
124834
|
+
...params.providerOf === void 0 ? {} : { providerOf: params.providerOf },
|
|
124590
124835
|
...sticky.sticky === void 0 ? {} : { sticky: sticky.sticky }
|
|
124591
124836
|
});
|
|
124592
124837
|
return {
|
|
@@ -124601,6 +124846,29 @@ function collectPoolPick(params) {
|
|
|
124601
124846
|
};
|
|
124602
124847
|
}
|
|
124603
124848
|
|
|
124849
|
+
// src/poolProviderWiring.ts
|
|
124850
|
+
var import_node_os7 = __toESM(require("node:os"), 1);
|
|
124851
|
+
init_load();
|
|
124852
|
+
init_cascade();
|
|
124853
|
+
init_memberProvider();
|
|
124854
|
+
init_realPorts();
|
|
124855
|
+
function realMemberProviderResolver(params) {
|
|
124856
|
+
const home = import_node_os7.default.homedir();
|
|
124857
|
+
const read = cosmiconfigReader();
|
|
124858
|
+
const loaded = params.loaded ?? loadCascadeInput({ paths: params.paths, home, cwd: params.cwd, read });
|
|
124859
|
+
const selections = readDirectorySelections(loaded);
|
|
124860
|
+
return memberProviderResolver({
|
|
124861
|
+
paths: params.paths,
|
|
124862
|
+
fs: realFsPort,
|
|
124863
|
+
env: params.env,
|
|
124864
|
+
cliProvider: params.cliProvider,
|
|
124865
|
+
...params.cliFlagConfigProfile === void 0 ? {} : { cliFlagConfigProfile: params.cliFlagConfigProfile },
|
|
124866
|
+
...selections.configProfile === void 0 ? {} : { directoryRuleConfigProfile: selections.configProfile },
|
|
124867
|
+
...loaded.globalConfig?.defaultConfigProfile === void 0 ? {} : { globalDefaultConfigProfile: loaded.globalConfig.defaultConfigProfile },
|
|
124868
|
+
loadCascade: (baseConfigProfile) => loadCascadeInput({ paths: params.paths, home, cwd: params.cwd, read, ...baseConfigProfile === void 0 ? {} : { baseConfigProfile } }).input
|
|
124869
|
+
});
|
|
124870
|
+
}
|
|
124871
|
+
|
|
124604
124872
|
// src/launchSelection.ts
|
|
124605
124873
|
init_poolStore();
|
|
124606
124874
|
init_realPorts();
|
|
@@ -124626,7 +124894,8 @@ function selectLaunch(params, loaded) {
|
|
|
124626
124894
|
if (pools[decidedIdentity.pool] === void 0) {
|
|
124627
124895
|
throw new PoolNotFoundError(decidedIdentity.pool);
|
|
124628
124896
|
}
|
|
124629
|
-
|
|
124897
|
+
const providerOf = realMemberProviderResolver({ paths, cwd, env: params.env, ...params.configProfile === void 0 ? {} : { cliFlagConfigProfile: params.configProfile }, loaded });
|
|
124898
|
+
poolPick = collectPoolPick({ paths, fs: realFsPort, usageFs: realFarmFs, poolName: decidedIdentity.pool, pools, directory: cwd, nowMs: Date.now(), providerOf });
|
|
124630
124899
|
}
|
|
124631
124900
|
const identity = poolPick?.pick === void 0 ? decidedIdentity : { ...decidedIdentity, name: poolPick.pick };
|
|
124632
124901
|
const loadedIdentity = identity.name === void 0 ? void 0 : loadIdentity(paths.identitiesDir, identity.name, realFsPort);
|
|
@@ -124979,7 +125248,7 @@ function loadCheckProvider(paths, name) {
|
|
|
124979
125248
|
}
|
|
124980
125249
|
function collectCheckReport(params) {
|
|
124981
125250
|
const { paths, cwd } = params;
|
|
124982
|
-
const home =
|
|
125251
|
+
const home = import_node_os8.default.homedir();
|
|
124983
125252
|
const read = cosmiconfigReader();
|
|
124984
125253
|
const loaded = loadCascadeInput({ paths, home, cwd, read });
|
|
124985
125254
|
const git = resolveGitBranch(realRunPort, cwd);
|
|
@@ -125060,7 +125329,7 @@ function registerCheckCommand(program2, deps) {
|
|
|
125060
125329
|
// src/codex/commands.ts
|
|
125061
125330
|
var import_node_crypto17 = require("node:crypto");
|
|
125062
125331
|
var import_node_fs17 = __toESM(require("node:fs"), 1);
|
|
125063
|
-
var
|
|
125332
|
+
var import_node_os9 = __toESM(require("node:os"), 1);
|
|
125064
125333
|
var import_node_path47 = __toESM(require("node:path"), 1);
|
|
125065
125334
|
init_commandDeps();
|
|
125066
125335
|
init_state();
|
|
@@ -125377,7 +125646,7 @@ function createCodexRoutePorts(log, signInFile, options) {
|
|
|
125377
125646
|
const agent = createUpstreamAgent();
|
|
125378
125647
|
const upstreamFetch = createUpstreamFetch(agent);
|
|
125379
125648
|
const tempSuffix = `${String(process.pid)}.${(0, import_node_crypto17.randomUUID)()}`;
|
|
125380
|
-
const auth = createCodexAuthStore(import_node_path47.default.join(codexHome(options?.env ?? process.env,
|
|
125649
|
+
const auth = createCodexAuthStore(import_node_path47.default.join(codexHome(options?.env ?? process.env, import_node_os9.default.homedir()), "auth.json"), {
|
|
125381
125650
|
fs: realCodexAuthFs,
|
|
125382
125651
|
fetch: upstreamFetch,
|
|
125383
125652
|
now: () => /* @__PURE__ */ new Date(),
|
|
@@ -125525,7 +125794,7 @@ function registerCodexCommand(program2, deps) {
|
|
|
125525
125794
|
|
|
125526
125795
|
// src/frontdoor/commands.ts
|
|
125527
125796
|
var import_node_crypto32 = require("node:crypto");
|
|
125528
|
-
var
|
|
125797
|
+
var import_node_os20 = __toESM(require("node:os"), 1);
|
|
125529
125798
|
init_catalogueCredential();
|
|
125530
125799
|
var import_node_path73 = __toESM(require("node:path"), 1);
|
|
125531
125800
|
var import_node_fs30 = __toESM(require("node:fs"), 1);
|
|
@@ -126361,7 +126630,7 @@ function createTargetObservationStore(fs37, paths) {
|
|
|
126361
126630
|
|
|
126362
126631
|
// src/update/commands.ts
|
|
126363
126632
|
var import_node_fs21 = __toESM(require("node:fs"), 1);
|
|
126364
|
-
var
|
|
126633
|
+
var import_node_os11 = __toESM(require("node:os"), 1);
|
|
126365
126634
|
var import_node_path54 = __toESM(require("node:path"), 1);
|
|
126366
126635
|
init_package();
|
|
126367
126636
|
init_commandDeps();
|
|
@@ -126466,7 +126735,7 @@ var realUpdatePorts = {
|
|
|
126466
126735
|
chmod: (filePath, mode) => {
|
|
126467
126736
|
import_node_fs21.default.chmodSync(filePath, mode);
|
|
126468
126737
|
},
|
|
126469
|
-
mkdtemp: () => import_node_fs21.default.mkdtempSync(import_node_path54.default.join(
|
|
126738
|
+
mkdtemp: () => import_node_fs21.default.mkdtempSync(import_node_path54.default.join(import_node_os11.default.tmpdir(), "agent-shim-update-")),
|
|
126470
126739
|
rmRecursive: (targetPath) => {
|
|
126471
126740
|
import_node_fs21.default.rmSync(targetPath, { recursive: true, force: true });
|
|
126472
126741
|
}
|
|
@@ -126565,7 +126834,8 @@ async function refreshStalePoolMembers(params) {
|
|
|
126565
126834
|
if (identities.size === 0) {
|
|
126566
126835
|
return;
|
|
126567
126836
|
}
|
|
126568
|
-
|
|
126837
|
+
const members2 = params.loadMembers([...identities]).filter((member) => member.provider === void 0 && member.providerError === void 0);
|
|
126838
|
+
await params.refresher.refreshStale(members2);
|
|
126569
126839
|
}
|
|
126570
126840
|
|
|
126571
126841
|
// src/frontdoor/commands.ts
|
|
@@ -126691,7 +126961,7 @@ function createRealWindowOpener(params) {
|
|
|
126691
126961
|
// src/usage/jobKeeper.ts
|
|
126692
126962
|
init_conditions();
|
|
126693
126963
|
init_middleware();
|
|
126694
|
-
|
|
126964
|
+
init_windowLengths();
|
|
126695
126965
|
init_preflight();
|
|
126696
126966
|
|
|
126697
126967
|
// src/usage/windowKeeper.ts
|
|
@@ -128323,14 +128593,14 @@ var import_node_net2 = __toESM(require("node:net"), 1);
|
|
|
128323
128593
|
init_legacy();
|
|
128324
128594
|
|
|
128325
128595
|
// src/frontdoor/machineLoad.ts
|
|
128326
|
-
var
|
|
128596
|
+
var import_node_os18 = __toESM(require("node:os"), 1);
|
|
128327
128597
|
var processorShare = (reading) => reading.loadAverage <= reading.cpus ? 1 : reading.cpus / reading.loadAverage;
|
|
128328
128598
|
function readMachineLoad() {
|
|
128329
|
-
const [oneMinute] =
|
|
128599
|
+
const [oneMinute] = import_node_os18.default.loadavg();
|
|
128330
128600
|
if (oneMinute === void 0) {
|
|
128331
128601
|
throw new Error("os.loadavg() returned no one-minute load average");
|
|
128332
128602
|
}
|
|
128333
|
-
return { loadAverage: oneMinute, cpus:
|
|
128603
|
+
return { loadAverage: oneMinute, cpus: import_node_os18.default.cpus().length };
|
|
128334
128604
|
}
|
|
128335
128605
|
|
|
128336
128606
|
// src/frontdoor/rcControl.ts
|
|
@@ -137045,7 +137315,7 @@ var Builder = class _Builder {
|
|
|
137045
137315
|
});
|
|
137046
137316
|
}
|
|
137047
137317
|
};
|
|
137048
|
-
var
|
|
137318
|
+
var os18 = Builder.create();
|
|
137049
137319
|
|
|
137050
137320
|
// node_modules/.pnpm/@orpc+openapi@2.0.0-beta.43/node_modules/@orpc/openapi/dist/index.mjs
|
|
137051
137321
|
var DEFS_REF_PREFIX = "#/$defs/";
|
|
@@ -137880,6 +138150,8 @@ var PoolPickCandidateViewSchema = external_exports.strictObject({
|
|
|
137880
138150
|
/** When an `ineligible` member can be used again, as an ISO instant. */
|
|
137881
138151
|
blockedUntil: external_exports.iso.datetime().optional(),
|
|
137882
138152
|
plan: PlanClassSchema,
|
|
138153
|
+
/** The provider the member was ranked on, when its launch spends one in place of its Claude account: its windows, refusals and plan are the provider's own. Absent when ranked on the Claude account. */
|
|
138154
|
+
provider: external_exports.string().optional(),
|
|
137883
138155
|
/** The facts behind the class and score, in the order they matter. */
|
|
137884
138156
|
reasons: external_exports.array(external_exports.string())
|
|
137885
138157
|
});
|
|
@@ -141793,7 +142065,7 @@ function doorApiBearer(headers) {
|
|
|
141793
142065
|
return typeof presented === "string" && presented.slice(0, bearerPrefix).toLowerCase() === "bearer " ? presented.slice(bearerPrefix) : void 0;
|
|
141794
142066
|
}
|
|
141795
142067
|
function doorApiAuth(expectedToken) {
|
|
141796
|
-
return
|
|
142068
|
+
return os18.$context().use(({ context, next }) => {
|
|
141797
142069
|
const token = doorApiBearer(context.headers);
|
|
141798
142070
|
if (token === void 0 || !isLiveCapability(token, [expectedToken])) {
|
|
141799
142071
|
throw new ORPCError("UNAUTHORIZED", { message: "the front door's typed API demands this generation's control token as a Bearer credential" });
|
|
@@ -142694,6 +142966,8 @@ var LaunchResolveInputSchema = external_exports.strictObject({
|
|
|
142694
142966
|
var LaunchPoolDecisionSchema = external_exports.strictObject({
|
|
142695
142967
|
name: external_exports.string(),
|
|
142696
142968
|
reasons: external_exports.readonly(external_exports.array(external_exports.string())),
|
|
142969
|
+
/** The provider the ranking read for the chosen member, when the launch spends one in place of the member's Claude account. */
|
|
142970
|
+
provider: external_exports.string().optional(),
|
|
142697
142971
|
movedOff: external_exports.strictObject({ identity: external_exports.string(), reason: external_exports.string() }).optional()
|
|
142698
142972
|
});
|
|
142699
142973
|
var LaunchDecisionSchema = external_exports.strictObject({
|
|
@@ -143304,7 +143578,7 @@ function createDoorHealthPublisher(hub, now, pid) {
|
|
|
143304
143578
|
}
|
|
143305
143579
|
|
|
143306
143580
|
// src/frontdoor/quotaExpiringEvents.ts
|
|
143307
|
-
|
|
143581
|
+
init_windowLengths();
|
|
143308
143582
|
var FINAL_SPAN_DENOMINATOR = 30;
|
|
143309
143583
|
var QUOTA_EXPIRING_WINDOW_FRACTION = 1 / FINAL_SPAN_DENOMINATOR;
|
|
143310
143584
|
function createQuotaExpiringPublisher(hub, deps) {
|
|
@@ -149367,7 +149641,7 @@ var realTranscriptReadPort = {
|
|
|
149367
149641
|
|
|
149368
149642
|
// src/supervise/sessionControlPlugin.ts
|
|
149369
149643
|
var import_node_fs29 = require("node:fs");
|
|
149370
|
-
var
|
|
149644
|
+
var import_node_os19 = require("node:os");
|
|
149371
149645
|
var import_node_path72 = __toESM(require("node:path"), 1);
|
|
149372
149646
|
init_realPorts();
|
|
149373
149647
|
var STAGED_PREFIX = "agent-shim-control-";
|
|
@@ -149386,7 +149660,7 @@ function removeAbandonedPlugins(parent, isRunning) {
|
|
|
149386
149660
|
}
|
|
149387
149661
|
}
|
|
149388
149662
|
function stageSessionControlPlugin(options = {}) {
|
|
149389
|
-
const parent = options.parent ?? (0,
|
|
149663
|
+
const parent = options.parent ?? (0, import_node_os19.tmpdir)();
|
|
149390
149664
|
removeAbandonedPlugins(parent, options.isRunning ?? realIsProcessRunning);
|
|
149391
149665
|
const directory = (0, import_node_fs29.mkdtempSync)(import_node_path72.default.join(parent, `${STAGED_PREFIX}${String(options.pid ?? process.pid)}-`));
|
|
149392
149666
|
const { ready, requests, results } = sessionControlPluginPaths(directory);
|
|
@@ -150521,7 +150795,7 @@ function realFrontDoorSupervisorPorts(paths, respawnGeneration, lifecycle, track
|
|
|
150521
150795
|
log(`catalogue keeper skipped provider ${name}: ${message}`);
|
|
150522
150796
|
}).map((entry) => [entry.name, entry.provider]),
|
|
150523
150797
|
readCache: (name, provider) => realFsPort.readFileUtf8(provider.kind === "codex" ? catalogueCachePath(paths, name, process.pid, catalogueGeneration) : catalogueCachePath(paths, name)),
|
|
150524
|
-
credentialFingerprint: (provider) => provider.kind === "codex" ? savedCatalogueFingerprint(provider, paths, process.env,
|
|
150798
|
+
credentialFingerprint: (provider) => provider.kind === "codex" ? savedCatalogueFingerprint(provider, paths, process.env, import_node_os20.default.homedir(), realFsPort.readFileUtf8) : void 0,
|
|
150525
150799
|
refresh: async (name) => {
|
|
150526
150800
|
await runChild({ paths, args: ["__refresh-catalogue", name, String(process.pid), catalogueGeneration], timeoutMs: CATALOGUE_REFRESH_TIMEOUT_MS });
|
|
150527
150801
|
},
|
|
@@ -150580,7 +150854,7 @@ function realFrontDoorSupervisorPorts(paths, respawnGeneration, lifecycle, track
|
|
|
150580
150854
|
paths,
|
|
150581
150855
|
registry: sessionRegistry,
|
|
150582
150856
|
ownPid: process.pid,
|
|
150583
|
-
codexHome: import_node_path73.default.resolve(codexHome(process.env,
|
|
150857
|
+
codexHome: import_node_path73.default.resolve(codexHome(process.env, import_node_os20.default.homedir())),
|
|
150584
150858
|
catalogueGeneration,
|
|
150585
150859
|
now: () => Date.now(),
|
|
150586
150860
|
sleep: async (ms) => {
|
|
@@ -150639,10 +150913,10 @@ function realFrontDoorSupervisorPorts(paths, respawnGeneration, lifecycle, track
|
|
|
150639
150913
|
frontDoorStatus: () => collectFrontDoorStatus(realFarmFs, realHeadroomSocketTrust, paths, realIsProcessRunning),
|
|
150640
150914
|
checkReport: (target, identity) => collectCheckReport({ paths, cwd: target, ...identity === void 0 ? {} : { identity }, env: process.env }),
|
|
150641
150915
|
doctorReport: () => collectDoctorReport({ paths, env: process.env }),
|
|
150642
|
-
// The pool table is read per call, not captured here, so a pool created or removed after the door started is ranked or refused by its live name the same moment the CLI would see it.
|
|
150916
|
+
// The pool table is read per call, not captured here, so a pool created or removed after the door started is ranked or refused by its live name the same moment the CLI would see it. The door's own environment is never a substitute for a caller's, so each member's provider is resolved from the directory's configuration and the member's own declaration alone.
|
|
150643
150917
|
poolPick: (pool, directory) => {
|
|
150644
150918
|
const pools = readPools(paths);
|
|
150645
|
-
return pools[pool] === void 0 ? void 0 : collectPoolPick({ paths, fs: realFsPort, usageFs: realFarmFs, poolName: pool, pools, directory, nowMs: Date.now() });
|
|
150919
|
+
return pools[pool] === void 0 ? void 0 : collectPoolPick({ paths, fs: realFsPort, usageFs: realFarmFs, poolName: pool, pools, directory, nowMs: Date.now(), providerOf: realMemberProviderResolver({ paths, cwd: directory, env: {} }) });
|
|
150646
150920
|
},
|
|
150647
150921
|
poolNames: () => Object.keys(readPools(paths)).sort(),
|
|
150648
150922
|
// A read-only resolution of what a launch from one directory would do: the launcher's own decision with its effects left out, so a read never recovers or resyncs a farm, starts a daemon, records a pool pick or runs a credential command.
|
|
@@ -150942,7 +151216,7 @@ function registerFrontDoorCommand(program2, deps) {
|
|
|
150942
151216
|
|
|
150943
151217
|
// src/statusline/commands.ts
|
|
150944
151218
|
var import_node_child_process9 = require("node:child_process");
|
|
150945
|
-
var
|
|
151219
|
+
var import_node_os22 = __toESM(require("node:os"), 1);
|
|
150946
151220
|
var import_node_path83 = __toESM(require("node:path"), 1);
|
|
150947
151221
|
init_commandDeps();
|
|
150948
151222
|
init_load();
|
|
@@ -151766,7 +152040,7 @@ function contextViewOf(frame) {
|
|
|
151766
152040
|
// src/statusline/ports.ts
|
|
151767
152041
|
init_blockingSpawn();
|
|
151768
152042
|
var import_node_fs31 = __toESM(require("node:fs"), 1);
|
|
151769
|
-
var
|
|
152043
|
+
var import_node_os21 = __toESM(require("node:os"), 1);
|
|
151770
152044
|
var import_node_path75 = __toESM(require("node:path"), 1);
|
|
151771
152045
|
|
|
151772
152046
|
// src/statusline/memoryUse.ts
|
|
@@ -151900,7 +152174,7 @@ function discard(target) {
|
|
|
151900
152174
|
}
|
|
151901
152175
|
}
|
|
151902
152176
|
function readMemoryUse() {
|
|
151903
|
-
const totalBytes =
|
|
152177
|
+
const totalBytes = import_node_os21.default.totalmem();
|
|
151904
152178
|
if (process.platform === "darwin") {
|
|
151905
152179
|
const output2 = runWithPipe(RUN_TIMEOUT_MS, "/usr/bin/vm_stat", [], process.cwd());
|
|
151906
152180
|
const usedBytes = output2 === void 0 ? void 0 : usedBytesFromVmStat(output2);
|
|
@@ -151910,13 +152184,13 @@ function readMemoryUse() {
|
|
|
151910
152184
|
const meminfo = readText("/proc/meminfo");
|
|
151911
152185
|
return meminfo === void 0 ? void 0 : memoryUseFromMeminfo(meminfo);
|
|
151912
152186
|
}
|
|
151913
|
-
return { usedBytes: totalBytes -
|
|
152187
|
+
return { usedBytes: totalBytes - import_node_os21.default.freemem(), totalBytes };
|
|
151914
152188
|
}
|
|
151915
152189
|
function realStatuslinePorts(env, stateDirectory, runTimeoutMs = RUN_TIMEOUT_MS) {
|
|
151916
152190
|
const { locale, timeZone } = Intl.DateTimeFormat().resolvedOptions();
|
|
151917
152191
|
return {
|
|
151918
152192
|
env,
|
|
151919
|
-
homeDirectory:
|
|
152193
|
+
homeDirectory: import_node_os21.default.homedir(),
|
|
151920
152194
|
stateDirectory,
|
|
151921
152195
|
clock: { locale, timeZone },
|
|
151922
152196
|
readText,
|
|
@@ -152374,8 +152648,8 @@ function saveCache(ports, file2, value3, nowMs) {
|
|
|
152374
152648
|
// src/statusline/dailyLedger.ts
|
|
152375
152649
|
var DAILY_LEDGER_DIRECTORY = "daily-cost";
|
|
152376
152650
|
var HOURS_PER_DAY9 = 24;
|
|
152377
|
-
var
|
|
152378
|
-
var SESSION_MAX_AGE_MS = HOURS_PER_DAY9 *
|
|
152651
|
+
var MS_PER_HOUR6 = 36e5;
|
|
152652
|
+
var SESSION_MAX_AGE_MS = HOURS_PER_DAY9 * MS_PER_HOUR6;
|
|
152379
152653
|
var LAST_SEEN_REFRESH_MS = SESSION_MAX_AGE_MS / HOURS_PER_DAY9;
|
|
152380
152654
|
var ENTRY_FILE = new RegExp(`^${CLIENT_SESSION_ID_PATTERN.source.slice(1, -1)}\\.json$`);
|
|
152381
152655
|
var DAY_NAME = /^\d{4}-\d{2}-\d{2}$/;
|
|
@@ -153752,7 +154026,7 @@ function promptCacheRow(context) {
|
|
|
153752
154026
|
}
|
|
153753
154027
|
|
|
153754
154028
|
// src/statusline/elements/rows/quota.ts
|
|
153755
|
-
|
|
154029
|
+
init_windowLengths();
|
|
153756
154030
|
init_graphemes();
|
|
153757
154031
|
|
|
153758
154032
|
// src/statusline/resetTime.ts
|
|
@@ -155600,7 +155874,7 @@ function registerStatuslineCommand(program2, deps) {
|
|
|
155600
155874
|
} else {
|
|
155601
155875
|
const configDir = process.env.CLAUDE_CONFIG_DIR;
|
|
155602
155876
|
try {
|
|
155603
|
-
account = readAccountMetadataFile(realFarmFs, configDir === void 0 || configDir === "" ? import_node_path83.default.join(
|
|
155877
|
+
account = readAccountMetadataFile(realFarmFs, configDir === void 0 || configDir === "" ? import_node_path83.default.join(import_node_os22.default.homedir(), ".claude.json") : import_node_path83.default.join(configDir, ".claude.json"));
|
|
155604
155878
|
} catch {
|
|
155605
155879
|
account = void 0;
|
|
155606
155880
|
}
|
|
@@ -155649,7 +155923,7 @@ function registerStatuslineCommand(program2, deps) {
|
|
|
155649
155923
|
});
|
|
155650
155924
|
return;
|
|
155651
155925
|
}
|
|
155652
|
-
const live = statuslineSettingsForRender({ env: process.env, cwd: process.cwd(), home:
|
|
155926
|
+
const live = statuslineSettingsForRender({ env: process.env, cwd: process.cwd(), home: import_node_os22.default.homedir(), paths: deps.paths, fs: { ...realFsPort, readConfigFile: cosmiconfigReader() } });
|
|
155653
155927
|
if (live.problem !== void 0) {
|
|
155654
155928
|
process.stderr.write(`agent-shim: statusline: ${live.problem}. Drawing with the defaults.
|
|
155655
155929
|
`);
|
|
@@ -155662,7 +155936,7 @@ function registerStatuslineCommand(program2, deps) {
|
|
|
155662
155936
|
let stackedUnderDefault = false;
|
|
155663
155937
|
if (isAntigravityPayload(payload)) {
|
|
155664
155938
|
try {
|
|
155665
|
-
stackedUnderDefault = antigravityStacksWithDefault(realFarmFs,
|
|
155939
|
+
stackedUnderDefault = antigravityStacksWithDefault(realFarmFs, import_node_os22.default.homedir());
|
|
155666
155940
|
} catch {
|
|
155667
155941
|
stackedUnderDefault = false;
|
|
155668
155942
|
}
|
|
@@ -166684,7 +166958,7 @@ init_zod();
|
|
|
166684
166958
|
|
|
166685
166959
|
// src/realCatalogueRefresh.ts
|
|
166686
166960
|
var import_node_path89 = __toESM(require("node:path"), 1);
|
|
166687
|
-
var
|
|
166961
|
+
var import_node_os23 = __toESM(require("node:os"), 1);
|
|
166688
166962
|
init_blockingSpawn();
|
|
166689
166963
|
init_translate2();
|
|
166690
166964
|
|
|
@@ -166758,7 +167032,7 @@ async function refreshCatalogueForReal(paths, name, env, ...owner) {
|
|
|
166758
167032
|
const provider = readProvider(paths, name);
|
|
166759
167033
|
const login = provider?.kind === "codex" ? resolveCodexConfig(provider.codex).login : void 0;
|
|
166760
167034
|
const configuredHome = env.CODEX_HOME;
|
|
166761
|
-
const home = configuredHome === void 0 || configuredHome === "" ? import_node_path89.default.join(
|
|
167035
|
+
const home = configuredHome === void 0 || configuredHome === "" ? import_node_path89.default.join(import_node_os23.default.homedir(), ".codex") : configuredHome;
|
|
166762
167036
|
const source = login === void 0 ? void 0 : login === "chatgpt-sign-in" ? paths.chatgptSignInFile : import_node_path89.default.resolve(home, "auth.json");
|
|
166763
167037
|
let revision = source === void 0 ? void 0 : realFsPort.fileRevision?.(source);
|
|
166764
167038
|
const codexAuth = login === void 0 ? void 0 : createCodexRoutePorts((line) => {
|
|
@@ -167160,9 +167434,10 @@ function registerPoolCommand(program2, deps) {
|
|
|
167160
167434
|
["agent-shim pool use subs"]
|
|
167161
167435
|
);
|
|
167162
167436
|
withExamples(
|
|
167163
|
-
pool.command("pick <name>").description("Show how a launch from this directory would rank the pool's members right now, and which it would run as. Read-only: it records nothing.").option("--json", "Print the ranking as JSON.").action((name, options) => {
|
|
167437
|
+
pool.command("pick <name>").description("Show how a launch from this directory would rank the pool's members right now, and which it would run as. Each member is ranked on the quota of the provider its launch would spend (the --provider flag, else the directory's configuration, else the member's own provider), or on its Claude account when that is none. Read-only: it records nothing.").option("--provider <name>", "Rank each member as a launch with `--provider <name>` would: on that provider's quota, whatever the member declares.").option("--no-provider", "Rank each member on its Claude account, as a launch with `--no-provider` would, whatever a provider is configured.").option("--json", "Print the ranking as JSON.").action((name, options) => {
|
|
167164
167438
|
const nowMs = Date.now();
|
|
167165
|
-
const
|
|
167439
|
+
const providerOf = realMemberProviderResolver({ paths, cwd: process.cwd(), env: process.env, ...options.provider === void 0 ? {} : { cliProvider: options.provider } });
|
|
167440
|
+
const report = collectPoolPick({ paths, fs: realFsPort, usageFs: realFarmFs, poolName: name, pools: readPools(paths), directory: process.cwd(), nowMs, providerOf });
|
|
167166
167441
|
if (options.json === true) {
|
|
167167
167442
|
printJson(report);
|
|
167168
167443
|
return;
|
|
@@ -167171,7 +167446,7 @@ function registerPoolCommand(program2, deps) {
|
|
|
167171
167446
|
console.log(line);
|
|
167172
167447
|
}
|
|
167173
167448
|
}),
|
|
167174
|
-
["agent-shim pool pick subs", "agent-shim pool pick subs --json"]
|
|
167449
|
+
["agent-shim pool pick subs", "agent-shim pool pick subs --provider spark", "agent-shim pool pick subs --json"]
|
|
167175
167450
|
);
|
|
167176
167451
|
}
|
|
167177
167452
|
|
|
@@ -167186,7 +167461,7 @@ init_providerCatalogue();
|
|
|
167186
167461
|
init_state();
|
|
167187
167462
|
init_modelPicker();
|
|
167188
167463
|
var import_node_fs37 = __toESM(require("node:fs"), 1);
|
|
167189
|
-
var
|
|
167464
|
+
var import_node_os24 = __toESM(require("node:os"), 1);
|
|
167190
167465
|
init_credential();
|
|
167191
167466
|
init_providerAliases();
|
|
167192
167467
|
|
|
@@ -167641,7 +167916,7 @@ function registerProviderCommand(program2, deps) {
|
|
|
167641
167916
|
}
|
|
167642
167917
|
if (cache2 === void 0) throw new UsageError(`No catalogue has been fetched for "${name}" yet; run \`agent-shim provider models ${name} --refresh\`.`);
|
|
167643
167918
|
if (options.refresh !== true && cache2.supervisorPid !== pid) throw new UsageError(`The catalogue for "${name}" belongs to a different front door; refresh it before reading.`);
|
|
167644
|
-
const fingerprint = options.refresh === true ? void 0 : savedCatalogueFingerprint(found, paths, env,
|
|
167919
|
+
const fingerprint = options.refresh === true ? void 0 : savedCatalogueFingerprint(found, paths, env, import_node_os24.default.homedir(), realFsPort.readFileUtf8);
|
|
167645
167920
|
if (options.refresh !== true && (fingerprint === void 0 || cache2.credentialFingerprint !== fingerprint)) throw new UsageError(`The catalogue for "${name}" belongs to a different Codex account; refresh it before reading.`);
|
|
167646
167921
|
const listed2 = providerModelRows(found, cache2.models).map((row) => row.model);
|
|
167647
167922
|
if (options.json === true) {
|
|
@@ -168102,7 +168377,7 @@ function registerRuleCommand(program2, deps) {
|
|
|
168102
168377
|
// src/codex/launch.ts
|
|
168103
168378
|
var import_node_crypto36 = require("node:crypto");
|
|
168104
168379
|
var import_node_fs39 = __toESM(require("node:fs"), 1);
|
|
168105
|
-
var
|
|
168380
|
+
var import_node_os25 = __toESM(require("node:os"), 1);
|
|
168106
168381
|
var import_node_path93 = __toESM(require("node:path"), 1);
|
|
168107
168382
|
init_cliError();
|
|
168108
168383
|
init_claudeShim();
|
|
@@ -168304,7 +168579,7 @@ async function runCodex(paths, argv) {
|
|
|
168304
168579
|
}
|
|
168305
168580
|
throw new UsageError("No real Codex CLI found on PATH. Install Codex or set AGENT_SHIM_CODEX_BIN to its executable.");
|
|
168306
168581
|
};
|
|
168307
|
-
const plan = prepareCodexLaunch({ paths, argv, env: process.env, cwd: import_node_fs39.default.realpathSync(process.cwd()), home:
|
|
168582
|
+
const plan = prepareCodexLaunch({ paths, argv, env: process.env, cwd: import_node_fs39.default.realpathSync(process.cwd()), home: import_node_os25.default.homedir(), fs: realFarmFs, read: cosmiconfigReader(), resolveBinary, now: Date.now, pid: process.pid, isRunning: realIsProcessRunning, sleep: realSleepSync, uniqueSuffix: `${String(process.pid)}.${(0, import_node_crypto36.randomUUID)()}`, warn: (message) => {
|
|
168308
168583
|
console.error(`agent-shim: ${message}`);
|
|
168309
168584
|
}, ...resolveGitBranch(realRunPort, process.cwd()) });
|
|
168310
168585
|
import_node_fs39.default.chmodSync(plan.env.CODEX_HOME ?? "", PRIVATE_DIRECTORY_MODE);
|
|
@@ -168755,6 +169030,7 @@ init_configProfilesStore();
|
|
|
168755
169030
|
|
|
168756
169031
|
// src/launchPicker.ts
|
|
168757
169032
|
init_identityStore();
|
|
169033
|
+
init_memberProvider();
|
|
168758
169034
|
|
|
168759
169035
|
// src/launcher/pickerPrompt.ts
|
|
168760
169036
|
function promptsIdentityPicker(prompts) {
|
|
@@ -168837,7 +169113,7 @@ function memberTexts(member, nowMs) {
|
|
|
168837
169113
|
if (member === void 0) {
|
|
168838
169114
|
return {};
|
|
168839
169115
|
}
|
|
168840
|
-
const billing = { login: member.account, snapshot: member.snapshot, provider:
|
|
169116
|
+
const billing = { login: member.account, snapshot: member.snapshot, provider: member.provider, nowMs };
|
|
168841
169117
|
const account = accountRows(billing)[0]?.value;
|
|
168842
169118
|
const quotaRow2 = quotaRows(billing)[0];
|
|
168843
169119
|
return {
|
|
@@ -168869,11 +169145,12 @@ function poolContext(params, poolName, resuming, nowMs) {
|
|
|
168869
169145
|
nowMs,
|
|
168870
169146
|
resuming,
|
|
168871
169147
|
identityIdOf: identityIdOf2,
|
|
169148
|
+
...params.providerOf === void 0 ? {} : { providerOf: params.providerOf },
|
|
168872
169149
|
...sticky === void 0 ? {} : { sticky }
|
|
168873
169150
|
});
|
|
168874
169151
|
const pick2 = ranking.pick?.identity;
|
|
168875
169152
|
const named = [.../* @__PURE__ */ new Set([...ranking.candidates.map((candidate) => candidate.identity), ...sticky === void 0 ? [] : [sticky.identity]])].filter(isIdentityName);
|
|
168876
|
-
const members2 = loadPoolMembers(usageFs, paths, named, nowMs, identityIdOf2);
|
|
169153
|
+
const members2 = loadPoolMembers(usageFs, paths, named, nowMs, identityIdOf2, params.providerOf);
|
|
168877
169154
|
const changes = pick2 !== void 0 && sticky !== void 0 && sticky.identity !== pick2 && accountsDiffer(members2, sticky.identity, pick2);
|
|
168878
169155
|
return {
|
|
168879
169156
|
selection: { kind: "pool", outcome: pick2 === void 0 ? "none-eligible" : changes ? "changes-account" : "keeps-account" },
|
|
@@ -168908,7 +169185,7 @@ function poolMessage(reason, poolName, pick2, sticky) {
|
|
|
168908
169185
|
}
|
|
168909
169186
|
function identityContext(params, resuming, nowMs) {
|
|
168910
169187
|
const { paths, usageFs } = params;
|
|
168911
|
-
const members2 = loadPoolMembers(usageFs, paths, params.identityNames(), nowMs, identityIdResolver(paths.identitiesDir, params.fs));
|
|
169188
|
+
const members2 = loadPoolMembers(usageFs, paths, params.identityNames(), nowMs, identityIdResolver(paths.identitiesDir, params.fs), params.providerOf);
|
|
168912
169189
|
const { candidates } = rankPool({ members: members2, nowMs, resuming, preference: "listed" });
|
|
168913
169190
|
const named = params.decision.name;
|
|
168914
169191
|
const limited = named !== void 0 && candidates.some((candidate) => candidate.identity === named && candidate.class === "ineligible");
|
|
@@ -168987,6 +169264,17 @@ async function pickLaunchIdentity(params) {
|
|
|
168987
169264
|
cwd: params.farm.runtime.cwd,
|
|
168988
169265
|
now: params.farm.runtime.now,
|
|
168989
169266
|
identityNames: () => listIdentities(params.paths).flatMap((listing) => "problem" in listing ? [] : [listing.name]),
|
|
169267
|
+
// The picker ranks on what the launch will spend, so each identity is judged on the provider the launch resolves for it.
|
|
169268
|
+
providerOf: memberProviderResolver({
|
|
169269
|
+
paths: params.paths,
|
|
169270
|
+
fs: realFsPort,
|
|
169271
|
+
env: params.env,
|
|
169272
|
+
cliProvider: params.parsed.provider,
|
|
169273
|
+
...params.parsed.configProfile === void 0 ? {} : { cliFlagConfigProfile: params.parsed.configProfile },
|
|
169274
|
+
...params.farm.directoryConfigProfile === void 0 ? {} : { directoryRuleConfigProfile: params.farm.directoryConfigProfile },
|
|
169275
|
+
...params.farm.globalDefaultConfigProfile === void 0 ? {} : { globalDefaultConfigProfile: params.farm.globalDefaultConfigProfile },
|
|
169276
|
+
loadCascade: (baseConfigProfile) => params.farm.runtime.loadCascade(baseConfigProfile, void 0)
|
|
169277
|
+
}),
|
|
168990
169278
|
picker: promptsIdentityPicker(realPromptsPort)
|
|
168991
169279
|
});
|
|
168992
169280
|
}
|
|
@@ -169035,7 +169323,7 @@ async function refreshPools(params) {
|
|
|
169035
169323
|
await refreshStalePoolMembers({
|
|
169036
169324
|
poolNames: params.poolNames,
|
|
169037
169325
|
pools: readPools(paths),
|
|
169038
|
-
loadMembers: (identities) => loadPoolMembers(realFarmFs, paths, identities, Date.now(), (name) => identityIdOf(paths, name)),
|
|
169326
|
+
loadMembers: (identities) => loadPoolMembers(realFarmFs, paths, identities, Date.now(), (name) => identityIdOf(paths, name), params.providerOf),
|
|
169039
169327
|
refresher
|
|
169040
169328
|
});
|
|
169041
169329
|
}
|
|
@@ -169066,7 +169354,7 @@ init_resumeContext();
|
|
|
169066
169354
|
|
|
169067
169355
|
// src/supervise/compactionDeps.ts
|
|
169068
169356
|
init_lock();
|
|
169069
|
-
|
|
169357
|
+
init_windowLengths();
|
|
169070
169358
|
init_read();
|
|
169071
169359
|
|
|
169072
169360
|
// src/supervise/compaction.ts
|
|
@@ -170077,10 +170365,20 @@ async function runClaude(argvOverride) {
|
|
|
170077
170365
|
}
|
|
170078
170366
|
}
|
|
170079
170367
|
const refreshUsage = async (poolName2) => {
|
|
170080
|
-
|
|
170368
|
+
if (poolName2 === void 0) {
|
|
170369
|
+
return;
|
|
170370
|
+
}
|
|
170371
|
+
const providerOf = realMemberProviderResolver({
|
|
170372
|
+
paths,
|
|
170373
|
+
cwd: process.cwd(),
|
|
170374
|
+
env: procForDecision.env,
|
|
170375
|
+
...nativeArgv.provider === void 0 ? {} : { cliProvider: nativeArgv.provider },
|
|
170376
|
+
...nativeArgv.configProfile === void 0 ? {} : { cliFlagConfigProfile: nativeArgv.configProfile }
|
|
170377
|
+
});
|
|
170378
|
+
await refreshPools({ paths, cwd: process.cwd(), poolNames: [poolName2], spawnDaemon: spawnDetachedSupervisor, log: realLogPort.warn, providerOf });
|
|
170081
170379
|
};
|
|
170082
170380
|
await refreshUsage(identityDecision.pool);
|
|
170083
|
-
const picked = await pickLaunchIdentity({ paths, farm, parsed: nativeArgv, decision: identityDecision });
|
|
170381
|
+
const picked = await pickLaunchIdentity({ paths, farm, parsed: nativeArgv, decision: identityDecision, env: procForDecision.env });
|
|
170084
170382
|
if (picked.kind === "cancelled") {
|
|
170085
170383
|
throw new IdentityPickerCancelledError();
|
|
170086
170384
|
}
|