claude-use 12.0.1 → 12.2.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 +734 -298
- package/dist/index.cjs +711 -372
- package/dist/index.mjs +695 -357
- package/dist/types/index.d.ts +123 -14
- 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");
|
|
@@ -28293,6 +28293,8 @@ var init_schema = __esm({
|
|
|
28293
28293
|
kind: external_exports.literal("http").optional(),
|
|
28294
28294
|
displayName: external_exports.string().min(1),
|
|
28295
28295
|
baseUrl: external_exports.url(),
|
|
28296
|
+
/** How long opening a TCP connection to `baseUrl` may take before the provider counts as unreachable: the door's forwarding gives up and answers naming the provider, and `doctor`, `check` and a launch's probe are bounded by it. Defaults to `DEFAULT_PROVIDER_CONNECT_TIMEOUT_MS`. Bounds the connect only, never the wait for the answer. */
|
|
28297
|
+
connectTimeoutMs: external_exports.int().positive().optional(),
|
|
28296
28298
|
credential: ProviderCredentialSchema,
|
|
28297
28299
|
env: ProviderEnvSchema.optional(),
|
|
28298
28300
|
/** Extra models `/model` lists beside the ones the tier settings name. */
|
|
@@ -33359,6 +33361,23 @@ function identityIdResolver(identitiesDir, fs37) {
|
|
|
33359
33361
|
return identityIdIn(records, name);
|
|
33360
33362
|
};
|
|
33361
33363
|
}
|
|
33364
|
+
function identityReader(identitiesDir, fs37) {
|
|
33365
|
+
const read = /* @__PURE__ */ new Map();
|
|
33366
|
+
const readOnce = (file2) => {
|
|
33367
|
+
if (!read.has(file2)) {
|
|
33368
|
+
read.set(file2, fs37.readConfigFile(file2));
|
|
33369
|
+
}
|
|
33370
|
+
return read.get(file2);
|
|
33371
|
+
};
|
|
33372
|
+
const idOf = identityIdResolver(identitiesDir, { readdir: fs37.readdir, readConfigFile: readOnce });
|
|
33373
|
+
return {
|
|
33374
|
+
idOf,
|
|
33375
|
+
load: (name) => {
|
|
33376
|
+
const id2 = idOf(name);
|
|
33377
|
+
return id2 === void 0 ? void 0 : loadConfigFile(import_node_path15.default.join(identitiesDir, id2, IDENTITY_FILE), IdentitySchema, readOnce)?.config;
|
|
33378
|
+
}
|
|
33379
|
+
};
|
|
33380
|
+
}
|
|
33362
33381
|
function loadIdentity(identitiesDir, name, fs37) {
|
|
33363
33382
|
if (!isFileName(name)) {
|
|
33364
33383
|
throw new UnsafeNameError(name, "identity", FILE_NAME_RULE);
|
|
@@ -36357,7 +36376,8 @@ var init_conditions = __esm({
|
|
|
36357
36376
|
function candidateHeading(candidate) {
|
|
36358
36377
|
const score = candidate.score === void 0 ? "" : ` score ${candidate.score.toFixed(2)}${candidate.scoreWindow === "fiveHour" ? " by 5h reset" : " by 7d reset"}`;
|
|
36359
36378
|
const dry = candidate.feasible ? "" : " (5h would run dry)";
|
|
36360
|
-
|
|
36379
|
+
const onProvider = candidate.provider === void 0 ? "" : ` on provider ${candidate.provider}`;
|
|
36380
|
+
return `[${candidate.class}${score}]${dry}${onProvider}`;
|
|
36361
36381
|
}
|
|
36362
36382
|
function percent(fraction) {
|
|
36363
36383
|
return `${String(Math.round(fraction * PERCENT))}%`;
|
|
@@ -36399,6 +36419,9 @@ function planOf(account) {
|
|
|
36399
36419
|
}
|
|
36400
36420
|
return { kind: "subscription", capacity: 1, recognised: BASE_TIER.test(tier), ...tierField };
|
|
36401
36421
|
}
|
|
36422
|
+
function planOfProviderQuota(quota) {
|
|
36423
|
+
return planOf(quota?.level === void 0 ? void 0 : { organizationRateLimitTier: quota.level });
|
|
36424
|
+
}
|
|
36402
36425
|
var PlanClassSchema, TIER_MULTIPLIER, ZERO_TIER, BASE_TIER;
|
|
36403
36426
|
var init_plan = __esm({
|
|
36404
36427
|
"src/usage/plan.ts"() {
|
|
@@ -36944,12 +36967,58 @@ var init_middleware = __esm({
|
|
|
36944
36967
|
}
|
|
36945
36968
|
});
|
|
36946
36969
|
|
|
36970
|
+
// src/usage/windowLengths.ts
|
|
36971
|
+
var MS_PER_HOUR2, HOURS_PER_DAY3, FIVE_HOURS, SEVEN_DAYS, FIVE_HOUR_WINDOW_MS, SEVEN_DAY_WINDOW_MS;
|
|
36972
|
+
var init_windowLengths = __esm({
|
|
36973
|
+
"src/usage/windowLengths.ts"() {
|
|
36974
|
+
"use strict";
|
|
36975
|
+
MS_PER_HOUR2 = 36e5;
|
|
36976
|
+
HOURS_PER_DAY3 = 24;
|
|
36977
|
+
FIVE_HOURS = 5;
|
|
36978
|
+
SEVEN_DAYS = 7;
|
|
36979
|
+
FIVE_HOUR_WINDOW_MS = FIVE_HOURS * MS_PER_HOUR2;
|
|
36980
|
+
SEVEN_DAY_WINDOW_MS = SEVEN_DAYS * HOURS_PER_DAY3 * MS_PER_HOUR2;
|
|
36981
|
+
}
|
|
36982
|
+
});
|
|
36983
|
+
|
|
36984
|
+
// src/usage/providerWindows.ts
|
|
36985
|
+
function bindingWindow(quota, periodMs) {
|
|
36986
|
+
const same2 = quota.windows.filter((window) => window.periodMs === periodMs);
|
|
36987
|
+
const tightest = same2.reduce((binding, window) => binding === void 0 || window.utilization > binding.utilization ? window : binding, void 0);
|
|
36988
|
+
if (tightest === void 0) {
|
|
36989
|
+
return void 0;
|
|
36990
|
+
}
|
|
36991
|
+
return { utilization: tightest.utilization, ...tightest.resetsAt === void 0 ? {} : { resetsAt: tightest.resetsAt }, status: tightest.utilization >= 1 ? "rejected" : "allowed" };
|
|
36992
|
+
}
|
|
36993
|
+
function unifiedFromQuota(quota) {
|
|
36994
|
+
const fiveHour = bindingWindow(quota, FIVE_HOUR_WINDOW_MS);
|
|
36995
|
+
const sevenDay = bindingWindow(quota, SEVEN_DAY_WINDOW_MS);
|
|
36996
|
+
return fiveHour === void 0 && sevenDay === void 0 ? void 0 : { ...fiveHour === void 0 ? {} : { fiveHour }, ...sevenDay === void 0 ? {} : { sevenDay } };
|
|
36997
|
+
}
|
|
36998
|
+
function rankingWindowsOf(provider, state) {
|
|
36999
|
+
const recorded = state?.rateLimit;
|
|
37000
|
+
if (provider === void 0) {
|
|
37001
|
+
return recorded?.unified === void 0 ? void 0 : { unified: recorded.unified, observedAt: recorded.observedAt };
|
|
37002
|
+
}
|
|
37003
|
+
if (recorded?.unified !== void 0 && (recorded.unified.fiveHour !== void 0 || recorded.unified.sevenDay !== void 0)) {
|
|
37004
|
+
return { unified: recorded.unified, observedAt: recorded.observedAt };
|
|
37005
|
+
}
|
|
37006
|
+
const pulled = state?.quota === void 0 ? void 0 : unifiedFromQuota(state.quota);
|
|
37007
|
+
return state?.quota === void 0 || pulled === void 0 ? void 0 : { unified: pulled, observedAt: state.quota.observedAt };
|
|
37008
|
+
}
|
|
37009
|
+
var init_providerWindows = __esm({
|
|
37010
|
+
"src/usage/providerWindows.ts"() {
|
|
37011
|
+
"use strict";
|
|
37012
|
+
init_windowLengths();
|
|
37013
|
+
}
|
|
37014
|
+
});
|
|
37015
|
+
|
|
36947
37016
|
// src/usage/quotaFacts.ts
|
|
36948
37017
|
function windowFacts(window, nowMs) {
|
|
36949
37018
|
if (window?.utilization === void 0 || window.resetsAt === void 0) {
|
|
36950
37019
|
return void 0;
|
|
36951
37020
|
}
|
|
36952
|
-
return { remaining: Math.max(0, 1 - window.utilization), utilization: window.utilization, hoursUntilReset: Math.max(0, (Date.parse(window.resetsAt) - nowMs) /
|
|
37021
|
+
return { remaining: Math.max(0, 1 - window.utilization), utilization: window.utilization, hoursUntilReset: Math.max(0, (Date.parse(window.resetsAt) - nowMs) / MS_PER_HOUR3) };
|
|
36953
37022
|
}
|
|
36954
37023
|
function quotaFactsOf(unified, nowMs) {
|
|
36955
37024
|
const fiveHour = windowFacts(unified?.fiveHour, nowMs);
|
|
@@ -36957,19 +37026,16 @@ function quotaFactsOf(unified, nowMs) {
|
|
|
36957
37026
|
const extraUsage = windowFacts(unified === void 0 ? void 0 : soleOverageWindow(unified), nowMs);
|
|
36958
37027
|
return { ...fiveHour === void 0 ? {} : { fiveHour }, ...sevenDay === void 0 ? {} : { sevenDay }, ...extraUsage === void 0 ? {} : { extraUsage } };
|
|
36959
37028
|
}
|
|
36960
|
-
var
|
|
37029
|
+
var MS_PER_HOUR3;
|
|
36961
37030
|
var init_quotaFacts = __esm({
|
|
36962
37031
|
"src/usage/quotaFacts.ts"() {
|
|
36963
37032
|
"use strict";
|
|
36964
37033
|
init_rateLimit();
|
|
36965
|
-
|
|
37034
|
+
MS_PER_HOUR3 = 36e5;
|
|
36966
37035
|
}
|
|
36967
37036
|
});
|
|
36968
37037
|
|
|
36969
37038
|
// src/usage/pick.ts
|
|
36970
|
-
function unifiedOf(state) {
|
|
36971
|
-
return state?.rateLimit?.unified;
|
|
36972
|
-
}
|
|
36973
37039
|
function limitBlockedUntil(state, nowMs) {
|
|
36974
37040
|
const limit = state?.lastLimit;
|
|
36975
37041
|
if (state === void 0 || limit === void 0) {
|
|
@@ -37059,6 +37125,10 @@ function assessRefusedNested(member, nested, nowMs) {
|
|
|
37059
37125
|
};
|
|
37060
37126
|
}
|
|
37061
37127
|
function assess(member, nowMs) {
|
|
37128
|
+
const assessment = assessMember(member, nowMs);
|
|
37129
|
+
return member.provider === void 0 ? assessment : { ...assessment, candidate: { ...assessment.candidate, provider: member.provider } };
|
|
37130
|
+
}
|
|
37131
|
+
function assessMember(member, nowMs) {
|
|
37062
37132
|
if (member.sameLoginAs !== void 0) {
|
|
37063
37133
|
return { candidate: { identity: member.identity, class: "ineligible", plan: planOf(member.account), reasons: [`same login as ${member.sameLoginAs}`] } };
|
|
37064
37134
|
}
|
|
@@ -37072,22 +37142,43 @@ function assess(member, nowMs) {
|
|
|
37072
37142
|
const assessment = assessIdentity(member, nowMs);
|
|
37073
37143
|
return { ...assessment, candidate: { ...assessment.candidate, reasons: [`picked by pool "${nested.pool}"`, ...nested.reasons] } };
|
|
37074
37144
|
}
|
|
37145
|
+
function sliceOf(member) {
|
|
37146
|
+
return member.snapshot?.providers[member.provider ?? ANTHROPIC_PROVIDER];
|
|
37147
|
+
}
|
|
37148
|
+
function assessProviderWithoutWindows(member, provider, state, base, planReasons, nowMs) {
|
|
37149
|
+
const blockedUntil = limitBlockedUntil(state, nowMs);
|
|
37150
|
+
if (blockedUntil !== void 0) {
|
|
37151
|
+
return { candidate: { ...base, class: "ineligible", blockedUntilMs: blockedUntil, reasons: [`refused until ${new Date(blockedUntil).toISOString()} (in ${formatAge(blockedUntil - nowMs)})`, ...planReasons] } };
|
|
37152
|
+
}
|
|
37153
|
+
if (base.plan.kind === "pay-per-use") {
|
|
37154
|
+
return { candidate: { ...base, class: "pay-per-use", usageUnrecorded: true, reasons: [...planReasons, `provider ${provider} reports no plan windows, so its spend is not tracked`] } };
|
|
37155
|
+
}
|
|
37156
|
+
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`;
|
|
37157
|
+
return { candidate: { ...base, class: "unknown", reasons: [why, ...planReasons] } };
|
|
37158
|
+
}
|
|
37075
37159
|
function assessIdentity(member, nowMs) {
|
|
37076
|
-
const
|
|
37160
|
+
const state = sliceOf(member);
|
|
37161
|
+
const plan = member.provider === void 0 ? planOf(member.account) : planOfProviderQuota(state?.quota);
|
|
37077
37162
|
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`];
|
|
37078
37163
|
const base = { identity: member.identity, plan };
|
|
37079
37164
|
if (member.readError !== void 0) {
|
|
37080
37165
|
return { candidate: { ...base, class: "unknown", reasons: [`usage state unreadable: ${member.readError}`, ...planReasons] } };
|
|
37081
37166
|
}
|
|
37082
|
-
|
|
37083
|
-
|
|
37084
|
-
|
|
37167
|
+
if (member.providerError !== void 0) {
|
|
37168
|
+
return { candidate: { ...base, class: "unknown", reasons: [`provider configuration unreadable: ${member.providerError}`, ...planReasons] } };
|
|
37169
|
+
}
|
|
37170
|
+
const windows = rankingWindowsOf(member.provider, state);
|
|
37171
|
+
if (member.snapshot === void 0 || state === void 0 || windows === void 0) {
|
|
37172
|
+
if (member.provider !== void 0) {
|
|
37173
|
+
return assessProviderWithoutWindows(member, member.provider, state, base, planReasons, nowMs);
|
|
37174
|
+
}
|
|
37085
37175
|
if (plan.kind === "pay-per-use") {
|
|
37086
37176
|
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)"] } };
|
|
37087
37177
|
}
|
|
37088
37178
|
return { candidate: { ...base, class: "unknown", reasons: ["no usage recorded yet, so its quota is unknown (turn on trackUsage for it)", ...planReasons] } };
|
|
37089
37179
|
}
|
|
37090
|
-
const
|
|
37180
|
+
const { unified } = windows;
|
|
37181
|
+
const observedAgo = ` (last seen ${formatAge(nowMs - Date.parse(windows.observedAt))} ago)`;
|
|
37091
37182
|
const fiveHourWindow = unified.fiveHour;
|
|
37092
37183
|
const sevenDayWindow = unified.sevenDay;
|
|
37093
37184
|
const five = fiveHourWindow === void 0 ? void 0 : effectiveWindow(fiveHourWindow, nowMs);
|
|
@@ -37099,6 +37190,15 @@ function assessIdentity(member, nowMs) {
|
|
|
37099
37190
|
const overageWindow = soleOverageWindow(unified);
|
|
37100
37191
|
const overage = overageWindow === void 0 ? void 0 : effectiveWindow(overageWindow, nowMs);
|
|
37101
37192
|
const overageReasons = overageWindow === void 0 || overage === void 0 ? [] : [describeWindow("extra usage", overageWindow, overage, nowMs)];
|
|
37193
|
+
if (member.provider !== void 0) {
|
|
37194
|
+
const spent = [
|
|
37195
|
+
{ name: "5h", window: five },
|
|
37196
|
+
{ name: "7d", window: seven }
|
|
37197
|
+
].filter(({ window }) => window?.status === "rejected" && window.resetsAtMs === void 0).map(({ name }) => name);
|
|
37198
|
+
if (spent.length > 0) {
|
|
37199
|
+
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] } };
|
|
37200
|
+
}
|
|
37201
|
+
}
|
|
37102
37202
|
const blockedUntil = Math.max(
|
|
37103
37203
|
windowBlockedUntil([five, seven, overage].flatMap((window) => window === void 0 ? [] : [window])) ?? 0,
|
|
37104
37204
|
limitBlockedUntil(state, nowMs) ?? 0
|
|
@@ -37119,11 +37219,11 @@ function assessIdentity(member, nowMs) {
|
|
|
37119
37219
|
}
|
|
37120
37220
|
const remaining = Math.max(0, 1 - basis.window.utilization);
|
|
37121
37221
|
const untilResetMs = basis.window.resetsAtMs === void 0 ? basis.windowMs : Math.max(basis.window.resetsAtMs - nowMs, MS_PER_SECOND4);
|
|
37122
|
-
const weeklyScore = remaining * plan.capacity / (untilResetMs /
|
|
37222
|
+
const weeklyScore = remaining * plan.capacity / (untilResetMs / MS_PER_HOUR4);
|
|
37123
37223
|
const fiveRemaining = five?.utilization === void 0 ? void 0 : Math.max(0, 1 - five.utilization);
|
|
37124
37224
|
const fiveUntil = five?.resetsAtMs === void 0 ? FIVE_HOUR_WINDOW_MS : Math.max(five.resetsAtMs - nowMs, MS_PER_SECOND4);
|
|
37125
37225
|
const ratio = windowRatio(member.records);
|
|
37126
|
-
const fiveHourScore = basis.name === "sevenDay" && fiveRemaining !== void 0 && ratio !== void 0 ? Math.min(fiveRemaining * ratio, remaining) * plan.capacity / (fiveUntil /
|
|
37226
|
+
const fiveHourScore = basis.name === "sevenDay" && fiveRemaining !== void 0 && ratio !== void 0 ? Math.min(fiveRemaining * ratio, remaining) * plan.capacity / (fiveUntil / MS_PER_HOUR4) : void 0;
|
|
37127
37227
|
const fiveHourLeads = fiveHourScore !== void 0 && fiveHourScore > weeklyScore;
|
|
37128
37228
|
const score = fiveHourLeads ? fiveHourScore : weeklyScore;
|
|
37129
37229
|
const scoreWindow = fiveHourLeads ? "fiveHour" : basis.name;
|
|
@@ -37141,15 +37241,15 @@ function assessIdentity(member, nowMs) {
|
|
|
37141
37241
|
};
|
|
37142
37242
|
}
|
|
37143
37243
|
function poolFactsOf(member, nowMs, resuming, sticky) {
|
|
37144
|
-
const { fiveHour, sevenDay, extraUsage } = quotaFactsOf(member.
|
|
37244
|
+
const { fiveHour, sevenDay, extraUsage } = quotaFactsOf(rankingWindowsOf(member.provider, sliceOf(member))?.unified, nowMs);
|
|
37145
37245
|
const burn = windowBurn(member.records, "fiveHour");
|
|
37146
37246
|
return {
|
|
37147
37247
|
...fiveHour === void 0 ? {} : { fiveHour },
|
|
37148
37248
|
...sevenDay === void 0 ? {} : { sevenDay },
|
|
37149
37249
|
...extraUsage === void 0 ? {} : { extraUsage },
|
|
37150
|
-
...burn === void 0 ? {} : { burnPerHour: burn *
|
|
37250
|
+
...burn === void 0 ? {} : { burnPerHour: burn * MS_PER_HOUR4 },
|
|
37151
37251
|
resuming,
|
|
37152
|
-
...sticky?.identity === member.identity ? { lastPickHoursAgo: Math.max(0, (nowMs - Date.parse(sticky.at)) /
|
|
37252
|
+
...sticky?.identity === member.identity ? { lastPickHoursAgo: Math.max(0, (nowMs - Date.parse(sticky.at)) / MS_PER_HOUR4) } : {}
|
|
37153
37253
|
};
|
|
37154
37254
|
}
|
|
37155
37255
|
function rankPool(input2) {
|
|
@@ -37244,7 +37344,7 @@ function rankPool(input2) {
|
|
|
37244
37344
|
...holdForReturn === void 0 ? {} : { holdForReturn }
|
|
37245
37345
|
};
|
|
37246
37346
|
}
|
|
37247
|
-
var MS_PER_SECOND4,
|
|
37347
|
+
var MS_PER_SECOND4, MS_PER_HOUR4, PROMPT_CACHE_TTL_HOURS, PROMPT_CACHE_TTL_MS, CLASS_ORDER;
|
|
37248
37348
|
var init_pick = __esm({
|
|
37249
37349
|
"src/usage/pick.ts"() {
|
|
37250
37350
|
"use strict";
|
|
@@ -37253,17 +37353,14 @@ var init_pick = __esm({
|
|
|
37253
37353
|
init_plan();
|
|
37254
37354
|
init_middleware();
|
|
37255
37355
|
init_preflight();
|
|
37356
|
+
init_providerWindows();
|
|
37256
37357
|
init_quotaFacts();
|
|
37358
|
+
init_windowLengths();
|
|
37257
37359
|
init_rateLimit();
|
|
37258
37360
|
MS_PER_SECOND4 = 1e3;
|
|
37259
|
-
|
|
37260
|
-
HOURS_PER_DAY3 = 24;
|
|
37261
|
-
FIVE_HOURS = 5;
|
|
37361
|
+
MS_PER_HOUR4 = 36e5;
|
|
37262
37362
|
PROMPT_CACHE_TTL_HOURS = 1;
|
|
37263
|
-
|
|
37264
|
-
FIVE_HOUR_WINDOW_MS = FIVE_HOURS * MS_PER_HOUR3;
|
|
37265
|
-
SEVEN_DAY_WINDOW_MS = SEVEN_DAYS * HOURS_PER_DAY3 * MS_PER_HOUR3;
|
|
37266
|
-
PROMPT_CACHE_TTL_MS = PROMPT_CACHE_TTL_HOURS * MS_PER_HOUR3;
|
|
37363
|
+
PROMPT_CACHE_TTL_MS = PROMPT_CACHE_TTL_HOURS * MS_PER_HOUR4;
|
|
37267
37364
|
CLASS_ORDER = { scored: 0, unknown: 1, "pay-per-use": 2, ineligible: 3 };
|
|
37268
37365
|
}
|
|
37269
37366
|
});
|
|
@@ -37398,7 +37495,7 @@ var init_store2 = __esm({
|
|
|
37398
37495
|
function errorMessage(error63) {
|
|
37399
37496
|
return error63 instanceof Error ? error63.message : String(error63);
|
|
37400
37497
|
}
|
|
37401
|
-
function loadPoolMembers(fs37, paths, identities, nowMs, idOf) {
|
|
37498
|
+
function loadPoolMembers(fs37, paths, identities, nowMs, idOf, providerOf) {
|
|
37402
37499
|
const windowStartMs = nowMs - FIVE_HOUR_WINDOW_MS;
|
|
37403
37500
|
const log = readUsageLog(fs37, paths.usageLogDir, { sinceMs: windowStartMs });
|
|
37404
37501
|
return identities.map((identity) => {
|
|
@@ -37406,14 +37503,20 @@ function loadPoolMembers(fs37, paths, identities, nowMs, idOf) {
|
|
|
37406
37503
|
if (id2 === void 0) {
|
|
37407
37504
|
return { identity, records: [] };
|
|
37408
37505
|
}
|
|
37409
|
-
const
|
|
37506
|
+
const resolved = providerOf?.(identity);
|
|
37507
|
+
const provider = typeof resolved === "object" ? resolved.named : resolved;
|
|
37508
|
+
const providerField = {
|
|
37509
|
+
...provider === void 0 ? {} : { provider },
|
|
37510
|
+
...typeof resolved === "object" ? { providerError: resolved.reason } : {}
|
|
37511
|
+
};
|
|
37512
|
+
const records = log.records.filter((record3) => record3.identity === id2 && record3.provider === (provider ?? ANTHROPIC_PROVIDER) && Date.parse(record3.at) >= windowStartMs);
|
|
37410
37513
|
try {
|
|
37411
37514
|
const snapshot = readUsageSnapshot(fs37, paths.usageSnapshotsDir, id2);
|
|
37412
37515
|
const account = readAccountMetadata(fs37, paths.identitiesDir, id2) ?? snapshot?.account;
|
|
37413
|
-
return { identity, records, ...snapshot === void 0 ? {} : { snapshot }, ...account === void 0 ? {} : { account } };
|
|
37516
|
+
return { identity, records, ...providerField, ...snapshot === void 0 ? {} : { snapshot }, ...account === void 0 ? {} : { account } };
|
|
37414
37517
|
} catch (error63) {
|
|
37415
37518
|
if (error63 instanceof UsageSnapshotError || error63 instanceof AccountMetadataError) {
|
|
37416
|
-
return { identity, records, readError: errorMessage(error63) };
|
|
37519
|
+
return { identity, records, ...providerField, readError: errorMessage(error63) };
|
|
37417
37520
|
}
|
|
37418
37521
|
throw error63;
|
|
37419
37522
|
}
|
|
@@ -37423,7 +37526,7 @@ function snapshotAgeKey(member) {
|
|
|
37423
37526
|
return member.snapshot === void 0 ? Number.NEGATIVE_INFINITY : Date.parse(member.snapshot.updatedAt);
|
|
37424
37527
|
}
|
|
37425
37528
|
function collapseSharedLogins(members2) {
|
|
37426
|
-
const groups = groupSharedLogins(members2, (member) => member.nested === void 0 && member.account !== void 0 ? loginKeyOf(member.account) : void 0);
|
|
37529
|
+
const groups = groupSharedLogins(members2, (member) => member.nested === void 0 && member.provider === void 0 && member.account !== void 0 ? loginKeyOf(member.account) : void 0);
|
|
37427
37530
|
const representativeOf = /* @__PURE__ */ new Map();
|
|
37428
37531
|
for (const group of groups) {
|
|
37429
37532
|
const representative = group.reduce((freshest, member) => snapshotAgeKey(member) > snapshotAgeKey(freshest) ? member : freshest);
|
|
@@ -37453,7 +37556,7 @@ function rankNamedPool(input2, poolName, stack, sticky) {
|
|
|
37453
37556
|
const childStack = [...stack, poolName];
|
|
37454
37557
|
const direct = pool.identities.filter((entry) => poolNameOf(poolMemberIdentity(entry)) === void 0);
|
|
37455
37558
|
const missing = direct.filter((entry) => input2.identityIdOf(poolMemberIdentity(entry)) === void 0).map((entry) => ({ pool: poolName, identity: poolMemberIdentity(entry) }));
|
|
37456
|
-
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]));
|
|
37559
|
+
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]));
|
|
37457
37560
|
const members2 = [];
|
|
37458
37561
|
for (const entry of pool.identities) {
|
|
37459
37562
|
const nestedName = poolNameOf(poolMemberIdentity(entry));
|
|
@@ -37494,7 +37597,7 @@ function nestedMember(input2, nestedName, childStack, sticky) {
|
|
|
37494
37597
|
const nested = rankNamedPool(input2, nestedName, childStack, sticky);
|
|
37495
37598
|
const pick2 = nested.ranking.pick;
|
|
37496
37599
|
if (pick2 !== void 0) {
|
|
37497
|
-
const [member] = loadPoolMembers(input2.fs, input2.paths, [pick2.identity], input2.nowMs, input2.identityIdOf);
|
|
37600
|
+
const [member] = loadPoolMembers(input2.fs, input2.paths, [pick2.identity], input2.nowMs, input2.identityIdOf, input2.providerOf);
|
|
37498
37601
|
return { member: { ...member ?? { identity: pick2.identity, records: [] }, nested: { kind: "pick", pool: nestedName, reasons: pick2.reasons } }, missing: nested.missing };
|
|
37499
37602
|
}
|
|
37500
37603
|
const earliestReturn = nested.ranking.earliestReturn;
|
|
@@ -37570,6 +37673,7 @@ var init_poolPick = __esm({
|
|
|
37570
37673
|
init_read();
|
|
37571
37674
|
init_middleware();
|
|
37572
37675
|
init_store2();
|
|
37676
|
+
init_windowLengths();
|
|
37573
37677
|
PoolGraphError = class extends CliError {
|
|
37574
37678
|
constructor(message) {
|
|
37575
37679
|
super(message);
|
|
@@ -41965,6 +42069,9 @@ function addProvider(paths, name, input2) {
|
|
|
41965
42069
|
if (kind !== "http" && kind !== "router" && input2.catalogue !== void 0) {
|
|
41966
42070
|
throw new ProviderKindMismatchError("A model catalogue applies only to an http provider.");
|
|
41967
42071
|
}
|
|
42072
|
+
if (kind !== "http" && input2.connectTimeoutMs !== void 0) {
|
|
42073
|
+
throw new ProviderKindMismatchError("A connect timeout applies only to an http provider, the one kind that dials a base URL.");
|
|
42074
|
+
}
|
|
41968
42075
|
if (kind !== "codex" && !isEmptyCodexConfig(input2.codex)) {
|
|
41969
42076
|
throw new ProviderKindMismatchError("Codex settings apply only to a codex provider (--kind codex).");
|
|
41970
42077
|
}
|
|
@@ -41978,7 +42085,7 @@ function addProvider(paths, name, input2) {
|
|
|
41978
42085
|
...input2.pickerModels === void 0 || input2.pickerModels.length === 0 ? {} : { pickerModels: input2.pickerModels }
|
|
41979
42086
|
};
|
|
41980
42087
|
const parsed = ProviderSchema.safeParse(
|
|
41981
|
-
kind === "router" ? { kind, displayName: input2.displayName } : kind === "codex" ? { kind, ...shared, ...isEmptyCodexConfig(input2.codex) ? {} : { codex: input2.codex } } : kind === "antigravity" ? { kind, ...shared, ...isEmptyAntigravityConfig(input2.antigravity) ? {} : { antigravity: input2.antigravity } } : { ...shared, baseUrl: input2.baseUrl, ...input2.catalogue === void 0 ? {} : { catalogue: input2.catalogue } }
|
|
42088
|
+
kind === "router" ? { kind, displayName: input2.displayName } : kind === "codex" ? { kind, ...shared, ...isEmptyCodexConfig(input2.codex) ? {} : { codex: input2.codex } } : kind === "antigravity" ? { kind, ...shared, ...isEmptyAntigravityConfig(input2.antigravity) ? {} : { antigravity: input2.antigravity } } : { ...shared, baseUrl: input2.baseUrl, ...input2.connectTimeoutMs === void 0 ? {} : { connectTimeoutMs: input2.connectTimeoutMs }, ...input2.catalogue === void 0 ? {} : { catalogue: input2.catalogue } }
|
|
41982
42089
|
);
|
|
41983
42090
|
if (!parsed.success) {
|
|
41984
42091
|
throw new ConfigValidationError(providerJsonPath(paths, name), parsed.error.issues);
|
|
@@ -42010,6 +42117,9 @@ function updateProvider(paths, name, input2) {
|
|
|
42010
42117
|
if (isAntigravityProvider(existing) && input2.baseUrl !== void 0) {
|
|
42011
42118
|
throw new ProviderKindMismatchError(`Provider "${name}" is an antigravity provider, which has no base URL.`);
|
|
42012
42119
|
}
|
|
42120
|
+
if (!isHttpProvider(existing) && input2.connectTimeoutMs !== void 0) {
|
|
42121
|
+
throw new ProviderKindMismatchError(`Provider "${name}" is not an http provider; a connect timeout applies only to an http provider, the one kind that dials a base URL.`);
|
|
42122
|
+
}
|
|
42013
42123
|
if ((isCodexProvider(existing) || isAntigravityProvider(existing)) && input2.catalogue !== void 0 && input2.catalogue !== false) {
|
|
42014
42124
|
throw new ProviderKindMismatchError(`Provider "${name}" is not an http provider; a model catalogue applies only to an http provider.`);
|
|
42015
42125
|
}
|
|
@@ -42050,7 +42160,8 @@ function updateProvider(paths, name, input2) {
|
|
|
42050
42160
|
candidate = { kind: "router", ...shared };
|
|
42051
42161
|
} else {
|
|
42052
42162
|
const catalogue = input2.catalogue === void 0 ? existing.catalogue : input2.catalogue === false ? void 0 : input2.catalogue;
|
|
42053
|
-
|
|
42163
|
+
const connectTimeoutMs = input2.connectTimeoutMs === void 0 ? existing.connectTimeoutMs : input2.connectTimeoutMs === false ? void 0 : input2.connectTimeoutMs;
|
|
42164
|
+
candidate = { ...existing, ...shared, catalogue, connectTimeoutMs, ...input2.baseUrl === void 0 ? {} : { baseUrl: input2.baseUrl } };
|
|
42054
42165
|
}
|
|
42055
42166
|
const parsed = ProviderSchema.safeParse(candidate);
|
|
42056
42167
|
if (!parsed.success) {
|
|
@@ -42075,13 +42186,19 @@ function cascadeProviderName(cascade, identityProvider) {
|
|
|
42075
42186
|
}
|
|
42076
42187
|
return name ?? identityProvider;
|
|
42077
42188
|
}
|
|
42078
|
-
function
|
|
42189
|
+
function selectedProviderName(params) {
|
|
42079
42190
|
const cliName = params.cliProvider !== void 0 && params.cliProvider !== "" ? params.cliProvider : void 0;
|
|
42080
42191
|
const named = cliName ?? (params.cascade === void 0 ? params.identityProvider : cascadeProviderName(params.cascade, params.identityProvider));
|
|
42081
42192
|
if (named === void 0) {
|
|
42082
42193
|
return void 0;
|
|
42083
42194
|
}
|
|
42084
|
-
|
|
42195
|
+
return canonicalProviderName(named, (candidate) => loadProvider(params.paths.providersDir, candidate, params.port) !== void 0, () => loadProviderAliases(params.paths.providerAliasesFile, params.port));
|
|
42196
|
+
}
|
|
42197
|
+
function selectProvider(params) {
|
|
42198
|
+
const name = selectedProviderName(params);
|
|
42199
|
+
if (name === void 0) {
|
|
42200
|
+
return void 0;
|
|
42201
|
+
}
|
|
42085
42202
|
const definition = loadProvider(params.paths.providersDir, name, params.port);
|
|
42086
42203
|
if (definition === void 0) {
|
|
42087
42204
|
const known = listProviderNames(params.port.readdir, params.paths.providersDir);
|
|
@@ -42233,7 +42350,7 @@ var init_package = __esm({
|
|
|
42233
42350
|
"package.json"() {
|
|
42234
42351
|
package_default = {
|
|
42235
42352
|
name: "claude-use",
|
|
42236
|
-
version: "12.0
|
|
42353
|
+
version: "12.2.0",
|
|
42237
42354
|
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.",
|
|
42238
42355
|
license: "MIT",
|
|
42239
42356
|
author: "Joseph Mearman <joseph@mearman.co.uk>",
|
|
@@ -42369,6 +42486,260 @@ var init_envBool = __esm({
|
|
|
42369
42486
|
}
|
|
42370
42487
|
});
|
|
42371
42488
|
|
|
42489
|
+
// src/launcher/memberProvider.ts
|
|
42490
|
+
function unreadableFileReason(error63) {
|
|
42491
|
+
if (error63 instanceof ConfigValidationError) {
|
|
42492
|
+
return `${error63.filepath} is invalid`;
|
|
42493
|
+
}
|
|
42494
|
+
if (error63 instanceof ConfigFileNotJsonError) {
|
|
42495
|
+
return error63.message.replace(/\.$/, "");
|
|
42496
|
+
}
|
|
42497
|
+
if (error63 instanceof LegacyProviderFileError) {
|
|
42498
|
+
return `${error63.filePath} uses ${error63.conversion.fields.join(", ")}, which a credential block replaced`;
|
|
42499
|
+
}
|
|
42500
|
+
return void 0;
|
|
42501
|
+
}
|
|
42502
|
+
function memberProviderResolver(params) {
|
|
42503
|
+
if (params.cliProvider === false) {
|
|
42504
|
+
return () => void 0;
|
|
42505
|
+
}
|
|
42506
|
+
const cliProvider = params.cliProvider;
|
|
42507
|
+
const identities = identityReader(params.paths.identitiesDir, params.fs);
|
|
42508
|
+
const cascades = /* @__PURE__ */ new Map();
|
|
42509
|
+
const cascadeOver = (baseConfigProfile) => {
|
|
42510
|
+
const cached2 = cascades.get(baseConfigProfile);
|
|
42511
|
+
if (cached2 !== void 0) {
|
|
42512
|
+
return cached2;
|
|
42513
|
+
}
|
|
42514
|
+
const loaded = params.loadCascade(baseConfigProfile);
|
|
42515
|
+
cascades.set(baseConfigProfile, loaded);
|
|
42516
|
+
return loaded;
|
|
42517
|
+
};
|
|
42518
|
+
return (name) => {
|
|
42519
|
+
let declared;
|
|
42520
|
+
try {
|
|
42521
|
+
declared = identities.load(name);
|
|
42522
|
+
} catch (error63) {
|
|
42523
|
+
if (!(error63 instanceof ConfigValidationError)) {
|
|
42524
|
+
throw error63;
|
|
42525
|
+
}
|
|
42526
|
+
}
|
|
42527
|
+
const profile = decideConfigProfile({
|
|
42528
|
+
env: params.env,
|
|
42529
|
+
...params.cliFlagConfigProfile === void 0 ? {} : { cliFlagConfigProfile: params.cliFlagConfigProfile },
|
|
42530
|
+
...params.directoryRuleConfigProfile === void 0 ? {} : { directoryRuleConfigProfile: params.directoryRuleConfigProfile },
|
|
42531
|
+
...declared?.defaultConfigProfile === void 0 ? {} : { identityDefaultConfigProfile: declared.defaultConfigProfile },
|
|
42532
|
+
...params.globalDefaultConfigProfile === void 0 ? {} : { globalDefaultConfigProfile: params.globalDefaultConfigProfile }
|
|
42533
|
+
});
|
|
42534
|
+
const flagged = cliProvider !== void 0 && cliProvider !== "" ? cliProvider : void 0;
|
|
42535
|
+
let named = flagged ?? declared?.provider;
|
|
42536
|
+
try {
|
|
42537
|
+
const cascade = cascadeOver(profile.name);
|
|
42538
|
+
named = flagged ?? cascadeProviderName(cascade, declared?.provider);
|
|
42539
|
+
return selectedProviderName({
|
|
42540
|
+
paths: params.paths,
|
|
42541
|
+
port: params.fs,
|
|
42542
|
+
...cliProvider === void 0 ? {} : { cliProvider },
|
|
42543
|
+
cascade,
|
|
42544
|
+
...declared?.provider === void 0 ? {} : { identityProvider: declared.provider }
|
|
42545
|
+
});
|
|
42546
|
+
} catch (error63) {
|
|
42547
|
+
const reason = unreadableFileReason(error63);
|
|
42548
|
+
if (reason === void 0) {
|
|
42549
|
+
throw error63;
|
|
42550
|
+
}
|
|
42551
|
+
return { ...named === void 0 ? {} : { named }, reason };
|
|
42552
|
+
}
|
|
42553
|
+
};
|
|
42554
|
+
}
|
|
42555
|
+
var init_memberProvider = __esm({
|
|
42556
|
+
"src/launcher/memberProvider.ts"() {
|
|
42557
|
+
"use strict";
|
|
42558
|
+
init_load();
|
|
42559
|
+
init_providersStore();
|
|
42560
|
+
init_identity();
|
|
42561
|
+
}
|
|
42562
|
+
});
|
|
42563
|
+
|
|
42564
|
+
// src/frontdoor/probe.ts
|
|
42565
|
+
function requestCatalogueRefreshSync(port, caPem, token, timeoutMs = PROBE_TIMEOUT_MS) {
|
|
42566
|
+
refuseToBlockInRole("a synchronous catalogue refresh request");
|
|
42567
|
+
return runProbeWorker(CATALOGUE_REQUEST_SOURCE, { port, ca: caPem, token }, timeoutMs);
|
|
42568
|
+
}
|
|
42569
|
+
function probeFrontDoorSync(port, caPem, timeoutMs = PROBE_TIMEOUT_MS) {
|
|
42570
|
+
refuseToBlockInRole("a synchronous probe of the front door");
|
|
42571
|
+
return runProbeWorker(PROBE_SOURCE, { port, ca: caPem }, timeoutMs);
|
|
42572
|
+
}
|
|
42573
|
+
function probeListenerAcceptSync(port, timeoutMs = PROBE_TIMEOUT_MS) {
|
|
42574
|
+
refuseToBlockInRole("a synchronous probe of a front door listener");
|
|
42575
|
+
return runProbeWorker(ACCEPT_PROBE_SOURCE, { host: "127.0.0.1", port }, timeoutMs);
|
|
42576
|
+
}
|
|
42577
|
+
function probeAddressAcceptSync(host, port, timeoutMs) {
|
|
42578
|
+
refuseToBlockInRole("a synchronous probe of a provider's address");
|
|
42579
|
+
return runProbeWorker(ACCEPT_PROBE_SOURCE, { host, port }, timeoutMs);
|
|
42580
|
+
}
|
|
42581
|
+
function runProbeWorker(source, data, timeoutMs) {
|
|
42582
|
+
const shared = new SharedArrayBuffer(HEADER_SLOTS * INT32_BYTES + REASON_BYTES);
|
|
42583
|
+
const header = new Int32Array(shared, 0, HEADER_SLOTS);
|
|
42584
|
+
const worker = new import_node_worker_threads.Worker(source, {
|
|
42585
|
+
eval: true,
|
|
42586
|
+
workerData: { ...data, timeoutMs, shared, ok: VERDICT_OK, failed: VERDICT_FAILED, headerSlots: HEADER_SLOTS }
|
|
42587
|
+
});
|
|
42588
|
+
worker.unref();
|
|
42589
|
+
try {
|
|
42590
|
+
const waited = Atomics.wait(header, 0, VERDICT_PENDING, timeoutMs + PROBE_WAIT_MARGIN_MS);
|
|
42591
|
+
const verdict = Atomics.load(header, 0);
|
|
42592
|
+
if (waited === "timed-out" || verdict === VERDICT_PENDING) {
|
|
42593
|
+
return { ok: false, reason: `the probe did not finish within ${String(timeoutMs + PROBE_WAIT_MARGIN_MS)}ms` };
|
|
42594
|
+
}
|
|
42595
|
+
if (verdict === VERDICT_OK) {
|
|
42596
|
+
return { ok: true };
|
|
42597
|
+
}
|
|
42598
|
+
const length = Atomics.load(header, 1);
|
|
42599
|
+
return { ok: false, reason: Buffer.from(new Uint8Array(shared, HEADER_SLOTS * INT32_BYTES, length)).toString("utf8") };
|
|
42600
|
+
} finally {
|
|
42601
|
+
void worker.terminate();
|
|
42602
|
+
}
|
|
42603
|
+
}
|
|
42604
|
+
var import_node_worker_threads, PROBE_TIMEOUT_MS, PROBE_WAIT_MARGIN_MS, REASON_BYTES, HEADER_SLOTS, INT32_BYTES, VERDICT_PENDING, VERDICT_OK, VERDICT_FAILED, PROBE_SOURCE, CATALOGUE_REQUEST_SOURCE, ACCEPT_PROBE_SOURCE;
|
|
42605
|
+
var init_probe = __esm({
|
|
42606
|
+
"src/frontdoor/probe.ts"() {
|
|
42607
|
+
"use strict";
|
|
42608
|
+
init_processRole();
|
|
42609
|
+
import_node_worker_threads = require("node:worker_threads");
|
|
42610
|
+
PROBE_TIMEOUT_MS = 2e3;
|
|
42611
|
+
PROBE_WAIT_MARGIN_MS = 1e3;
|
|
42612
|
+
REASON_BYTES = 1024;
|
|
42613
|
+
HEADER_SLOTS = 2;
|
|
42614
|
+
INT32_BYTES = 4;
|
|
42615
|
+
VERDICT_PENDING = 0;
|
|
42616
|
+
VERDICT_OK = 1;
|
|
42617
|
+
VERDICT_FAILED = 2;
|
|
42618
|
+
PROBE_SOURCE = `
|
|
42619
|
+
const { workerData } = require("node:worker_threads");
|
|
42620
|
+
const https = require("node:https");
|
|
42621
|
+
const { port, ca, timeoutMs, shared, ok, failed, headerSlots } = workerData;
|
|
42622
|
+
const header = new Int32Array(shared, 0, headerSlots);
|
|
42623
|
+
const reason = new Uint8Array(shared, headerSlots * 4);
|
|
42624
|
+
let done = false;
|
|
42625
|
+
const finish = (verdict, message) => {
|
|
42626
|
+
if (done) return;
|
|
42627
|
+
done = true;
|
|
42628
|
+
const bytes = Buffer.from(String(message), "utf8").subarray(0, reason.length);
|
|
42629
|
+
reason.set(bytes);
|
|
42630
|
+
Atomics.store(header, 1, bytes.length);
|
|
42631
|
+
Atomics.store(header, 0, verdict);
|
|
42632
|
+
Atomics.notify(header, 0);
|
|
42633
|
+
};
|
|
42634
|
+
const request = https.get({ host: "127.0.0.1", port, path: "/healthz", ca: [ca], agent: false }, (response) => {
|
|
42635
|
+
let body = "";
|
|
42636
|
+
response.setEncoding("utf8");
|
|
42637
|
+
response.on("data", (chunk) => { body += chunk; });
|
|
42638
|
+
response.on("end", () => {
|
|
42639
|
+
if (response.statusCode === 200 && body === "ok") finish(ok, "");
|
|
42640
|
+
else finish(failed, "the listener answered its health probe with HTTP " + String(response.statusCode));
|
|
42641
|
+
});
|
|
42642
|
+
response.on("error", (error) => finish(failed, error.message));
|
|
42643
|
+
});
|
|
42644
|
+
// A hard deadline over the whole exchange, handshake included: a listener that accepts the connection and then says nothing must still fail the probe.
|
|
42645
|
+
setTimeout(() => { request.destroy(new Error("no answer within " + String(timeoutMs) + "ms")); }, timeoutMs);
|
|
42646
|
+
request.on("error", (error) => finish(failed, (error.code ? error.code + ": " : "") + error.message));
|
|
42647
|
+
`;
|
|
42648
|
+
CATALOGUE_REQUEST_SOURCE = `
|
|
42649
|
+
const { workerData } = require("node:worker_threads");
|
|
42650
|
+
const https = require("node:https");
|
|
42651
|
+
const { port, ca, token, timeoutMs, shared, ok, failed, headerSlots } = workerData;
|
|
42652
|
+
const header = new Int32Array(shared, 0, headerSlots);
|
|
42653
|
+
const reason = new Uint8Array(shared, headerSlots * 4);
|
|
42654
|
+
let done = false;
|
|
42655
|
+
const finish = (verdict, message) => {
|
|
42656
|
+
if (done) return;
|
|
42657
|
+
done = true;
|
|
42658
|
+
const bytes = Buffer.from(String(message), "utf8").subarray(0, reason.length);
|
|
42659
|
+
reason.set(bytes);
|
|
42660
|
+
Atomics.store(header, 1, bytes.length);
|
|
42661
|
+
Atomics.store(header, 0, verdict);
|
|
42662
|
+
Atomics.notify(header, 0);
|
|
42663
|
+
};
|
|
42664
|
+
const request = https.request({ host: "127.0.0.1", port, path: "/__agent-shim/orpc/rest/frontdoor/catalogues/refresh", method: "POST", headers: { authorization: "Bearer " + token }, ca: [ca], agent: false }, (response) => {
|
|
42665
|
+
response.resume();
|
|
42666
|
+
response.on("end", () => response.statusCode === 200 ? finish(ok, "") : finish(failed, "catalogue refresh request returned HTTP " + String(response.statusCode)));
|
|
42667
|
+
response.on("error", (error) => finish(failed, error.message));
|
|
42668
|
+
});
|
|
42669
|
+
setTimeout(() => { request.destroy(new Error("no answer within " + String(timeoutMs) + "ms")); }, timeoutMs);
|
|
42670
|
+
request.on("error", (error) => finish(failed, (error.code ? error.code + ": " : "") + error.message));
|
|
42671
|
+
request.end();
|
|
42672
|
+
`;
|
|
42673
|
+
ACCEPT_PROBE_SOURCE = `
|
|
42674
|
+
const { workerData } = require("node:worker_threads");
|
|
42675
|
+
const net = require("node:net");
|
|
42676
|
+
const { host, port, timeoutMs, shared, ok, failed, headerSlots } = workerData;
|
|
42677
|
+
const header = new Int32Array(shared, 0, headerSlots);
|
|
42678
|
+
const reason = new Uint8Array(shared, headerSlots * 4);
|
|
42679
|
+
let done = false;
|
|
42680
|
+
const finish = (verdict, message) => {
|
|
42681
|
+
if (done) return;
|
|
42682
|
+
done = true;
|
|
42683
|
+
const bytes = Buffer.from(String(message), "utf8").subarray(0, reason.length);
|
|
42684
|
+
reason.set(bytes);
|
|
42685
|
+
Atomics.store(header, 1, bytes.length);
|
|
42686
|
+
Atomics.store(header, 0, verdict);
|
|
42687
|
+
Atomics.notify(header, 0);
|
|
42688
|
+
};
|
|
42689
|
+
const socket = net.connect({ host, port });
|
|
42690
|
+
socket.once("connect", () => { socket.destroy(); finish(ok, ""); });
|
|
42691
|
+
socket.once("error", (error) => finish(failed, (error.code ? error.code + ": " : "") + error.message));
|
|
42692
|
+
setTimeout(() => { socket.destroy(); finish(failed, "no connection accepted within " + String(timeoutMs) + "ms"); }, timeoutMs);
|
|
42693
|
+
`;
|
|
42694
|
+
}
|
|
42695
|
+
});
|
|
42696
|
+
|
|
42697
|
+
// src/providerReachability.ts
|
|
42698
|
+
function providerConnectTimeoutMs(provider) {
|
|
42699
|
+
return provider.connectTimeoutMs ?? DEFAULT_PROVIDER_CONNECT_TIMEOUT_MS;
|
|
42700
|
+
}
|
|
42701
|
+
function dialTargetOf(baseUrl) {
|
|
42702
|
+
const url2 = new URL(baseUrl);
|
|
42703
|
+
const defaultPort = DEFAULT_PORTS[url2.protocol];
|
|
42704
|
+
if (defaultPort === void 0) {
|
|
42705
|
+
return void 0;
|
|
42706
|
+
}
|
|
42707
|
+
return { host: url2.hostname.replace(/^\[(.*)\]$/, "$1"), port: url2.port === "" ? defaultPort : Number(url2.port) };
|
|
42708
|
+
}
|
|
42709
|
+
function couldNotConnectMessage(subject, baseUrl, reason) {
|
|
42710
|
+
return `${subject} could not connect to ${baseUrl}: ${reason}`;
|
|
42711
|
+
}
|
|
42712
|
+
function probeProviderReachability(name, provider, probe) {
|
|
42713
|
+
const verdict = probe(provider.baseUrl, providerConnectTimeoutMs(provider));
|
|
42714
|
+
return verdict.ok ? { ok: true } : { ok: false, message: couldNotConnectMessage(`provider ${name}`, provider.baseUrl, verdict.reason) };
|
|
42715
|
+
}
|
|
42716
|
+
function unreachableProviderLine(name, provider, probe) {
|
|
42717
|
+
if (probe === void 0 || !isHttpProvider(provider)) {
|
|
42718
|
+
return void 0;
|
|
42719
|
+
}
|
|
42720
|
+
const reachability = probeProviderReachability(name, provider, probe);
|
|
42721
|
+
return reachability.ok ? void 0 : reachability.message;
|
|
42722
|
+
}
|
|
42723
|
+
var TCP_INITIAL_RETRANSMISSION_TIMEOUT_MS, CONNECT_SYN_RETRANSMISSIONS_TOLERATED, DEFAULT_PROVIDER_CONNECT_TIMEOUT_MS, DEFAULT_PORTS, realBaseUrlProbe;
|
|
42724
|
+
var init_providerReachability = __esm({
|
|
42725
|
+
"src/providerReachability.ts"() {
|
|
42726
|
+
"use strict";
|
|
42727
|
+
init_schema();
|
|
42728
|
+
init_probe();
|
|
42729
|
+
TCP_INITIAL_RETRANSMISSION_TIMEOUT_MS = 1e3;
|
|
42730
|
+
CONNECT_SYN_RETRANSMISSIONS_TOLERATED = 2;
|
|
42731
|
+
DEFAULT_PROVIDER_CONNECT_TIMEOUT_MS = TCP_INITIAL_RETRANSMISSION_TIMEOUT_MS * (2 ** (CONNECT_SYN_RETRANSMISSIONS_TOLERATED + 1) - 1);
|
|
42732
|
+
DEFAULT_PORTS = { "http:": 80, "https:": 443 };
|
|
42733
|
+
realBaseUrlProbe = (baseUrl, timeoutMs) => {
|
|
42734
|
+
const target = dialTargetOf(baseUrl);
|
|
42735
|
+
if (target === void 0) {
|
|
42736
|
+
return { ok: false, reason: "the base URL is neither http nor https" };
|
|
42737
|
+
}
|
|
42738
|
+
return probeAddressAcceptSync(target.host, target.port, timeoutMs);
|
|
42739
|
+
};
|
|
42740
|
+
}
|
|
42741
|
+
});
|
|
42742
|
+
|
|
42372
42743
|
// src/launcher/claudeVersion.ts
|
|
42373
42744
|
function validated2(value3, origin) {
|
|
42374
42745
|
if (!NUMERIC_DOTTED_VERSION_RE.test(value3)) {
|
|
@@ -53267,7 +53638,7 @@ var require_env_http_proxy_agent = __commonJS({
|
|
|
53267
53638
|
var { kClose, kDestroy, kClosed, kDestroyed, kDispatch, kNoProxyAgent, kHttpProxyAgent, kHttpsProxyAgent } = require_symbols();
|
|
53268
53639
|
var ProxyAgent = require_proxy_agent();
|
|
53269
53640
|
var Agent6 = require_agent();
|
|
53270
|
-
var
|
|
53641
|
+
var DEFAULT_PORTS2 = {
|
|
53271
53642
|
"http:": 80,
|
|
53272
53643
|
"https:": 443
|
|
53273
53644
|
};
|
|
@@ -53316,7 +53687,7 @@ var require_env_http_proxy_agent = __commonJS({
|
|
|
53316
53687
|
#getProxyAgentForUrl(url2) {
|
|
53317
53688
|
let { protocol, host: hostname3, port } = url2;
|
|
53318
53689
|
hostname3 = hostname3.replace(/:\d*$/, "").toLowerCase();
|
|
53319
|
-
port = Number.parseInt(port, 10) ||
|
|
53690
|
+
port = Number.parseInt(port, 10) || DEFAULT_PORTS2[protocol] || 0;
|
|
53320
53691
|
if (!this.#shouldProxy(hostname3, port)) {
|
|
53321
53692
|
return this[kNoProxyAgent];
|
|
53322
53693
|
}
|
|
@@ -69430,135 +69801,6 @@ var init_ensure2 = __esm({
|
|
|
69430
69801
|
}
|
|
69431
69802
|
});
|
|
69432
69803
|
|
|
69433
|
-
// src/frontdoor/probe.ts
|
|
69434
|
-
function requestCatalogueRefreshSync(port, caPem, token, timeoutMs = PROBE_TIMEOUT_MS) {
|
|
69435
|
-
refuseToBlockInRole("a synchronous catalogue refresh request");
|
|
69436
|
-
return runProbeWorker(CATALOGUE_REQUEST_SOURCE, { port, ca: caPem, token }, timeoutMs);
|
|
69437
|
-
}
|
|
69438
|
-
function probeFrontDoorSync(port, caPem, timeoutMs = PROBE_TIMEOUT_MS) {
|
|
69439
|
-
refuseToBlockInRole("a synchronous probe of the front door");
|
|
69440
|
-
return runProbeWorker(PROBE_SOURCE, { port, ca: caPem }, timeoutMs);
|
|
69441
|
-
}
|
|
69442
|
-
function probeListenerAcceptSync(port, timeoutMs = PROBE_TIMEOUT_MS) {
|
|
69443
|
-
refuseToBlockInRole("a synchronous probe of a front door listener");
|
|
69444
|
-
return runProbeWorker(ACCEPT_PROBE_SOURCE, { port }, timeoutMs);
|
|
69445
|
-
}
|
|
69446
|
-
function runProbeWorker(source, data, timeoutMs) {
|
|
69447
|
-
const shared = new SharedArrayBuffer(HEADER_SLOTS * INT32_BYTES + REASON_BYTES);
|
|
69448
|
-
const header = new Int32Array(shared, 0, HEADER_SLOTS);
|
|
69449
|
-
const worker = new import_node_worker_threads.Worker(source, {
|
|
69450
|
-
eval: true,
|
|
69451
|
-
workerData: { ...data, timeoutMs, shared, ok: VERDICT_OK, failed: VERDICT_FAILED, headerSlots: HEADER_SLOTS }
|
|
69452
|
-
});
|
|
69453
|
-
worker.unref();
|
|
69454
|
-
try {
|
|
69455
|
-
const waited = Atomics.wait(header, 0, VERDICT_PENDING, timeoutMs + PROBE_WAIT_MARGIN_MS);
|
|
69456
|
-
const verdict = Atomics.load(header, 0);
|
|
69457
|
-
if (waited === "timed-out" || verdict === VERDICT_PENDING) {
|
|
69458
|
-
return { ok: false, reason: `the probe did not finish within ${String(timeoutMs + PROBE_WAIT_MARGIN_MS)}ms` };
|
|
69459
|
-
}
|
|
69460
|
-
if (verdict === VERDICT_OK) {
|
|
69461
|
-
return { ok: true };
|
|
69462
|
-
}
|
|
69463
|
-
const length = Atomics.load(header, 1);
|
|
69464
|
-
return { ok: false, reason: Buffer.from(new Uint8Array(shared, HEADER_SLOTS * INT32_BYTES, length)).toString("utf8") };
|
|
69465
|
-
} finally {
|
|
69466
|
-
void worker.terminate();
|
|
69467
|
-
}
|
|
69468
|
-
}
|
|
69469
|
-
var import_node_worker_threads, PROBE_TIMEOUT_MS, PROBE_WAIT_MARGIN_MS, REASON_BYTES, HEADER_SLOTS, INT32_BYTES, VERDICT_PENDING, VERDICT_OK, VERDICT_FAILED, PROBE_SOURCE, CATALOGUE_REQUEST_SOURCE, ACCEPT_PROBE_SOURCE;
|
|
69470
|
-
var init_probe = __esm({
|
|
69471
|
-
"src/frontdoor/probe.ts"() {
|
|
69472
|
-
"use strict";
|
|
69473
|
-
init_processRole();
|
|
69474
|
-
import_node_worker_threads = require("node:worker_threads");
|
|
69475
|
-
PROBE_TIMEOUT_MS = 2e3;
|
|
69476
|
-
PROBE_WAIT_MARGIN_MS = 1e3;
|
|
69477
|
-
REASON_BYTES = 1024;
|
|
69478
|
-
HEADER_SLOTS = 2;
|
|
69479
|
-
INT32_BYTES = 4;
|
|
69480
|
-
VERDICT_PENDING = 0;
|
|
69481
|
-
VERDICT_OK = 1;
|
|
69482
|
-
VERDICT_FAILED = 2;
|
|
69483
|
-
PROBE_SOURCE = `
|
|
69484
|
-
const { workerData } = require("node:worker_threads");
|
|
69485
|
-
const https = require("node:https");
|
|
69486
|
-
const { port, ca, timeoutMs, shared, ok, failed, headerSlots } = workerData;
|
|
69487
|
-
const header = new Int32Array(shared, 0, headerSlots);
|
|
69488
|
-
const reason = new Uint8Array(shared, headerSlots * 4);
|
|
69489
|
-
let done = false;
|
|
69490
|
-
const finish = (verdict, message) => {
|
|
69491
|
-
if (done) return;
|
|
69492
|
-
done = true;
|
|
69493
|
-
const bytes = Buffer.from(String(message), "utf8").subarray(0, reason.length);
|
|
69494
|
-
reason.set(bytes);
|
|
69495
|
-
Atomics.store(header, 1, bytes.length);
|
|
69496
|
-
Atomics.store(header, 0, verdict);
|
|
69497
|
-
Atomics.notify(header, 0);
|
|
69498
|
-
};
|
|
69499
|
-
const request = https.get({ host: "127.0.0.1", port, path: "/healthz", ca: [ca], agent: false }, (response) => {
|
|
69500
|
-
let body = "";
|
|
69501
|
-
response.setEncoding("utf8");
|
|
69502
|
-
response.on("data", (chunk) => { body += chunk; });
|
|
69503
|
-
response.on("end", () => {
|
|
69504
|
-
if (response.statusCode === 200 && body === "ok") finish(ok, "");
|
|
69505
|
-
else finish(failed, "the listener answered its health probe with HTTP " + String(response.statusCode));
|
|
69506
|
-
});
|
|
69507
|
-
response.on("error", (error) => finish(failed, error.message));
|
|
69508
|
-
});
|
|
69509
|
-
// A hard deadline over the whole exchange, handshake included: a listener that accepts the connection and then says nothing must still fail the probe.
|
|
69510
|
-
setTimeout(() => { request.destroy(new Error("no answer within " + String(timeoutMs) + "ms")); }, timeoutMs);
|
|
69511
|
-
request.on("error", (error) => finish(failed, (error.code ? error.code + ": " : "") + error.message));
|
|
69512
|
-
`;
|
|
69513
|
-
CATALOGUE_REQUEST_SOURCE = `
|
|
69514
|
-
const { workerData } = require("node:worker_threads");
|
|
69515
|
-
const https = require("node:https");
|
|
69516
|
-
const { port, ca, token, timeoutMs, shared, ok, failed, headerSlots } = workerData;
|
|
69517
|
-
const header = new Int32Array(shared, 0, headerSlots);
|
|
69518
|
-
const reason = new Uint8Array(shared, headerSlots * 4);
|
|
69519
|
-
let done = false;
|
|
69520
|
-
const finish = (verdict, message) => {
|
|
69521
|
-
if (done) return;
|
|
69522
|
-
done = true;
|
|
69523
|
-
const bytes = Buffer.from(String(message), "utf8").subarray(0, reason.length);
|
|
69524
|
-
reason.set(bytes);
|
|
69525
|
-
Atomics.store(header, 1, bytes.length);
|
|
69526
|
-
Atomics.store(header, 0, verdict);
|
|
69527
|
-
Atomics.notify(header, 0);
|
|
69528
|
-
};
|
|
69529
|
-
const request = https.request({ host: "127.0.0.1", port, path: "/__agent-shim/orpc/rest/frontdoor/catalogues/refresh", method: "POST", headers: { authorization: "Bearer " + token }, ca: [ca], agent: false }, (response) => {
|
|
69530
|
-
response.resume();
|
|
69531
|
-
response.on("end", () => response.statusCode === 200 ? finish(ok, "") : finish(failed, "catalogue refresh request returned HTTP " + String(response.statusCode)));
|
|
69532
|
-
response.on("error", (error) => finish(failed, error.message));
|
|
69533
|
-
});
|
|
69534
|
-
setTimeout(() => { request.destroy(new Error("no answer within " + String(timeoutMs) + "ms")); }, timeoutMs);
|
|
69535
|
-
request.on("error", (error) => finish(failed, (error.code ? error.code + ": " : "") + error.message));
|
|
69536
|
-
request.end();
|
|
69537
|
-
`;
|
|
69538
|
-
ACCEPT_PROBE_SOURCE = `
|
|
69539
|
-
const { workerData } = require("node:worker_threads");
|
|
69540
|
-
const net = require("node:net");
|
|
69541
|
-
const { port, timeoutMs, shared, ok, failed, headerSlots } = workerData;
|
|
69542
|
-
const header = new Int32Array(shared, 0, headerSlots);
|
|
69543
|
-
const reason = new Uint8Array(shared, headerSlots * 4);
|
|
69544
|
-
let done = false;
|
|
69545
|
-
const finish = (verdict, message) => {
|
|
69546
|
-
if (done) return;
|
|
69547
|
-
done = true;
|
|
69548
|
-
const bytes = Buffer.from(String(message), "utf8").subarray(0, reason.length);
|
|
69549
|
-
reason.set(bytes);
|
|
69550
|
-
Atomics.store(header, 1, bytes.length);
|
|
69551
|
-
Atomics.store(header, 0, verdict);
|
|
69552
|
-
Atomics.notify(header, 0);
|
|
69553
|
-
};
|
|
69554
|
-
const socket = net.connect({ host: "127.0.0.1", port });
|
|
69555
|
-
socket.once("connect", () => { socket.destroy(); finish(ok, ""); });
|
|
69556
|
-
socket.once("error", (error) => finish(failed, (error.code ? error.code + ": " : "") + error.message));
|
|
69557
|
-
setTimeout(() => { socket.destroy(); finish(failed, "no connection accepted within " + String(timeoutMs) + "ms"); }, timeoutMs);
|
|
69558
|
-
`;
|
|
69559
|
-
}
|
|
69560
|
-
});
|
|
69561
|
-
|
|
69562
69804
|
// src/frontdoor/selfIdentity.ts
|
|
69563
69805
|
function declareThisProcessTheFrontDoor() {
|
|
69564
69806
|
declaredPid = process.pid;
|
|
@@ -69664,7 +69906,7 @@ function realFrontDoorPort(paths, spawnDaemon) {
|
|
|
69664
69906
|
const cache2 = parseCatalogueCache(realFarmFs.readFileUtf8(catalogueCachePath(paths, name, supervisorPid, owner.generation)));
|
|
69665
69907
|
let fingerprint;
|
|
69666
69908
|
try {
|
|
69667
|
-
fingerprint = savedCatalogueFingerprint(provider, paths, { ...process.env, CODEX_HOME: owner.codexHome },
|
|
69909
|
+
fingerprint = savedCatalogueFingerprint(provider, paths, { ...process.env, CODEX_HOME: owner.codexHome }, import_node_os10.default.homedir(), realFarmFs.readFileUtf8);
|
|
69668
69910
|
} catch (error63) {
|
|
69669
69911
|
warnings.add(`Cannot read catalogue credentials for ${name}: ${error63 instanceof Error ? error63.message : String(error63)}`);
|
|
69670
69912
|
return false;
|
|
@@ -69714,12 +69956,12 @@ function realFrontDoorPort(paths, spawnDaemon) {
|
|
|
69714
69956
|
}
|
|
69715
69957
|
};
|
|
69716
69958
|
}
|
|
69717
|
-
var import_node_fs20,
|
|
69959
|
+
var import_node_fs20, import_node_os10, realTrustBundleFs;
|
|
69718
69960
|
var init_realFrontDoorPort = __esm({
|
|
69719
69961
|
"src/frontdoor/realFrontDoorPort.ts"() {
|
|
69720
69962
|
"use strict";
|
|
69721
69963
|
import_node_fs20 = __toESM(require("node:fs"), 1);
|
|
69722
|
-
|
|
69964
|
+
import_node_os10 = __toESM(require("node:os"), 1);
|
|
69723
69965
|
init_providersStore();
|
|
69724
69966
|
init_providerCatalogue();
|
|
69725
69967
|
init_catalogueCredential();
|
|
@@ -70095,7 +70337,7 @@ var init_anthropicUsageRefresh = __esm({
|
|
|
70095
70337
|
init_schema();
|
|
70096
70338
|
init_identity();
|
|
70097
70339
|
init_middleware();
|
|
70098
|
-
|
|
70340
|
+
init_windowLengths();
|
|
70099
70341
|
init_plan();
|
|
70100
70342
|
PERCENT2 = 100;
|
|
70101
70343
|
ANTHROPIC_USAGE_FRESHNESS_MS = FIVE_HOUR_WINDOW_MS / PERCENT2;
|
|
@@ -71007,7 +71249,7 @@ function formatPeriod(window) {
|
|
|
71007
71249
|
if (window.periodMs === void 0) {
|
|
71008
71250
|
return window.period ?? "unknown period";
|
|
71009
71251
|
}
|
|
71010
|
-
const hours = window.periodMs /
|
|
71252
|
+
const hours = window.periodMs / MS_PER_HOUR5;
|
|
71011
71253
|
return hours >= HOURS_PER_DAY4 && Number.isInteger(hours / HOURS_PER_DAY4) ? `${String(hours / HOURS_PER_DAY4)}d` : `${String(hours)}h`;
|
|
71012
71254
|
}
|
|
71013
71255
|
function groupOf(row) {
|
|
@@ -71052,13 +71294,13 @@ function formatResetRow(row, nowMs) {
|
|
|
71052
71294
|
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)})`;
|
|
71053
71295
|
return `${row.identity} / ${row.provider}: ${row.window} ${used}, ${when}${row.status === void 0 ? "" : ` (${row.status})`}`;
|
|
71054
71296
|
}
|
|
71055
|
-
var
|
|
71297
|
+
var MS_PER_HOUR5, HOURS_PER_DAY4, PERCENT3;
|
|
71056
71298
|
var init_resets = __esm({
|
|
71057
71299
|
"src/usage/resets.ts"() {
|
|
71058
71300
|
"use strict";
|
|
71059
71301
|
init_preflight();
|
|
71060
71302
|
init_rateLimit();
|
|
71061
|
-
|
|
71303
|
+
MS_PER_HOUR5 = 36e5;
|
|
71062
71304
|
HOURS_PER_DAY4 = 24;
|
|
71063
71305
|
PERCENT3 = 100;
|
|
71064
71306
|
}
|
|
@@ -71067,7 +71309,10 @@ var init_resets = __esm({
|
|
|
71067
71309
|
// src/launcher/launchReport.ts
|
|
71068
71310
|
function poolDetail(pool) {
|
|
71069
71311
|
const [reason] = pool.reasons;
|
|
71070
|
-
|
|
71312
|
+
if (reason === void 0) {
|
|
71313
|
+
return {};
|
|
71314
|
+
}
|
|
71315
|
+
return { detail: pool.provider === void 0 ? reason : `${reason} (ranked on provider ${pool.provider})` };
|
|
71071
71316
|
}
|
|
71072
71317
|
function rankingNotes(ranking, picked) {
|
|
71073
71318
|
return ranking.flatMap((candidate, index) => [
|
|
@@ -72816,6 +73061,7 @@ function resolvePoolLaunch(params) {
|
|
|
72816
73061
|
resuming,
|
|
72817
73062
|
...params.resumeContextTokens === void 0 ? {} : { resumeContextTokens: params.resumeContextTokens },
|
|
72818
73063
|
...params.committedContextTokens === void 0 ? {} : { committedContextTokens: params.committedContextTokens },
|
|
73064
|
+
...params.providerOf === void 0 ? {} : { providerOf: params.providerOf },
|
|
72819
73065
|
identityIdOf: identityIdResolver(params.paths.identitiesDir, params.fs),
|
|
72820
73066
|
...stickyRead.sticky === void 0 ? {} : { sticky: stickyRead.sticky }
|
|
72821
73067
|
});
|
|
@@ -72857,6 +73103,7 @@ function resolvePoolLaunch(params) {
|
|
|
72857
73103
|
explanation: `pool ${poolName}: ${move}${pick2.reasons.slice(0, REASONS_LOGGED).join("; ")}`,
|
|
72858
73104
|
reasons: pick2.reasons,
|
|
72859
73105
|
candidates: graph.ranking.candidates,
|
|
73106
|
+
...pick2.provider === void 0 ? {} : { provider: pick2.provider },
|
|
72860
73107
|
...movedOff === void 0 ? {} : { movedOff },
|
|
72861
73108
|
...stickyRead.sticky === void 0 ? {} : { lastRanAs: stickyRead.sticky }
|
|
72862
73109
|
};
|
|
@@ -72894,7 +73141,7 @@ function childExitCode(result) {
|
|
|
72894
73141
|
return result.status;
|
|
72895
73142
|
}
|
|
72896
73143
|
if (result.signal !== null) {
|
|
72897
|
-
return SIGNAL_EXIT_CODE_OFFSET +
|
|
73144
|
+
return SIGNAL_EXIT_CODE_OFFSET + import_node_os12.default.constants.signals[result.signal];
|
|
72898
73145
|
}
|
|
72899
73146
|
return 1;
|
|
72900
73147
|
}
|
|
@@ -72908,11 +73155,11 @@ function spawnClaude(params) {
|
|
|
72908
73155
|
}
|
|
72909
73156
|
return params.proc.exit(childExitCode(result));
|
|
72910
73157
|
}
|
|
72911
|
-
var
|
|
73158
|
+
var import_node_os12, SIGNAL_EXIT_CODE_OFFSET;
|
|
72912
73159
|
var init_spawn = __esm({
|
|
72913
73160
|
"src/launcher/spawn.ts"() {
|
|
72914
73161
|
"use strict";
|
|
72915
|
-
|
|
73162
|
+
import_node_os12 = __toESM(require("node:os"), 1);
|
|
72916
73163
|
SIGNAL_EXIT_CODE_OFFSET = 128;
|
|
72917
73164
|
}
|
|
72918
73165
|
});
|
|
@@ -72999,7 +73246,7 @@ function providerModels(paths) {
|
|
|
72999
73246
|
if (entry.provider.kind === "codex") {
|
|
73000
73247
|
if (catalogue !== void 0 && catalogue.supervisorPid !== supervisorPid) return [];
|
|
73001
73248
|
const env = doorHome === void 0 ? process.env : { ...process.env, CODEX_HOME: doorHome };
|
|
73002
|
-
const fingerprint = savedCatalogueFingerprint(entry.provider, paths, env,
|
|
73249
|
+
const fingerprint = savedCatalogueFingerprint(entry.provider, paths, env, import_node_os13.default.homedir(), realFsPort.readFileUtf8);
|
|
73003
73250
|
if (fingerprint === void 0 || catalogue?.credentialFingerprint !== fingerprint) return [];
|
|
73004
73251
|
}
|
|
73005
73252
|
return providerModelRows(entry.provider, catalogue?.models).map((row) => ({ provider: entry.name, model: row.model }));
|
|
@@ -73008,11 +73255,11 @@ function providerModels(paths) {
|
|
|
73008
73255
|
function targetRefs(paths) {
|
|
73009
73256
|
return providerModels(paths).map((entry) => `${entry.provider}/${entry.model}`);
|
|
73010
73257
|
}
|
|
73011
|
-
var
|
|
73258
|
+
var import_node_os13;
|
|
73012
73259
|
var init_targets = __esm({
|
|
73013
73260
|
"src/models/targets.ts"() {
|
|
73014
73261
|
"use strict";
|
|
73015
|
-
|
|
73262
|
+
import_node_os13 = __toESM(require("node:os"), 1);
|
|
73016
73263
|
init_catalogueCredential();
|
|
73017
73264
|
init_state();
|
|
73018
73265
|
init_modelPicker();
|
|
@@ -73030,7 +73277,7 @@ function resolveIdentityCredential(identity, credential, env, port) {
|
|
|
73030
73277
|
const resolution = resolveCredential({ credential, env, port, subject: `identity ${identity.name}`, cacheKey: identityCacheKey(identity.id) });
|
|
73031
73278
|
return resolution.ok ? resolution : { ok: false, status: CREDENTIAL_UNAVAILABLE_EXIT, message: `agent-shim: ${resolution.message}` };
|
|
73032
73279
|
}
|
|
73033
|
-
function pickFromPool(decided, params, parsedArgv, readOnly) {
|
|
73280
|
+
function pickFromPool(decided, params, parsedArgv, readOnly, providerSelections) {
|
|
73034
73281
|
const { paths, fs: fs37, proc, log } = params;
|
|
73035
73282
|
if (decided.pool === void 0) {
|
|
73036
73283
|
return { identityDecision: decided };
|
|
@@ -73045,6 +73292,17 @@ function pickFromPool(decided, params, parsedArgv, readOnly) {
|
|
|
73045
73292
|
return proc.exit(1);
|
|
73046
73293
|
}
|
|
73047
73294
|
const resumeContextTokens = resumedContextTokens(farmRuntime.fs, { claudeHome: farmRuntime.claudeHome, cwd: farmRuntime.cwd, passthrough: parsedArgv.rest });
|
|
73295
|
+
const cliFlagConfigProfile = params.cliFlagConfigProfile ?? parsedArgv.configProfile;
|
|
73296
|
+
const providerOf = memberProviderResolver({
|
|
73297
|
+
paths,
|
|
73298
|
+
fs: fs37,
|
|
73299
|
+
env: providerSelections.env,
|
|
73300
|
+
cliProvider: parsedArgv.provider,
|
|
73301
|
+
...cliFlagConfigProfile === void 0 ? {} : { cliFlagConfigProfile },
|
|
73302
|
+
...params.directoryRuleConfigProfile === void 0 ? {} : { directoryRuleConfigProfile: params.directoryRuleConfigProfile },
|
|
73303
|
+
...params.globalDefaultConfigProfile === void 0 ? {} : { globalDefaultConfigProfile: params.globalDefaultConfigProfile },
|
|
73304
|
+
loadCascade: (baseConfigProfile) => farmRuntime.loadCascade(baseConfigProfile, providerSelections.cliOverride)
|
|
73305
|
+
});
|
|
73048
73306
|
const resolution = resolvePoolLaunch({
|
|
73049
73307
|
poolName: decided.pool,
|
|
73050
73308
|
selectedVia: decided.source,
|
|
@@ -73056,6 +73314,7 @@ function pickFromPool(decided, params, parsedArgv, readOnly) {
|
|
|
73056
73314
|
now: farmRuntime.now,
|
|
73057
73315
|
sleep: farmRuntime.lock.sleep,
|
|
73058
73316
|
passthrough: parsedArgv.rest,
|
|
73317
|
+
providerOf,
|
|
73059
73318
|
...resumeContextTokens === void 0 ? {} : { resumeContextTokens },
|
|
73060
73319
|
// 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.
|
|
73061
73320
|
wait: !readOnly && parsedArgv.wait === true,
|
|
@@ -73068,7 +73327,7 @@ function pickFromPool(decided, params, parsedArgv, readOnly) {
|
|
|
73068
73327
|
}
|
|
73069
73328
|
return {
|
|
73070
73329
|
identityDecision: { ...decided, name: resolution.identity },
|
|
73071
|
-
poolPick: { name: decided.pool, reasons: resolution.reasons, ...resolution.movedOff === void 0 ? {} : { movedOff: resolution.movedOff } },
|
|
73330
|
+
poolPick: { name: decided.pool, reasons: resolution.reasons, ...resolution.provider === void 0 ? {} : { provider: resolution.provider }, ...resolution.movedOff === void 0 ? {} : { movedOff: resolution.movedOff } },
|
|
73072
73331
|
poolRanking: resolution.candidates,
|
|
73073
73332
|
...resolution.lastRanAs === void 0 ? {} : { lastRanAs: { identity: resolution.lastRanAs.identity, agoMs: farmRuntime.now() - Date.parse(resolution.lastRanAs.at) } }
|
|
73074
73333
|
};
|
|
@@ -73104,7 +73363,7 @@ function decideLaunch(params, readOnly, onRecorded) {
|
|
|
73104
73363
|
shareFlags: parsedArgv.shareFlags,
|
|
73105
73364
|
hideFlags: parsedArgv.hideFlags
|
|
73106
73365
|
});
|
|
73107
|
-
const { identityDecision, poolPick, poolRanking, lastRanAs } = pickFromPool(decidedIdentity, params, parsedArgv, readOnly);
|
|
73366
|
+
const { identityDecision, poolPick, poolRanking, lastRanAs } = pickFromPool(decidedIdentity, params, parsedArgv, readOnly, { env, cliOverride });
|
|
73108
73367
|
const lockFarm = !readOnly && !configDirEscapeHatchApplies && identityDecision.name !== void 0 ? params.farm : void 0;
|
|
73109
73368
|
const lockPorts = params.namesLock ?? (lockFarm === void 0 ? realIdentityNamesLockPorts : { fs: lockFarm.fs, nowMs: lockFarm.now, ...lockFarm.lock });
|
|
73110
73369
|
const namesLock = readOnly || configDirEscapeHatchApplies || identityDecision.name === void 0 ? void 0 : acquireIdentityNamesLock(paths, lockPorts);
|
|
@@ -73305,12 +73564,12 @@ function decideLaunch(params, readOnly, onRecorded) {
|
|
|
73305
73564
|
if (definition.kind === "codex" && readOnly && cache !== void 0) {
|
|
73306
73565
|
const binding = parseCatalogueBinding(params.fs.readFileUtf8(catalogueBindingPath(paths, name, catalogueOwner, generation)));
|
|
73307
73566
|
const configuredHome = catalogueEnv.CODEX_HOME;
|
|
73308
|
-
const home = configuredHome === void 0 || configuredHome === "" ? import_node_path58.default.join(
|
|
73567
|
+
const home = configuredHome === void 0 || configuredHome === "" ? import_node_path58.default.join(import_node_os14.default.homedir(), ".codex") : configuredHome;
|
|
73309
73568
|
const source = definition.codex?.login === "chatgpt-sign-in" ? paths.chatgptSignInFile : import_node_path58.default.resolve(home, "auth.json");
|
|
73310
73569
|
const revision = params.fs.fileRevision?.(source);
|
|
73311
73570
|
if (binding === void 0 || binding.fingerprint !== cache.credentialFingerprint || binding.source !== source || revision === void 0 || revision !== binding.revision) return [];
|
|
73312
73571
|
}
|
|
73313
|
-
const fingerprint = definition.kind === "codex" && !readOnly ? savedCatalogueFingerprint(definition, paths, catalogueEnv,
|
|
73572
|
+
const fingerprint = definition.kind === "codex" && !readOnly ? savedCatalogueFingerprint(definition, paths, catalogueEnv, import_node_os14.default.homedir(), params.fs.readFileUtf8) : void 0;
|
|
73314
73573
|
if (definition.kind === "codex" && !readOnly && cache !== void 0 && (fingerprint === void 0 || cache.credentialFingerprint !== fingerprint)) return [];
|
|
73315
73574
|
return [[name, definition, cache?.models ?? []]];
|
|
73316
73575
|
} catch {
|
|
@@ -73464,6 +73723,11 @@ function prepareRegisteredLaunch(params, onRecorded) {
|
|
|
73464
73723
|
proc.exit(check2.status);
|
|
73465
73724
|
}
|
|
73466
73725
|
}
|
|
73726
|
+
const unreachable = resolvedProvider === void 0 ? void 0 : unreachableProviderLine(resolvedProvider.name, resolvedProvider.definition, params.probeBaseUrl);
|
|
73727
|
+
if (unreachable !== void 0) {
|
|
73728
|
+
log.error(`agent-shim: ${unreachable}`);
|
|
73729
|
+
proc.exit(1);
|
|
73730
|
+
}
|
|
73467
73731
|
const frontDoorPort = params.frontdoor;
|
|
73468
73732
|
const frontDoorEngaged = resolvedProvider !== void 0 || resolvedFlags.headroom || resolvedFlags.trackUsage;
|
|
73469
73733
|
if (frontDoorEngaged && frontDoorPort === void 0) {
|
|
@@ -73578,12 +73842,12 @@ function runLaunchPlan(plan, spawn10) {
|
|
|
73578
73842
|
function runLauncher(params) {
|
|
73579
73843
|
params.proc.exit(runLaunchPlan(prepareLaunch(params), params.spawn));
|
|
73580
73844
|
}
|
|
73581
|
-
var import_node_crypto25,
|
|
73845
|
+
var import_node_crypto25, import_node_os14, import_node_util6, import_node_path58;
|
|
73582
73846
|
var init_launcher = __esm({
|
|
73583
73847
|
"src/launcher.ts"() {
|
|
73584
73848
|
"use strict";
|
|
73585
73849
|
import_node_crypto25 = require("node:crypto");
|
|
73586
|
-
|
|
73850
|
+
import_node_os14 = __toESM(require("node:os"), 1);
|
|
73587
73851
|
init_catalogueCredential();
|
|
73588
73852
|
import_node_util6 = require("node:util");
|
|
73589
73853
|
import_node_path58 = __toESM(require("node:path"), 1);
|
|
@@ -73609,6 +73873,7 @@ var init_launcher = __esm({
|
|
|
73609
73873
|
init_state();
|
|
73610
73874
|
init_providerCatalogue();
|
|
73611
73875
|
init_providersStore();
|
|
73876
|
+
init_memberProvider();
|
|
73612
73877
|
init_pool();
|
|
73613
73878
|
init_resumeContext();
|
|
73614
73879
|
init_lock();
|
|
@@ -73618,6 +73883,7 @@ var init_launcher = __esm({
|
|
|
73618
73883
|
init_flatten();
|
|
73619
73884
|
init_walk();
|
|
73620
73885
|
init_schema();
|
|
73886
|
+
init_providerReachability();
|
|
73621
73887
|
init_schema();
|
|
73622
73888
|
init_credential();
|
|
73623
73889
|
init_middleware();
|
|
@@ -73688,7 +73954,7 @@ var init_replayRun = __esm({
|
|
|
73688
73954
|
|
|
73689
73955
|
// src/launchWiring.ts
|
|
73690
73956
|
function buildFarmRuntime(paths, cwd, run = realRunPort) {
|
|
73691
|
-
const home =
|
|
73957
|
+
const home = import_node_os15.default.homedir();
|
|
73692
73958
|
const read = cosmiconfigReader();
|
|
73693
73959
|
const classification = loadClassification(paths);
|
|
73694
73960
|
const loaded = loadCascadeInput({ paths, home, cwd, read });
|
|
@@ -73739,6 +74005,7 @@ function realPrepareLaunchParams(paths, options) {
|
|
|
73739
74005
|
headroom: realHeadroomPort(paths, { spawnDaemon: options.spawnDaemon, cwd: farm.runtime.cwd }),
|
|
73740
74006
|
frontdoor: realFrontDoorPort(paths, options.spawnDaemon),
|
|
73741
74007
|
credentials: { ...realCredentialPort, cache: realCredentialCacheEnv(paths) },
|
|
74008
|
+
probeBaseUrl: realBaseUrlProbe,
|
|
73742
74009
|
hold: realHoldPort,
|
|
73743
74010
|
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",
|
|
73744
74011
|
hasUsableLogin: (identity, claudeBin) => storedLoginUsable(options.run ?? realRunPort, claudeBin, import_node_path59.default.join(paths.identitiesDir, identity), options.proc.env),
|
|
@@ -73783,11 +74050,11 @@ function resolveClaudeLaunch(options, run = realRunPort) {
|
|
|
73783
74050
|
async function resolveClaudeLaunchAsync(options, runAsync2 = realRunAsync) {
|
|
73784
74051
|
return await resolveWithAsyncRuns((run) => resolveClaudeLaunch(options, run), runAsync2);
|
|
73785
74052
|
}
|
|
73786
|
-
var
|
|
74053
|
+
var import_node_os15, import_node_path59, import_node_crypto26, LaunchRefusedError;
|
|
73787
74054
|
var init_launchWiring = __esm({
|
|
73788
74055
|
"src/launchWiring.ts"() {
|
|
73789
74056
|
"use strict";
|
|
73790
|
-
|
|
74057
|
+
import_node_os15 = __toESM(require("node:os"), 1);
|
|
73791
74058
|
import_node_path59 = __toESM(require("node:path"), 1);
|
|
73792
74059
|
import_node_crypto26 = require("node:crypto");
|
|
73793
74060
|
init_cliError();
|
|
@@ -73803,6 +74070,7 @@ var init_launchWiring = __esm({
|
|
|
73803
74070
|
init_replayRun();
|
|
73804
74071
|
init_paths();
|
|
73805
74072
|
init_signIn();
|
|
74073
|
+
init_providerReachability();
|
|
73806
74074
|
init_realPorts();
|
|
73807
74075
|
LaunchRefusedError = class extends CliError {
|
|
73808
74076
|
exitCode;
|
|
@@ -89733,7 +90001,7 @@ async function l3e(e10, t10, n10, r10) {
|
|
|
89733
90001
|
if (d.length === 0) return [];
|
|
89734
90002
|
return qR(Buffer.from(b3(d)), { limit: r10.limit, offset: r10.offset }, l, c10);
|
|
89735
90003
|
}
|
|
89736
|
-
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;
|
|
90004
|
+
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;
|
|
89737
90005
|
var init_sdk = __esm({
|
|
89738
90006
|
"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"() {
|
|
89739
90007
|
import_node_module = require("node:module");
|
|
@@ -89763,7 +90031,7 @@ var init_sdk = __esm({
|
|
|
89763
90031
|
import_promises6 = require("fs/promises");
|
|
89764
90032
|
import_os4 = require("os");
|
|
89765
90033
|
import_node_path60 = __toESM(require("node:path"), 1);
|
|
89766
|
-
|
|
90034
|
+
import_node_os16 = __toESM(require("node:os"), 1);
|
|
89767
90035
|
import_node_process5 = __toESM(require("node:process"), 1);
|
|
89768
90036
|
import_path7 = require("path");
|
|
89769
90037
|
import_events = require("events");
|
|
@@ -98561,8 +98829,8 @@ var init_sdk = __esm({
|
|
|
98561
98829
|
wre = "coordinator-relay";
|
|
98562
98830
|
xre = [iL, Tre, bre, Cre, Ere, Are, Rre, sL, Ore, wre, ul, XD, Sm, QD, eL];
|
|
98563
98831
|
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"];
|
|
98564
|
-
Ps =
|
|
98565
|
-
pb =
|
|
98832
|
+
Ps = import_node_os16.default.homedir();
|
|
98833
|
+
pb = import_node_os16.default.tmpdir();
|
|
98566
98834
|
({ env: dl } = import_node_process5.default);
|
|
98567
98835
|
vre = (e10) => {
|
|
98568
98836
|
let t10 = import_node_path60.default.join(Ps, "Library");
|
|
@@ -107379,14 +107647,14 @@ XA==
|
|
|
107379
107647
|
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";
|
|
107380
107648
|
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";
|
|
107381
107649
|
FGe = "When managed settings or a --settings file set filesystem.denyRead, a Read(\u2026) deny rule or a credentials.files entry (deny or mask)";
|
|
107382
|
-
|
|
107383
|
-
Ac = `${iw}, values from ${
|
|
107384
|
-
U_ = `${iw}, true from ${
|
|
107385
|
-
b2 = `${iw}, and managed, --settings or user settings set true, false from ${
|
|
107386
|
-
C2 = `${NGe}, values from ${
|
|
107387
|
-
$Ge = `${UGe}, a value from ${
|
|
107388
|
-
zGe = `${Ac} ${FGe}, a value from ${
|
|
107389
|
-
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 ${
|
|
107650
|
+
os16 = "project settings (.claude/settings.json and .claude/settings.local.json)";
|
|
107651
|
+
Ac = `${iw}, values from ${os16} are ignored.`;
|
|
107652
|
+
U_ = `${iw}, true from ${os16} is ignored (false there still applies).`;
|
|
107653
|
+
b2 = `${iw}, and managed, --settings or user settings set true, false from ${os16} is ignored (true there still applies).`;
|
|
107654
|
+
C2 = `${NGe}, values from ${os16} are ignored. With network.allowManagedDomainsOnly, only managed settings may set it.`;
|
|
107655
|
+
$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.`;
|
|
107656
|
+
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.`;
|
|
107657
|
+
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());
|
|
107390
107658
|
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());
|
|
107391
107659
|
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) => {
|
|
107392
107660
|
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.' });
|
|
@@ -107428,7 +107696,7 @@ XA==
|
|
|
107428
107696
|
for (let a10 of i10) n10.add(a10);
|
|
107429
107697
|
}
|
|
107430
107698
|
}).optional());
|
|
107431
|
-
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 ${
|
|
107699
|
+
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());
|
|
107432
107700
|
pa = ["acceptEdits", "auto", "bypassPermissions", "default", "dontAsk", "plan"];
|
|
107433
107701
|
WGe = [...pa];
|
|
107434
107702
|
O2 = WGe;
|
|
@@ -110033,14 +110301,14 @@ function createRealAnthropicUsageRefresher(params) {
|
|
|
110033
110301
|
},
|
|
110034
110302
|
now: () => Date.now(),
|
|
110035
110303
|
log: params.log,
|
|
110036
|
-
concurrency: (0,
|
|
110304
|
+
concurrency: (0, import_node_os17.availableParallelism)()
|
|
110037
110305
|
});
|
|
110038
110306
|
}
|
|
110039
|
-
var
|
|
110307
|
+
var import_node_os17, PROBE_LAUNCH_FLAGS;
|
|
110040
110308
|
var init_realAnthropicUsageProbe = __esm({
|
|
110041
110309
|
"src/usage/realAnthropicUsageProbe.ts"() {
|
|
110042
110310
|
"use strict";
|
|
110043
|
-
|
|
110311
|
+
import_node_os17 = require("node:os");
|
|
110044
110312
|
init_identityStore();
|
|
110045
110313
|
init_anthropicUsageRefresh();
|
|
110046
110314
|
init_identityClaude();
|
|
@@ -123002,7 +123270,7 @@ function namesMovedPath(text5, moved) {
|
|
|
123002
123270
|
// src/identityRename.ts
|
|
123003
123271
|
init_providersStore();
|
|
123004
123272
|
init_middleware();
|
|
123005
|
-
|
|
123273
|
+
init_windowLengths();
|
|
123006
123274
|
init_read();
|
|
123007
123275
|
init_schema2();
|
|
123008
123276
|
init_signIn();
|
|
@@ -124579,7 +124847,7 @@ var import_node_path46 = __toESM(require("node:path"), 1);
|
|
|
124579
124847
|
init_commandDeps();
|
|
124580
124848
|
|
|
124581
124849
|
// src/checkReport.ts
|
|
124582
|
-
var
|
|
124850
|
+
var import_node_os8 = __toESM(require("node:os"), 1);
|
|
124583
124851
|
init_cliError();
|
|
124584
124852
|
|
|
124585
124853
|
// src/codex/identity.ts
|
|
@@ -124616,6 +124884,7 @@ function candidateView(candidate) {
|
|
|
124616
124884
|
feasible: candidate.feasible,
|
|
124617
124885
|
...candidate.blockedUntilMs === void 0 ? {} : { blockedUntil: new Date(candidate.blockedUntilMs).toISOString() },
|
|
124618
124886
|
plan: candidate.plan,
|
|
124887
|
+
...candidate.provider === void 0 ? {} : { provider: candidate.provider },
|
|
124619
124888
|
reasons: [...candidate.reasons]
|
|
124620
124889
|
};
|
|
124621
124890
|
}
|
|
@@ -124629,6 +124898,7 @@ function collectPoolPick(params) {
|
|
|
124629
124898
|
nowMs: params.nowMs,
|
|
124630
124899
|
resuming: false,
|
|
124631
124900
|
identityIdOf: identityIdResolver(params.paths.identitiesDir, params.fs),
|
|
124901
|
+
...params.providerOf === void 0 ? {} : { providerOf: params.providerOf },
|
|
124632
124902
|
...sticky.sticky === void 0 ? {} : { sticky: sticky.sticky }
|
|
124633
124903
|
});
|
|
124634
124904
|
return {
|
|
@@ -124643,6 +124913,29 @@ function collectPoolPick(params) {
|
|
|
124643
124913
|
};
|
|
124644
124914
|
}
|
|
124645
124915
|
|
|
124916
|
+
// src/poolProviderWiring.ts
|
|
124917
|
+
var import_node_os7 = __toESM(require("node:os"), 1);
|
|
124918
|
+
init_load();
|
|
124919
|
+
init_cascade();
|
|
124920
|
+
init_memberProvider();
|
|
124921
|
+
init_realPorts();
|
|
124922
|
+
function realMemberProviderResolver(params) {
|
|
124923
|
+
const home = import_node_os7.default.homedir();
|
|
124924
|
+
const read = cosmiconfigReader();
|
|
124925
|
+
const loaded = params.loaded ?? loadCascadeInput({ paths: params.paths, home, cwd: params.cwd, read });
|
|
124926
|
+
const selections = readDirectorySelections(loaded);
|
|
124927
|
+
return memberProviderResolver({
|
|
124928
|
+
paths: params.paths,
|
|
124929
|
+
fs: realFsPort,
|
|
124930
|
+
env: params.env,
|
|
124931
|
+
cliProvider: params.cliProvider,
|
|
124932
|
+
...params.cliFlagConfigProfile === void 0 ? {} : { cliFlagConfigProfile: params.cliFlagConfigProfile },
|
|
124933
|
+
...selections.configProfile === void 0 ? {} : { directoryRuleConfigProfile: selections.configProfile },
|
|
124934
|
+
...loaded.globalConfig?.defaultConfigProfile === void 0 ? {} : { globalDefaultConfigProfile: loaded.globalConfig.defaultConfigProfile },
|
|
124935
|
+
loadCascade: (baseConfigProfile) => loadCascadeInput({ paths: params.paths, home, cwd: params.cwd, read, ...baseConfigProfile === void 0 ? {} : { baseConfigProfile } }).input
|
|
124936
|
+
});
|
|
124937
|
+
}
|
|
124938
|
+
|
|
124646
124939
|
// src/launchSelection.ts
|
|
124647
124940
|
init_poolStore();
|
|
124648
124941
|
init_realPorts();
|
|
@@ -124668,7 +124961,8 @@ function selectLaunch(params, loaded) {
|
|
|
124668
124961
|
if (pools[decidedIdentity.pool] === void 0) {
|
|
124669
124962
|
throw new PoolNotFoundError(decidedIdentity.pool);
|
|
124670
124963
|
}
|
|
124671
|
-
|
|
124964
|
+
const providerOf = realMemberProviderResolver({ paths, cwd, env: params.env, ...params.configProfile === void 0 ? {} : { cliFlagConfigProfile: params.configProfile }, loaded });
|
|
124965
|
+
poolPick = collectPoolPick({ paths, fs: realFsPort, usageFs: realFarmFs, poolName: decidedIdentity.pool, pools, directory: cwd, nowMs: Date.now(), providerOf });
|
|
124672
124966
|
}
|
|
124673
124967
|
const identity = poolPick?.pick === void 0 ? decidedIdentity : { ...decidedIdentity, name: poolPick.pick };
|
|
124674
124968
|
const loadedIdentity = identity.name === void 0 ? void 0 : loadIdentity(paths.identitiesDir, identity.name, realFsPort);
|
|
@@ -124697,6 +124991,7 @@ init_zod();
|
|
|
124697
124991
|
init_envBool();
|
|
124698
124992
|
init_load();
|
|
124699
124993
|
init_schema();
|
|
124994
|
+
init_providerReachability();
|
|
124700
124995
|
init_identityStore();
|
|
124701
124996
|
init_credential();
|
|
124702
124997
|
init_claudeVersion();
|
|
@@ -124889,6 +125184,7 @@ function runCheck(params) {
|
|
|
124889
125184
|
const settingsExposure = inspectSettingsExposure({ settingsShared, files: params.settingsFiles });
|
|
124890
125185
|
const keychain = !isCodex && params.platform === "darwin" && params.run !== void 0 && params.farmRoot !== void 0 ? lookupKeychainService(params.run, params.farmRoot) : void 0;
|
|
124891
125186
|
const claudeVersion = isCodex ? void 0 : buildClaudeVersionReport(params, resolved.flattened.launch.claudeVersion);
|
|
125187
|
+
const providerReachability = buildProviderReachability(params.provider, params.probeBaseUrl);
|
|
124892
125188
|
return {
|
|
124893
125189
|
...params.identityName === void 0 ? {} : { identityName: params.identityName },
|
|
124894
125190
|
identitySource: params.identitySource,
|
|
@@ -124902,9 +125198,18 @@ function runCheck(params) {
|
|
|
124902
125198
|
...keychain === void 0 ? {} : { keychain },
|
|
124903
125199
|
settingsExposure,
|
|
124904
125200
|
credential: buildCredentialReport(params.provider, params.identity, params.identityId, params.credentialCache),
|
|
124905
|
-
...claudeVersion === void 0 ? {} : { claudeVersion }
|
|
125201
|
+
...claudeVersion === void 0 ? {} : { claudeVersion },
|
|
125202
|
+
...providerReachability === void 0 ? {} : { providerReachability }
|
|
124906
125203
|
};
|
|
124907
125204
|
}
|
|
125205
|
+
function buildProviderReachability(provider, probe) {
|
|
125206
|
+
if (provider?.definition === void 0 || probe === void 0 || !isHttpProvider(provider.definition)) {
|
|
125207
|
+
return void 0;
|
|
125208
|
+
}
|
|
125209
|
+
const { baseUrl } = provider.definition;
|
|
125210
|
+
const reachability = probeProviderReachability(provider.name, provider.definition, probe);
|
|
125211
|
+
return reachability.ok ? { name: provider.name, baseUrl, ok: true } : { name: provider.name, baseUrl, ok: false, message: reachability.message };
|
|
125212
|
+
}
|
|
124908
125213
|
function formatCheckReport(report) {
|
|
124909
125214
|
const lines = [];
|
|
124910
125215
|
lines.push(`Identity: ${report.identityName ?? "(none)"} (${report.identitySource})`);
|
|
@@ -124951,6 +125256,11 @@ function formatCheckReport(report) {
|
|
|
124951
125256
|
if (credential.applies === "stored-login") {
|
|
124952
125257
|
lines.push(" The identity's stored login (no credential block applies).");
|
|
124953
125258
|
}
|
|
125259
|
+
if (report.providerReachability !== void 0) {
|
|
125260
|
+
lines.push("", "Provider reachability:");
|
|
125261
|
+
const reachability = report.providerReachability;
|
|
125262
|
+
lines.push(reachability.ok ? ` Provider ${reachability.name}: ${reachability.baseUrl} accepts connections` : ` [FAIL] ${reachability.message}`);
|
|
125263
|
+
}
|
|
124954
125264
|
if (report.claudeVersion !== void 0) {
|
|
124955
125265
|
lines.push("", "Claude Code version:");
|
|
124956
125266
|
const { pinned, highestInstalled, installed } = report.claudeVersion;
|
|
@@ -125001,11 +125311,12 @@ function checkReportToJson(report) {
|
|
|
125001
125311
|
...report.keychain === void 0 ? {} : { keychain: report.keychain },
|
|
125002
125312
|
settingsExposure: report.settingsExposure,
|
|
125003
125313
|
credential: report.credential,
|
|
125004
|
-
...report.claudeVersion === void 0 ? {} : { claudeVersion: report.claudeVersion }
|
|
125314
|
+
...report.claudeVersion === void 0 ? {} : { claudeVersion: report.claudeVersion },
|
|
125315
|
+
...report.providerReachability === void 0 ? {} : { providerReachability: report.providerReachability }
|
|
125005
125316
|
};
|
|
125006
125317
|
}
|
|
125007
125318
|
function checkReportHasWarnings(report) {
|
|
125008
|
-
return report.resolved.diagnostics.some((diagnostic) => diagnostic.severity !== "info") || report.projectEncodingAmbiguities.length > 0 || !report.ambientCredential.ok || report.credential.provider?.problem !== void 0 || report.claudeVersion?.pinned?.installed === false;
|
|
125319
|
+
return report.resolved.diagnostics.some((diagnostic) => diagnostic.severity !== "info") || report.projectEncodingAmbiguities.length > 0 || !report.ambientCredential.ok || report.credential.provider?.problem !== void 0 || report.providerReachability?.ok === false || report.claudeVersion?.pinned?.installed === false;
|
|
125009
125320
|
}
|
|
125010
125321
|
function loadCheckProvider(paths, name) {
|
|
125011
125322
|
let definition;
|
|
@@ -125021,7 +125332,7 @@ function loadCheckProvider(paths, name) {
|
|
|
125021
125332
|
}
|
|
125022
125333
|
function collectCheckReport(params) {
|
|
125023
125334
|
const { paths, cwd } = params;
|
|
125024
|
-
const home =
|
|
125335
|
+
const home = import_node_os8.default.homedir();
|
|
125025
125336
|
const read = cosmiconfigReader();
|
|
125026
125337
|
const loaded = loadCascadeInput({ paths, home, cwd, read });
|
|
125027
125338
|
const git = resolveGitBranch(realRunPort, cwd);
|
|
@@ -125072,7 +125383,8 @@ function collectCheckReport(params) {
|
|
|
125072
125383
|
...isCodex ? {} : { installedClaudeVersions: realInstalledClaudeVersions() },
|
|
125073
125384
|
...farmRoot === void 0 ? {} : { farmRoot },
|
|
125074
125385
|
platform: process.platform,
|
|
125075
|
-
...provider === void 0 ? {} : { provider }
|
|
125386
|
+
...provider === void 0 ? {} : { provider },
|
|
125387
|
+
probeBaseUrl: realBaseUrlProbe
|
|
125076
125388
|
});
|
|
125077
125389
|
return report;
|
|
125078
125390
|
}
|
|
@@ -125102,7 +125414,7 @@ function registerCheckCommand(program2, deps) {
|
|
|
125102
125414
|
// src/codex/commands.ts
|
|
125103
125415
|
var import_node_crypto17 = require("node:crypto");
|
|
125104
125416
|
var import_node_fs17 = __toESM(require("node:fs"), 1);
|
|
125105
|
-
var
|
|
125417
|
+
var import_node_os9 = __toESM(require("node:os"), 1);
|
|
125106
125418
|
var import_node_path47 = __toESM(require("node:path"), 1);
|
|
125107
125419
|
init_commandDeps();
|
|
125108
125420
|
init_state();
|
|
@@ -125419,7 +125731,7 @@ function createCodexRoutePorts(log, signInFile, options) {
|
|
|
125419
125731
|
const agent = createUpstreamAgent();
|
|
125420
125732
|
const upstreamFetch = createUpstreamFetch(agent);
|
|
125421
125733
|
const tempSuffix = `${String(process.pid)}.${(0, import_node_crypto17.randomUUID)()}`;
|
|
125422
|
-
const auth = createCodexAuthStore(import_node_path47.default.join(codexHome(options?.env ?? process.env,
|
|
125734
|
+
const auth = createCodexAuthStore(import_node_path47.default.join(codexHome(options?.env ?? process.env, import_node_os9.default.homedir()), "auth.json"), {
|
|
125423
125735
|
fs: realCodexAuthFs,
|
|
125424
125736
|
fetch: upstreamFetch,
|
|
125425
125737
|
now: () => /* @__PURE__ */ new Date(),
|
|
@@ -125567,7 +125879,7 @@ function registerCodexCommand(program2, deps) {
|
|
|
125567
125879
|
|
|
125568
125880
|
// src/frontdoor/commands.ts
|
|
125569
125881
|
var import_node_crypto32 = require("node:crypto");
|
|
125570
|
-
var
|
|
125882
|
+
var import_node_os20 = __toESM(require("node:os"), 1);
|
|
125571
125883
|
init_catalogueCredential();
|
|
125572
125884
|
var import_node_path73 = __toESM(require("node:path"), 1);
|
|
125573
125885
|
var import_node_fs30 = __toESM(require("node:fs"), 1);
|
|
@@ -126403,7 +126715,7 @@ function createTargetObservationStore(fs37, paths) {
|
|
|
126403
126715
|
|
|
126404
126716
|
// src/update/commands.ts
|
|
126405
126717
|
var import_node_fs21 = __toESM(require("node:fs"), 1);
|
|
126406
|
-
var
|
|
126718
|
+
var import_node_os11 = __toESM(require("node:os"), 1);
|
|
126407
126719
|
var import_node_path54 = __toESM(require("node:path"), 1);
|
|
126408
126720
|
init_package();
|
|
126409
126721
|
init_commandDeps();
|
|
@@ -126508,7 +126820,7 @@ var realUpdatePorts = {
|
|
|
126508
126820
|
chmod: (filePath, mode) => {
|
|
126509
126821
|
import_node_fs21.default.chmodSync(filePath, mode);
|
|
126510
126822
|
},
|
|
126511
|
-
mkdtemp: () => import_node_fs21.default.mkdtempSync(import_node_path54.default.join(
|
|
126823
|
+
mkdtemp: () => import_node_fs21.default.mkdtempSync(import_node_path54.default.join(import_node_os11.default.tmpdir(), "agent-shim-update-")),
|
|
126512
126824
|
rmRecursive: (targetPath) => {
|
|
126513
126825
|
import_node_fs21.default.rmSync(targetPath, { recursive: true, force: true });
|
|
126514
126826
|
}
|
|
@@ -126607,7 +126919,8 @@ async function refreshStalePoolMembers(params) {
|
|
|
126607
126919
|
if (identities.size === 0) {
|
|
126608
126920
|
return;
|
|
126609
126921
|
}
|
|
126610
|
-
|
|
126922
|
+
const members2 = params.loadMembers([...identities]).filter((member) => member.provider === void 0 && member.providerError === void 0);
|
|
126923
|
+
await params.refresher.refreshStale(members2);
|
|
126611
126924
|
}
|
|
126612
126925
|
|
|
126613
126926
|
// src/frontdoor/commands.ts
|
|
@@ -126733,7 +127046,7 @@ function createRealWindowOpener(params) {
|
|
|
126733
127046
|
// src/usage/jobKeeper.ts
|
|
126734
127047
|
init_conditions();
|
|
126735
127048
|
init_middleware();
|
|
126736
|
-
|
|
127049
|
+
init_windowLengths();
|
|
126737
127050
|
init_preflight();
|
|
126738
127051
|
|
|
126739
127052
|
// src/usage/windowKeeper.ts
|
|
@@ -128365,14 +128678,14 @@ var import_node_net2 = __toESM(require("node:net"), 1);
|
|
|
128365
128678
|
init_legacy();
|
|
128366
128679
|
|
|
128367
128680
|
// src/frontdoor/machineLoad.ts
|
|
128368
|
-
var
|
|
128681
|
+
var import_node_os18 = __toESM(require("node:os"), 1);
|
|
128369
128682
|
var processorShare = (reading) => reading.loadAverage <= reading.cpus ? 1 : reading.cpus / reading.loadAverage;
|
|
128370
128683
|
function readMachineLoad() {
|
|
128371
|
-
const [oneMinute] =
|
|
128684
|
+
const [oneMinute] = import_node_os18.default.loadavg();
|
|
128372
128685
|
if (oneMinute === void 0) {
|
|
128373
128686
|
throw new Error("os.loadavg() returned no one-minute load average");
|
|
128374
128687
|
}
|
|
128375
|
-
return { loadAverage: oneMinute, cpus:
|
|
128688
|
+
return { loadAverage: oneMinute, cpus: import_node_os18.default.cpus().length };
|
|
128376
128689
|
}
|
|
128377
128690
|
|
|
128378
128691
|
// src/frontdoor/rcControl.ts
|
|
@@ -129883,7 +130196,6 @@ function codexIdentityFindings(entry, identity) {
|
|
|
129883
130196
|
// src/doctorReport.ts
|
|
129884
130197
|
init_claudeShim();
|
|
129885
130198
|
init_readableConfig();
|
|
129886
|
-
init_names();
|
|
129887
130199
|
init_store();
|
|
129888
130200
|
init_identityStore();
|
|
129889
130201
|
init_identityRecords();
|
|
@@ -129958,6 +130270,28 @@ var import_node_path63 = __toESM(require("node:path"), 1);
|
|
|
129958
130270
|
init_signIn();
|
|
129959
130271
|
init_identityAccounts();
|
|
129960
130272
|
init_read();
|
|
130273
|
+
init_providerReachability();
|
|
130274
|
+
|
|
130275
|
+
// src/doctorNameFinding.ts
|
|
130276
|
+
init_names();
|
|
130277
|
+
function pushNameFinding(push, section, kind, entry) {
|
|
130278
|
+
if (isFileName(entry.name)) {
|
|
130279
|
+
return true;
|
|
130280
|
+
}
|
|
130281
|
+
if (!isStoredName(entry.name)) {
|
|
130282
|
+
push(section, "fail", `${entry.path} cannot be used as a ${kind}: its name is ${JSON.stringify(entry.name)}, and a name ${FILE_NAME_RULE}. Rename or remove the file.`, entry.name);
|
|
130283
|
+
return false;
|
|
130284
|
+
}
|
|
130285
|
+
push(
|
|
130286
|
+
section,
|
|
130287
|
+
"warn",
|
|
130288
|
+
`The ${kind} ${JSON.stringify(entry.name)} is stored under a name that does not fit the shape names are given now (a name ${FILE_NAME_RULE}). It still works from your own configuration, but a project file cannot name it. Rename ${entry.path} to a name that fits, and change what names it.`,
|
|
130289
|
+
entry.name
|
|
130290
|
+
);
|
|
130291
|
+
return true;
|
|
130292
|
+
}
|
|
130293
|
+
|
|
130294
|
+
// src/doctorReport.ts
|
|
129961
130295
|
init_siwcStore();
|
|
129962
130296
|
init_siwc();
|
|
129963
130297
|
init_load();
|
|
@@ -130452,23 +130786,7 @@ function signInProblem(signIn) {
|
|
|
130452
130786
|
return error63 instanceof Error ? error63.message : String(error63);
|
|
130453
130787
|
}
|
|
130454
130788
|
}
|
|
130455
|
-
function
|
|
130456
|
-
if (isFileName(entry.name)) {
|
|
130457
|
-
return true;
|
|
130458
|
-
}
|
|
130459
|
-
if (!isStoredName(entry.name)) {
|
|
130460
|
-
push(section, "fail", `${entry.path} cannot be used as a ${kind}: its name is ${JSON.stringify(entry.name)}, and a name ${FILE_NAME_RULE}. Rename or remove the file.`, entry.name);
|
|
130461
|
-
return false;
|
|
130462
|
-
}
|
|
130463
|
-
push(
|
|
130464
|
-
section,
|
|
130465
|
-
"warn",
|
|
130466
|
-
`The ${kind} ${JSON.stringify(entry.name)} is stored under a name that does not fit the shape names are given now (a name ${FILE_NAME_RULE}). It still works from your own configuration, but a project file cannot name it. Rename ${entry.path} to a name that fits, and change what names it.`,
|
|
130467
|
-
entry.name
|
|
130468
|
-
);
|
|
130469
|
-
return true;
|
|
130470
|
-
}
|
|
130471
|
-
function pushProvider(push, entry, cacheEnv, signIn) {
|
|
130789
|
+
function pushProvider(push, entry, cacheEnv, signIn, probeBaseUrl) {
|
|
130472
130790
|
if (entry.raw === void 0) {
|
|
130473
130791
|
push("provider", "fail", `${entry.path} is missing.`, entry.name);
|
|
130474
130792
|
return;
|
|
@@ -130500,6 +130818,10 @@ function pushProvider(push, entry, cacheEnv, signIn) {
|
|
|
130500
130818
|
if (!router && validated3.data.env?.ENABLE_TOOL_SEARCH === void 0) {
|
|
130501
130819
|
push("provider", "warn", `${entry.name} does not set ENABLE_TOOL_SEARCH: a session on this provider keeps Claude Code's own API as its base URL, so it defers MCP tool loading and sends tool_reference payloads the upstream backend must understand. Set ENABLE_TOOL_SEARCH=false in the provider's env block to load tools upfront instead, when the backend does not support them.`, entry.name);
|
|
130502
130820
|
}
|
|
130821
|
+
const unreachable = unreachableProviderLine(entry.name, validated3.data, probeBaseUrl);
|
|
130822
|
+
if (unreachable !== void 0) {
|
|
130823
|
+
push("provider", "fail", unreachable, entry.name);
|
|
130824
|
+
}
|
|
130503
130825
|
if (signIn !== void 0 && isCodexProvider(validated3.data) && validated3.data.codex?.login === "chatgpt-sign-in") {
|
|
130504
130826
|
const problem = signInProblem(signIn);
|
|
130505
130827
|
if (problem !== void 0) {
|
|
@@ -130730,7 +131052,7 @@ function runDoctor(params) {
|
|
|
130730
131052
|
if (!pushNameFinding(push, "provider", "provider", entry)) {
|
|
130731
131053
|
continue;
|
|
130732
131054
|
}
|
|
130733
|
-
pushProvider(push, entry, params.credentialCache, params.chatgptSignIn);
|
|
131055
|
+
pushProvider(push, entry, params.credentialCache, params.chatgptSignIn, params.probeBaseUrl);
|
|
130734
131056
|
}
|
|
130735
131057
|
const providerNames = new Set(params.providers.map((entry) => entry.name));
|
|
130736
131058
|
for (const finding of aliasFindings(params.providerAliases ?? {}, providerNames)) {
|
|
@@ -131037,6 +131359,7 @@ function collectDoctorReport(params) {
|
|
|
131037
131359
|
configProfiles,
|
|
131038
131360
|
providers,
|
|
131039
131361
|
providerAliases: readProviderAliases(paths),
|
|
131362
|
+
probeBaseUrl: realBaseUrlProbe,
|
|
131040
131363
|
renameJournals: listRenameJournals(realFarmFs, paths.identityRenamesDir),
|
|
131041
131364
|
unreachableIdentities,
|
|
131042
131365
|
identityRecords: { all: records, displaced: displacedIdentities.map((record3) => ({ ...record3, directoryPresent: import_node_fs26.default.existsSync(import_node_path63.default.join(paths.identitiesDir, record3.id)) })), nameRenames: unfinishedNameRenames(paths).map((record3) => ({ from: record3.from, description: describeInterruptedNameRename(paths, record3) })), strayNameRenameFiles: strayNameRenameRecordFiles(paths) },
|
|
@@ -137087,7 +137410,7 @@ var Builder = class _Builder {
|
|
|
137087
137410
|
});
|
|
137088
137411
|
}
|
|
137089
137412
|
};
|
|
137090
|
-
var
|
|
137413
|
+
var os18 = Builder.create();
|
|
137091
137414
|
|
|
137092
137415
|
// node_modules/.pnpm/@orpc+openapi@2.0.0-beta.43/node_modules/@orpc/openapi/dist/index.mjs
|
|
137093
137416
|
var DEFS_REF_PREFIX = "#/$defs/";
|
|
@@ -137922,6 +138245,8 @@ var PoolPickCandidateViewSchema = external_exports.strictObject({
|
|
|
137922
138245
|
/** When an `ineligible` member can be used again, as an ISO instant. */
|
|
137923
138246
|
blockedUntil: external_exports.iso.datetime().optional(),
|
|
137924
138247
|
plan: PlanClassSchema,
|
|
138248
|
+
/** 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. */
|
|
138249
|
+
provider: external_exports.string().optional(),
|
|
137925
138250
|
/** The facts behind the class and score, in the order they matter. */
|
|
137926
138251
|
reasons: external_exports.array(external_exports.string())
|
|
137927
138252
|
});
|
|
@@ -138000,6 +138325,10 @@ var CheckCredentialProviderSchema = external_exports.union([
|
|
|
138000
138325
|
external_exports.strictObject({ name: external_exports.string(), credential: CredentialSummarySchema.optional(), cached: CachedCredentialStateSchema.optional() }),
|
|
138001
138326
|
external_exports.strictObject({ name: external_exports.string(), problem: external_exports.string() })
|
|
138002
138327
|
]);
|
|
138328
|
+
var CheckProviderReachabilitySchema = external_exports.union([
|
|
138329
|
+
external_exports.strictObject({ name: external_exports.string(), baseUrl: external_exports.string(), ok: external_exports.literal(true) }),
|
|
138330
|
+
external_exports.strictObject({ name: external_exports.string(), baseUrl: external_exports.string(), ok: external_exports.literal(false), message: external_exports.string() })
|
|
138331
|
+
]);
|
|
138003
138332
|
var CheckCredentialSchema = external_exports.strictObject({
|
|
138004
138333
|
applies: external_exports.enum(CHECK_CREDENTIAL_APPLIES),
|
|
138005
138334
|
provider: CheckCredentialProviderSchema.optional(),
|
|
@@ -138026,7 +138355,8 @@ var CheckReportJsonSchema = external_exports.strictObject({
|
|
|
138026
138355
|
keychain: CheckKeychainSchema.optional(),
|
|
138027
138356
|
settingsExposure: external_exports.readonly(external_exports.array(CheckSettingsExposureSchema)),
|
|
138028
138357
|
credential: CheckCredentialSchema,
|
|
138029
|
-
claudeVersion: CheckClaudeVersionSchema.optional()
|
|
138358
|
+
claudeVersion: CheckClaudeVersionSchema.optional(),
|
|
138359
|
+
providerReachability: CheckProviderReachabilitySchema.optional()
|
|
138030
138360
|
});
|
|
138031
138361
|
|
|
138032
138362
|
// src/frontdoor/controlApi.ts
|
|
@@ -141835,7 +142165,7 @@ function doorApiBearer(headers) {
|
|
|
141835
142165
|
return typeof presented === "string" && presented.slice(0, bearerPrefix).toLowerCase() === "bearer " ? presented.slice(bearerPrefix) : void 0;
|
|
141836
142166
|
}
|
|
141837
142167
|
function doorApiAuth(expectedToken) {
|
|
141838
|
-
return
|
|
142168
|
+
return os18.$context().use(({ context, next }) => {
|
|
141839
142169
|
const token = doorApiBearer(context.headers);
|
|
141840
142170
|
if (token === void 0 || !isLiveCapability(token, [expectedToken])) {
|
|
141841
142171
|
throw new ORPCError("UNAUTHORIZED", { message: "the front door's typed API demands this generation's control token as a Bearer credential" });
|
|
@@ -142736,6 +143066,8 @@ var LaunchResolveInputSchema = external_exports.strictObject({
|
|
|
142736
143066
|
var LaunchPoolDecisionSchema = external_exports.strictObject({
|
|
142737
143067
|
name: external_exports.string(),
|
|
142738
143068
|
reasons: external_exports.readonly(external_exports.array(external_exports.string())),
|
|
143069
|
+
/** The provider the ranking read for the chosen member, when the launch spends one in place of the member's Claude account. */
|
|
143070
|
+
provider: external_exports.string().optional(),
|
|
142739
143071
|
movedOff: external_exports.strictObject({ identity: external_exports.string(), reason: external_exports.string() }).optional()
|
|
142740
143072
|
});
|
|
142741
143073
|
var LaunchDecisionSchema = external_exports.strictObject({
|
|
@@ -143346,7 +143678,7 @@ function createDoorHealthPublisher(hub, now, pid) {
|
|
|
143346
143678
|
}
|
|
143347
143679
|
|
|
143348
143680
|
// src/frontdoor/quotaExpiringEvents.ts
|
|
143349
|
-
|
|
143681
|
+
init_windowLengths();
|
|
143350
143682
|
var FINAL_SPAN_DENOMINATOR = 30;
|
|
143351
143683
|
var QUOTA_EXPIRING_WINDOW_FRACTION = 1 / FINAL_SPAN_DENOMINATOR;
|
|
143352
143684
|
function createQuotaExpiringPublisher(hub, deps) {
|
|
@@ -144205,6 +144537,7 @@ init_translate();
|
|
|
144205
144537
|
init_quota();
|
|
144206
144538
|
init_credential();
|
|
144207
144539
|
init_providersStore();
|
|
144540
|
+
init_providerReachability();
|
|
144208
144541
|
|
|
144209
144542
|
// src/codex/route.ts
|
|
144210
144543
|
init_route();
|
|
@@ -145611,8 +145944,32 @@ init_connect();
|
|
|
145611
145944
|
// src/frontdoor/passthrough.ts
|
|
145612
145945
|
var http5 = __toESM(require("node:http"), 1);
|
|
145613
145946
|
var https4 = __toESM(require("node:https"), 1);
|
|
145947
|
+
init_providerReachability();
|
|
145614
145948
|
init_connect();
|
|
145615
145949
|
init_unifiedRefusal();
|
|
145950
|
+
function armConnectDeadline(forward, timeoutMs, giveUp) {
|
|
145951
|
+
let connected = false;
|
|
145952
|
+
const deadline = setTimeout(() => {
|
|
145953
|
+
const error63 = new Error(`no connection within ${String(timeoutMs)}ms`);
|
|
145954
|
+
forward.destroy(error63);
|
|
145955
|
+
giveUp(error63);
|
|
145956
|
+
}, timeoutMs);
|
|
145957
|
+
const opened = () => {
|
|
145958
|
+
connected = true;
|
|
145959
|
+
clearTimeout(deadline);
|
|
145960
|
+
};
|
|
145961
|
+
forward.once("socket", (socket) => {
|
|
145962
|
+
if (socket.connecting) {
|
|
145963
|
+
socket.once("connect", opened);
|
|
145964
|
+
} else {
|
|
145965
|
+
opened();
|
|
145966
|
+
}
|
|
145967
|
+
});
|
|
145968
|
+
forward.once("close", () => {
|
|
145969
|
+
clearTimeout(deadline);
|
|
145970
|
+
});
|
|
145971
|
+
return { connected: () => connected };
|
|
145972
|
+
}
|
|
145616
145973
|
var TOO_MANY_REQUESTS3 = 429;
|
|
145617
145974
|
var REFUSAL_BODY_LIMIT_BYTES = 16384;
|
|
145618
145975
|
function responseHeaders2(headers) {
|
|
@@ -145688,7 +146045,7 @@ function createPassthroughRoute(name, target) {
|
|
|
145688
146045
|
response.destroy();
|
|
145689
146046
|
} else {
|
|
145690
146047
|
response.start(HTTP_STATUS.badGateway, { "Content-Type": "application/json" });
|
|
145691
|
-
await response.write(JSON.stringify({ type: "error", error: { type: "api_error", message:
|
|
146048
|
+
await response.write(JSON.stringify({ type: "error", error: { type: "api_error", message: `${target.subject} at ${target.baseUrl} dropped the connection` } }));
|
|
145692
146049
|
response.end();
|
|
145693
146050
|
}
|
|
145694
146051
|
}
|
|
@@ -145697,16 +146054,31 @@ function createPassthroughRoute(name, target) {
|
|
|
145697
146054
|
void stream();
|
|
145698
146055
|
};
|
|
145699
146056
|
const forward = tls2 ? https4.request(options, onUpstreamResponse) : http5.request(options, onUpstreamResponse);
|
|
145700
|
-
|
|
146057
|
+
let failed = false;
|
|
146058
|
+
const fail = (error63, connected) => {
|
|
146059
|
+
if (failed) {
|
|
146060
|
+
return;
|
|
146061
|
+
}
|
|
146062
|
+
failed = true;
|
|
145701
146063
|
if (!response.headersSent) {
|
|
146064
|
+
const message = connected ? `${target.subject} at ${target.baseUrl} dropped the connection before answering: ${error63.message}` : couldNotConnectMessage(target.subject, target.baseUrl, error63.message);
|
|
146065
|
+
if (!connected) {
|
|
146066
|
+
target.couldNotConnect(message);
|
|
146067
|
+
}
|
|
145702
146068
|
response.start(HTTP_STATUS.badGateway, { "Content-Type": "application/json" });
|
|
145703
|
-
void response.write(JSON.stringify({ type: "error", error: { type: "api_error", message
|
|
146069
|
+
void response.write(JSON.stringify({ type: "error", error: { type: "api_error", message } })).then(() => {
|
|
145704
146070
|
response.end();
|
|
145705
146071
|
});
|
|
145706
146072
|
} else {
|
|
145707
146073
|
response.destroy();
|
|
145708
146074
|
}
|
|
145709
146075
|
resolve3(void 0);
|
|
146076
|
+
};
|
|
146077
|
+
const connection = armConnectDeadline(forward, target.connectTimeoutMs, (error63) => {
|
|
146078
|
+
fail(error63, false);
|
|
146079
|
+
});
|
|
146080
|
+
forward.on("error", (error63) => {
|
|
146081
|
+
fail(error63, connection.connected());
|
|
145710
146082
|
});
|
|
145711
146083
|
request7.signal.addEventListener("abort", () => {
|
|
145712
146084
|
forward.destroy();
|
|
@@ -145850,6 +146222,7 @@ async function scanRequestHead(request7, wholeBody = false) {
|
|
|
145850
146222
|
}
|
|
145851
146223
|
|
|
145852
146224
|
// src/frontdoor/providerRoute.ts
|
|
146225
|
+
var COULD_NOT_CONNECT_LOG_INTERVAL_MS = 6e4;
|
|
145853
146226
|
var isRcSelfHostPath = (path101) => path101 === "/v1/code/sessions" || path101.startsWith("/v1/code/sessions/") || path101 === "/v1/sessions" || path101.startsWith("/v1/sessions/");
|
|
145854
146227
|
function scopeSessionProviderPath(request7) {
|
|
145855
146228
|
if (request7.session.provider === void 0) {
|
|
@@ -145923,7 +146296,24 @@ function resolveAccountTarget(model, models) {
|
|
|
145923
146296
|
return first === void 0 ? void 0 : resolveAccountTarget(first, void 0);
|
|
145924
146297
|
}
|
|
145925
146298
|
function createProviderRouteResolver(deps) {
|
|
145926
|
-
const
|
|
146299
|
+
const couldNotConnectLoggedAt = /* @__PURE__ */ new Map();
|
|
146300
|
+
const couldNotConnectFor = (subject) => (line) => {
|
|
146301
|
+
const now = deps.now();
|
|
146302
|
+
const last = couldNotConnectLoggedAt.get(subject);
|
|
146303
|
+
if (last !== void 0 && now - last < COULD_NOT_CONNECT_LOG_INTERVAL_MS) {
|
|
146304
|
+
return;
|
|
146305
|
+
}
|
|
146306
|
+
couldNotConnectLoggedAt.set(subject, now);
|
|
146307
|
+
deps.log(`front door: ${line}`);
|
|
146308
|
+
};
|
|
146309
|
+
const oauthRoute = createPassthroughRoute("anthropic", {
|
|
146310
|
+
baseUrl: `https://${CONNECT_INTERCEPT_HOST}:${String(HTTPS_PORT)}`,
|
|
146311
|
+
stripPrefix: void 0,
|
|
146312
|
+
headroomUpstream: void 0,
|
|
146313
|
+
subject: "the Anthropic API",
|
|
146314
|
+
connectTimeoutMs: DEFAULT_PROVIDER_CONNECT_TIMEOUT_MS,
|
|
146315
|
+
couldNotConnect: couldNotConnectFor("the Anthropic API")
|
|
146316
|
+
});
|
|
145927
146317
|
const resolveCredential2 = shareInFlightResolutions(resolveCredentialAsync);
|
|
145928
146318
|
const resolveAgyCredential = createAgyCredentialResolver(deps.credentials);
|
|
145929
146319
|
const antigravityQuotaSources = /* @__PURE__ */ new Map();
|
|
@@ -145981,12 +146371,12 @@ function createProviderRouteResolver(deps) {
|
|
|
145981
146371
|
};
|
|
145982
146372
|
const passthroughByTarget = /* @__PURE__ */ new Map();
|
|
145983
146373
|
const passthroughFor = (name, target) => {
|
|
145984
|
-
const key = `${name}\0${target.baseUrl}\0${target.stripPrefix ?? ""}\0${target.headroomUpstream ?? ""}`;
|
|
146374
|
+
const key = `${name}\0${target.baseUrl}\0${target.stripPrefix ?? ""}\0${target.headroomUpstream ?? ""}\0${String(target.connectTimeoutMs)}`;
|
|
145985
146375
|
const existing = passthroughByTarget.get(key);
|
|
145986
146376
|
if (existing !== void 0) {
|
|
145987
146377
|
return existing;
|
|
145988
146378
|
}
|
|
145989
|
-
const route = createPassthroughRoute(name, target);
|
|
146379
|
+
const route = createPassthroughRoute(name, { ...target, couldNotConnect: couldNotConnectFor(target.subject) });
|
|
145990
146380
|
passthroughByTarget.set(key, route);
|
|
145991
146381
|
return route;
|
|
145992
146382
|
};
|
|
@@ -146060,7 +146450,16 @@ function createProviderRouteResolver(deps) {
|
|
|
146060
146450
|
};
|
|
146061
146451
|
}
|
|
146062
146452
|
if (isRouterProvider(definition)) {
|
|
146063
|
-
return {
|
|
146453
|
+
return {
|
|
146454
|
+
ok: true,
|
|
146455
|
+
route: passthroughFor(`router:${provider}`, {
|
|
146456
|
+
baseUrl: `http://127.0.0.1:${String(deps.directPort())}`,
|
|
146457
|
+
stripPrefix: `${PROVIDER_PATH_PREFIX}${encodeURIComponent(provider)}`,
|
|
146458
|
+
headroomUpstream: directOrigin2(deps.directPort()),
|
|
146459
|
+
subject: `router ${provider}'s own door listener`,
|
|
146460
|
+
connectTimeoutMs: DEFAULT_PROVIDER_CONNECT_TIMEOUT_MS
|
|
146461
|
+
})
|
|
146462
|
+
};
|
|
146064
146463
|
}
|
|
146065
146464
|
const httpProvider = definition;
|
|
146066
146465
|
return {
|
|
@@ -146069,7 +146468,9 @@ function createProviderRouteResolver(deps) {
|
|
|
146069
146468
|
passthroughFor(`http:${provider}`, {
|
|
146070
146469
|
baseUrl: httpProvider.baseUrl,
|
|
146071
146470
|
stripPrefix: `${PROVIDER_PATH_PREFIX}${encodeURIComponent(provider)}`,
|
|
146072
|
-
headroomUpstream: directOrigin2(deps.directPort())
|
|
146471
|
+
headroomUpstream: directOrigin2(deps.directPort()),
|
|
146472
|
+
subject: `provider ${provider}`,
|
|
146473
|
+
connectTimeoutMs: providerConnectTimeoutMs(httpProvider)
|
|
146073
146474
|
}),
|
|
146074
146475
|
{ provider, credential: httpProvider.credential, env: deps.env, port: deps.credentials, resolve: resolveCredential2 }
|
|
146075
146476
|
)
|
|
@@ -149409,7 +149810,7 @@ var realTranscriptReadPort = {
|
|
|
149409
149810
|
|
|
149410
149811
|
// src/supervise/sessionControlPlugin.ts
|
|
149411
149812
|
var import_node_fs29 = require("node:fs");
|
|
149412
|
-
var
|
|
149813
|
+
var import_node_os19 = require("node:os");
|
|
149413
149814
|
var import_node_path72 = __toESM(require("node:path"), 1);
|
|
149414
149815
|
init_realPorts();
|
|
149415
149816
|
var STAGED_PREFIX = "agent-shim-control-";
|
|
@@ -149428,7 +149829,7 @@ function removeAbandonedPlugins(parent, isRunning) {
|
|
|
149428
149829
|
}
|
|
149429
149830
|
}
|
|
149430
149831
|
function stageSessionControlPlugin(options = {}) {
|
|
149431
|
-
const parent = options.parent ?? (0,
|
|
149832
|
+
const parent = options.parent ?? (0, import_node_os19.tmpdir)();
|
|
149432
149833
|
removeAbandonedPlugins(parent, options.isRunning ?? realIsProcessRunning);
|
|
149433
149834
|
const directory = (0, import_node_fs29.mkdtempSync)(import_node_path72.default.join(parent, `${STAGED_PREFIX}${String(options.pid ?? process.pid)}-`));
|
|
149434
149835
|
const { ready, requests, results } = sessionControlPluginPaths(directory);
|
|
@@ -150449,7 +150850,9 @@ function realFrontDoorSupervisorPorts(paths, respawnGeneration, lifecycle, track
|
|
|
150449
150850
|
// An `acct:` model member is served by relaunch: the door leaves a move request for the session's supervisor (found across every pool's registry, since the door does not know which pool launched the session) and answers the request with what is happening. A session nothing supervises gets the message naming the command to run instead.
|
|
150450
150851
|
observations: (target) => observations.observation(target),
|
|
150451
150852
|
accountMoves: async (sessionId, to2, model) => await requestAccountMove({ fs: realFarmFs, paths, runningAmong: realRunningAmong, idOf: (name) => identityIdOf(paths, name), now: () => Date.now() }, sessionId, to2, model),
|
|
150452
|
-
...rcSelfHostSurface === void 0 ? {} : { rcSelfHostRoute: rcSelfHostSurface.route }
|
|
150853
|
+
...rcSelfHostSurface === void 0 ? {} : { rcSelfHostRoute: rcSelfHostSurface.route },
|
|
150854
|
+
log,
|
|
150855
|
+
now: () => Date.now()
|
|
150453
150856
|
}),
|
|
150454
150857
|
rcTracker,
|
|
150455
150858
|
rcHub
|
|
@@ -150563,7 +150966,7 @@ function realFrontDoorSupervisorPorts(paths, respawnGeneration, lifecycle, track
|
|
|
150563
150966
|
log(`catalogue keeper skipped provider ${name}: ${message}`);
|
|
150564
150967
|
}).map((entry) => [entry.name, entry.provider]),
|
|
150565
150968
|
readCache: (name, provider) => realFsPort.readFileUtf8(provider.kind === "codex" ? catalogueCachePath(paths, name, process.pid, catalogueGeneration) : catalogueCachePath(paths, name)),
|
|
150566
|
-
credentialFingerprint: (provider) => provider.kind === "codex" ? savedCatalogueFingerprint(provider, paths, process.env,
|
|
150969
|
+
credentialFingerprint: (provider) => provider.kind === "codex" ? savedCatalogueFingerprint(provider, paths, process.env, import_node_os20.default.homedir(), realFsPort.readFileUtf8) : void 0,
|
|
150567
150970
|
refresh: async (name) => {
|
|
150568
150971
|
await runChild({ paths, args: ["__refresh-catalogue", name, String(process.pid), catalogueGeneration], timeoutMs: CATALOGUE_REFRESH_TIMEOUT_MS });
|
|
150569
150972
|
},
|
|
@@ -150622,7 +151025,7 @@ function realFrontDoorSupervisorPorts(paths, respawnGeneration, lifecycle, track
|
|
|
150622
151025
|
paths,
|
|
150623
151026
|
registry: sessionRegistry,
|
|
150624
151027
|
ownPid: process.pid,
|
|
150625
|
-
codexHome: import_node_path73.default.resolve(codexHome(process.env,
|
|
151028
|
+
codexHome: import_node_path73.default.resolve(codexHome(process.env, import_node_os20.default.homedir())),
|
|
150626
151029
|
catalogueGeneration,
|
|
150627
151030
|
now: () => Date.now(),
|
|
150628
151031
|
sleep: async (ms) => {
|
|
@@ -150681,10 +151084,10 @@ function realFrontDoorSupervisorPorts(paths, respawnGeneration, lifecycle, track
|
|
|
150681
151084
|
frontDoorStatus: () => collectFrontDoorStatus(realFarmFs, realHeadroomSocketTrust, paths, realIsProcessRunning),
|
|
150682
151085
|
checkReport: (target, identity) => collectCheckReport({ paths, cwd: target, ...identity === void 0 ? {} : { identity }, env: process.env }),
|
|
150683
151086
|
doctorReport: () => collectDoctorReport({ paths, env: process.env }),
|
|
150684
|
-
// 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.
|
|
151087
|
+
// 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.
|
|
150685
151088
|
poolPick: (pool, directory) => {
|
|
150686
151089
|
const pools = readPools(paths);
|
|
150687
|
-
return pools[pool] === void 0 ? void 0 : collectPoolPick({ paths, fs: realFsPort, usageFs: realFarmFs, poolName: pool, pools, directory, nowMs: Date.now() });
|
|
151090
|
+
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: {} }) });
|
|
150688
151091
|
},
|
|
150689
151092
|
poolNames: () => Object.keys(readPools(paths)).sort(),
|
|
150690
151093
|
// 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.
|
|
@@ -150984,7 +151387,7 @@ function registerFrontDoorCommand(program2, deps) {
|
|
|
150984
151387
|
|
|
150985
151388
|
// src/statusline/commands.ts
|
|
150986
151389
|
var import_node_child_process9 = require("node:child_process");
|
|
150987
|
-
var
|
|
151390
|
+
var import_node_os22 = __toESM(require("node:os"), 1);
|
|
150988
151391
|
var import_node_path83 = __toESM(require("node:path"), 1);
|
|
150989
151392
|
init_commandDeps();
|
|
150990
151393
|
init_load();
|
|
@@ -151808,7 +152211,7 @@ function contextViewOf(frame) {
|
|
|
151808
152211
|
// src/statusline/ports.ts
|
|
151809
152212
|
init_blockingSpawn();
|
|
151810
152213
|
var import_node_fs31 = __toESM(require("node:fs"), 1);
|
|
151811
|
-
var
|
|
152214
|
+
var import_node_os21 = __toESM(require("node:os"), 1);
|
|
151812
152215
|
var import_node_path75 = __toESM(require("node:path"), 1);
|
|
151813
152216
|
|
|
151814
152217
|
// src/statusline/memoryUse.ts
|
|
@@ -151942,7 +152345,7 @@ function discard(target) {
|
|
|
151942
152345
|
}
|
|
151943
152346
|
}
|
|
151944
152347
|
function readMemoryUse() {
|
|
151945
|
-
const totalBytes =
|
|
152348
|
+
const totalBytes = import_node_os21.default.totalmem();
|
|
151946
152349
|
if (process.platform === "darwin") {
|
|
151947
152350
|
const output2 = runWithPipe(RUN_TIMEOUT_MS, "/usr/bin/vm_stat", [], process.cwd());
|
|
151948
152351
|
const usedBytes = output2 === void 0 ? void 0 : usedBytesFromVmStat(output2);
|
|
@@ -151952,13 +152355,13 @@ function readMemoryUse() {
|
|
|
151952
152355
|
const meminfo = readText("/proc/meminfo");
|
|
151953
152356
|
return meminfo === void 0 ? void 0 : memoryUseFromMeminfo(meminfo);
|
|
151954
152357
|
}
|
|
151955
|
-
return { usedBytes: totalBytes -
|
|
152358
|
+
return { usedBytes: totalBytes - import_node_os21.default.freemem(), totalBytes };
|
|
151956
152359
|
}
|
|
151957
152360
|
function realStatuslinePorts(env, stateDirectory, runTimeoutMs = RUN_TIMEOUT_MS) {
|
|
151958
152361
|
const { locale, timeZone } = Intl.DateTimeFormat().resolvedOptions();
|
|
151959
152362
|
return {
|
|
151960
152363
|
env,
|
|
151961
|
-
homeDirectory:
|
|
152364
|
+
homeDirectory: import_node_os21.default.homedir(),
|
|
151962
152365
|
stateDirectory,
|
|
151963
152366
|
clock: { locale, timeZone },
|
|
151964
152367
|
readText,
|
|
@@ -152416,8 +152819,8 @@ function saveCache(ports, file2, value3, nowMs) {
|
|
|
152416
152819
|
// src/statusline/dailyLedger.ts
|
|
152417
152820
|
var DAILY_LEDGER_DIRECTORY = "daily-cost";
|
|
152418
152821
|
var HOURS_PER_DAY9 = 24;
|
|
152419
|
-
var
|
|
152420
|
-
var SESSION_MAX_AGE_MS = HOURS_PER_DAY9 *
|
|
152822
|
+
var MS_PER_HOUR6 = 36e5;
|
|
152823
|
+
var SESSION_MAX_AGE_MS = HOURS_PER_DAY9 * MS_PER_HOUR6;
|
|
152421
152824
|
var LAST_SEEN_REFRESH_MS = SESSION_MAX_AGE_MS / HOURS_PER_DAY9;
|
|
152422
152825
|
var ENTRY_FILE = new RegExp(`^${CLIENT_SESSION_ID_PATTERN.source.slice(1, -1)}\\.json$`);
|
|
152423
152826
|
var DAY_NAME = /^\d{4}-\d{2}-\d{2}$/;
|
|
@@ -153794,7 +154197,7 @@ function promptCacheRow(context) {
|
|
|
153794
154197
|
}
|
|
153795
154198
|
|
|
153796
154199
|
// src/statusline/elements/rows/quota.ts
|
|
153797
|
-
|
|
154200
|
+
init_windowLengths();
|
|
153798
154201
|
init_graphemes();
|
|
153799
154202
|
|
|
153800
154203
|
// src/statusline/resetTime.ts
|
|
@@ -155642,7 +156045,7 @@ function registerStatuslineCommand(program2, deps) {
|
|
|
155642
156045
|
} else {
|
|
155643
156046
|
const configDir = process.env.CLAUDE_CONFIG_DIR;
|
|
155644
156047
|
try {
|
|
155645
|
-
account = readAccountMetadataFile(realFarmFs, configDir === void 0 || configDir === "" ? import_node_path83.default.join(
|
|
156048
|
+
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"));
|
|
155646
156049
|
} catch {
|
|
155647
156050
|
account = void 0;
|
|
155648
156051
|
}
|
|
@@ -155691,7 +156094,7 @@ function registerStatuslineCommand(program2, deps) {
|
|
|
155691
156094
|
});
|
|
155692
156095
|
return;
|
|
155693
156096
|
}
|
|
155694
|
-
const live = statuslineSettingsForRender({ env: process.env, cwd: process.cwd(), home:
|
|
156097
|
+
const live = statuslineSettingsForRender({ env: process.env, cwd: process.cwd(), home: import_node_os22.default.homedir(), paths: deps.paths, fs: { ...realFsPort, readConfigFile: cosmiconfigReader() } });
|
|
155695
156098
|
if (live.problem !== void 0) {
|
|
155696
156099
|
process.stderr.write(`agent-shim: statusline: ${live.problem}. Drawing with the defaults.
|
|
155697
156100
|
`);
|
|
@@ -155704,7 +156107,7 @@ function registerStatuslineCommand(program2, deps) {
|
|
|
155704
156107
|
let stackedUnderDefault = false;
|
|
155705
156108
|
if (isAntigravityPayload(payload)) {
|
|
155706
156109
|
try {
|
|
155707
|
-
stackedUnderDefault = antigravityStacksWithDefault(realFarmFs,
|
|
156110
|
+
stackedUnderDefault = antigravityStacksWithDefault(realFarmFs, import_node_os22.default.homedir());
|
|
155708
156111
|
} catch {
|
|
155709
156112
|
stackedUnderDefault = false;
|
|
155710
156113
|
}
|
|
@@ -166726,7 +167129,7 @@ init_zod();
|
|
|
166726
167129
|
|
|
166727
167130
|
// src/realCatalogueRefresh.ts
|
|
166728
167131
|
var import_node_path89 = __toESM(require("node:path"), 1);
|
|
166729
|
-
var
|
|
167132
|
+
var import_node_os23 = __toESM(require("node:os"), 1);
|
|
166730
167133
|
init_blockingSpawn();
|
|
166731
167134
|
init_translate2();
|
|
166732
167135
|
|
|
@@ -166800,7 +167203,7 @@ async function refreshCatalogueForReal(paths, name, env, ...owner) {
|
|
|
166800
167203
|
const provider = readProvider(paths, name);
|
|
166801
167204
|
const login = provider?.kind === "codex" ? resolveCodexConfig(provider.codex).login : void 0;
|
|
166802
167205
|
const configuredHome = env.CODEX_HOME;
|
|
166803
|
-
const home = configuredHome === void 0 || configuredHome === "" ? import_node_path89.default.join(
|
|
167206
|
+
const home = configuredHome === void 0 || configuredHome === "" ? import_node_path89.default.join(import_node_os23.default.homedir(), ".codex") : configuredHome;
|
|
166804
167207
|
const source = login === void 0 ? void 0 : login === "chatgpt-sign-in" ? paths.chatgptSignInFile : import_node_path89.default.resolve(home, "auth.json");
|
|
166805
167208
|
let revision = source === void 0 ? void 0 : realFsPort.fileRevision?.(source);
|
|
166806
167209
|
const codexAuth = login === void 0 ? void 0 : createCodexRoutePorts((line) => {
|
|
@@ -167202,9 +167605,10 @@ function registerPoolCommand(program2, deps) {
|
|
|
167202
167605
|
["agent-shim pool use subs"]
|
|
167203
167606
|
);
|
|
167204
167607
|
withExamples(
|
|
167205
|
-
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) => {
|
|
167608
|
+
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) => {
|
|
167206
167609
|
const nowMs = Date.now();
|
|
167207
|
-
const
|
|
167610
|
+
const providerOf = realMemberProviderResolver({ paths, cwd: process.cwd(), env: process.env, ...options.provider === void 0 ? {} : { cliProvider: options.provider } });
|
|
167611
|
+
const report = collectPoolPick({ paths, fs: realFsPort, usageFs: realFarmFs, poolName: name, pools: readPools(paths), directory: process.cwd(), nowMs, providerOf });
|
|
167208
167612
|
if (options.json === true) {
|
|
167209
167613
|
printJson(report);
|
|
167210
167614
|
return;
|
|
@@ -167213,12 +167617,13 @@ function registerPoolCommand(program2, deps) {
|
|
|
167213
167617
|
console.log(line);
|
|
167214
167618
|
}
|
|
167215
167619
|
}),
|
|
167216
|
-
["agent-shim pool pick subs", "agent-shim pool pick subs --json"]
|
|
167620
|
+
["agent-shim pool pick subs", "agent-shim pool pick subs --provider spark", "agent-shim pool pick subs --json"]
|
|
167217
167621
|
);
|
|
167218
167622
|
}
|
|
167219
167623
|
|
|
167220
167624
|
// src/providers.ts
|
|
167221
167625
|
init_commandDeps();
|
|
167626
|
+
init_providerReachability();
|
|
167222
167627
|
init_translate2();
|
|
167223
167628
|
init_catalogueCredential();
|
|
167224
167629
|
init_translate();
|
|
@@ -167228,7 +167633,7 @@ init_providerCatalogue();
|
|
|
167228
167633
|
init_state();
|
|
167229
167634
|
init_modelPicker();
|
|
167230
167635
|
var import_node_fs37 = __toESM(require("node:fs"), 1);
|
|
167231
|
-
var
|
|
167636
|
+
var import_node_os24 = __toESM(require("node:os"), 1);
|
|
167232
167637
|
init_credential();
|
|
167233
167638
|
init_providerAliases();
|
|
167234
167639
|
|
|
@@ -167402,13 +167807,14 @@ function rewriteReferences(paths, from, to2) {
|
|
|
167402
167807
|
init_realCredentialCache();
|
|
167403
167808
|
init_realPorts();
|
|
167404
167809
|
init_providersStore();
|
|
167810
|
+
var CONNECT_TIMEOUT_DEFAULT_HINT = `a duration such as 3s or 500ms; default ${String(DEFAULT_PROVIDER_CONNECT_TIMEOUT_MS)}ms, the first SYN and two retransmissions`;
|
|
167405
167811
|
function toProviderView(name, provider, formerNames) {
|
|
167406
167812
|
return {
|
|
167407
167813
|
name,
|
|
167408
167814
|
...formerNames.length === 0 ? {} : { formerNames },
|
|
167409
167815
|
kind: provider.kind ?? "http",
|
|
167410
167816
|
displayName: provider.displayName,
|
|
167411
|
-
...isCodexProvider(provider) ? provider.codex === void 0 ? {} : { codex: provider.codex } : isAntigravityProvider(provider) ? provider.antigravity === void 0 ? {} : { antigravity: provider.antigravity } : isRouterProvider(provider) ? {} : { baseUrl: provider.baseUrl },
|
|
167817
|
+
...isCodexProvider(provider) ? provider.codex === void 0 ? {} : { codex: provider.codex } : isAntigravityProvider(provider) ? provider.antigravity === void 0 ? {} : { antigravity: provider.antigravity } : isRouterProvider(provider) ? {} : { baseUrl: provider.baseUrl, ...provider.connectTimeoutMs === void 0 ? {} : { connectTimeoutMs: provider.connectTimeoutMs } },
|
|
167412
167818
|
...isRouterProvider(provider) ? {} : { credential: summariseCredential(provider.credential) },
|
|
167413
167819
|
...!isRouterProvider(provider) && provider.env !== void 0 ? { env: provider.env } : {},
|
|
167414
167820
|
...!isRouterProvider(provider) && provider.pickerModels !== void 0 ? { pickerModels: provider.pickerModels } : {},
|
|
@@ -167495,7 +167901,7 @@ function registerProviderCommand(program2, deps) {
|
|
|
167495
167901
|
["agent-shim provider add z --display-name z.ai --base-url https://api.z.ai/api/anthropic --credential env:Z_API_TOKEN", "agent-shim provider list"]
|
|
167496
167902
|
);
|
|
167497
167903
|
withExamples(
|
|
167498
|
-
provider.command("add <name>").description("Create a new API provider definition. Fails if one with this name already exists.").addOption(new Option("--kind <kind>", "http (default): an Anthropic-compatible endpoint at --base-url; codex: ChatGPT's Codex backend through the front-door daemon.").choices(PROVIDER_KINDS)).requiredOption("--display-name <name>", "Human-readable name, exported to the child as AGENT_SHIM_PROVIDER.").option("--base-url <url>", "Anthropic-compatible base URL the child's requests are sent to (http providers only, and required for them).").requiredOption(
|
|
167904
|
+
provider.command("add <name>").description("Create a new API provider definition. Fails if one with this name already exists.").addOption(new Option("--kind <kind>", "http (default): an Anthropic-compatible endpoint at --base-url; codex: ChatGPT's Codex backend through the front-door daemon.").choices(PROVIDER_KINDS)).requiredOption("--display-name <name>", "Human-readable name, exported to the child as AGENT_SHIM_PROVIDER.").option("--base-url <url>", "Anthropic-compatible base URL the child's requests are sent to (http providers only, and required for them).").option("--connect-timeout <duration>", `http providers: how long opening a connection to the base URL may take before the provider counts as unreachable (${CONNECT_TIMEOUT_DEFAULT_HINT}). Bounds the connect only, never the wait for the answer.`, parseDurationOption).requiredOption(
|
|
167499
167905
|
"--credential <source>",
|
|
167500
167906
|
`Where the provider's token comes from (repeatable; tried in the order given until one yields a token): ${CREDENTIAL_SOURCE_SYNTAX}. Never the token itself.`,
|
|
167501
167907
|
collectCredentialSource
|
|
@@ -167511,6 +167917,7 @@ function registerProviderCommand(program2, deps) {
|
|
|
167511
167917
|
...options.kind === void 0 ? {} : { kind: options.kind },
|
|
167512
167918
|
displayName: options.displayName,
|
|
167513
167919
|
...options.baseUrl === void 0 ? {} : { baseUrl: options.baseUrl },
|
|
167920
|
+
...options.connectTimeout === void 0 ? {} : { connectTimeoutMs: options.connectTimeout },
|
|
167514
167921
|
sources: options.credential,
|
|
167515
167922
|
...options.credentialTarget === void 0 ? {} : { target: options.credentialTarget },
|
|
167516
167923
|
...options.env === void 0 ? {} : { env: options.env },
|
|
@@ -167534,7 +167941,7 @@ function registerProviderCommand(program2, deps) {
|
|
|
167534
167941
|
"agent-shim provider add agy-local --kind antigravity --display-name Antigravity --antigravity-mode local --credential literal:placeholder"
|
|
167535
167942
|
]
|
|
167536
167943
|
);
|
|
167537
|
-
const providerSet = provider.command("set <name>").description("Update an existing API provider definition.").option("--display-name <name>", "Replace the human-readable name.").option("--base-url <url>", "Replace the base URL (http providers only).").option(
|
|
167944
|
+
const providerSet = provider.command("set <name>").description("Update an existing API provider definition.").option("--display-name <name>", "Replace the human-readable name.").option("--base-url <url>", "Replace the base URL (http providers only).").option("--connect-timeout <duration>", `http providers: replace how long opening a connection to the base URL may take before the provider counts as unreachable (${CONNECT_TIMEOUT_DEFAULT_HINT}).`, parseDurationOption).option("--unset-connect-timeout", "http providers: go back to the default connect timeout.").option(
|
|
167538
167945
|
"--credential <source>",
|
|
167539
167946
|
`Replace the credential's sources with these (repeatable, in the order tried): ${CREDENTIAL_SOURCE_SYNTAX}.`,
|
|
167540
167947
|
collectCredentialSource
|
|
@@ -167549,13 +167956,16 @@ function registerProviderCommand(program2, deps) {
|
|
|
167549
167956
|
const { json: json2, ...options } = allOptions;
|
|
167550
167957
|
if (Object.entries(allOptions).every(([key, value3]) => key === "json" || value3 === void 0)) {
|
|
167551
167958
|
throw new UsageError(
|
|
167552
|
-
"Nothing to change: pass --display-name, --base-url, --credential, --credential-target, a --credential-cache option, --env, --unset-env, --picker-model, --unset-picker-model, a --catalogue option, --unset-catalogue, or codex/antigravity settings."
|
|
167959
|
+
"Nothing to change: pass --display-name, --base-url, --connect-timeout, --unset-connect-timeout, --credential, --credential-target, a --credential-cache option, --env, --unset-env, --picker-model, --unset-picker-model, a --catalogue option, --unset-catalogue, or codex/antigravity settings."
|
|
167553
167960
|
);
|
|
167554
167961
|
}
|
|
167555
167962
|
const codex = codexConfigFromOptions(options);
|
|
167556
167963
|
const antigravity = antigravityConfigFromOptions(options);
|
|
167557
167964
|
const existingForCache = readProvider(paths, name);
|
|
167558
167965
|
const cache = cacheChange(options, existingForCache !== void 0 && !isRouterProvider(existingForCache) ? existingForCache.credential.cache : void 0);
|
|
167966
|
+
if (options.unsetConnectTimeout === true && options.connectTimeout !== void 0) {
|
|
167967
|
+
throw new UsageError("--unset-connect-timeout cannot be combined with --connect-timeout.");
|
|
167968
|
+
}
|
|
167559
167969
|
if (options.unsetCatalogue === true && hasCatalogueOptions(options)) {
|
|
167560
167970
|
throw new UsageError("--unset-catalogue cannot be combined with another --catalogue option.");
|
|
167561
167971
|
}
|
|
@@ -167567,6 +167977,7 @@ function registerProviderCommand(program2, deps) {
|
|
|
167567
167977
|
...cache === void 0 ? {} : { cache },
|
|
167568
167978
|
...options.displayName === void 0 ? {} : { displayName: options.displayName },
|
|
167569
167979
|
...options.baseUrl === void 0 ? {} : { baseUrl: options.baseUrl },
|
|
167980
|
+
...options.unsetConnectTimeout === true ? { connectTimeoutMs: false } : options.connectTimeout === void 0 ? {} : { connectTimeoutMs: options.connectTimeout },
|
|
167570
167981
|
...options.credential === void 0 ? {} : { sources: options.credential },
|
|
167571
167982
|
...options.credentialTarget === void 0 ? {} : { target: options.credentialTarget },
|
|
167572
167983
|
...options.env === void 0 ? {} : { env: options.env },
|
|
@@ -167581,6 +167992,7 @@ function registerProviderCommand(program2, deps) {
|
|
|
167581
167992
|
}),
|
|
167582
167993
|
[
|
|
167583
167994
|
"agent-shim provider set z --base-url https://api.z.ai/api/anthropic",
|
|
167995
|
+
"agent-shim provider set local --connect-timeout 3s",
|
|
167584
167996
|
"agent-shim provider set z --env API_TIMEOUT_MS=600000",
|
|
167585
167997
|
"agent-shim provider set z --credential op:op://vault/z/credential --credential-cache-ttl 12h",
|
|
167586
167998
|
"agent-shim provider set anthropic-api --credential-target apiKey",
|
|
@@ -167642,6 +168054,7 @@ function registerProviderCommand(program2, deps) {
|
|
|
167642
168054
|
console.log(`Endpoint: ${describeProviderEndpoint(found)}`);
|
|
167643
168055
|
} else if (!isRouterProvider(found)) {
|
|
167644
168056
|
console.log(`Base URL: ${found.baseUrl}`);
|
|
168057
|
+
console.log(`Connect timeout: ${String(providerConnectTimeoutMs(found))}ms${found.connectTimeoutMs === void 0 ? " (the default)" : ""}`);
|
|
167645
168058
|
}
|
|
167646
168059
|
if (!isRouterProvider(found)) {
|
|
167647
168060
|
console.log(`Credential: ${describeCredential(found.credential)}`);
|
|
@@ -167683,7 +168096,7 @@ function registerProviderCommand(program2, deps) {
|
|
|
167683
168096
|
}
|
|
167684
168097
|
if (cache2 === void 0) throw new UsageError(`No catalogue has been fetched for "${name}" yet; run \`agent-shim provider models ${name} --refresh\`.`);
|
|
167685
168098
|
if (options.refresh !== true && cache2.supervisorPid !== pid) throw new UsageError(`The catalogue for "${name}" belongs to a different front door; refresh it before reading.`);
|
|
167686
|
-
const fingerprint = options.refresh === true ? void 0 : savedCatalogueFingerprint(found, paths, env,
|
|
168099
|
+
const fingerprint = options.refresh === true ? void 0 : savedCatalogueFingerprint(found, paths, env, import_node_os24.default.homedir(), realFsPort.readFileUtf8);
|
|
167687
168100
|
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.`);
|
|
167688
168101
|
const listed2 = providerModelRows(found, cache2.models).map((row) => row.model);
|
|
167689
168102
|
if (options.json === true) {
|
|
@@ -168144,7 +168557,7 @@ function registerRuleCommand(program2, deps) {
|
|
|
168144
168557
|
// src/codex/launch.ts
|
|
168145
168558
|
var import_node_crypto36 = require("node:crypto");
|
|
168146
168559
|
var import_node_fs39 = __toESM(require("node:fs"), 1);
|
|
168147
|
-
var
|
|
168560
|
+
var import_node_os25 = __toESM(require("node:os"), 1);
|
|
168148
168561
|
var import_node_path93 = __toESM(require("node:path"), 1);
|
|
168149
168562
|
init_cliError();
|
|
168150
168563
|
init_claudeShim();
|
|
@@ -168346,7 +168759,7 @@ async function runCodex(paths, argv) {
|
|
|
168346
168759
|
}
|
|
168347
168760
|
throw new UsageError("No real Codex CLI found on PATH. Install Codex or set AGENT_SHIM_CODEX_BIN to its executable.");
|
|
168348
168761
|
};
|
|
168349
|
-
const plan = prepareCodexLaunch({ paths, argv, env: process.env, cwd: import_node_fs39.default.realpathSync(process.cwd()), home:
|
|
168762
|
+
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) => {
|
|
168350
168763
|
console.error(`agent-shim: ${message}`);
|
|
168351
168764
|
}, ...resolveGitBranch(realRunPort, process.cwd()) });
|
|
168352
168765
|
import_node_fs39.default.chmodSync(plan.env.CODEX_HOME ?? "", PRIVATE_DIRECTORY_MODE);
|
|
@@ -168797,6 +169210,7 @@ init_configProfilesStore();
|
|
|
168797
169210
|
|
|
168798
169211
|
// src/launchPicker.ts
|
|
168799
169212
|
init_identityStore();
|
|
169213
|
+
init_memberProvider();
|
|
168800
169214
|
|
|
168801
169215
|
// src/launcher/pickerPrompt.ts
|
|
168802
169216
|
function promptsIdentityPicker(prompts) {
|
|
@@ -168879,7 +169293,7 @@ function memberTexts(member, nowMs) {
|
|
|
168879
169293
|
if (member === void 0) {
|
|
168880
169294
|
return {};
|
|
168881
169295
|
}
|
|
168882
|
-
const billing = { login: member.account, snapshot: member.snapshot, provider:
|
|
169296
|
+
const billing = { login: member.account, snapshot: member.snapshot, provider: member.provider, nowMs };
|
|
168883
169297
|
const account = accountRows(billing)[0]?.value;
|
|
168884
169298
|
const quotaRow2 = quotaRows(billing)[0];
|
|
168885
169299
|
return {
|
|
@@ -168911,11 +169325,12 @@ function poolContext(params, poolName, resuming, nowMs) {
|
|
|
168911
169325
|
nowMs,
|
|
168912
169326
|
resuming,
|
|
168913
169327
|
identityIdOf: identityIdOf2,
|
|
169328
|
+
...params.providerOf === void 0 ? {} : { providerOf: params.providerOf },
|
|
168914
169329
|
...sticky === void 0 ? {} : { sticky }
|
|
168915
169330
|
});
|
|
168916
169331
|
const pick2 = ranking.pick?.identity;
|
|
168917
169332
|
const named = [.../* @__PURE__ */ new Set([...ranking.candidates.map((candidate) => candidate.identity), ...sticky === void 0 ? [] : [sticky.identity]])].filter(isIdentityName);
|
|
168918
|
-
const members2 = loadPoolMembers(usageFs, paths, named, nowMs, identityIdOf2);
|
|
169333
|
+
const members2 = loadPoolMembers(usageFs, paths, named, nowMs, identityIdOf2, params.providerOf);
|
|
168919
169334
|
const changes = pick2 !== void 0 && sticky !== void 0 && sticky.identity !== pick2 && accountsDiffer(members2, sticky.identity, pick2);
|
|
168920
169335
|
return {
|
|
168921
169336
|
selection: { kind: "pool", outcome: pick2 === void 0 ? "none-eligible" : changes ? "changes-account" : "keeps-account" },
|
|
@@ -168950,7 +169365,7 @@ function poolMessage(reason, poolName, pick2, sticky) {
|
|
|
168950
169365
|
}
|
|
168951
169366
|
function identityContext(params, resuming, nowMs) {
|
|
168952
169367
|
const { paths, usageFs } = params;
|
|
168953
|
-
const members2 = loadPoolMembers(usageFs, paths, params.identityNames(), nowMs, identityIdResolver(paths.identitiesDir, params.fs));
|
|
169368
|
+
const members2 = loadPoolMembers(usageFs, paths, params.identityNames(), nowMs, identityIdResolver(paths.identitiesDir, params.fs), params.providerOf);
|
|
168954
169369
|
const { candidates } = rankPool({ members: members2, nowMs, resuming, preference: "listed" });
|
|
168955
169370
|
const named = params.decision.name;
|
|
168956
169371
|
const limited = named !== void 0 && candidates.some((candidate) => candidate.identity === named && candidate.class === "ineligible");
|
|
@@ -169029,6 +169444,17 @@ async function pickLaunchIdentity(params) {
|
|
|
169029
169444
|
cwd: params.farm.runtime.cwd,
|
|
169030
169445
|
now: params.farm.runtime.now,
|
|
169031
169446
|
identityNames: () => listIdentities(params.paths).flatMap((listing) => "problem" in listing ? [] : [listing.name]),
|
|
169447
|
+
// The picker ranks on what the launch will spend, so each identity is judged on the provider the launch resolves for it.
|
|
169448
|
+
providerOf: memberProviderResolver({
|
|
169449
|
+
paths: params.paths,
|
|
169450
|
+
fs: realFsPort,
|
|
169451
|
+
env: params.env,
|
|
169452
|
+
cliProvider: params.parsed.provider,
|
|
169453
|
+
...params.parsed.configProfile === void 0 ? {} : { cliFlagConfigProfile: params.parsed.configProfile },
|
|
169454
|
+
...params.farm.directoryConfigProfile === void 0 ? {} : { directoryRuleConfigProfile: params.farm.directoryConfigProfile },
|
|
169455
|
+
...params.farm.globalDefaultConfigProfile === void 0 ? {} : { globalDefaultConfigProfile: params.farm.globalDefaultConfigProfile },
|
|
169456
|
+
loadCascade: (baseConfigProfile) => params.farm.runtime.loadCascade(baseConfigProfile, void 0)
|
|
169457
|
+
}),
|
|
169032
169458
|
picker: promptsIdentityPicker(realPromptsPort)
|
|
169033
169459
|
});
|
|
169034
169460
|
}
|
|
@@ -169077,7 +169503,7 @@ async function refreshPools(params) {
|
|
|
169077
169503
|
await refreshStalePoolMembers({
|
|
169078
169504
|
poolNames: params.poolNames,
|
|
169079
169505
|
pools: readPools(paths),
|
|
169080
|
-
loadMembers: (identities) => loadPoolMembers(realFarmFs, paths, identities, Date.now(), (name) => identityIdOf(paths, name)),
|
|
169506
|
+
loadMembers: (identities) => loadPoolMembers(realFarmFs, paths, identities, Date.now(), (name) => identityIdOf(paths, name), params.providerOf),
|
|
169081
169507
|
refresher
|
|
169082
169508
|
});
|
|
169083
169509
|
}
|
|
@@ -169108,7 +169534,7 @@ init_resumeContext();
|
|
|
169108
169534
|
|
|
169109
169535
|
// src/supervise/compactionDeps.ts
|
|
169110
169536
|
init_lock();
|
|
169111
|
-
|
|
169537
|
+
init_windowLengths();
|
|
169112
169538
|
init_read();
|
|
169113
169539
|
|
|
169114
169540
|
// src/supervise/compaction.ts
|
|
@@ -170119,10 +170545,20 @@ async function runClaude(argvOverride) {
|
|
|
170119
170545
|
}
|
|
170120
170546
|
}
|
|
170121
170547
|
const refreshUsage = async (poolName2) => {
|
|
170122
|
-
|
|
170548
|
+
if (poolName2 === void 0) {
|
|
170549
|
+
return;
|
|
170550
|
+
}
|
|
170551
|
+
const providerOf = realMemberProviderResolver({
|
|
170552
|
+
paths,
|
|
170553
|
+
cwd: process.cwd(),
|
|
170554
|
+
env: procForDecision.env,
|
|
170555
|
+
...nativeArgv.provider === void 0 ? {} : { cliProvider: nativeArgv.provider },
|
|
170556
|
+
...nativeArgv.configProfile === void 0 ? {} : { cliFlagConfigProfile: nativeArgv.configProfile }
|
|
170557
|
+
});
|
|
170558
|
+
await refreshPools({ paths, cwd: process.cwd(), poolNames: [poolName2], spawnDaemon: spawnDetachedSupervisor, log: realLogPort.warn, providerOf });
|
|
170123
170559
|
};
|
|
170124
170560
|
await refreshUsage(identityDecision.pool);
|
|
170125
|
-
const picked = await pickLaunchIdentity({ paths, farm, parsed: nativeArgv, decision: identityDecision });
|
|
170561
|
+
const picked = await pickLaunchIdentity({ paths, farm, parsed: nativeArgv, decision: identityDecision, env: procForDecision.env });
|
|
170126
170562
|
if (picked.kind === "cancelled") {
|
|
170127
170563
|
throw new IdentityPickerCancelledError();
|
|
170128
170564
|
}
|