@visulima/vis-mcp 1.0.47 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,606 @@
1
+ ## @visulima/vis-mcp [3.0.0](https://github.com/visulima/visulima/compare/@visulima/vis-mcp@2.0.0...@visulima/vis-mcp@3.0.0) (2026-10-15)
2
+
3
+ ### ⚠ BREAKING CHANGES
4
+
5
+ * Deno is no longer a supported runtime or package manager.
6
+ vis targets node/bun runtimes and aube/npm/pnpm/yarn package managers; the
7
+ deno-lint/deno-fmt adapters and deno inference targets are removed.
8
+
9
+ * fix: resolve eslint errors after deno removal
10
+
11
+ - vis: use a block body for applyIgnoreScripts (arrow-body-style)
12
+ - is-ansi-color-supported: drop stale eslint-disable directives and
13
+ replace the raw-release if/else with a ternary (unicorn/prefer-ternary)
14
+
15
+ * docs(cron-parser): remove remaining deno runtime mentions
16
+
17
+ These doc/config files arrived with main's dialect-gating commit after this
18
+ branch's base, so they still listed Deno as a supported runtime.
19
+
20
+ * feat!: remove deno runtime and tooling support
21
+
22
+ Deno is being wound down: Cloudflare is acquiring the Deno team, the runtime
23
+ gets one more year of monthly maintenance before development ends, and Deno
24
+ Deploy shuts down. Drop Deno as a supported runtime, package manager, and
25
+ lint/fmt/inference target across the monorepo.
26
+
27
+ - vis: remove the deno runtime path, deno-lint/deno-fmt adapters, the
28
+ deno.json inference detector, Deno PM handling (TypeScript + Rust native
29
+ resolver), and the devcontainer deno mount; regenerate the JSON schemas.
30
+ - libraries: drop Deno runtime detection from cerebro, ono,
31
+ is-ansi-color-supported, and task-runner command parsing; remove Deno
32
+ wording from package docs and READMEs.
33
+ - delete the examples/deno directories (ono, pail, storage) and Deno docs.
34
+ - keep JSR publishing (registry usable from Node), license/attribution
35
+ comments, the secret-scanner Deno-token rule, and the historical RFCs.
36
+ * Deno is no longer a supported runtime or package manager.
37
+ vis targets node/bun runtimes and aube/npm/pnpm/yarn package managers; the
38
+ deno-lint/deno-fmt adapters and deno inference targets are removed.
39
+
40
+ * fix: resolve eslint errors after deno removal
41
+
42
+ - vis: use a block body for applyIgnoreScripts (arrow-body-style)
43
+ - is-ansi-color-supported: drop stale eslint-disable directives and
44
+ replace the raw-release if/else with a ternary (unicorn/prefer-ternary)
45
+
46
+ * chore(vis): tidy deno-removal leftovers from review
47
+
48
+ * fix(vis): drop unused logger from x handler, restore bun typing
49
+
50
+ Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
51
+
52
+ * docs: add migration notes for removed deno exports
53
+
54
+ Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
55
+
56
+ * feat(vis): warn on stale adapter ids and deno-only projects
57
+
58
+ Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
59
+
60
+ * refactor(vis): derive runtime ids and reuse bun detection
61
+
62
+ Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
63
+
64
+ * refactor(vis): drop jsr deno option and deno auth reference
65
+
66
+ Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
67
+
68
+ * fix(vis): restore runtime id schema description
69
+
70
+ Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
71
+
72
+ * refactor(vis): remove jsr publishing support
73
+
74
+ Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
75
+
76
+ * feat(bytes): port @std/bytes helpers back in
77
+
78
+ Carries the Uint8Array helpers from @std/bytes@1.0.6 (MIT, Copyright the Deno authors)
79
+ into src/std-bytes.ts and re-exports them from the package entry. Keeps the public API that
80
+ the Deno-removal commit dropped, without the jsr: devDependency. Docs and AGENTS notes are
81
+ restored to describe the ported functions.
82
+
83
+ Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
84
+
85
+ * docs(bytes): attribute ported @std/bytes source
86
+
87
+ The license file still listed @jsr/std__bytes as a bundled dependency.
88
+ Replace it with the MIT notice for the ported src/std-bytes.ts, placed outside
89
+ the generated dependency blocks.
90
+
91
+ Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
92
+
93
+ * fix(cron-parser): keep reviewed docs and 1.1.0 version
94
+
95
+ The rebase onto the remote branch dropped the reviewed dialect sentence in the README and
96
+ the installation table row, and the release commit's 1.1.0 version bump.
97
+
98
+ ### Features
99
+
100
+ * remove deno runtime and tooling support ([#973](https://github.com/visulima/visulima/issues/973)) ([26fada1](https://github.com/visulima/visulima/commit/26fada1ac04731cba9db8f74fe20849c0a15db74))
101
+
102
+
103
+ ### Dependencies
104
+
105
+ * **@visulima/vis:** upgraded to 6.0.0
106
+
107
+ ## @visulima/vis-mcp [2.0.0](https://github.com/visulima/visulima/compare/@visulima/vis-mcp@1.0.47...@visulima/vis-mcp@2.0.0) (2026-10-14)
108
+
109
+ ### ⚠ BREAKING CHANGES
110
+
111
+ * **vis:** vis run <target> now exits 1 when no project defines the
112
+ target. Scripts that relied on the silent exit 0 must pass --if-present.
113
+
114
+ Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
115
+
116
+ * feat(task-runner): add tracker kind to trace key
117
+
118
+ The trace key now includes which mechanism observed the file accesses:
119
+ seccomp, strace, interpose, iat or preload. The same workspace traced on
120
+ Linux and macOS can no longer produce the same key for different
121
+ observations.
122
+
123
+ Upgrade notes:
124
+ - Traced entries written after this change are keyed on the new digest.
125
+ Entries written before it stay reachable through the task index and
126
+ are validated against their files as before, so there is no forced
127
+ miss on upgrade.
128
+
129
+ Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
130
+
131
+ * feat(task-runner): fall back to declared hash
132
+
133
+ A traced task whose tracker observed no workspace access was never
134
+ cached. That left targets which declare inputs uncached on hosts without
135
+ a working tracker. When the target declares inputs, such a run is now
136
+ keyed on its declared hash instead. Targets without inputs keep the
137
+ previous behaviour: no cache entry and a warning.
138
+
139
+ The declared hash is computed only when the tracker is empty, so traced
140
+ runs that observe files do no extra hashing. A fallback entry is stored
141
+ without a fingerprint, and the next run validates it by recomputing the
142
+ declared hash. A changed hash is reported as declared-changed. The task
143
+ result and the run summary record hashSource: "declared-fallback".
144
+
145
+ Upgrade notes:
146
+ - Existing entries are unchanged. Only runs that observe no workspace
147
+ access, for targets that declare inputs, gain a cache entry.
148
+
149
+ Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
150
+
151
+ * feat(vis): show declared-fallback key in cache why
152
+
153
+ cache why and cache hash now say when a traced run was keyed on its
154
+ declared hash, and the JSON output carries hashSource. The vis config
155
+ schema is regenerated for the updated autoFingerprint description.
156
+
157
+ Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
158
+
159
+ * docs(vis): describe declared fallback and trace key
160
+
161
+ The caching guide and configuration reference now explain when an empty
162
+ trace is keyed on the declared hash, how a trace key is built, and what
163
+ cache why reports. The RFC marks G1-B and G4 done.
164
+
165
+ Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
166
+
167
+ * docs(task-runner): describe declared fallback for empty traces
168
+
169
+ The empty-fingerprint section now explains both outcomes: a target that
170
+ declares inputs is keyed on its declared hash, and one that does not is
171
+ left uncached with a warning.
172
+
173
+ Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
174
+
175
+ * docs(vis): correct trace caching claim in why-vis
176
+
177
+ A run the tracker cannot observe is keyed on its declared inputs when
178
+ the target declares them. It is not cached otherwise.
179
+
180
+ Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
181
+
182
+ * feat(task-runner): parse top-level && chains
183
+
184
+ Add splitCompoundCommand, a quote-aware splitter that cuts a shell
185
+ command on top-level && only. Anything it does not model (;, ||, a
186
+ background &, subshells, command substitution, heredocs, comments,
187
+ empty segments, cd/export/source/set/trap/exec and VAR=value prefixes)
188
+ leaves the whole command unsplit and reports why.
189
+
190
+ Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
191
+
192
+ * feat(task-runner): add splitCompound segment chains
193
+
194
+ Add the splitCompound target option. A declared-mode target whose
195
+ * **vis:** `vis run` with --filter, --query or --tag that selects no
196
+ project now exits 1. Scripts that relied on the silent exit 0 must pass
197
+ --if-present.
198
+
199
+ Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
200
+
201
+ * test(vis): keep empty --affected results exit 0
202
+
203
+ Pins the behaviour the empty-selection fix must not change: when a --tag
204
+ selects a project that --affected then excludes, the run prints "No
205
+ projects affected by the changes." and returns. A mutation that throws
206
+ there fails the test.
207
+
208
+ The fixture repo runs with GIT_* variables cleared, so it cannot act on
209
+ the repository that a git hook is committing.
210
+
211
+ Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
212
+
213
+ * fix(vis): let ci and affected opt out of empty runs
214
+
215
+ vis run now fails when a target, --query or tag selects no projects, and
216
+ vis ci / vis affected hand their --query to it. A job whose query can
217
+ legitimately match nothing had no way to say so. Add --if-present to both
218
+ and forward it to vis run.
219
+
220
+ Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
221
+
222
+ * fix(task-runner): match excludes inside the workspace
223
+
224
+ The tracker tested its exclude patterns (/dev/, /tmp/, /etc/, ...) against
225
+ the absolute path before checking containment. A workspace under any of
226
+ those directory names, such as ~/dev/project or a /tmp CI checkout,
227
+ recorded no accesses at all on the strace, seccomp, interpose and IAT
228
+ paths, so traced caching never engaged. The Windows IAT check was also a
229
+ lowercase startsWith without a separator boundary, so a workspace /ws/app
230
+ accepted /ws/app-other.
231
+
232
+ Every path now goes through resolveAccessPath: containment first, then the
233
+ patterns against the path inside the workspace.
234
+
235
+ Upgrade notes: traced targets in a workspace under a dev, tmp or etc
236
+ directory now cache where they previously never did. The IAT path no longer
237
+ accepts sibling directories that share the workspace prefix.
238
+
239
+ Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
240
+
241
+ * fix(task-runner): key unset env names apart from empty ones
242
+
243
+ A traced key recorded an unset name and an empty value the same way, so a
244
+ name that went from unset to "" hit a stale entry. An unset name now keys
245
+ differently from an empty one, using the same presence scheme as the
246
+ declared hasher.
247
+
248
+ validate takes the env to check against. It defaults to process.env, so
249
+ existing callers see no change; the next commit passes the child env.
250
+
251
+ Upgrade notes: traced entries that key an env name miss once after
252
+ upgrading, because the stored env key format changed.
253
+
254
+ Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
255
+
256
+ * fix(task-runner): key traced runs on the child env
257
+
258
+ A traced run keyed the parent's env values, so a value the child receives
259
+ from another source (an envFile, service env, VIS_ARG_* or a per-target env)
260
+ was not in the key, and changing it left a stale hit.
261
+
262
+ The key now reads the names it covers from the resolved child env
263
+ (TaskRunnerContext.resolveChildEnv). A name the clean policy hides hashes as
264
+ unset. Validation reads the same env, so a hit needs the values the child
265
+ will see. Untracked names stay out of the key, and the key does not cover
266
+ the whole environment.
267
+
268
+ The key also covers the command the run spawns. TaskRunnerContext.resolveCommand
269
+ supplies it, so caller-side arguments and shell wrapping change the key.
270
+ Without it the project target command is used, as before.
271
+
272
+ TaskRunnerContext.preTraceCheck runs on a cache miss before tracking. A
273
+ returned message fails the task with exit code 1; the child does not spawn
274
+ and nothing is cached.
275
+
276
+ Upgrade notes: a traced key changes when the spawned command differs from
277
+ the configured one. Traced entries that key an env name also miss once,
278
+ as in the previous commit.
279
+
280
+ Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
281
+
282
+ * fix(vis): traced targets run the executor command
283
+
284
+ A traced target ran the raw project command. Forwarded arguments
285
+ (`vis run build -- --flag`) and `affectedFiles: "args"` paths never reached
286
+ the child, `${...}` tokens and a custom `shell` did not apply, and
287
+ `strictEnv` was not checked.
288
+
289
+ The executor and the traced run now share one resolver for the spawned
290
+ command, and one strict-env check that reads the child env the spawn gets.
291
+ Both spawn the same string, and the traced key hashes it, so the arguments
292
+ and affected files change the key.
293
+
294
+ Upgrade notes:
295
+ - Traced targets now receive forwarded arguments and `affectedFiles: "args"`
296
+ paths. A traced run with these misses once, since the key includes them.
297
+ - Traced targets now run their configured command, with tokens expanded and
298
+ any custom shell applied, as the executor does. They used to run the raw
299
+ project command.
300
+ - `strictEnv` (flag or config) now fails a traced target that references an
301
+ unset variable, before the child starts. A traced target that passed with
302
+ an unset reference now fails.
303
+ - Traced keys hash the env values the child receives (see the task-runner
304
+ commits), so traced targets with env names in the key miss once.
305
+
306
+ Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
307
+
308
+ * docs(vis): document the traced key and strict env
309
+
310
+ The caching guide lists what a traced key covers: the spawned command and
311
+ the env values the child receives for the names the key covers. The run
312
+ guide says the strict-env check runs for traced targets too. The RFC
313
+ records the resolution and the gaps that remain: the declared hasher still
314
+ reads process.env for fingerprintEnv and envVars, and persistent targets and
315
+ the TUI retry spawn the raw command, so forwarded arguments do not reach them.
316
+
317
+ Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
318
+
319
+ * fix(vis): persistent and retried tasks keep args
320
+
321
+ Persistent targets and a TUI retry spawned the raw override command, so
322
+ forwarded arguments, affectedFiles args and a custom shell were dropped
323
+ while the first attempt of the same task had them. Both now spawn the
324
+ command the executor and the traced run use.
325
+
326
+ Upgrade notes: vis run <persistent> -- <args> now passes the arguments to
327
+ the persistent command.
328
+
329
+ Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
330
+
331
+ * fix(task-runner): key declared env on the child env
332
+
333
+ The declared hasher read fingerprintEnv, envVars, env:// inputs,
334
+ autoEnvVars and framework names from the parent's process.env, but the
335
+ child also gets values from envFile layering, service env, task arguments
336
+ and per-target env. A cached target keyed on a variable only its env file
337
+ defines kept serving a stale hit after the file changed, and fingerprintEnv
338
+ wildcards never matched names the parent lacked.
339
+
340
+ The hasher takes a childEnv resolver, supplied from resolveChildEnv, and
341
+ keys and expands patterns against the environment the task will receive.
342
+ globalEnv is workspace-wide and still reads the parent's.
343
+
344
+ Upgrade notes: a declared target whose child sees a different value than
345
+ the parent for a keyed name gets one new key, and so one cache miss. Keys
346
+ for names with equal values are unchanged.
347
+
348
+ Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
349
+
350
+ * fix(vis): doctor no longer crashes without a lockfile
351
+
352
+ vis doctor looked the package manager up twice with a strict resolver that
353
+ throws when a workspace has no lockfile and no packageManager field, the
354
+ state of every new project. It crashed with a stack trace instead of
355
+ reporting. Reuse the tolerant detection the command already performed.
356
+
357
+ Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
358
+
359
+ * docs(vis-mcp): fix lint and cache tool text
360
+
361
+ The lint description listed the default adapters without the opt-in
362
+ typecheck adapter. cache_why and cache_hash described hashDetails only,
363
+ but trace-mode tasks have no hashDetails: their reasons are in
364
+ task.cacheMissReasons and their tracked state is in trackedFingerprint.
365
+
366
+ Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
367
+
368
+ * docs(vis): cover run, cache and lint in the skill
369
+
370
+ Add the tools the table left out, correct the tool count, and document
371
+ the empty-selection exit code, the opt-in typecheck adapter, the trace
372
+ miss reasons, and the doctor env coverage check. Replace the cache-miss
373
+ flow's invented status and stderr fields with the real summary fields.
374
+
375
+ Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
376
+
377
+ * docs(vis): sync ai guide tool reference
378
+
379
+ The guide listed eight tools and described a run_task tool that does
380
+ not exist. Add the five missing tools and the trace-mode fields that
381
+ cache_why and cache_hash return.
382
+
383
+ Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
384
+
385
+ * fix(vis-mcp): read the run summary vis really writes
386
+
387
+ list_runs read runId, startedAt, status and tasks[].status, none of which
388
+ the run summary has: it carries id, startTime, stats and per-task
389
+ exitCode. Every run therefore showed as a success with no failures and no
390
+ start time, including failed ones, and get_run_logs echoed an undefined
391
+ run id. Read the real fields, fall back to the old spellings, and test
392
+ against a summary shaped like the one vis writes.
393
+
394
+ Upgrade notes: list_runs now reports failed runs as failures, with their
395
+ start time and task counts.
396
+
397
+ Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
398
+
399
+ * feat(task-runner): chain trace keys per segment
400
+
401
+ A `splitCompound` target with `hashMode: "trace"` (or workspace
402
+ `autoFingerprint`) was refused and ran whole. It now splits like a declared
403
+ target. Each segment runs through the tracker on its own command, and its
404
+ trace key folds in the trace key of the segment before it.
405
+
406
+ - fingerprint: `TaskFingerprint.chainKey` holds the predecessor's trace key.
407
+ It joins `hashFingerprint` only when set, so keys of ordinary tasks do not
408
+ move (a test pins two of them). `validateChain` checks it on lookup, after
409
+ the command and tracker checks and before any file is hashed, and a moved
410
+ predecessor misses with `chain-changed`.
411
+ - orchestrator: a segment after the first keys on its predecessor's trace key.
412
+ A segment whose predecessor has no key this run is neither served nor stored.
413
+ A traced segment publishes its key on a hit as well as on a store.
414
+ - default resolver: reads a segment's command from `overrides`, so the tracker
415
+ and the tracker-kind prediction see that segment's command, not the chain.
416
+ - Refusals kept: `{ auto: true }` outputs, `when`, `always`, custom shell and
417
+ unsupported shell syntax. The trace and auto-fingerprint refusals are removed.
418
+
419
+ Upgrade notes:
420
+
421
+ - Targets that set `splitCompound` together with `hashMode: "trace"` or
422
+ `taskRunner.autoFingerprint` now run as `target#n` segments. They used to run
423
+ whole. Their first run after upgrading misses, because the segment entries
424
+ are new.
425
+ - Keys of targets that do not split are unchanged, both traced and declared.
426
+ - `vis run --dry-run` lists the segments of these targets, each marked `(trace)`.
427
+ - `SplitCompoundOptions` (exported from `@visulima/task-runner`) no longer has
428
+ `autoFingerprint`. Passing it is now a type error. It had no effect once the
429
+ split refusal was gone.
430
+ - The `splitCompound` description in the vis config schemas is regenerated.
431
+
432
+ Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
433
+
434
+ * fix(vis): give segments their target's service env
435
+
436
+ The service env of a run is keyed on the target's id, before a
437
+ `splitCompound` target is split. A segment runs under its own id
438
+ (`target#n`), so its spawn found no service env. A split target therefore
439
+ lost the variables of the services it depends on, in declared mode as well
440
+ as traced mode.
441
+
442
+ `resolveTaskSpawn` now reads a segment's entry from the target it runs in
443
+ place of. Every spawn path reads through that function, so the executor, the
444
+ persistent launch and the retry get the same environment.
445
+
446
+ Upgrade notes:
447
+
448
+ - A `splitCompound` target's segments now receive the service env they used
449
+ to miss. A segment's key changes once after upgrading only when it names a
450
+ service variable, because keys cover the env values the child receives.
451
+
452
+ Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
453
+
454
+ * test(vis): cover traced segments through vis run
455
+
456
+ Runs a `hashMode: "trace"` target with `splitCompound` through the run
457
+ handler. Covers the last-segment-only re-run, the re-run of every segment
458
+ when the first segment's input changes, forwarded arguments on the last
459
+ segment only, and the `(trace)` annotation on each segment in the dry-run
460
+ plan.
461
+
462
+ Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
463
+
464
+ * docs(vis): document traced segment keys
465
+
466
+ The `splitCompound` option no longer refuses trace hashing. The run option
467
+ row and the caching guide now describe how a traced segment's key chains to
468
+ its predecessor, and the cases where a segment is neither served nor stored.
469
+ The RFC marks G3.3 done and records the chain, the kept refusals and the
470
+ limits found while implementing it.
471
+
472
+ Upgrade notes:
473
+
474
+ - The caching guide and the run option table no longer list trace hashing as
475
+ a reason the split is refused. Targets that combine `splitCompound` with
476
+ `hashMode: "trace"` split as described in the previous commits.
477
+
478
+ Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
479
+
480
+ * fix(vis): annotate traced tasks under auto-fingerprint
481
+
482
+ The dry-run plan marked a task `(trace)` only when its own `hashMode` was
483
+ `"trace"`. Under `taskRunner.autoFingerprint` the engine traces every task,
484
+ segments included, so their plan lines showed no trace mark.
485
+
486
+ The annotation now follows the engine: `hashMode: "trace"` or the workspace
487
+ switch.
488
+
489
+ Tests cover the dry-run annotation under the workspace switch, and
490
+ `vis cache why` on a segment that missed because the segment before it moved.
491
+
492
+ Upgrade notes:
493
+
494
+ - Under `taskRunner.autoFingerprint`, `vis run --dry-run` now marks every task
495
+ `(trace)`, including targets that do not split. Before, only per-target trace
496
+ targets were marked. The run itself is unchanged.
497
+
498
+ Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
499
+
500
+ * test(task-runner): guard segment tests for win32
501
+
502
+ Two segment tests use a bare `true` command as a segment whose tracker sees
503
+ nothing. `true` is a POSIX builtin that cmd.exe lacks, so they now skip on
504
+ win32. The clean-environment test passes the platform's essential names
505
+ (SystemRoot on Windows) to the child, so node can start there.
506
+
507
+ Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
508
+
509
+ * docs(vis): correct the chain miss reason in the RFC
510
+
511
+ A moved predecessor misses with `chain-changed`, which `vis cache why` prints
512
+ as `Previous segment changed`. The reason does not name the predecessor, so
513
+ the RFC no longer says it does.
514
+
515
+ Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
516
+
517
+ * fix(vis): report target properties under options
518
+
519
+ splitCompound, hashMode, fingerprintEnv and the other target-level
520
+ properties are read from the target, not from its options bag. Written
521
+ under options they parsed fine and did nothing, and the run.mdx options
522
+ table listed splitCompound there. Warn when a run finds one under options,
523
+ and move splitCompound out of the options table with a note on which keys
524
+ are target-level.
525
+
526
+ Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
527
+
528
+ * fix(task-runner): key dependents on traced hits
529
+
530
+ A traced task published its key only when it ran and stored, not when
531
+ it was served from cache. A declared task that dependsOn it then folded
532
+ the traced key on a cold run and nothing on a warm one, so its key
533
+ flipped with whether the dependency ran. Worse, the key without the
534
+ dependency was shared across dependency states, so after the dependency
535
+ changed and then hit again the dependent was served output built from
536
+ the older state.
537
+
538
+ Publish the key on every traced hit, as segments already did.
539
+
540
+ Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
541
+
542
+ * fix(vis): replace every match in two rewrites
543
+
544
+ CodeQL flagged two string replaces that rewrite only the first match.
545
+ Neither input holds a second match today, but replaceAll states the
546
+ intent and keeps the code scan green.
547
+
548
+ Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
549
+
550
+ * fix(vis): check referenced tsconfigs in build mode
551
+
552
+ tsc -b rejects --noEmit once one project references another (TS6310),
553
+ so a solution-style workspace whose projects import each other could
554
+ never pass the type check. Drop the flag in build mode and document
555
+ that it writes each project's own outDir and tsbuildinfo.
556
+
557
+ Also decide config ownership with a relative path, so a root with
558
+ Windows separators still finds its own tsconfig.
559
+
560
+ Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
561
+
562
+ * fix(vis): keep the GitLab token off self-hosted hosts
563
+
564
+ GITLAB_TOKEN belongs to gitlab.com, but a gitlab://host source names a
565
+ host the template author chose, so the token was sent wherever the URL
566
+ pointed. Skip the environment token there; create.auth, a token in the
567
+ URL and GIGET_AUTH still apply.
568
+
569
+ Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
570
+
571
+ * fix(vis): apply review fixes to create, doctor, run
572
+
573
+ - resolve a create.defaultTemplate alias before the org preflight
574
+ - pass the config to the task overlay loader in the env check
575
+ - keep doctor running when the env coverage check throws
576
+ - retry a split target by segment id
577
+ - declare if-present with negatable() and drop the tag claim from ci
578
+ - correct the clean-env note for traced targets and the splitCompound
579
+ and if-present wording in the docs
580
+
581
+ Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
582
+
583
+ * test: fix windows paths, quoting and env names
584
+
585
+ - pass a file path to node as an argument, not inside a JS string
586
+ - quote only values that contain whitespace, as cmd drops the first
587
+ and last quote of a command that starts with one
588
+ - match env names without regard to case and allow the names Windows
589
+ adds to every process
590
+ - compare paths in the normalised form the code returns
591
+ - expect cmd to leave $VAR unexpanded
592
+
593
+ Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
594
+
595
+ ### Features
596
+
597
+ * **vis:** git templates, clean env cache keys, trace segments ([#969](https://github.com/visulima/visulima/issues/969)) ([f16cf03](https://github.com/visulima/visulima/commit/f16cf038f9827abcf814fa1c2a5821c004d6d746)), closes [id#1](https://github.com/visulima/id/issues/1) [id#2](https://github.com/visulima/id/issues/2)
598
+
599
+
600
+ ### Dependencies
601
+
602
+ * **@visulima/vis:** upgraded to 5.0.0
603
+
1
604
  ## @visulima/vis-mcp [1.0.47](https://github.com/visulima/visulima/compare/@visulima/vis-mcp@1.0.46...@visulima/vis-mcp@1.0.47) (2026-10-14)
2
605
 
3
606
 
package/dist/bin.js CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import{realpathSync as t}from"node:fs";import{argv as e}from"node:process";import{fileURLToPath as o}from"node:url";import{startMcpServer as a}from"./packem_shared/createMcpServer-C4LuWhpp.js";const i=async()=>{try{await a()}catch(r){process.stderr.write(`[vis-mcp] failed to start: ${r instanceof Error?r.message:String(r)}
2
+ import{realpathSync as t}from"node:fs";import{argv as e}from"node:process";import{fileURLToPath as o}from"node:url";import{startMcpServer as a}from"./packem_shared/createMcpServer-CPh-bGG-.js";const i=async()=>{try{await a()}catch(r){process.stderr.write(`[vis-mcp] failed to start: ${r instanceof Error?r.message:String(r)}
3
3
  `),process.exit(1)}},s=(()=>{const r=e[1];if(r===void 0)return!1;try{return t(r)===t(o(import.meta.url))}catch{return!1}})();s&&await i();export{i as main};
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{execVis as t,execVisJson as o}from"./packem_shared/execVis-CInWWszP.js";import{clearListCache as i,listVisJson as p}from"./packem_shared/clearListCache-D-qeI660.js";import{errorResponse as f,okResponse as x,okStructuredResponse as a}from"./packem_shared/errorResponse-D1WOFYuT.js";import{createMcpServer as c,registerAllTools as l,startMcpServer as n}from"./packem_shared/createMcpServer-C4LuWhpp.js";import{registerAdvisoryStatus as d}from"./packem_shared/registerAdvisoryStatus-DnpRlAZ2.js";import{registerAudit as R}from"./packem_shared/registerAudit-ZskmQpJB.js";import{registerCacheHash as V}from"./packem_shared/registerCacheHash-CLFe-S23.js";import{registerCacheWhy as T}from"./packem_shared/registerCacheWhy-DBIgl8ww.js";import{registerDescribeProject as v}from"./packem_shared/registerDescribeProject-zZZrCz2G.js";import{registerDescribeTemplate as C}from"./packem_shared/registerDescribeTemplate-D1DYYNOB.js";import{registerFmt as b}from"./packem_shared/registerFmt-DYE0dqsx.js";import{registerGetRunLogs as y}from"./packem_shared/registerGetRunLogs-CukA12J7.js";import{registerLint as I}from"./packem_shared/registerLint-D_A4H5jb.js";import{registerListProjects as M}from"./packem_shared/registerListProjects-3dPVnYC9.js";import{registerListRuns as G}from"./packem_shared/registerListRuns-BoZ7DRKb.js";import{registerListTargets as O}from"./packem_shared/registerListTargets-95gAK_Bj.js";import{registerListTemplates as q}from"./packem_shared/registerListTemplates-LK8yLlVB.js";import{isSafeOptionValue as z,isSafePositional as B,isValidRunId as E,isValidTaskId as K}from"./packem_shared/isSafeOptionValue-BEUaZ7UP.js";export{i as clearListCache,c as createMcpServer,f as errorResponse,t as execVis,o as execVisJson,z as isSafeOptionValue,B as isSafePositional,E as isValidRunId,K as isValidTaskId,p as listVisJson,x as okResponse,a as okStructuredResponse,d as registerAdvisoryStatus,l as registerAllTools,R as registerAudit,V as registerCacheHash,T as registerCacheWhy,v as registerDescribeProject,C as registerDescribeTemplate,b as registerFmt,y as registerGetRunLogs,I as registerLint,M as registerListProjects,G as registerListRuns,O as registerListTargets,q as registerListTemplates,n as startMcpServer};
1
+ import{execVis as t,execVisJson as o}from"./packem_shared/execVis-CInWWszP.js";import{clearListCache as i,listVisJson as p}from"./packem_shared/clearListCache-D-qeI660.js";import{errorResponse as f,okResponse as x,okStructuredResponse as a}from"./packem_shared/errorResponse-D1WOFYuT.js";import{createMcpServer as c,registerAllTools as l,startMcpServer as n}from"./packem_shared/createMcpServer-CPh-bGG-.js";import{registerAdvisoryStatus as d}from"./packem_shared/registerAdvisoryStatus-DnpRlAZ2.js";import{registerAudit as R}from"./packem_shared/registerAudit-ZskmQpJB.js";import{registerCacheHash as V}from"./packem_shared/registerCacheHash-BGyhpFep.js";import{registerCacheWhy as T}from"./packem_shared/registerCacheWhy-CGuHRmfC.js";import{registerDescribeProject as v}from"./packem_shared/registerDescribeProject-zZZrCz2G.js";import{registerDescribeTemplate as C}from"./packem_shared/registerDescribeTemplate-D1DYYNOB.js";import{registerFmt as b}from"./packem_shared/registerFmt-BiW3Urv2.js";import{registerGetRunLogs as y}from"./packem_shared/registerGetRunLogs-tcoMohKG.js";import{registerLint as I}from"./packem_shared/registerLint-BmSZeteC.js";import{registerListProjects as M}from"./packem_shared/registerListProjects-3dPVnYC9.js";import{registerListRuns as G}from"./packem_shared/registerListRuns-DA-dMOsv.js";import{registerListTargets as O}from"./packem_shared/registerListTargets-95gAK_Bj.js";import{registerListTemplates as q}from"./packem_shared/registerListTemplates-LK8yLlVB.js";import{isSafeOptionValue as z,isSafePositional as B,isValidRunId as E,isValidTaskId as K}from"./packem_shared/isSafeOptionValue-BEUaZ7UP.js";export{i as clearListCache,c as createMcpServer,f as errorResponse,t as execVis,o as execVisJson,z as isSafeOptionValue,B as isSafePositional,E as isValidRunId,K as isValidTaskId,p as listVisJson,x as okResponse,a as okStructuredResponse,d as registerAdvisoryStatus,l as registerAllTools,R as registerAudit,V as registerCacheHash,T as registerCacheWhy,v as registerDescribeProject,C as registerDescribeTemplate,b as registerFmt,y as registerGetRunLogs,I as registerLint,M as registerListProjects,G as registerListRuns,O as registerListTargets,q as registerListTemplates,n as startMcpServer};
@@ -1,4 +1,4 @@
1
- import"./execVis-CInWWszP.js";import"./clearListCache-D-qeI660.js";import"./errorResponse-D1WOFYuT.js";import{readFile as g}from"node:fs/promises";import{createRequire as l}from"node:module";import{resolve as u,dirname as v}from"node:path";import{pathToFileURL as d,fileURLToPath as h}from"node:url";import{McpServer as b}from"@modelcontextprotocol/sdk/server/mcp.js";import{StdioServerTransport as w}from"@modelcontextprotocol/sdk/server/stdio.js";import{findUp as N}from"@visulima/fs";import{registerAdvisoryStatus as I}from"./registerAdvisoryStatus-DnpRlAZ2.js";import{registerAudit as S}from"./registerAudit-ZskmQpJB.js";import{registerCacheHash as y}from"./registerCacheHash-CLFe-S23.js";import{registerCacheWhy as k}from"./registerCacheWhy-DBIgl8ww.js";import{registerDescribeProject as P}from"./registerDescribeProject-zZZrCz2G.js";import{registerDescribeTemplate as R}from"./registerDescribeTemplate-D1DYYNOB.js";import{registerFmt as V}from"./registerFmt-DYE0dqsx.js";import{registerGetRunLogs as _}from"./registerGetRunLogs-CukA12J7.js";import{registerLint as L}from"./registerLint-D_A4H5jb.js";import{registerListProjects as C}from"./registerListProjects-3dPVnYC9.js";import{registerListRuns as T}from"./registerListRuns-BoZ7DRKb.js";import{registerListTargets as j}from"./registerListTargets-95gAK_Bj.js";import{registerListTemplates as M}from"./registerListTemplates-LK8yLlVB.js";import"./isSafeOptionValue-BEUaZ7UP.js";const c="1.0.0-alpha.35",f=r=>{const[e,o=""]=r.split("-",2);return{core:(e??"").split(".").map(t=>Number.parseInt(t,10)||0),pre:o.length>0?o.split("."):[]}},q=(r,e)=>{if(r===void 0)return e===void 0?0:-1;if(e===void 0)return 1;const o=Number.parseInt(r,10),t=Number.parseInt(e,10);return!Number.isNaN(o)&&!Number.isNaN(t)?o-t:r.localeCompare(e)},E=(r,e)=>{if(r.length===0&&e.length>0)return 1;if(r.length>0&&e.length===0)return-1;const o=Math.max(r.length,e.length);for(let t=0;t<o;t+=1){const i=q(r[t],e[t]);if(i!==0)return i}return 0},$=(r,e)=>{const o=f(r),t=f(e);for(let i=0;i<3;i+=1){const s=(o.core[i]??0)-(t.core[i]??0);if(s!==0)return s}return E(o.pre,t.pre)},O=r=>{!r||$(r,c)>=0||process.stderr.write(`[vis-mcp] warning: @visulima/vis ${r} is older than the required ${c}; lint/fmt/audit tools may fail with opaque errors. Upgrade @visulima/vis to >= ${c}.
1
+ import"./execVis-CInWWszP.js";import"./clearListCache-D-qeI660.js";import"./errorResponse-D1WOFYuT.js";import{readFile as g}from"node:fs/promises";import{createRequire as l}from"node:module";import{resolve as u,dirname as v}from"node:path";import{pathToFileURL as d,fileURLToPath as h}from"node:url";import{McpServer as b}from"@modelcontextprotocol/sdk/server/mcp.js";import{StdioServerTransport as w}from"@modelcontextprotocol/sdk/server/stdio.js";import{findUp as N}from"@visulima/fs";import{registerAdvisoryStatus as I}from"./registerAdvisoryStatus-DnpRlAZ2.js";import{registerAudit as S}from"./registerAudit-ZskmQpJB.js";import{registerCacheHash as y}from"./registerCacheHash-BGyhpFep.js";import{registerCacheWhy as k}from"./registerCacheWhy-CGuHRmfC.js";import{registerDescribeProject as P}from"./registerDescribeProject-zZZrCz2G.js";import{registerDescribeTemplate as R}from"./registerDescribeTemplate-D1DYYNOB.js";import{registerFmt as V}from"./registerFmt-BiW3Urv2.js";import{registerGetRunLogs as _}from"./registerGetRunLogs-tcoMohKG.js";import{registerLint as L}from"./registerLint-BmSZeteC.js";import{registerListProjects as C}from"./registerListProjects-3dPVnYC9.js";import{registerListRuns as T}from"./registerListRuns-DA-dMOsv.js";import{registerListTargets as j}from"./registerListTargets-95gAK_Bj.js";import{registerListTemplates as M}from"./registerListTemplates-LK8yLlVB.js";import"./isSafeOptionValue-BEUaZ7UP.js";const c="1.0.0-alpha.35",f=r=>{const[e,o=""]=r.split("-",2);return{core:(e??"").split(".").map(t=>Number.parseInt(t,10)||0),pre:o.length>0?o.split("."):[]}},q=(r,e)=>{if(r===void 0)return e===void 0?0:-1;if(e===void 0)return 1;const o=Number.parseInt(r,10),t=Number.parseInt(e,10);return!Number.isNaN(o)&&!Number.isNaN(t)?o-t:r.localeCompare(e)},E=(r,e)=>{if(r.length===0&&e.length>0)return 1;if(r.length>0&&e.length===0)return-1;const o=Math.max(r.length,e.length);for(let t=0;t<o;t+=1){const i=q(r[t],e[t]);if(i!==0)return i}return 0},$=(r,e)=>{const o=f(r),t=f(e);for(let i=0;i<3;i+=1){const s=(o.core[i]??0)-(t.core[i]??0);if(s!==0)return s}return E(o.pre,t.pre)},O=r=>{!r||$(r,c)>=0||process.stderr.write(`[vis-mcp] warning: @visulima/vis ${r} is older than the required ${c}; lint/fmt/audit tools may fail with opaque errors. Upgrade @visulima/vis to >= ${c}.
2
2
  `)},A=r=>{const e=process.env.VIS_MCP_VIS_BIN;if(e)return{binPath:u(e)};const o=[{label:r,require:l(d(`${r}/package.json`))},{label:"vis-mcp install location",require:l(import.meta.url)}],t=[];let i,s;for(const{label:a,require:n}of o)try{i=n.resolve("@visulima/vis/package.json"),s=n("@visulima/vis/package.json");break}catch(m){t.push({error:m,label:a})}if(!i||!s){const a=t.at(-1)?.error,n=t.map(m=>m.label).join(", ");throw new Error(`Cannot resolve \`@visulima/vis\` (tried: ${n}). Install it as a workspace dependency, or set VIS_MCP_VIS_BIN to a vis CLI path.`,{cause:a})}const p=typeof s.bin=="string"?s.bin:s.bin?.vis;if(!p)throw new Error("`@visulima/vis` is installed but does not declare a `vis` bin entry — install a current version.");return{binPath:u(v(i),p),version:s.version}},B=async()=>{try{const r=await N("package.json",{cwd:v(h(import.meta.url))});return r?JSON.parse(await g(r,"utf8")).version??"0.0.0":"0.0.0"}catch(r){return process.stderr.write(`[vis-mcp] failed to read package.json: ${r instanceof Error?r.message:String(r)}
3
3
  `),"0.0.0"}},U=(r,e)=>{C(r,e),P(r,e),j(r,e),M(r,e),R(r,e),_(r,e),T(r,e),k(r,e),y(r,e),S(r,e),I(r,e),L(r,e),V(r,e)},F=async r=>{const e=new b({name:"vis",version:await B()}),o={server:e};return U(o,r),{deps:o,server:e}},ur=async()=>{const r=process.env.VIS_MCP_WORKSPACE_ROOT??process.cwd(),{binPath:e,version:o}=A(r);O(o);const t={visBin:e,workspaceRoot:r},{server:i}=await F(t);await i.connect(new w),process.stderr.write(`[vis-mcp] ready (workspace: ${t.workspaceRoot})
4
4
  `)};export{c as MIN_VIS_VERSION,$ as compareVersions,F as createMcpServer,U as registerAllTools,ur as startMcpServer,O as warnIfVisTooOld};
@@ -0,0 +1 @@
1
+ import*as a from"zod";import{execVisJson as c}from"./execVis-CInWWszP.js";import{errorResponse as s,okResponse as d}from"./errorResponse-D1WOFYuT.js";import{isValidTaskId as p,isValidRunId as h}from"./isSafeOptionValue-BEUaZ7UP.js";const f=({server:n},i)=>{n.registerTool("cache_hash",{annotations:{readOnlyHint:!0},description:"Print the recorded hash and per-input hash details for a task — the contributing inputs (command, nodes, runtime, implicitDeps) that produced it. A trace-mode task has no hashDetails; its result carries `trackedFingerprint` instead (the files, env names and missing paths the run tracked).",inputSchema:{runId:a.string().optional().describe("Run ID to inspect (default: latest)"),taskId:a.string().describe('Task ID like "@my/app:build"')}},async({runId:e,taskId:r})=>{if(!p(r))return s(new Error(`Invalid taskId "${r}". Expected "<project>:<target>".`));if(e!==void 0&&!h(e))return s(new Error(`Invalid runId "${e}". Expected filesystem-safe slug ([A-Za-z0-9_.-]).`));try{const t=["cache","hash",r,"--format=json"];e&&t.push("--run",e);const o=await c(i.visBin,t,{cwd:i.workspaceRoot});return d(o)}catch(t){return s(t)}})};export{f as registerCacheHash};
@@ -0,0 +1 @@
1
+ import*as i from"zod";import{execVisJson as h}from"./execVis-CInWWszP.js";import{errorResponse as a,okResponse as c}from"./errorResponse-D1WOFYuT.js";import{isValidTaskId as d,isValidRunId as p}from"./isSafeOptionValue-BEUaZ7UP.js";const f=({server:n},r)=>{n.registerTool("cache_why",{annotations:{readOnlyHint:!0},description:"Explain why a task's cache hash rotated between runs. When the task has hashDetails (command, nodes, runtime, implicitDeps), diffs them against the previous run to pinpoint what changed. A trace-mode task has no hashDetails, so the diff is empty and the reasons are in `task.cacheMissReasons` (`{ type, detail }` entries, null when there are none). `task.hashSource` is `declared-fallback` when the run was keyed on its declared inputs.",inputSchema:{runId:i.string().optional().describe("Run ID to inspect (default: latest)"),taskId:i.string().describe('Task ID like "@my/app:build"')}},async({runId:e,taskId:t})=>{if(!d(t))return a(new Error(`Invalid taskId "${t}". Expected "<project>:<target>".`));if(e!==void 0&&!p(e))return a(new Error(`Invalid runId "${e}". Expected filesystem-safe slug ([A-Za-z0-9_.-]).`));try{const s=["cache","why",t,"--format=json"];e&&s.push("--run",e);const o=await h(r.visBin,s,{cwd:r.workspaceRoot});return c(o)}catch(s){return a(s)}})};export{f as registerCacheWhy};
@@ -0,0 +1 @@
1
+ import*as e from"zod";import{errorResponse as s}from"./errorResponse-D1WOFYuT.js";import{isSafeOptionValue as l,appendPositionalFiles as m}from"./isSafeOptionValue-BEUaZ7UP.js";import{r as n,f as a,a as h}from"./orchestrator-shared-flcsuwN5.js";const u=e.object({findings:e.array(a),mode:e.enum(["check","fix"]).optional(),runs:e.array(n)}).catchall(e.unknown()),p={exitCode:e.number(),findings:e.array(a),mode:e.enum(["check","fix"]),runs:e.array(n)},y=({server:c},f)=>{c.registerTool("fmt",{annotations:{readOnlyHint:!0},description:"Run the vis fmt orchestrator in --check mode via `vis fmt --check --format json`. Auto-detects every installed formatter (oxfmt, biome, dprint, prettier, ruff-fmt) and returns the merged { findings, runs } payload — each finding represents a file that would change. This tool never writes to disk; invoke `vis fmt` directly to apply the formatting.",inputSchema:{files:e.array(e.string()).optional().describe("Restrict the check to these files (relative to the workspace root). Empty/omitted = workspace-wide."),quiet:e.boolean().optional().describe("Suppress per-file logs (findings still flow through)."),since:e.string().optional().describe("Forward `--since <ref>` so only files changed vs `<ref>` are checked."),staged:e.boolean().optional().describe("Forward `--staged` so only files in the git index are checked.")},outputSchema:p},async r=>{const t=["fmt","--check","--format","json"];if(r.quiet&&t.push("--quiet"),r.staged)t.push("--staged");else if(r.since!==void 0&&r.since.length>0){if(!l(r.since))return s(new Error(`Invalid --since value "${r.since}". A leading "-" would be parsed as a CLI flag.`));t.push("--since",r.since)}const o=m(t,r.files);return o!==void 0?s(new Error(o)):h(f,"fmt",t,u,(i,d)=>({...i,exitCode:d,mode:i.mode??"check"}))})};export{y as registerFmt};
@@ -0,0 +1 @@
1
+ import{readFile as f}from"node:fs/promises";import{join as u}from"@visulima/path";import*as l from"zod";import{errorResponse as e,okResponse as m}from"./errorResponse-D1WOFYuT.js";import{isValidRunId as c}from"./isSafeOptionValue-BEUaZ7UP.js";const R=({server:p},n)=>{p.registerTool("get_run_logs",{annotations:{readOnlyHint:!0},description:"Read a vis run summary from .vis/. Returns the most recent run by default, or a specific run when `runId` is set. Optionally filter to a single task with `taskId`.",inputSchema:{runId:l.string().optional().describe("Run ID (default: latest)"),taskId:l.string().optional().describe('Filter to a single task ID like "@my/app:build"')}},async({runId:r,taskId:o})=>{if(r!==void 0&&!c(r))return e(new Error(`Invalid runId "${r}". Expected filesystem-safe slug ([A-Za-z0-9_.-]).`));const i=r?u(n.workspaceRoot,".vis","runs",`${r}.json`):u(n.workspaceRoot,".vis","last-summary.json");try{const s=await f(i,"utf8"),t=JSON.parse(s);if(o){const a=t.tasks?.find(d=>d.taskId===o);return a?m({runId:t.id??t.runId??r,task:a}):e(new Error(`Task "${o}" not found in run "${t.id??t.runId??r??"(unknown)"}".`))}return m(t)}catch(s){return s.code==="ENOENT"?e(new Error(`No run summary at ${i}. Run a task first to populate it.`)):e(s)}})};export{R as registerGetRunLogs};
@@ -0,0 +1 @@
1
+ import*as e from"zod";import{errorResponse as t}from"./errorResponse-D1WOFYuT.js";import{isSafeOptionValue as f,appendPositionalFiles as h}from"./isSafeOptionValue-BEUaZ7UP.js";import{r as s,f as o,a as p}from"./orchestrator-shared-flcsuwN5.js";const g=e.object({findings:e.array(o),runs:e.array(s)}).catchall(e.unknown()),m={exitCode:e.number(),findings:e.array(o),runs:e.array(s)},w=({server:a},l)=>{a.registerTool("lint",{annotations:{readOnlyHint:!0},description:"Run the vis lint orchestrator in check-only mode via `vis lint --format json`. Auto-detects every installed linter (oxlint, biome, eslint, stylelint, ruff, markdownlint, shellcheck) and returns the merged { findings, runs } payload. The `typecheck` adapter (tsc) is opt-in via `lint.adapters.typecheck.enabled`: it checks the whole project even when `files` is set (skipped when none of `files` is TypeScript), and is never cached. This tool never applies fixes — invoke `vis lint --fix` directly for that.",inputSchema:{files:e.array(e.string()).optional().describe("Restrict the run to these files (relative to the workspace root). Empty/omitted = workspace-wide."),maxWarnings:e.int().nonnegative().optional().describe("Forward `--max-warnings N` to every adapter that supports it."),quiet:e.boolean().optional().describe("Suppress warning-severity findings (errors still flow through)."),since:e.string().optional().describe("Forward `--since <ref>` so only files changed vs `<ref>` are linted."),staged:e.boolean().optional().describe("Forward `--staged` so only files in the git index are linted.")},outputSchema:m},async i=>{const r=["lint","--format","json"];if(i.quiet&&r.push("--quiet"),typeof i.maxWarnings=="number"&&r.push("--max-warnings",String(i.maxWarnings)),i.staged)r.push("--staged");else if(i.since!==void 0&&i.since.length>0){if(!f(i.since))return t(new Error(`Invalid --since value "${i.since}". A leading "-" would be parsed as a CLI flag.`));r.push("--since",i.since)}const n=h(r,i.files);return n!==void 0?t(new Error(n)):p(l,"lint",r,g,(c,d)=>({...c,exitCode:d}))})};export{w as registerLint};
@@ -0,0 +1 @@
1
+ import{readdir as w,stat as g,readFile as k}from"node:fs/promises";import{join as c}from"@visulima/path";import*as T from"zod";import{okResponse as f,errorResponse as m}from"./errorResponse-D1WOFYuT.js";const _=/\.json$/,I=t=>t.status==="failure"||t.status==="failed"||typeof t.exitCode=="number"&&t.exitCode!==0,p=t=>typeof t.stats?.failed=="number"?t.stats.failed:t.tasks?.filter(n=>I(n)).length,S=t=>{if(typeof t.status=="string")return t.status;const n=p(t);if(n!==void 0)return n>0?"failure":"success"},R=({server:t},n)=>{t.registerTool("list_runs",{annotations:{readOnlyHint:!0},description:'List recorded vis runs from `.vis/runs/`, most recent first. Each entry includes the run ID, start timestamp, derived status, task count, and failed-task count — use it to discover run IDs for `get_run_logs`, `cache_hash`, or `cache_why` (e.g. "compare this run to the previous one").',inputSchema:{limit:T.int().positive().max(100).optional().describe("Maximum runs to return (default: 20, newest first).")}},async({limit:h})=>{const o=c(n.workspaceRoot,".vis","runs");let d;try{d=(await w(o)).filter(a=>a.endsWith(".json"))}catch(i){return i.code==="ENOENT"?f({count:0,runs:[]}):m(i)}try{const a=(await Promise.all(d.map(async e=>{try{const r=await g(c(o,e));return{file:e,modifiedMs:r.mtimeMs}}catch{return}}))).filter(e=>e!==void 0).toSorted((e,r)=>r.modifiedMs-e.modifiedMs).slice(0,h??20),l=(await Promise.all(a.map(async({file:e,modifiedMs:r})=>{try{const u=await k(c(o,e),"utf8"),s=JSON.parse(u);return{failedTasks:p(s),modifiedMs:r,runId:s.id??s.runId??e.replace(_,""),startedAt:s.startTime??s.startedAt,status:S(s),taskCount:s.stats?.total??s.tasks?.length}}catch{return}}))).filter(e=>e!==void 0).map(e=>{const{failedTasks:r,runId:u,startedAt:s,status:v,taskCount:y}=e;return{failedTasks:r,runId:u,startedAt:s,status:v,taskCount:y}});return f({count:l.length,runs:l})}catch(i){return m(i)}})};export{R as registerListRuns};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visulima/vis-mcp",
3
- "version": "1.0.47",
3
+ "version": "3.0.0",
4
4
  "description": "MCP (Model Context Protocol) server for @visulima/vis — exposes vis tooling to AI agents over stdio",
5
5
  "keywords": [
6
6
  "agent",
@@ -55,12 +55,12 @@
55
55
  ],
56
56
  "dependencies": {
57
57
  "@modelcontextprotocol/sdk": "^1.30.0",
58
- "@visulima/fs": "6.1.0",
59
- "@visulima/path": "4.0.0",
58
+ "@visulima/fs": "7.0.0",
59
+ "@visulima/path": "5.0.0",
60
60
  "zod": "4.6.5"
61
61
  },
62
62
  "peerDependencies": {
63
- "@visulima/vis": "4.3.1"
63
+ "@visulima/vis": "6.0.0"
64
64
  },
65
65
  "engines": {
66
66
  "node": "^22.14.0 || >=24.10.0"
@@ -1 +0,0 @@
1
- import*as o from"zod";import{execVisJson as c}from"./execVis-CInWWszP.js";import{errorResponse as i,okResponse as p}from"./errorResponse-D1WOFYuT.js";import{isValidTaskId as d,isValidRunId as h}from"./isSafeOptionValue-BEUaZ7UP.js";const f=({server:a},s)=>{a.registerTool("cache_hash",{annotations:{readOnlyHint:!0},description:"Print the recorded hash and per-input hash details for a task — the contributing inputs (command, nodes, runtime, implicitDeps) that produced it.",inputSchema:{runId:o.string().optional().describe("Run ID to inspect (default: latest)"),taskId:o.string().describe('Task ID like "@my/app:build"')}},async({runId:e,taskId:t})=>{if(!d(t))return i(new Error(`Invalid taskId "${t}". Expected "<project>:<target>".`));if(e!==void 0&&!h(e))return i(new Error(`Invalid runId "${e}". Expected filesystem-safe slug ([A-Za-z0-9_.-]).`));try{const r=["cache","hash",t,"--format=json"];e&&r.push("--run",e);const n=await c(s.visBin,r,{cwd:s.workspaceRoot});return p(n)}catch(r){return i(r)}})};export{f as registerCacheHash};
@@ -1 +0,0 @@
1
- import*as a from"zod";import{execVisJson as c}from"./execVis-CInWWszP.js";import{errorResponse as s,okResponse as p}from"./errorResponse-D1WOFYuT.js";import{isValidTaskId as h,isValidRunId as d}from"./isSafeOptionValue-BEUaZ7UP.js";const f=({server:o},i)=>{o.registerTool("cache_why",{annotations:{readOnlyHint:!0},description:"Explain why a task's cache hash rotated between runs. Diffs the task's hashDetails (command, nodes, runtime, implicitDeps) against the previous run to pinpoint what changed.",inputSchema:{runId:a.string().optional().describe("Run ID to inspect (default: latest)"),taskId:a.string().describe('Task ID like "@my/app:build"')}},async({runId:e,taskId:r})=>{if(!h(r))return s(new Error(`Invalid taskId "${r}". Expected "<project>:<target>".`));if(e!==void 0&&!d(e))return s(new Error(`Invalid runId "${e}". Expected filesystem-safe slug ([A-Za-z0-9_.-]).`));try{const t=["cache","why",r,"--format=json"];e&&t.push("--run",e);const n=await c(i.visBin,t,{cwd:i.workspaceRoot});return p(n)}catch(t){return s(t)}})};export{f as registerCacheWhy};
@@ -1 +0,0 @@
1
- import*as e from"zod";import{errorResponse as s}from"./errorResponse-D1WOFYuT.js";import{isSafeOptionValue as l,appendPositionalFiles as m}from"./isSafeOptionValue-BEUaZ7UP.js";import{r as n,f as a,a as h}from"./orchestrator-shared-flcsuwN5.js";const u=e.object({findings:e.array(a),mode:e.enum(["check","fix"]).optional(),runs:e.array(n)}).catchall(e.unknown()),p={exitCode:e.number(),findings:e.array(a),mode:e.enum(["check","fix"]),runs:e.array(n)},y=({server:c},f)=>{c.registerTool("fmt",{annotations:{readOnlyHint:!0},description:"Run the vis fmt orchestrator in --check mode via `vis fmt --check --format json`. Auto-detects every installed formatter (oxfmt, biome, dprint, prettier, ruff-fmt, deno-fmt) and returns the merged { findings, runs } payload — each finding represents a file that would change. This tool never writes to disk; invoke `vis fmt` directly to apply the formatting.",inputSchema:{files:e.array(e.string()).optional().describe("Restrict the check to these files (relative to the workspace root). Empty/omitted = workspace-wide."),quiet:e.boolean().optional().describe("Suppress per-file logs (findings still flow through)."),since:e.string().optional().describe("Forward `--since <ref>` so only files changed vs `<ref>` are checked."),staged:e.boolean().optional().describe("Forward `--staged` so only files in the git index are checked.")},outputSchema:p},async r=>{const t=["fmt","--check","--format","json"];if(r.quiet&&t.push("--quiet"),r.staged)t.push("--staged");else if(r.since!==void 0&&r.since.length>0){if(!l(r.since))return s(new Error(`Invalid --since value "${r.since}". A leading "-" would be parsed as a CLI flag.`));t.push("--since",r.since)}const o=m(t,r.files);return o!==void 0?s(new Error(o)):h(f,"fmt",t,u,(i,d)=>({...i,exitCode:d,mode:i.mode??"check"}))})};export{y as registerFmt};
@@ -1 +0,0 @@
1
- import{readFile as f}from"node:fs/promises";import{join as u}from"@visulima/path";import*as l from"zod";import{errorResponse as e,okResponse as m}from"./errorResponse-D1WOFYuT.js";import{isValidRunId as c}from"./isSafeOptionValue-BEUaZ7UP.js";const R=({server:p},o)=>{p.registerTool("get_run_logs",{annotations:{readOnlyHint:!0},description:"Read a vis run summary from .vis/. Returns the most recent run by default, or a specific run when `runId` is set. Optionally filter to a single task with `taskId`.",inputSchema:{runId:l.string().optional().describe("Run ID (default: latest)"),taskId:l.string().optional().describe('Filter to a single task ID like "@my/app:build"')}},async({runId:r,taskId:n})=>{if(r!==void 0&&!c(r))return e(new Error(`Invalid runId "${r}". Expected filesystem-safe slug ([A-Za-z0-9_.-]).`));const i=r?u(o.workspaceRoot,".vis","runs",`${r}.json`):u(o.workspaceRoot,".vis","last-summary.json");try{const t=await f(i,"utf8"),s=JSON.parse(t);if(n){const a=s.tasks?.find(d=>d.taskId===n);return a?m({runId:s.runId,task:a}):e(new Error(`Task "${n}" not found in run "${s.runId??"(unknown)"}".`))}return m(s)}catch(t){return t.code==="ENOENT"?e(new Error(`No run summary at ${i}. Run a task first to populate it.`)):e(t)}})};export{R as registerGetRunLogs};
@@ -1 +0,0 @@
1
- import*as e from"zod";import{errorResponse as t}from"./errorResponse-D1WOFYuT.js";import{isSafeOptionValue as f,appendPositionalFiles as g}from"./isSafeOptionValue-BEUaZ7UP.js";import{r as s,f as o,a as h}from"./orchestrator-shared-flcsuwN5.js";const m=e.object({findings:e.array(o),runs:e.array(s)}).catchall(e.unknown()),u={exitCode:e.number(),findings:e.array(o),runs:e.array(s)},w=({server:a},l)=>{a.registerTool("lint",{annotations:{readOnlyHint:!0},description:"Run the vis lint orchestrator in check-only mode via `vis lint --format json`. Auto-detects every installed linter (oxlint, biome, eslint, stylelint, ruff, markdownlint, shellcheck, deno-lint) and returns the merged { findings, runs } payload. This tool never applies fixes — invoke `vis lint --fix` directly for that.",inputSchema:{files:e.array(e.string()).optional().describe("Restrict the run to these files (relative to the workspace root). Empty/omitted = workspace-wide."),maxWarnings:e.int().nonnegative().optional().describe("Forward `--max-warnings N` to every adapter that supports it."),quiet:e.boolean().optional().describe("Suppress warning-severity findings (errors still flow through)."),since:e.string().optional().describe("Forward `--since <ref>` so only files changed vs `<ref>` are linted."),staged:e.boolean().optional().describe("Forward `--staged` so only files in the git index are linted.")},outputSchema:u},async r=>{const n=["lint","--format","json"];if(r.quiet&&n.push("--quiet"),typeof r.maxWarnings=="number"&&n.push("--max-warnings",String(r.maxWarnings)),r.staged)n.push("--staged");else if(r.since!==void 0&&r.since.length>0){if(!f(r.since))return t(new Error(`Invalid --since value "${r.since}". A leading "-" would be parsed as a CLI flag.`));n.push("--since",r.since)}const i=g(n,r.files);return i!==void 0?t(new Error(i)):h(l,"lint",n,m,(d,c)=>({...d,exitCode:c}))})};export{w as registerLint};
@@ -1 +0,0 @@
1
- import{readdir as k,stat as w,readFile as y}from"node:fs/promises";import{join as d}from"@visulima/path";import*as g from"zod";import{okResponse as m,errorResponse as p}from"./errorResponse-D1WOFYuT.js";const _=/\.json$/,I=e=>{if(typeof e.status=="string")return e.status;if(e.tasks)return e.tasks.some(a=>a.status==="failure"||a.status==="failed")?"failure":"success"},R=({server:e},a)=>{e.registerTool("list_runs",{annotations:{readOnlyHint:!0},description:'List recorded vis runs from `.vis/runs/`, most recent first. Each entry includes the run ID, start timestamp, derived status, task count, and failed-task count — use it to discover run IDs for `get_run_logs`, `cache_hash`, or `cache_why` (e.g. "compare this run to the previous one").',inputSchema:{limit:g.int().positive().max(100).optional().describe("Maximum runs to return (default: 20, newest first).")}},async({limit:h})=>{const o=d(a.workspaceRoot,".vis","runs");let l;try{l=(await k(o)).filter(u=>u.endsWith(".json"))}catch(n){return n.code==="ENOENT"?m({count:0,runs:[]}):p(n)}try{const u=(await Promise.all(l.map(async t=>{try{const s=await w(d(o,t));return{file:t,modifiedMs:s.mtimeMs}}catch{return}}))).filter(t=>t!==void 0).toSorted((t,s)=>s.modifiedMs-t.modifiedMs).slice(0,h??20),f=(await Promise.all(u.map(async({file:t,modifiedMs:s})=>{try{const c=await y(d(o,t),"utf8"),r=JSON.parse(c);return{failedTasks:r.tasks?.filter(i=>i.status==="failure"||i.status==="failed").length,modifiedMs:s,runId:r.runId??t.replace(_,""),startedAt:r.startedAt,status:I(r),taskCount:r.tasks?.length}}catch{return}}))).filter(t=>t!==void 0).map(t=>{const{failedTasks:s,runId:c,startedAt:r,status:i,taskCount:v}=t;return{failedTasks:s,runId:c,startedAt:r,status:i,taskCount:v}});return m({count:f.length,runs:f})}catch(n){return p(n)}})};export{R as registerListRuns};