@vzn/vx 0.0.640 → 0.0.642
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/launcher.sh +9 -2
- package/package.json +5 -12
- package/skills/vx/SKILL.md +4 -4
- package/src/bin.ts +8 -6
- package/src/cache/archive.ts +735 -107
- package/src/cache/cache.ts +133 -29
- package/src/cache/fold-memo.ts +58 -0
- package/src/cache/git-inputs.ts +213 -31
- package/src/cache/index.ts +9 -2
- package/src/cache/inputs.ts +244 -108
- package/src/cache/key-fold.ts +90 -69
- package/src/cache/layer.ts +9 -7
- package/src/cache/layered-cache.ts +74 -9
- package/src/cache/output-index.ts +25 -4
- package/src/cache/remote-lane.ts +27 -10
- package/src/cache/schema.ts +13 -3
- package/src/cache/scoped-cache.ts +11 -3
- package/src/cache/umask.ts +29 -0
- package/src/cli/docs.ts +71 -7
- package/src/cli/help.ts +11 -5
- package/src/cli/plan-format.ts +4 -1
- package/src/cli/run.ts +10 -3
- package/src/cli/select.ts +2 -0
- package/src/cli/upgrade.ts +37 -2
- package/src/cli/watch-filter.ts +1 -6
- package/src/cli/watch-fs.ts +2 -1
- package/src/exec/runner.ts +5 -0
- package/src/exec/sandbox-runtime.ts +81 -1
- package/src/graph/priorities.ts +14 -1
- package/src/handoff.ts +5 -0
- package/src/history/history.ts +43 -33
- package/src/index.ts +11 -1
- package/src/orchestrator/deferred-outputs.ts +3 -2
- package/src/orchestrator/execute-task.ts +20 -14
- package/src/orchestrator/hit-restore.ts +111 -29
- package/src/orchestrator/index.ts +1 -0
- package/src/orchestrator/local-shortcircuit.ts +8 -0
- package/src/orchestrator/lockfile-claim.ts +54 -8
- package/src/orchestrator/miss-save.ts +27 -17
- package/src/orchestrator/output-host.ts +9 -1
- package/src/orchestrator/plan.ts +4 -0
- package/src/orchestrator/plugin-host.ts +35 -5
- package/src/orchestrator/plugin.ts +29 -3
- package/src/orchestrator/prepare.ts +74 -5
- package/src/orchestrator/projects.ts +6 -1
- package/src/orchestrator/run-report.ts +30 -9
- package/src/orchestrator/run.ts +62 -38
- package/src/orchestrator/sandbox-request.ts +1 -48
- package/src/orchestrator/save-lane.ts +17 -10
- package/src/orchestrator/signals.ts +7 -10
- package/src/orchestrator/stable-keys.ts +83 -25
- package/src/orchestrator/task-hash.ts +46 -12
- package/src/report/events.ts +12 -0
- package/src/report/framed-output.ts +2 -1
- package/src/report/logger.ts +58 -15
- package/src/report/status-line.ts +45 -4
- package/src/report/summary.ts +11 -6
- package/src/util/errors.ts +1 -1
- package/src/util/hidden-prompt.ts +74 -0
- package/src/util/index.ts +13 -0
- package/src/util/paths.ts +58 -5
- package/src/util/secrets.ts +150 -0
- package/src/workspace/affected.ts +63 -13
- package/src/workspace/config-eval.ts +2 -2
- package/src/workspace/config-schema.ts +37 -3
- package/src/workspace/project-loader.ts +6 -4
- package/src/workspace/workspace.ts +17 -11
- package/docs/caching.md +0 -2352
- package/docs/cli.md +0 -3280
- package/docs/execution.md +0 -675
- package/docs/features.md +0 -178
- package/docs/patterns.md +0 -219
- package/docs/schema.md +0 -2461
- package/docs/security.md +0 -252
- package/src/cli/docs-corpus.ts +0 -21
- package/src/cli/docs-text.d.ts +0 -5
|
@@ -188,14 +188,19 @@ export function linkDiscoveredEdges(
|
|
|
188
188
|
[edge.reach, reach],
|
|
189
189
|
] as const) {
|
|
190
190
|
for (const target of kind) {
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
191
|
+
// Every project lies inside the root (`discoveredProject` refuses
|
|
192
|
+
// one that does not), so a target naming one needs no other check:
|
|
193
|
+
// a plugin hands project dirs as they are, absolute, and resolving
|
|
194
|
+
// and judging each of 5,000 edges was ~15 ms at 1,000 projects.
|
|
195
|
+
const name = byDir.get(target) ?? byDir.get(path.resolve(root, target))
|
|
196
|
+
if (name === undefined) {
|
|
197
|
+
const rel = relPosix(root, path.resolve(root, target))
|
|
198
|
+
const where = `plugin '${edge.by}' gave project "${edge.meta.name}" an edge to ${target}`
|
|
199
|
+
if (rel === '..' || rel.startsWith('../') || path.isAbsolute(rel)) {
|
|
200
|
+
throw new UserError(`${where}: outside the workspace root`)
|
|
201
|
+
}
|
|
202
|
+
throw new UserError(`${where}: not a project`)
|
|
196
203
|
}
|
|
197
|
-
const name = byDir.get(dir)
|
|
198
|
-
if (name === undefined) throw new UserError(`${where}: not a project`)
|
|
199
204
|
let set = into.get(edge.meta)
|
|
200
205
|
if (set === undefined) into.set(edge.meta, (set = new Set()))
|
|
201
206
|
set.add(name)
|
|
@@ -417,12 +422,13 @@ export function lockedProjects(
|
|
|
417
422
|
* The project a plugin's `discover` entry names: a new meta (`added`) for a
|
|
418
423
|
* directory that is not a project yet, else the project already there,
|
|
419
424
|
* renamed when its name was its path's. A config's `name` wins over the
|
|
420
|
-
* plugin's; a name another plugin gave is not changed. `
|
|
421
|
-
*
|
|
425
|
+
* plugin's; a name another plugin gave is not changed. `known` is the
|
|
426
|
+
* projects by directory: a scan per entry was quadratic, 106 ms of a 5,000
|
|
427
|
+
* project warm run. `by` names the plugin in a refusal.
|
|
422
428
|
*/
|
|
423
429
|
export async function discoveredProject(
|
|
424
430
|
root: string,
|
|
425
|
-
known:
|
|
431
|
+
known: ReadonlyMap<string, ProjectMeta>,
|
|
426
432
|
entry: {
|
|
427
433
|
readonly dir: string
|
|
428
434
|
readonly name?: string
|
|
@@ -456,7 +462,7 @@ export async function discoveredProject(
|
|
|
456
462
|
throw new UserError(`${where}${named} at ${dir}: outside the workspace root`)
|
|
457
463
|
}
|
|
458
464
|
const shown = rel === '' ? '.' : rel
|
|
459
|
-
const meta = known.
|
|
465
|
+
const meta = known.get(dir)
|
|
460
466
|
if (meta !== undefined) {
|
|
461
467
|
const from = namedBy.get(meta)
|
|
462
468
|
if (name === undefined || name === meta.name || from === 'config') return { meta, added: false }
|