claude-use 11.50.2 → 11.52.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/README.md +2 -2
- package/dist/cli.cjs +589 -263
- package/dist/index.cjs +682 -516
- package/dist/index.mjs +675 -510
- package/dist/types/index.d.ts +4165 -434
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -142,59 +142,124 @@ var init_proxyBypass = __esm({
|
|
|
142
142
|
function distinctList(member) {
|
|
143
143
|
return import_zod.z.array(member).refine((items) => new Set(items).size === items.length, "must not repeat a segment");
|
|
144
144
|
}
|
|
145
|
+
function isSingleVisibleGrapheme(text) {
|
|
146
|
+
return [...GRAPHEMES.segment(text)].length === 1 && !/[\p{C}\p{Z}]/u.test(text);
|
|
147
|
+
}
|
|
148
|
+
function isPlainObject(value) {
|
|
149
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
150
|
+
}
|
|
151
|
+
function mergeStatuslineSettings(base, over) {
|
|
152
|
+
if (!isPlainObject(base) || !isPlainObject(over)) {
|
|
153
|
+
return over === void 0 ? base : over;
|
|
154
|
+
}
|
|
155
|
+
const merged = { ...base };
|
|
156
|
+
for (const [key, value] of Object.entries(over)) {
|
|
157
|
+
merged[key] = key in base ? mergeStatuslineSettings(base[key], value) : value;
|
|
158
|
+
}
|
|
159
|
+
return merged;
|
|
160
|
+
}
|
|
145
161
|
function resolveStatusline(settings) {
|
|
146
|
-
const resolved =
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
warnAt: settings?.warnAt ?? STATUSLINE_DEFAULTS.warnAt,
|
|
150
|
-
criticalAt: settings?.criticalAt ?? STATUSLINE_DEFAULTS.criticalAt,
|
|
151
|
-
fiveHourLabel: settings?.fiveHourLabel ?? STATUSLINE_DEFAULTS.fiveHourLabel,
|
|
152
|
-
sevenDayLabel: settings?.sevenDayLabel ?? STATUSLINE_DEFAULTS.sevenDayLabel,
|
|
153
|
-
barWidth: settings?.barWidth ?? STATUSLINE_DEFAULTS.barWidth
|
|
154
|
-
};
|
|
155
|
-
if (resolved.warnAt >= resolved.criticalAt) {
|
|
156
|
-
throw new RangeError(`statusline warnAt (${String(resolved.warnAt)}) must be below criticalAt (${String(resolved.criticalAt)})`);
|
|
162
|
+
const resolved = ResolvedStatuslineSchema.parse(mergeStatuslineSettings(STATUSLINE_DEFAULTS, settings));
|
|
163
|
+
if (resolved.bands.warnAt >= resolved.bands.criticalAt) {
|
|
164
|
+
throw new RangeError(`statusline bands.warnAt (${String(resolved.bands.warnAt)}) must be below bands.criticalAt (${String(resolved.bands.criticalAt)})`);
|
|
157
165
|
}
|
|
158
166
|
return resolved;
|
|
159
167
|
}
|
|
160
|
-
var import_zod, STATUSLINE_HEADER_SEGMENTS,
|
|
168
|
+
var import_zod, STATUSLINE_HEADER_SEGMENTS, STATUSLINE_ROWS, STATUSLINE_COLOUR_NAMES, MAX_PERCENT, MAX_STATUSLINE_PALETTE_INDEX, MAX_STATUSLINE_LABEL_CHARS, MAX_BAR_CELLS, LABEL_RE2, colourValue, GRAPHEMES, barCharacter, labelText, wholePercent, SHAPES, StatuslineSchema, ResolvedStatuslineSchema, STATUSLINE_DEFAULTS, STATUSLINE_ENV;
|
|
161
169
|
var init_statusline = __esm({
|
|
162
170
|
"src/config/statusline.ts"() {
|
|
163
171
|
"use strict";
|
|
164
172
|
import_zod = require("zod");
|
|
165
173
|
STATUSLINE_HEADER_SEGMENTS = ["model", "provider", "route", "account", "identity", "headroom"];
|
|
166
|
-
|
|
174
|
+
STATUSLINE_ROWS = ["context", "quota"];
|
|
175
|
+
STATUSLINE_COLOUR_NAMES = [
|
|
176
|
+
"default",
|
|
177
|
+
"dim",
|
|
178
|
+
"black",
|
|
179
|
+
"red",
|
|
180
|
+
"green",
|
|
181
|
+
"yellow",
|
|
182
|
+
"blue",
|
|
183
|
+
"magenta",
|
|
184
|
+
"cyan",
|
|
185
|
+
"white",
|
|
186
|
+
"brightBlack",
|
|
187
|
+
"brightRed",
|
|
188
|
+
"brightGreen",
|
|
189
|
+
"brightYellow",
|
|
190
|
+
"brightBlue",
|
|
191
|
+
"brightMagenta",
|
|
192
|
+
"brightCyan",
|
|
193
|
+
"brightWhite"
|
|
194
|
+
];
|
|
167
195
|
MAX_PERCENT = 100;
|
|
196
|
+
MAX_STATUSLINE_PALETTE_INDEX = 255;
|
|
168
197
|
MAX_STATUSLINE_LABEL_CHARS = 12;
|
|
169
198
|
MAX_BAR_CELLS = 40;
|
|
170
199
|
LABEL_RE2 = /^[^\p{C}\p{Z}]+(?: [^\p{C}\p{Z}]+)*$/u;
|
|
200
|
+
colourValue = import_zod.z.union([import_zod.z.enum(STATUSLINE_COLOUR_NAMES), import_zod.z.number().int().min(0).max(MAX_STATUSLINE_PALETTE_INDEX), import_zod.z.string().regex(/^#[0-9a-fA-F]{6}$/, "must be a colour name, a palette index from 0 to 255 or #rrggbb")]);
|
|
201
|
+
GRAPHEMES = new Intl.Segmenter(void 0, { granularity: "grapheme" });
|
|
202
|
+
barCharacter = import_zod.z.string().refine(isSingleVisibleGrapheme, "must be a single visible character");
|
|
203
|
+
labelText = import_zod.z.string().max(MAX_STATUSLINE_LABEL_CHARS).regex(LABEL_RE2, "must be visible text without control characters");
|
|
171
204
|
wholePercent = import_zod.z.number().int().min(1).max(MAX_PERCENT);
|
|
205
|
+
SHAPES = {
|
|
206
|
+
layout: {
|
|
207
|
+
header: distinctList(import_zod.z.enum(STATUSLINE_HEADER_SEGMENTS)).describe("The header segments to draw, in drawing order; a segment left out is hidden, and an empty list hides the header."),
|
|
208
|
+
rows: distinctList(import_zod.z.enum(STATUSLINE_ROWS)).describe("The rows to draw below the header, in drawing order; a row left out is hidden, and an empty list hides every row.")
|
|
209
|
+
},
|
|
210
|
+
bands: {
|
|
211
|
+
warnAt: wholePercent.describe("The whole percentage of use at which a bar turns yellow; it must be below criticalAt."),
|
|
212
|
+
criticalAt: wholePercent.describe("The whole percentage of use at which a bar turns red.")
|
|
213
|
+
},
|
|
214
|
+
labels: {
|
|
215
|
+
fiveHour: labelText.describe("The name of the five-hour subscription window."),
|
|
216
|
+
sevenDay: labelText.describe("The name of the weekly subscription window.")
|
|
217
|
+
},
|
|
218
|
+
bar: {
|
|
219
|
+
width: import_zod.z.number().int().min(1).max(MAX_BAR_CELLS).describe("A bar's width in cells before the line's spare width is shared out among the bars."),
|
|
220
|
+
filled: barCharacter.describe("The character that draws the used part of a bar."),
|
|
221
|
+
empty: barCharacter.describe("The character that draws the unused part of a bar.")
|
|
222
|
+
},
|
|
223
|
+
colours: {
|
|
224
|
+
context: colourValue.describe("The colour of the context bar and its figures below the warning threshold."),
|
|
225
|
+
usage: colourValue.describe("The colour of the quota bars and their figures below the warning threshold."),
|
|
226
|
+
warning: colourValue.describe("The colour of the context bar at or above bands.warnAt, and of a cache hit share that is middling."),
|
|
227
|
+
usageWarning: colourValue.describe("The colour of a quota bar at or above bands.warnAt."),
|
|
228
|
+
critical: colourValue.describe("The colour of a bar at or above bands.criticalAt, and of a cache hit share that is nearly nothing."),
|
|
229
|
+
model: colourValue.describe("The colour of the model and provider segments."),
|
|
230
|
+
label: colourValue.describe("The colour of labels and secondary text: row labels, and the route, account, identity and headroom segments."),
|
|
231
|
+
empty: colourValue.describe("The colour of the unused part of a bar.")
|
|
232
|
+
}
|
|
233
|
+
};
|
|
172
234
|
StatuslineSchema = import_zod.z.strictObject({
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
sevenDayLabel: import_zod.z.string().max(MAX_STATUSLINE_LABEL_CHARS).regex(LABEL_RE2, "must be visible text without control characters").optional(),
|
|
179
|
-
barWidth: import_zod.z.number().int().min(1).max(MAX_BAR_CELLS).optional()
|
|
235
|
+
layout: import_zod.z.strictObject(SHAPES.layout).partial().optional(),
|
|
236
|
+
bands: import_zod.z.strictObject(SHAPES.bands).partial().optional(),
|
|
237
|
+
labels: import_zod.z.strictObject(SHAPES.labels).partial().optional(),
|
|
238
|
+
bar: import_zod.z.strictObject(SHAPES.bar).partial().optional(),
|
|
239
|
+
colours: import_zod.z.strictObject(SHAPES.colours).partial().optional()
|
|
180
240
|
});
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
sevenDayLabel: import_zod.z.union([StatuslineSchema.shape.sevenDayLabel.unwrap(), import_zod.z.literal(false)]).optional(),
|
|
188
|
-
barWidth: import_zod.z.union([StatuslineSchema.shape.barWidth.unwrap(), import_zod.z.literal(false)]).optional()
|
|
241
|
+
ResolvedStatuslineSchema = import_zod.z.strictObject({
|
|
242
|
+
layout: import_zod.z.strictObject(SHAPES.layout),
|
|
243
|
+
bands: import_zod.z.strictObject(SHAPES.bands),
|
|
244
|
+
labels: import_zod.z.strictObject(SHAPES.labels),
|
|
245
|
+
bar: import_zod.z.strictObject(SHAPES.bar),
|
|
246
|
+
colours: import_zod.z.strictObject(SHAPES.colours)
|
|
189
247
|
});
|
|
190
248
|
STATUSLINE_DEFAULTS = {
|
|
191
|
-
header: STATUSLINE_HEADER_SEGMENTS,
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
249
|
+
layout: { header: [...STATUSLINE_HEADER_SEGMENTS], rows: [...STATUSLINE_ROWS] },
|
|
250
|
+
bands: { warnAt: 70, criticalAt: 90 },
|
|
251
|
+
labels: { fiveHour: "5h", sevenDay: "Wk" },
|
|
252
|
+
bar: { width: 10, filled: "\u2588", empty: "\u2591" },
|
|
253
|
+
colours: {
|
|
254
|
+
context: "green",
|
|
255
|
+
usage: "green",
|
|
256
|
+
warning: "yellow",
|
|
257
|
+
usageWarning: "yellow",
|
|
258
|
+
critical: "red",
|
|
259
|
+
model: "default",
|
|
260
|
+
label: "default",
|
|
261
|
+
empty: "brightBlack"
|
|
262
|
+
}
|
|
198
263
|
};
|
|
199
264
|
STATUSLINE_ENV = "AGENT_SHIM_STATUSLINE";
|
|
200
265
|
}
|
|
@@ -1592,7 +1657,7 @@ function flattenLayers(layers, options) {
|
|
|
1592
1657
|
launch.proxyBypass = layer.launch.proxyBypass;
|
|
1593
1658
|
}
|
|
1594
1659
|
if (layer.launch.statusline !== void 0) {
|
|
1595
|
-
launch.statusline =
|
|
1660
|
+
launch.statusline = StatuslineSchema.parse(mergeStatuslineSettings(launch.statusline, layer.launch.statusline));
|
|
1596
1661
|
}
|
|
1597
1662
|
}
|
|
1598
1663
|
if (layer.models !== void 0) {
|
|
@@ -1773,6 +1838,7 @@ var init_flatten = __esm({
|
|
|
1773
1838
|
"src/resolve/flatten.ts"() {
|
|
1774
1839
|
"use strict";
|
|
1775
1840
|
init_schema();
|
|
1841
|
+
init_statusline();
|
|
1776
1842
|
init_conditions();
|
|
1777
1843
|
init_match();
|
|
1778
1844
|
}
|
|
@@ -4259,7 +4325,7 @@ var init_package = __esm({
|
|
|
4259
4325
|
"package.json"() {
|
|
4260
4326
|
package_default = {
|
|
4261
4327
|
name: "claude-use",
|
|
4262
|
-
version: "11.
|
|
4328
|
+
version: "11.52.0",
|
|
4263
4329
|
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.",
|
|
4264
4330
|
license: "MIT",
|
|
4265
4331
|
author: "Joseph Mearman <joseph@mearman.co.uk>",
|
|
@@ -7419,6 +7485,115 @@ var init_poolPick = __esm({
|
|
|
7419
7485
|
}
|
|
7420
7486
|
});
|
|
7421
7487
|
|
|
7488
|
+
// src/statusline/keys.ts
|
|
7489
|
+
function valueAt(source, path43) {
|
|
7490
|
+
let current = source;
|
|
7491
|
+
for (const part of path43) {
|
|
7492
|
+
if (!isPlainObject(current)) {
|
|
7493
|
+
return void 0;
|
|
7494
|
+
}
|
|
7495
|
+
current = current[part];
|
|
7496
|
+
}
|
|
7497
|
+
return current;
|
|
7498
|
+
}
|
|
7499
|
+
function keyOf(path43, leaf) {
|
|
7500
|
+
const common = { path: path43.join("."), description: leaf.description ?? "", defaultValue: valueAt(STATUSLINE_DEFAULTS, path43) };
|
|
7501
|
+
if (leaf instanceof import_zod15.z.ZodNumber) {
|
|
7502
|
+
return { ...common, kind: "integer", choices: [] };
|
|
7503
|
+
}
|
|
7504
|
+
if (leaf instanceof import_zod15.z.ZodString) {
|
|
7505
|
+
return { ...common, kind: "text", choices: [] };
|
|
7506
|
+
}
|
|
7507
|
+
if (leaf instanceof import_zod15.z.ZodUnion) {
|
|
7508
|
+
return { ...common, kind: "colour", choices: [...STATUSLINE_COLOUR_NAMES] };
|
|
7509
|
+
}
|
|
7510
|
+
if (leaf instanceof import_zod15.z.ZodEnum) {
|
|
7511
|
+
return { ...common, kind: "choice", choices: Object.values(leaf.enum).map(String) };
|
|
7512
|
+
}
|
|
7513
|
+
if (leaf instanceof import_zod15.z.ZodArray && leaf.element instanceof import_zod15.z.ZodEnum) {
|
|
7514
|
+
return { ...common, kind: "list", choices: Object.values(leaf.element.enum).map(String) };
|
|
7515
|
+
}
|
|
7516
|
+
throw new TypeError(`statusline setting ${path43.join(".")} has a kind the key listing does not describe`);
|
|
7517
|
+
}
|
|
7518
|
+
function walk(shape, prefix) {
|
|
7519
|
+
return Object.entries(shape).flatMap(([name, schema]) => schema instanceof import_zod15.z.ZodObject ? walk(schema.shape, [...prefix, name]) : [keyOf([...prefix, name], schema)]);
|
|
7520
|
+
}
|
|
7521
|
+
function statuslineKeys() {
|
|
7522
|
+
return walk(ResolvedStatuslineSchema.shape, []);
|
|
7523
|
+
}
|
|
7524
|
+
var import_zod15;
|
|
7525
|
+
var init_keys = __esm({
|
|
7526
|
+
"src/statusline/keys.ts"() {
|
|
7527
|
+
"use strict";
|
|
7528
|
+
import_zod15 = require("zod");
|
|
7529
|
+
init_statusline();
|
|
7530
|
+
}
|
|
7531
|
+
});
|
|
7532
|
+
|
|
7533
|
+
// src/statusline/change.ts
|
|
7534
|
+
function keyNamed(path43) {
|
|
7535
|
+
const found = statuslineKeys().find((key) => key.path === path43);
|
|
7536
|
+
if (found === void 0) {
|
|
7537
|
+
throw new UsageError(`"${path43}" is not a statusline setting; \`agent-shim statusline keys\` lists them.`);
|
|
7538
|
+
}
|
|
7539
|
+
return found;
|
|
7540
|
+
}
|
|
7541
|
+
function setAt(target, path43, value) {
|
|
7542
|
+
const [head, ...rest] = path43;
|
|
7543
|
+
if (head === void 0) {
|
|
7544
|
+
return;
|
|
7545
|
+
}
|
|
7546
|
+
if (rest.length === 0) {
|
|
7547
|
+
target[head] = value;
|
|
7548
|
+
return;
|
|
7549
|
+
}
|
|
7550
|
+
const child = target[head];
|
|
7551
|
+
const next = isPlainObject(child) ? child : {};
|
|
7552
|
+
target[head] = next;
|
|
7553
|
+
setAt(next, rest, value);
|
|
7554
|
+
}
|
|
7555
|
+
function removeAt(target, path43) {
|
|
7556
|
+
const [head, ...rest] = path43;
|
|
7557
|
+
if (head === void 0) {
|
|
7558
|
+
return;
|
|
7559
|
+
}
|
|
7560
|
+
const child = target[head];
|
|
7561
|
+
if (rest.length === 0) {
|
|
7562
|
+
Reflect.deleteProperty(target, head);
|
|
7563
|
+
return;
|
|
7564
|
+
}
|
|
7565
|
+
if (isPlainObject(child)) {
|
|
7566
|
+
removeAt(child, rest);
|
|
7567
|
+
if (Object.keys(child).length === 0) {
|
|
7568
|
+
Reflect.deleteProperty(target, head);
|
|
7569
|
+
}
|
|
7570
|
+
}
|
|
7571
|
+
}
|
|
7572
|
+
function applyStatuslineChange(existing, change) {
|
|
7573
|
+
const draft = structuredClone(existing ?? {});
|
|
7574
|
+
for (const [path43, value] of Object.entries(change.set ?? {})) {
|
|
7575
|
+
keyNamed(path43);
|
|
7576
|
+
setAt(draft, path43.split("."), value);
|
|
7577
|
+
}
|
|
7578
|
+
for (const path43 of change.unset ?? []) {
|
|
7579
|
+
keyNamed(path43);
|
|
7580
|
+
removeAt(draft, path43.split("."));
|
|
7581
|
+
}
|
|
7582
|
+
const result = StatuslineSchema.safeParse(draft);
|
|
7583
|
+
if (!result.success) {
|
|
7584
|
+
throw new UsageError(`statusline: ${result.error.issues.map((issue) => `${issue.path.join(".")}: ${issue.message}`).join("; ")}.`);
|
|
7585
|
+
}
|
|
7586
|
+
return Object.keys(result.data).length === 0 ? void 0 : result.data;
|
|
7587
|
+
}
|
|
7588
|
+
var init_change = __esm({
|
|
7589
|
+
"src/statusline/change.ts"() {
|
|
7590
|
+
"use strict";
|
|
7591
|
+
init_cliError();
|
|
7592
|
+
init_statusline();
|
|
7593
|
+
init_keys();
|
|
7594
|
+
}
|
|
7595
|
+
});
|
|
7596
|
+
|
|
7422
7597
|
// src/configProfilesStore.ts
|
|
7423
7598
|
function profileJsonPath(paths, name) {
|
|
7424
7599
|
return import_node_path22.default.join(paths.configProfilesDir, `${name}.json`);
|
|
@@ -7518,17 +7693,6 @@ function removeProfile(paths, name) {
|
|
|
7518
7693
|
requireProfileExists(paths, name);
|
|
7519
7694
|
import_node_fs3.default.rmSync(profileJsonPath(paths, name));
|
|
7520
7695
|
}
|
|
7521
|
-
function withStatuslineChange(existing, change) {
|
|
7522
|
-
const merged = new Map(Object.entries({ ...existing }));
|
|
7523
|
-
for (const [key, value] of Object.entries(change)) {
|
|
7524
|
-
if (value === false) {
|
|
7525
|
-
merged.delete(key);
|
|
7526
|
-
} else {
|
|
7527
|
-
merged.set(key, value);
|
|
7528
|
-
}
|
|
7529
|
-
}
|
|
7530
|
-
return merged.size === 0 ? void 0 : StatuslineSchema.parse(Object.fromEntries(merged));
|
|
7531
|
-
}
|
|
7532
7696
|
function applyProfileChange(paths, name, change) {
|
|
7533
7697
|
let touched = false;
|
|
7534
7698
|
if (change.category !== void 0) {
|
|
@@ -7578,7 +7742,7 @@ function applyProfileChange(paths, name, change) {
|
|
|
7578
7742
|
launchPatch.explain = change.launchExplain;
|
|
7579
7743
|
}
|
|
7580
7744
|
if (change.launchStatusline !== void 0) {
|
|
7581
|
-
launchPatch.statusline =
|
|
7745
|
+
launchPatch.statusline = applyStatuslineChange(readProfile(paths, name)?.launch?.statusline, change.launchStatusline);
|
|
7582
7746
|
}
|
|
7583
7747
|
if (Object.keys(launchPatch).length > 0) {
|
|
7584
7748
|
setProfileLaunchFlags(paths, name, launchPatch);
|
|
@@ -7595,7 +7759,7 @@ var init_configProfilesStore = __esm({
|
|
|
7595
7759
|
init_store();
|
|
7596
7760
|
init_schema();
|
|
7597
7761
|
init_cliError();
|
|
7598
|
-
|
|
7762
|
+
init_change();
|
|
7599
7763
|
init_load();
|
|
7600
7764
|
ProfileNotFoundError = class extends CliError {
|
|
7601
7765
|
constructor(profileName) {
|
|
@@ -7767,17 +7931,17 @@ function formatCachedCredentialState(state) {
|
|
|
7767
7931
|
}
|
|
7768
7932
|
return state.status === "fresh" ? `${age}, expires in ${formatAge(state.expiresInMs)}` : `${age}, expired ${formatAge(-state.expiresInMs)} ago`;
|
|
7769
7933
|
}
|
|
7770
|
-
var
|
|
7934
|
+
var import_zod16, MS_PER_UNIT, CachedCredentialSchema;
|
|
7771
7935
|
var init_credentialCache = __esm({
|
|
7772
7936
|
"src/credentialCache.ts"() {
|
|
7773
7937
|
"use strict";
|
|
7774
|
-
|
|
7938
|
+
import_zod16 = require("zod");
|
|
7775
7939
|
init_schema();
|
|
7776
7940
|
init_preflight();
|
|
7777
7941
|
MS_PER_UNIT = { s: 1e3, m: 6e4, h: 36e5, d: 864e5 };
|
|
7778
|
-
CachedCredentialSchema =
|
|
7779
|
-
token:
|
|
7780
|
-
fetchedAt:
|
|
7942
|
+
CachedCredentialSchema = import_zod16.z.strictObject({
|
|
7943
|
+
token: import_zod16.z.string().min(1),
|
|
7944
|
+
fetchedAt: import_zod16.z.number().int().nonnegative(),
|
|
7781
7945
|
source: CredentialSourceSchema
|
|
7782
7946
|
});
|
|
7783
7947
|
}
|
|
@@ -7900,15 +8064,15 @@ function aliasFindings(aliases, providerNames) {
|
|
|
7900
8064
|
return { level: "pass", alias, message: `${alias} is a former name of ${target}, still honoured for sessions launched under it. Run \`agent-shim provider unalias ${alias}\` once none is running.` };
|
|
7901
8065
|
});
|
|
7902
8066
|
}
|
|
7903
|
-
var
|
|
8067
|
+
var import_zod17, ProviderAliasesSchema;
|
|
7904
8068
|
var init_providerAliases = __esm({
|
|
7905
8069
|
"src/providerAliases.ts"() {
|
|
7906
8070
|
"use strict";
|
|
7907
|
-
|
|
8071
|
+
import_zod17 = require("zod");
|
|
7908
8072
|
init_cliError();
|
|
7909
8073
|
init_load();
|
|
7910
8074
|
init_store();
|
|
7911
|
-
ProviderAliasesSchema =
|
|
8075
|
+
ProviderAliasesSchema = import_zod17.z.record(import_zod17.z.string().min(1), import_zod17.z.string().min(1));
|
|
7912
8076
|
}
|
|
7913
8077
|
});
|
|
7914
8078
|
|
|
@@ -8964,21 +9128,21 @@ function findPathShadow(params) {
|
|
|
8964
9128
|
}
|
|
8965
9129
|
return params.pathDirs.some((dir) => import_node_path28.default.resolve(dir) === resolvedTargetDir) ? { status: "ok" } : { status: "not-on-path" };
|
|
8966
9130
|
}
|
|
8967
|
-
var import_node_fs7, import_node_path28,
|
|
9131
|
+
var import_node_fs7, import_node_path28, import_zod22, ClaudeShimStateSchema, nodeLinkFs;
|
|
8968
9132
|
var init_claudeShim = __esm({
|
|
8969
9133
|
"src/claudeShim.ts"() {
|
|
8970
9134
|
"use strict";
|
|
8971
9135
|
import_node_fs7 = __toESM(require("node:fs"), 1);
|
|
8972
9136
|
import_node_path28 = __toESM(require("node:path"), 1);
|
|
8973
|
-
|
|
9137
|
+
import_zod22 = require("zod");
|
|
8974
9138
|
init_commandDeps();
|
|
8975
9139
|
init_store();
|
|
8976
9140
|
init_realPorts();
|
|
8977
9141
|
init_cliError();
|
|
8978
|
-
ClaudeShimStateSchema =
|
|
8979
|
-
targetPath:
|
|
8980
|
-
method:
|
|
8981
|
-
installedAtMs:
|
|
9142
|
+
ClaudeShimStateSchema = import_zod22.z.strictObject({
|
|
9143
|
+
targetPath: import_zod22.z.string().min(1),
|
|
9144
|
+
method: import_zod22.z.enum(["hardlink", "copy"]),
|
|
9145
|
+
installedAtMs: import_zod22.z.number()
|
|
8982
9146
|
});
|
|
8983
9147
|
nodeLinkFs = { link: import_node_fs7.default.linkSync, copyFile: import_node_fs7.default.copyFileSync, chmod: import_node_fs7.default.chmodSync };
|
|
8984
9148
|
}
|
|
@@ -8997,14 +9161,14 @@ function memberKindOf(ref, models) {
|
|
|
8997
9161
|
function expandMembers(name, models) {
|
|
8998
9162
|
const virtual = models?.virtual ?? {};
|
|
8999
9163
|
const expanded = [];
|
|
9000
|
-
const
|
|
9164
|
+
const walk2 = (current, chain) => {
|
|
9001
9165
|
const nested = virtual[current];
|
|
9002
9166
|
if (nested !== void 0) {
|
|
9003
9167
|
if (chain.includes(current)) {
|
|
9004
9168
|
throw new Error(`virtual model cycle: ${[...chain, current].join(" -> ")}`);
|
|
9005
9169
|
}
|
|
9006
9170
|
for (const member of nested.members) {
|
|
9007
|
-
|
|
9171
|
+
walk2(member, [...chain, current]);
|
|
9008
9172
|
}
|
|
9009
9173
|
return;
|
|
9010
9174
|
}
|
|
@@ -9017,7 +9181,7 @@ function expandMembers(name, models) {
|
|
|
9017
9181
|
throw new VirtualModelNotFoundError(name);
|
|
9018
9182
|
}
|
|
9019
9183
|
for (const member of top.members) {
|
|
9020
|
-
|
|
9184
|
+
walk2(member, [name]);
|
|
9021
9185
|
}
|
|
9022
9186
|
return expanded;
|
|
9023
9187
|
}
|
|
@@ -9074,62 +9238,62 @@ var init_signatures = __esm({
|
|
|
9074
9238
|
});
|
|
9075
9239
|
|
|
9076
9240
|
// src/codex/anthropic.ts
|
|
9077
|
-
var
|
|
9241
|
+
var import_zod26, TextBlockSchema, Base64ImageSourceSchema, UrlImageSourceSchema, ImageBlockSchema, ToolUseBlockSchema, ToolResultContentBlockSchema, ToolResultBlockSchema, OtherBlockSchema, ContentBlockSchema, MessageSchema, ToolSchema, ToolChoiceSchema, SystemSchema, MessagesRequestSchema, CountTokensRequestSchema;
|
|
9078
9242
|
var init_anthropic = __esm({
|
|
9079
9243
|
"src/codex/anthropic.ts"() {
|
|
9080
9244
|
"use strict";
|
|
9081
|
-
|
|
9082
|
-
TextBlockSchema =
|
|
9083
|
-
Base64ImageSourceSchema =
|
|
9084
|
-
UrlImageSourceSchema =
|
|
9085
|
-
ImageBlockSchema =
|
|
9086
|
-
type:
|
|
9087
|
-
source:
|
|
9245
|
+
import_zod26 = require("zod");
|
|
9246
|
+
TextBlockSchema = import_zod26.z.looseObject({ type: import_zod26.z.literal("text"), text: import_zod26.z.string() });
|
|
9247
|
+
Base64ImageSourceSchema = import_zod26.z.looseObject({ type: import_zod26.z.literal("base64"), media_type: import_zod26.z.string().min(1), data: import_zod26.z.string() });
|
|
9248
|
+
UrlImageSourceSchema = import_zod26.z.looseObject({ type: import_zod26.z.literal("url"), url: import_zod26.z.string().min(1) });
|
|
9249
|
+
ImageBlockSchema = import_zod26.z.looseObject({
|
|
9250
|
+
type: import_zod26.z.literal("image"),
|
|
9251
|
+
source: import_zod26.z.union([Base64ImageSourceSchema, UrlImageSourceSchema])
|
|
9088
9252
|
});
|
|
9089
|
-
ToolUseBlockSchema =
|
|
9090
|
-
type:
|
|
9091
|
-
id:
|
|
9092
|
-
name:
|
|
9093
|
-
input:
|
|
9253
|
+
ToolUseBlockSchema = import_zod26.z.looseObject({
|
|
9254
|
+
type: import_zod26.z.literal("tool_use"),
|
|
9255
|
+
id: import_zod26.z.string().min(1),
|
|
9256
|
+
name: import_zod26.z.string().min(1),
|
|
9257
|
+
input: import_zod26.z.unknown()
|
|
9094
9258
|
});
|
|
9095
|
-
ToolResultContentBlockSchema =
|
|
9096
|
-
ToolResultBlockSchema =
|
|
9097
|
-
type:
|
|
9098
|
-
tool_use_id:
|
|
9099
|
-
content:
|
|
9259
|
+
ToolResultContentBlockSchema = import_zod26.z.union([TextBlockSchema, import_zod26.z.looseObject({ type: import_zod26.z.string() })]);
|
|
9260
|
+
ToolResultBlockSchema = import_zod26.z.looseObject({
|
|
9261
|
+
type: import_zod26.z.literal("tool_result"),
|
|
9262
|
+
tool_use_id: import_zod26.z.string().min(1),
|
|
9263
|
+
content: import_zod26.z.union([import_zod26.z.string(), import_zod26.z.array(ToolResultContentBlockSchema)]).optional()
|
|
9100
9264
|
});
|
|
9101
|
-
OtherBlockSchema =
|
|
9102
|
-
ContentBlockSchema =
|
|
9103
|
-
MessageSchema =
|
|
9104
|
-
role:
|
|
9105
|
-
content:
|
|
9265
|
+
OtherBlockSchema = import_zod26.z.looseObject({ type: import_zod26.z.string() });
|
|
9266
|
+
ContentBlockSchema = import_zod26.z.union([TextBlockSchema, ImageBlockSchema, ToolUseBlockSchema, ToolResultBlockSchema, OtherBlockSchema]);
|
|
9267
|
+
MessageSchema = import_zod26.z.looseObject({
|
|
9268
|
+
role: import_zod26.z.enum(["user", "assistant", "system"]),
|
|
9269
|
+
content: import_zod26.z.union([import_zod26.z.string(), import_zod26.z.array(ContentBlockSchema)])
|
|
9106
9270
|
});
|
|
9107
|
-
ToolSchema =
|
|
9108
|
-
name:
|
|
9109
|
-
description:
|
|
9110
|
-
input_schema:
|
|
9271
|
+
ToolSchema = import_zod26.z.looseObject({
|
|
9272
|
+
name: import_zod26.z.string().min(1),
|
|
9273
|
+
description: import_zod26.z.string().optional(),
|
|
9274
|
+
input_schema: import_zod26.z.record(import_zod26.z.string(), import_zod26.z.unknown()).optional()
|
|
9111
9275
|
});
|
|
9112
|
-
ToolChoiceSchema =
|
|
9113
|
-
|
|
9114
|
-
|
|
9276
|
+
ToolChoiceSchema = import_zod26.z.union([
|
|
9277
|
+
import_zod26.z.looseObject({ type: import_zod26.z.enum(["auto", "none", "any"]) }),
|
|
9278
|
+
import_zod26.z.looseObject({ type: import_zod26.z.literal("tool"), name: import_zod26.z.string().min(1) })
|
|
9115
9279
|
]);
|
|
9116
|
-
SystemSchema =
|
|
9117
|
-
MessagesRequestSchema =
|
|
9118
|
-
model:
|
|
9280
|
+
SystemSchema = import_zod26.z.union([import_zod26.z.string(), import_zod26.z.array(import_zod26.z.union([TextBlockSchema, OtherBlockSchema]))]);
|
|
9281
|
+
MessagesRequestSchema = import_zod26.z.looseObject({
|
|
9282
|
+
model: import_zod26.z.string().optional(),
|
|
9119
9283
|
system: SystemSchema.optional(),
|
|
9120
|
-
messages:
|
|
9121
|
-
tools:
|
|
9284
|
+
messages: import_zod26.z.array(MessageSchema),
|
|
9285
|
+
tools: import_zod26.z.array(ToolSchema).optional(),
|
|
9122
9286
|
tool_choice: ToolChoiceSchema.optional(),
|
|
9123
|
-
stream:
|
|
9287
|
+
stream: import_zod26.z.boolean().optional(),
|
|
9124
9288
|
/** `user_id` is stable for one Claude Code session and differs between sessions, which is what makes it the right key for both the backend's prompt cache and its session header. */
|
|
9125
|
-
metadata:
|
|
9289
|
+
metadata: import_zod26.z.looseObject({ user_id: import_zod26.z.string().optional() }).optional(),
|
|
9126
9290
|
/** Claude Code's effort setting. Any string is accepted; the translator honours only the levels the backend understands. */
|
|
9127
|
-
output_config:
|
|
9291
|
+
output_config: import_zod26.z.looseObject({ effort: import_zod26.z.string().optional() }).optional()
|
|
9128
9292
|
});
|
|
9129
|
-
CountTokensRequestSchema =
|
|
9130
|
-
system:
|
|
9131
|
-
messages:
|
|
9132
|
-
tools:
|
|
9293
|
+
CountTokensRequestSchema = import_zod26.z.looseObject({
|
|
9294
|
+
system: import_zod26.z.unknown().optional(),
|
|
9295
|
+
messages: import_zod26.z.unknown().optional(),
|
|
9296
|
+
tools: import_zod26.z.unknown().optional()
|
|
9133
9297
|
});
|
|
9134
9298
|
}
|
|
9135
9299
|
});
|
|
@@ -9231,13 +9395,13 @@ function filterCatalogue(models, catalogue) {
|
|
|
9231
9395
|
const excluded = catalogue.exclude === void 0 ? void 0 : (0, import_picomatch4.default)(catalogue.exclude, { dot: true });
|
|
9232
9396
|
return models.filter((model) => included?.(model.id) !== false && excluded?.(model.id) !== true);
|
|
9233
9397
|
}
|
|
9234
|
-
var import_node_path30, import_picomatch4,
|
|
9398
|
+
var import_node_path30, import_picomatch4, import_zod27, DEFAULT_CANDIDATE_URLS, MS_PER_SECOND5, SECONDS_PER_HOUR2, HOURS_PER_DAY5, MS_PER_HOUR4, HOURS_BETWEEN_RETRIES, CATALOGUE_MAX_AGE_MS, CATALOGUE_RETRY_MS, CATALOGUE_REQUEST_SECONDS, CATALOGUE_REQUEST_TIMEOUT_MS, CATALOGUE_REFRESH_TIMEOUT_MS, CatalogueModelSchema, CatalogueCacheSchema;
|
|
9235
9399
|
var init_providerCatalogue = __esm({
|
|
9236
9400
|
"src/providerCatalogue.ts"() {
|
|
9237
9401
|
"use strict";
|
|
9238
9402
|
import_node_path30 = __toESM(require("node:path"), 1);
|
|
9239
9403
|
import_picomatch4 = __toESM(require("picomatch"), 1);
|
|
9240
|
-
|
|
9404
|
+
import_zod27 = require("zod");
|
|
9241
9405
|
DEFAULT_CANDIDATE_URLS = 2;
|
|
9242
9406
|
MS_PER_SECOND5 = 1e3;
|
|
9243
9407
|
SECONDS_PER_HOUR2 = 3600;
|
|
@@ -9249,8 +9413,8 @@ var init_providerCatalogue = __esm({
|
|
|
9249
9413
|
CATALOGUE_REQUEST_SECONDS = 10;
|
|
9250
9414
|
CATALOGUE_REQUEST_TIMEOUT_MS = CATALOGUE_REQUEST_SECONDS * MS_PER_SECOND5;
|
|
9251
9415
|
CATALOGUE_REFRESH_TIMEOUT_MS = DEFAULT_CANDIDATE_URLS * CATALOGUE_REQUEST_TIMEOUT_MS;
|
|
9252
|
-
CatalogueModelSchema =
|
|
9253
|
-
CatalogueCacheSchema =
|
|
9416
|
+
CatalogueModelSchema = import_zod27.z.strictObject({ id: import_zod27.z.string().min(1), name: import_zod27.z.string().min(1).optional() });
|
|
9417
|
+
CatalogueCacheSchema = import_zod27.z.strictObject({ fetchedAt: import_zod27.z.number(), url: import_zod27.z.string().min(1), models: import_zod27.z.array(CatalogueModelSchema) });
|
|
9254
9418
|
}
|
|
9255
9419
|
});
|
|
9256
9420
|
|
|
@@ -11613,7 +11777,7 @@ function isAnthropicUsageStale(member, nowMs) {
|
|
|
11613
11777
|
function poolIdentityNames(pools, poolName) {
|
|
11614
11778
|
const seenPools = /* @__PURE__ */ new Set();
|
|
11615
11779
|
const identities = /* @__PURE__ */ new Set();
|
|
11616
|
-
const
|
|
11780
|
+
const walk2 = (name) => {
|
|
11617
11781
|
const pool = pools[name];
|
|
11618
11782
|
if (pool === void 0 || seenPools.has(name)) {
|
|
11619
11783
|
return;
|
|
@@ -11625,11 +11789,11 @@ function poolIdentityNames(pools, poolName) {
|
|
|
11625
11789
|
if (nested === void 0) {
|
|
11626
11790
|
identities.add(member);
|
|
11627
11791
|
} else {
|
|
11628
|
-
|
|
11792
|
+
walk2(nested);
|
|
11629
11793
|
}
|
|
11630
11794
|
}
|
|
11631
11795
|
};
|
|
11632
|
-
|
|
11796
|
+
walk2(poolName);
|
|
11633
11797
|
return [...identities];
|
|
11634
11798
|
}
|
|
11635
11799
|
function describeError(error) {
|
|
@@ -11748,11 +11912,11 @@ var init_identityClaude = __esm({
|
|
|
11748
11912
|
});
|
|
11749
11913
|
|
|
11750
11914
|
// src/usage/providerQuota.ts
|
|
11751
|
-
var
|
|
11915
|
+
var import_zod34, MS_PER_SECOND9, SECONDS_PER_HOUR3, HOURS_PER_DAY6, DAYS_PER_MONTH, ZAI_HOST, ZAI_QUOTA_URL, ZAI_UNIT_HOURS, ZAI_UNIT_MONTHS, ZAI_UNIT_MS, ZaiLimitSchema, ZaiResponseSchema, OPENROUTER_HOST, OPENROUTER_KEY_URL, OPENROUTER_CREDITS_URL, MS_PER_DAY3, OpenRouterKeySchema, OpenRouterCreditsSchema, ANTIGRAVITY_HOST, ANTIGRAVITY_QUOTA_URL, ANTIGRAVITY_USER_URL, FIVE_HOURS2, DAYS_PER_WEEK2, FIVE_HOURS_MS, WEEK_MS, AntigravityBucketSchema, AntigravitySummarySchema, GoogleTokenInfoSchema, AntigravityUserSchema;
|
|
11752
11916
|
var init_providerQuota = __esm({
|
|
11753
11917
|
"src/usage/providerQuota.ts"() {
|
|
11754
11918
|
"use strict";
|
|
11755
|
-
|
|
11919
|
+
import_zod34 = require("zod");
|
|
11756
11920
|
init_cloudUpstream();
|
|
11757
11921
|
init_schema2();
|
|
11758
11922
|
MS_PER_SECOND9 = 1e3;
|
|
@@ -11767,35 +11931,35 @@ var init_providerQuota = __esm({
|
|
|
11767
11931
|
[ZAI_UNIT_HOURS, SECONDS_PER_HOUR3 * MS_PER_SECOND9],
|
|
11768
11932
|
[ZAI_UNIT_MONTHS, DAYS_PER_MONTH * HOURS_PER_DAY6 * SECONDS_PER_HOUR3 * MS_PER_SECOND9]
|
|
11769
11933
|
]);
|
|
11770
|
-
ZaiLimitSchema =
|
|
11771
|
-
type:
|
|
11772
|
-
unit:
|
|
11773
|
-
number:
|
|
11774
|
-
percentage:
|
|
11775
|
-
nextResetTime:
|
|
11776
|
-
usage:
|
|
11777
|
-
currentValue:
|
|
11778
|
-
remaining:
|
|
11934
|
+
ZaiLimitSchema = import_zod34.z.object({
|
|
11935
|
+
type: import_zod34.z.string(),
|
|
11936
|
+
unit: import_zod34.z.number().int(),
|
|
11937
|
+
number: import_zod34.z.number().int().positive(),
|
|
11938
|
+
percentage: import_zod34.z.number().nonnegative(),
|
|
11939
|
+
nextResetTime: import_zod34.z.number().positive().optional(),
|
|
11940
|
+
usage: import_zod34.z.number().nonnegative().optional(),
|
|
11941
|
+
currentValue: import_zod34.z.number().nonnegative().optional(),
|
|
11942
|
+
remaining: import_zod34.z.number().nonnegative().optional()
|
|
11779
11943
|
});
|
|
11780
|
-
ZaiResponseSchema =
|
|
11781
|
-
success:
|
|
11782
|
-
msg:
|
|
11783
|
-
data:
|
|
11944
|
+
ZaiResponseSchema = import_zod34.z.object({
|
|
11945
|
+
success: import_zod34.z.boolean(),
|
|
11946
|
+
msg: import_zod34.z.string().optional(),
|
|
11947
|
+
data: import_zod34.z.object({ level: import_zod34.z.string().optional(), limits: import_zod34.z.array(ZaiLimitSchema) })
|
|
11784
11948
|
});
|
|
11785
11949
|
OPENROUTER_HOST = "openrouter.ai";
|
|
11786
11950
|
OPENROUTER_KEY_URL = `https://${OPENROUTER_HOST}/api/v1/key`;
|
|
11787
11951
|
OPENROUTER_CREDITS_URL = `https://${OPENROUTER_HOST}/api/v1/credits`;
|
|
11788
11952
|
MS_PER_DAY3 = HOURS_PER_DAY6 * SECONDS_PER_HOUR3 * MS_PER_SECOND9;
|
|
11789
|
-
OpenRouterKeySchema =
|
|
11790
|
-
data:
|
|
11791
|
-
limit:
|
|
11792
|
-
limit_remaining:
|
|
11793
|
-
limit_reset:
|
|
11794
|
-
is_free_tier:
|
|
11795
|
-
free_model_daily_requests:
|
|
11953
|
+
OpenRouterKeySchema = import_zod34.z.object({
|
|
11954
|
+
data: import_zod34.z.object({
|
|
11955
|
+
limit: import_zod34.z.number().nonnegative().nullable(),
|
|
11956
|
+
limit_remaining: import_zod34.z.number().nullable(),
|
|
11957
|
+
limit_reset: import_zod34.z.string().nullable(),
|
|
11958
|
+
is_free_tier: import_zod34.z.boolean().optional(),
|
|
11959
|
+
free_model_daily_requests: import_zod34.z.object({ used: import_zod34.z.number().nonnegative(), limit: import_zod34.z.number().nonnegative(), remaining: import_zod34.z.number() }).optional()
|
|
11796
11960
|
})
|
|
11797
11961
|
});
|
|
11798
|
-
OpenRouterCreditsSchema =
|
|
11962
|
+
OpenRouterCreditsSchema = import_zod34.z.object({ data: import_zod34.z.object({ total_credits: import_zod34.z.number().nonnegative(), total_usage: import_zod34.z.number().nonnegative() }) });
|
|
11799
11963
|
ANTIGRAVITY_HOST = "daily-cloudcode-pa.googleapis.com";
|
|
11800
11964
|
ANTIGRAVITY_QUOTA_URL = `https://${ANTIGRAVITY_HOST}/v1internal:retrieveUserQuotaSummary`;
|
|
11801
11965
|
ANTIGRAVITY_USER_URL = `https://${ANTIGRAVITY_HOST}/v1internal:loadCodeAssist`;
|
|
@@ -11803,21 +11967,21 @@ var init_providerQuota = __esm({
|
|
|
11803
11967
|
DAYS_PER_WEEK2 = 7;
|
|
11804
11968
|
FIVE_HOURS_MS = FIVE_HOURS2 * SECONDS_PER_HOUR3 * MS_PER_SECOND9;
|
|
11805
11969
|
WEEK_MS = DAYS_PER_WEEK2 * HOURS_PER_DAY6 * SECONDS_PER_HOUR3 * MS_PER_SECOND9;
|
|
11806
|
-
AntigravityBucketSchema =
|
|
11807
|
-
bucketId:
|
|
11808
|
-
remainingFraction:
|
|
11809
|
-
resetTime:
|
|
11970
|
+
AntigravityBucketSchema = import_zod34.z.object({
|
|
11971
|
+
bucketId: import_zod34.z.string(),
|
|
11972
|
+
remainingFraction: import_zod34.z.number().optional(),
|
|
11973
|
+
resetTime: import_zod34.z.string().optional()
|
|
11810
11974
|
});
|
|
11811
|
-
AntigravitySummarySchema =
|
|
11812
|
-
GoogleTokenInfoSchema =
|
|
11813
|
-
email:
|
|
11814
|
-
sub:
|
|
11975
|
+
AntigravitySummarySchema = import_zod34.z.object({ groups: import_zod34.z.array(import_zod34.z.object({ buckets: import_zod34.z.array(AntigravityBucketSchema) })) });
|
|
11976
|
+
GoogleTokenInfoSchema = import_zod34.z.object({
|
|
11977
|
+
email: import_zod34.z.string().optional(),
|
|
11978
|
+
sub: import_zod34.z.string().optional()
|
|
11815
11979
|
});
|
|
11816
|
-
AntigravityUserSchema =
|
|
11980
|
+
AntigravityUserSchema = import_zod34.z.object({
|
|
11817
11981
|
/** The code-assist tier context, which defaults to the free tier for every account. */
|
|
11818
|
-
currentTier:
|
|
11982
|
+
currentTier: import_zod34.z.object({ name: import_zod34.z.string().optional(), id: import_zod34.z.string().optional() }).optional(),
|
|
11819
11983
|
/** The account's paid subscription; absent when the account has none. */
|
|
11820
|
-
paidTier:
|
|
11984
|
+
paidTier: import_zod34.z.object({ name: import_zod34.z.string().optional(), id: import_zod34.z.string().optional() }).optional()
|
|
11821
11985
|
});
|
|
11822
11986
|
}
|
|
11823
11987
|
});
|
|
@@ -15100,7 +15264,7 @@ function writePools(paths, pools) {
|
|
|
15100
15264
|
applyPatch(paths.globalConfigFile, GlobalConfigSchema, { pools }, { defaults: {} });
|
|
15101
15265
|
}
|
|
15102
15266
|
function poolCycleOf(pools, name) {
|
|
15103
|
-
const
|
|
15267
|
+
const walk2 = (current, path43) => {
|
|
15104
15268
|
for (const entry of pools[current]?.identities ?? []) {
|
|
15105
15269
|
const nested = poolNameOf(poolMemberIdentity(entry));
|
|
15106
15270
|
if (nested === void 0) {
|
|
@@ -15112,14 +15276,14 @@ function poolCycleOf(pools, name) {
|
|
|
15112
15276
|
if (path43.includes(nested)) {
|
|
15113
15277
|
continue;
|
|
15114
15278
|
}
|
|
15115
|
-
const found =
|
|
15279
|
+
const found = walk2(nested, [...path43, nested]);
|
|
15116
15280
|
if (found !== void 0) {
|
|
15117
15281
|
return found;
|
|
15118
15282
|
}
|
|
15119
15283
|
}
|
|
15120
15284
|
return void 0;
|
|
15121
15285
|
};
|
|
15122
|
-
return
|
|
15286
|
+
return walk2(name, [name]);
|
|
15123
15287
|
}
|
|
15124
15288
|
function validateMembers(pools, name, members) {
|
|
15125
15289
|
for (const entry of members) {
|
|
@@ -15237,7 +15401,7 @@ init_providersStore();
|
|
|
15237
15401
|
init_signIn();
|
|
15238
15402
|
init_realPorts();
|
|
15239
15403
|
var import_node_path27 = __toESM(require("node:path"), 1);
|
|
15240
|
-
var
|
|
15404
|
+
var import_zod18 = require("zod");
|
|
15241
15405
|
init_envBool();
|
|
15242
15406
|
init_load();
|
|
15243
15407
|
init_schema();
|
|
@@ -15317,9 +15481,9 @@ function lookupKeychainService(run, farmRoot) {
|
|
|
15317
15481
|
}
|
|
15318
15482
|
return { checked: true, found: true, serviceName, note: `Keychain service name for this identity: "${serviceName}".` };
|
|
15319
15483
|
}
|
|
15320
|
-
var SettingsSecretsShapeSchema =
|
|
15321
|
-
env:
|
|
15322
|
-
hooks:
|
|
15484
|
+
var SettingsSecretsShapeSchema = import_zod18.z.looseObject({
|
|
15485
|
+
env: import_zod18.z.record(import_zod18.z.string(), import_zod18.z.unknown()).optional(),
|
|
15486
|
+
hooks: import_zod18.z.record(import_zod18.z.string(), import_zod18.z.array(import_zod18.z.unknown())).optional()
|
|
15323
15487
|
});
|
|
15324
15488
|
function hookCommandCountOf(group) {
|
|
15325
15489
|
if (typeof group !== "object" || group === null) {
|
|
@@ -15612,7 +15776,7 @@ function collectCheckReport(params) {
|
|
|
15612
15776
|
}
|
|
15613
15777
|
|
|
15614
15778
|
// src/checkReportSchema.ts
|
|
15615
|
-
var
|
|
15779
|
+
var import_zod20 = require("zod");
|
|
15616
15780
|
init_schema();
|
|
15617
15781
|
init_claudeVersion();
|
|
15618
15782
|
init_identity();
|
|
@@ -15676,124 +15840,124 @@ var DIAGNOSTIC_CODES = [
|
|
|
15676
15840
|
var DIAGNOSTIC_SEVERITIES = ["error", "warning", "info"];
|
|
15677
15841
|
|
|
15678
15842
|
// src/usage/pickReportSchema.ts
|
|
15679
|
-
var
|
|
15843
|
+
var import_zod19 = require("zod");
|
|
15680
15844
|
init_plan2();
|
|
15681
|
-
var PoolPickCandidateViewSchema =
|
|
15682
|
-
identity:
|
|
15845
|
+
var PoolPickCandidateViewSchema = import_zod19.z.strictObject({
|
|
15846
|
+
identity: import_zod19.z.string(),
|
|
15683
15847
|
/** In pick order: `scored` has usable quota data, `unknown` has none, `pay-per-use` bills by use, `ineligible` is refused right now. */
|
|
15684
|
-
class:
|
|
15848
|
+
class: import_zod19.z.enum(["scored", "unknown", "pay-per-use", "ineligible"]),
|
|
15685
15849
|
/** Plan-size-weighted remaining quota per hour until its reset; present for `scored` only. */
|
|
15686
|
-
score:
|
|
15850
|
+
score: import_zod19.z.number().optional(),
|
|
15687
15851
|
/** Which window's reset divides the score: the seven-day window, or the five-hour one when the member reports no seven-day utilisation or its measured-ratio five-hour term outranks the weekly one; present with `score`. */
|
|
15688
|
-
scoreWindow:
|
|
15852
|
+
scoreWindow: import_zod19.z.enum(["sevenDay", "fiveHour"]).optional(),
|
|
15689
15853
|
/** False when the five-hour window would run dry, at the observed pace, before it resets. */
|
|
15690
|
-
feasible:
|
|
15854
|
+
feasible: import_zod19.z.boolean(),
|
|
15691
15855
|
/** When an `ineligible` member can be used again, as an ISO instant. */
|
|
15692
|
-
blockedUntil:
|
|
15856
|
+
blockedUntil: import_zod19.z.iso.datetime().optional(),
|
|
15693
15857
|
plan: PlanClassSchema,
|
|
15694
15858
|
/** The facts behind the class and score, in the order they matter. */
|
|
15695
|
-
reasons:
|
|
15859
|
+
reasons: import_zod19.z.array(import_zod19.z.string())
|
|
15696
15860
|
});
|
|
15697
|
-
var PoolPickReportSchema =
|
|
15698
|
-
pool:
|
|
15699
|
-
directory:
|
|
15861
|
+
var PoolPickReportSchema = import_zod19.z.strictObject({
|
|
15862
|
+
pool: import_zod19.z.string(),
|
|
15863
|
+
directory: import_zod19.z.string(),
|
|
15700
15864
|
/** The member a launch would run as, absent when every member is refused. */
|
|
15701
|
-
pick:
|
|
15702
|
-
candidates:
|
|
15865
|
+
pick: import_zod19.z.string().optional(),
|
|
15866
|
+
candidates: import_zod19.z.array(PoolPickCandidateViewSchema),
|
|
15703
15867
|
/** Identity members anywhere in the pool's graph that do not exist; a launch skips them. */
|
|
15704
|
-
missing:
|
|
15868
|
+
missing: import_zod19.z.array(import_zod19.z.string()),
|
|
15705
15869
|
/** When nothing can be picked, the soonest any member returns. */
|
|
15706
|
-
earliestReturn:
|
|
15870
|
+
earliestReturn: import_zod19.z.strictObject({ identity: import_zod19.z.string(), at: import_zod19.z.iso.datetime() }).optional(),
|
|
15707
15871
|
/** The member a resumed conversation started on but moved off, and why, when the ranking could not keep it. */
|
|
15708
|
-
movedOff:
|
|
15872
|
+
movedOff: import_zod19.z.strictObject({ identity: import_zod19.z.string(), reason: import_zod19.z.string() }).optional(),
|
|
15709
15873
|
/** Why the last-pick record could not be read, when that is the case. */
|
|
15710
|
-
stickyProblem:
|
|
15874
|
+
stickyProblem: import_zod19.z.string().optional()
|
|
15711
15875
|
});
|
|
15712
15876
|
|
|
15713
15877
|
// src/checkReportSchema.ts
|
|
15714
15878
|
var CHECK_CREDENTIAL_APPLIES = ["provider", "identity", "stored-login"];
|
|
15715
|
-
var CheckLayerViewSchema =
|
|
15716
|
-
id:
|
|
15717
|
-
kind:
|
|
15718
|
-
source:
|
|
15879
|
+
var CheckLayerViewSchema = import_zod20.z.strictObject({
|
|
15880
|
+
id: import_zod20.z.int(),
|
|
15881
|
+
kind: import_zod20.z.enum(LAYER_KINDS),
|
|
15882
|
+
source: import_zod20.z.string()
|
|
15719
15883
|
});
|
|
15720
|
-
var CheckEntryViewSchema =
|
|
15721
|
-
path:
|
|
15722
|
-
shared:
|
|
15723
|
-
via:
|
|
15884
|
+
var CheckEntryViewSchema = import_zod20.z.strictObject({
|
|
15885
|
+
path: import_zod20.z.string(),
|
|
15886
|
+
shared: import_zod20.z.boolean(),
|
|
15887
|
+
via: import_zod20.z.enum(DECISION_VIAS),
|
|
15724
15888
|
/** The entry's real category, or null when nothing classifies it. */
|
|
15725
|
-
category:
|
|
15726
|
-
rule:
|
|
15889
|
+
category: import_zod20.z.enum(CATEGORY_NAMES).nullable(),
|
|
15890
|
+
rule: import_zod20.z.strictObject({ key: import_zod20.z.string(), layer: import_zod20.z.int() }).optional(),
|
|
15727
15891
|
/** Rules that matched but whose `when` condition failed, each with the conditions that failed. */
|
|
15728
|
-
eliminated:
|
|
15892
|
+
eliminated: import_zod20.z.readonly(import_zod20.z.array(import_zod20.z.strictObject({ key: import_zod20.z.string(), failed: import_zod20.z.readonly(import_zod20.z.array(import_zod20.z.string())) }))).optional()
|
|
15729
15893
|
});
|
|
15730
|
-
var CheckDiagnosticSchema =
|
|
15731
|
-
code:
|
|
15732
|
-
severity:
|
|
15733
|
-
message:
|
|
15734
|
-
subject:
|
|
15735
|
-
layer:
|
|
15894
|
+
var CheckDiagnosticSchema = import_zod20.z.strictObject({
|
|
15895
|
+
code: import_zod20.z.enum(DIAGNOSTIC_CODES),
|
|
15896
|
+
severity: import_zod20.z.enum(DIAGNOSTIC_SEVERITIES),
|
|
15897
|
+
message: import_zod20.z.string(),
|
|
15898
|
+
subject: import_zod20.z.string().optional(),
|
|
15899
|
+
layer: import_zod20.z.int().optional()
|
|
15736
15900
|
});
|
|
15737
|
-
var CheckAmbientCredentialSchema =
|
|
15738
|
-
var CheckKeychainSchema =
|
|
15739
|
-
checked:
|
|
15740
|
-
found:
|
|
15741
|
-
serviceName:
|
|
15742
|
-
note:
|
|
15901
|
+
var CheckAmbientCredentialSchema = import_zod20.z.union([import_zod20.z.strictObject({ ok: import_zod20.z.literal(true) }), import_zod20.z.strictObject({ ok: import_zod20.z.literal(false), variable: import_zod20.z.string(), message: import_zod20.z.string() })]);
|
|
15902
|
+
var CheckKeychainSchema = import_zod20.z.strictObject({
|
|
15903
|
+
checked: import_zod20.z.literal(true),
|
|
15904
|
+
found: import_zod20.z.boolean(),
|
|
15905
|
+
serviceName: import_zod20.z.string().optional(),
|
|
15906
|
+
note: import_zod20.z.string()
|
|
15743
15907
|
});
|
|
15744
|
-
var CheckSettingsExposureSchema =
|
|
15745
|
-
file:
|
|
15746
|
-
envKeyNames:
|
|
15747
|
-
hookEventNames:
|
|
15748
|
-
hookCommandCount:
|
|
15908
|
+
var CheckSettingsExposureSchema = import_zod20.z.strictObject({
|
|
15909
|
+
file: import_zod20.z.string(),
|
|
15910
|
+
envKeyNames: import_zod20.z.readonly(import_zod20.z.array(import_zod20.z.string())),
|
|
15911
|
+
hookEventNames: import_zod20.z.readonly(import_zod20.z.array(import_zod20.z.string())),
|
|
15912
|
+
hookCommandCount: import_zod20.z.int().nonnegative()
|
|
15749
15913
|
});
|
|
15750
|
-
var CredentialSourceSummarySchema =
|
|
15751
|
-
|
|
15752
|
-
|
|
15753
|
-
|
|
15754
|
-
|
|
15755
|
-
|
|
15756
|
-
|
|
15914
|
+
var CredentialSourceSummarySchema = import_zod20.z.union([
|
|
15915
|
+
import_zod20.z.strictObject({ kind: import_zod20.z.literal("env"), variable: import_zod20.z.string() }),
|
|
15916
|
+
import_zod20.z.strictObject({ kind: import_zod20.z.literal("file"), path: import_zod20.z.string() }),
|
|
15917
|
+
import_zod20.z.strictObject({ kind: import_zod20.z.literal("command"), program: import_zod20.z.string() }),
|
|
15918
|
+
import_zod20.z.strictObject({ kind: import_zod20.z.literal("op"), reference: import_zod20.z.string() }),
|
|
15919
|
+
import_zod20.z.strictObject({ kind: import_zod20.z.literal("keychain"), service: import_zod20.z.string(), account: import_zod20.z.string().optional() }),
|
|
15920
|
+
import_zod20.z.strictObject({ kind: import_zod20.z.literal("literal") })
|
|
15757
15921
|
]);
|
|
15758
|
-
var CredentialSummarySchema =
|
|
15759
|
-
target:
|
|
15760
|
-
sources:
|
|
15922
|
+
var CredentialSummarySchema = import_zod20.z.strictObject({
|
|
15923
|
+
target: import_zod20.z.enum(CREDENTIAL_TARGETS),
|
|
15924
|
+
sources: import_zod20.z.readonly(import_zod20.z.array(CredentialSourceSummarySchema)),
|
|
15761
15925
|
cache: CredentialCacheSchema.optional()
|
|
15762
15926
|
});
|
|
15763
|
-
var CachedCredentialStateSchema =
|
|
15764
|
-
|
|
15765
|
-
|
|
15766
|
-
|
|
15927
|
+
var CachedCredentialStateSchema = import_zod20.z.union([
|
|
15928
|
+
import_zod20.z.strictObject({ store: import_zod20.z.enum(CREDENTIAL_CACHE_STORES), status: import_zod20.z.literal("empty") }),
|
|
15929
|
+
import_zod20.z.strictObject({ store: import_zod20.z.enum(CREDENTIAL_CACHE_STORES), status: import_zod20.z.literal("unreadable"), reason: import_zod20.z.string() }),
|
|
15930
|
+
import_zod20.z.strictObject({ store: import_zod20.z.enum(CREDENTIAL_CACHE_STORES), status: import_zod20.z.enum(["fresh", "expired"]), ageMs: import_zod20.z.number(), expiresInMs: import_zod20.z.number().optional() })
|
|
15767
15931
|
]);
|
|
15768
|
-
var CheckCredentialProviderSchema =
|
|
15769
|
-
|
|
15770
|
-
|
|
15932
|
+
var CheckCredentialProviderSchema = import_zod20.z.union([
|
|
15933
|
+
import_zod20.z.strictObject({ name: import_zod20.z.string(), credential: CredentialSummarySchema.optional(), cached: CachedCredentialStateSchema.optional() }),
|
|
15934
|
+
import_zod20.z.strictObject({ name: import_zod20.z.string(), problem: import_zod20.z.string() })
|
|
15771
15935
|
]);
|
|
15772
|
-
var CheckCredentialSchema =
|
|
15773
|
-
applies:
|
|
15936
|
+
var CheckCredentialSchema = import_zod20.z.strictObject({
|
|
15937
|
+
applies: import_zod20.z.enum(CHECK_CREDENTIAL_APPLIES),
|
|
15774
15938
|
provider: CheckCredentialProviderSchema.optional(),
|
|
15775
15939
|
identity: CredentialSummarySchema.optional(),
|
|
15776
15940
|
identityCached: CachedCredentialStateSchema.optional()
|
|
15777
15941
|
});
|
|
15778
|
-
var CheckClaudeVersionSchema =
|
|
15779
|
-
pinned:
|
|
15780
|
-
highestInstalled:
|
|
15781
|
-
installed:
|
|
15942
|
+
var CheckClaudeVersionSchema = import_zod20.z.strictObject({
|
|
15943
|
+
pinned: import_zod20.z.strictObject({ version: import_zod20.z.string(), source: import_zod20.z.enum(CLAUDE_VERSION_SOURCES), installed: import_zod20.z.boolean() }).optional(),
|
|
15944
|
+
highestInstalled: import_zod20.z.string().optional(),
|
|
15945
|
+
installed: import_zod20.z.readonly(import_zod20.z.array(import_zod20.z.string()))
|
|
15782
15946
|
});
|
|
15783
|
-
var CheckReportJsonSchema =
|
|
15784
|
-
identity:
|
|
15947
|
+
var CheckReportJsonSchema = import_zod20.z.strictObject({
|
|
15948
|
+
identity: import_zod20.z.strictObject({ name: import_zod20.z.string().nullable(), source: import_zod20.z.enum(IDENTITY_DECISION_SOURCES) }),
|
|
15785
15949
|
/** The pool ranking, when the launch named a pool instead of an identity. */
|
|
15786
15950
|
pool: PoolPickReportSchema.optional(),
|
|
15787
|
-
configProfile:
|
|
15788
|
-
layers:
|
|
15789
|
-
entries:
|
|
15790
|
-
projectEncodingAmbiguities:
|
|
15791
|
-
|
|
15951
|
+
configProfile: import_zod20.z.strictObject({ name: import_zod20.z.string().nullable(), source: import_zod20.z.enum(CONFIG_PROFILE_DECISION_SOURCES) }),
|
|
15952
|
+
layers: import_zod20.z.readonly(import_zod20.z.array(CheckLayerViewSchema)),
|
|
15953
|
+
entries: import_zod20.z.readonly(import_zod20.z.array(CheckEntryViewSchema)),
|
|
15954
|
+
projectEncodingAmbiguities: import_zod20.z.readonly(
|
|
15955
|
+
import_zod20.z.array(import_zod20.z.strictObject({ fragment: import_zod20.z.string(), encoded: import_zod20.z.string(), reason: import_zod20.z.enum(ENCODING_AMBIGUITY_REASONS), detail: import_zod20.z.string() }))
|
|
15792
15956
|
),
|
|
15793
|
-
diagnostics:
|
|
15957
|
+
diagnostics: import_zod20.z.readonly(import_zod20.z.array(CheckDiagnosticSchema)),
|
|
15794
15958
|
ambientCredential: CheckAmbientCredentialSchema,
|
|
15795
15959
|
keychain: CheckKeychainSchema.optional(),
|
|
15796
|
-
settingsExposure:
|
|
15960
|
+
settingsExposure: import_zod20.z.readonly(import_zod20.z.array(CheckSettingsExposureSchema)),
|
|
15797
15961
|
credential: CheckCredentialSchema,
|
|
15798
15962
|
claudeVersion: CheckClaudeVersionSchema.optional()
|
|
15799
15963
|
});
|
|
@@ -15853,28 +16017,28 @@ function collectResets(snapshots, nowMs) {
|
|
|
15853
16017
|
}
|
|
15854
16018
|
|
|
15855
16019
|
// src/usage/resetsSchema.ts
|
|
15856
|
-
var
|
|
15857
|
-
var ResetRowSchema =
|
|
15858
|
-
identity:
|
|
15859
|
-
provider:
|
|
16020
|
+
var import_zod21 = require("zod");
|
|
16021
|
+
var ResetRowSchema = import_zod21.z.strictObject({
|
|
16022
|
+
identity: import_zod21.z.string(),
|
|
16023
|
+
provider: import_zod21.z.string(),
|
|
15860
16024
|
/** What the window is: `5h`, `7d` or `extra usage` for an Anthropic account, or the provider's own measure and period (`tokens 5h`). */
|
|
15861
|
-
window:
|
|
16025
|
+
window: import_zod21.z.string(),
|
|
15862
16026
|
/** When the state the window comes from was observed, as an ISO instant. */
|
|
15863
|
-
observedAt:
|
|
16027
|
+
observedAt: import_zod21.z.iso.datetime(),
|
|
15864
16028
|
/** When the window resets, as an ISO instant; absent when the upstream reported none. */
|
|
15865
|
-
resetsAt:
|
|
16029
|
+
resetsAt: import_zod21.z.iso.datetime().optional(),
|
|
15866
16030
|
/** True when the reset time has passed, so the recorded observation describes a window that no longer exists and its utilisation reads as 0. */
|
|
15867
|
-
reset:
|
|
16031
|
+
reset: import_zod21.z.boolean(),
|
|
15868
16032
|
/** The fraction used, as `effectiveWindow` reads it at the report's own clock. */
|
|
15869
|
-
utilization:
|
|
16033
|
+
utilization: import_zod21.z.number().optional(),
|
|
15870
16034
|
/** The window's own status, for a window that has not reset yet. */
|
|
15871
|
-
status:
|
|
16035
|
+
status: import_zod21.z.string().optional()
|
|
15872
16036
|
});
|
|
15873
|
-
var ResetScheduleSchema =
|
|
16037
|
+
var ResetScheduleSchema = import_zod21.z.strictObject({ resets: import_zod21.z.readonly(import_zod21.z.array(ResetRowSchema)) });
|
|
15874
16038
|
|
|
15875
16039
|
// src/frontdoor/controlSchemas.ts
|
|
15876
16040
|
var import_node_path32 = __toESM(require("node:path"), 1);
|
|
15877
|
-
var
|
|
16041
|
+
var import_zod28 = require("zod");
|
|
15878
16042
|
|
|
15879
16043
|
// src/doctorReport.ts
|
|
15880
16044
|
init_claudeShim();
|
|
@@ -16054,24 +16218,24 @@ var import_node_path31 = __toESM(require("node:path"), 1);
|
|
|
16054
16218
|
init_signIn();
|
|
16055
16219
|
|
|
16056
16220
|
// src/codex/siwcStore.ts
|
|
16057
|
-
var
|
|
16221
|
+
var import_zod25 = require("zod");
|
|
16058
16222
|
|
|
16059
16223
|
// src/codex/auth.ts
|
|
16060
|
-
var
|
|
16061
|
-
var AuthFileSchema =
|
|
16062
|
-
tokens:
|
|
16063
|
-
access_token:
|
|
16064
|
-
refresh_token:
|
|
16065
|
-
id_token:
|
|
16066
|
-
account_id:
|
|
16224
|
+
var import_zod23 = require("zod");
|
|
16225
|
+
var AuthFileSchema = import_zod23.z.looseObject({
|
|
16226
|
+
tokens: import_zod23.z.looseObject({
|
|
16227
|
+
access_token: import_zod23.z.string().optional(),
|
|
16228
|
+
refresh_token: import_zod23.z.string().optional(),
|
|
16229
|
+
id_token: import_zod23.z.string().optional(),
|
|
16230
|
+
account_id: import_zod23.z.string().optional()
|
|
16067
16231
|
}).nullish(),
|
|
16068
|
-
last_refresh:
|
|
16232
|
+
last_refresh: import_zod23.z.string().optional()
|
|
16069
16233
|
});
|
|
16070
|
-
var TokenGrantSchema =
|
|
16071
|
-
access_token:
|
|
16072
|
-
refresh_token:
|
|
16073
|
-
id_token:
|
|
16074
|
-
account_id:
|
|
16234
|
+
var TokenGrantSchema = import_zod23.z.looseObject({
|
|
16235
|
+
access_token: import_zod23.z.string().min(1).optional(),
|
|
16236
|
+
refresh_token: import_zod23.z.string().min(1).optional(),
|
|
16237
|
+
id_token: import_zod23.z.string().min(1).optional(),
|
|
16238
|
+
account_id: import_zod23.z.string().min(1).optional()
|
|
16075
16239
|
});
|
|
16076
16240
|
var CodexAuthError = class extends Error {
|
|
16077
16241
|
constructor(message) {
|
|
@@ -16081,41 +16245,41 @@ var CodexAuthError = class extends Error {
|
|
|
16081
16245
|
};
|
|
16082
16246
|
|
|
16083
16247
|
// src/codex/siwc.ts
|
|
16084
|
-
var
|
|
16248
|
+
var import_zod24 = require("zod");
|
|
16085
16249
|
var SIWC_RESOURCE = "https://api.openai.com/v1";
|
|
16086
16250
|
var SIWC_RESPONSES_URL = `${SIWC_RESOURCE}/responses`;
|
|
16087
16251
|
var SIWC_PLAN_SCOPE = "chatgpt.tokens.use.direct";
|
|
16088
|
-
var TokenResponseSchema =
|
|
16089
|
-
access_token:
|
|
16090
|
-
refresh_token:
|
|
16091
|
-
id_token:
|
|
16092
|
-
expires_in:
|
|
16093
|
-
scope:
|
|
16252
|
+
var TokenResponseSchema = import_zod24.z.looseObject({
|
|
16253
|
+
access_token: import_zod24.z.string().min(1),
|
|
16254
|
+
refresh_token: import_zod24.z.string().min(1).optional(),
|
|
16255
|
+
id_token: import_zod24.z.string().min(1).optional(),
|
|
16256
|
+
expires_in: import_zod24.z.number().positive(),
|
|
16257
|
+
scope: import_zod24.z.string().optional()
|
|
16094
16258
|
});
|
|
16095
|
-
var JwtHeaderSchema =
|
|
16096
|
-
var IdTokenClaimsSchema =
|
|
16097
|
-
iss:
|
|
16098
|
-
sub:
|
|
16099
|
-
aud:
|
|
16100
|
-
exp:
|
|
16101
|
-
nonce:
|
|
16102
|
-
email:
|
|
16259
|
+
var JwtHeaderSchema = import_zod24.z.looseObject({ alg: import_zod24.z.string(), kid: import_zod24.z.string().optional() });
|
|
16260
|
+
var IdTokenClaimsSchema = import_zod24.z.looseObject({
|
|
16261
|
+
iss: import_zod24.z.string(),
|
|
16262
|
+
sub: import_zod24.z.string().min(1),
|
|
16263
|
+
aud: import_zod24.z.union([import_zod24.z.string(), import_zod24.z.array(import_zod24.z.string())]),
|
|
16264
|
+
exp: import_zod24.z.number(),
|
|
16265
|
+
nonce: import_zod24.z.string().optional(),
|
|
16266
|
+
email: import_zod24.z.string().optional()
|
|
16103
16267
|
});
|
|
16104
|
-
var JwksSchema =
|
|
16268
|
+
var JwksSchema = import_zod24.z.object({ keys: import_zod24.z.array(import_zod24.z.looseObject({ kid: import_zod24.z.string().optional(), kty: import_zod24.z.string() })) });
|
|
16105
16269
|
|
|
16106
16270
|
// src/codex/siwcStore.ts
|
|
16107
|
-
var SiwcGrantSchema =
|
|
16108
|
-
clientId:
|
|
16109
|
-
sub:
|
|
16110
|
-
email:
|
|
16111
|
-
idToken:
|
|
16112
|
-
accessToken:
|
|
16113
|
-
refreshToken:
|
|
16114
|
-
scopes:
|
|
16271
|
+
var SiwcGrantSchema = import_zod25.z.strictObject({
|
|
16272
|
+
clientId: import_zod25.z.string().min(1),
|
|
16273
|
+
sub: import_zod25.z.string().min(1),
|
|
16274
|
+
email: import_zod25.z.string().optional(),
|
|
16275
|
+
idToken: import_zod25.z.string().min(1),
|
|
16276
|
+
accessToken: import_zod25.z.string().min(1),
|
|
16277
|
+
refreshToken: import_zod25.z.string().min(1),
|
|
16278
|
+
scopes: import_zod25.z.array(import_zod25.z.string()).readonly(),
|
|
16115
16279
|
/** When the access token stops working, in milliseconds since the epoch. */
|
|
16116
|
-
expiresAt:
|
|
16280
|
+
expiresAt: import_zod25.z.number()
|
|
16117
16281
|
});
|
|
16118
|
-
var SiwcFileSchema =
|
|
16282
|
+
var SiwcFileSchema = import_zod25.z.strictObject({ registeredClientId: import_zod25.z.string().min(1).optional(), grant: SiwcGrantSchema.optional() });
|
|
16119
16283
|
function parseSiwcFile(raw, filePath) {
|
|
16120
16284
|
let json;
|
|
16121
16285
|
try {
|
|
@@ -17079,92 +17243,92 @@ function collectDoctorReport(params) {
|
|
|
17079
17243
|
// src/frontdoor/controlSchemas.ts
|
|
17080
17244
|
init_schema2();
|
|
17081
17245
|
init_state();
|
|
17082
|
-
var UsageListOutputSchema =
|
|
17083
|
-
var UsageWindowsInputSchema =
|
|
17084
|
-
identity:
|
|
17085
|
-
provider:
|
|
17246
|
+
var UsageListOutputSchema = import_zod28.z.strictObject({ snapshots: import_zod28.z.readonly(import_zod28.z.array(UsageSnapshotSchema)) });
|
|
17247
|
+
var UsageWindowsInputSchema = import_zod28.z.strictObject({
|
|
17248
|
+
identity: import_zod28.z.string().min(1),
|
|
17249
|
+
provider: import_zod28.z.string().min(1).optional()
|
|
17086
17250
|
});
|
|
17087
|
-
var EffectiveWindowSchema =
|
|
17251
|
+
var EffectiveWindowSchema = import_zod28.z.strictObject({
|
|
17088
17252
|
/** True when the window's reset time has passed, so the recorded observation describes a window that no longer exists. */
|
|
17089
|
-
reset:
|
|
17253
|
+
reset: import_zod28.z.boolean(),
|
|
17090
17254
|
/** The fraction used: 0 for a reset window, otherwise what was last observed, absent when none was reported. */
|
|
17091
|
-
utilization:
|
|
17255
|
+
utilization: import_zod28.z.number().optional(),
|
|
17092
17256
|
/** The reset instant, for a window that has not reset yet and reported one. */
|
|
17093
|
-
resetsAtMs:
|
|
17257
|
+
resetsAtMs: import_zod28.z.number().optional(),
|
|
17094
17258
|
/** The window's own status, for a window that has not reset yet. */
|
|
17095
|
-
status:
|
|
17259
|
+
status: import_zod28.z.string().optional()
|
|
17096
17260
|
});
|
|
17097
|
-
var UsageWindowsOutputSchema =
|
|
17098
|
-
identity:
|
|
17099
|
-
provider:
|
|
17261
|
+
var UsageWindowsOutputSchema = import_zod28.z.strictObject({
|
|
17262
|
+
identity: import_zod28.z.string(),
|
|
17263
|
+
provider: import_zod28.z.string(),
|
|
17100
17264
|
/** When the rate-limit state the windows come from was observed. */
|
|
17101
|
-
observedAt:
|
|
17265
|
+
observedAt: import_zod28.z.iso.datetime().optional(),
|
|
17102
17266
|
fiveHour: EffectiveWindowSchema.optional(),
|
|
17103
17267
|
sevenDay: EffectiveWindowSchema.optional()
|
|
17104
17268
|
});
|
|
17105
|
-
var UsageLiveOutputSchema =
|
|
17269
|
+
var UsageLiveOutputSchema = import_zod28.z.strictObject({
|
|
17106
17270
|
/** The freshest observation the door holds, never narrowed by the read's session filter because it is the door's single latest statement of the account's quota; absent while no rate_limit_event has been filed at all. */
|
|
17107
17271
|
latest: RcLiveRateLimitSchema.optional(),
|
|
17108
17272
|
/** One observation per session whose stream has filed a rate_limit_event this door generation. */
|
|
17109
|
-
sessions:
|
|
17273
|
+
sessions: import_zod28.z.readonly(import_zod28.z.array(RcLiveRateLimitSchema))
|
|
17110
17274
|
});
|
|
17111
|
-
var FrontDoorSessionStatusSchema =
|
|
17112
|
-
pid:
|
|
17113
|
-
startedAt:
|
|
17114
|
-
alive:
|
|
17275
|
+
var FrontDoorSessionStatusSchema = import_zod28.z.strictObject({
|
|
17276
|
+
pid: import_zod28.z.int().positive(),
|
|
17277
|
+
startedAt: import_zod28.z.number(),
|
|
17278
|
+
alive: import_zod28.z.boolean()
|
|
17115
17279
|
});
|
|
17116
|
-
var HeadroomSocketTargetSchema =
|
|
17117
|
-
var FrontDoorStatusOutputSchema =
|
|
17280
|
+
var HeadroomSocketTargetSchema = import_zod28.z.union([import_zod28.z.strictObject({ socketPath: import_zod28.z.string() }), import_zod28.z.strictObject({ refused: import_zod28.z.string() })]);
|
|
17281
|
+
var FrontDoorStatusOutputSchema = import_zod28.z.strictObject({
|
|
17118
17282
|
state: FrontDoorStateSchema,
|
|
17119
|
-
supervisorAlive:
|
|
17283
|
+
supervisorAlive: import_zod28.z.boolean(),
|
|
17120
17284
|
/** The pids of earlier doors that released their addresses and are finishing the connections they carried: running, but not serving anything new. */
|
|
17121
|
-
draining:
|
|
17122
|
-
sessions:
|
|
17285
|
+
draining: import_zod28.z.readonly(import_zod28.z.array(import_zod28.z.number().int().positive())),
|
|
17286
|
+
sessions: import_zod28.z.readonly(import_zod28.z.array(FrontDoorSessionStatusSchema)),
|
|
17123
17287
|
headroomSocket: HeadroomSocketTargetSchema.optional(),
|
|
17124
|
-
logPath:
|
|
17125
|
-
logExists:
|
|
17288
|
+
logPath: import_zod28.z.string(),
|
|
17289
|
+
logExists: import_zod28.z.boolean()
|
|
17126
17290
|
});
|
|
17127
|
-
var FrontDoorSessionsOutputSchema =
|
|
17128
|
-
var CheckRunInputSchema =
|
|
17129
|
-
path:
|
|
17130
|
-
identity:
|
|
17291
|
+
var FrontDoorSessionsOutputSchema = import_zod28.z.strictObject({ sessions: import_zod28.z.readonly(import_zod28.z.array(FrontDoorSessionStatusSchema)) });
|
|
17292
|
+
var CheckRunInputSchema = import_zod28.z.strictObject({
|
|
17293
|
+
path: import_zod28.z.string().min(1),
|
|
17294
|
+
identity: import_zod28.z.string().min(1).optional()
|
|
17131
17295
|
}).refine((input) => import_node_path32.default.isAbsolute(input.path), { message: "path must be absolute: the door cannot resolve a relative path against the caller's working directory" });
|
|
17132
|
-
var PoolPickInputSchema =
|
|
17133
|
-
pool:
|
|
17134
|
-
path:
|
|
17296
|
+
var PoolPickInputSchema = import_zod28.z.strictObject({
|
|
17297
|
+
pool: import_zod28.z.string().min(1),
|
|
17298
|
+
path: import_zod28.z.string().min(1)
|
|
17135
17299
|
}).refine((input) => import_node_path32.default.isAbsolute(input.path), { message: "path must be absolute: the door cannot resolve a relative path against the caller's working directory" });
|
|
17136
|
-
var DoctorFindingSchema =
|
|
17137
|
-
section:
|
|
17138
|
-
subject:
|
|
17139
|
-
severity:
|
|
17140
|
-
message:
|
|
17300
|
+
var DoctorFindingSchema = import_zod28.z.strictObject({
|
|
17301
|
+
section: import_zod28.z.enum(DOCTOR_SECTIONS),
|
|
17302
|
+
subject: import_zod28.z.string().optional(),
|
|
17303
|
+
severity: import_zod28.z.enum(DOCTOR_SEVERITIES),
|
|
17304
|
+
message: import_zod28.z.string()
|
|
17141
17305
|
});
|
|
17142
|
-
var DoctorRunOutputSchema =
|
|
17306
|
+
var DoctorRunOutputSchema = import_zod28.z.strictObject({
|
|
17143
17307
|
/** False exactly when any finding is a `fail`; a `warn` never fails the report on its own. */
|
|
17144
|
-
ok:
|
|
17145
|
-
findings:
|
|
17308
|
+
ok: import_zod28.z.boolean(),
|
|
17309
|
+
findings: import_zod28.z.readonly(import_zod28.z.array(DoctorFindingSchema))
|
|
17146
17310
|
});
|
|
17147
|
-
var FrontDoorRestartOutputSchema =
|
|
17148
|
-
action:
|
|
17149
|
-
previousPid:
|
|
17311
|
+
var FrontDoorRestartOutputSchema = import_zod28.z.strictObject({
|
|
17312
|
+
action: import_zod28.z.literal("restarting"),
|
|
17313
|
+
previousPid: import_zod28.z.int().positive()
|
|
17150
17314
|
});
|
|
17151
|
-
var UpdateCheckOutputSchema =
|
|
17152
|
-
current:
|
|
17153
|
-
latest:
|
|
17154
|
-
action:
|
|
17315
|
+
var UpdateCheckOutputSchema = import_zod28.z.strictObject({
|
|
17316
|
+
current: import_zod28.z.string(),
|
|
17317
|
+
latest: import_zod28.z.string(),
|
|
17318
|
+
action: import_zod28.z.enum(["current", "available", "updated"])
|
|
17155
17319
|
});
|
|
17156
|
-
var CodexSignInSchema =
|
|
17157
|
-
|
|
17158
|
-
|
|
17159
|
-
|
|
17320
|
+
var CodexSignInSchema = import_zod28.z.discriminatedUnion("state", [
|
|
17321
|
+
import_zod28.z.strictObject({ state: import_zod28.z.literal("none") }),
|
|
17322
|
+
import_zod28.z.strictObject({ state: import_zod28.z.literal("signed-in"), email: import_zod28.z.string().optional(), planScope: import_zod28.z.boolean(), accessTokenExpiresAt: import_zod28.z.number() }),
|
|
17323
|
+
import_zod28.z.strictObject({ state: import_zod28.z.literal("unreadable"), message: import_zod28.z.string() })
|
|
17160
17324
|
]);
|
|
17161
|
-
var CodexStatusOutputSchema =
|
|
17325
|
+
var CodexStatusOutputSchema = import_zod28.z.strictObject({
|
|
17162
17326
|
signIn: CodexSignInSchema,
|
|
17163
|
-
codexProviders:
|
|
17327
|
+
codexProviders: import_zod28.z.readonly(import_zod28.z.array(import_zod28.z.string()))
|
|
17164
17328
|
});
|
|
17165
|
-
var CodexLogoutOutputSchema =
|
|
17166
|
-
hadGrant:
|
|
17167
|
-
revoked:
|
|
17329
|
+
var CodexLogoutOutputSchema = import_zod28.z.strictObject({
|
|
17330
|
+
hadGrant: import_zod28.z.boolean(),
|
|
17331
|
+
revoked: import_zod28.z.boolean()
|
|
17168
17332
|
});
|
|
17169
17333
|
|
|
17170
17334
|
// src/frontdoor/codexApi.ts
|
|
@@ -17322,146 +17486,148 @@ init_identity();
|
|
|
17322
17486
|
init_providersStore();
|
|
17323
17487
|
|
|
17324
17488
|
// src/frontdoor/configSchemas.ts
|
|
17325
|
-
var
|
|
17489
|
+
var import_zod29 = require("zod");
|
|
17326
17490
|
init_schema();
|
|
17327
|
-
|
|
17328
|
-
var
|
|
17329
|
-
|
|
17330
|
-
|
|
17331
|
-
|
|
17332
|
-
cache: import_zod28.z.union([import_zod28.z.literal(false), CredentialCacheSchema]).optional()
|
|
17491
|
+
var RemovalConfirmationSchema = import_zod29.z.boolean();
|
|
17492
|
+
var CredentialWriteSchema = (targets) => import_zod29.z.strictObject({
|
|
17493
|
+
sources: import_zod29.z.array(RemoteCredentialSourceSchema).min(1).optional(),
|
|
17494
|
+
target: import_zod29.z.enum(targets).optional(),
|
|
17495
|
+
cache: import_zod29.z.union([import_zod29.z.literal(false), CredentialCacheSchema]).optional()
|
|
17333
17496
|
});
|
|
17334
|
-
var CredentialSummarySchema2 =
|
|
17335
|
-
target:
|
|
17336
|
-
sources:
|
|
17337
|
-
|
|
17338
|
-
|
|
17339
|
-
|
|
17340
|
-
|
|
17341
|
-
|
|
17342
|
-
|
|
17343
|
-
|
|
17497
|
+
var CredentialSummarySchema2 = import_zod29.z.strictObject({
|
|
17498
|
+
target: import_zod29.z.enum(CREDENTIAL_TARGETS),
|
|
17499
|
+
sources: import_zod29.z.readonly(import_zod29.z.array(
|
|
17500
|
+
import_zod29.z.discriminatedUnion("kind", [
|
|
17501
|
+
import_zod29.z.strictObject({ kind: import_zod29.z.literal("env"), variable: import_zod29.z.string() }),
|
|
17502
|
+
import_zod29.z.strictObject({ kind: import_zod29.z.literal("file"), path: import_zod29.z.string() }),
|
|
17503
|
+
import_zod29.z.strictObject({ kind: import_zod29.z.literal("command"), program: import_zod29.z.string() }),
|
|
17504
|
+
import_zod29.z.strictObject({ kind: import_zod29.z.literal("op"), reference: import_zod29.z.string() }),
|
|
17505
|
+
import_zod29.z.strictObject({ kind: import_zod29.z.literal("keychain"), service: import_zod29.z.string(), account: import_zod29.z.string().optional() }),
|
|
17506
|
+
import_zod29.z.strictObject({ kind: import_zod29.z.literal("literal") })
|
|
17344
17507
|
])
|
|
17345
17508
|
)),
|
|
17346
17509
|
cache: CredentialCacheSchema.optional()
|
|
17347
17510
|
});
|
|
17348
|
-
var mutationOutput = (kind, action) =>
|
|
17349
|
-
var storedMutationOutput = (kind, action, value) =>
|
|
17350
|
-
var IdentityValueSchema =
|
|
17351
|
-
name:
|
|
17352
|
-
defaultConfigProfile:
|
|
17353
|
-
allowAmbientCredential:
|
|
17511
|
+
var mutationOutput = (kind, action) => import_zod29.z.strictObject({ action: import_zod29.z.literal(action), kind: import_zod29.z.literal(kind), name: import_zod29.z.string() });
|
|
17512
|
+
var storedMutationOutput = (kind, action, value) => import_zod29.z.strictObject({ action: import_zod29.z.literal(action), kind: import_zod29.z.literal(kind), name: import_zod29.z.string(), value });
|
|
17513
|
+
var IdentityValueSchema = import_zod29.z.strictObject({
|
|
17514
|
+
name: import_zod29.z.string(),
|
|
17515
|
+
defaultConfigProfile: import_zod29.z.string().optional(),
|
|
17516
|
+
allowAmbientCredential: import_zod29.z.boolean(),
|
|
17354
17517
|
credential: CredentialSummarySchema2.optional(),
|
|
17355
|
-
anchors:
|
|
17518
|
+
anchors: import_zod29.z.array(AnchorSchema).optional()
|
|
17356
17519
|
});
|
|
17357
17520
|
var ProfileValueSchema = ConfigProfileSchema.omit({ $schema: true });
|
|
17358
|
-
var ProviderValueSchema =
|
|
17359
|
-
name:
|
|
17360
|
-
kind:
|
|
17361
|
-
displayName:
|
|
17362
|
-
baseUrl:
|
|
17521
|
+
var ProviderValueSchema = import_zod29.z.strictObject({
|
|
17522
|
+
name: import_zod29.z.string(),
|
|
17523
|
+
kind: import_zod29.z.enum(PROVIDER_KINDS),
|
|
17524
|
+
displayName: import_zod29.z.string(),
|
|
17525
|
+
baseUrl: import_zod29.z.string().optional(),
|
|
17363
17526
|
codex: CodexProviderConfigSchema.optional(),
|
|
17364
17527
|
credential: CredentialSummarySchema2.optional(),
|
|
17365
|
-
env:
|
|
17528
|
+
env: import_zod29.z.record(import_zod29.z.string(), import_zod29.z.string()).optional()
|
|
17366
17529
|
});
|
|
17367
|
-
var ConfigNameInputSchema =
|
|
17530
|
+
var ConfigNameInputSchema = import_zod29.z.strictObject({ name: import_zod29.z.string().min(1) });
|
|
17368
17531
|
var ConfigIdentityAddOutputSchema = storedMutationOutput("identity", "created", IdentityValueSchema);
|
|
17369
|
-
var ConfigIdentitySetInputSchema =
|
|
17370
|
-
name:
|
|
17371
|
-
defaultConfigProfile:
|
|
17372
|
-
allowAmbientCredential:
|
|
17373
|
-
credential:
|
|
17532
|
+
var ConfigIdentitySetInputSchema = import_zod29.z.strictObject({
|
|
17533
|
+
name: import_zod29.z.string().min(1),
|
|
17534
|
+
defaultConfigProfile: import_zod29.z.union([import_zod29.z.string().min(1), import_zod29.z.literal(false)]).optional(),
|
|
17535
|
+
allowAmbientCredential: import_zod29.z.boolean().optional(),
|
|
17536
|
+
credential: import_zod29.z.union([import_zod29.z.literal(false), CredentialWriteSchema(CREDENTIAL_TARGETS)]).optional(),
|
|
17374
17537
|
/** `false` removes the anchors; a list replaces them. */
|
|
17375
|
-
anchors:
|
|
17538
|
+
anchors: import_zod29.z.union([import_zod29.z.literal(false), import_zod29.z.array(AnchorSchema).min(1)]).optional()
|
|
17376
17539
|
});
|
|
17377
17540
|
var ConfigIdentitySetOutputSchema = storedMutationOutput("identity", "updated", IdentityValueSchema);
|
|
17378
|
-
var ConfigIdentityRemoveInputSchema =
|
|
17541
|
+
var ConfigIdentityRemoveInputSchema = import_zod29.z.strictObject({ name: import_zod29.z.string().min(1), confirm: RemovalConfirmationSchema });
|
|
17379
17542
|
var ConfigIdentityRemoveOutputSchema = mutationOutput("identity", "removed");
|
|
17380
17543
|
var ConfigIdentityUseOutputSchema = mutationOutput("identity", "selected");
|
|
17381
|
-
var ConfigProfileAddInputSchema =
|
|
17382
|
-
name:
|
|
17383
|
-
extends:
|
|
17384
|
-
description:
|
|
17544
|
+
var ConfigProfileAddInputSchema = import_zod29.z.strictObject({
|
|
17545
|
+
name: import_zod29.z.string().min(1),
|
|
17546
|
+
extends: import_zod29.z.array(import_zod29.z.string().min(1)).optional(),
|
|
17547
|
+
description: import_zod29.z.string().optional()
|
|
17385
17548
|
});
|
|
17386
17549
|
var ConfigProfileAddOutputSchema = storedMutationOutput("profile", "created", ProfileValueSchema);
|
|
17387
|
-
var ConfigProfileSetInputSchema =
|
|
17388
|
-
name:
|
|
17389
|
-
category:
|
|
17390
|
-
entry:
|
|
17391
|
-
extends:
|
|
17392
|
-
description:
|
|
17393
|
-
launch:
|
|
17394
|
-
skipPermissions:
|
|
17395
|
-
remoteControl:
|
|
17396
|
-
headroom:
|
|
17397
|
-
trackUsage:
|
|
17398
|
-
provider:
|
|
17399
|
-
claudeVersion:
|
|
17400
|
-
delay:
|
|
17401
|
-
pause:
|
|
17402
|
-
explain:
|
|
17403
|
-
proxyBypass:
|
|
17404
|
-
statusline:
|
|
17550
|
+
var ConfigProfileSetInputSchema = import_zod29.z.strictObject({
|
|
17551
|
+
name: import_zod29.z.string().min(1),
|
|
17552
|
+
category: import_zod29.z.record(import_zod29.z.string(), import_zod29.z.boolean()).optional(),
|
|
17553
|
+
entry: import_zod29.z.record(import_zod29.z.string(), import_zod29.z.boolean()).optional(),
|
|
17554
|
+
extends: import_zod29.z.union([import_zod29.z.array(import_zod29.z.string().min(1)), import_zod29.z.literal(false)]).optional(),
|
|
17555
|
+
description: import_zod29.z.union([import_zod29.z.string(), import_zod29.z.literal(false)]).optional(),
|
|
17556
|
+
launch: import_zod29.z.strictObject({
|
|
17557
|
+
skipPermissions: import_zod29.z.boolean().optional(),
|
|
17558
|
+
remoteControl: import_zod29.z.boolean().optional(),
|
|
17559
|
+
headroom: import_zod29.z.boolean().optional(),
|
|
17560
|
+
trackUsage: import_zod29.z.boolean().optional(),
|
|
17561
|
+
provider: import_zod29.z.union([import_zod29.z.string().min(1), import_zod29.z.literal(false)]).optional(),
|
|
17562
|
+
claudeVersion: import_zod29.z.union([import_zod29.z.string().min(1), import_zod29.z.literal(false)]).optional(),
|
|
17563
|
+
delay: import_zod29.z.union([import_zod29.z.string().regex(DURATION_RE), import_zod29.z.literal(false)]).optional(),
|
|
17564
|
+
pause: import_zod29.z.boolean().optional(),
|
|
17565
|
+
explain: import_zod29.z.boolean().optional(),
|
|
17566
|
+
proxyBypass: import_zod29.z.union([import_zod29.z.array(import_zod29.z.string().min(1)), import_zod29.z.literal(false)]).optional(),
|
|
17567
|
+
statusline: import_zod29.z.strictObject({
|
|
17568
|
+
set: import_zod29.z.record(import_zod29.z.string(), import_zod29.z.unknown()).optional(),
|
|
17569
|
+
unset: import_zod29.z.array(import_zod29.z.string()).optional()
|
|
17570
|
+
}).optional()
|
|
17405
17571
|
}).optional()
|
|
17406
17572
|
});
|
|
17407
17573
|
var ConfigProfileSetOutputSchema = storedMutationOutput("profile", "updated", ProfileValueSchema);
|
|
17408
|
-
var ConfigProfileRemoveInputSchema =
|
|
17574
|
+
var ConfigProfileRemoveInputSchema = import_zod29.z.strictObject({ name: import_zod29.z.string().min(1), confirm: RemovalConfirmationSchema });
|
|
17409
17575
|
var ConfigProfileRemoveOutputSchema = mutationOutput("profile", "removed");
|
|
17410
17576
|
var ConfigProfileUseOutputSchema = mutationOutput("profile", "selected");
|
|
17411
|
-
var PoolMembersInputSchema =
|
|
17412
|
-
var ConfigPoolAddInputSchema =
|
|
17413
|
-
name:
|
|
17577
|
+
var PoolMembersInputSchema = import_zod29.z.array(import_zod29.z.string().min(1)).min(1);
|
|
17578
|
+
var ConfigPoolAddInputSchema = import_zod29.z.strictObject({
|
|
17579
|
+
name: import_zod29.z.string().min(1),
|
|
17414
17580
|
identities: PoolMembersInputSchema,
|
|
17415
|
-
preference:
|
|
17416
|
-
resumeOnLimit:
|
|
17417
|
-
compactBeforeLimit:
|
|
17581
|
+
preference: import_zod29.z.enum(POOL_PREFERENCES).optional(),
|
|
17582
|
+
resumeOnLimit: import_zod29.z.boolean().optional(),
|
|
17583
|
+
compactBeforeLimit: import_zod29.z.boolean().optional(),
|
|
17418
17584
|
compactAtUtilisation: CompactAtUtilisationSchema.optional()
|
|
17419
17585
|
});
|
|
17420
17586
|
var ConfigPoolAddOutputSchema = storedMutationOutput("pool", "created", PoolSchema);
|
|
17421
|
-
var ConfigPoolSetInputSchema =
|
|
17422
|
-
name:
|
|
17587
|
+
var ConfigPoolSetInputSchema = import_zod29.z.strictObject({
|
|
17588
|
+
name: import_zod29.z.string().min(1),
|
|
17423
17589
|
identities: PoolMembersInputSchema.optional(),
|
|
17424
|
-
preference:
|
|
17425
|
-
resumeOnLimit:
|
|
17426
|
-
compactBeforeLimit:
|
|
17427
|
-
compactAtUtilisation:
|
|
17590
|
+
preference: import_zod29.z.union([import_zod29.z.enum(POOL_PREFERENCES), import_zod29.z.literal(false)]).optional(),
|
|
17591
|
+
resumeOnLimit: import_zod29.z.boolean().optional(),
|
|
17592
|
+
compactBeforeLimit: import_zod29.z.boolean().optional(),
|
|
17593
|
+
compactAtUtilisation: import_zod29.z.union([CompactAtUtilisationSchema, import_zod29.z.literal(false)]).optional()
|
|
17428
17594
|
});
|
|
17429
17595
|
var ConfigPoolSetOutputSchema = storedMutationOutput("pool", "updated", PoolSchema);
|
|
17430
|
-
var ConfigPoolRemoveInputSchema =
|
|
17596
|
+
var ConfigPoolRemoveInputSchema = import_zod29.z.strictObject({ name: import_zod29.z.string().min(1), confirm: RemovalConfirmationSchema });
|
|
17431
17597
|
var ConfigPoolRemoveOutputSchema = mutationOutput("pool", "removed");
|
|
17432
17598
|
var ConfigPoolUseOutputSchema = mutationOutput("pool", "selected");
|
|
17433
|
-
var ConfigProviderAddInputSchema =
|
|
17434
|
-
name:
|
|
17435
|
-
kind:
|
|
17436
|
-
displayName:
|
|
17437
|
-
baseUrl:
|
|
17599
|
+
var ConfigProviderAddInputSchema = import_zod29.z.strictObject({
|
|
17600
|
+
name: import_zod29.z.string().min(1),
|
|
17601
|
+
kind: import_zod29.z.enum(PROVIDER_KINDS).optional(),
|
|
17602
|
+
displayName: import_zod29.z.string().min(1),
|
|
17603
|
+
baseUrl: import_zod29.z.string().min(1).optional(),
|
|
17438
17604
|
credential: CredentialWriteSchema(PROVIDER_CREDENTIAL_TARGETS).required({ sources: true }),
|
|
17439
17605
|
codex: CodexProviderConfigSchema.optional()
|
|
17440
17606
|
});
|
|
17441
17607
|
var ConfigProviderAddOutputSchema = storedMutationOutput("provider", "created", ProviderValueSchema);
|
|
17442
|
-
var ConfigProviderSetInputSchema =
|
|
17443
|
-
name:
|
|
17444
|
-
displayName:
|
|
17445
|
-
baseUrl:
|
|
17608
|
+
var ConfigProviderSetInputSchema = import_zod29.z.strictObject({
|
|
17609
|
+
name: import_zod29.z.string().min(1),
|
|
17610
|
+
displayName: import_zod29.z.string().min(1).optional(),
|
|
17611
|
+
baseUrl: import_zod29.z.string().min(1).optional(),
|
|
17446
17612
|
credential: CredentialWriteSchema(PROVIDER_CREDENTIAL_TARGETS).optional(),
|
|
17447
17613
|
codex: CodexProviderConfigSchema.optional()
|
|
17448
17614
|
});
|
|
17449
17615
|
var ConfigProviderSetOutputSchema = storedMutationOutput("provider", "updated", ProviderValueSchema);
|
|
17450
|
-
var ConfigProviderRemoveInputSchema =
|
|
17616
|
+
var ConfigProviderRemoveInputSchema = import_zod29.z.strictObject({ name: import_zod29.z.string().min(1), confirm: RemovalConfirmationSchema });
|
|
17451
17617
|
var ConfigProviderRemoveOutputSchema = mutationOutput("provider", "removed");
|
|
17452
|
-
var ConfigRuleAddInputSchema =
|
|
17453
|
-
path:
|
|
17454
|
-
configProfile:
|
|
17455
|
-
identity:
|
|
17618
|
+
var ConfigRuleAddInputSchema = import_zod29.z.strictObject({
|
|
17619
|
+
path: import_zod29.z.string().min(1),
|
|
17620
|
+
configProfile: import_zod29.z.string().min(1).optional(),
|
|
17621
|
+
identity: import_zod29.z.string().min(1).optional()
|
|
17456
17622
|
});
|
|
17457
17623
|
var ConfigRuleAddOutputSchema = storedMutationOutput("rule", "created", DirectoryRuleSchema);
|
|
17458
|
-
var ConfigRuleSetInputSchema =
|
|
17459
|
-
path:
|
|
17460
|
-
configProfile:
|
|
17461
|
-
identity:
|
|
17624
|
+
var ConfigRuleSetInputSchema = import_zod29.z.strictObject({
|
|
17625
|
+
path: import_zod29.z.string().min(1),
|
|
17626
|
+
configProfile: import_zod29.z.union([import_zod29.z.string().min(1), import_zod29.z.literal(false)]).optional(),
|
|
17627
|
+
identity: import_zod29.z.union([import_zod29.z.string().min(1), import_zod29.z.literal(false)]).optional()
|
|
17462
17628
|
});
|
|
17463
17629
|
var ConfigRuleSetOutputSchema = storedMutationOutput("rule", "updated", DirectoryRuleSchema);
|
|
17464
|
-
var ConfigRuleRemoveInputSchema =
|
|
17630
|
+
var ConfigRuleRemoveInputSchema = import_zod29.z.strictObject({ path: import_zod29.z.string().min(1), confirm: RemovalConfirmationSchema });
|
|
17465
17631
|
var ConfigRuleRemoveOutputSchema = mutationOutput("rule", "removed");
|
|
17466
17632
|
|
|
17467
17633
|
// src/frontdoor/configApi.ts
|
|
@@ -17774,43 +17940,43 @@ var import_openapi4 = require("@orpc/openapi");
|
|
|
17774
17940
|
var import_server3 = require("@orpc/server");
|
|
17775
17941
|
|
|
17776
17942
|
// src/frontdoor/eventSchemas.ts
|
|
17777
|
-
var
|
|
17943
|
+
var import_zod30 = require("zod");
|
|
17778
17944
|
var DOOR_EVENT_SOURCE_RC = "rc";
|
|
17779
17945
|
var LAUNCH_EVENT_SOURCE = "launch";
|
|
17780
17946
|
var USAGE_EVENT_SOURCE = "usage";
|
|
17781
17947
|
var DOOR_HEALTH_EVENT_SOURCE = "door";
|
|
17782
17948
|
var QUOTA_EXPIRING_EVENT_SOURCE = "quota-expiring";
|
|
17783
|
-
var DoorEventSchema =
|
|
17784
|
-
source:
|
|
17949
|
+
var DoorEventSchema = import_zod30.z.strictObject({
|
|
17950
|
+
source: import_zod30.z.string().min(1),
|
|
17785
17951
|
/** A positive integer because the backbone's counters start at one and only ever increase. */
|
|
17786
|
-
sequence:
|
|
17787
|
-
payload:
|
|
17952
|
+
sequence: import_zod30.z.number().int().positive(),
|
|
17953
|
+
payload: import_zod30.z.unknown()
|
|
17788
17954
|
});
|
|
17789
|
-
var DoorEventSourceQuerySchema =
|
|
17790
|
-
sources:
|
|
17955
|
+
var DoorEventSourceQuerySchema = import_zod30.z.strictObject({
|
|
17956
|
+
sources: import_zod30.z.array(import_zod30.z.string().min(1)).min(1).optional()
|
|
17791
17957
|
});
|
|
17792
|
-
var LaunchLifecycleEventSchema =
|
|
17793
|
-
kind:
|
|
17794
|
-
pid:
|
|
17795
|
-
startedAt:
|
|
17796
|
-
observedAt:
|
|
17958
|
+
var LaunchLifecycleEventSchema = import_zod30.z.strictObject({
|
|
17959
|
+
kind: import_zod30.z.enum(["registered", "pruned", "ended"]),
|
|
17960
|
+
pid: import_zod30.z.number().int().positive(),
|
|
17961
|
+
startedAt: import_zod30.z.number(),
|
|
17962
|
+
observedAt: import_zod30.z.number()
|
|
17797
17963
|
});
|
|
17798
|
-
var DoorHealthEventSchema =
|
|
17799
|
-
|
|
17800
|
-
|
|
17801
|
-
|
|
17802
|
-
|
|
17803
|
-
|
|
17804
|
-
|
|
17964
|
+
var DoorHealthEventSchema = import_zod30.z.discriminatedUnion("kind", [
|
|
17965
|
+
import_zod30.z.strictObject({ kind: import_zod30.z.literal("generation"), pid: import_zod30.z.number().int().positive(), providerPort: import_zod30.z.number().int().positive(), connectPort: import_zod30.z.number().int().positive(), directPort: import_zod30.z.number().int().positive(), observedAt: import_zod30.z.number() }),
|
|
17966
|
+
import_zod30.z.strictObject({ kind: import_zod30.z.literal("listenerFailed"), pid: import_zod30.z.number().int().positive(), listener: import_zod30.z.enum(["provider", "connect", "direct"]), message: import_zod30.z.string(), observedAt: import_zod30.z.number() }),
|
|
17967
|
+
import_zod30.z.strictObject({ kind: import_zod30.z.literal("binaryTurnover"), pid: import_zod30.z.number().int().positive(), observedAt: import_zod30.z.number() }),
|
|
17968
|
+
import_zod30.z.strictObject({ kind: import_zod30.z.literal("idleShutdown"), pid: import_zod30.z.number().int().positive(), observedAt: import_zod30.z.number() }),
|
|
17969
|
+
import_zod30.z.strictObject({ kind: import_zod30.z.literal("superseded"), pid: import_zod30.z.number().int().positive(), ownerPid: import_zod30.z.number().int().positive(), observedAt: import_zod30.z.number() }),
|
|
17970
|
+
import_zod30.z.strictObject({ kind: import_zod30.z.literal("drained"), pid: import_zod30.z.number().int().positive(), observedAt: import_zod30.z.number() })
|
|
17805
17971
|
]);
|
|
17806
|
-
var QuotaExpiringEventSchema =
|
|
17807
|
-
identity:
|
|
17808
|
-
provider:
|
|
17809
|
-
window:
|
|
17972
|
+
var QuotaExpiringEventSchema = import_zod30.z.strictObject({
|
|
17973
|
+
identity: import_zod30.z.string().min(1),
|
|
17974
|
+
provider: import_zod30.z.string().min(1),
|
|
17975
|
+
window: import_zod30.z.enum(["fiveHour", "sevenDay"]),
|
|
17810
17976
|
/** The fraction of the window already used when it was seen expiring, always below one because a fully used window has nothing left to spend. */
|
|
17811
|
-
utilization:
|
|
17812
|
-
resetsAt:
|
|
17813
|
-
observedAt:
|
|
17977
|
+
utilization: import_zod30.z.number().min(0).max(1),
|
|
17978
|
+
resetsAt: import_zod30.z.iso.datetime(),
|
|
17979
|
+
observedAt: import_zod30.z.number()
|
|
17814
17980
|
});
|
|
17815
17981
|
|
|
17816
17982
|
// src/frontdoor/eventsApi.ts
|
|
@@ -17894,60 +18060,60 @@ init_cliError();
|
|
|
17894
18060
|
|
|
17895
18061
|
// src/frontdoor/launchSchemas.ts
|
|
17896
18062
|
var import_node_path33 = __toESM(require("node:path"), 1);
|
|
17897
|
-
var
|
|
18063
|
+
var import_zod31 = require("zod");
|
|
17898
18064
|
init_statusline();
|
|
17899
18065
|
init_claudeVersion();
|
|
17900
18066
|
init_identity();
|
|
17901
|
-
var LaunchResolveInputSchema =
|
|
17902
|
-
path:
|
|
18067
|
+
var LaunchResolveInputSchema = import_zod31.z.strictObject({
|
|
18068
|
+
path: import_zod31.z.string().min(1),
|
|
17903
18069
|
/** `@name`, launch flags, then the arguments for `claude`; empty for a bare launch. */
|
|
17904
|
-
argv:
|
|
18070
|
+
argv: import_zod31.z.readonly(import_zod31.z.array(import_zod31.z.string())).optional(),
|
|
17905
18071
|
/** The launch's inherited environment. Absent means an empty one: the door's own environment is never a substitute for the caller's, so a caller that wants `AGENT_SHIM_*` switches or a `CLAUDE_CONFIG_DIR` considered names them here. Values are read, never reported. */
|
|
17906
|
-
env:
|
|
18072
|
+
env: import_zod31.z.record(import_zod31.z.string(), import_zod31.z.string()).optional()
|
|
17907
18073
|
}).refine((input) => import_node_path33.default.isAbsolute(input.path), { message: "path must be absolute: the door cannot resolve a relative path against the caller's working directory" });
|
|
17908
|
-
var LaunchPoolDecisionSchema =
|
|
17909
|
-
name:
|
|
17910
|
-
reasons:
|
|
17911
|
-
movedOff:
|
|
18074
|
+
var LaunchPoolDecisionSchema = import_zod31.z.strictObject({
|
|
18075
|
+
name: import_zod31.z.string(),
|
|
18076
|
+
reasons: import_zod31.z.readonly(import_zod31.z.array(import_zod31.z.string())),
|
|
18077
|
+
movedOff: import_zod31.z.strictObject({ identity: import_zod31.z.string(), reason: import_zod31.z.string() }).optional()
|
|
17912
18078
|
});
|
|
17913
|
-
var LaunchDecisionSchema =
|
|
17914
|
-
identity:
|
|
17915
|
-
identitySource:
|
|
18079
|
+
var LaunchDecisionSchema = import_zod31.z.strictObject({
|
|
18080
|
+
identity: import_zod31.z.string().optional(),
|
|
18081
|
+
identitySource: import_zod31.z.enum(IDENTITY_DECISION_SOURCES),
|
|
17916
18082
|
pool: LaunchPoolDecisionSchema.optional(),
|
|
17917
|
-
configDirEscapeHatch:
|
|
17918
|
-
configDir:
|
|
17919
|
-
configProfile:
|
|
17920
|
-
configProfileSource:
|
|
17921
|
-
provider:
|
|
18083
|
+
configDirEscapeHatch: import_zod31.z.boolean(),
|
|
18084
|
+
configDir: import_zod31.z.string().optional(),
|
|
18085
|
+
configProfile: import_zod31.z.string().optional(),
|
|
18086
|
+
configProfileSource: import_zod31.z.enum(CONFIG_PROFILE_DECISION_SOURCES),
|
|
18087
|
+
provider: import_zod31.z.string().optional()
|
|
17922
18088
|
});
|
|
17923
|
-
var LaunchFlagsSchema =
|
|
17924
|
-
skipPermissions:
|
|
17925
|
-
remoteControl:
|
|
17926
|
-
headroom:
|
|
17927
|
-
trackUsage:
|
|
17928
|
-
pause:
|
|
17929
|
-
explain:
|
|
18089
|
+
var LaunchFlagsSchema = import_zod31.z.strictObject({
|
|
18090
|
+
skipPermissions: import_zod31.z.boolean(),
|
|
18091
|
+
remoteControl: import_zod31.z.boolean(),
|
|
18092
|
+
headroom: import_zod31.z.boolean(),
|
|
18093
|
+
trackUsage: import_zod31.z.boolean(),
|
|
18094
|
+
pause: import_zod31.z.boolean(),
|
|
18095
|
+
explain: import_zod31.z.boolean(),
|
|
17930
18096
|
/** How long the launch waits after its own output before it starts claude, in milliseconds. */
|
|
17931
|
-
delayMs:
|
|
18097
|
+
delayMs: import_zod31.z.number(),
|
|
17932
18098
|
/** The hosts the launch keeps off the front door by adding them to the child's `NO_PROXY`. */
|
|
17933
|
-
proxyBypass:
|
|
18099
|
+
proxyBypass: import_zod31.z.array(import_zod31.z.string()).readonly(),
|
|
17934
18100
|
/** How the session's built-in statusline looks, when the launch configures any of it. */
|
|
17935
18101
|
statusline: StatuslineSchema.optional()
|
|
17936
18102
|
});
|
|
17937
|
-
var LaunchResolveOutputSchema =
|
|
18103
|
+
var LaunchResolveOutputSchema = import_zod31.z.strictObject({
|
|
17938
18104
|
decision: LaunchDecisionSchema,
|
|
17939
18105
|
flags: LaunchFlagsSchema,
|
|
17940
|
-
claudeVersion:
|
|
18106
|
+
claudeVersion: import_zod31.z.strictObject({ version: import_zod31.z.string(), source: import_zod31.z.enum(CLAUDE_VERSION_SOURCES) }).optional(),
|
|
17941
18107
|
/** The real `claude` binary the launch would spawn, on the door's host. */
|
|
17942
|
-
bin:
|
|
18108
|
+
bin: import_zod31.z.string(),
|
|
17943
18109
|
/** The arguments the launch would pass it: the tool's own flags, then `CLAUDE_EXTRA_FLAGS`, then the caller's own. */
|
|
17944
|
-
args:
|
|
18110
|
+
args: import_zod31.z.readonly(import_zod31.z.array(import_zod31.z.string())),
|
|
17945
18111
|
/** The credential the launch would authenticate with, by target and source kinds. Absent when none applies. */
|
|
17946
|
-
credential:
|
|
17947
|
-
routing:
|
|
18112
|
+
credential: import_zod31.z.strictObject({ subject: import_zod31.z.enum(["provider", "identity"]), name: import_zod31.z.string(), summary: CredentialSummarySchema }).optional(),
|
|
18113
|
+
routing: import_zod31.z.strictObject({ frontDoor: import_zod31.z.boolean(), headroom: import_zod31.z.boolean() }),
|
|
17948
18114
|
/** The names of the environment variables the launch would set or unset, sorted. Values are not reported. */
|
|
17949
|
-
environment:
|
|
17950
|
-
warnings:
|
|
18115
|
+
environment: import_zod31.z.readonly(import_zod31.z.array(import_zod31.z.string())),
|
|
18116
|
+
warnings: import_zod31.z.readonly(import_zod31.z.array(import_zod31.z.string()))
|
|
17951
18117
|
});
|
|
17952
18118
|
|
|
17953
18119
|
// src/frontdoor/launchApi.ts
|
|
@@ -17983,22 +18149,22 @@ function createLaunchApiRouter(deps) {
|
|
|
17983
18149
|
// src/frontdoor/agentTreesApi.ts
|
|
17984
18150
|
var import_client6 = require("@orpc/client");
|
|
17985
18151
|
var import_openapi7 = require("@orpc/openapi");
|
|
17986
|
-
var
|
|
18152
|
+
var import_zod32 = require("zod");
|
|
17987
18153
|
init_cliError();
|
|
17988
|
-
var AgentTreesListInputSchema =
|
|
18154
|
+
var AgentTreesListInputSchema = import_zod32.z.strictObject({
|
|
17989
18155
|
/** Only this identity's sessions. */
|
|
17990
|
-
identity:
|
|
18156
|
+
identity: import_zod32.z.string().optional(),
|
|
17991
18157
|
/** Include sessions that spawned no agent and ran no workflow. */
|
|
17992
|
-
all:
|
|
18158
|
+
all: import_zod32.z.boolean().optional()
|
|
17993
18159
|
});
|
|
17994
|
-
var AgentTreesListOutputSchema =
|
|
17995
|
-
var AgentTreesShowInputSchema =
|
|
18160
|
+
var AgentTreesListOutputSchema = import_zod32.z.array(SessionSummarySchema);
|
|
18161
|
+
var AgentTreesShowInputSchema = import_zod32.z.strictObject({
|
|
17996
18162
|
/** A session id, or an unambiguous prefix of one. */
|
|
17997
|
-
session:
|
|
18163
|
+
session: import_zod32.z.string().min(1),
|
|
17998
18164
|
/** Look only in this identity. */
|
|
17999
|
-
identity:
|
|
18165
|
+
identity: import_zod32.z.string().optional()
|
|
18000
18166
|
});
|
|
18001
|
-
var AgentTreesShowOutputSchema =
|
|
18167
|
+
var AgentTreesShowOutputSchema = import_zod32.z.strictObject({ identities: import_zod32.z.array(import_zod32.z.string()), ...MergedAgentTreeSchema.shape });
|
|
18002
18168
|
function asBadRequest(error) {
|
|
18003
18169
|
if (error instanceof CliError) {
|
|
18004
18170
|
throw new import_client6.ORPCError("BAD_REQUEST", { message: error.message });
|
|
@@ -20191,7 +20357,7 @@ init_poolPick();
|
|
|
20191
20357
|
|
|
20192
20358
|
// src/agents/read.ts
|
|
20193
20359
|
var import_node_path35 = __toESM(require("node:path"), 1);
|
|
20194
|
-
var
|
|
20360
|
+
var import_zod33 = require("zod");
|
|
20195
20361
|
var PROJECTS_DIR = "projects";
|
|
20196
20362
|
var TASKS_DIR = "tasks";
|
|
20197
20363
|
var SUBAGENTS_DIR = "subagents";
|
|
@@ -20310,14 +20476,14 @@ function parseJson2(text) {
|
|
|
20310
20476
|
return void 0;
|
|
20311
20477
|
}
|
|
20312
20478
|
}
|
|
20313
|
-
var TaskFileSchema =
|
|
20314
|
-
var WorkflowRunFileSchema =
|
|
20315
|
-
runId:
|
|
20316
|
-
workflowName:
|
|
20317
|
-
status:
|
|
20318
|
-
startTime:
|
|
20319
|
-
phases:
|
|
20320
|
-
summary:
|
|
20479
|
+
var TaskFileSchema = import_zod33.z.object({ ...TaskItemSchema.omit({ taskList: true }).shape, blocks: import_zod33.z.array(import_zod33.z.string()).default([]), blockedBy: import_zod33.z.array(import_zod33.z.string()).default([]) });
|
|
20480
|
+
var WorkflowRunFileSchema = import_zod33.z.object({
|
|
20481
|
+
runId: import_zod33.z.string(),
|
|
20482
|
+
workflowName: import_zod33.z.string().optional(),
|
|
20483
|
+
status: import_zod33.z.string().optional(),
|
|
20484
|
+
startTime: import_zod33.z.number().optional(),
|
|
20485
|
+
phases: import_zod33.z.array(import_zod33.z.object({ title: import_zod33.z.string() })).default([]),
|
|
20486
|
+
summary: import_zod33.z.string().optional()
|
|
20321
20487
|
});
|
|
20322
20488
|
function summariseSession(fs14, configDir, ref) {
|
|
20323
20489
|
const sessionRelative = import_node_path35.default.join(PROJECTS_DIR, ref.project, ref.entry);
|