@vzn/vx 0.0.631 → 0.0.633

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.
Files changed (86) hide show
  1. package/README.md +21 -18
  2. package/docs/caching.md +2247 -0
  3. package/docs/cli.md +3214 -0
  4. package/docs/execution.md +708 -0
  5. package/docs/features.md +172 -0
  6. package/docs/patterns.md +219 -0
  7. package/docs/schema.md +2137 -0
  8. package/docs/security.md +209 -0
  9. package/package.json +14 -5
  10. package/schemas/cache.json +24 -0
  11. package/schemas/docs.json +28 -0
  12. package/schemas/error.json +23 -0
  13. package/schemas/info.json +147 -0
  14. package/schemas/init.json +57 -0
  15. package/schemas/last.json +188 -0
  16. package/schemas/lock.json +21 -0
  17. package/schemas/plan.json +88 -0
  18. package/schemas/show.json +124 -0
  19. package/schemas/summary.json +133 -0
  20. package/schemas/why.json +168 -0
  21. package/skills/vx/SKILL.md +89 -0
  22. package/src/bin.ts +9 -0
  23. package/src/cache/archive.ts +153 -51
  24. package/src/cache/cache.ts +542 -137
  25. package/src/cache/chained-cache.ts +9 -0
  26. package/src/cache/inputs.ts +5 -0
  27. package/src/cache/layer.ts +10 -5
  28. package/src/cache/layered-cache.ts +4 -0
  29. package/src/cache/schema.ts +44 -17
  30. package/src/cache/tar-stream.ts +204 -66
  31. package/src/cache/zstd.ts +1 -1
  32. package/src/cli/cache.ts +14 -14
  33. package/src/cli/docs-corpus.ts +21 -0
  34. package/src/cli/docs-text.d.ts +5 -0
  35. package/src/cli/docs.ts +167 -0
  36. package/src/cli/foreign-flags.ts +1 -1
  37. package/src/cli/help.ts +42 -7
  38. package/src/cli/index.ts +25 -11
  39. package/src/cli/info.ts +38 -9
  40. package/src/cli/init.ts +131 -24
  41. package/src/cli/last.ts +54 -3
  42. package/src/cli/lock.ts +43 -15
  43. package/src/cli/plan-format.ts +23 -1
  44. package/src/cli/plugin-commands.ts +3 -0
  45. package/src/cli/plugin-templates.ts +1 -1
  46. package/src/cli/run.ts +40 -21
  47. package/src/cli/show.ts +10 -7
  48. package/src/cli/upgrade.ts +19 -7
  49. package/src/cli/watch.ts +7 -2
  50. package/src/cli/why.ts +14 -40
  51. package/src/exec/runner.ts +27 -10
  52. package/src/graph/scheduler.ts +36 -0
  53. package/src/graph/task-graph.ts +4 -4
  54. package/src/index.ts +22 -5
  55. package/src/orchestrator/admission.ts +29 -1
  56. package/src/orchestrator/affected-tasks.ts +87 -18
  57. package/src/orchestrator/doctor.ts +14 -1
  58. package/src/orchestrator/execute-task.ts +149 -64
  59. package/src/orchestrator/failure-mode.ts +5 -3
  60. package/src/orchestrator/framed-output.ts +17 -3
  61. package/src/orchestrator/index.ts +11 -0
  62. package/src/orchestrator/logger.ts +57 -6
  63. package/src/orchestrator/metrics.ts +76 -4
  64. package/src/orchestrator/miss-reason.ts +3 -5
  65. package/src/orchestrator/miss-save.ts +6 -5
  66. package/src/orchestrator/options.ts +12 -0
  67. package/src/orchestrator/output-log.ts +14 -1
  68. package/src/orchestrator/path-links.ts +79 -0
  69. package/src/orchestrator/plan.ts +20 -3
  70. package/src/orchestrator/plugin.ts +7 -0
  71. package/src/orchestrator/prepare.ts +14 -4
  72. package/src/orchestrator/projects.ts +2 -2
  73. package/src/orchestrator/run-artifacts.ts +18 -2
  74. package/src/orchestrator/run-failures.ts +192 -0
  75. package/src/orchestrator/run-records.ts +10 -8
  76. package/src/orchestrator/run.ts +87 -22
  77. package/src/orchestrator/task-hash.ts +4 -4
  78. package/src/orchestrator/terminal-signals.ts +16 -0
  79. package/src/orchestrator/upstream.ts +65 -10
  80. package/src/util/errors.ts +55 -1
  81. package/src/util/index.ts +3 -0
  82. package/src/util/secret-mask.ts +13 -1
  83. package/src/util/verbs.ts +1 -0
  84. package/src/workspace/config-schema.ts +10 -8
  85. package/src/workspace/migration.ts +30 -3
  86. package/src/workspace/workspace.ts +1 -0
package/README.md CHANGED
@@ -18,16 +18,20 @@
18
18
 
19
19
  <!-- bench:start — generated by packages/vx-bench/update-site.ts from results.json; do not hand-edit -->
20
20
 
21
- | 1,090 packages, 3,270 tasks | vx | Turborepo | Nx | Vite Task |
22
- | -------------------------------- | ---------- | -------------------------- | ----------------------- | -------------------------- |
23
- | Cold build: time the runner adds | **2 s** | 1 min 21 s (vx 34× faster) | 11 s (vx 4.7× faster) | 1 min 11 s (vx 30× faster) |
24
- | Cold build: CPU burned | **17 s** | 21 s (vx 1.2× faster) | 52 s (vx 3× faster) | 12 s (vx 1.4× slower) |
25
- | Fully cached run (restored) | **650 ms** | 997 ms (vx 1.5× faster) | 6.25 s (vx 9.6× faster) | 2.64 s (vx 4× faster) |
26
- | Fully cached run (up-to-date) | **393 ms** | 463 ms (vx 1.1× faster) | 6.45 s (vx 16× faster) | 2.49 s (vx 6.3× faster) |
21
+ | 1,090 packages, 3,270 tasks | vx | Turborepo | Nx | Vite Task |
22
+ | ----------------------------------------------- | -------------- | -------------------------- | ------------------------- | -------------------------- |
23
+ | Cold build: total time | **3 min 40 s** | 4 min 59 s (vx 36% faster) | 3 min 49 s (vx 4% faster) | 4 min 49 s (vx 31% faster) |
24
+ | Cold build: CPU burned | **17 s** | 21 s (vx 22% faster) | 52 s (vx 3× faster) | 12 s (vx 39% slower) |
25
+ | Fully cached run (restored) | **650 ms** | 997 ms (vx 53% faster) | 6.25 s (vx 9.6× faster) | 2.64 s (vx 4.1× faster) |
26
+ | Fully cached run (up-to-date) | **393 ms** | 463 ms (vx 18% faster) | 6.45 s (vx 16× faster) | 2.49 s (vx 6.3× faster) |
27
+ | Secondary: time the runner adds to a cold build | **2 s** | 1 min 21 s | 11 s | 1 min 11 s |
27
28
 
28
- vx N× faster: that tool takes N times as long as vx (theirs ÷ vx); N× slower: vx takes N times as long (vx ÷ theirs).
29
+ vx N% or N× faster: that tool takes N% longer or N times as long as vx.
29
30
 
30
- Time added is the wall time over the tasks' own ideal schedule (3 min 38 s).
31
+ Benchmark workload: a synthetic monorepo of 1,090 packages and 3,270 tasks in 100 dependency layers, every build and test taking 1 s; real repos with uneven task times will differ.
32
+ Run 2026-10-04 on linux x64, 4 cores: vx from source, Turborepo 2.11.7, Nx 23.2.1, Vite Task (vite-plus) 1.0.0.
33
+
34
+ The secondary row is the wall time over the tasks' own ideal schedule (3 min 38 s).
31
35
  Same graph, commands and concurrency: [how it is measured](https://vznjs.github.io/vx/benchmarks/).
32
36
 
33
37
  <!-- bench:end -->
@@ -46,7 +50,7 @@ npm install -D @vzn/vx # or: pnpm add -D -w · yarn add -D (-W on Yarn 1) ·
46
50
 
47
51
  A prebuilt binary for Linux (glibc, not Alpine's musl) and macOS, x64 and arm64; no Bun needed. The
48
52
  [release](https://github.com/vznjs/vx/releases) binary needs no Node either.
49
- Windows: use WSL.
53
+ Windows: run vx inside WSL2.
50
54
 
51
55
  ## Quick start
52
56
 
@@ -93,12 +97,11 @@ More: [Quickstart](https://vznjs.github.io/vx/quickstart/) ·
93
97
 
94
98
  ## Coming from Turbo or Nx
95
99
 
96
- `bunx @vzn/vx-migrate` writes a `vx.config.ts` per package from
97
- `turbo.json` or the Nx graph; you keep those and delete the old config.
98
- Beside `turbo.json` or `nx.json`, `vx init` writes only a
99
- `vx.workspace.ts` that maps the old config until then: a temporary
100
- start, not a way to run the repo. The numbers above are native vx
101
- config.
100
+ Beside `turbo.json` or `nx.json`, `npx vx init` runs `@vzn/vx-migrate`:
101
+ it writes a `vx.config.ts` per package from `turbo.json` or the Nx graph,
102
+ and you keep those and delete the old config. `vx init --keep` writes only
103
+ a `vx.workspace.ts` that maps the old config instead: a temporary start,
104
+ not a way to run the repo. The numbers above are native vx config.
102
105
  [Migration guide](https://vznjs.github.io/vx/guides/migrate/).
103
106
 
104
107
  ## Why it is faster
@@ -127,7 +130,7 @@ config.
127
130
  | Output ownership | **Strict**: wiped before exec and restore | Additive (stale files survive) | Additive |
128
131
  | Clean-tree hashing | **No source reads** (git index OIDs) | git OIDs | re-hash / daemon |
129
132
  | Daemon | **None** | None for `turbo run` | On by default |
130
- | Per-task sandbox | **Yes**: kernel-level, opt-in | No | No |
133
+ | Per-task sandbox | **Yes**: kernel-level, opt-in, local | No | On Nx Cloud only |
131
134
  | Plugin API | **Yes**: every pipeline stage | No | Yes (TS-tied) |
132
135
  | Install | **Single binary**; no Bun, Node optional | npm + Node | npm + Node |
133
136
 
@@ -146,7 +149,7 @@ Declared in `vx.workspace.ts`; without any, vx runs and caches locally.
146
149
  | [`@vzn/vx-lockfile`](packages/vx-lockfile) | Key each project on its own lockfile slice: pnpm, bun, npm, yarn |
147
150
  | [`@vzn/vx-otel`](packages/vx-otel) | OpenTelemetry traces, metrics and logs, no SDK |
148
151
  | [`@vzn/vx-ci`](packages/vx-ci) | GitHub Actions job summary and Checks API |
149
- | [`@vzn/vx-mcp`](packages/vx-mcp) | `vx mcp`: a read-only MCP server for AI coding agents |
152
+ | [`@vzn/vx-mcp`](packages/vx-mcp) | `vx mcp`: an MCP server for AI coding agents that also runs tasks |
150
153
  | [`@vzn/vx-schedule-history`](packages/vx-schedule-history) | Schedule by the critical path learned from past runs |
151
154
 
152
155
  Write your own: [plugin guide](https://vznjs.github.io/vx/guides/plugins/) ·
@@ -172,4 +175,4 @@ scripts. Start with [CONTRIBUTING.md](CONTRIBUTING.md) and
172
175
 
173
176
  ## License
174
177
 
175
- [MIT](LICENSE)
178
+ vx is [MIT](LICENSE) licensed. The prebuilt binaries embed Bun and a few npm packages under permissive licenses; their notices ship as [THIRD_PARTY_NOTICES.txt](packages/vx/THIRD_PARTY_NOTICES.txt) in each platform package and GitHub release.