@sheetxl/utils-node 0.7.23-beta.2

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/LICENSE.md ADDED
@@ -0,0 +1,11 @@
1
+ # Repository Licensing
2
+
3
+ SheetXL contains a mix of open-source and commercially licensed packages. Each package is individually licensed and contains its own license file.
4
+
5
+ For the specific terms and conditions applicable to a package, please see the `LICENSE.md` file located in that package's root directory.
6
+
7
+ Generally, packages intended for public distribution (such as CLIs, adapters, and vanilla wrappers) are licensed under the MIT license. All other core packages are proprietary and require a commercial license for use.
8
+
9
+ For more details on commercial licensing, please visit our website:
10
+
11
+ https://www.sheetxl.com/docs/guides/licensing-pricing
package/README.md ADDED
@@ -0,0 +1,29 @@
1
+ # Node Utilities
2
+
3
+ <p align="center">
4
+ <a href="https://www.sheetxl.com" target="_blank">
5
+ <img src="https://www.sheetxl.com/logo-text.svg" alt="SheetXL Logo" width="180" />
6
+ </a>
7
+ </p>
8
+
9
+ Collection of Node-only utilities and types used by the [SheetXL](https://www.sheetxl.com)
10
+ command line tools.
11
+
12
+ Everything here assumes a Node runtime — the filesystem, the process environment, a terminal.
13
+ Utilities that also run in a browser live in [`@sheetxl/utils`](https://www.npmjs.com/package/@sheetxl/utils).
14
+
15
+ This package will generally not be used by itself but rather as a dependency of other packages.
16
+
17
+ ## 🔗 Learn More
18
+
19
+ Whether you're ready to build, need help, or just want to see more examples, here's where to go next.
20
+
21
+ * 💬 **[Join our Discord Community](https://discord.gg/NTKdwUgK9p)** - Get help and connect with the team.
22
+ * ⭐ **[Star us on GitHub](https://github.com/sheetxl/sheetxl)** - If you like SheetXL give us a star ⭐ and help others find us!
23
+ * 📘 **[Developer Docs](https://www.sheetxl.com/docs)** - Guides and tutorials.
24
+ * 🔌 **[API Reference](https://api.sheetxl.com)** - Detailed documentation for all packages.
25
+ * 👀 **[Live Demo Gallery](https://www.sheetxl.com/demos)** - A showcase of interactive examples.
26
+ * 🖼️ **[Storybook](https://storybook.sheetxl.com)** - Explore and test individual UI components.
27
+ * 🌐 **[Website](https://www.sheetxl.com)** - Our Website.
28
+
29
+ ---
@@ -0,0 +1 @@
1
+ No third parties dependencies
@@ -0,0 +1,604 @@
1
+ /**
2
+ * @license @sheetxl/utils-node - SheetXL - Node-only utilities: terminal presentation, environment reporting, tool logging - v0.7.23-beta.2
3
+ *
4
+ * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
+ * License: The license can be found at https://www.sheetxl.com/license.
6
+ */
7
+ import { createRequire as e } from "node:module";
8
+ import t from "chalk";
9
+ import * as n from "node:os";
10
+ import * as s from "node:path";
11
+ import { existsSync as o, readFileSync as r } from "node:fs";
12
+ import { appendFile as i, mkdir as a, readFile as l, readdir as c, stat as u, unlink as h, writeFile as d } from "node:fs/promises";
13
+ import { fileURLToPath as p } from "node:url";
14
+ import { createHash as f } from "node:crypto";
15
+ var m = (e) => /^#{1,4} /.test(e) ? t.cyan.bold(e) : ((e) => e.replace(/`([^`]+)`/g, (e, n) => t.yellow(n)).replace(/\*\*([^*]+)\*\*/g, (e, n) => t.bold(n)).replace(/(?<=^|\s)_([^_\s](?:[^_]*[^_\s])?)_(?=[\s.,)]|$)/g, (e, n) => t.italic(n)))(e), v = (e, t) => {
16
+ const n = t?.stream ?? process.stdout, s = e.endsWith("\n") ? e : e + "\n", o = n.isTTY ? s.split("\n").map(m).join("\n") : s;
17
+ n.write(o);
18
+ }, g = () => s.join(n.homedir(), ".sheetxl", "locks");
19
+ async function w(e) {
20
+ try {
21
+ return JSON.parse(await l(e, "utf-8"));
22
+ } catch {
23
+ return null;
24
+ }
25
+ }
26
+ async function y(e) {
27
+ try {
28
+ return (await fetch(`http://127.0.0.1:${e.port}/sheetxl-mcp/ping`, {
29
+ headers: { Authorization: `Bearer ${e.token}` },
30
+ signal: AbortSignal.timeout(2e3)
31
+ })).ok;
32
+ } catch {
33
+ return !1;
34
+ }
35
+ }
36
+ async function k() {
37
+ const e = (() => {
38
+ const e = process.env.SHEETXL_WORKSPACE ?? process.cwd(), t = f("sha256").update(e).digest("hex").slice(0, 8);
39
+ return s.join(g(), `${t}.lock`);
40
+ })(), t = await w(e);
41
+ if (t) {
42
+ if (await y(t)) return t;
43
+ await h(e).catch(() => {});
44
+ }
45
+ return async function() {
46
+ let e;
47
+ try {
48
+ e = (await c(g())).filter((e) => e.endsWith(".lock"));
49
+ } catch {
50
+ return null;
51
+ }
52
+ if (!e.length) return null;
53
+ const t = await Promise.all(e.map(async (e) => ({
54
+ f: e,
55
+ mtime: (await u(s.join(g(), e))).mtimeMs
56
+ })));
57
+ t.sort((e, t) => t.mtime - e.mtime);
58
+ for (const { f: e } of t) {
59
+ const t = s.join(g(), e), n = await w(t);
60
+ if (n) {
61
+ if (await y(n)) return n;
62
+ await h(t).catch(() => {});
63
+ }
64
+ }
65
+ return null;
66
+ }();
67
+ }
68
+ async function x(e) {
69
+ return await (await fetch(`http://127.0.0.1:${e.port}/sheetxl-mcp/relay-workbooks`, {
70
+ headers: { Authorization: `Bearer ${e.token}` },
71
+ signal: AbortSignal.timeout(2e3)
72
+ })).json();
73
+ }
74
+ var $ = () => s.join(n.homedir(), ".sheetxl", "cache", "update.json");
75
+ async function j(e = Date.now()) {
76
+ const t = await async function() {
77
+ try {
78
+ const e = JSON.parse(await l($(), "utf-8"));
79
+ return "string" != typeof e?.latest || "number" != typeof e?.checkedAt ? null : e;
80
+ } catch {
81
+ return null;
82
+ }
83
+ }();
84
+ if (t && e - t.checkedAt < 864e5) return {
85
+ latest: t.latest,
86
+ cacheStatus: "fresh"
87
+ };
88
+ try {
89
+ const t = await fetch("https://registry.npmjs.org/sheetxl/latest", {
90
+ headers: { Accept: "application/vnd.npm.install-v1+json" },
91
+ signal: AbortSignal.timeout(1500)
92
+ });
93
+ if (!t.ok) throw new Error(String(t.status));
94
+ const n = (await t.json()).version;
95
+ if (!n) throw new Error("no version");
96
+ return await async function(e) {
97
+ try {
98
+ await a(s.dirname($()), { recursive: !0 }), await d($(), JSON.stringify(e), "utf-8");
99
+ } catch {}
100
+ }({
101
+ checkedAt: e,
102
+ latest: n
103
+ }), {
104
+ latest: n,
105
+ cacheStatus: "refreshed"
106
+ };
107
+ } catch {
108
+ return t ? {
109
+ latest: t.latest,
110
+ cacheStatus: "fresh"
111
+ } : {
112
+ latest: null,
113
+ cacheStatus: "missing"
114
+ };
115
+ }
116
+ }
117
+ function b(e, t) {
118
+ const n = (e) => e.split("-")[0].split(".").map((e) => Number.parseInt(e, 10) || 0), s = n(e), o = n(t);
119
+ for (let e = 0; e < Math.max(s.length, o.length); e++) {
120
+ const t = (s[e] ?? 0) - (o[e] ?? 0);
121
+ if (0 !== t) return t;
122
+ }
123
+ return 0;
124
+ }
125
+ var S = "claude mcp add sheetxl -- npx -y sheetxl mcp", A = "npx -y sheetxl setup", O = () => n.homedir();
126
+ async function T(e) {
127
+ const t = [];
128
+ return await Promise.all(function(e) {
129
+ const t = process.env.APPDATA, n = "win32" === process.platform ? t ? s.join(t, "Claude", "claude_desktop_config.json") : null : "darwin" === process.platform ? s.join(O(), "Library", "Application Support", "Claude", "claude_desktop_config.json") : s.join(O(), ".config", "Claude", "claude_desktop_config.json");
130
+ return [
131
+ {
132
+ name: "claude-code",
133
+ file: s.join(O(), ".claude.json")
134
+ },
135
+ {
136
+ name: "claude-code (project)",
137
+ file: s.join(e, ".mcp.json")
138
+ },
139
+ {
140
+ name: "claude-desktop",
141
+ file: n
142
+ },
143
+ {
144
+ name: "cursor",
145
+ file: s.join(O(), ".cursor", "mcp.json")
146
+ },
147
+ {
148
+ name: "cursor (project)",
149
+ file: s.join(e, ".cursor", "mcp.json")
150
+ },
151
+ {
152
+ name: "windsurf",
153
+ file: s.join(O(), ".codeium", "windsurf", "mcp_config.json")
154
+ },
155
+ {
156
+ name: "vscode (project)",
157
+ file: s.join(e, ".vscode", "mcp.json")
158
+ },
159
+ {
160
+ name: "codex",
161
+ file: s.join(O(), ".codex", "config.toml")
162
+ }
163
+ ];
164
+ }(e).map(async ({ name: e, file: n }) => {
165
+ if (n) try {
166
+ (function(e, t) {
167
+ if (t.endsWith(".toml")) return /sheetxl/i.test(e);
168
+ try {
169
+ const t = JSON.parse(e), n = [
170
+ t.mcpServers,
171
+ t.servers,
172
+ ...Object.values(t.projects ?? {}).map((e) => e?.mcpServers)
173
+ ];
174
+ for (const e of n) if (e && "object" == typeof e) for (const [t, n] of Object.entries(e)) {
175
+ if (/sheetxl/i.test(t)) return !0;
176
+ const e = JSON.stringify(n ?? "");
177
+ if (/sheetxl/i.test(e)) return !0;
178
+ }
179
+ return !1;
180
+ } catch {
181
+ return /sheetxl/i.test(e);
182
+ }
183
+ })(await l(n, "utf-8"), n) && t.push({
184
+ name: e,
185
+ file: n
186
+ });
187
+ } catch {}
188
+ })), t.sort((e, t) => e.name.localeCompare(t.name));
189
+ }
190
+ var _ = e(import.meta.url);
191
+ function N(e) {
192
+ try {
193
+ return s.dirname(_.resolve(`${e}/package.json`));
194
+ } catch {}
195
+ for (const t of function(e) {
196
+ const t = [];
197
+ try {
198
+ t.push(p(import.meta.resolve(e)));
199
+ } catch {}
200
+ try {
201
+ t.push(_.resolve(e));
202
+ } catch {}
203
+ return t;
204
+ }(e)) {
205
+ let n = s.dirname(t);
206
+ for (let t = 0; t < 8; t++) {
207
+ if (P(n) === e) return n;
208
+ const t = s.dirname(n);
209
+ if (t === n) break;
210
+ n = t;
211
+ }
212
+ }
213
+ return null;
214
+ }
215
+ function P(e) {
216
+ try {
217
+ return JSON.parse(r(s.join(e, "package.json"), "utf-8")).name ?? null;
218
+ } catch {
219
+ return null;
220
+ }
221
+ }
222
+ async function C(e) {
223
+ const { surface: t, offline: i = !1, includeHost: a = !1, serverCount: c } = e, u = e.workspace ?? process.env.SHEETXL_WORKSPACE ?? process.cwd(), [h, d, p, f] = await Promise.all([
224
+ e.license(),
225
+ E(e, i),
226
+ i ? Promise.resolve(null) : j(),
227
+ T(u)
228
+ ]), m = function(e) {
229
+ return {
230
+ version: e.getBuildVersion() || "local",
231
+ build: e.getBuildDate() || null
232
+ };
233
+ }(h), v = function(e, t) {
234
+ const n = e.getExceptions(), s = e.isEval() ? "evaluation" : (e.getType() || "unlicensed").toLowerCase(), o = e.getExpiration(), r = o && !Number.isNaN(o.getTime()) ? o : null, i = null !== r && r.getTime() - Date.now() < 2592e6, a = r ? `expire${r.getTime() < Date.now() ? "d" : "s"} ${r.toISOString().slice(0, 10)}` : void 0;
235
+ let l;
236
+ if (t) {
237
+ const t = e.getKeyFrom(), n = !t || /^no key$/i.test(t) ? "local" : t, s = e.getCpuCount(), o = e.getMemory();
238
+ l = [`key: ${n}`, 0 === s && 0 === o ? "unmetered" : [s ? `${s} cores` : null, o ? `${o} GB` : null].filter(Boolean).join(" · ")].filter(Boolean).join(" · ");
239
+ }
240
+ return {
241
+ name: "license",
242
+ level: n.length || i ? "warn" : "ok",
243
+ value: s,
244
+ detail: n.length ? n.join("; ") : [i || t ? a : void 0, l].filter(Boolean).join(" — "),
245
+ fix: n.length ? "sheetxl license activate <key>" : void 0
246
+ };
247
+ }(h, a), g = [], w = "local" === m.version;
248
+ g.push({
249
+ name: "engine",
250
+ level: "ok",
251
+ value: w ? "@sheetxl/sdk local workspace build" : `@sheetxl/sdk ${m.version}`,
252
+ detail: m.build ? `built ${m.build}` : w ? "unpublished" : void 0
253
+ });
254
+ const y = Number.parseInt(process.version.slice(1), 10);
255
+ g.push({
256
+ name: "node",
257
+ level: y < 24 ? "error" : "ok",
258
+ value: process.version,
259
+ detail: y < 24 ? "minimum is v24" : void 0,
260
+ fix: y < 24 ? "install Node.js v24 or newer" : void 0
261
+ });
262
+ const k = function() {
263
+ const e = N("@sheetxl/sdk");
264
+ if (!e) return {
265
+ path: null,
266
+ exists: !1
267
+ };
268
+ try {
269
+ const t = JSON.parse(r(s.join(e, "package.json"), "utf-8")), n = t.exports?.["."]?.types ?? t.types;
270
+ if (!n) return {
271
+ path: null,
272
+ exists: !1
273
+ };
274
+ const i = s.resolve(e, n);
275
+ return {
276
+ path: i,
277
+ exists: o(i)
278
+ };
279
+ } catch {
280
+ return {
281
+ path: null,
282
+ exists: !1
283
+ };
284
+ }
285
+ }();
286
+ g.push(k.exists ? {
287
+ name: "types",
288
+ level: "ok",
289
+ value: k.path
290
+ } : {
291
+ name: "types",
292
+ level: "warn",
293
+ value: k.path ?? "not resolved",
294
+ detail: k.path ? "declared but not present — the engine build may be incomplete" : "@sheetxl/sdk is not reachable from here",
295
+ fix: A
296
+ }), g.push(await async function(e, t) {
297
+ const r = await async function(e) {
298
+ const t = N(e);
299
+ if (!t) return null;
300
+ try {
301
+ return JSON.parse(await l(s.join(t, "package.json"), "utf-8")).version ?? null;
302
+ } catch {
303
+ return null;
304
+ }
305
+ }("@sheetxl/skills"), i = "mcp" === e ? "load with the `skill` prompt or the `sheetxl://skills/*` resources" : "read with `sheetxl skills`";
306
+ if (!r) return {
307
+ name: "skills",
308
+ level: "warn",
309
+ value: "not shipped with this install",
310
+ detail: "@sheetxl/skills is not reachable — reference documents are unavailable; reinstall sheetxl"
311
+ };
312
+ const a = function(e) {
313
+ const t = n.homedir();
314
+ return [
315
+ s.join(t, ".claude", "skills", "sheetxl"),
316
+ s.join(e, ".claude", "skills", "sheetxl"),
317
+ s.join(t, ".config", "skills", "sheetxl"),
318
+ s.join(t, ".skills", "sheetxl"),
319
+ s.join(t, ".codex", "skills", "sheetxl"),
320
+ s.join(t, ".cursor", "skills", "sheetxl")
321
+ ];
322
+ }(t).find((e) => o(e));
323
+ if (!a) return {
324
+ name: "skills",
325
+ level: "ok",
326
+ value: `@sheetxl/skills ${r}`,
327
+ detail: `version-matched to this ${"mcp" === e ? "server" : "install"} — ${i}`
328
+ };
329
+ const c = await async function(e) {
330
+ try {
331
+ const t = await l(s.join(e, "SKILL.md"), "utf-8");
332
+ if (!t.startsWith("---")) return null;
333
+ const n = t.indexOf("\n---", 3);
334
+ if (-1 === n) return null;
335
+ const o = t.slice(3, n).match(/^version:\s*(.*)$/m);
336
+ if (!o) return null;
337
+ const r = o[1].trim().replace(/^["']|["']$/g, "");
338
+ return r && "0.0.0" !== r ? r : null;
339
+ } catch {
340
+ return null;
341
+ }
342
+ }(a);
343
+ if (!c) return {
344
+ name: "skills",
345
+ level: "ok",
346
+ value: `@sheetxl/skills ${r}`,
347
+ detail: `installed at ${a} (version not stamped)`
348
+ };
349
+ const u = b(r, c) > 0;
350
+ return {
351
+ name: "skills",
352
+ level: u ? "warn" : "ok",
353
+ value: `@sheetxl/skills ${r}`,
354
+ detail: u ? `installed copy is ${c} — stale; prefer this ${"mcp" === e ? "server" : "install"}'s: ${i}` : "current",
355
+ ...u && "cli" === e ? { fix: "sheetxl skills" } : {}
356
+ };
357
+ }(t, u));
358
+ const x = d.some((e) => e.hasView ?? "attended" === e.kind);
359
+ return "mcp" === t ? g.push(function(e) {
360
+ const t = function(e) {
361
+ const t = "win32" === process.platform ? [
362
+ "sheetxl.cmd",
363
+ "sheetxl.exe",
364
+ "sheetxl"
365
+ ] : ["sheetxl"], n = [s.join(e, "node_modules", ".bin"), ...(process.env.PATH ?? "").split(s.delimiter).filter(Boolean)];
366
+ for (const e of n) for (const n of t) try {
367
+ if (o(s.join(e, n))) return s.join(e, n);
368
+ } catch {}
369
+ return null;
370
+ }(e), n = "same engine, one dialect — for terminal-shaped work (`--json` piping, stdin, scripts); sessions stay here";
371
+ return t ? {
372
+ name: "cli",
373
+ level: "ok",
374
+ value: `\`sheetxl\` available (${t})`,
375
+ detail: `if you can run commands: ${n}`
376
+ } : {
377
+ name: "cli",
378
+ level: "ok",
379
+ value: "not found on PATH",
380
+ detail: `if you can run commands, \`npx -y sheetxl\` runs it anywhere Node does — ${n}`
381
+ };
382
+ }(u)) : g.push(function(e, t) {
383
+ return e.length ? {
384
+ name: "mcp",
385
+ level: "ok",
386
+ value: `registered (${e.map((e) => e.name).join(", ")})`,
387
+ detail: "not connected from the CLI — a registered server attaches at the client's next session"
388
+ } : {
389
+ name: "mcp",
390
+ level: "warn",
391
+ value: "server available — no client registration found here",
392
+ detail: t ? "a client UI has a workbook open (see sessions), but no config here gives this agent the MCP tools — register to act on it (sessions, undo, in-grid highlights, prompts)" : "the server ships with this install (`sheetxl mcp`); until a client registers it, sessions, undo, in-grid highlights and prompts are unavailable",
393
+ fix: "sheetxl setup"
394
+ };
395
+ }(f, x)), void 0 !== c && c > 1 && g.push({
396
+ name: "instances",
397
+ level: "warn",
398
+ value: `${c} servers running for this workspace`,
399
+ detail: "sandbox sessions are per-process and are not shared between them — a session_id created through one is unusable through another; usually a duplicate MCP registration",
400
+ fix: "remove the duplicate sheetxl entry from one of the MCP client configs"
401
+ }), g.push(v), g.push({
402
+ name: "workspace",
403
+ level: "ok",
404
+ value: u,
405
+ detail: "relative paths resolve here"
406
+ }), p && g.push(function(e, t) {
407
+ if (!t.latest) return {
408
+ name: "update",
409
+ level: "ok",
410
+ value: "unknown",
411
+ detail: "registry not reachable"
412
+ };
413
+ if ("local" === e) return {
414
+ name: "update",
415
+ level: "ok",
416
+ value: `${t.latest} published`,
417
+ detail: "running a local build"
418
+ };
419
+ const n = b(t.latest, e) > 0;
420
+ return {
421
+ name: "update",
422
+ level: n ? "warn" : "ok",
423
+ value: n ? `${t.latest} available` : "current",
424
+ detail: n ? `running ${e}` : void 0,
425
+ fix: n ? "npm install -g sheetxl@latest" : void 0
426
+ };
427
+ }(m.version, p)), {
428
+ product: "SheetXL",
429
+ version: m.version,
430
+ build: m.build,
431
+ surface: t,
432
+ collectedAt: (/* @__PURE__ */ new Date()).toISOString(),
433
+ ok: !g.some((e) => "error" === e.level),
434
+ attended: x,
435
+ sessions: d,
436
+ checks: g,
437
+ host: a ? B() : void 0
438
+ };
439
+ }
440
+ async function E(e, t) {
441
+ if (e.sessions) return [...await e.sessions()];
442
+ if (t) return [];
443
+ try {
444
+ const e = await k();
445
+ return e ? (await x(e)).map((e) => ({
446
+ id: e.id,
447
+ name: e.name,
448
+ kind: "attended",
449
+ hasView: !0,
450
+ path: e.path,
451
+ active: e.active,
452
+ openedAt: e.openedAt
453
+ })) : [];
454
+ } catch {
455
+ return [];
456
+ }
457
+ }
458
+ function B() {
459
+ const e = n.cpus(), t = process.memoryUsage(), o = n.totalmem();
460
+ return {
461
+ platform: n.platform(),
462
+ release: n.release(),
463
+ osType: n.type(),
464
+ hostname: n.hostname(),
465
+ arch: process.arch,
466
+ cpuCount: e.length,
467
+ cpuModel: e[0]?.model?.trim() ?? "unknown",
468
+ memoryTotal: o,
469
+ memoryUsed: o - n.freemem(),
470
+ heapTotal: t.heapTotal,
471
+ heapUsed: t.heapUsed,
472
+ nodeEnv: "production",
473
+ configStore: s.join(n.homedir(), ".config", "configstore", "sheetxl.json")
474
+ };
475
+ }
476
+ var L = {
477
+ ok: " ",
478
+ warn: "!",
479
+ error: "✗"
480
+ }, D = (e, n) => "error" === e ? t.red(n) : "warn" === e ? t.yellow(n) : t.white(n);
481
+ function I(e) {
482
+ const t = e.ok ? "engine ready" : "not ready", n = e.attended ? "attended" : "unattended";
483
+ return `${e.product} — ${t} · ${n} · as of ${J(e.collectedAt)}`;
484
+ }
485
+ function J(e) {
486
+ const t = new Date(e);
487
+ return Number.isNaN(t.getTime()) ? "unknown" : t.toTimeString().slice(0, 8);
488
+ }
489
+ function M(e) {
490
+ const n = e.checks, s = Math.max(...n.map((e) => e.name.length)) + 2, o = " ".repeat(s + 4), r = [];
491
+ r.push(e.ok ? t.cyanBright(I(e)) : t.yellow(I(e))), r.push("");
492
+ for (const e of n) {
493
+ const n = "ok" === e.level ? " " : D(e.level, L[e.level]), i = t.dim(e.name.padEnd(s)), a = e.detail && e.detail.length <= 44 ? ` ${t.dim(`· ${e.detail}`)}` : "";
494
+ r.push(` ${n} ${i}${D(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)}`);
495
+ }
496
+ return r.join("\n");
497
+ }
498
+ function W(e) {
499
+ const t = [];
500
+ t.push(`**${I(e)}**`), t.push("");
501
+ for (const n of e.checks) {
502
+ const e = "ok" === n.level ? "" : "warn" === n.level ? "⚠ " : "✗ ", s = n.detail ? ` — ${n.detail}` : "";
503
+ t.push(`- ${e}**${n.name}**: ${n.value}${s}`);
504
+ }
505
+ if (t.push(""), t.push(function(e) {
506
+ return e.attended ? "mcp" === e.surface ? "**Attended.** A human has that workbook open. When they are vague — \"fix this\", \"B10 looks wrong\" — they probably mean the workbook in front of them. Reach it through its session, never through the file on disk: what is on disk is stale the moment they have unsaved edits, and writing over it destroys their work with no undo. The session is yours to use — every `run` is one undoable commit — along with `highlight` marks and in-grid `prompt`s." : "**Attended.** A human has that workbook open, and there is no session to reach from the CLI — `--in` opens the file, which is the one thing you must not write back. This is a *read* surface: query, calculate, report what you found, and let them make the change or hand the work to the MCP server." : "**Unattended.** Nobody is watching. The files are yours to open, change and save directly, and nobody will catch a mistake for you — so verify your own work: read back what you wrote, recount what you fixed.";
507
+ }(e)), e.sessions.length) {
508
+ t.push(""), t.push("**Sessions**"), t.push("");
509
+ for (const n of e.sessions) {
510
+ const e = [
511
+ n.kind,
512
+ void 0 === n.hasView ? null : n.hasView ? "view" : "headless",
513
+ n.active ? "active" : null
514
+ ].filter(Boolean).join(", "), s = n.path ? ` path: \`${n.path}\`` : "", o = void 0 !== n.openedAt ? ` open since ${J(new Date(n.openedAt).toISOString())}` : "";
515
+ t.push(`- **${n.name}** id: \`${n.id}\` (${e})${s}${o}`);
516
+ }
517
+ }
518
+ const n = e.checks.filter((e) => e.fix);
519
+ if (n.length) {
520
+ t.push(""), t.push("**To resolve**"), t.push("");
521
+ for (const e of n) t.push(`- ${e.name}: \`${e.fix}\``);
522
+ }
523
+ return t.join("\n");
524
+ }
525
+ var H = "SHEETXL_TOOL_LOG", U = /* @__PURE__ */ new Set([
526
+ "code",
527
+ "source",
528
+ "script",
529
+ "argv"
530
+ ]), V = /(^|[._-])(key|token|secret|password|credential)s?($|[._-])|licen[cs]e/i, K = null, X = null, R = Promise.resolve(), z = {}, F = null;
531
+ function G(e) {
532
+ const t = function() {
533
+ const e = process.env[H];
534
+ if (void 0 === e) return null;
535
+ const t = e.trim();
536
+ 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);
537
+ }();
538
+ if (!t) return K = null, null;
539
+ 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`;
540
+ return K = s.join(t, i), z = { transport: e.transport }, K;
541
+ }
542
+ function Y() {
543
+ return K;
544
+ }
545
+ function q() {
546
+ return null !== K;
547
+ }
548
+ function Q(e) {
549
+ z = {
550
+ ...z,
551
+ ...e
552
+ };
553
+ }
554
+ function Z(e) {
555
+ F = e;
556
+ }
557
+ function ee(e, t) {
558
+ return e.length <= t ? e : e.slice(0, t) + "…[truncated]";
559
+ }
560
+ function te(e, t) {
561
+ if (V.test(e)) return "[redacted]";
562
+ const n = U.has(e) ? 16384 : 2048;
563
+ return "string" == typeof t ? ee(t, n) : Array.isArray(t) ? t.map((t) => te(e, t)) : t && "object" == typeof t ? Object.fromEntries(Object.entries(t).filter(([, e]) => void 0 !== e).map(([t, n]) => [t, te(U.has(e) ? e : t, n)])) : t;
564
+ }
565
+ function ne(e) {
566
+ return null == e ? e : te("", e);
567
+ }
568
+ function se(e) {
569
+ return ee(e, 2048);
570
+ }
571
+ function oe(e) {
572
+ const t = K;
573
+ if (!t && !F) return;
574
+ const n = {
575
+ ts: (/* @__PURE__ */ new Date()).toISOString(),
576
+ pid: process.pid,
577
+ ...z,
578
+ ...e
579
+ };
580
+ if (F) try {
581
+ F(n);
582
+ } catch {}
583
+ if (!t) return;
584
+ let o;
585
+ try {
586
+ o = JSON.stringify(n), o.length > 65536 && (o = JSON.stringify({
587
+ ...n,
588
+ args: {
589
+ _dropped: !0,
590
+ _bytes: o.length
591
+ },
592
+ resultPreview: n.resultPreview ? ee(n.resultPreview, 1024) : void 0
593
+ }));
594
+ } catch {
595
+ return;
596
+ }
597
+ R = R.then(async () => {
598
+ X || (X = a(s.dirname(t), { recursive: !0 }).then(() => {})), await X, await i(t, o + "\n", "utf-8");
599
+ }).catch(() => {});
600
+ }
601
+ function re() {
602
+ return R;
603
+ }
604
+ export { S as CLAUDE_CODE_FIX, A as GENERIC_FIX, H as TOOL_LOG_ENV, ne as capArgs, se as capPreview, j as checkForUpdate, C as collectInfo, b as compareVersions, k as discoverRelay, x as fetchRelayWorkbooks, T as findMcpRegistrations, re as flushToolLog, Y as getToolLogPath, G as initToolLog, q as isToolLogEnabled, oe as logToolCall, v as printMarkdown, M as renderInfo, W as renderInfoMarkdown, Q as setToolLogContext, Z as setToolLogMirror };
package/package.json ADDED
@@ -0,0 +1,45 @@
1
+ {
2
+ "name": "@sheetxl/utils-node",
3
+ "description": "SheetXL - Node-only utilities: terminal presentation, environment reporting, tool logging",
4
+ "version": "0.7.23-beta.2",
5
+ "license": "SEE LICENSE IN <LICENSE>",
6
+ "type": "module",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./types/index.d.ts",
10
+ "import": "./node/esm/index.mjs"
11
+ }
12
+ },
13
+ "types": "./types/index.d.ts",
14
+ "module": "./node/esm/index.mjs",
15
+ "sideEffects": false,
16
+ "engines": {
17
+ "node": ">=20 <21 || >=22"
18
+ },
19
+ "engineStrict": true,
20
+ "homepage": "https://sheetxl.com",
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "https://github.com/sheetxl/sheetxl.git"
24
+ },
25
+ "bugs": {
26
+ "url": "https://github.com/sheetxl/sheetxl/issues"
27
+ },
28
+ "keywords": [
29
+ "sheetxl",
30
+ "spreadsheet",
31
+ "javascript",
32
+ "typescript",
33
+ "excel",
34
+ "xlsx",
35
+ "node",
36
+ "utils",
37
+ "cli"
38
+ ],
39
+ "dependencies": {
40
+ "chalk": "^5.6.2"
41
+ },
42
+ "devDependencies": {
43
+ "@types/node": "^26.1.2"
44
+ }
45
+ }
@@ -0,0 +1,2 @@
1
+ export * from './src/index'
2
+ export {}
@@ -0,0 +1,4 @@
1
+ export * from './terminal';
2
+ export * from './info';
3
+ export * from './log';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,OAAO,CAAC"}
@@ -0,0 +1,209 @@
1
+ /**
2
+ * The shape of the readiness report — the one capability behind `sheetxl info` and the MCP
3
+ * `info` tool.
4
+ *
5
+ * @remarks
6
+ * All text on a report is **agent-facing and English**, for the same reason
7
+ * `Tool.Descriptor` is: it is read by a model, and `--json` consumers key off it. Localized
8
+ * chrome (the `--verbose` host sections, error framing) belongs to the surface that wraps this.
9
+ *
10
+ * A report answers two questions in one call — *can the engine run here?* and *is a human
11
+ * watching?* They are deliberately not two commands: an agent that asks only the first will
12
+ * happily overwrite a workbook someone has open.
13
+ */
14
+ export declare namespace Info {
15
+ /**
16
+ * A check's outcome.
17
+ *
18
+ * @remarks
19
+ * `info` is advisory, not diagnostic — `ok` is not "this check passed", it is "nothing here
20
+ * needs the agent's attention". A `warn` degrades what the agent can do (stale skills, no
21
+ * MCP); only `error` means the engine cannot be trusted to do the work.
22
+ */
23
+ type Level = 'ok' | 'warn' | 'error';
24
+ /** Which surface produced the report. Changes what is knowable, never the shape. */
25
+ type Surface = 'cli' | 'mcp';
26
+ /**
27
+ * One line of the report.
28
+ *
29
+ * @remarks
30
+ * `fix` is the whole point of the check existing. A check that can fail and cannot say what
31
+ * to run about it sends the agent guessing — which, for setup, means inventing plausible npm
32
+ * commands. If a failure has no remedy the agent can execute, say so in `detail` instead of
33
+ * leaving `fix` to be improvised.
34
+ */
35
+ interface Check {
36
+ /** Stable identifier — the `--json` key an integration matches on. Never localized, never renamed. */
37
+ readonly name: CheckName;
38
+ readonly level: Level;
39
+ /** The one-line answer, as a human or an agent would read it. */
40
+ readonly value: string;
41
+ /** Qualifier rendered dim after the value. */
42
+ readonly detail?: string;
43
+ /** The exact command that resolves a `warn`/`error`, verbatim and runnable. */
44
+ readonly fix?: string;
45
+ }
46
+ /**
47
+ * The fixed set of checks.
48
+ *
49
+ * @remarks
50
+ * A closed union rather than a free string: a report an agent cannot enumerate in advance is
51
+ * one it has to pattern-match, and the handshake is too load-bearing for that.
52
+ */
53
+ type CheckName = 'engine' | 'node' | 'types' | 'skills'
54
+ /** CLI surface only — whether an MCP client config here registers the SheetXL server. */
55
+ | 'mcp'
56
+ /** MCP surface only — whether the same engine is reachable as a command on this machine. */
57
+ | 'cli'
58
+ /** MCP surface only, and only when there is more than one — see {@link CollectOptions.instances}. */
59
+ | 'instances' | 'license' | 'workspace' | 'update';
60
+ /**
61
+ * An open workbook, as the report sees it.
62
+ *
63
+ * @remarks
64
+ * Structurally the subset of the MCP `SessionInfo` that survives on both surfaces. The CLI
65
+ * learns these from the relay lock (a live client UI) and so only ever reports `attended`
66
+ * ones; MCP adds its own sandboxes.
67
+ */
68
+ interface Session {
69
+ readonly id: string;
70
+ readonly name: string;
71
+ readonly kind: 'attended' | 'sandbox';
72
+ /**
73
+ * Whether a grid is showing this workbook.
74
+ *
75
+ * @remarks
76
+ * Separate from `kind` on purpose. `kind` says where the engine lives (a routing fact);
77
+ * `hasView` says whether anyone can SEE it — which is what decides if an in-grid highlight or
78
+ * prompt can do anything. They coincide today and are still two questions: conflating them is
79
+ * how "is this id still valid" and "is a human watching" came to be answered by one flag.
80
+ */
81
+ readonly hasView?: boolean;
82
+ /** The workbook's file, when known — disambiguates same-named files; the document identity. */
83
+ readonly path?: string;
84
+ readonly active?: boolean;
85
+ /**
86
+ * When the session's workbook was (re)loaded — its history epoch, epoch-ms. A session id
87
+ * survives a reload but its commit/undo history does not; this is the marker that scopes
88
+ * commit ids. Absent when the surface cannot know (older clients).
89
+ */
90
+ readonly openedAt?: number;
91
+ }
92
+ /**
93
+ * Host and runtime detail — the `--verbose` tail.
94
+ *
95
+ * @remarks
96
+ * Separated from `checks` because it answers nothing: it is what a person pastes into a bug
97
+ * report, and an agent paying context for a CPU model on every handshake is paying for
98
+ * noise. Absent unless asked for.
99
+ */
100
+ interface Host {
101
+ readonly platform: string;
102
+ readonly release: string;
103
+ readonly osType: string;
104
+ readonly hostname: string;
105
+ readonly arch: string;
106
+ readonly cpuCount: number;
107
+ readonly cpuModel: string;
108
+ readonly memoryTotal: number;
109
+ readonly memoryUsed: number;
110
+ readonly heapTotal: number;
111
+ readonly heapUsed: number;
112
+ readonly nodeEnv: string | null;
113
+ readonly configStore: string;
114
+ }
115
+ interface Report {
116
+ readonly product: 'SheetXL';
117
+ /** Engine version, or `local` in a workspace build. */
118
+ readonly version: string;
119
+ readonly build: string | null;
120
+ readonly surface: Surface;
121
+ /**
122
+ * When this report was collected (ISO 8601).
123
+ *
124
+ * @remarks
125
+ * Every answer here is a reading, not a property — most of all `attended`, which is a live
126
+ * probe of who has a workbook open. Undated, a report reads as a standing fact and gets carried
127
+ * for the rest of a conversation; stamped, its own perishability is visible.
128
+ */
129
+ readonly collectedAt: string;
130
+ /** False when any check is at `error` — the engine cannot be trusted to do the work. */
131
+ readonly ok: boolean;
132
+ /**
133
+ * A human has a workbook open right now.
134
+ *
135
+ * @remarks
136
+ * The mode determination from the skill's handshake, hoisted out of `checks` because it is
137
+ * the one field that changes what the agent is allowed to do rather than what it can do.
138
+ */
139
+ readonly attended: boolean;
140
+ readonly sessions: readonly Session[];
141
+ readonly checks: readonly Check[];
142
+ readonly host?: Host;
143
+ }
144
+ /**
145
+ * The license facts the engine and license rows are built from.
146
+ *
147
+ * @remarks
148
+ * Declared structurally rather than imported, because this package sits BELOW the engine:
149
+ * `@sheetxl/sdk` depends on utilities, never the reverse. The engine's `LicenseDetails`
150
+ * satisfies this without either side knowing about the other — `LicenseManager.getDetails()`
151
+ * is what both surfaces actually pass.
152
+ *
153
+ * Only what a report reads is listed. Entitlements the report never prints (domains,
154
+ * developer seats, per-feature validity) stay the engine's business.
155
+ */
156
+ interface LicenseSource {
157
+ /** The engine build this license was issued against, and when it was built. */
158
+ getBuildVersion(): string;
159
+ getBuildDate(): string;
160
+ getType(): string;
161
+ isEval(): boolean;
162
+ getExpiration(): Date | null;
163
+ /** Anything the agent can act on — an unlicensed feature, a violated term. */
164
+ getExceptions(): string[];
165
+ /** Where the key came from (`envVar`, `configStore`, …). Host diagnostics only. */
166
+ getKeyFrom(): string;
167
+ /** Entitlement ceilings, in their stated units (memory is GB). Zero means unmetered. */
168
+ getCpuCount(): number;
169
+ getMemory(): number;
170
+ }
171
+ /** How much the caller is willing to pay for, and what it can answer that the report cannot. */
172
+ interface CollectOptions {
173
+ readonly surface: Surface;
174
+ /**
175
+ * The engine's license, from the caller that booted it.
176
+ *
177
+ * @remarks
178
+ * Passed in for the same reason as `sessions`: the caller owns the engine, this package does
179
+ * not. Required rather than optional — `version` and the license row have no other source,
180
+ * and a report that fell back to `unlicensed` would read identically to a real one.
181
+ */
182
+ readonly license: () => Promise<LicenseSource>;
183
+ /**
184
+ * Session enumeration, when the caller already owns it.
185
+ *
186
+ * @remarks
187
+ * MCP passes its registry — it holds sandboxes the relay knows nothing about. The CLI
188
+ * omits this and the relay probe answers instead, which is why a CLI-only agent can still
189
+ * tell attended from unattended.
190
+ */
191
+ readonly sessions?: () => Promise<readonly Session[]>;
192
+ /**
193
+ * How many servers are serving this workspace, when the caller is one of them.
194
+ *
195
+ * @remarks
196
+ * Passed in rather than probed, for the same reason as `sessions`: only a running server knows
197
+ * this, and only about its own kind. Reported ONLY when there is more than one — "1 server is
198
+ * running" is not something an agent can act on, whereas two means their session ids are split
199
+ * between processes and a create/run pair can straddle them.
200
+ */
201
+ readonly serverCount?: number;
202
+ /** Skip every network and localhost probe. Nothing is guessed — unreachable checks are omitted. */
203
+ readonly offline?: boolean;
204
+ readonly includeHost?: boolean;
205
+ /** Directory relative paths resolve against, when the surface has its own notion of one. */
206
+ readonly workspace?: string;
207
+ }
208
+ }
209
+ //# sourceMappingURL=InfoTypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InfoTypes.d.ts","sourceRoot":"","sources":["../../../../src/info/InfoTypes.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,10 @@
1
+ import { Info } from './InfoTypes';
2
+ /**
3
+ * Collects every check, running the two probes that can block concurrently.
4
+ *
5
+ * @remarks
6
+ * The relay probe and the registry fetch are the only slow parts, and they are independent —
7
+ * awaited together so a cold handshake costs the slower of the two rather than their sum.
8
+ */
9
+ export declare function collectInfo(options: Info.CollectOptions): Promise<Info.Report>;
10
+ //# sourceMappingURL=collectInfo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collectInfo.d.ts","sourceRoot":"","sources":["../../../../src/info/collectInfo.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,aAAa,CAAC;AAsNxC;;;;;;GAMG;AACH,wBAAsB,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CA8GpF"}
@@ -0,0 +1,7 @@
1
+ export * from './InfoTypes';
2
+ export * from './collectInfo';
3
+ export * from './renderInfo';
4
+ export * from './relay';
5
+ export * from './updateCheck';
6
+ export * from './mcpClients';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/info/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC"}
@@ -0,0 +1,17 @@
1
+ export interface McpRegistration {
2
+ readonly name: string;
3
+ readonly file: string;
4
+ }
5
+ /**
6
+ * The command a client would use to register the server.
7
+ *
8
+ * @remarks
9
+ * Only Claude Code has a first-class registration command; everything else is a JSON edit, and
10
+ * telling an agent to "add it to the config" invites it to invent a schema. So the generic fix
11
+ * points at the one-command setup path instead of a file to hand-edit.
12
+ */
13
+ export declare const CLAUDE_CODE_FIX = "claude mcp add sheetxl -- npx -y sheetxl mcp";
14
+ export declare const GENERIC_FIX = "npx -y sheetxl setup";
15
+ /** Every client config found on this machine that registers the SheetXL MCP server. */
16
+ export declare function findMcpRegistrations(workspace: string): Promise<McpRegistration[]>;
17
+ //# sourceMappingURL=mcpClients.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcpClients.d.ts","sourceRoot":"","sources":["../../../../src/info/mcpClients.ts"],"names":[],"mappings":"AAyBA,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,iDAAiD,CAAC;AAC9E,eAAO,MAAM,WAAW,yBAAyB,CAAC;AA+DlD,uFAAuF;AACvF,wBAAsB,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC,CAcxF"}
@@ -0,0 +1,75 @@
1
+ /**
2
+ * Discovery of a live client-UI relay — how any node surface learns that a human has a
3
+ * workbook open.
4
+ *
5
+ * @remarks
6
+ * This is *discovery only*: finding the endpoint and reading the workbook list. The MCP
7
+ * protocol built on top of it (macros, presence, prompts) stays in `@sheetxl/mcp`, which
8
+ * layers its `RelayClient` over this.
9
+ *
10
+ * It lives here because presence is not an MCP fact. The lock file is written by the client UI
11
+ * and the CLI can read it just as well — so `sheetxl info` answers attended/unattended without
12
+ * an MCP server in the picture. Two copies of the lock protocol is the failure this prevents:
13
+ * they would drift, and the surface that drifted would report "nobody is watching" while
14
+ * somebody was.
15
+ */
16
+ /** The contents of a relay lock file, as written by the client UI. */
17
+ export interface RelayLock {
18
+ readonly port: number;
19
+ readonly token: string;
20
+ readonly workspace: string;
21
+ }
22
+ /**
23
+ * A workbook open in a client UI.
24
+ *
25
+ * @remarks
26
+ * The relay's own wire shape. Callers map it into whatever they hand onward.
27
+ */
28
+ export interface RelayWorkbook {
29
+ readonly id: string;
30
+ readonly name: string;
31
+ readonly active: boolean;
32
+ /**
33
+ * The workbook's file, when the client UI reports one.
34
+ *
35
+ * @remarks
36
+ * The id is path-derived in current clients (stable across reloads), so the path is no longer
37
+ * the ONLY durable handle — but it still travels: it disambiguates two same-named files, it is
38
+ * the identity a consumer matches documents on, and an untitled workbook's id is per-load.
39
+ * Older clients omit it (and mint per-load ids), hence optional rather than required — an
40
+ * absent path degrades a report, a mismatched contract breaks one.
41
+ */
42
+ readonly path?: string;
43
+ /**
44
+ * When this workbook was (re)loaded in the client UI — its history epoch, epoch-ms.
45
+ *
46
+ * @remarks
47
+ * A stable id survives a reload; the commit/undo history does not. This changing under a
48
+ * constant id is the one signal that commit ids from before it are gone. Absent on older clients.
49
+ */
50
+ readonly openedAt?: number;
51
+ }
52
+ /**
53
+ * Finds the live relay, or `null` when no client UI is running.
54
+ *
55
+ * @remarks
56
+ * Two strategies, in order:
57
+ *
58
+ * 1. The workspace-scoped lock — the case where the surface was launched from the project
59
+ * directory (Claude Code).
60
+ * 2. The newest lock that answers — VS Code's `contributes.mcpServers` launch does not
61
+ * guarantee cwd is the workspace root, so the scoped path can miss a relay that is right
62
+ * there.
63
+ *
64
+ * Stale locks are unlinked as a side effect, which is what keeps the probe cost bounded.
65
+ */
66
+ export declare function discoverRelay(): Promise<RelayLock | null>;
67
+ /**
68
+ * The workbooks currently open in the client UI behind a discovered relay.
69
+ *
70
+ * @remarks
71
+ * Takes only the endpoint fields so a caller holding a live connection (the MCP `RelayClient`)
72
+ * can reuse it without reconstructing a lock it no longer has on disk.
73
+ */
74
+ export declare function fetchRelayWorkbooks(lock: Pick<RelayLock, 'port' | 'token'>): Promise<RelayWorkbook[]>;
75
+ //# sourceMappingURL=relay.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"relay.d.ts","sourceRoot":"","sources":["../../../../src/info/relay.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;GAcG;AAEH,sEAAsE;AACtE,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB;;;;;;;;;OASG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB;;;;;;OAMG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC5B;AAoED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,aAAa,IAAI,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,CAU/D;AAED;;;;;;GAMG;AACH,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC,CAM3G"}
@@ -0,0 +1,23 @@
1
+ import { Info } from './InfoTypes';
2
+ /**
3
+ * The terminal block.
4
+ *
5
+ * @param report The collected report.
6
+ */
7
+ export declare function renderInfo(report: Info.Report): string;
8
+ /**
9
+ * The markdown rendering — what MCP returns.
10
+ *
11
+ * @remarks
12
+ * Fixes are repeated in one trailing block. An agent reading a report top-to-bottom to decide
13
+ * what to do next should not have to re-scan seven rows to collect the commands; if there is
14
+ * nothing to do, the block is absent and its absence is the signal.
15
+ *
16
+ * **No headings anywhere in it.** A client renders `#` at display size, which is the size of a
17
+ * document title — and this is a status blurb the length of a paragraph, returned beside a tool
18
+ * call, not a document. Bold labels carry the same structure at the size the content deserves.
19
+ * The reports in `@sheetxl/query` are documents and do use headings; the difference is the
20
+ * artifact, not the surface.
21
+ */
22
+ export declare function renderInfoMarkdown(report: Info.Report): string;
23
+ //# sourceMappingURL=renderInfo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderInfo.d.ts","sourceRoot":"","sources":["../../../../src/info/renderInfo.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,aAAa,CAAC;AAoFxC;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,GAAG,MAAM,CAqBtD;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,GAAG,MAAM,CA2C9D"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * The result of an update check.
3
+ *
4
+ * @remarks
5
+ * `cacheStatus` is reported rather than hidden so a caller can tell "you are current" from
6
+ * "we could not find out" — collapsing those two into one silent `ok` is how a stale install
7
+ * goes unnoticed for months.
8
+ */
9
+ export interface UpdateStatus {
10
+ readonly latest: string | null;
11
+ readonly cacheStatus: 'fresh' | 'refreshed' | 'missing';
12
+ }
13
+ /**
14
+ * The latest published `sheetxl` version, from cache when fresh.
15
+ *
16
+ * @param now Injected so the TTL is testable without a clock.
17
+ */
18
+ export declare function checkForUpdate(now?: number): Promise<UpdateStatus>;
19
+ /**
20
+ * Compares two dot-separated versions, ignoring any prerelease tail.
21
+ *
22
+ * @returns positive when `a` is newer than `b`.
23
+ *
24
+ * @remarks
25
+ * Not a semver dependency for one comparison. Prerelease ordering is out of scope: a
26
+ * prerelease and its release compare equal, which errs toward *not* nagging someone who
27
+ * deliberately installed a `-next` build.
28
+ */
29
+ export declare function compareVersions(a: string, b: string): number;
30
+ //# sourceMappingURL=updateCheck.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"updateCheck.d.ts","sourceRoot":"","sources":["../../../../src/info/updateCheck.ts"],"names":[],"mappings":"AA4BA;;;;;;;GAOG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,QAAQ,CAAC,WAAW,EAAE,OAAO,GAAG,WAAW,GAAG,SAAS,CAAC;CACzD;AAqBD;;;;GAIG;AACH,wBAAsB,cAAc,CAAC,GAAG,GAAE,MAAmB,GAAG,OAAO,CAAC,YAAY,CAAC,CAqBpF;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAU5D"}
@@ -0,0 +1,2 @@
1
+ export * from './toolLog';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/log/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
@@ -0,0 +1,104 @@
1
+ /**
2
+ * The agent tool-call log — one JSON object per line, appended to a local file.
3
+ *
4
+ * @remarks
5
+ * Every call an agent makes against SheetXL (MCP tool, CLI command) is recorded here, including
6
+ * the **full `run` source**, which every other surface discards. Two things need it: reviewing a
7
+ * manual VS Code/Copilot/CLI session after the fact, and the running log file a SpreadsheetBench
8
+ * submission has to ship.
9
+ *
10
+ * It lives in `@sheetxl/utils-node` rather than in the MCP server for the same reason relay discovery
11
+ * does: the CLI is a first-class agent surface and writes the identical record shape. Two copies
12
+ * of the schema would drift, and the analysis joins the files on it.
13
+ *
14
+ * Three rules this module exists to keep:
15
+ *
16
+ * - **Never stdout.** The MCP server speaks JSON-RPC there; a stray write corrupts the protocol.
17
+ * File appends only.
18
+ * - **Default off.** Zero-telemetry posture: nothing is written unless `SHEETXL_TOOL_LOG` says
19
+ * so, and nothing is ever uploaded anywhere.
20
+ * - **Never throw.** Logging failures are swallowed. A full disk must not fail a tool call.
21
+ */
22
+ /** Where a record came from. `ext` is the VS Code extension host's interactive sink. */
23
+ export type ToolLogTransport = 'mcp' | 'cli' | 'ext';
24
+ /** One line of the log. Extra keys are allowed — surfaces add their own fields. */
25
+ export interface ToolLogRecord {
26
+ /** ISO-8601, filled in by {@link logToolCall}. */
27
+ ts?: string;
28
+ /** Writer process id, filled in by {@link logToolCall}. */
29
+ pid?: number;
30
+ transport?: ToolLogTransport;
31
+ /** Tool name (`run`, `grep`, …) or CLI command path. */
32
+ tool: string;
33
+ sessionId?: string | null;
34
+ sessionKind?: 'attended' | 'sandbox' | null;
35
+ /** The connecting MCP client (Copilot, Claude Code, …) — how a session gets attributed. */
36
+ clientName?: string | null;
37
+ clientVersion?: string | null;
38
+ args?: unknown;
39
+ status?: 'ok' | 'error';
40
+ error?: string | null;
41
+ durationMs?: number;
42
+ resultBytes?: number;
43
+ /** Capped rendering of the result — enough to read the session back, not enough to bloat it. */
44
+ resultPreview?: string;
45
+ [key: string]: unknown;
46
+ }
47
+ export interface InitToolLogOptions {
48
+ /** Stamped on every record from this process. */
49
+ transport: ToolLogTransport;
50
+ /**
51
+ * Filename discriminator for surfaces that share a pid space with another writer — the VS Code
52
+ * extension host passes `ext` so its file never collides with an in-process MCP server's.
53
+ */
54
+ tag?: string;
55
+ }
56
+ /** The env var that turns logging on: a truthy flag, or a directory path to log into. */
57
+ export declare const TOOL_LOG_ENV = "SHEETXL_TOOL_LOG";
58
+ /**
59
+ * Arms the log for this process. Cheap and side-effect free when disabled (the directory is only
60
+ * created on the first actual write), so it is safe to call unconditionally at startup.
61
+ *
62
+ * @returns the file records will be appended to, or `null` when logging is off.
63
+ */
64
+ export declare function initToolLog(options: InitToolLogOptions): string | null;
65
+ /** The file being appended to, or `null` when logging is off. */
66
+ export declare function getToolLogPath(): string | null;
67
+ /** Whether {@link logToolCall} will write anything. */
68
+ export declare function isToolLogEnabled(): boolean;
69
+ /**
70
+ * Fields merged into every subsequent record — the MCP server sets `clientName`/`clientVersion`
71
+ * once the handshake has told it who connected.
72
+ */
73
+ export declare function setToolLogContext(fields: Partial<ToolLogRecord>): void;
74
+ /**
75
+ * Registers a second destination for records, alongside the file. `null` removes it.
76
+ *
77
+ * @remarks
78
+ * Deliberately **independent of the file sink**: the mirror runs whether or not `SHEETXL_TOOL_LOG`
79
+ * is set, because the two answer different questions. The file is the after-the-fact record a
80
+ * benchmark submission ships; a mirror is a live view — the MCP server sends records to the client
81
+ * UI's log channel (VS Code's SheetXL output channel), where "the agent just ran this and it did
82
+ * the wrong thing" is a thing you watch, not a file you go find. Off by default (nothing is
83
+ * mirrored until a surface asks), so the zero-telemetry posture is unchanged: this stays on the
84
+ * machine, between two local processes.
85
+ *
86
+ * The mirror sees the SAME enriched record the file would get, which is the point of hooking here
87
+ * rather than at the call sites — a tool added later reaches both sinks with nobody remembering.
88
+ * It is called synchronously and must not block; throwing is contained but pointless.
89
+ */
90
+ export declare function setToolLogMirror(sink: ((record: ToolLogRecord) => void) | null): void;
91
+ /** Caps a tool's arguments for logging. Source args survive whole up to {@link SOURCE_MAX}. */
92
+ export declare function capArgs(args: unknown): unknown;
93
+ /** Caps a result rendering for the `resultPreview` field. */
94
+ export declare function capPreview(text: string): string;
95
+ /**
96
+ * Records one call to whichever sinks are armed — the file ({@link initToolLog}) and/or the mirror
97
+ * ({@link setToolLogMirror}), each independently optional. Fire-and-forget: never awaited by
98
+ * callers, never throws, and a failure in either sink is silently dropped rather than surfaced
99
+ * into the tool call being logged.
100
+ */
101
+ export declare function logToolCall(record: ToolLogRecord): void;
102
+ /** Flushes pending appends. For process-exit paths that want the last line on disk. */
103
+ export declare function flushToolLog(): Promise<void>;
104
+ //# sourceMappingURL=toolLog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toolLog.d.ts","sourceRoot":"","sources":["../../../../src/log/toolLog.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,wFAAwF;AACxF,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;AAErD,mFAAmF;AACnF,MAAM,WAAW,aAAa;IAC5B,kDAAkD;IAClD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,2DAA2D;IAC3D,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B,wDAAwD;IACxD,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,WAAW,CAAC,EAAE,UAAU,GAAG,SAAS,GAAG,IAAI,CAAC;IAC5C,2FAA2F;IAC3F,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,IAAI,GAAG,OAAO,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gGAAgG;IAChG,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,kBAAkB;IACjC,iDAAiD;IACjD,SAAS,EAAE,gBAAgB,CAAC;IAC5B;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,yFAAyF;AACzF,eAAO,MAAM,YAAY,qBAAqB,CAAC;AA0C/C;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,kBAAkB,GAAG,MAAM,GAAG,IAAI,CAmBtE;AAED,iEAAiE;AACjE,wBAAgB,cAAc,IAAI,MAAM,GAAG,IAAI,CAE9C;AAED,uDAAuD;AACvD,wBAAgB,gBAAgB,IAAI,OAAO,CAE1C;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,IAAI,CAEtE;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,CAAC,GAAG,IAAI,GAAG,IAAI,CAErF;AAsBD,+FAA+F;AAC/F,wBAAgB,OAAO,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAI9C;AAED,6DAA6D;AAC7D,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE/C;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI,CAyCvD;AAED,uFAAuF;AACvF,wBAAgB,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CAE5C"}
@@ -0,0 +1,2 @@
1
+ export * from './printMarkdown';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/terminal/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,30 @@
1
+ export interface PrintMarkdownOptions {
2
+ /**
3
+ * Where the report goes. Defaults to stdout.
4
+ *
5
+ * @remarks
6
+ * For a caller that has already given stdout to something else — the CLI's `--out -`, which
7
+ * streams a workbook down the pipe — a report written to stdout would interleave two payloads
8
+ * on one stream and corrupt both. Such a caller passes stderr instead.
9
+ *
10
+ * Styling follows whichever stream is actually written to, so a report redirected to a terminal's
11
+ * stderr still gets its colors and one redirected into a file still does not.
12
+ */
13
+ stream?: NodeJS.WriteStream;
14
+ }
15
+ /**
16
+ * Renders a markdown string to the terminal.
17
+ *
18
+ * @remarks
19
+ * **Line-based coloring, never a markdown parse.** The reports are laid out as raw text —
20
+ * two-space fact indents, whitespace-aligned grids and region listings — and a real markdown
21
+ * renderer (this used to be marked-terminal) REFLOWS that: a grid's padded header row becomes an
22
+ * indented "code block", fact lines join into paragraphs, blank lines appear after headings. The
23
+ * one viewer that mangled the reports was the CLI's own TTY path.
24
+ *
25
+ * So the TTY gets the SAME BYTES an agent gets from a pipe, plus ANSI style: headings cyan,
26
+ * `` `code` `` yellow, `**bold**` bold, `_italic_` italic (markers substituted for the color).
27
+ * Non-TTY output is verbatim.
28
+ */
29
+ export declare const printMarkdown: (md: string, options?: PrintMarkdownOptions) => void;
30
+ //# sourceMappingURL=printMarkdown.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"printMarkdown.d.ts","sourceRoot":"","sources":["../../../../src/terminal/printMarkdown.ts"],"names":[],"mappings":"AAcA,MAAM,WAAW,oBAAoB;IACnC;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC,WAAW,CAAC;CAC7B;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,aAAa,GAAI,IAAI,MAAM,EAAE,UAAU,oBAAoB,KAAG,IAO1E,CAAC"}