claudish 7.8.0 → 7.8.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 +190 -17
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -581,7 +581,7 @@ var init_onepassword_config = __esm(() => {
|
|
|
581
581
|
});
|
|
582
582
|
|
|
583
583
|
// src/version.ts
|
|
584
|
-
var VERSION = "7.8.
|
|
584
|
+
var VERSION = "7.8.1";
|
|
585
585
|
|
|
586
586
|
// src/providers/onepassword-wasm.ts
|
|
587
587
|
var exports_onepassword_wasm = {};
|
|
@@ -3071,6 +3071,7 @@ __export(exports_onepassword, {
|
|
|
3071
3071
|
resolveGlobImport: () => resolveGlobImport,
|
|
3072
3072
|
resolveDesktopAccount: () => resolveDesktopAccount,
|
|
3073
3073
|
resetSdkClientCache: () => resetSdkClientCache,
|
|
3074
|
+
recordOpHydratedVars: () => recordOpHydratedVars,
|
|
3074
3075
|
readEnvironment: () => readEnvironment,
|
|
3075
3076
|
parseOpFlag: () => parseOpFlag,
|
|
3076
3077
|
parseGlobImport: () => parseGlobImport,
|
|
@@ -3079,6 +3080,7 @@ __export(exports_onepassword, {
|
|
|
3079
3080
|
listItems: () => listItems,
|
|
3080
3081
|
isTransientSdkError: () => isTransientSdkError,
|
|
3081
3082
|
isOpReference: () => isOpReference,
|
|
3083
|
+
isOpHydratedVar: () => isOpHydratedVar,
|
|
3082
3084
|
isGlobImport: () => isGlobImport,
|
|
3083
3085
|
globToRegExp: () => globToRegExp,
|
|
3084
3086
|
filterGlobFields: () => filterGlobFields,
|
|
@@ -3097,6 +3099,15 @@ import { spawnSync } from "child_process";
|
|
|
3097
3099
|
function isOpReference(v) {
|
|
3098
3100
|
return typeof v === "string" && OP_REF_RE.test(v);
|
|
3099
3101
|
}
|
|
3102
|
+
function recordOpHydratedVars(names) {
|
|
3103
|
+
for (const n of names) {
|
|
3104
|
+
if (typeof n === "string" && n.length > 0)
|
|
3105
|
+
opHydratedVars.add(n);
|
|
3106
|
+
}
|
|
3107
|
+
}
|
|
3108
|
+
function isOpHydratedVar(name) {
|
|
3109
|
+
return !!name && opHydratedVars.has(name);
|
|
3110
|
+
}
|
|
3100
3111
|
function buildAuthError(detail) {
|
|
3101
3112
|
return new Error(`${detail}
|
|
3102
3113
|
` + "Set OP_SERVICE_ACCOUNT_TOKEN (service account, headless) or OP_ACCOUNT " + "(your 1Password account URL, e.g. my-team.1password.com) for the desktop " + "app \u2014 or set `onepasswordAccount` in ~/.claudish/config.json.");
|
|
@@ -3557,7 +3568,7 @@ async function readEnvironment(environmentId, opts = {}) {
|
|
|
3557
3568
|
}
|
|
3558
3569
|
return out;
|
|
3559
3570
|
}
|
|
3560
|
-
var OP_REF_RE, ENV_VAR_NAME_RE, sdkClientCache, defaultSdkClientFactory = async (auth) => {
|
|
3571
|
+
var OP_REF_RE, opHydratedVars, ENV_VAR_NAME_RE, sdkClientCache, defaultSdkClientFactory = async (auth) => {
|
|
3561
3572
|
const key = sdkAuthCacheKey(auth);
|
|
3562
3573
|
const cached = sdkClientCache.get(key);
|
|
3563
3574
|
if (cached)
|
|
@@ -3605,6 +3616,7 @@ var OP_REF_RE, ENV_VAR_NAME_RE, sdkClientCache, defaultSdkClientFactory = async
|
|
|
3605
3616
|
};
|
|
3606
3617
|
var init_onepassword = __esm(() => {
|
|
3607
3618
|
OP_REF_RE = /^op:\/\/[^\s]+$/;
|
|
3619
|
+
opHydratedVars = new Set;
|
|
3608
3620
|
ENV_VAR_NAME_RE = /^[A-Z_][A-Z0-9_]*$/;
|
|
3609
3621
|
sdkClientCache = new Map;
|
|
3610
3622
|
sdkQueue = Promise.resolve();
|
|
@@ -38986,7 +38998,7 @@ class ApiKeyCredentialProvider {
|
|
|
38986
38998
|
this.oauthFallback = descriptor.oauthFallback;
|
|
38987
38999
|
}
|
|
38988
39000
|
resolveSync() {
|
|
38989
|
-
return process.env[this.envVar] || this.aliases.
|
|
39001
|
+
return process.env[this.envVar] || this.aliases.map((a) => process.env[a]).find((v) => !!v) || getApiKey(this.envVar);
|
|
38990
39002
|
}
|
|
38991
39003
|
hasOauthFallbackFile() {
|
|
38992
39004
|
if (!this.oauthFallback)
|
|
@@ -40474,7 +40486,13 @@ function makeKimiCredential() {
|
|
|
40474
40486
|
return new CompositeCredentialProvider("kimi", new KimiOAuthHalf, new ApiKeyCredentialProvider({
|
|
40475
40487
|
catalogName: "kimi",
|
|
40476
40488
|
envVar: "MOONSHOT_API_KEY",
|
|
40477
|
-
aliases: ["KIMI_API_KEY"
|
|
40489
|
+
aliases: ["KIMI_API_KEY"]
|
|
40490
|
+
}), { fallbackSignal: "OAuth_FALLBACK_TO_API_KEY" });
|
|
40491
|
+
}
|
|
40492
|
+
function makeKimiCodingCredential() {
|
|
40493
|
+
return new CompositeCredentialProvider("kimi-coding", new KimiOAuthHalf, new ApiKeyCredentialProvider({
|
|
40494
|
+
catalogName: "kimi-coding",
|
|
40495
|
+
envVar: "KIMI_CODING_API_KEY"
|
|
40478
40496
|
}), { fallbackSignal: "OAuth_FALLBACK_TO_API_KEY" });
|
|
40479
40497
|
}
|
|
40480
40498
|
var init_kimi_credential = __esm(() => {
|
|
@@ -40727,7 +40745,8 @@ class CredentialAuthority {
|
|
|
40727
40745
|
const authority = new CredentialAuthority;
|
|
40728
40746
|
authority.register(makeCodexCredential(), ["openai-codex"]);
|
|
40729
40747
|
authority.register(new GeminiCodeAssistCredentialProvider, ["gemini-codeassist", "google"]);
|
|
40730
|
-
authority.register(makeKimiCredential(), ["kimi"
|
|
40748
|
+
authority.register(makeKimiCredential(), ["kimi"]);
|
|
40749
|
+
authority.register(makeKimiCodingCredential(), ["kimi-coding"]);
|
|
40731
40750
|
authority.register(new VertexCredentialProvider, ["vertex"]);
|
|
40732
40751
|
for (const name of LOCAL_PROVIDER_NAMES) {
|
|
40733
40752
|
authority.register(new LocalCredentialProvider(name), [name]);
|
|
@@ -42096,7 +42115,6 @@ function maskKey(key) {
|
|
|
42096
42115
|
}
|
|
42097
42116
|
function resolveApiKeyProvenance(envVar, aliases) {
|
|
42098
42117
|
const layers = [];
|
|
42099
|
-
const effectiveValue = process.env[envVar] || null;
|
|
42100
42118
|
let effectiveSource = "not set";
|
|
42101
42119
|
const allVars = [envVar, ...aliases || []];
|
|
42102
42120
|
const dotenvValue = readDotenvKey(allVars);
|
|
@@ -42136,6 +42154,9 @@ function resolveApiKeyProvenance(envVar, aliases) {
|
|
|
42136
42154
|
effectiveSource = "~/.claudish/config.json";
|
|
42137
42155
|
layers[1].isActive = true;
|
|
42138
42156
|
layers[2].isActive = false;
|
|
42157
|
+
} else if (isOpHydratedVar(runtimeVar)) {
|
|
42158
|
+
effectiveSource = "1Password";
|
|
42159
|
+
layers[2].source = `process.env[${runtimeVar}] (from 1Password)`;
|
|
42139
42160
|
} else {
|
|
42140
42161
|
effectiveSource = "shell environment";
|
|
42141
42162
|
}
|
|
@@ -42182,6 +42203,7 @@ function readConfigKey(envVar) {
|
|
|
42182
42203
|
}
|
|
42183
42204
|
var import_dotenv;
|
|
42184
42205
|
var init_api_key_provenance = __esm(() => {
|
|
42206
|
+
init_onepassword();
|
|
42185
42207
|
import_dotenv = __toESM(require_main(), 1);
|
|
42186
42208
|
});
|
|
42187
42209
|
|
|
@@ -44243,6 +44265,7 @@ function toProviderDef(def) {
|
|
|
44243
44265
|
defaultEndpoint: def.baseUrl || undefined,
|
|
44244
44266
|
aliases: def.apiKeyAliases,
|
|
44245
44267
|
isLocal: def.isLocal,
|
|
44268
|
+
publicKeyFallback: !!def.publicKeyFallback,
|
|
44246
44269
|
oauthSlug: def.oauthLoginSlug
|
|
44247
44270
|
};
|
|
44248
44271
|
}
|
|
@@ -44259,9 +44282,14 @@ function providerAuthSource(p, config3) {
|
|
|
44259
44282
|
return "env";
|
|
44260
44283
|
if (hasCfg)
|
|
44261
44284
|
return "cfg";
|
|
44285
|
+
if (p.publicKeyFallback)
|
|
44286
|
+
return "public";
|
|
44262
44287
|
return null;
|
|
44263
44288
|
}
|
|
44264
44289
|
function providerIsReady(p, config3) {
|
|
44290
|
+
if (!p.oauthSlug) {
|
|
44291
|
+
return providerAuthSource(p, config3) !== null;
|
|
44292
|
+
}
|
|
44265
44293
|
return credentials.isAuthenticated(p.catalogName) || providerAuthSource(p, config3) !== null;
|
|
44266
44294
|
}
|
|
44267
44295
|
function providerAuthCapabilities(p, config3) {
|
|
@@ -63270,6 +63298,48 @@ var init_probe_catalog = __esm(() => {
|
|
|
63270
63298
|
PROBE_MODELS_CACHE_PATH = join24(homedir23(), ".claudish", "probe-models.json");
|
|
63271
63299
|
});
|
|
63272
63300
|
|
|
63301
|
+
// src/providers/local-liveness.ts
|
|
63302
|
+
function localBaseUrl(catalogName) {
|
|
63303
|
+
const def = getProviderByName(catalogName);
|
|
63304
|
+
if (!def || !def.isLocal)
|
|
63305
|
+
return null;
|
|
63306
|
+
for (const envVar of def.baseUrlEnvVars ?? []) {
|
|
63307
|
+
const v = process.env[envVar];
|
|
63308
|
+
if (v)
|
|
63309
|
+
return v.replace(/\/+$/, "");
|
|
63310
|
+
}
|
|
63311
|
+
return (def.baseUrl || "").replace(/\/+$/, "") || null;
|
|
63312
|
+
}
|
|
63313
|
+
async function pingLocalProvider(catalogName, timeoutMs = PING_TIMEOUT_MS) {
|
|
63314
|
+
const base = localBaseUrl(catalogName);
|
|
63315
|
+
const path2 = HEALTH_PATH[catalogName];
|
|
63316
|
+
if (!base || !path2)
|
|
63317
|
+
return "unknown";
|
|
63318
|
+
try {
|
|
63319
|
+
await fetch(`${base}${path2}`, {
|
|
63320
|
+
method: "GET",
|
|
63321
|
+
signal: AbortSignal.timeout(timeoutMs)
|
|
63322
|
+
});
|
|
63323
|
+
return "running";
|
|
63324
|
+
} catch {
|
|
63325
|
+
return "down";
|
|
63326
|
+
}
|
|
63327
|
+
}
|
|
63328
|
+
async function pingLocalProviders(catalogNames, timeoutMs = PING_TIMEOUT_MS) {
|
|
63329
|
+
const results = await Promise.all(catalogNames.map(async (name) => [name, await pingLocalProvider(name, timeoutMs)]));
|
|
63330
|
+
return Object.fromEntries(results);
|
|
63331
|
+
}
|
|
63332
|
+
var PING_TIMEOUT_MS = 2000, HEALTH_PATH;
|
|
63333
|
+
var init_local_liveness = __esm(() => {
|
|
63334
|
+
init_provider_definitions();
|
|
63335
|
+
HEALTH_PATH = {
|
|
63336
|
+
ollama: "/api/tags",
|
|
63337
|
+
lmstudio: "/v1/models",
|
|
63338
|
+
vllm: "/v1/models",
|
|
63339
|
+
mlx: "/v1/models"
|
|
63340
|
+
};
|
|
63341
|
+
});
|
|
63342
|
+
|
|
63273
63343
|
// src/tui/probe-proxy.ts
|
|
63274
63344
|
async function ensureProbeProxy() {
|
|
63275
63345
|
if (probeProxy)
|
|
@@ -64093,6 +64163,7 @@ function ProvidersContent({
|
|
|
64093
64163
|
displayProviders,
|
|
64094
64164
|
providerIndex,
|
|
64095
64165
|
testResults,
|
|
64166
|
+
localLiveness,
|
|
64096
64167
|
contentH,
|
|
64097
64168
|
isInputMode,
|
|
64098
64169
|
animTick
|
|
@@ -64123,6 +64194,8 @@ function ProvidersContent({
|
|
|
64123
64194
|
keyDisplay = "local";
|
|
64124
64195
|
} else if (isOauthOnly) {
|
|
64125
64196
|
keyDisplay = "oauth\xB7\xB7\xB7";
|
|
64197
|
+
} else if (auth === "public") {
|
|
64198
|
+
keyDisplay = "free";
|
|
64126
64199
|
} else if (auth === "cfg") {
|
|
64127
64200
|
keyDisplay = maskKey2(config3.apiKeys?.[p.apiKeyEnvVar]);
|
|
64128
64201
|
} else if (auth === "env" || auth === "e+c") {
|
|
@@ -64133,6 +64206,23 @@ function ProvidersContent({
|
|
|
64133
64206
|
const isFirstUnready = idx === firstUnreadyIdx;
|
|
64134
64207
|
let statusFg = isReady ? C.green : C.dim;
|
|
64135
64208
|
let statusText = p.isLocal ? isReady ? "enabled" : "disabled" : isReady ? "ready" : "not set";
|
|
64209
|
+
if (p.isLocal) {
|
|
64210
|
+
const live = localLiveness[p.catalogName];
|
|
64211
|
+
if (isReady) {
|
|
64212
|
+
if (live === "running") {
|
|
64213
|
+
statusFg = C.green;
|
|
64214
|
+
statusText = "running";
|
|
64215
|
+
} else if (live === "down") {
|
|
64216
|
+
statusFg = C.yellow;
|
|
64217
|
+
statusText = "down";
|
|
64218
|
+
}
|
|
64219
|
+
} else {
|
|
64220
|
+
if (live === "running") {
|
|
64221
|
+
statusFg = C.cyan;
|
|
64222
|
+
statusText = "running \xB7 off";
|
|
64223
|
+
}
|
|
64224
|
+
}
|
|
64225
|
+
}
|
|
64136
64226
|
if (tr) {
|
|
64137
64227
|
if (tr.status === "testing") {
|
|
64138
64228
|
statusFg = C.yellow;
|
|
@@ -64368,13 +64458,15 @@ function ProviderDetail({
|
|
|
64368
64458
|
hasCfgKey,
|
|
64369
64459
|
hasEnvKey,
|
|
64370
64460
|
hasKey,
|
|
64461
|
+
isOpKey,
|
|
64462
|
+
isPublicKey,
|
|
64371
64463
|
cfgKeyMask,
|
|
64372
64464
|
envKeyMask,
|
|
64373
64465
|
activeEndpoint,
|
|
64374
64466
|
testResults,
|
|
64375
64467
|
isInputMode
|
|
64376
64468
|
}) {
|
|
64377
|
-
const displayKey = selectedProvider.isLocal ? hasKey ? "enabled" : "disabled" : hasEnvKey ? envKeyMask : hasCfgKey ? cfgKeyMask : "\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500";
|
|
64469
|
+
const displayKey = selectedProvider.isLocal ? hasKey ? "enabled" : "disabled" : hasEnvKey ? envKeyMask : hasCfgKey ? cfgKeyMask : isPublicKey ? "free" : "\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500";
|
|
64378
64470
|
if (isInputMode) {
|
|
64379
64471
|
return /* @__PURE__ */ jsxDEV6("box", {
|
|
64380
64472
|
height: DETAIL_H,
|
|
@@ -64498,7 +64590,25 @@ function ProviderDetail({
|
|
|
64498
64590
|
}, undefined, false, undefined, this)
|
|
64499
64591
|
]
|
|
64500
64592
|
}, undefined, true, undefined, this),
|
|
64501
|
-
hasKey && !selectedProvider.isLocal && /* @__PURE__ */ jsxDEV6(Fragment3, {
|
|
64593
|
+
hasKey && !selectedProvider.isLocal && isPublicKey && /* @__PURE__ */ jsxDEV6(Fragment3, {
|
|
64594
|
+
children: [
|
|
64595
|
+
/* @__PURE__ */ jsxDEV6("span", {
|
|
64596
|
+
fg: C.dim,
|
|
64597
|
+
children: " "
|
|
64598
|
+
}, undefined, false, undefined, this),
|
|
64599
|
+
/* @__PURE__ */ jsxDEV6("span", {
|
|
64600
|
+
fg: C.blue,
|
|
64601
|
+
attributes: A.bold,
|
|
64602
|
+
children: "From: "
|
|
64603
|
+
}, undefined, false, undefined, this),
|
|
64604
|
+
/* @__PURE__ */ jsxDEV6("span", {
|
|
64605
|
+
fg: C.green,
|
|
64606
|
+
attributes: A.bold,
|
|
64607
|
+
children: "public key (free)"
|
|
64608
|
+
}, undefined, false, undefined, this)
|
|
64609
|
+
]
|
|
64610
|
+
}, undefined, true, undefined, this),
|
|
64611
|
+
hasKey && !selectedProvider.isLocal && !isPublicKey && /* @__PURE__ */ jsxDEV6(Fragment3, {
|
|
64502
64612
|
children: [
|
|
64503
64613
|
/* @__PURE__ */ jsxDEV6("span", {
|
|
64504
64614
|
fg: C.dim,
|
|
@@ -64512,7 +64622,7 @@ function ProviderDetail({
|
|
|
64512
64622
|
hasEnvKey && /* @__PURE__ */ jsxDEV6("span", {
|
|
64513
64623
|
fg: C.green,
|
|
64514
64624
|
attributes: A.bold,
|
|
64515
|
-
children: "env"
|
|
64625
|
+
children: isOpKey ? "1Password" : "env"
|
|
64516
64626
|
}, undefined, false, undefined, this),
|
|
64517
64627
|
hasEnvKey && hasCfgKey && /* @__PURE__ */ jsxDEV6("span", {
|
|
64518
64628
|
fg: C.fgMuted,
|
|
@@ -67728,6 +67838,7 @@ function App({ requestLogin } = {}) {
|
|
|
67728
67838
|
const [editingExistingPattern, setEditingExistingPattern] = useState5(null);
|
|
67729
67839
|
const [statusMsg, setStatusMsg] = useState5(null);
|
|
67730
67840
|
const [testResults, setTestResults] = useState5({});
|
|
67841
|
+
const [localLiveness, setLocalLiveness] = useState5({});
|
|
67731
67842
|
const [animTick, setAnimTick] = useState5(0);
|
|
67732
67843
|
const anyTesting = useMemo2(() => Object.values(testResults).some((r) => r?.status === "testing"), [testResults]);
|
|
67733
67844
|
useEffect4(() => {
|
|
@@ -67736,6 +67847,25 @@ function App({ requestLogin } = {}) {
|
|
|
67736
67847
|
const id = setInterval(() => setAnimTick((tick) => (tick + 1) % 1e6), 90);
|
|
67737
67848
|
return () => clearInterval(id);
|
|
67738
67849
|
}, [anyTesting]);
|
|
67850
|
+
useEffect4(() => {
|
|
67851
|
+
if (activeTab !== "providers")
|
|
67852
|
+
return;
|
|
67853
|
+
let cancelled = false;
|
|
67854
|
+
const localNames = PROVIDERS.filter((p) => p.isLocal).map((p) => p.catalogName);
|
|
67855
|
+
if (localNames.length === 0)
|
|
67856
|
+
return;
|
|
67857
|
+
const sweep = async () => {
|
|
67858
|
+
const map3 = await pingLocalProviders(localNames);
|
|
67859
|
+
if (!cancelled)
|
|
67860
|
+
setLocalLiveness(map3);
|
|
67861
|
+
};
|
|
67862
|
+
sweep();
|
|
67863
|
+
const id = setInterval(() => void sweep(), 1e4);
|
|
67864
|
+
return () => {
|
|
67865
|
+
cancelled = true;
|
|
67866
|
+
clearInterval(id);
|
|
67867
|
+
};
|
|
67868
|
+
}, [activeTab]);
|
|
67739
67869
|
const [profileIndex, setProfileIndex] = useState5(0);
|
|
67740
67870
|
const [opIndex, setOpIndex] = useState5(0);
|
|
67741
67871
|
const [opScopeCursor, setOpScopeCursor] = useState5(0);
|
|
@@ -67781,6 +67911,15 @@ function App({ requestLogin } = {}) {
|
|
|
67781
67911
|
setBufStats(getBufferStats());
|
|
67782
67912
|
setOpTick((t) => t + 1);
|
|
67783
67913
|
}, []);
|
|
67914
|
+
const clearTestResult = useCallback3((provName) => {
|
|
67915
|
+
setTestResults((prev) => {
|
|
67916
|
+
if (!(provName in prev))
|
|
67917
|
+
return prev;
|
|
67918
|
+
const next = { ...prev };
|
|
67919
|
+
delete next[provName];
|
|
67920
|
+
return next;
|
|
67921
|
+
});
|
|
67922
|
+
}, []);
|
|
67784
67923
|
const probe = useRouteProbe(config3);
|
|
67785
67924
|
const { probeMode, probeModel, probeResults } = probe;
|
|
67786
67925
|
const wizard = useProfileWizard({ mode, setMode, refreshConfig, setStatusMsg });
|
|
@@ -67793,7 +67932,9 @@ function App({ requestLogin } = {}) {
|
|
|
67793
67932
|
} = wizard;
|
|
67794
67933
|
const hasCfgKey = !!config3.apiKeys?.[selectedProvider.apiKeyEnvVar];
|
|
67795
67934
|
const hasEnvKey = !!process.env[selectedProvider.apiKeyEnvVar];
|
|
67796
|
-
const
|
|
67935
|
+
const selectedPublicKey = !!selectedProvider.publicKeyFallback && !hasCfgKey && !hasEnvKey;
|
|
67936
|
+
const hasKey = hasCfgKey || hasEnvKey || selectedLocalEnabled || selectedPublicKey;
|
|
67937
|
+
const isOpKey = hasEnvKey && isOpHydratedVar(selectedProvider.apiKeyEnvVar);
|
|
67797
67938
|
const cfgKeyMask = maskKey2(config3.apiKeys?.[selectedProvider.apiKeyEnvVar]);
|
|
67798
67939
|
const envKeyMask = maskKey2(process.env[selectedProvider.apiKeyEnvVar]);
|
|
67799
67940
|
const activeEndpointEnvVar = selectedProvider.endpointEnvVar;
|
|
@@ -68141,6 +68282,20 @@ function App({ requestLogin } = {}) {
|
|
|
68141
68282
|
const runProbeTest = useCallback3(async (prov) => {
|
|
68142
68283
|
const provName = prov.name;
|
|
68143
68284
|
setTestResults((prev) => ({ ...prev, [provName]: { status: "testing" } }));
|
|
68285
|
+
if (prov.isLocal) {
|
|
68286
|
+
const live = await pingLocalProvider(prov.catalogName);
|
|
68287
|
+
if (live === "down") {
|
|
68288
|
+
const base = localBaseUrl(prov.catalogName);
|
|
68289
|
+
setTestResults((prev) => ({
|
|
68290
|
+
...prev,
|
|
68291
|
+
[provName]: {
|
|
68292
|
+
status: "failed",
|
|
68293
|
+
error: `not running${base ? ` (${base} unreachable)` : ""}`
|
|
68294
|
+
}
|
|
68295
|
+
}));
|
|
68296
|
+
return;
|
|
68297
|
+
}
|
|
68298
|
+
}
|
|
68144
68299
|
const outcome = await ensureProbeModelsCached();
|
|
68145
68300
|
if (outcome.kind !== "ok") {
|
|
68146
68301
|
setTestResults((prev) => ({
|
|
@@ -68292,6 +68447,7 @@ function App({ requestLogin } = {}) {
|
|
|
68292
68447
|
}
|
|
68293
68448
|
invalidateProbeProxyHandlers(selectedProvider.catalogName);
|
|
68294
68449
|
invalidateProbeDiscovery(selectedProvider.catalogName);
|
|
68450
|
+
clearTestResult(selectedProvider.name);
|
|
68295
68451
|
refreshConfig();
|
|
68296
68452
|
setInputValue("");
|
|
68297
68453
|
setMode("browse");
|
|
@@ -68809,6 +68965,7 @@ function App({ requestLogin } = {}) {
|
|
|
68809
68965
|
if (changed) {
|
|
68810
68966
|
invalidateProbeProxyHandlers(selectedProvider.catalogName);
|
|
68811
68967
|
invalidateProbeDiscovery(selectedProvider.catalogName);
|
|
68968
|
+
clearTestResult(selectedProvider.name);
|
|
68812
68969
|
refreshConfig();
|
|
68813
68970
|
setStatusMsg(`Stored config removed for ${selectedProvider.displayName}.`);
|
|
68814
68971
|
} else {
|
|
@@ -68830,7 +68987,8 @@ function App({ requestLogin } = {}) {
|
|
|
68830
68987
|
} else if (key.raw === "T") {
|
|
68831
68988
|
const fired = [];
|
|
68832
68989
|
for (const prov of PROVIDERS) {
|
|
68833
|
-
|
|
68990
|
+
const localRunning = prov.isLocal && localLiveness[prov.catalogName] === "running";
|
|
68991
|
+
if (!providerIsReady(prov, config3) && !localRunning)
|
|
68834
68992
|
continue;
|
|
68835
68993
|
fired.push(prov.displayName);
|
|
68836
68994
|
runProbeTest(prov);
|
|
@@ -68843,10 +69001,11 @@ function App({ requestLogin } = {}) {
|
|
|
68843
69001
|
}
|
|
68844
69002
|
} else if (key.name === "t") {
|
|
68845
69003
|
const caps = providerAuthCapabilities(selectedProvider, config3);
|
|
68846
|
-
const
|
|
69004
|
+
const localRunning = selectedProviderIsLocal && localLiveness[selectedProvider.catalogName] === "running";
|
|
69005
|
+
const ready = providerIsReady(selectedProvider, config3) || localRunning;
|
|
68847
69006
|
if (!ready) {
|
|
68848
69007
|
if (selectedProviderIsLocal) {
|
|
68849
|
-
setStatusMsg(`${selectedProvider.displayName}: disabled.
|
|
69008
|
+
setStatusMsg(`${selectedProvider.displayName}: not running / disabled. Start the server, or press e to enable.`);
|
|
68850
69009
|
} else if (caps.apiKey.supported && caps.oauth.supported) {
|
|
68851
69010
|
setStatusMsg(`${selectedProvider.displayName}: no credentials. Press s to set a key or l to login.`);
|
|
68852
69011
|
} else if (caps.oauth.supported) {
|
|
@@ -69156,6 +69315,7 @@ function App({ requestLogin } = {}) {
|
|
|
69156
69315
|
displayProviders,
|
|
69157
69316
|
providerIndex,
|
|
69158
69317
|
testResults,
|
|
69318
|
+
localLiveness,
|
|
69159
69319
|
contentH,
|
|
69160
69320
|
isInputMode,
|
|
69161
69321
|
animTick
|
|
@@ -69169,6 +69329,8 @@ function App({ requestLogin } = {}) {
|
|
|
69169
69329
|
hasCfgKey,
|
|
69170
69330
|
hasEnvKey,
|
|
69171
69331
|
hasKey,
|
|
69332
|
+
isOpKey,
|
|
69333
|
+
isPublicKey: selectedPublicKey,
|
|
69172
69334
|
cfgKeyMask,
|
|
69173
69335
|
envKeyMask,
|
|
69174
69336
|
activeEndpoint,
|
|
@@ -69303,6 +69465,7 @@ var init_App = __esm(() => {
|
|
|
69303
69465
|
init_probe_discovery();
|
|
69304
69466
|
init_probe_live();
|
|
69305
69467
|
init_probe_runner();
|
|
69468
|
+
init_local_liveness();
|
|
69306
69469
|
init_stats_buffer();
|
|
69307
69470
|
init_providers();
|
|
69308
69471
|
init_theme2();
|
|
@@ -70375,13 +70538,14 @@ async function applyOpEnvironment() {
|
|
|
70375
70538
|
if (envIds.length === 0)
|
|
70376
70539
|
return;
|
|
70377
70540
|
try {
|
|
70378
|
-
const { readEnvironment: readEnvironment2 } = await Promise.resolve().then(() => (init_onepassword(), exports_onepassword));
|
|
70541
|
+
const { readEnvironment: readEnvironment2, recordOpHydratedVars: recordOpHydratedVars2 } = await Promise.resolve().then(() => (init_onepassword(), exports_onepassword));
|
|
70379
70542
|
const auth = await getSdkAuth();
|
|
70380
70543
|
for (const envId of envIds) {
|
|
70381
70544
|
const vars = await readEnvironment2(envId, { auth });
|
|
70382
70545
|
for (const [key, value] of Object.entries(vars)) {
|
|
70383
70546
|
process.env[key] = value;
|
|
70384
70547
|
}
|
|
70548
|
+
recordOpHydratedVars2(Object.keys(vars));
|
|
70385
70549
|
}
|
|
70386
70550
|
} catch (err) {
|
|
70387
70551
|
const message = err instanceof Error ? err.message : String(err);
|
|
@@ -70413,12 +70577,13 @@ async function applyOpImport() {
|
|
|
70413
70577
|
process.exit(0);
|
|
70414
70578
|
}
|
|
70415
70579
|
try {
|
|
70416
|
-
const { resolveGlobImport: resolveGlobImport2 } = await Promise.resolve().then(() => (init_onepassword(), exports_onepassword));
|
|
70580
|
+
const { resolveGlobImport: resolveGlobImport2, recordOpHydratedVars: recordOpHydratedVars2 } = await Promise.resolve().then(() => (init_onepassword(), exports_onepassword));
|
|
70417
70581
|
const auth = await getSdkAuth();
|
|
70418
70582
|
const resolved = await resolveGlobImport2(glob, { auth });
|
|
70419
70583
|
for (const [key, value] of Object.entries(resolved)) {
|
|
70420
70584
|
process.env[key] = value;
|
|
70421
70585
|
}
|
|
70586
|
+
recordOpHydratedVars2(Object.keys(resolved));
|
|
70422
70587
|
} catch (err) {
|
|
70423
70588
|
const message = err instanceof Error ? err.message : String(err);
|
|
70424
70589
|
console.error(`[claudish] 1Password --op import failed: ${message}`);
|
|
@@ -70483,13 +70648,19 @@ async function loadStoredApiKeys(neededEnvVars) {
|
|
|
70483
70648
|
if (refKeys.length === 0 && globImports.length === 0)
|
|
70484
70649
|
return;
|
|
70485
70650
|
try {
|
|
70486
|
-
const {
|
|
70651
|
+
const {
|
|
70652
|
+
resolveSecrets: resolveSecrets2,
|
|
70653
|
+
resolveGlobImport: resolveGlobImport2,
|
|
70654
|
+
resolveGlobImportForEnvVars: resolveGlobImportForEnvVars2,
|
|
70655
|
+
recordOpHydratedVars: recordOpHydratedVars2
|
|
70656
|
+
} = await Promise.resolve().then(() => (init_onepassword(), exports_onepassword));
|
|
70487
70657
|
const auth = await getSdkAuth();
|
|
70488
70658
|
if (refKeys.length > 0) {
|
|
70489
70659
|
const resolved = await resolveSecrets2(opRefs, { auth });
|
|
70490
70660
|
for (const [envVar, value] of Object.entries(resolved)) {
|
|
70491
70661
|
process.env[envVar] = value;
|
|
70492
70662
|
}
|
|
70663
|
+
recordOpHydratedVars2(Object.keys(resolved));
|
|
70493
70664
|
}
|
|
70494
70665
|
for (const globPath of globImports) {
|
|
70495
70666
|
try {
|
|
@@ -70503,6 +70674,7 @@ async function loadStoredApiKeys(neededEnvVars) {
|
|
|
70503
70674
|
for (const [envVar, value] of Object.entries(resolved)) {
|
|
70504
70675
|
if (!process.env[envVar]) {
|
|
70505
70676
|
process.env[envVar] = value;
|
|
70677
|
+
recordOpHydratedVars2([envVar]);
|
|
70506
70678
|
}
|
|
70507
70679
|
}
|
|
70508
70680
|
} catch (globErr) {
|
|
@@ -70546,12 +70718,13 @@ async function applyCustomEndpointOpKeys(neededEnvVars) {
|
|
|
70546
70718
|
if (Object.keys(refs).length === 0)
|
|
70547
70719
|
return;
|
|
70548
70720
|
try {
|
|
70549
|
-
const { resolveSecrets: resolveSecrets2 } = await Promise.resolve().then(() => (init_onepassword(), exports_onepassword));
|
|
70721
|
+
const { resolveSecrets: resolveSecrets2, recordOpHydratedVars: recordOpHydratedVars2 } = await Promise.resolve().then(() => (init_onepassword(), exports_onepassword));
|
|
70550
70722
|
const auth = await getSdkAuth();
|
|
70551
70723
|
const resolved = await resolveSecrets2(refs, { auth });
|
|
70552
70724
|
for (const [envVar, value] of Object.entries(resolved)) {
|
|
70553
70725
|
process.env[envVar] = value;
|
|
70554
70726
|
}
|
|
70727
|
+
recordOpHydratedVars2(Object.keys(resolved));
|
|
70555
70728
|
} catch (err) {
|
|
70556
70729
|
const message = err instanceof Error ? err.message : String(err);
|
|
70557
70730
|
console.error(`[claudish] 1Password custom-endpoint key resolution failed: ${message}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claudish",
|
|
3
|
-
"version": "7.8.
|
|
3
|
+
"version": "7.8.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": "7.8.
|
|
64
|
-
"@claudish/magmux-darwin-x64": "7.8.
|
|
65
|
-
"@claudish/magmux-linux-arm64": "7.8.
|
|
66
|
-
"@claudish/magmux-linux-x64": "7.8.
|
|
63
|
+
"@claudish/magmux-darwin-arm64": "7.8.1",
|
|
64
|
+
"@claudish/magmux-darwin-x64": "7.8.1",
|
|
65
|
+
"@claudish/magmux-linux-arm64": "7.8.1",
|
|
66
|
+
"@claudish/magmux-linux-x64": "7.8.1"
|
|
67
67
|
},
|
|
68
68
|
"author": "Jack Rudenko <i@madappgang.com>",
|
|
69
69
|
"license": "MIT",
|