@sheetxl/utils-node 1.0.3 → 1.0.5
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/node/esm/index.mjs +110 -106
- package/package.json +1 -1
- package/types/src/info/mcpClients.d.ts +8 -1
package/node/esm/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/utils-node - SheetXL - Node-only utilities: terminal presentation, environment reporting, tool logging - v1.0.
|
|
2
|
+
* @license @sheetxl/utils-node - SheetXL - Node-only utilities: terminal presentation, environment reporting, tool logging - v1.0.5
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: MIT
|
|
@@ -160,26 +160,26 @@ function N(e, t) {
|
|
|
160
160
|
}
|
|
161
161
|
return 0;
|
|
162
162
|
}
|
|
163
|
-
var T = "claude mcp add sheetxl -- npx -y @sheetxl/mcp",
|
|
163
|
+
var T = "claude mcp add sheetxl -- npx -y @sheetxl/mcp", P = {
|
|
164
164
|
command: "npx",
|
|
165
165
|
args: ["-y", "@sheetxl/mcp"]
|
|
166
|
-
},
|
|
167
|
-
function
|
|
166
|
+
}, L = "npx -y sheetxl setup agent", _ = "npx -y skills add sheetxl/skills -g --all", E = "npx -y skills update";
|
|
167
|
+
function M(e) {
|
|
168
168
|
const t = s.resolve(e).replace(/\\/g, "/").replace(/\/+$/, "");
|
|
169
169
|
return "win32" === process.platform || "darwin" === process.platform ? t.toLowerCase() : t;
|
|
170
170
|
}
|
|
171
|
-
async function
|
|
172
|
-
const
|
|
173
|
-
return await Promise.all(function(e) {
|
|
174
|
-
const t = process.env.APPDATA,
|
|
171
|
+
async function D(e, t = {}) {
|
|
172
|
+
const o = [];
|
|
173
|
+
return await Promise.all(function(e, t) {
|
|
174
|
+
const o = t.home ?? n.homedir(), r = t.platform ?? process.platform, i = t.appData ?? process.env.APPDATA, a = (...e) => "win32" === r ? i ? s.join(i, ...e) : null : "darwin" === r ? s.join(o, "Library", "Application Support", ...e) : s.join(o, ".config", ...e);
|
|
175
175
|
return [
|
|
176
176
|
{
|
|
177
177
|
name: "claude-code",
|
|
178
|
-
file: s.join(
|
|
178
|
+
file: s.join(o, ".claude.json")
|
|
179
179
|
},
|
|
180
180
|
{
|
|
181
181
|
name: "claude-code (plugin)",
|
|
182
|
-
file: s.join(
|
|
182
|
+
file: s.join(o, ".claude", "settings.json")
|
|
183
183
|
},
|
|
184
184
|
{
|
|
185
185
|
name: "claude-code (project)",
|
|
@@ -187,11 +187,11 @@ async function I(e) {
|
|
|
187
187
|
},
|
|
188
188
|
{
|
|
189
189
|
name: "claude-desktop",
|
|
190
|
-
file:
|
|
190
|
+
file: a("Claude", "claude_desktop_config.json")
|
|
191
191
|
},
|
|
192
192
|
{
|
|
193
193
|
name: "cursor",
|
|
194
|
-
file: s.join(
|
|
194
|
+
file: s.join(o, ".cursor", "mcp.json")
|
|
195
195
|
},
|
|
196
196
|
{
|
|
197
197
|
name: "cursor (project)",
|
|
@@ -199,7 +199,11 @@ async function I(e) {
|
|
|
199
199
|
},
|
|
200
200
|
{
|
|
201
201
|
name: "windsurf",
|
|
202
|
-
file: s.join(
|
|
202
|
+
file: s.join(o, ".codeium", "windsurf", "mcp_config.json")
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
name: "vscode",
|
|
206
|
+
file: a("Code", "User", "mcp.json")
|
|
203
207
|
},
|
|
204
208
|
{
|
|
205
209
|
name: "vscode (project)",
|
|
@@ -207,19 +211,19 @@ async function I(e) {
|
|
|
207
211
|
},
|
|
208
212
|
{
|
|
209
213
|
name: "codex",
|
|
210
|
-
file: s.join(
|
|
214
|
+
file: s.join(o, ".codex", "config.toml")
|
|
211
215
|
}
|
|
212
216
|
];
|
|
213
|
-
}(e).map(async ({ name:
|
|
214
|
-
if (
|
|
217
|
+
}(e, t).map(async ({ name: t, file: n }) => {
|
|
218
|
+
if (n) try {
|
|
215
219
|
(function(e, t, n) {
|
|
216
220
|
if (t.endsWith(".toml")) return /sheetxl/i.test(e);
|
|
217
221
|
try {
|
|
218
|
-
const t = JSON.parse(e), s =
|
|
222
|
+
const t = JSON.parse(e), s = M(n), o = [
|
|
219
223
|
t.mcpServers,
|
|
220
224
|
t.servers,
|
|
221
225
|
t.enabledPlugins,
|
|
222
|
-
...Object.entries(t.projects ?? {}).filter(([e]) =>
|
|
226
|
+
...Object.entries(t.projects ?? {}).filter(([e]) => M(e) === s).map(([, e]) => e?.mcpServers)
|
|
223
227
|
];
|
|
224
228
|
for (const e of o) if (e && "object" == typeof e) for (const [t, n] of Object.entries(e)) {
|
|
225
229
|
if (!1 === n) continue;
|
|
@@ -231,29 +235,29 @@ async function I(e) {
|
|
|
231
235
|
} catch {
|
|
232
236
|
return /sheetxl/i.test(e);
|
|
233
237
|
}
|
|
234
|
-
})(await c(
|
|
235
|
-
name:
|
|
236
|
-
file:
|
|
238
|
+
})(await c(n, "utf-8"), n, e) && o.push({
|
|
239
|
+
name: t,
|
|
240
|
+
file: n
|
|
237
241
|
});
|
|
238
242
|
} catch {}
|
|
239
|
-
})),
|
|
243
|
+
})), o.sort((e, t) => e.name.localeCompare(t.name));
|
|
240
244
|
}
|
|
241
|
-
var
|
|
242
|
-
function
|
|
243
|
-
return `${e} --install-extension ${
|
|
245
|
+
var I = "sheetxl.sheetxl-vscode";
|
|
246
|
+
function B(e = "code") {
|
|
247
|
+
return `${e} --install-extension ${I}`;
|
|
244
248
|
}
|
|
245
|
-
var
|
|
249
|
+
var J = [
|
|
246
250
|
".vscode",
|
|
247
251
|
".vscode-insiders",
|
|
248
252
|
".vscode-server"
|
|
249
|
-
],
|
|
250
|
-
function
|
|
253
|
+
], W = ["code", "code-insiders"];
|
|
254
|
+
function H(e, t) {
|
|
251
255
|
for (const n of t) for (const t of e) try {
|
|
252
256
|
if (o(s.join(n, t))) return s.join(n, t);
|
|
253
257
|
} catch {}
|
|
254
258
|
return null;
|
|
255
259
|
}
|
|
256
|
-
function
|
|
260
|
+
function V(e) {
|
|
257
261
|
let t;
|
|
258
262
|
try {
|
|
259
263
|
t = i(s.join(e, "extensions"));
|
|
@@ -261,7 +265,7 @@ function X(e) {
|
|
|
261
265
|
return null;
|
|
262
266
|
}
|
|
263
267
|
let n = null;
|
|
264
|
-
const o = `${
|
|
268
|
+
const o = `${I}-`;
|
|
265
269
|
for (const e of t) {
|
|
266
270
|
if (!e.toLowerCase().startsWith(o)) continue;
|
|
267
271
|
const t = e.slice(o.length).match(/^\d+\.\d+\.\d+/)?.[0];
|
|
@@ -269,18 +273,18 @@ function X(e) {
|
|
|
269
273
|
}
|
|
270
274
|
return n;
|
|
271
275
|
}
|
|
272
|
-
function
|
|
276
|
+
function X(e = {}) {
|
|
273
277
|
const t = e.home ?? n.homedir(), r = e.platform ?? process.platform, i = e.pathDirs ?? (process.env.PATH ?? "").split(s.delimiter).filter(Boolean);
|
|
274
278
|
let a = null;
|
|
275
|
-
for (const e of
|
|
279
|
+
for (const e of W) if (H("win32" === r ? [`${e}.cmd`, e] : [e], i)) {
|
|
276
280
|
a = e;
|
|
277
281
|
break;
|
|
278
282
|
}
|
|
279
|
-
const l =
|
|
283
|
+
const l = J.map((e) => s.join(t, e)).filter((e) => o(e));
|
|
280
284
|
if (!a && !l.length) return null;
|
|
281
285
|
let c = null;
|
|
282
286
|
for (const e of l) {
|
|
283
|
-
const t =
|
|
287
|
+
const t = V(e);
|
|
284
288
|
t && (!c || N(t, c) > 0) && (c = t);
|
|
285
289
|
}
|
|
286
290
|
return {
|
|
@@ -288,10 +292,10 @@ function U(e = {}) {
|
|
|
288
292
|
extension: c
|
|
289
293
|
};
|
|
290
294
|
}
|
|
291
|
-
var
|
|
292
|
-
function
|
|
295
|
+
var U = e(import.meta.url);
|
|
296
|
+
function K(e) {
|
|
293
297
|
try {
|
|
294
|
-
return s.dirname(
|
|
298
|
+
return s.dirname(U.resolve(`${e}/package.json`));
|
|
295
299
|
} catch {}
|
|
296
300
|
for (const t of function(e) {
|
|
297
301
|
const t = [];
|
|
@@ -299,13 +303,13 @@ function R(e) {
|
|
|
299
303
|
t.push(f(import.meta.resolve(e)));
|
|
300
304
|
} catch {}
|
|
301
305
|
try {
|
|
302
|
-
t.push(
|
|
306
|
+
t.push(U.resolve(e));
|
|
303
307
|
} catch {}
|
|
304
308
|
return t;
|
|
305
309
|
}(e)) {
|
|
306
310
|
let n = s.dirname(t);
|
|
307
311
|
for (let t = 0; t < 8; t++) {
|
|
308
|
-
if (
|
|
312
|
+
if (R(n) === e) return n;
|
|
309
313
|
const t = s.dirname(n);
|
|
310
314
|
if (t === n) break;
|
|
311
315
|
n = t;
|
|
@@ -313,26 +317,26 @@ function R(e) {
|
|
|
313
317
|
}
|
|
314
318
|
return null;
|
|
315
319
|
}
|
|
316
|
-
function
|
|
320
|
+
function R(e) {
|
|
317
321
|
try {
|
|
318
322
|
return JSON.parse(r(s.join(e, "package.json"), "utf-8")).name ?? null;
|
|
319
323
|
} catch {
|
|
320
324
|
return null;
|
|
321
325
|
}
|
|
322
326
|
}
|
|
323
|
-
function
|
|
327
|
+
function Y(e) {
|
|
324
328
|
return {
|
|
325
329
|
version: e.getBuildVersion() || "local",
|
|
326
330
|
build: e.getBuildDate() || null
|
|
327
331
|
};
|
|
328
332
|
}
|
|
329
|
-
async function
|
|
330
|
-
const { surface: t, offline: i = !1, includeHost: a = !1, serverCount: l } = e, u = e.workspace ?? process.env.SHEETXL_WORKSPACE ?? process.cwd(), h = e.license(), d = h.then((e) => i || "local" ===
|
|
333
|
+
async function q(e) {
|
|
334
|
+
const { surface: t, offline: i = !1, includeHost: a = !1, serverCount: l } = e, u = e.workspace ?? process.env.SHEETXL_WORKSPACE ?? process.cwd(), h = e.license(), d = h.then((e) => i || "local" === Y(e).version ? null : C(Y(e).version)), [p, m, g, v] = await Promise.all([
|
|
331
335
|
h,
|
|
332
|
-
|
|
336
|
+
z(e, i),
|
|
333
337
|
d,
|
|
334
|
-
|
|
335
|
-
]), w =
|
|
338
|
+
D(u)
|
|
339
|
+
]), w = Y(p), x = function(e, t) {
|
|
336
340
|
return {
|
|
337
341
|
name: "license",
|
|
338
342
|
...e.getSummary(t)
|
|
@@ -362,7 +366,7 @@ async function z(e) {
|
|
|
362
366
|
};
|
|
363
367
|
e = s.dirname(e);
|
|
364
368
|
}
|
|
365
|
-
const t =
|
|
369
|
+
const t = K("@sheetxl/sdk");
|
|
366
370
|
if (!t) return {
|
|
367
371
|
path: null,
|
|
368
372
|
exists: !1
|
|
@@ -398,11 +402,11 @@ async function z(e) {
|
|
|
398
402
|
level: "warn",
|
|
399
403
|
value: S.path ?? "not resolved",
|
|
400
404
|
detail: S.path ? "declared but not present — the engine build may be incomplete" : "@sheetxl/sdk is not reachable from here",
|
|
401
|
-
fix:
|
|
405
|
+
fix: L
|
|
402
406
|
});
|
|
403
407
|
const A = await async function(e, t) {
|
|
404
408
|
const r = await async function(e) {
|
|
405
|
-
const t =
|
|
409
|
+
const t = K(e);
|
|
406
410
|
if (!t) return null;
|
|
407
411
|
try {
|
|
408
412
|
return JSON.parse(await c(s.join(t, "package.json"), "utf-8")).version ?? null;
|
|
@@ -425,14 +429,14 @@ async function z(e) {
|
|
|
425
429
|
if ("0.0.0" === r) return {
|
|
426
430
|
name: "skills",
|
|
427
431
|
level: "ok",
|
|
428
|
-
value:
|
|
432
|
+
value: K("@sheetxl/skills") ?? "@sheetxl/skills (workspace)",
|
|
429
433
|
detail: [`workspace copy — SKILL.md and references/ — ${i}`, a ? `read this copy first: it tracks the engine you are running; the installed copy at ${a} tracks a release and is the fallback` : null].filter(Boolean).join("; ")
|
|
430
434
|
};
|
|
431
435
|
if (!a) return {
|
|
432
436
|
name: "skills",
|
|
433
437
|
level: "ok",
|
|
434
438
|
value: `@sheetxl/skills ${r}`,
|
|
435
|
-
detail: `version-matched to this ${"mcp" === e ? "server" : "install"} — ${i}` + ("cli" === e ? `; no copy found in your agent's skill directories — \`${
|
|
439
|
+
detail: `version-matched to this ${"mcp" === e ? "server" : "install"} — ${i}` + ("cli" === e ? `; no copy found in your agent's skill directories — \`${_}\` installs one` : "")
|
|
436
440
|
};
|
|
437
441
|
const l = await async function(e) {
|
|
438
442
|
try {
|
|
@@ -467,7 +471,7 @@ async function z(e) {
|
|
|
467
471
|
const O = m.some((e) => e.hasView ?? "attended" === e.kind);
|
|
468
472
|
"mcp" === t ? $.push(function(e) {
|
|
469
473
|
const t = function(e) {
|
|
470
|
-
return
|
|
474
|
+
return H("win32" === process.platform ? [
|
|
471
475
|
"sheetxl.cmd",
|
|
472
476
|
"sheetxl.exe",
|
|
473
477
|
"sheetxl"
|
|
@@ -506,7 +510,7 @@ async function z(e) {
|
|
|
506
510
|
};
|
|
507
511
|
}(v, O));
|
|
508
512
|
const T = O ? null : function() {
|
|
509
|
-
const e =
|
|
513
|
+
const e = X();
|
|
510
514
|
if (!e) return null;
|
|
511
515
|
const t = "a live grid beside the agent, with in-grid highlights and questions";
|
|
512
516
|
return e.extension ? {
|
|
@@ -518,7 +522,7 @@ async function z(e) {
|
|
|
518
522
|
name: "vscode",
|
|
519
523
|
level: "ok",
|
|
520
524
|
value: "available — SheetXL extension not installed",
|
|
521
|
-
detail: `optional: the extension gives the person ${t}. Offer it, do not install it unasked — ` + (e.launcher ? `\`${
|
|
525
|
+
detail: `optional: the extension gives the person ${t}. Offer it, do not install it unasked — ` + (e.launcher ? `\`${B(e.launcher)}\`` : "search \"SheetXL\" in the Extensions view")
|
|
522
526
|
};
|
|
523
527
|
}();
|
|
524
528
|
return T && $.push(T), void 0 !== l && l > 1 && $.push({
|
|
@@ -562,10 +566,10 @@ async function z(e) {
|
|
|
562
566
|
attended: O,
|
|
563
567
|
sessions: m,
|
|
564
568
|
checks: $,
|
|
565
|
-
host: a ?
|
|
569
|
+
host: a ? F() : void 0
|
|
566
570
|
};
|
|
567
571
|
}
|
|
568
|
-
async function
|
|
572
|
+
async function z(e, t) {
|
|
569
573
|
if (e.sessions) return [...await e.sessions()];
|
|
570
574
|
if (t) return [];
|
|
571
575
|
try {
|
|
@@ -583,7 +587,7 @@ async function F(e, t) {
|
|
|
583
587
|
return [];
|
|
584
588
|
}
|
|
585
589
|
}
|
|
586
|
-
function
|
|
590
|
+
function F() {
|
|
587
591
|
const e = n.cpus(), t = process.memoryUsage(), o = n.totalmem();
|
|
588
592
|
return {
|
|
589
593
|
platform: n.platform(),
|
|
@@ -601,31 +605,31 @@ function G() {
|
|
|
601
605
|
configStore: s.join(n.homedir(), ".config", "configstore", "sheetxl.json")
|
|
602
606
|
};
|
|
603
607
|
}
|
|
604
|
-
var
|
|
608
|
+
var G = {
|
|
605
609
|
ok: " ",
|
|
606
610
|
warn: "!",
|
|
607
611
|
error: "✗"
|
|
608
|
-
},
|
|
609
|
-
function
|
|
612
|
+
}, Q = (e, n) => "error" === e ? t.red(n) : "warn" === e ? t.yellow(n) : t.white(n);
|
|
613
|
+
function Z(e) {
|
|
610
614
|
const t = e.ok ? "engine ready" : "not ready", n = e.attended ? "attended" : "unattended";
|
|
611
|
-
return `${e.product} — ${t} · ${n} · as of ${
|
|
615
|
+
return `${e.product} — ${t} · ${n} · as of ${ee(e.collectedAt)}`;
|
|
612
616
|
}
|
|
613
|
-
function
|
|
617
|
+
function ee(e) {
|
|
614
618
|
const t = new Date(e);
|
|
615
619
|
return Number.isNaN(t.getTime()) ? "unknown" : t.toTimeString().slice(0, 8);
|
|
616
620
|
}
|
|
617
|
-
function
|
|
621
|
+
function te(e) {
|
|
618
622
|
const n = e.checks, s = Math.max(...n.map((e) => e.name.length)) + 2, o = " ".repeat(s + 4), r = [];
|
|
619
|
-
r.push(e.ok ? t.cyanBright(
|
|
623
|
+
r.push(e.ok ? t.cyanBright(Z(e)) : t.yellow(Z(e))), r.push("");
|
|
620
624
|
for (const e of n) {
|
|
621
|
-
const n = "ok" === e.level ? " " :
|
|
622
|
-
r.push(` ${n} ${i}${
|
|
625
|
+
const n = "ok" === e.level ? " " : Q(e.level, G[e.level]), i = t.dim(e.name.padEnd(s)), a = e.detail && e.detail.length <= 44 ? ` ${t.dim(`· ${e.detail}`)}` : "";
|
|
626
|
+
r.push(` ${n} ${i}${Q(e.level, e.value)}${a}`), e.detail && !a && r.push(`${o}${t.dim(e.detail)}`), e.fix && r.push(`${o}${t.yellow("→ ")}${t.yellow(e.fix)}`);
|
|
623
627
|
}
|
|
624
628
|
return r.join("\n");
|
|
625
629
|
}
|
|
626
|
-
function
|
|
630
|
+
function ne(e) {
|
|
627
631
|
const t = [];
|
|
628
|
-
t.push(`**${
|
|
632
|
+
t.push(`**${Z(e)}**`), t.push("");
|
|
629
633
|
for (const n of e.checks) {
|
|
630
634
|
const e = "ok" === n.level ? "" : "warn" === n.level ? "⚠ " : "✗ ", s = n.detail ? ` — ${n.detail}` : "";
|
|
631
635
|
t.push(`- ${e}**${n.name}**: ${n.value}${s}`);
|
|
@@ -639,7 +643,7 @@ function se(e) {
|
|
|
639
643
|
n.kind,
|
|
640
644
|
void 0 === n.hasView ? null : n.hasView ? "view" : "headless",
|
|
641
645
|
n.active ? "active" : null
|
|
642
|
-
].filter(Boolean).join(", "), s = n.path ? ` path: \`${n.path}\`` : "", o = void 0 !== n.openedAt ? ` open since ${
|
|
646
|
+
].filter(Boolean).join(", "), s = n.path ? ` path: \`${n.path}\`` : "", o = void 0 !== n.openedAt ? ` open since ${ee(new Date(n.openedAt).toISOString())}` : "";
|
|
643
647
|
t.push(`- **${n.name}** id: \`${n.id}\` (${e})${s}${o}`);
|
|
644
648
|
}
|
|
645
649
|
}
|
|
@@ -650,58 +654,58 @@ function se(e) {
|
|
|
650
654
|
}
|
|
651
655
|
return t.join("\n");
|
|
652
656
|
}
|
|
653
|
-
var
|
|
657
|
+
var se = "SHEETXL_TOOL_LOG", oe = /* @__PURE__ */ new Set([
|
|
654
658
|
"code",
|
|
655
659
|
"source",
|
|
656
660
|
"script",
|
|
657
661
|
"argv"
|
|
658
|
-
]),
|
|
659
|
-
function
|
|
662
|
+
]), re = /(^|[._-])(key|token|secret|password|credential)s?($|[._-])|licen[cs]e/i, ie = null, ae = null, le = Promise.resolve(), ce = {}, ue = null;
|
|
663
|
+
function he(e) {
|
|
660
664
|
const t = function() {
|
|
661
|
-
const e = process.env[
|
|
665
|
+
const e = process.env[se];
|
|
662
666
|
if (void 0 === e) return null;
|
|
663
667
|
const t = e.trim();
|
|
664
668
|
return "" === t || /^(0|false|no|off)$/i.test(t) ? null : /^(1|true|yes|on)$/i.test(t) ? s.join(n.homedir(), ".sheetxl", "logs") : s.resolve(t);
|
|
665
669
|
}();
|
|
666
|
-
if (!t) return
|
|
670
|
+
if (!t) return ie = null, null;
|
|
667
671
|
const o = /* @__PURE__ */ new Date(), r = `${o.getFullYear()}${String(o.getMonth() + 1).padStart(2, "0")}${String(o.getDate()).padStart(2, "0")}`, i = e.tag ? `${r}-${e.tag}-${process.pid}.jsonl` : `${r}-${process.pid}.jsonl`;
|
|
668
|
-
return
|
|
672
|
+
return ie = s.join(t, i), ce = { transport: e.transport }, ie;
|
|
669
673
|
}
|
|
670
|
-
function
|
|
671
|
-
return
|
|
674
|
+
function de() {
|
|
675
|
+
return ie;
|
|
672
676
|
}
|
|
673
|
-
function
|
|
674
|
-
return null !==
|
|
677
|
+
function pe() {
|
|
678
|
+
return null !== ie;
|
|
675
679
|
}
|
|
676
|
-
function
|
|
677
|
-
|
|
678
|
-
...
|
|
680
|
+
function fe(e) {
|
|
681
|
+
ce = {
|
|
682
|
+
...ce,
|
|
679
683
|
...e
|
|
680
684
|
};
|
|
681
685
|
}
|
|
682
|
-
function
|
|
683
|
-
|
|
686
|
+
function me(e) {
|
|
687
|
+
ue = e;
|
|
688
|
+
}
|
|
689
|
+
function ge(e, t) {
|
|
690
|
+
return e.length <= t ? e : e.slice(0, t) + "…[truncated]";
|
|
684
691
|
}
|
|
685
692
|
function ve(e, t) {
|
|
686
|
-
|
|
693
|
+
if (re.test(e)) return "[redacted]";
|
|
694
|
+
const n = oe.has(e) ? 16384 : 2048;
|
|
695
|
+
return "string" == typeof t ? ge(t, n) : Array.isArray(t) ? t.map((t) => ve(e, t)) : t && "object" == typeof t ? Object.fromEntries(Object.entries(t).filter(([, e]) => void 0 !== e).map(([t, n]) => [t, ve(oe.has(e) ? e : t, n)])) : t;
|
|
687
696
|
}
|
|
688
|
-
function we(e
|
|
689
|
-
|
|
690
|
-
const n = re.has(e) ? 16384 : 2048;
|
|
691
|
-
return "string" == typeof t ? ve(t, n) : Array.isArray(t) ? t.map((t) => we(e, t)) : t && "object" == typeof t ? Object.fromEntries(Object.entries(t).filter(([, e]) => void 0 !== e).map(([t, n]) => [t, we(re.has(e) ? e : t, n)])) : t;
|
|
697
|
+
function we(e) {
|
|
698
|
+
return null == e ? e : ve("", e);
|
|
692
699
|
}
|
|
693
700
|
function ye(e) {
|
|
694
|
-
return
|
|
701
|
+
return ge(e, 2048);
|
|
695
702
|
}
|
|
696
703
|
function ke(e) {
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
const n = $e(e);
|
|
703
|
-
if (he) try {
|
|
704
|
-
he(n);
|
|
704
|
+
const t = ie;
|
|
705
|
+
if (!t && !ue) return;
|
|
706
|
+
const n = xe(e);
|
|
707
|
+
if (ue) try {
|
|
708
|
+
ue(n);
|
|
705
709
|
} catch {}
|
|
706
710
|
if (!t) return;
|
|
707
711
|
let o;
|
|
@@ -712,24 +716,24 @@ function xe(e) {
|
|
|
712
716
|
_dropped: !0,
|
|
713
717
|
_bytes: o.length
|
|
714
718
|
},
|
|
715
|
-
resultPreview: n.resultPreview ?
|
|
719
|
+
resultPreview: n.resultPreview ? ge(n.resultPreview, 1024) : void 0
|
|
716
720
|
}));
|
|
717
721
|
} catch {
|
|
718
722
|
return;
|
|
719
723
|
}
|
|
720
|
-
|
|
721
|
-
|
|
724
|
+
le = le.then(async () => {
|
|
725
|
+
ae || (ae = l(s.dirname(t), { recursive: !0 }).then(() => {})), await ae, await a(t, o + "\n", "utf-8");
|
|
722
726
|
}).catch(() => {});
|
|
723
727
|
}
|
|
724
|
-
function
|
|
728
|
+
function xe(e) {
|
|
725
729
|
return {
|
|
726
730
|
ts: (/* @__PURE__ */ new Date()).toISOString(),
|
|
727
731
|
pid: process.pid,
|
|
728
|
-
...
|
|
732
|
+
...ce,
|
|
729
733
|
...e
|
|
730
734
|
};
|
|
731
735
|
}
|
|
732
|
-
function
|
|
733
|
-
return
|
|
736
|
+
function $e() {
|
|
737
|
+
return le;
|
|
734
738
|
}
|
|
735
|
-
export { T as CLAUDE_CODE_FIX,
|
|
739
|
+
export { T as CLAUDE_CODE_FIX, L as GENERIC_FIX, P as MCP_LAUNCH, _ as SKILLS_INSTALL, E as SKILLS_UPDATE, se as TOOL_LOG_ENV, I as VSCODE_EXTENSION_ID, we as capArgs, ye as capPreview, C as checkForUpdate, q as collectInfo, N as compareVersions, b as discoverRelay, xe as enrichToolLogRecord, S as fetchRelayWorkbooks, D as findMcpRegistrations, H as findOnPath, X as findVsCode, $e as flushToolLog, y as formatBuildInstant, k as formatBuildLabel, de as getToolLogPath, he as initToolLog, pe as isToolLogEnabled, ke as logToolCall, O as pickUpdate, v as printMarkdown, te as renderInfo, ne as renderInfoMarkdown, fe as setToolLogContext, me as setToolLogMirror, w as styleMarkdown, B as vscodeExtensionInstall };
|
package/package.json
CHANGED
|
@@ -21,6 +21,13 @@ export declare const GENERIC_FIX = "npx -y sheetxl setup agent";
|
|
|
21
21
|
export declare const SKILLS_INSTALL = "npx -y skills add sheetxl/skills -g --all";
|
|
22
22
|
/** Refreshes a copy installed that way. */
|
|
23
23
|
export declare const SKILLS_UPDATE = "npx -y skills update";
|
|
24
|
+
/** Where to look. Defaults to this machine; given explicitly by tests. */
|
|
25
|
+
export interface McpProbe {
|
|
26
|
+
readonly home?: string;
|
|
27
|
+
/** Windows `%APPDATA%`. */
|
|
28
|
+
readonly appData?: string;
|
|
29
|
+
readonly platform?: NodeJS.Platform;
|
|
30
|
+
}
|
|
24
31
|
/** Every client config found on this machine that registers the SheetXL MCP server. */
|
|
25
|
-
export declare function findMcpRegistrations(workspace: string): Promise<McpRegistration[]>;
|
|
32
|
+
export declare function findMcpRegistrations(workspace: string, probe?: McpProbe): Promise<McpRegistration[]>;
|
|
26
33
|
//# sourceMappingURL=mcpClients.d.ts.map
|