@vzn/vx 0.0.650 → 0.0.651
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 +5 -20
- package/package.json +5 -5
- package/schemas/last.json +15 -0
- package/src/bin.ts +9 -31
- package/src/cache/cache.ts +202 -25
- package/src/cache/file-hashes.ts +3 -0
- package/src/cache/git-inputs.ts +188 -39
- package/src/cache/index.ts +1 -0
- package/src/cache/inputs.ts +3 -0
- package/src/cache/layer.ts +11 -0
- package/src/cache/layered-cache.ts +4 -0
- package/src/cache/linked-inputs.ts +3 -0
- package/src/cache/lockfile-memo.ts +3 -2
- package/src/cache/output-index.ts +5 -2
- package/src/cache/remote-lane.ts +2 -1
- package/src/cache/run-history.ts +11 -1
- package/src/cache/schema.ts +11 -1
- package/src/cli/cache.ts +26 -16
- package/src/cli/completions.ts +4 -2
- package/src/cli/docs.ts +10 -11
- package/src/cli/help.ts +12 -23
- package/src/cli/index.ts +4 -9
- package/src/cli/info.ts +15 -7
- package/src/cli/init.ts +23 -15
- package/src/cli/last.ts +213 -203
- package/src/cli/lock.ts +55 -5
- package/src/cli/plan-format.ts +100 -118
- package/src/cli/plugin-commands.ts +8 -2
- package/src/cli/plugin-templates.ts +2 -2
- package/src/cli/run.ts +46 -27
- package/src/cli/select.ts +43 -5
- package/src/cli/show.ts +38 -42
- package/src/cli/task-verb.ts +22 -0
- package/src/cli/upgrade.ts +3 -1
- package/src/cli/watch-fs.ts +6 -1
- package/src/cli/watch-judge.ts +2 -1
- package/src/cli/watch.ts +83 -44
- package/src/cli/why.ts +123 -89
- package/src/cli/workspace-config.ts +2 -1
- package/src/exec/executor.ts +2 -1
- package/src/exec/kill-tree.ts +58 -5
- package/src/exec/local-executor.ts +1 -1
- package/src/exec/pipes.ts +152 -0
- package/src/exec/runner.ts +199 -182
- package/src/exec/sandbox-binds.ts +1 -1
- package/src/exec/sandbox-runtime.ts +11 -2
- package/src/exec/spawn-off.ts +154 -0
- package/src/exec/warm-shell.ts +146 -0
- package/src/graph/critical-path.ts +40 -28
- package/src/graph/priorities.ts +98 -44
- package/src/graph/scheduler.ts +14 -10
- package/src/graph/task-graph.ts +27 -1
- package/src/handoff.ts +10 -7
- package/src/history/history.ts +5 -0
- package/src/history/metrics.ts +9 -1
- package/src/index.ts +3 -1
- package/src/orchestrator/doctor.ts +1 -1
- package/src/orchestrator/execute-task.ts +16 -2
- package/src/orchestrator/graph-memo.ts +50 -1
- package/src/orchestrator/graph-stage.ts +6 -0
- package/src/orchestrator/index.ts +3 -0
- package/src/orchestrator/live-usage.ts +16 -11
- package/src/orchestrator/locked-digests.ts +63 -0
- package/src/orchestrator/lockfile-claim.ts +108 -29
- package/src/orchestrator/miss-save.ts +31 -3
- package/src/orchestrator/persistent-task.ts +3 -1
- package/src/orchestrator/plan.ts +5 -1
- package/src/orchestrator/plugin-host.ts +61 -0
- package/src/orchestrator/plugin.ts +47 -2
- package/src/orchestrator/prepare.ts +16 -1
- package/src/orchestrator/projects.ts +4 -1
- package/src/orchestrator/run-context.ts +29 -10
- package/src/orchestrator/run-failures.ts +1 -1
- package/src/orchestrator/run-records.ts +10 -0
- package/src/orchestrator/run.ts +53 -22
- package/src/orchestrator/sandbox-request.ts +2 -2
- package/src/orchestrator/signals.ts +8 -5
- package/src/orchestrator/task-hash.ts +17 -3
- package/src/report/events.ts +3 -11
- package/src/report/forecast.ts +10 -32
- package/src/report/framed-output.ts +272 -173
- package/src/report/index.ts +8 -3
- package/src/report/logger.ts +73 -38
- package/src/report/plain-output.ts +1 -1
- package/src/report/status-line.ts +49 -357
- package/src/report/summary.ts +100 -131
- package/src/ui/ansi.ts +48 -0
- package/src/ui/components.ts +506 -0
- package/src/ui/index.ts +79 -0
- package/src/ui/kit.ts +37 -0
- package/src/ui/live-region.ts +363 -0
- package/src/{util/refusal-notice.ts → ui/refusal.ts} +7 -5
- package/src/ui/terminal.ts +51 -0
- package/src/ui/theme.ts +224 -0
- package/src/ui/version-line.ts +28 -0
- package/src/util/config-frame.ts +65 -10
- package/src/util/edit-distance.ts +6 -1
- package/src/util/index.ts +2 -15
- package/src/util/paths.ts +20 -2
- package/src/util/secret-mask.ts +39 -3
- package/src/util/settle.ts +31 -0
- package/src/util/timing.ts +4 -16
- package/src/workspace/affected.ts +89 -30
- package/src/workspace/config-schema.ts +4 -2
- package/src/workspace/dependencies-lock.ts +191 -0
- package/src/workspace/filter.ts +28 -0
- package/src/workspace/index.ts +9 -0
- package/src/workspace/lockfile.ts +159 -6
- package/src/workspace/migration.ts +4 -3
- package/src/workspace/workspace.ts +3 -0
- package/src/util/colors.ts +0 -133
- package/src/util/report.ts +0 -44
- package/src/util/ui.ts +0 -258
- /package/src/{report/path-links.ts → ui/links.ts} +0 -0
- /package/src/{report → ui}/terminal-signals.ts +0 -0
package/src/report/forecast.ts
CHANGED
|
@@ -12,8 +12,6 @@ export interface LiveForecast {
|
|
|
12
12
|
critical?: string
|
|
13
13
|
/** Tasks not started because a dependency has not finished: the tasks line's `blocked`. */
|
|
14
14
|
waiting: number
|
|
15
|
-
/** Each running task's p50, where history knows it: the row's expected duration. */
|
|
16
|
-
expected?: ReadonlyMap<string, number>
|
|
17
15
|
/**
|
|
18
16
|
* Tasks not started because a dependency has not finished, in the order
|
|
19
17
|
* the scheduler would start them, at most one per worker: what an idle
|
|
@@ -21,13 +19,12 @@ export interface LiveForecast {
|
|
|
21
19
|
*/
|
|
22
20
|
blocked?: readonly BlockedTask[]
|
|
23
21
|
/**
|
|
24
|
-
* Each running task's count of
|
|
25
|
-
*
|
|
26
|
-
* are not running. A
|
|
22
|
+
* Each running task's count of what is downstream of it, the
|
|
23
|
+
* scheduler's own count (`computeReverseDepCount`): its row's `blocks`
|
|
24
|
+
* cell, why they are not running. A node downstream of two running tasks
|
|
25
|
+
* counts under both.
|
|
27
26
|
*/
|
|
28
27
|
blockedBy: ReadonlyMap<string, number>
|
|
29
|
-
/** Each task's usual time (its executed p50), for the results' `±usual`. */
|
|
30
|
-
usual?: ReadonlyMap<string, number>
|
|
31
28
|
}
|
|
32
29
|
|
|
33
30
|
/** A task an unfinished dependency holds back, and what holds it: the running task its longest chain waits on, else that dependency. */
|
|
@@ -54,8 +51,8 @@ export function createForecast(
|
|
|
54
51
|
nodes: ReadonlyMap<string, TaskNode>,
|
|
55
52
|
p50s: ReadonlyMap<string, number>,
|
|
56
53
|
concurrency: number,
|
|
57
|
-
/**
|
|
58
|
-
|
|
54
|
+
/** Every node's dependents count, the scheduler's baseline and the rows' `blocks`; computed here when absent. */
|
|
55
|
+
rank: ReadonlyMap<string, number> = computeReverseDepCount(nodes),
|
|
59
56
|
): Forecast {
|
|
60
57
|
// Dependencies before dependents, once: each call is one pass over it.
|
|
61
58
|
const order: TaskNode[] = []
|
|
@@ -87,9 +84,8 @@ export function createForecast(
|
|
|
87
84
|
if (p !== undefined) cost.set(n.id, p)
|
|
88
85
|
}
|
|
89
86
|
const workers = Math.max(1, concurrency)
|
|
90
|
-
// The scheduler's own baseline ranking, most dependents first,
|
|
91
|
-
// graph order
|
|
92
|
-
const rank = computeReverseDepCount(nodes)
|
|
87
|
+
// The scheduler's own baseline ranking (`rank`), most dependents first,
|
|
88
|
+
// ties in graph order.
|
|
93
89
|
const position = new Map(order.map((n, i) => [n.id, i]))
|
|
94
90
|
const before = (a: string, b: string): boolean => {
|
|
95
91
|
const d = (rank.get(a) ?? 0) - (rank.get(b) ?? 0)
|
|
@@ -97,12 +93,7 @@ export function createForecast(
|
|
|
97
93
|
}
|
|
98
94
|
|
|
99
95
|
return (finished, running, nowMs) => {
|
|
100
|
-
const expected = new Map<string, number>()
|
|
101
96
|
let waiting = 0
|
|
102
|
-
for (const id of running.keys()) {
|
|
103
|
-
const p = cost.get(id)
|
|
104
|
-
if (p !== undefined) expected.set(id, p)
|
|
105
|
-
}
|
|
106
97
|
const end = new Map<string, number>()
|
|
107
98
|
// The running task each node's longest chain waits on.
|
|
108
99
|
const head = new Map<string, string>()
|
|
@@ -153,30 +144,17 @@ export function createForecast(
|
|
|
153
144
|
work += own
|
|
154
145
|
}
|
|
155
146
|
for (const id of running.keys()) {
|
|
156
|
-
const d =
|
|
147
|
+
const d = rank.get(id)
|
|
157
148
|
if (d !== undefined && d > 0) blockedBy.set(id, d)
|
|
158
149
|
}
|
|
159
|
-
if (!known) return { waiting,
|
|
150
|
+
if (!known) return { waiting, blocked: held, blockedBy }
|
|
160
151
|
const critical = chainEnd === undefined ? undefined : head.get(chainEnd)
|
|
161
152
|
return {
|
|
162
153
|
etaMs: Math.max(chain, work / workers),
|
|
163
154
|
...(critical !== undefined ? { critical } : {}),
|
|
164
155
|
waiting,
|
|
165
|
-
expected,
|
|
166
156
|
blocked: held,
|
|
167
157
|
blockedBy,
|
|
168
|
-
usual: cost,
|
|
169
158
|
}
|
|
170
159
|
}
|
|
171
160
|
}
|
|
172
|
-
|
|
173
|
-
/**
|
|
174
|
-
* Each task's `blocks`: how many tasks, a group's own looked through and
|
|
175
|
-
* none counted, sit downstream of it in the run, each once (2026-10-29:
|
|
176
|
-
* every task it holds back, not only the next ones).
|
|
177
|
-
*/
|
|
178
|
-
export function blocksCounts(nodes: ReadonlyMap<string, TaskNode>): Map<string, number> {
|
|
179
|
-
const tasks = new Map<string, true>()
|
|
180
|
-
for (const n of nodes.values()) if (!isGroupTask(n)) tasks.set(n.id, true)
|
|
181
|
-
return computeReverseDepCount(nodes, tasks)
|
|
182
|
-
}
|