@vzn/vx 0.0.631 → 0.0.632
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/README.md +7 -8
- package/package.json +7 -5
- package/schemas/cache.json +24 -0
- package/schemas/error.json +23 -0
- package/schemas/info.json +147 -0
- package/schemas/last.json +188 -0
- package/schemas/plan.json +88 -0
- package/schemas/show.json +124 -0
- package/schemas/summary.json +133 -0
- package/schemas/why.json +168 -0
- package/skills/vx/SKILL.md +85 -0
- package/src/bin.ts +9 -0
- package/src/cache/archive.ts +153 -51
- package/src/cache/cache.ts +45 -19
- package/src/cache/layer.ts +2 -1
- package/src/cache/schema.ts +2 -1
- package/src/cache/tar-stream.ts +204 -66
- package/src/cache/zstd.ts +1 -1
- package/src/cli/cache.ts +14 -14
- package/src/cli/foreign-flags.ts +1 -1
- package/src/cli/help.ts +30 -5
- package/src/cli/index.ts +23 -11
- package/src/cli/info.ts +38 -9
- package/src/cli/init.ts +97 -19
- package/src/cli/last.ts +54 -3
- package/src/cli/plan-format.ts +23 -1
- package/src/cli/plugin-commands.ts +3 -0
- package/src/cli/plugin-templates.ts +1 -1
- package/src/cli/run.ts +40 -21
- package/src/cli/show.ts +10 -7
- package/src/cli/upgrade.ts +1 -1
- package/src/cli/watch.ts +7 -2
- package/src/cli/why.ts +14 -40
- package/src/exec/runner.ts +27 -10
- package/src/graph/scheduler.ts +36 -0
- package/src/graph/task-graph.ts +1 -1
- package/src/index.ts +22 -5
- package/src/orchestrator/admission.ts +29 -1
- package/src/orchestrator/affected-tasks.ts +87 -18
- package/src/orchestrator/doctor.ts +14 -1
- package/src/orchestrator/execute-task.ts +149 -64
- package/src/orchestrator/failure-mode.ts +5 -3
- package/src/orchestrator/framed-output.ts +17 -3
- package/src/orchestrator/index.ts +11 -0
- package/src/orchestrator/logger.ts +57 -6
- package/src/orchestrator/metrics.ts +65 -0
- package/src/orchestrator/options.ts +12 -0
- package/src/orchestrator/output-log.ts +14 -1
- package/src/orchestrator/path-links.ts +79 -0
- package/src/orchestrator/plan.ts +20 -3
- package/src/orchestrator/plugin.ts +7 -0
- package/src/orchestrator/prepare.ts +14 -4
- package/src/orchestrator/run-artifacts.ts +18 -2
- package/src/orchestrator/run-failures.ts +192 -0
- package/src/orchestrator/run-records.ts +10 -8
- package/src/orchestrator/run.ts +87 -22
- package/src/orchestrator/terminal-signals.ts +16 -0
- package/src/orchestrator/upstream.ts +65 -10
- package/src/util/errors.ts +55 -1
- package/src/util/index.ts +3 -0
- package/src/util/secret-mask.ts +13 -1
- package/src/workspace/workspace.ts +1 -0
package/README.md
CHANGED
|
@@ -93,12 +93,11 @@ More: [Quickstart](https://vznjs.github.io/vx/quickstart/) ·
|
|
|
93
93
|
|
|
94
94
|
## Coming from Turbo or Nx
|
|
95
95
|
|
|
96
|
-
|
|
97
|
-
`turbo.json` or the Nx graph
|
|
98
|
-
|
|
99
|
-
`vx.workspace.ts` that maps the old config
|
|
100
|
-
|
|
101
|
-
config.
|
|
96
|
+
Beside `turbo.json` or `nx.json`, `npx vx init` runs `@vzn/vx-migrate`:
|
|
97
|
+
it writes a `vx.config.ts` per package from `turbo.json` or the Nx graph,
|
|
98
|
+
and you keep those and delete the old config. `vx init --keep` writes only
|
|
99
|
+
a `vx.workspace.ts` that maps the old config instead: a temporary start,
|
|
100
|
+
not a way to run the repo. The numbers above are native vx config.
|
|
102
101
|
[Migration guide](https://vznjs.github.io/vx/guides/migrate/).
|
|
103
102
|
|
|
104
103
|
## Why it is faster
|
|
@@ -127,7 +126,7 @@ config.
|
|
|
127
126
|
| Output ownership | **Strict**: wiped before exec and restore | Additive (stale files survive) | Additive |
|
|
128
127
|
| Clean-tree hashing | **No source reads** (git index OIDs) | git OIDs | re-hash / daemon |
|
|
129
128
|
| Daemon | **None** | None for `turbo run` | On by default |
|
|
130
|
-
| Per-task sandbox | **Yes**: kernel-level, opt-in
|
|
129
|
+
| Per-task sandbox | **Yes**: kernel-level, opt-in, local | No | On Nx Cloud only |
|
|
131
130
|
| Plugin API | **Yes**: every pipeline stage | No | Yes (TS-tied) |
|
|
132
131
|
| Install | **Single binary**; no Bun, Node optional | npm + Node | npm + Node |
|
|
133
132
|
|
|
@@ -146,7 +145,7 @@ Declared in `vx.workspace.ts`; without any, vx runs and caches locally.
|
|
|
146
145
|
| [`@vzn/vx-lockfile`](packages/vx-lockfile) | Key each project on its own lockfile slice: pnpm, bun, npm, yarn |
|
|
147
146
|
| [`@vzn/vx-otel`](packages/vx-otel) | OpenTelemetry traces, metrics and logs, no SDK |
|
|
148
147
|
| [`@vzn/vx-ci`](packages/vx-ci) | GitHub Actions job summary and Checks API |
|
|
149
|
-
| [`@vzn/vx-mcp`](packages/vx-mcp) | `vx mcp`:
|
|
148
|
+
| [`@vzn/vx-mcp`](packages/vx-mcp) | `vx mcp`: an MCP server for AI coding agents that also runs tasks |
|
|
150
149
|
| [`@vzn/vx-schedule-history`](packages/vx-schedule-history) | Schedule by the critical path learned from past runs |
|
|
151
150
|
|
|
152
151
|
Write your own: [plugin guide](https://vznjs.github.io/vx/guides/plugins/) ·
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vzn/vx",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.632",
|
|
4
4
|
"description": "The fastest task runner and build cache for JavaScript monorepos.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
"node": ">=18"
|
|
22
22
|
},
|
|
23
23
|
"optionalDependencies": {
|
|
24
|
-
"@vzn/vx-linux-x64": "0.0.
|
|
25
|
-
"@vzn/vx-linux-arm64": "0.0.
|
|
26
|
-
"@vzn/vx-darwin-x64": "0.0.
|
|
27
|
-
"@vzn/vx-darwin-arm64": "0.0.
|
|
24
|
+
"@vzn/vx-linux-x64": "0.0.632",
|
|
25
|
+
"@vzn/vx-linux-arm64": "0.0.632",
|
|
26
|
+
"@vzn/vx-darwin-x64": "0.0.632",
|
|
27
|
+
"@vzn/vx-darwin-arm64": "0.0.632"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@anthropic-ai/sandbox-runtime": "^0.0.76"
|
|
@@ -33,6 +33,8 @@
|
|
|
33
33
|
"index.ts",
|
|
34
34
|
"src",
|
|
35
35
|
"config",
|
|
36
|
+
"schemas",
|
|
37
|
+
"skills",
|
|
36
38
|
"launcher.cjs",
|
|
37
39
|
"README.md",
|
|
38
40
|
"LICENSE"
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "vx cache prune --format json",
|
|
4
|
+
"description": "What the policy evicted and the orphan sweep reaped; with dryRun, what they would.",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["dryRun", "evicted", "bytesFreed", "orphans", "orphanBytes"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"dryRun": { "type": "boolean" },
|
|
10
|
+
"evicted": {
|
|
11
|
+
"type": "integer",
|
|
12
|
+
"description": "index entries evicted by the age / size policy"
|
|
13
|
+
},
|
|
14
|
+
"bytesFreed": {
|
|
15
|
+
"type": "integer",
|
|
16
|
+
"description": "bytes those entries occupied, per the index"
|
|
17
|
+
},
|
|
18
|
+
"orphans": {
|
|
19
|
+
"type": "integer",
|
|
20
|
+
"description": "artifacts and temp files with no index row, reaped"
|
|
21
|
+
},
|
|
22
|
+
"orphanBytes": { "type": "integer" }
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "a refusal under --format json",
|
|
4
|
+
"description": "What a verb asked for JSON prints on stdout when it refuses (exit 1). stderr carries the same refusal in prose.",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["ok", "error"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"ok": { "const": false },
|
|
10
|
+
"error": {
|
|
11
|
+
"type": "object",
|
|
12
|
+
"additionalProperties": false,
|
|
13
|
+
"required": ["code", "message"],
|
|
14
|
+
"properties": {
|
|
15
|
+
"code": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"description": "Stable; branch on it. VX_E_USAGE, VX_E_UNKNOWN_COMMAND, VX_E_UNKNOWN_TASK, VX_E_UNKNOWN_PROJECT, VX_E_NO_HISTORY, VX_E_AMBIGUOUS, VX_E_CONFIG, VX_E_CYCLE, VX_E_NO_WORKSPACE, VX_E_CACHE_VERSION, VX_E_REFUSED, VX_E_FS, VX_E_FDS, VX_E_INTERNAL."
|
|
18
|
+
},
|
|
19
|
+
"message": { "type": "string", "description": "The refusal in prose; may change." }
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "vx info --format json",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"additionalProperties": false,
|
|
6
|
+
"required": [
|
|
7
|
+
"vx",
|
|
8
|
+
"bun",
|
|
9
|
+
"bunSupported",
|
|
10
|
+
"git",
|
|
11
|
+
"gitStatusCache",
|
|
12
|
+
"workspaceRoot",
|
|
13
|
+
"projects",
|
|
14
|
+
"tasks",
|
|
15
|
+
"configErrors",
|
|
16
|
+
"plugins",
|
|
17
|
+
"workers",
|
|
18
|
+
"memory",
|
|
19
|
+
"cacheDir",
|
|
20
|
+
"cacheStore",
|
|
21
|
+
"cacheVersion",
|
|
22
|
+
"schemaVersion",
|
|
23
|
+
"cacheEntries",
|
|
24
|
+
"cacheBytes",
|
|
25
|
+
"cacheRetention",
|
|
26
|
+
"orphans",
|
|
27
|
+
"runs24h",
|
|
28
|
+
"hits24h",
|
|
29
|
+
"restored24h",
|
|
30
|
+
"flakyTasks",
|
|
31
|
+
"lockfile",
|
|
32
|
+
"sandbox"
|
|
33
|
+
],
|
|
34
|
+
"properties": {
|
|
35
|
+
"vx": { "type": "string" },
|
|
36
|
+
"bun": { "type": "string" },
|
|
37
|
+
"bunSupported": { "type": "boolean" },
|
|
38
|
+
"git": { "type": ["string", "null"] },
|
|
39
|
+
"gitStatusCache": {
|
|
40
|
+
"type": ["object", "null"],
|
|
41
|
+
"additionalProperties": false,
|
|
42
|
+
"required": ["fsmonitor", "untrackedCache"],
|
|
43
|
+
"properties": { "fsmonitor": { "type": "boolean" }, "untrackedCache": { "type": "boolean" } }
|
|
44
|
+
},
|
|
45
|
+
"workspaceRoot": { "type": "string" },
|
|
46
|
+
"projects": { "type": "integer" },
|
|
47
|
+
"tasks": { "type": "integer" },
|
|
48
|
+
"configErrors": {
|
|
49
|
+
"type": "array",
|
|
50
|
+
"items": {
|
|
51
|
+
"type": "object",
|
|
52
|
+
"additionalProperties": false,
|
|
53
|
+
"required": ["path", "message"],
|
|
54
|
+
"properties": { "path": { "type": "string" }, "message": { "type": "string" } }
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"plugins": {
|
|
58
|
+
"type": "array",
|
|
59
|
+
"items": {
|
|
60
|
+
"type": "object",
|
|
61
|
+
"additionalProperties": false,
|
|
62
|
+
"required": ["name", "seams"],
|
|
63
|
+
"properties": {
|
|
64
|
+
"name": { "type": "string" },
|
|
65
|
+
"seams": { "type": "array", "items": { "type": "string" } }
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"workers": {
|
|
70
|
+
"type": "object",
|
|
71
|
+
"additionalProperties": false,
|
|
72
|
+
"required": ["count", "source", "cores", "cpuQuota"],
|
|
73
|
+
"properties": {
|
|
74
|
+
"count": { "type": "integer" },
|
|
75
|
+
"source": { "enum": ["workspace", "cgroup", "cores"] },
|
|
76
|
+
"cores": { "type": "integer" },
|
|
77
|
+
"cpuQuota": { "type": ["number", "null"] }
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"memory": {
|
|
81
|
+
"type": "object",
|
|
82
|
+
"additionalProperties": false,
|
|
83
|
+
"required": ["usableBytes", "totalBytes", "cgroupLimitBytes"],
|
|
84
|
+
"properties": {
|
|
85
|
+
"usableBytes": { "type": "integer" },
|
|
86
|
+
"totalBytes": { "type": "integer" },
|
|
87
|
+
"cgroupLimitBytes": { "type": ["integer", "null"] }
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"cacheDir": { "type": "string" },
|
|
91
|
+
"cacheStore": { "type": ["string", "null"] },
|
|
92
|
+
"cacheVersion": { "type": "string" },
|
|
93
|
+
"schemaVersion": { "type": "string" },
|
|
94
|
+
"cacheEntries": { "type": "integer" },
|
|
95
|
+
"cacheBytes": { "type": "integer" },
|
|
96
|
+
"cacheRetention": {
|
|
97
|
+
"type": ["object", "null"],
|
|
98
|
+
"description": "the workspace's cacheRetention, maxSize also in bytes; null when none is declared",
|
|
99
|
+
"additionalProperties": false,
|
|
100
|
+
"properties": {
|
|
101
|
+
"olderThan": { "type": "string" },
|
|
102
|
+
"maxSize": { "type": "string" },
|
|
103
|
+
"maxBytes": { "type": "integer" }
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"orphans": {
|
|
107
|
+
"type": "object",
|
|
108
|
+
"additionalProperties": false,
|
|
109
|
+
"required": ["artifacts", "bytes"],
|
|
110
|
+
"properties": { "artifacts": { "type": "integer" }, "bytes": { "type": "integer" } }
|
|
111
|
+
},
|
|
112
|
+
"runs24h": { "type": "integer" },
|
|
113
|
+
"hits24h": { "type": "integer" },
|
|
114
|
+
"restored24h": {
|
|
115
|
+
"type": "integer",
|
|
116
|
+
"description": "of hits24h, the hits that restored outputs; the rest were up to date"
|
|
117
|
+
},
|
|
118
|
+
"flakyTasks": {
|
|
119
|
+
"type": "array",
|
|
120
|
+
"items": {
|
|
121
|
+
"type": "object",
|
|
122
|
+
"additionalProperties": false,
|
|
123
|
+
"required": ["taskId", "project", "task", "keys", "passes", "failures"],
|
|
124
|
+
"properties": {
|
|
125
|
+
"taskId": { "type": "string" },
|
|
126
|
+
"project": { "type": "string" },
|
|
127
|
+
"task": { "type": "string" },
|
|
128
|
+
"keys": { "type": "integer" },
|
|
129
|
+
"passes": { "type": "integer" },
|
|
130
|
+
"failures": { "type": "integer" }
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
"lockfile": { "type": "boolean" },
|
|
135
|
+
"sandbox": {
|
|
136
|
+
"type": "object",
|
|
137
|
+
"additionalProperties": false,
|
|
138
|
+
"required": ["available", "reason", "declared", "untraced"],
|
|
139
|
+
"properties": {
|
|
140
|
+
"available": { "type": "boolean" },
|
|
141
|
+
"reason": { "type": "string" },
|
|
142
|
+
"declared": { "type": "integer" },
|
|
143
|
+
"untraced": { "type": ["string", "null"] }
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "vx last --format json",
|
|
4
|
+
"description": "`vx last [RUNID] [--failed]` prints a run; `--list` prints an array of invocations, newest first; `--log <task>` prints that task's output.",
|
|
5
|
+
"oneOf": [
|
|
6
|
+
{
|
|
7
|
+
"type": "object",
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"required": ["invocation", "tasks"],
|
|
10
|
+
"properties": {
|
|
11
|
+
"invocation": { "$ref": "#/$defs/invocation" },
|
|
12
|
+
"tasks": { "type": "array", "items": { "$ref": "#/$defs/task" } }
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
{ "type": "array", "items": { "$ref": "#/$defs/invocation" } },
|
|
16
|
+
{ "$ref": "#/$defs/log" }
|
|
17
|
+
],
|
|
18
|
+
"$defs": {
|
|
19
|
+
"log": {
|
|
20
|
+
"type": "object",
|
|
21
|
+
"additionalProperties": false,
|
|
22
|
+
"required": ["runId", "taskId", "status", "source", "output"],
|
|
23
|
+
"properties": {
|
|
24
|
+
"runId": { "type": "string" },
|
|
25
|
+
"taskId": { "type": "string" },
|
|
26
|
+
"status": { "type": "string" },
|
|
27
|
+
"source": {
|
|
28
|
+
"enum": ["failure", "cache", null],
|
|
29
|
+
"description": "the kept failure output, the cache entry's log, or none kept"
|
|
30
|
+
},
|
|
31
|
+
"output": { "type": "string", "description": "plain text; '' when source is null" }
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"invocation": {
|
|
35
|
+
"type": "object",
|
|
36
|
+
"additionalProperties": false,
|
|
37
|
+
"required": [
|
|
38
|
+
"runId",
|
|
39
|
+
"command",
|
|
40
|
+
"requestedTasks",
|
|
41
|
+
"cachePolicy",
|
|
42
|
+
"concurrency",
|
|
43
|
+
"flow",
|
|
44
|
+
"startedAt",
|
|
45
|
+
"endedAt",
|
|
46
|
+
"totalDurationMs",
|
|
47
|
+
"taskCount",
|
|
48
|
+
"failedCount",
|
|
49
|
+
"hitCount",
|
|
50
|
+
"hitLocalCount",
|
|
51
|
+
"hitRemoteCount",
|
|
52
|
+
"upToDateCount",
|
|
53
|
+
"restoredLocalCount",
|
|
54
|
+
"restoredRemoteCount",
|
|
55
|
+
"exitOk",
|
|
56
|
+
"commitSha",
|
|
57
|
+
"branch",
|
|
58
|
+
"dirty",
|
|
59
|
+
"ci",
|
|
60
|
+
"ciProvider",
|
|
61
|
+
"host",
|
|
62
|
+
"os",
|
|
63
|
+
"arch",
|
|
64
|
+
"vxVersion",
|
|
65
|
+
"tags"
|
|
66
|
+
],
|
|
67
|
+
"properties": {
|
|
68
|
+
"runId": { "type": "string" },
|
|
69
|
+
"command": { "type": "string" },
|
|
70
|
+
"requestedTasks": { "type": "array", "items": { "type": "string" } },
|
|
71
|
+
"cachePolicy": { "type": "string" },
|
|
72
|
+
"concurrency": { "type": "integer" },
|
|
73
|
+
"flow": { "enum": ["focused", "broad", null] },
|
|
74
|
+
"startedAt": { "type": "integer", "description": "epoch ms" },
|
|
75
|
+
"endedAt": { "type": "integer", "description": "epoch ms" },
|
|
76
|
+
"totalDurationMs": { "type": "number" },
|
|
77
|
+
"taskCount": { "type": "integer" },
|
|
78
|
+
"failedCount": { "type": "integer" },
|
|
79
|
+
"hitCount": { "type": "integer" },
|
|
80
|
+
"hitLocalCount": { "type": "integer" },
|
|
81
|
+
"hitRemoteCount": { "type": "integer" },
|
|
82
|
+
"upToDateCount": {
|
|
83
|
+
"type": "integer",
|
|
84
|
+
"description": "hits that restored nothing: the disk already matched"
|
|
85
|
+
},
|
|
86
|
+
"restoredLocalCount": {
|
|
87
|
+
"type": "integer",
|
|
88
|
+
"description": "hits that restored outputs from the local cache"
|
|
89
|
+
},
|
|
90
|
+
"restoredRemoteCount": {
|
|
91
|
+
"type": "integer",
|
|
92
|
+
"description": "hits that restored outputs from the remote cache"
|
|
93
|
+
},
|
|
94
|
+
"exitOk": { "type": "boolean" },
|
|
95
|
+
"commitSha": { "type": ["string", "null"] },
|
|
96
|
+
"branch": { "type": ["string", "null"] },
|
|
97
|
+
"dirty": { "type": ["boolean", "null"] },
|
|
98
|
+
"ci": { "type": "boolean" },
|
|
99
|
+
"ciProvider": { "type": ["string", "null"] },
|
|
100
|
+
"host": { "type": ["string", "null"] },
|
|
101
|
+
"os": { "type": ["string", "null"] },
|
|
102
|
+
"arch": { "type": ["string", "null"] },
|
|
103
|
+
"vxVersion": { "type": "string" },
|
|
104
|
+
"tags": { "type": "object", "additionalProperties": { "type": "string" } }
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"task": {
|
|
108
|
+
"type": "object",
|
|
109
|
+
"additionalProperties": false,
|
|
110
|
+
"required": [
|
|
111
|
+
"runId",
|
|
112
|
+
"project",
|
|
113
|
+
"task",
|
|
114
|
+
"status",
|
|
115
|
+
"exitCode",
|
|
116
|
+
"durationMs",
|
|
117
|
+
"startedAt",
|
|
118
|
+
"endedAt",
|
|
119
|
+
"cacheHit",
|
|
120
|
+
"restored",
|
|
121
|
+
"cached",
|
|
122
|
+
"hash",
|
|
123
|
+
"cpuMs",
|
|
124
|
+
"peakRssBytes",
|
|
125
|
+
"wallclockStartNs",
|
|
126
|
+
"wallclockEndNs",
|
|
127
|
+
"blockedBy",
|
|
128
|
+
"timedOut",
|
|
129
|
+
"sandboxViolations",
|
|
130
|
+
"notReady",
|
|
131
|
+
"forwarded"
|
|
132
|
+
],
|
|
133
|
+
"properties": {
|
|
134
|
+
"runId": { "type": ["string", "null"] },
|
|
135
|
+
"project": { "type": "string" },
|
|
136
|
+
"task": { "type": "string" },
|
|
137
|
+
"status": { "type": "string" },
|
|
138
|
+
"exitCode": { "type": "integer" },
|
|
139
|
+
"durationMs": { "type": "number" },
|
|
140
|
+
"startedAt": { "type": "integer", "description": "epoch ms" },
|
|
141
|
+
"endedAt": { "type": "integer", "description": "epoch ms" },
|
|
142
|
+
"cacheHit": {
|
|
143
|
+
"type": ["boolean", "null"],
|
|
144
|
+
"description": "true when the task's outputs came from the cache instead of running"
|
|
145
|
+
},
|
|
146
|
+
"restored": {
|
|
147
|
+
"type": ["boolean", "null"],
|
|
148
|
+
"description": "on a hit: true when outputs were restored, false when up-to-date"
|
|
149
|
+
},
|
|
150
|
+
"cached": {
|
|
151
|
+
"type": ["boolean", "null"],
|
|
152
|
+
"description": "whether the task declares a cache (false prints no-cache); not whether this run hit it"
|
|
153
|
+
},
|
|
154
|
+
"hash": { "type": "string" },
|
|
155
|
+
"cpuMs": { "type": ["number", "null"] },
|
|
156
|
+
"peakRssBytes": { "type": ["integer", "null"] },
|
|
157
|
+
"wallclockStartNs": {
|
|
158
|
+
"type": ["string", "null"],
|
|
159
|
+
"description": "decimal nanoseconds from the run's start"
|
|
160
|
+
},
|
|
161
|
+
"wallclockEndNs": { "type": ["string", "null"] },
|
|
162
|
+
"blockedBy": { "type": ["string", "null"] },
|
|
163
|
+
"timedOut": { "type": ["boolean", "null"] },
|
|
164
|
+
"sandboxViolations": { "type": ["integer", "null"] },
|
|
165
|
+
"notReady": { "enum": ["timeout", "exited", "spawn", null] },
|
|
166
|
+
"forwarded": { "type": "boolean" },
|
|
167
|
+
"output": {
|
|
168
|
+
"type": "string",
|
|
169
|
+
"description": "on a failed row: its output, plain text, bounded (first 8 KiB, last 56 KiB), secrets masked; '' when none was recorded"
|
|
170
|
+
},
|
|
171
|
+
"locations": {
|
|
172
|
+
"type": "array",
|
|
173
|
+
"description": "on a failed row: the existing files its output names, in order of first appearance",
|
|
174
|
+
"items": {
|
|
175
|
+
"type": "object",
|
|
176
|
+
"additionalProperties": false,
|
|
177
|
+
"required": ["file"],
|
|
178
|
+
"properties": {
|
|
179
|
+
"file": { "type": "string", "description": "absolute" },
|
|
180
|
+
"line": { "type": "integer" },
|
|
181
|
+
"col": { "type": "integer" }
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "vx run --dry=json",
|
|
4
|
+
"description": "The task graph a run would execute and what the cache predicts for each task; nothing runs.",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["tasks"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"tasks": {
|
|
10
|
+
"type": "array",
|
|
11
|
+
"items": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"additionalProperties": false,
|
|
14
|
+
"required": ["id", "project", "task", "hash", "cacheStatus", "deps"],
|
|
15
|
+
"properties": {
|
|
16
|
+
"id": { "type": "string", "description": "project#task" },
|
|
17
|
+
"project": { "type": "string" },
|
|
18
|
+
"task": { "type": "string" },
|
|
19
|
+
"hash": { "type": "string", "description": "the cache key" },
|
|
20
|
+
"cacheStatus": {
|
|
21
|
+
"enum": ["hit-local", "hit-remote", "miss", "no-cache", "group", "not-started"]
|
|
22
|
+
},
|
|
23
|
+
"deps": { "type": "array", "items": { "type": "string" } },
|
|
24
|
+
"p50Ms": {
|
|
25
|
+
"type": "number",
|
|
26
|
+
"description": "typical executed duration, when history has one"
|
|
27
|
+
},
|
|
28
|
+
"executor": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"description": "where it would run; only when the workspace declares more than one executor"
|
|
31
|
+
},
|
|
32
|
+
"download": {
|
|
33
|
+
"const": "deferred",
|
|
34
|
+
"description": "outputs would stay remote (--download)"
|
|
35
|
+
},
|
|
36
|
+
"description": { "type": "string" },
|
|
37
|
+
"affected": {
|
|
38
|
+
"type": "object",
|
|
39
|
+
"description": "why --affected kept this requested task; absent on a dependency it pulled in",
|
|
40
|
+
"additionalProperties": false,
|
|
41
|
+
"required": ["kind"],
|
|
42
|
+
"properties": {
|
|
43
|
+
"kind": {
|
|
44
|
+
"enum": ["input", "project", "package", "named", "selected"],
|
|
45
|
+
"description": "input: a changed file is a declared input; project: its project changed and the task reads it whole; package: a ^ edge passes a changed package; named: asked as pkg#task; selected: another filter selected its project"
|
|
46
|
+
},
|
|
47
|
+
"file": { "type": "string", "description": "the changed file, workspace-relative" },
|
|
48
|
+
"project": { "type": "string", "description": "the changed package (kind package)" },
|
|
49
|
+
"via": {
|
|
50
|
+
"type": "array",
|
|
51
|
+
"items": { "type": "string" },
|
|
52
|
+
"description": "the dependsOn chain, nearest first, to the task the change reached"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"predicted": {
|
|
60
|
+
"type": "object",
|
|
61
|
+
"additionalProperties": false,
|
|
62
|
+
"required": ["wallMs", "workMs", "unknownCount", "criticalPath"],
|
|
63
|
+
"properties": {
|
|
64
|
+
"wallMs": { "type": "number" },
|
|
65
|
+
"workMs": { "type": "number" },
|
|
66
|
+
"unknownCount": {
|
|
67
|
+
"type": "integer",
|
|
68
|
+
"description": "would-run tasks with no history; the times are lower bounds when above 0"
|
|
69
|
+
},
|
|
70
|
+
"criticalPath": {
|
|
71
|
+
"type": "array",
|
|
72
|
+
"description": "the would-run task ids with history along the chain wallMs measures, dependencies first",
|
|
73
|
+
"items": { "type": "string" }
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"downloadDowngrades": {
|
|
78
|
+
"type": "array",
|
|
79
|
+
"description": "producers --download wanted to defer but could not, and why",
|
|
80
|
+
"items": {
|
|
81
|
+
"type": "object",
|
|
82
|
+
"additionalProperties": false,
|
|
83
|
+
"required": ["taskId", "reason"],
|
|
84
|
+
"properties": { "taskId": { "type": "string" }, "reason": { "type": "string" } }
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "vx show --format json",
|
|
4
|
+
"description": "`vx show` lists projects; `vx show <project>` prints one project's resolved config; `vx show <project>#<task>` one task's; `vx show <task>` that task in every project declaring it. A secret value is masked.",
|
|
5
|
+
"oneOf": [
|
|
6
|
+
{ "type": "array", "items": { "$ref": "#/$defs/listRow" } },
|
|
7
|
+
{ "$ref": "#/$defs/project" },
|
|
8
|
+
{ "$ref": "#/$defs/task" },
|
|
9
|
+
{ "type": "array", "items": { "$ref": "#/$defs/task" } }
|
|
10
|
+
],
|
|
11
|
+
"$defs": {
|
|
12
|
+
"listRow": {
|
|
13
|
+
"type": "object",
|
|
14
|
+
"additionalProperties": false,
|
|
15
|
+
"required": ["name", "dir", "tags", "tasks"],
|
|
16
|
+
"properties": {
|
|
17
|
+
"name": { "type": "string" },
|
|
18
|
+
"dir": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"description": "relative to the workspace root, POSIX separators"
|
|
21
|
+
},
|
|
22
|
+
"tags": { "$ref": "#/$defs/stringList" },
|
|
23
|
+
"tasks": { "type": "array", "items": { "type": "string" } }
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"project": {
|
|
27
|
+
"type": "object",
|
|
28
|
+
"additionalProperties": false,
|
|
29
|
+
"required": ["name", "dir", "config"],
|
|
30
|
+
"properties": {
|
|
31
|
+
"name": { "type": "string" },
|
|
32
|
+
"dir": { "type": "string" },
|
|
33
|
+
"config": {
|
|
34
|
+
"type": ["object", "null"],
|
|
35
|
+
"description": "null when the package has no vx config and no plugin gave it one",
|
|
36
|
+
"additionalProperties": false,
|
|
37
|
+
"properties": {
|
|
38
|
+
"tags": { "$ref": "#/$defs/stringList" },
|
|
39
|
+
"tasks": { "type": "object", "additionalProperties": { "$ref": "#/$defs/taskConfig" } }
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"task": {
|
|
45
|
+
"type": "object",
|
|
46
|
+
"additionalProperties": false,
|
|
47
|
+
"required": ["name", "dir", "task", "config"],
|
|
48
|
+
"properties": {
|
|
49
|
+
"name": { "type": "string" },
|
|
50
|
+
"dir": { "type": "string" },
|
|
51
|
+
"task": { "type": "string" },
|
|
52
|
+
"config": { "$ref": "#/$defs/taskConfig" }
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"stringList": { "type": "array", "items": { "type": "string" } },
|
|
56
|
+
"taskConfig": {
|
|
57
|
+
"type": "object",
|
|
58
|
+
"additionalProperties": false,
|
|
59
|
+
"properties": {
|
|
60
|
+
"description": { "type": "string" },
|
|
61
|
+
"dependsOn": { "$ref": "#/$defs/stringList" },
|
|
62
|
+
"exec": {
|
|
63
|
+
"type": "object",
|
|
64
|
+
"additionalProperties": false,
|
|
65
|
+
"required": ["command"],
|
|
66
|
+
"properties": {
|
|
67
|
+
"command": { "type": "string" },
|
|
68
|
+
"remote": { "enum": [true, false, "only"] },
|
|
69
|
+
"timeout": { "type": "number", "description": "ms" },
|
|
70
|
+
"retries": { "type": "integer" },
|
|
71
|
+
"env": {
|
|
72
|
+
"type": "object",
|
|
73
|
+
"additionalProperties": false,
|
|
74
|
+
"properties": {
|
|
75
|
+
"passThrough": { "$ref": "#/$defs/stringList" },
|
|
76
|
+
"define": { "type": "object", "additionalProperties": { "type": "string" } },
|
|
77
|
+
"secret": { "$ref": "#/$defs/stringList" }
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"persistent": {
|
|
81
|
+
"type": "object",
|
|
82
|
+
"additionalProperties": false,
|
|
83
|
+
"properties": { "readyWhen": { "type": "string" } }
|
|
84
|
+
},
|
|
85
|
+
"interactive": { "type": "boolean" },
|
|
86
|
+
"sandbox": {
|
|
87
|
+
"type": "object",
|
|
88
|
+
"description": "as declared; its fields are the `exec.sandbox` section of the config schema"
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"cache": {
|
|
93
|
+
"type": "object",
|
|
94
|
+
"additionalProperties": false,
|
|
95
|
+
"required": ["inputs", "outputs"],
|
|
96
|
+
"properties": {
|
|
97
|
+
"inputs": {
|
|
98
|
+
"type": "object",
|
|
99
|
+
"additionalProperties": false,
|
|
100
|
+
"required": ["files"],
|
|
101
|
+
"properties": {
|
|
102
|
+
"files": { "$ref": "#/$defs/stringList" },
|
|
103
|
+
"workspaceFiles": { "$ref": "#/$defs/stringList" },
|
|
104
|
+
"env": { "$ref": "#/$defs/stringList" },
|
|
105
|
+
"tasks": { "$ref": "#/$defs/stringList" },
|
|
106
|
+
"runtime": { "$ref": "#/$defs/stringList" },
|
|
107
|
+
"workspaceRuntime": { "$ref": "#/$defs/stringList" }
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"outputs": {
|
|
111
|
+
"type": "object",
|
|
112
|
+
"additionalProperties": false,
|
|
113
|
+
"required": ["files"],
|
|
114
|
+
"properties": {
|
|
115
|
+
"files": { "$ref": "#/$defs/stringList" },
|
|
116
|
+
"workspaceFiles": { "$ref": "#/$defs/stringList" }
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|