claudish 9.7.0 → 9.7.1
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 +43 -17
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -715,7 +715,7 @@ var init_onepassword_config = __esm(() => {
|
|
|
715
715
|
});
|
|
716
716
|
|
|
717
717
|
// src/version.ts
|
|
718
|
-
var VERSION = "9.7.
|
|
718
|
+
var VERSION = "9.7.1";
|
|
719
719
|
|
|
720
720
|
// src/logger.ts
|
|
721
721
|
import { appendFile, existsSync as existsSync2, mkdirSync, readdirSync, unlinkSync, writeFileSync as writeFileSync2 } from "fs";
|
|
@@ -18169,6 +18169,10 @@ var init_stdio2 = __esm(() => {
|
|
|
18169
18169
|
import { existsSync as existsSync5, mkdirSync as mkdirSync5, readFileSync as readFileSync5, rmSync as rmSync2, writeFileSync as writeFileSync5 } from "fs";
|
|
18170
18170
|
import { homedir as homedir7 } from "os";
|
|
18171
18171
|
import { dirname as dirname4, join as join7 } from "path";
|
|
18172
|
+
function catalogIncompatiblePath() {
|
|
18173
|
+
const override = process.env.CLAUDISH_CATALOG_INCOMPATIBLE_PATH;
|
|
18174
|
+
return override !== undefined && override.length > 0 ? override : CATALOG_INCOMPATIBLE_PATH;
|
|
18175
|
+
}
|
|
18172
18176
|
function parseContractEnvelope(body) {
|
|
18173
18177
|
if (!body || typeof body !== "object")
|
|
18174
18178
|
return { contractVersion: null };
|
|
@@ -18184,7 +18188,7 @@ function parseContractEnvelope(body) {
|
|
|
18184
18188
|
function isIncompatibleContractVersion(version) {
|
|
18185
18189
|
return typeof version === "number" && version > SUPPORTED_CONTRACT_VERSION;
|
|
18186
18190
|
}
|
|
18187
|
-
function markCatalogIncompatible(info, path =
|
|
18191
|
+
function markCatalogIncompatible(info, path = catalogIncompatiblePath()) {
|
|
18188
18192
|
const record = {
|
|
18189
18193
|
detectedAt: new Date().toISOString(),
|
|
18190
18194
|
serverContractVersion: info.serverContractVersion,
|
|
@@ -18198,7 +18202,7 @@ function markCatalogIncompatible(info, path = CATALOG_INCOMPATIBLE_PATH) {
|
|
|
18198
18202
|
writeFileSync5(path, JSON.stringify(record), "utf-8");
|
|
18199
18203
|
} catch {}
|
|
18200
18204
|
}
|
|
18201
|
-
function readCatalogIncompatibility(path =
|
|
18205
|
+
function readCatalogIncompatibility(path = catalogIncompatiblePath()) {
|
|
18202
18206
|
if (_memFlag)
|
|
18203
18207
|
return _memFlag;
|
|
18204
18208
|
if (_fileMemo && _fileMemo.path === path)
|
|
@@ -18248,7 +18252,7 @@ function parseSentinelFile(raw) {
|
|
|
18248
18252
|
...typeof data.clientContractVersion === "number" ? { clientContractVersion: data.clientContractVersion } : {}
|
|
18249
18253
|
};
|
|
18250
18254
|
}
|
|
18251
|
-
function clearCatalogIncompatibility(path =
|
|
18255
|
+
function clearCatalogIncompatibility(path = catalogIncompatiblePath()) {
|
|
18252
18256
|
_memFlag = null;
|
|
18253
18257
|
_fileMemo = { path, value: null };
|
|
18254
18258
|
try {
|
|
@@ -61031,6 +61035,20 @@ var init_local_liveness = __esm(() => {
|
|
|
61031
61035
|
import { existsSync as existsSync31, mkdirSync as mkdirSync19, readFileSync as readFileSync31, writeFileSync as writeFileSync20 } from "fs";
|
|
61032
61036
|
import { homedir as homedir36 } from "os";
|
|
61033
61037
|
import { dirname as dirname13, join as join41 } from "path";
|
|
61038
|
+
function describeProbeCatalogFailure(outcome) {
|
|
61039
|
+
switch (outcome.kind) {
|
|
61040
|
+
case "incompatible":
|
|
61041
|
+
return outcome.serverContractVersion === null ? "model catalog uses a newer contract than this build reads" : `model catalog uses contract v${outcome.serverContractVersion}, newer than this build reads`;
|
|
61042
|
+
case "http":
|
|
61043
|
+
return `model catalog returned HTTP ${outcome.status}`;
|
|
61044
|
+
case "timeout":
|
|
61045
|
+
return "could not reach model catalog (timeout)";
|
|
61046
|
+
case "network":
|
|
61047
|
+
return `could not reach model catalog (${outcome.reason})`;
|
|
61048
|
+
case "invalid":
|
|
61049
|
+
return `model catalog response unreadable (${outcome.reason})`;
|
|
61050
|
+
}
|
|
61051
|
+
}
|
|
61034
61052
|
function readProbeModelsCache(path = PROBE_MODELS_CACHE_PATH) {
|
|
61035
61053
|
if (!existsSync31(path))
|
|
61036
61054
|
return null;
|
|
@@ -61070,8 +61088,17 @@ async function fetchProbeModels(url = PROBE_MODELS_URL, timeoutMs = FETCH_TIMEOU
|
|
|
61070
61088
|
reason: e instanceof Error ? e.message : String(e)
|
|
61071
61089
|
};
|
|
61072
61090
|
}
|
|
61073
|
-
if (!response.ok)
|
|
61091
|
+
if (!response.ok) {
|
|
61092
|
+
let errorBody = null;
|
|
61093
|
+
try {
|
|
61094
|
+
errorBody = await response.json();
|
|
61095
|
+
} catch {}
|
|
61096
|
+
const envelope = parseContractEnvelope(errorBody);
|
|
61097
|
+
if (response.status === 426 || isIncompatibleContractVersion(envelope.contractVersion)) {
|
|
61098
|
+
return { kind: "incompatible", serverContractVersion: envelope.contractVersion };
|
|
61099
|
+
}
|
|
61074
61100
|
return { kind: "http", status: response.status };
|
|
61101
|
+
}
|
|
61075
61102
|
let body;
|
|
61076
61103
|
try {
|
|
61077
61104
|
body = await response.json();
|
|
@@ -61081,6 +61108,10 @@ async function fetchProbeModels(url = PROBE_MODELS_URL, timeoutMs = FETCH_TIMEOU
|
|
|
61081
61108
|
reason: e instanceof Error ? e.message : "json parse error"
|
|
61082
61109
|
};
|
|
61083
61110
|
}
|
|
61111
|
+
const bodyEnvelope = parseContractEnvelope(body);
|
|
61112
|
+
if (isIncompatibleContractVersion(bodyEnvelope.contractVersion)) {
|
|
61113
|
+
return { kind: "incompatible", serverContractVersion: bodyEnvelope.contractVersion };
|
|
61114
|
+
}
|
|
61084
61115
|
if (!isValidResponse(body)) {
|
|
61085
61116
|
return { kind: "invalid", reason: "missing providers map" };
|
|
61086
61117
|
}
|
|
@@ -61164,6 +61195,7 @@ function isValidResponse(raw) {
|
|
|
61164
61195
|
}
|
|
61165
61196
|
var PROBE_MODELS_URL = "https://us-central1-claudish-6da10.cloudfunctions.net/probeModels", CACHE_TTL_MS4, FETCH_TIMEOUT_MS3 = 15000, PROBE_MODELS_CACHE_PATH, _inFlight = null;
|
|
61166
61197
|
var init_probe_catalog = __esm(() => {
|
|
61198
|
+
init_catalog_compatibility();
|
|
61167
61199
|
CACHE_TTL_MS4 = 60 * 60 * 1000;
|
|
61168
61200
|
PROBE_MODELS_CACHE_PATH = join41(homedir36(), ".claudish", "probe-models.json");
|
|
61169
61201
|
});
|
|
@@ -66394,17 +66426,8 @@ function App({ requestLogin } = {}) {
|
|
|
66394
66426
|
return;
|
|
66395
66427
|
}
|
|
66396
66428
|
}
|
|
66397
|
-
const
|
|
66398
|
-
|
|
66399
|
-
setTestResults((prev) => ({
|
|
66400
|
-
...prev,
|
|
66401
|
-
[provName]: {
|
|
66402
|
-
status: "failed",
|
|
66403
|
-
error: `could not reach model catalog (${outcome.kind})`
|
|
66404
|
-
}
|
|
66405
|
-
}));
|
|
66406
|
-
return;
|
|
66407
|
-
}
|
|
66429
|
+
const catalogOutcome = await ensureProbeModelsCached();
|
|
66430
|
+
const catalogProblem = catalogOutcome.kind === "ok" ? undefined : describeProbeCatalogFailure(catalogOutcome);
|
|
66408
66431
|
const startMs = Date.now();
|
|
66409
66432
|
try {
|
|
66410
66433
|
const proxyUrl = await ensureProbeProxy();
|
|
@@ -66456,7 +66479,10 @@ function App({ requestLogin } = {}) {
|
|
|
66456
66479
|
...prev,
|
|
66457
66480
|
[provName]: {
|
|
66458
66481
|
status: prov.isLocal ? "unavailable" : "failed",
|
|
66459
|
-
error:
|
|
66482
|
+
error: [
|
|
66483
|
+
lastDiscoveryReason ? `no probe model: ${lastDiscoveryReason}` : "no probe model available",
|
|
66484
|
+
catalogProblem
|
|
66485
|
+
].filter((part) => Boolean(part)).map((part) => part.replace(/\.$/, "")).join(" \xB7 "),
|
|
66460
66486
|
ms
|
|
66461
66487
|
}
|
|
66462
66488
|
}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claudish",
|
|
3
|
-
"version": "9.7.
|
|
3
|
+
"version": "9.7.1",
|
|
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": "9.7.
|
|
64
|
-
"@claudish/magmux-darwin-x64": "9.7.
|
|
65
|
-
"@claudish/magmux-linux-arm64": "9.7.
|
|
66
|
-
"@claudish/magmux-linux-x64": "9.7.
|
|
63
|
+
"@claudish/magmux-darwin-arm64": "9.7.1",
|
|
64
|
+
"@claudish/magmux-darwin-x64": "9.7.1",
|
|
65
|
+
"@claudish/magmux-linux-arm64": "9.7.1",
|
|
66
|
+
"@claudish/magmux-linux-x64": "9.7.1"
|
|
67
67
|
},
|
|
68
68
|
"author": "Jack Rudenko <i@madappgang.com>",
|
|
69
69
|
"license": "MIT",
|