claudish 7.35.0 → 7.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +163 -100
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -651,7 +651,7 @@ var init_onepassword_config = __esm(() => {
|
|
|
651
651
|
});
|
|
652
652
|
|
|
653
653
|
// src/version.ts
|
|
654
|
-
var VERSION = "7.
|
|
654
|
+
var VERSION = "7.36.0";
|
|
655
655
|
|
|
656
656
|
// src/logger.ts
|
|
657
657
|
var exports_logger = {};
|
|
@@ -4611,9 +4611,12 @@ var OP_REF_RE, opHydratedVars, opSourceFailures, ENV_VAR_NAME_RE, sdkClientCache
|
|
|
4611
4611
|
} catch {
|
|
4612
4612
|
return false;
|
|
4613
4613
|
}
|
|
4614
|
-
}, screenLockProbe, defaultAppLockProbe = () => false, appLockProbe, defaultOpAccountLister = () => {
|
|
4614
|
+
}, screenLockProbe, defaultAppLockProbe = () => false, appLockProbe, OP_PROBE_TIMEOUT_MS = 5000, defaultOpAccountLister = () => {
|
|
4615
4615
|
try {
|
|
4616
|
-
const res = spawnSync("op", ["account", "list", "--format=json"], {
|
|
4616
|
+
const res = spawnSync("op", ["account", "list", "--format=json"], {
|
|
4617
|
+
encoding: "utf-8",
|
|
4618
|
+
timeout: OP_PROBE_TIMEOUT_MS
|
|
4619
|
+
});
|
|
4617
4620
|
if (res.error || res.status !== 0)
|
|
4618
4621
|
return null;
|
|
4619
4622
|
const parsed = JSON.parse(res.stdout ?? "");
|
|
@@ -4639,7 +4642,10 @@ var OP_REF_RE, opHydratedVars, opSourceFailures, ENV_VAR_NAME_RE, sdkClientCache
|
|
|
4639
4642
|
}
|
|
4640
4643
|
}, defaultOpDefaultAccountProbe = () => {
|
|
4641
4644
|
try {
|
|
4642
|
-
const res = spawnSync("op", ["account", "get", "--format=json"], {
|
|
4645
|
+
const res = spawnSync("op", ["account", "get", "--format=json"], {
|
|
4646
|
+
encoding: "utf-8",
|
|
4647
|
+
timeout: OP_PROBE_TIMEOUT_MS
|
|
4648
|
+
});
|
|
4643
4649
|
if (res.error || res.status !== 0)
|
|
4644
4650
|
return null;
|
|
4645
4651
|
const parsed = JSON.parse(res.stdout ?? "");
|
|
@@ -29562,7 +29568,7 @@ class AntigravityProviderTransport {
|
|
|
29562
29568
|
const servesClause = served.length > 0 ? `That tier currently serves: ${served.join(", ")}. ` : "";
|
|
29563
29569
|
const tier = this._displayName || "Antigravity";
|
|
29564
29570
|
const reason = capacityFallbacksExhausted ? `${this.modelName} could not be served after every Antigravity capacity fallback failed (${tier}, via ag@). ` + servesClause : `${this.modelName} is not served by your Antigravity tier (${tier}, via ag@). ` + servesClause;
|
|
29565
|
-
const message = reason + `To use ${this.modelName}, go through the direct Gemini API instead \u2014 ` +
|
|
29571
|
+
const message = reason + `To use ${this.modelName}, go through the direct Gemini API instead \u2014 ` + "set GEMINI_API_KEY (get one at https://aistudio.google.com/app/apikey) and run " + `google@${this.modelName}.`;
|
|
29566
29572
|
const list = served.join(", ");
|
|
29567
29573
|
const body = JSON.stringify({
|
|
29568
29574
|
error: { code: 404, status: "NOT_FOUND", message }
|
|
@@ -29618,8 +29624,8 @@ ${lines.join(`
|
|
|
29618
29624
|
}
|
|
29619
29625
|
var CODE_ASSIST_BASE = "https://cloudcode-pa.googleapis.com", CODE_ASSIST_ENDPOINT, MAX_RETRY_ATTEMPTS = 3, DEFAULT_RATE_LIMIT_DELAY_MS = 1e4, REASONING_TIER_RANK;
|
|
29620
29626
|
var init_antigravity = __esm(() => {
|
|
29621
|
-
init_authority();
|
|
29622
29627
|
init_antigravity_token();
|
|
29628
|
+
init_authority();
|
|
29623
29629
|
init_gemini_oauth();
|
|
29624
29630
|
init_gemini_queue();
|
|
29625
29631
|
init_logger();
|
|
@@ -32394,10 +32400,10 @@ var API_KEY_INFO, PROVIDER_DISPLAY_NAMES;
|
|
|
32394
32400
|
var init_provider_resolver = __esm(() => {
|
|
32395
32401
|
init_authority();
|
|
32396
32402
|
init_model_parser();
|
|
32403
|
+
init_onepassword();
|
|
32397
32404
|
init_provider_definitions();
|
|
32398
32405
|
init_provider_registry();
|
|
32399
32406
|
init_remote_provider_registry();
|
|
32400
|
-
init_onepassword();
|
|
32401
32407
|
init_routing_hints();
|
|
32402
32408
|
init_routing_rules();
|
|
32403
32409
|
API_KEY_INFO = new Proxy({}, {
|
|
@@ -37352,10 +37358,24 @@ var init_glm_model_dialect = __esm(() => {
|
|
|
37352
37358
|
}
|
|
37353
37359
|
applyNativeReasoning(request, originalRequest) {
|
|
37354
37360
|
const effort = this.resolveEffortLevel(originalRequest);
|
|
37355
|
-
|
|
37356
|
-
|
|
37357
|
-
|
|
37358
|
-
|
|
37361
|
+
const reasoning = this.lookupReasoningCapability();
|
|
37362
|
+
if (effort && this.acceptsThinkingToggle(reasoning)) {
|
|
37363
|
+
if (effort === "none" || effort === "minimal") {
|
|
37364
|
+
request.thinking = { type: "disabled" };
|
|
37365
|
+
if (request.reasoning_effort !== undefined)
|
|
37366
|
+
delete request.reasoning_effort;
|
|
37367
|
+
log(`[GLMModelDialect] effort ${effort} -> thinking.type: disabled for ${this.modelId}`);
|
|
37368
|
+
return request;
|
|
37369
|
+
}
|
|
37370
|
+
request.thinking = { type: "enabled" };
|
|
37371
|
+
if (reasoning?.control === "effort" && reasoning.efforts?.length) {
|
|
37372
|
+
const level = this.clampToAdvertisedEffort(effort, reasoning);
|
|
37373
|
+
if (level)
|
|
37374
|
+
request.reasoning_effort = level;
|
|
37375
|
+
log(`[GLMModelDialect] effort ${effort} -> thinking: enabled, reasoning_effort: ${level ?? "(none advertised)"} for ${this.modelId} (advertised: ${reasoning.efforts.join("/")})`);
|
|
37376
|
+
return request;
|
|
37377
|
+
}
|
|
37378
|
+
log(`[GLMModelDialect] effort ${effort} -> thinking.type: enabled for ${this.modelId}`);
|
|
37359
37379
|
return request;
|
|
37360
37380
|
}
|
|
37361
37381
|
if (request.thinking) {
|
|
@@ -37364,9 +37384,19 @@ var init_glm_model_dialect = __esm(() => {
|
|
|
37364
37384
|
}
|
|
37365
37385
|
return request;
|
|
37366
37386
|
}
|
|
37367
|
-
|
|
37368
|
-
|
|
37369
|
-
|
|
37387
|
+
acceptsThinkingToggle(reasoning) {
|
|
37388
|
+
if (reasoning)
|
|
37389
|
+
return reasoning.supported !== false;
|
|
37390
|
+
return this.looksLikeThinkingCapableGlm();
|
|
37391
|
+
}
|
|
37392
|
+
looksLikeThinkingCapableGlm() {
|
|
37393
|
+
const bare = this.modelId.toLowerCase().split("/").pop() ?? "";
|
|
37394
|
+
const match2 = /^glm-(\d+)(?:\.(\d+))?/.exec(bare);
|
|
37395
|
+
if (!match2)
|
|
37396
|
+
return false;
|
|
37397
|
+
const major = Number(match2[1]);
|
|
37398
|
+
const minor = match2[2] === undefined ? 0 : Number(match2[2]);
|
|
37399
|
+
return major > 4 || major === 4 && minor >= 5;
|
|
37370
37400
|
}
|
|
37371
37401
|
shouldHandle(modelId) {
|
|
37372
37402
|
return matchesModelFamily(modelId, "glm-") || matchesModelFamily(modelId, "chatglm-") || modelId.toLowerCase().includes("zhipu/");
|
|
@@ -38163,6 +38193,79 @@ ${text}`;
|
|
|
38163
38193
|
};
|
|
38164
38194
|
});
|
|
38165
38195
|
|
|
38196
|
+
// src/behavior/hooks.ts
|
|
38197
|
+
import { isAbsolute, resolve } from "path";
|
|
38198
|
+
function isBehaviorRule(value) {
|
|
38199
|
+
return !!value && typeof value === "object" && typeof value.id === "string" && value.id.length > 0 && typeof value.appliesTo === "function" && (value.onRequest === undefined || typeof value.onRequest === "function") && (value.onToolCall === undefined || typeof value.onToolCall === "function");
|
|
38200
|
+
}
|
|
38201
|
+
function collectRules(mod) {
|
|
38202
|
+
const found = [];
|
|
38203
|
+
const consider = (v) => {
|
|
38204
|
+
if (Array.isArray(v))
|
|
38205
|
+
v.forEach(consider);
|
|
38206
|
+
else if (isBehaviorRule(v))
|
|
38207
|
+
found.push(v);
|
|
38208
|
+
};
|
|
38209
|
+
consider(mod?.default);
|
|
38210
|
+
consider(mod?.rules);
|
|
38211
|
+
for (const [key, value] of Object.entries(mod ?? {})) {
|
|
38212
|
+
if (key === "default" || key === "rules")
|
|
38213
|
+
continue;
|
|
38214
|
+
consider(value);
|
|
38215
|
+
}
|
|
38216
|
+
return [...new Set(found)];
|
|
38217
|
+
}
|
|
38218
|
+
function shortName(path) {
|
|
38219
|
+
const base = path.split("/").pop() ?? path;
|
|
38220
|
+
return base.replace(/\.[cm]?[jt]s$/, "");
|
|
38221
|
+
}
|
|
38222
|
+
async function loadHookRules(paths, cwd = process.cwd()) {
|
|
38223
|
+
if (!paths?.length)
|
|
38224
|
+
return [];
|
|
38225
|
+
const loaded = [];
|
|
38226
|
+
const seen = new Set;
|
|
38227
|
+
for (const raw2 of paths) {
|
|
38228
|
+
const abs = isAbsolute(raw2) ? raw2 : resolve(cwd, raw2);
|
|
38229
|
+
const rules = await importHook(abs, raw2);
|
|
38230
|
+
for (const rule of rules)
|
|
38231
|
+
namespaceInto(rule, abs, seen, loaded);
|
|
38232
|
+
}
|
|
38233
|
+
if (loaded.length > 0) {
|
|
38234
|
+
logStderr(`[behavior] Loaded ${loaded.length} hook rule(s): ${loaded.map((r) => r.id).join(", ")}`);
|
|
38235
|
+
}
|
|
38236
|
+
return loaded;
|
|
38237
|
+
}
|
|
38238
|
+
async function importHook(abs, raw2) {
|
|
38239
|
+
let mod;
|
|
38240
|
+
try {
|
|
38241
|
+
mod = await import(abs);
|
|
38242
|
+
} catch (err) {
|
|
38243
|
+
logStderr(`[behavior] Skipping hook ${raw2}: ${err instanceof Error ? err.message : err}`);
|
|
38244
|
+
return [];
|
|
38245
|
+
}
|
|
38246
|
+
const rules = collectRules(mod);
|
|
38247
|
+
if (rules.length === 0) {
|
|
38248
|
+
logStderr(`[behavior] Hook ${raw2} exported no valid BehaviorRule \u2014 skipped`);
|
|
38249
|
+
}
|
|
38250
|
+
return rules;
|
|
38251
|
+
}
|
|
38252
|
+
function namespaceInto(rule, abs, seen, out) {
|
|
38253
|
+
const namespaced = `hook:${shortName(abs)}/${rule.id}`;
|
|
38254
|
+
if (seen.has(namespaced)) {
|
|
38255
|
+
logStderr(`[behavior] Duplicate hook rule ${namespaced} \u2014 keeping the first`);
|
|
38256
|
+
return;
|
|
38257
|
+
}
|
|
38258
|
+
seen.add(namespaced);
|
|
38259
|
+
out.push({
|
|
38260
|
+
...rule,
|
|
38261
|
+
id: namespaced,
|
|
38262
|
+
defaultSeverity: rule.defaultSeverity ?? "warn"
|
|
38263
|
+
});
|
|
38264
|
+
}
|
|
38265
|
+
var init_hooks = __esm(() => {
|
|
38266
|
+
init_logger();
|
|
38267
|
+
});
|
|
38268
|
+
|
|
38166
38269
|
// ../../node_modules/.bun/zod@4.1.13/node_modules/zod/index.js
|
|
38167
38270
|
var init_zod = __esm(() => {
|
|
38168
38271
|
init_external2();
|
|
@@ -38402,6 +38505,20 @@ var init_journal = __esm(() => {
|
|
|
38402
38505
|
});
|
|
38403
38506
|
|
|
38404
38507
|
// src/behavior/telemetry/aggregate.ts
|
|
38508
|
+
var exports_aggregate = {};
|
|
38509
|
+
__export(exports_aggregate, {
|
|
38510
|
+
spoolPendingSync: () => spoolPendingSync,
|
|
38511
|
+
setTelemetryConsent: () => setTelemetryConsent,
|
|
38512
|
+
setSessionContextWindow: () => setSessionContextWindow,
|
|
38513
|
+
resetTelemetryState: () => resetTelemetryState,
|
|
38514
|
+
recordTelemetryTurn: () => recordTelemetryTurn,
|
|
38515
|
+
recordTelemetryDecision: () => recordTelemetryDecision,
|
|
38516
|
+
pendingReports: () => pendingReports,
|
|
38517
|
+
outboxPath: () => outboxPath,
|
|
38518
|
+
contextFillPct: () => contextFillPct,
|
|
38519
|
+
contextBucket: () => contextBucket,
|
|
38520
|
+
TELEMETRY_SCHEMA_VERSION: () => TELEMETRY_SCHEMA_VERSION
|
|
38521
|
+
});
|
|
38405
38522
|
import { createHash as createHash4, randomBytes as randomBytes4 } from "crypto";
|
|
38406
38523
|
import { appendFileSync as appendFileSync3, mkdirSync as mkdirSync9 } from "fs";
|
|
38407
38524
|
import { homedir as homedir19 } from "os";
|
|
@@ -38417,6 +38534,14 @@ function contextBucket(inputTokens) {
|
|
|
38417
38534
|
return "150-200k";
|
|
38418
38535
|
return "200k+";
|
|
38419
38536
|
}
|
|
38537
|
+
function setSessionContextWindow(tokens) {
|
|
38538
|
+
enforcedContextWindow = tokens > 0 ? tokens : 0;
|
|
38539
|
+
}
|
|
38540
|
+
function contextFillPct(peakTokens, window2 = enforcedContextWindow) {
|
|
38541
|
+
if (!(window2 > 0) || !(peakTokens > 0))
|
|
38542
|
+
return;
|
|
38543
|
+
return Math.min(100, Math.max(0, Math.round(peakTokens / window2 * 100)));
|
|
38544
|
+
}
|
|
38420
38545
|
function hashSessionId(rawSessionId, model) {
|
|
38421
38546
|
return createHash4("sha256").update(`${SESSION_SALT}:${rawSessionId}:${model}`).digest("hex");
|
|
38422
38547
|
}
|
|
@@ -38426,6 +38551,10 @@ function setTelemetryConsent(value) {
|
|
|
38426
38551
|
function enabled() {
|
|
38427
38552
|
return consent;
|
|
38428
38553
|
}
|
|
38554
|
+
function resetTelemetryState() {
|
|
38555
|
+
consent = false;
|
|
38556
|
+
sessions.clear();
|
|
38557
|
+
}
|
|
38429
38558
|
function stateFor(rawSessionId, model, provider) {
|
|
38430
38559
|
const key = `${rawSessionId}|${model}`;
|
|
38431
38560
|
let state = sessions.get(key);
|
|
@@ -38500,6 +38629,9 @@ function toReport(state) {
|
|
|
38500
38629
|
model_id: state.model,
|
|
38501
38630
|
provider_name: state.provider,
|
|
38502
38631
|
context_bucket: contextBucket(state.maxInputTokens),
|
|
38632
|
+
...contextFillPct(state.maxInputTokens) !== undefined && {
|
|
38633
|
+
context_fill_pct: contextFillPct(state.maxInputTokens)
|
|
38634
|
+
},
|
|
38503
38635
|
turns: state.turns,
|
|
38504
38636
|
decisions: [...state.decisions.values()]
|
|
38505
38637
|
};
|
|
@@ -38528,7 +38660,7 @@ function spoolPendingSync(path = outboxPath()) {
|
|
|
38528
38660
|
return 0;
|
|
38529
38661
|
}
|
|
38530
38662
|
}
|
|
38531
|
-
var TELEMETRY_SCHEMA_VERSION = 1, SESSION_SALT, MAX_TRACKED_SESSIONS = 32, MAX_DECISION_KEYS = 200, sessions, consent = false;
|
|
38663
|
+
var TELEMETRY_SCHEMA_VERSION = 1, enforcedContextWindow = 0, SESSION_SALT, MAX_TRACKED_SESSIONS = 32, MAX_DECISION_KEYS = 200, sessions, consent = false;
|
|
38532
38664
|
var init_aggregate = __esm(() => {
|
|
38533
38665
|
init_logger();
|
|
38534
38666
|
SESSION_SALT = randomBytes4(32).toString("hex");
|
|
@@ -38756,7 +38888,7 @@ __export(exports_upload, {
|
|
|
38756
38888
|
});
|
|
38757
38889
|
import { readFile as readFile2, rename as rename2, unlink, writeFile as writeFile2 } from "fs/promises";
|
|
38758
38890
|
function sleep2(ms) {
|
|
38759
|
-
return new Promise((
|
|
38891
|
+
return new Promise((resolve2) => setTimeout(resolve2, ms));
|
|
38760
38892
|
}
|
|
38761
38893
|
async function post(report) {
|
|
38762
38894
|
const controller = new AbortController;
|
|
@@ -39317,79 +39449,6 @@ Do not invent a different filename, and do not derive one from the task. Claude
|
|
|
39317
39449
|
PLAN_MODE_RULES = [planFilePathRule];
|
|
39318
39450
|
});
|
|
39319
39451
|
|
|
39320
|
-
// src/behavior/hooks.ts
|
|
39321
|
-
import { isAbsolute, resolve } from "path";
|
|
39322
|
-
function isBehaviorRule(value) {
|
|
39323
|
-
return !!value && typeof value === "object" && typeof value.id === "string" && value.id.length > 0 && typeof value.appliesTo === "function" && (value.onRequest === undefined || typeof value.onRequest === "function") && (value.onToolCall === undefined || typeof value.onToolCall === "function");
|
|
39324
|
-
}
|
|
39325
|
-
function collectRules(mod) {
|
|
39326
|
-
const found = [];
|
|
39327
|
-
const consider = (v) => {
|
|
39328
|
-
if (Array.isArray(v))
|
|
39329
|
-
v.forEach(consider);
|
|
39330
|
-
else if (isBehaviorRule(v))
|
|
39331
|
-
found.push(v);
|
|
39332
|
-
};
|
|
39333
|
-
consider(mod?.default);
|
|
39334
|
-
consider(mod?.rules);
|
|
39335
|
-
for (const [key, value] of Object.entries(mod ?? {})) {
|
|
39336
|
-
if (key === "default" || key === "rules")
|
|
39337
|
-
continue;
|
|
39338
|
-
consider(value);
|
|
39339
|
-
}
|
|
39340
|
-
return [...new Set(found)];
|
|
39341
|
-
}
|
|
39342
|
-
function shortName(path) {
|
|
39343
|
-
const base = path.split("/").pop() ?? path;
|
|
39344
|
-
return base.replace(/\.[cm]?[jt]s$/, "");
|
|
39345
|
-
}
|
|
39346
|
-
async function loadHookRules(paths, cwd = process.cwd()) {
|
|
39347
|
-
if (!paths?.length)
|
|
39348
|
-
return [];
|
|
39349
|
-
const loaded = [];
|
|
39350
|
-
const seen = new Set;
|
|
39351
|
-
for (const raw2 of paths) {
|
|
39352
|
-
const abs = isAbsolute(raw2) ? raw2 : resolve(cwd, raw2);
|
|
39353
|
-
const rules = await importHook(abs, raw2);
|
|
39354
|
-
for (const rule of rules)
|
|
39355
|
-
namespaceInto(rule, abs, seen, loaded);
|
|
39356
|
-
}
|
|
39357
|
-
if (loaded.length > 0) {
|
|
39358
|
-
logStderr(`[behavior] Loaded ${loaded.length} hook rule(s): ${loaded.map((r) => r.id).join(", ")}`);
|
|
39359
|
-
}
|
|
39360
|
-
return loaded;
|
|
39361
|
-
}
|
|
39362
|
-
async function importHook(abs, raw2) {
|
|
39363
|
-
let mod;
|
|
39364
|
-
try {
|
|
39365
|
-
mod = await import(abs);
|
|
39366
|
-
} catch (err) {
|
|
39367
|
-
logStderr(`[behavior] Skipping hook ${raw2}: ${err instanceof Error ? err.message : err}`);
|
|
39368
|
-
return [];
|
|
39369
|
-
}
|
|
39370
|
-
const rules = collectRules(mod);
|
|
39371
|
-
if (rules.length === 0) {
|
|
39372
|
-
logStderr(`[behavior] Hook ${raw2} exported no valid BehaviorRule \u2014 skipped`);
|
|
39373
|
-
}
|
|
39374
|
-
return rules;
|
|
39375
|
-
}
|
|
39376
|
-
function namespaceInto(rule, abs, seen, out) {
|
|
39377
|
-
const namespaced = `hook:${shortName(abs)}/${rule.id}`;
|
|
39378
|
-
if (seen.has(namespaced)) {
|
|
39379
|
-
logStderr(`[behavior] Duplicate hook rule ${namespaced} \u2014 keeping the first`);
|
|
39380
|
-
return;
|
|
39381
|
-
}
|
|
39382
|
-
seen.add(namespaced);
|
|
39383
|
-
out.push({
|
|
39384
|
-
...rule,
|
|
39385
|
-
id: namespaced,
|
|
39386
|
-
defaultSeverity: rule.defaultSeverity ?? "warn"
|
|
39387
|
-
});
|
|
39388
|
-
}
|
|
39389
|
-
var init_hooks = __esm(() => {
|
|
39390
|
-
init_logger();
|
|
39391
|
-
});
|
|
39392
|
-
|
|
39393
39452
|
// src/behavior/observer/corpus.ts
|
|
39394
39453
|
import { appendFileSync as appendFileSync4, readFileSync as readFileSync12, readdirSync as readdirSync2, statSync as statSync2 } from "fs";
|
|
39395
39454
|
import { homedir as homedir21 } from "os";
|
|
@@ -43482,8 +43541,9 @@ function getRecoveryHint(status, errorText, providerName) {
|
|
|
43482
43541
|
var STREAM_RETRY_DELAYS_MS;
|
|
43483
43542
|
var init_composed_handler = __esm(() => {
|
|
43484
43543
|
init_dialect_manager();
|
|
43485
|
-
|
|
43544
|
+
init_model_catalog();
|
|
43486
43545
|
init_behavior();
|
|
43546
|
+
init_logger();
|
|
43487
43547
|
init_middleware();
|
|
43488
43548
|
init_openai();
|
|
43489
43549
|
init_vision_proxy();
|
|
@@ -43498,7 +43558,6 @@ var init_composed_handler = __esm(() => {
|
|
|
43498
43558
|
init_anthropic_sse();
|
|
43499
43559
|
init_gemini_sse();
|
|
43500
43560
|
init_ollama_jsonl();
|
|
43501
|
-
init_model_catalog();
|
|
43502
43561
|
init_openai_responses_sse();
|
|
43503
43562
|
init_openai_sse();
|
|
43504
43563
|
init_token_tracker();
|
|
@@ -44521,7 +44580,7 @@ function readContextWindow(row) {
|
|
|
44521
44580
|
}
|
|
44522
44581
|
function readCreatedDate(row) {
|
|
44523
44582
|
const raw2 = row.created;
|
|
44524
|
-
const seconds = typeof raw2 === "number" ? raw2 : typeof raw2 === "string" ? Number(raw2) : NaN;
|
|
44583
|
+
const seconds = typeof raw2 === "number" ? raw2 : typeof raw2 === "string" ? Number(raw2) : Number.NaN;
|
|
44525
44584
|
if (!Number.isFinite(seconds))
|
|
44526
44585
|
return;
|
|
44527
44586
|
if (seconds < MIN_CREATED_SECONDS || seconds > MAX_CREATED_SECONDS)
|
|
@@ -45812,7 +45871,7 @@ class GeminiCodeAssistProviderTransport {
|
|
|
45812
45871
|
const list = served.join(", ");
|
|
45813
45872
|
const tier = this._displayName || "Gemini Code Assist";
|
|
45814
45873
|
const reason = capacityFallbacksExhausted ? `${this.modelName} could not be served after every Gemini Code Assist capacity fallback failed (${tier}, via go@). ` + `That tier currently reports: ${list}. ` : `${this.modelName} is not served by your Gemini Code Assist tier (${tier}, via go@). ` + `That tier currently serves: ${list}. `;
|
|
45815
|
-
const message = reason + `To use ${this.modelName}, go through the direct Gemini API instead \u2014 ` +
|
|
45874
|
+
const message = reason + `To use ${this.modelName}, go through the direct Gemini API instead \u2014 ` + "set GEMINI_API_KEY (get one at https://aistudio.google.com/app/apikey) and run " + `google@${this.modelName}.`;
|
|
45816
45875
|
const body = JSON.stringify({
|
|
45817
45876
|
error: { code: 404, status: "NOT_FOUND", message }
|
|
45818
45877
|
});
|
|
@@ -47500,6 +47559,8 @@ var init_proxy_server = __esm(() => {
|
|
|
47500
47559
|
init_local_adapter();
|
|
47501
47560
|
init_openrouter_api_format();
|
|
47502
47561
|
init_authority();
|
|
47562
|
+
init_hooks();
|
|
47563
|
+
init_behavior();
|
|
47503
47564
|
init_composed_handler();
|
|
47504
47565
|
init_fallback_handler();
|
|
47505
47566
|
init_native_handler();
|
|
@@ -47508,8 +47569,6 @@ var init_proxy_server = __esm(() => {
|
|
|
47508
47569
|
init_model_loader();
|
|
47509
47570
|
init_profile_config();
|
|
47510
47571
|
init_api_key_map();
|
|
47511
|
-
init_behavior();
|
|
47512
|
-
init_hooks();
|
|
47513
47572
|
init_custom_endpoints_loader();
|
|
47514
47573
|
init_model_catalog_resolver();
|
|
47515
47574
|
init_model_parser();
|
|
@@ -47776,7 +47835,7 @@ function classifyRunOutput(opts) {
|
|
|
47776
47835
|
if (bgCeiling) {
|
|
47777
47836
|
return {
|
|
47778
47837
|
reason: "background_task_ceiling",
|
|
47779
|
-
detail: `Claude Code terminated the turn after ${bgCeiling[1]}s waiting on background tasks, ` +
|
|
47838
|
+
detail: `Claude Code terminated the turn after ${bgCeiling[1]}s waiting on background tasks, ` + "flushing only partial output. Set CLAUDE_CODE_PRINT_BG_WAIT_CEILING_MS=0 in the child " + "environment to wait indefinitely, or tell the model not to spawn background work."
|
|
47780
47839
|
};
|
|
47781
47840
|
}
|
|
47782
47841
|
const tailIsWholeOutput = outputSize <= STDOUT_TAIL_LIMIT;
|
|
@@ -48046,7 +48105,7 @@ async function runModels(sessionPath, opts = {}) {
|
|
|
48046
48105
|
const stderr = rt?.getStderr() ?? "";
|
|
48047
48106
|
const stdoutTail = rt?.getStdoutTail() ?? "";
|
|
48048
48107
|
const bytes = rt?.getByteCount() ?? 0;
|
|
48049
|
-
const detail = `Killed by the orchestrator after ${timeoutMs / 1000}s with ${bytes} B of stdout. ` +
|
|
48108
|
+
const detail = `Killed by the orchestrator after ${timeoutMs / 1000}s with ${bytes} B of stdout. ` + "In --quiet print mode the child emits its answer only at the end, so 0 B means " + `"did not finish", not "produced nothing".`;
|
|
48050
48109
|
if (rt)
|
|
48051
48110
|
persistErrorLog(rt.errorLogPath, `TIMEOUT: ${detail}`, stderr, stdoutTail);
|
|
48052
48111
|
updateModelStatus(id, {
|
|
@@ -48446,7 +48505,7 @@ function formatTeamResult(status, sessionPath) {
|
|
|
48446
48505
|
}
|
|
48447
48506
|
}
|
|
48448
48507
|
lines.push("actions:");
|
|
48449
|
-
lines.push(
|
|
48508
|
+
lines.push(" full stderr/stdout for one failure \u2192 Read the evidence path above");
|
|
48450
48509
|
lines.push(` machine-readable status \u2192 team(mode="status", path="${sessionPath}")`);
|
|
48451
48510
|
lines.push(` report a provider bug \u2192 report_error(session_path="${sessionPath}")`);
|
|
48452
48511
|
}
|
|
@@ -49731,8 +49790,8 @@ function maskKey2(key) {
|
|
|
49731
49790
|
}
|
|
49732
49791
|
var SKIP, PROVIDERS;
|
|
49733
49792
|
var init_providers = __esm(() => {
|
|
49734
|
-
init_source();
|
|
49735
49793
|
init_antigravity_token();
|
|
49794
|
+
init_source();
|
|
49736
49795
|
init_oauth_registry();
|
|
49737
49796
|
init_provider_definitions();
|
|
49738
49797
|
SKIP = new Set(["qwen", "native-anthropic"]);
|
|
@@ -76065,6 +76124,10 @@ async function runClaudeWithProxy(config3, proxyUrl, onCleanup) {
|
|
|
76065
76124
|
const realWindow = await computeMainThreadContextWindow(config3);
|
|
76066
76125
|
const contextEnv = resolveContextWindowEnv(realWindow, process.env);
|
|
76067
76126
|
Object.assign(env, contextEnv.vars);
|
|
76127
|
+
try {
|
|
76128
|
+
const { setSessionContextWindow: setSessionContextWindow2 } = await Promise.resolve().then(() => (init_aggregate(), exports_aggregate));
|
|
76129
|
+
setSessionContextWindow2(realWindow);
|
|
76130
|
+
} catch {}
|
|
76068
76131
|
if (contextEnv.notice && !config3.quiet) {
|
|
76069
76132
|
console.error(contextEnv.notice);
|
|
76070
76133
|
}
|
|
@@ -76123,7 +76186,7 @@ Or set CLAUDE_PATH to your custom installation:`);
|
|
|
76123
76186
|
ttyFd = undefined;
|
|
76124
76187
|
}
|
|
76125
76188
|
} else if (config3.interactive && !process.stdout.isTTY && !process.stdin.isTTY) {
|
|
76126
|
-
console.error("[claudish] An interactive session was requested but no terminal is attached
|
|
76189
|
+
console.error("[claudish] An interactive session was requested but no terminal is attached (stdin and stdout are both non-TTY). Pass a prompt argument, or use --stdin / -p for non-interactive mode.");
|
|
76127
76190
|
}
|
|
76128
76191
|
const stdio = ttyFd !== undefined ? [0, ttyFd, ttyFd] : "inherit";
|
|
76129
76192
|
const proc = spawn4(spawnCommand, claudeArgs, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claudish",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.36.0",
|
|
4
4
|
"description": "Run Claude Code with any model - OpenRouter, Ollama, LM Studio & local models",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -60,10 +60,10 @@
|
|
|
60
60
|
"ai"
|
|
61
61
|
],
|
|
62
62
|
"optionalDependencies": {
|
|
63
|
-
"@claudish/magmux-darwin-arm64": "7.
|
|
64
|
-
"@claudish/magmux-darwin-x64": "7.
|
|
65
|
-
"@claudish/magmux-linux-arm64": "7.
|
|
66
|
-
"@claudish/magmux-linux-x64": "7.
|
|
63
|
+
"@claudish/magmux-darwin-arm64": "7.36.0",
|
|
64
|
+
"@claudish/magmux-darwin-x64": "7.36.0",
|
|
65
|
+
"@claudish/magmux-linux-arm64": "7.36.0",
|
|
66
|
+
"@claudish/magmux-linux-x64": "7.36.0"
|
|
67
67
|
},
|
|
68
68
|
"author": "Jack Rudenko <i@madappgang.com>",
|
|
69
69
|
"license": "MIT",
|