codex-workflow-v2 2.0.0-beta.13.9 → 2.0.0-beta.14.1
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 +27 -388
- package/dist/reviewer-runtime-build.json +98 -34
- package/dist/src/alpha6/adoption.d.ts +3 -1
- package/dist/src/alpha6/adoption.js +48 -8
- package/dist/src/alpha6/adoption.js.map +1 -1
- package/dist/src/alpha6/captured-check-evidence.d.ts +51 -0
- package/dist/src/alpha6/captured-check-evidence.js +152 -0
- package/dist/src/alpha6/captured-check-evidence.js.map +1 -0
- package/dist/src/alpha6/component-owner.d.ts +15 -1
- package/dist/src/alpha6/component-owner.js +44 -2
- package/dist/src/alpha6/component-owner.js.map +1 -1
- package/dist/src/alpha6/corrective-decision-boundary.d.ts +4 -0
- package/dist/src/alpha6/corrective-decision-boundary.js +53 -0
- package/dist/src/alpha6/corrective-decision-boundary.js.map +1 -0
- package/dist/src/alpha6/downstream-proof.d.ts +1 -25
- package/dist/src/alpha6/downstream-proof.js +0 -171
- package/dist/src/alpha6/downstream-proof.js.map +1 -1
- package/dist/src/alpha6/literal-test-invocation.d.ts +2 -0
- package/dist/src/alpha6/literal-test-invocation.js +106 -0
- package/dist/src/alpha6/literal-test-invocation.js.map +1 -0
- package/dist/src/alpha6/milestone.d.ts +2 -0
- package/dist/src/alpha6/milestone.js +10 -1
- package/dist/src/alpha6/milestone.js.map +1 -1
- package/dist/src/alpha6/navigation-dirty-carryover.d.ts +11 -0
- package/dist/src/alpha6/navigation-dirty-carryover.js +130 -0
- package/dist/src/alpha6/navigation-dirty-carryover.js.map +1 -0
- package/dist/src/alpha6/plan-integrity.js +7 -5
- package/dist/src/alpha6/plan-integrity.js.map +1 -1
- package/dist/src/alpha6/remediation.d.ts +8 -21
- package/dist/src/alpha6/remediation.js +225 -474
- package/dist/src/alpha6/remediation.js.map +1 -1
- package/dist/src/alpha6/root-cause-replan-carryover.d.ts +4 -1
- package/dist/src/alpha6/root-cause-replan-carryover.js +29 -5
- package/dist/src/alpha6/root-cause-replan-carryover.js.map +1 -1
- package/dist/src/alpha7/autonomy.d.ts +9 -0
- package/dist/src/alpha7/autonomy.js +40 -1
- package/dist/src/alpha7/autonomy.js.map +1 -1
- package/dist/src/beta1/project-transaction.d.ts +3 -1
- package/dist/src/beta1/project-transaction.js +20 -6
- package/dist/src/beta1/project-transaction.js.map +1 -1
- package/dist/src/checks/runner.d.ts +26 -0
- package/dist/src/checks/runner.js +223 -0
- package/dist/src/checks/runner.js.map +1 -0
- package/dist/src/checks/task-sync.d.ts +10 -0
- package/dist/src/checks/task-sync.js +41 -0
- package/dist/src/checks/task-sync.js.map +1 -0
- package/dist/src/checks/worker.d.ts +1 -0
- package/dist/src/checks/worker.js +154 -0
- package/dist/src/checks/worker.js.map +1 -0
- package/dist/src/cli-actions.d.ts +3 -3
- package/dist/src/cli-actions.js +8 -15
- package/dist/src/cli-actions.js.map +1 -1
- package/dist/src/cli.js +43 -97
- package/dist/src/cli.js.map +1 -1
- package/dist/src/contracts.d.ts +54 -34
- package/dist/src/delegation.d.ts +5 -1
- package/dist/src/delegation.js +4 -0
- package/dist/src/delegation.js.map +1 -1
- package/dist/src/dependency-provenance.d.ts +2 -2
- package/dist/src/dependency-provenance.js +12 -69
- package/dist/src/dependency-provenance.js.map +1 -1
- package/dist/src/domain/base-sync-conflict.d.ts +13 -0
- package/dist/src/domain/base-sync-conflict.js +32 -0
- package/dist/src/domain/base-sync-conflict.js.map +1 -0
- package/dist/src/domain/step-start-admission.d.ts +4 -0
- package/dist/src/domain/step-start-admission.js +9 -0
- package/dist/src/domain/step-start-admission.js.map +1 -0
- package/dist/src/domain/virgin-registration.d.ts +3 -0
- package/dist/src/domain/virgin-registration.js +65 -0
- package/dist/src/domain/virgin-registration.js.map +1 -0
- package/dist/src/errors.d.ts +1 -1
- package/dist/src/errors.js.map +1 -1
- package/dist/src/failed-checkpoint-update.d.ts +69 -0
- package/dist/src/failed-checkpoint-update.js +171 -0
- package/dist/src/failed-checkpoint-update.js.map +1 -0
- package/dist/src/gateway-handshake.js +0 -8
- package/dist/src/gateway-handshake.js.map +1 -1
- package/dist/src/git.d.ts +3 -1
- package/dist/src/git.js +41 -14
- package/dist/src/git.js.map +1 -1
- package/dist/src/graph.js +25 -3
- package/dist/src/graph.js.map +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/lifecycle/corrective-replan-credential-core.d.ts +2 -0
- package/dist/src/lifecycle/corrective-replan-credential-core.js +45 -9
- package/dist/src/lifecycle/corrective-replan-credential-core.js.map +1 -1
- package/dist/src/lifecycle/corrective-replan.js +12 -8
- package/dist/src/lifecycle/corrective-replan.js.map +1 -1
- package/dist/src/lifecycle/semantic-registry.js +4 -2
- package/dist/src/lifecycle/semantic-registry.js.map +1 -1
- package/dist/src/navigation-actions.d.ts +9 -0
- package/dist/src/navigation-actions.js +72 -0
- package/dist/src/navigation-actions.js.map +1 -0
- package/dist/src/navigation-update-artifact.d.ts +5 -0
- package/dist/src/navigation-update-artifact.js +227 -0
- package/dist/src/navigation-update-artifact.js.map +1 -0
- package/dist/src/navigation-update.d.ts +39 -0
- package/dist/src/navigation-update.js +82 -0
- package/dist/src/navigation-update.js.map +1 -0
- package/dist/src/observation.js +52 -29
- package/dist/src/observation.js.map +1 -1
- package/dist/src/observed-routes.js +10 -6
- package/dist/src/observed-routes.js.map +1 -1
- package/dist/src/pending-review-update.d.ts +0 -13
- package/dist/src/pending-review-update.js +1 -6
- package/dist/src/pending-review-update.js.map +1 -1
- package/dist/src/reviewer.d.ts +1 -1
- package/dist/src/reviewer.js +20 -17
- package/dist/src/reviewer.js.map +1 -1
- package/dist/src/runtime.d.ts +3 -0
- package/dist/src/runtime.js +6 -0
- package/dist/src/runtime.js.map +1 -0
- package/dist/src/state/corrective-replan-executor.d.ts +10 -0
- package/dist/src/state/corrective-replan-executor.js +38 -1
- package/dist/src/state/corrective-replan-executor.js.map +1 -1
- package/dist/src/state/corrective-replan-public-schema.js +15 -2
- package/dist/src/state/corrective-replan-public-schema.js.map +1 -1
- package/dist/src/state/corrective-replan-public.d.ts +9 -1
- package/dist/src/state/corrective-replan-public.js +50 -8
- package/dist/src/state/corrective-replan-public.js.map +1 -1
- package/dist/src/state/corrective-replan-transaction.d.ts +1 -0
- package/dist/src/state/corrective-replan-transaction.js +12 -11
- package/dist/src/state/corrective-replan-transaction.js.map +1 -1
- package/dist/src/state/corrective-yield-transaction.d.ts +1 -0
- package/dist/src/state/corrective-yield-transaction.js +11 -10
- package/dist/src/state/corrective-yield-transaction.js.map +1 -1
- package/dist/src/state/lock.d.ts +4 -0
- package/dist/src/state/lock.js +21 -0
- package/dist/src/state/lock.js.map +1 -1
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/dist/src/workflow-blocker-route.d.ts +8 -0
- package/dist/src/workflow-blocker-route.js +106 -0
- package/dist/src/workflow-blocker-route.js.map +1 -0
- package/dist/src/workflow.d.ts +88 -64
- package/dist/src/workflow.js +832 -1456
- package/dist/src/workflow.js.map +1 -1
- package/docs/autonomy-guardrails.md +26 -304
- package/docs/decisions.md +14 -112
- package/docs/development-flow.md +36 -237
- package/docs/project-memory.md +31 -50
- package/docs/release-app-evidence.md +190 -0
- package/docs/release.md +101 -388
- package/docs/updating-existing-project.md +65 -726
- package/package.json +11 -13
- package/plugins/codex-workflow-gateway/.codex-plugin/plugin.json +2 -2
- package/plugins/codex-workflow-gateway/references/chat-dispatch.md +88 -200
- package/plugins/codex-workflow-gateway/references/codebase-memory-routing.md +57 -0
- package/plugins/codex-workflow-gateway/references/protocol.md +51 -458
- package/plugins/codex-workflow-gateway/scripts/chat-dispatch.mjs +20 -4
- package/plugins/codex-workflow-gateway/scripts/chat-model-policy.mjs +21 -34
- package/plugins/codex-workflow-gateway/scripts/chat-registry.mjs +23 -5
- package/plugins/codex-workflow-gateway/skills/codex-workflow-gateway/SKILL.md +92 -778
- package/references/state-machine.md +7 -5
- package/roles/delivery-coordinator.md +31 -11
- package/roles/scope-lead.md +1 -1
- package/roles/technical-planner.md +5 -2
- package/schemas/adoption-posture-event.schema.json +11 -0
- package/schemas/authorization-event.schema.json +1 -1
- package/schemas/corrective-decision-event.schema.json +26 -4
- package/schemas/corrective-replan-credentials.private.schema.json +8 -5
- package/schemas/corrective-replan-execution-event.private.schema.json +9 -0
- package/schemas/corrective-replan-public.schema.json +2 -1
- package/schemas/delegation-grant.schema.json +1 -1
- package/schemas/project-knowledge-map.schema.json +3 -1
- package/schemas/remediation-event.schema.json +10 -1
- package/schemas/task.schema.json +64 -2
- package/schemas/transition-definition.schema.json +4 -0
- package/schemas/transition-payloads.schema.json +16 -1
- package/src/alpha6/adoption.ts +1146 -0
- package/src/alpha6/captured-check-evidence.ts +132 -0
- package/src/alpha6/check-support-anchor.ts +128 -0
- package/src/alpha6/component-owner.ts +168 -0
- package/src/alpha6/corrective-decision-boundary.ts +45 -0
- package/src/alpha6/downstream-proof.ts +520 -0
- package/src/alpha6/failed-step-planning-recovery.ts +88 -0
- package/src/alpha6/handoff.ts +1443 -0
- package/src/alpha6/journal.ts +473 -0
- package/src/alpha6/literal-test-invocation.ts +84 -0
- package/src/alpha6/mechanical-feasibility.ts +488 -0
- package/src/alpha6/milestone.ts +2192 -0
- package/src/alpha6/navigation-dirty-carryover.ts +154 -0
- package/src/alpha6/npm-check-contract.ts +47 -0
- package/src/alpha6/plan-integrity.ts +298 -0
- package/src/alpha6/plan-risk.ts +1480 -0
- package/src/alpha6/preexecution-replan.ts +187 -0
- package/src/alpha6/remediation-cause.ts +98 -0
- package/src/alpha6/remediation.ts +2505 -0
- package/src/alpha6/review.ts +1198 -0
- package/src/alpha6/root-cause-replan-carryover.ts +491 -0
- package/src/alpha6/store-sidecars.ts +335 -0
- package/src/alpha7/autonomy.ts +449 -0
- package/src/alpha7/corrective-recovery.ts +1332 -0
- package/src/artifacts.ts +130 -0
- package/src/beta1/project-transaction.ts +364 -0
- package/src/change-explanation.ts +153 -0
- package/src/checks/runner.ts +245 -0
- package/src/checks/task-sync.ts +41 -0
- package/src/checks/worker.ts +149 -0
- package/src/cli-actions.ts +112 -0
- package/src/cli.ts +1490 -0
- package/src/contracts.ts +1512 -0
- package/src/credential-output.ts +89 -0
- package/src/credential-transport.ts +215 -0
- package/src/delegation.ts +194 -0
- package/src/dependency-provenance.ts +472 -0
- package/src/diagnostics.ts +93 -0
- package/src/domain/base-sync-conflict.ts +35 -0
- package/src/domain/completed-step-carryover.ts +76 -0
- package/src/domain/discovery.ts +27 -0
- package/src/domain/plan-semantics.ts +58 -0
- package/src/domain/step-start-admission.ts +10 -0
- package/src/domain/validation.ts +177 -0
- package/src/domain/virgin-registration.ts +46 -0
- package/src/errors.ts +24 -0
- package/src/failed-checkpoint-update.ts +203 -0
- package/src/fs-utils.ts +61 -0
- package/src/gateway-handshake.ts +95 -0
- package/src/git.ts +183 -0
- package/src/graph.ts +342 -0
- package/src/historical-step-provenance.ts +136 -0
- package/src/index.ts +23 -0
- package/src/lifecycle/canonical-hash.ts +28 -0
- package/src/lifecycle/catalog.ts +202 -0
- package/src/lifecycle/compiler-inspection.ts +29 -0
- package/src/lifecycle/core-static-readiness.ts +132 -0
- package/src/lifecycle/corrective-replan-authority.ts +136 -0
- package/src/lifecycle/corrective-replan-binding-manifest.ts +51 -0
- package/src/lifecycle/corrective-replan-credential-core.ts +437 -0
- package/src/lifecycle/corrective-replan-credential-schema.ts +54 -0
- package/src/lifecycle/corrective-replan-credentials.ts +48 -0
- package/src/lifecycle/corrective-replan.ts +847 -0
- package/src/lifecycle/evaluator.ts +48 -0
- package/src/lifecycle/fingerprint.ts +488 -0
- package/src/lifecycle/immutable.ts +8 -0
- package/src/lifecycle/implementation-table.ts +118 -0
- package/src/lifecycle/index.ts +8 -0
- package/src/lifecycle/schema-artifact.ts +263 -0
- package/src/lifecycle/semantic-registry.ts +574 -0
- package/src/lifecycle/types.ts +838 -0
- package/src/memory.ts +273 -0
- package/src/migration.ts +161 -0
- package/src/navigation-actions.ts +70 -0
- package/src/navigation-update-artifact.ts +198 -0
- package/src/navigation-update.ts +121 -0
- package/src/observation.ts +225 -0
- package/src/observed-routes.ts +665 -0
- package/src/operational-contract.ts +125 -0
- package/src/pending-review-update.ts +175 -0
- package/src/repository.ts +99 -0
- package/src/reviewer.ts +1879 -0
- package/src/runtime.ts +6 -0
- package/src/state/corrective-replan-executor.ts +819 -0
- package/src/state/corrective-replan-public-schema.ts +83 -0
- package/src/state/corrective-replan-public.ts +952 -0
- package/src/state/corrective-replan-transaction.ts +949 -0
- package/src/state/corrective-yield-executor.ts +327 -0
- package/src/state/corrective-yield-transaction.ts +730 -0
- package/src/state/lock.ts +902 -0
- package/src/state/store.ts +567 -0
- package/src/transition-core.ts +330 -0
- package/src/ulid.ts +24 -0
- package/src/version.ts +2 -0
- package/src/workflow-blocker-route.ts +109 -0
- package/src/workflow.ts +10342 -0
- package/docs/alpha7.1-implementation-brief.md +0 -268
- package/docs/alpha7.2-corrective-context-refresh-brief.md +0 -484
- package/docs/alpha7.2.1-remediation-recovery-brief.md +0 -86
- package/docs/beta1-stabilization-brief.md +0 -165
- package/docs/beta11-plan-integrity-recovery-brief.md +0 -38
- package/docs/beta13.2-signal-review-recovery.md +0 -38
- package/docs/beta2-initial-assembly-navigation-brief.md +0 -616
- package/docs/change-model.md +0 -118
- package/docs/delegated-approval.md +0 -254
- package/docs/lifecycle/state-machine-stabilization.md +0 -641
- package/docs/pdf/README.md +0 -24
- package/docs/pdf/codex-workflow-v2-architecture-ru.pdf +0 -0
- package/docs/pdf/codex-workflow-v2-chat-only-guide-ru.pdf +0 -0
- package/docs/pdf/codex-workflow-v2-technical-reference-ru.pdf +0 -0
- package/docs/pdf/requirements.txt +0 -1
- package/docs/pdf/sources/codex-workflow-v2-architecture-ru.md +0 -478
- package/docs/pdf/sources/codex-workflow-v2-chat-only-guide-ru.md +0 -506
- package/docs/pdf/sources/codex-workflow-v2-technical-reference-ru.md +0 -778
- package/docs/pending-review-update.md +0 -15
- package/docs/problem-briefs/01-pre-implementation-integrity.md +0 -482
- package/docs/problem-briefs/02-minimal-step-integrity.md +0 -411
- package/docs/problem-briefs/03-minimal-agent-context-integrity.md +0 -358
- package/docs/problem-briefs/04-task-dependency-and-structural-replacement-integrity.md +0 -573
- package/docs/problem-briefs/BRIEF-TEMPLATE.md +0 -56
- package/docs/problem-briefs/README.md +0 -120
- package/docs/problem-briefs/evidence/p01-mechanical-feasibility-corpus.md +0 -90
- package/docs/problem-briefs/evidence/signal-v4-pre-m3-replay.md +0 -246
- package/docs/split-required-recovery.md +0 -47
- package/docs/stable-release-defect-register.md +0 -730
- package/docs/validation-report.md +0 -182
- package/scripts/generate-pdf-docs.py +0 -524
- package/scripts/run-pdf-docs.mjs +0 -62
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { spawn } from 'node:child_process';
|
|
2
|
+
import { readFileSync, writeFileSync, renameSync, existsSync } from 'node:fs';
|
|
3
|
+
const request = JSON.parse(readFileSync(process.argv[2], 'utf8'));
|
|
4
|
+
const { nonce, command, cwd, deadlineNs, graceMs, cap, parentPid, resultFile, journalFile, cancellationFile } = request;
|
|
5
|
+
// Refuse to launch work unless this process really owns its dedicated POSIX group.
|
|
6
|
+
try {
|
|
7
|
+
process.kill(-process.pid, 0);
|
|
8
|
+
}
|
|
9
|
+
catch {
|
|
10
|
+
process.exit(70);
|
|
11
|
+
}
|
|
12
|
+
writeFileSync(journalFile, JSON.stringify({
|
|
13
|
+
protocol: 1,
|
|
14
|
+
pid: process.pid,
|
|
15
|
+
parentPid,
|
|
16
|
+
nonce,
|
|
17
|
+
groupLeader: true
|
|
18
|
+
}), {
|
|
19
|
+
mode: 0o600
|
|
20
|
+
});
|
|
21
|
+
let out = Buffer.alloc(0);
|
|
22
|
+
let err = Buffer.alloc(0);
|
|
23
|
+
let combined = Buffer.alloc(0);
|
|
24
|
+
let bytes = 0;
|
|
25
|
+
let truncated = false;
|
|
26
|
+
let stopping = false;
|
|
27
|
+
let finished = false;
|
|
28
|
+
let errorCode = null, errorMessage = null;
|
|
29
|
+
let exitCode = null, signal = null;
|
|
30
|
+
const append = (data, stderr) => {
|
|
31
|
+
bytes = Math.min(Number.MAX_SAFE_INTEGER, bytes + data.length);
|
|
32
|
+
const retain = (old) => {
|
|
33
|
+
const joined = Buffer.concat([old, data]);
|
|
34
|
+
if (joined.length > cap) {
|
|
35
|
+
truncated = true;
|
|
36
|
+
}
|
|
37
|
+
return joined.subarray(Math.max(0, joined.length - cap));
|
|
38
|
+
};
|
|
39
|
+
combined = retain(combined);
|
|
40
|
+
if (stderr) {
|
|
41
|
+
err = retain(err);
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
out = retain(out);
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
const text = (b) => {
|
|
48
|
+
const decoded = Buffer.from(b.toString('utf8'));
|
|
49
|
+
return decoded.subarray(Math.max(0, decoded.length - cap)).toString('utf8');
|
|
50
|
+
};
|
|
51
|
+
function record(reason) {
|
|
52
|
+
const tmp = resultFile + '.tmp';
|
|
53
|
+
writeFileSync(tmp, JSON.stringify({
|
|
54
|
+
protocol: 1,
|
|
55
|
+
nonce,
|
|
56
|
+
pid: process.pid,
|
|
57
|
+
reason,
|
|
58
|
+
errorCode,
|
|
59
|
+
errorMessage,
|
|
60
|
+
exitCode,
|
|
61
|
+
finishedAtNs: process.hrtime.bigint().toString(),
|
|
62
|
+
signal,
|
|
63
|
+
output: text(combined),
|
|
64
|
+
stdoutTail: text(out),
|
|
65
|
+
stderrTail: text(err),
|
|
66
|
+
outputBytes: bytes,
|
|
67
|
+
outputTruncated: truncated
|
|
68
|
+
}), {
|
|
69
|
+
mode: 0o600
|
|
70
|
+
});
|
|
71
|
+
renameSync(tmp, resultFile);
|
|
72
|
+
}
|
|
73
|
+
function stop(reason) {
|
|
74
|
+
if (stopping || finished) {
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
stopping = true;
|
|
78
|
+
try {
|
|
79
|
+
record(reason);
|
|
80
|
+
}
|
|
81
|
+
catch {
|
|
82
|
+
}
|
|
83
|
+
try {
|
|
84
|
+
process.kill(-process.pid, 'SIGTERM');
|
|
85
|
+
}
|
|
86
|
+
catch {
|
|
87
|
+
}
|
|
88
|
+
setTimeout(() => {
|
|
89
|
+
try {
|
|
90
|
+
record(reason);
|
|
91
|
+
}
|
|
92
|
+
catch {
|
|
93
|
+
}
|
|
94
|
+
process.kill(-process.pid, 'SIGKILL');
|
|
95
|
+
}, graceMs);
|
|
96
|
+
}
|
|
97
|
+
process.on('SIGTERM', () => stop('cancelled'));
|
|
98
|
+
process.on('SIGINT', () => stop('cancelled'));
|
|
99
|
+
if (process.ppid !== parentPid) {
|
|
100
|
+
record('parent-exit');
|
|
101
|
+
process.exit(1);
|
|
102
|
+
}
|
|
103
|
+
const deadline = BigInt(deadlineNs);
|
|
104
|
+
if (cancellationFile && existsSync(cancellationFile)) {
|
|
105
|
+
record('cancelled');
|
|
106
|
+
process.exit(1);
|
|
107
|
+
}
|
|
108
|
+
if (process.hrtime.bigint() >= deadline) {
|
|
109
|
+
record('timeout');
|
|
110
|
+
process.exit(1);
|
|
111
|
+
}
|
|
112
|
+
const child = spawn('/bin/sh', ['-lc', command], {
|
|
113
|
+
cwd,
|
|
114
|
+
env: process.env,
|
|
115
|
+
stdio: ['ignore', 'pipe', 'pipe']
|
|
116
|
+
});
|
|
117
|
+
child.stdout.on('data', (b) => append(b, false));
|
|
118
|
+
child.stderr.on('data', (b) => append(b, true));
|
|
119
|
+
const timer = setTimeout(() => stop('timeout'), Math.max(0, Number((deadline - process.hrtime.bigint()) / 1000000n)));
|
|
120
|
+
const monitor = setInterval(() => {
|
|
121
|
+
if (process.ppid !== parentPid) {
|
|
122
|
+
stop('parent-exit');
|
|
123
|
+
}
|
|
124
|
+
else if (cancellationFile && existsSync(cancellationFile)) {
|
|
125
|
+
stop('cancelled');
|
|
126
|
+
}
|
|
127
|
+
}, 25);
|
|
128
|
+
child.on('exit', (code, s) => {
|
|
129
|
+
exitCode = code;
|
|
130
|
+
signal = s;
|
|
131
|
+
});
|
|
132
|
+
child.on('error', (error) => {
|
|
133
|
+
errorCode = error.code ?? 'CHECK_SPAWN_FAILED';
|
|
134
|
+
errorMessage = error.message.slice(0, 1024);
|
|
135
|
+
if (stopping || finished) {
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
finished = true;
|
|
139
|
+
clearTimeout(timer);
|
|
140
|
+
clearInterval(monitor);
|
|
141
|
+
record('launch-failed');
|
|
142
|
+
});
|
|
143
|
+
child.on('close', (code, s) => {
|
|
144
|
+
exitCode = code;
|
|
145
|
+
signal = s;
|
|
146
|
+
if (stopping || finished) {
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
finished = true;
|
|
150
|
+
clearTimeout(timer);
|
|
151
|
+
clearInterval(monitor);
|
|
152
|
+
record('exit');
|
|
153
|
+
});
|
|
154
|
+
//# sourceMappingURL=worker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"worker.js","sourceRoot":"","sources":["../../../src/checks/worker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC9E,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAE,EAAE,MAAM,CAAC,CAAC,CAAC;AACnE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,EAAE,gBAAgB,EAAE,GAAG,OAAO,CAAC;AACxH,mFAAmF;AACnF,IAAI,CAAC;IACH,OAAO,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;AAChC,CAAC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AAI,CAAC;IAChB,MAAM,GAAG,CAAC,CAAC;AACb,CAAC,CAAC,CAAC;AACH,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,KAA4B,EAAE,EAAE;IACjD,SAAS,GAAG,KAAK,CAAC,IAAI,IAAI,oBAAoB,CAAC;IAC/C,YAAY,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;IAC5C,IAAI,QAAQ,IAAI,QAAQ,EAAE,CAAC;QACzB,OAAO;IACT,CAAC;IACD,QAAQ,GAAG,IAAI,CAAC;IAChB,YAAY,CAAC,KAAK,CAAC,CAAC;IACpB,aAAa,CAAC,OAAO,CAAC,CAAC;IACvB,MAAM,CAAC,eAAe,CAAC,CAAC;AAC1B,CAAC,CAAC,CAAC;AACH,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE;IAC5B,QAAQ,GAAG,IAAI,CAAC;IAChB,MAAM,GAAG,CAAC,CAAC;IACX,IAAI,QAAQ,IAAI,QAAQ,EAAE,CAAC;QACzB,OAAO;IACT,CAAC;IACD,QAAQ,GAAG,IAAI,CAAC;IAChB,YAAY,CAAC,KAAK,CAAC,CAAC;IACpB,aAAa,CAAC,OAAO,CAAC,CAAC;IACvB,MAAM,CAAC,MAAM,CAAC,CAAC;AACjB,CAAC,CAAC,CAAC"}
|
|
@@ -7,14 +7,14 @@
|
|
|
7
7
|
declare const CLI_ACTIONS_LITERAL: {
|
|
8
8
|
readonly gateway: readonly ["handshake"];
|
|
9
9
|
readonly change: readonly ["explain"];
|
|
10
|
-
readonly update: readonly ["preflight", "
|
|
10
|
+
readonly update: readonly ["preflight", "navigation-source-preflight", "navigation-transport-preflight", "navigation-recover", "failed-checkpoint-source-preflight", "failed-checkpoint-transport-preflight", "failed-checkpoint-recover", "dependency-provenance-preflight", "dependency-provenance-recover", "historical-step-dependency-preflight", "historical-step-dependency-recover", "downstream-proof-dependency-preflight", "downstream-proof-dependency-recover"];
|
|
11
11
|
readonly delegation: readonly ["prepare", "grant", "list", "show", "revoke"];
|
|
12
12
|
readonly 'project-memory': readonly ["scan", "show", "status", "approve", "reconcile"];
|
|
13
13
|
readonly state: readonly ["migrate", "adoption-prepare", "adoption-apply"];
|
|
14
14
|
readonly graph: readonly ["prepare", "status", "refresh-request", "bind", "fallback"];
|
|
15
15
|
readonly discovery: readonly ["start", "update", "show", "materialize"];
|
|
16
|
-
readonly task: readonly ["show", "replacement-materialize", "preexecution-replan", "plan-set", "knowledge-rebind", "context-refresh", "authorize", "plan-risk-audit", "start", "run", "step-complete", "submit", "review-record", "review-launch", "review-packet", "review-sealed-record", "step-review", "step-review-packet", "step-review-record", "corrective-decision-recover", "
|
|
17
|
-
readonly milestone: readonly ["recover", "show", "progress", "plan-set", "remediation-materialize", "scope-change-prepare", "scope-change-apply", "autonomy-prepare", "autonomy-grant", "autonomy-evolve", "authorize", "validate", "accept", "cancel"];
|
|
16
|
+
readonly task: readonly ["show", "replacement-materialize", "preexecution-replan", "plan-set", "knowledge-rebind", "context-refresh", "authorize", "plan-risk-audit", "start", "run", "step-complete", "submit", "review-record", "review-launch", "review-packet", "review-sealed-record", "step-review", "step-review-packet", "step-review-record", "corrective-decision-recover", "plan-integrity-recover", "downstream-proof-recover", "corrective-decision", "corrective-yield", "corrective-yield-recover", "corrective-replan-prepare", "corrective-replan-authorize", "corrective-replan-confirm", "corrective-replan-execute", "corrective-replan-recover", "historical-step-provenance-preflight", "historical-step-provenance-recover", "handoff", "handoff-prepare", "handoff-replace", "handoff-show", "claim", "writer-credential-replace", "handback", "handback-create", "result-set", "accept", "sync-base", "merge", "merge-confirm"];
|
|
17
|
+
readonly milestone: readonly ["recover", "show", "progress", "plan-set", "remediation-materialize", "scope-change-prepare", "scope-change-apply", "autonomy-prepare", "autonomy-grant", "autonomy-bind", "autonomy-evolve", "authorize", "validate", "accept", "cancel"];
|
|
18
18
|
readonly locks: readonly ["inspect", "repair"];
|
|
19
19
|
};
|
|
20
20
|
export declare const CLI_ACTIONS: Readonly<Record<string, readonly string[]>>;
|
package/dist/src/cli-actions.js
CHANGED
|
@@ -9,23 +9,18 @@ const CLI_ACTIONS_LITERAL = {
|
|
|
9
9
|
change: ['explain'],
|
|
10
10
|
update: [
|
|
11
11
|
'preflight',
|
|
12
|
-
'
|
|
13
|
-
'
|
|
14
|
-
'
|
|
15
|
-
'
|
|
12
|
+
'navigation-source-preflight',
|
|
13
|
+
'navigation-transport-preflight',
|
|
14
|
+
'navigation-recover',
|
|
15
|
+
'failed-checkpoint-source-preflight',
|
|
16
|
+
'failed-checkpoint-transport-preflight',
|
|
17
|
+
'failed-checkpoint-recover',
|
|
16
18
|
'dependency-provenance-preflight',
|
|
17
|
-
'corrective-carryover-preflight',
|
|
18
19
|
'dependency-provenance-recover',
|
|
19
20
|
'historical-step-dependency-preflight',
|
|
20
21
|
'historical-step-dependency-recover',
|
|
21
22
|
'downstream-proof-dependency-preflight',
|
|
22
23
|
'downstream-proof-dependency-recover',
|
|
23
|
-
'downstream-proof-replan-update-preflight',
|
|
24
|
-
'downstream-proof-replan-dependency-preflight',
|
|
25
|
-
'downstream-proof-replan-dependency-recover',
|
|
26
|
-
'plan-integrity-update-preflight',
|
|
27
|
-
'plan-integrity-dependency-preflight',
|
|
28
|
-
'plan-integrity-dependency-recover',
|
|
29
24
|
],
|
|
30
25
|
delegation: ['prepare', 'grant', 'list', 'show', 'revoke'],
|
|
31
26
|
'project-memory': ['scan', 'show', 'status', 'approve', 'reconcile'],
|
|
@@ -53,16 +48,13 @@ const CLI_ACTIONS_LITERAL = {
|
|
|
53
48
|
'step-review-packet',
|
|
54
49
|
'step-review-record',
|
|
55
50
|
'corrective-decision-recover',
|
|
56
|
-
'remediation-mode-recover',
|
|
57
51
|
'plan-integrity-recover',
|
|
58
52
|
'downstream-proof-recover',
|
|
59
|
-
'downstream-proof-replan-recover',
|
|
60
|
-
'stop-override-prepare',
|
|
61
|
-
'stop-override-apply',
|
|
62
53
|
'corrective-decision',
|
|
63
54
|
'corrective-yield',
|
|
64
55
|
'corrective-yield-recover',
|
|
65
56
|
'corrective-replan-prepare',
|
|
57
|
+
'corrective-replan-authorize',
|
|
66
58
|
'corrective-replan-confirm',
|
|
67
59
|
'corrective-replan-execute',
|
|
68
60
|
'corrective-replan-recover',
|
|
@@ -92,6 +84,7 @@ const CLI_ACTIONS_LITERAL = {
|
|
|
92
84
|
'scope-change-apply',
|
|
93
85
|
'autonomy-prepare',
|
|
94
86
|
'autonomy-grant',
|
|
87
|
+
'autonomy-bind',
|
|
95
88
|
'autonomy-evolve',
|
|
96
89
|
'authorize',
|
|
97
90
|
'validate',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-actions.js","sourceRoot":"","sources":["../../src/cli-actions.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,mBAAmB,GAAG;IAC1B,OAAO,EAAE,CAAC,WAAW,CAAC;IACtB,MAAM,EAAE,CAAC,SAAS,CAAC;IACnB,MAAM,EAAE;QACN,WAAW;QACX,
|
|
1
|
+
{"version":3,"file":"cli-actions.js","sourceRoot":"","sources":["../../src/cli-actions.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,mBAAmB,GAAG;IAC1B,OAAO,EAAE,CAAC,WAAW,CAAC;IACtB,MAAM,EAAE,CAAC,SAAS,CAAC;IACnB,MAAM,EAAE;QACN,WAAW;QACX,6BAA6B;QAC7B,gCAAgC;QAChC,oBAAoB;QACpB,oCAAoC;QACpC,uCAAuC;QACvC,2BAA2B;QAC3B,iCAAiC;QACjC,+BAA+B;QAC/B,sCAAsC;QACtC,oCAAoC;QACpC,uCAAuC;QACvC,qCAAqC;KACtC;IACD,UAAU,EAAE,CAAC,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC;IAC1D,gBAAgB,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,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IAAI,OAAO,KAAK,QAAQ,IAAI,OAAO,KAAK,QAAQ,IAAI,OAAO,KAAK,MAAM;QAAE,OAAO,IAAI,CAAC;IACpF,MAAM,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACvC,IAAI,SAAS,GAAG,CAAC;QAAE,OAAO,KAAK,CAAC;IAChC,MAAM,IAAI,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAY,CAAC;IACpD,MAAM,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC;IAC5C,MAAM,SAAS,GAAG,WAAW,CAAC,IAAI,CAAkC,CAAC;IACrE,OAAO,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC;AAC9C,CAAC"}
|
package/dist/src/cli.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { SUPPORTED_NODE_VERSION, isSupportedNodeVersion } from './runtime.js';
|
|
2
3
|
import { readFileSync } from 'node:fs';
|
|
3
4
|
import path from 'node:path';
|
|
4
5
|
import process from 'node:process';
|
|
@@ -15,22 +16,21 @@ import { WorkflowService, } from './workflow.js';
|
|
|
15
16
|
import { gatewayHandshake } from './gateway-handshake.js';
|
|
16
17
|
import { CLI_ACTIONS } from './cli-actions.js';
|
|
17
18
|
const CLI_HELP_SPECS = {
|
|
19
|
+
'update navigation-source-preflight': { requiredOptions: ['--id', '--tarball'], optionalOptions: ['--repo', '--json'] },
|
|
20
|
+
'update failed-checkpoint-source-preflight': { requiredOptions: ['--id', '--tarball'], optionalOptions: ['--repo', '--json'] },
|
|
21
|
+
'update failed-checkpoint-transport-preflight': { requiredOptions: ['--id', '--tarball', '--file'], optionalOptions: ['--repo', '--json'] },
|
|
22
|
+
'update failed-checkpoint-recover': { requiredOptions: ['--id', '--tarball', '--file', '--expected-revision', '--actor', '--reason'], optionalOptions: ['--repo', '--json'] },
|
|
23
|
+
'update navigation-transport-preflight': { requiredOptions: ['--id', '--tarball', '--file'], optionalOptions: ['--repo', '--json'] },
|
|
24
|
+
'update navigation-recover': { requiredOptions: ['--id', '--tarball', '--file', '--expected-revision', '--actor', '--reason'], optionalOptions: ['--repo', '--json'] },
|
|
18
25
|
'change explain': { requiredOptions: ['--task', '--file'], optionalOptions: ['--repo', '--json'] },
|
|
19
26
|
'milestone remediation-materialize': {
|
|
20
27
|
requiredOptions: ['--id', '--expected-revision', '--task', '--expected-task-revision', '--file'],
|
|
21
28
|
optionalOptions: ['--repo', '--json'],
|
|
22
29
|
},
|
|
23
|
-
'update pending-review-source-preflight': { requiredOptions: ['--id'], optionalOptions: ['--repo', '--json'] },
|
|
24
|
-
'update pending-review-dependency-preflight': { requiredOptions: ['--id', '--file'], optionalOptions: ['--repo', '--json'] },
|
|
25
|
-
'update pending-review-dependency-recover': { requiredOptions: ['--id', '--file', '--expected-revision', '--actor', '--reason'], optionalOptions: ['--repo', '--json'] },
|
|
26
30
|
'update dependency-provenance-preflight': {
|
|
27
31
|
requiredOptions: ['--id'],
|
|
28
32
|
optionalOptions: ['--repo', '--json'],
|
|
29
33
|
},
|
|
30
|
-
'update corrective-carryover-preflight': {
|
|
31
|
-
requiredOptions: ['--id'],
|
|
32
|
-
optionalOptions: ['--repo', '--json', '--file', '--risk-audit-file'],
|
|
33
|
-
},
|
|
34
34
|
'task historical-step-provenance-preflight': {
|
|
35
35
|
requiredOptions: ['--id'],
|
|
36
36
|
optionalOptions: ['--repo', '--json'],
|
|
@@ -59,32 +59,16 @@ const CLI_HELP_SPECS = {
|
|
|
59
59
|
requiredOptions: ['--id', '--expected-revision', '--actor', '--reason'],
|
|
60
60
|
optionalOptions: ['--repo', '--json'],
|
|
61
61
|
},
|
|
62
|
-
'
|
|
63
|
-
requiredOptions: ['--id'],
|
|
64
|
-
optionalOptions: ['--repo', '--json'],
|
|
65
|
-
},
|
|
66
|
-
'update downstream-proof-replan-dependency-preflight': {
|
|
67
|
-
requiredOptions: ['--id'],
|
|
68
|
-
optionalOptions: ['--repo', '--json'],
|
|
69
|
-
},
|
|
70
|
-
'update downstream-proof-replan-dependency-recover': {
|
|
71
|
-
requiredOptions: ['--id', '--expected-revision', '--actor', '--reason'],
|
|
72
|
-
optionalOptions: ['--repo', '--json'],
|
|
73
|
-
},
|
|
74
|
-
'update plan-integrity-update-preflight': {
|
|
75
|
-
requiredOptions: ['--id'],
|
|
76
|
-
optionalOptions: ['--repo', '--json'],
|
|
77
|
-
},
|
|
78
|
-
'update plan-integrity-dependency-preflight': {
|
|
62
|
+
'milestone progress': {
|
|
79
63
|
requiredOptions: ['--id'],
|
|
80
64
|
optionalOptions: ['--repo', '--json'],
|
|
81
65
|
},
|
|
82
|
-
'
|
|
83
|
-
requiredOptions: ['--
|
|
84
|
-
optionalOptions: ['--repo', '--json'],
|
|
66
|
+
'state adoption-apply': {
|
|
67
|
+
requiredOptions: ['--actor', '--confirmation-code'],
|
|
68
|
+
optionalOptions: ['--delegation-grant', '--repo', '--json'],
|
|
85
69
|
},
|
|
86
|
-
'milestone
|
|
87
|
-
requiredOptions: ['--id'],
|
|
70
|
+
'milestone autonomy-bind': {
|
|
71
|
+
requiredOptions: ['--id', '--expected-revision', '--actor', '--delegation-grant'],
|
|
88
72
|
optionalOptions: ['--repo', '--json'],
|
|
89
73
|
},
|
|
90
74
|
'milestone authorize': {
|
|
@@ -142,22 +126,14 @@ const CLI_HELP_SPECS = {
|
|
|
142
126
|
requiredOptions: ['--id', '--expected-revision', '--actor', '--writer-credential-ref', '--reason'],
|
|
143
127
|
optionalOptions: ['--repo', '--json'],
|
|
144
128
|
},
|
|
145
|
-
'task downstream-proof-replan-recover': {
|
|
146
|
-
requiredOptions: ['--id', '--expected-revision', '--actor', '--reason'],
|
|
147
|
-
optionalOptions: ['--repo', '--json'],
|
|
148
|
-
},
|
|
149
|
-
'task stop-override-prepare': {
|
|
150
|
-
requiredOptions: ['--id', '--step', '--expected-revision', '--actor', '--reason'],
|
|
151
|
-
optionalOptions: ['--repo', '--json'],
|
|
152
|
-
},
|
|
153
|
-
'task stop-override-apply': {
|
|
154
|
-
requiredOptions: ['--id', '--step', '--expected-revision', '--actor', '--reason', '--confirmation-code'],
|
|
155
|
-
optionalOptions: ['--repo', '--json'],
|
|
156
|
-
},
|
|
157
129
|
'task corrective-yield-recover': {
|
|
158
130
|
requiredOptions: ['--id', '--transaction-id'],
|
|
159
131
|
optionalOptions: ['--repo', '--json'],
|
|
160
132
|
},
|
|
133
|
+
'task corrective-replan-authorize': {
|
|
134
|
+
requiredOptions: ['--id', '--file'],
|
|
135
|
+
optionalOptions: ['--repo', '--json'],
|
|
136
|
+
},
|
|
161
137
|
'task corrective-replan-prepare': {
|
|
162
138
|
requiredOptions: ['--id', '--file'],
|
|
163
139
|
optionalOptions: ['--repo', '--json'],
|
|
@@ -427,7 +403,6 @@ const WRITER_CREDENTIAL_ACTIONS = [
|
|
|
427
403
|
'task step-review',
|
|
428
404
|
'task step-review-record',
|
|
429
405
|
'task corrective-decision-recover',
|
|
430
|
-
'task remediation-mode-recover',
|
|
431
406
|
'task plan-integrity-recover',
|
|
432
407
|
'task downstream-proof-recover',
|
|
433
408
|
'task corrective-decision',
|
|
@@ -494,11 +469,11 @@ async function dispatch(args) {
|
|
|
494
469
|
if (noun === 'doctor') {
|
|
495
470
|
const identity = resolveRepositoryIdentity(repo);
|
|
496
471
|
const integration = integrationDiagnostics(identity.repositoryRoot);
|
|
497
|
-
const nodeSupported =
|
|
472
|
+
const nodeSupported = isSupportedNodeVersion(process.versions.node);
|
|
498
473
|
return {
|
|
499
474
|
ok: nodeSupported && integration.localDependency.current,
|
|
500
475
|
node: process.versions.node,
|
|
501
|
-
requiredNode:
|
|
476
|
+
requiredNode: SUPPORTED_NODE_VERSION,
|
|
502
477
|
repositoryRoot: identity.repositoryRoot,
|
|
503
478
|
projectId: identity.projectId,
|
|
504
479
|
stateRoot: workflow.store.root,
|
|
@@ -518,32 +493,29 @@ async function dispatch(args) {
|
|
|
518
493
|
return workflow.next(repo, option(args, 'task') ?? null);
|
|
519
494
|
if (noun === 'change' && action === 'explain')
|
|
520
495
|
return workflow.explainChange(repo, required(args, 'task'), jsonFile(args));
|
|
521
|
-
if (noun === 'update' && action === 'pending-review-source-preflight') {
|
|
522
|
-
return workflow.pendingReviewUpdatePreflight(repo, required(args, 'id'));
|
|
523
|
-
}
|
|
524
|
-
if (noun === 'update' && (action === 'pending-review-dependency-preflight' || action === 'pending-review-dependency-recover')) {
|
|
525
|
-
const receipt = JSON.parse(readFileSync(required(args, 'file'), 'utf8'));
|
|
526
|
-
const source = 'value' in receipt && receipt.ok === true ? receipt.value : receipt;
|
|
527
|
-
if (!source.eligible || !source.binding)
|
|
528
|
-
throw new WorkflowError('INVALID_ARGUMENT', 'An eligible source preflight receipt is required.');
|
|
529
|
-
return action === 'pending-review-dependency-preflight'
|
|
530
|
-
? workflow.pendingReviewDependencyPreflight(repo, required(args, 'id'), source.binding)
|
|
531
|
-
: workflow.recoverPendingReviewDependency(repo, required(args, 'id'), revision(args), source.binding, required(args, 'actor'), required(args, 'reason'));
|
|
532
|
-
}
|
|
533
496
|
if (noun === 'update' && action === 'preflight')
|
|
534
497
|
return workflow.updatePreflight(repo);
|
|
535
|
-
if (noun === 'update' && action === '
|
|
536
|
-
return workflow.
|
|
498
|
+
if (noun === 'update' && action === 'navigation-source-preflight') {
|
|
499
|
+
return workflow.navigationUpdateSourcePreflight(repo, required(args, 'id'), required(args, 'tarball'));
|
|
500
|
+
}
|
|
501
|
+
if (noun === 'update' && action === 'failed-checkpoint-source-preflight') {
|
|
502
|
+
return workflow.failedCheckpointUpdateSourcePreflight(repo, required(args, 'id'), required(args, 'tarball'));
|
|
503
|
+
}
|
|
504
|
+
if (noun === 'update' && action === 'failed-checkpoint-transport-preflight') {
|
|
505
|
+
return workflow.failedCheckpointUpdateTransportPreflight(repo, required(args, 'id'), required(args, 'tarball'), jsonFile(args));
|
|
506
|
+
}
|
|
507
|
+
if (noun === 'update' && action === 'failed-checkpoint-recover') {
|
|
508
|
+
return workflow.recoverFailedCheckpointUpdate(repo, required(args, 'id'), revision(args), required(args, 'tarball'), jsonFile(args), required(args, 'actor'), required(args, 'reason'));
|
|
509
|
+
}
|
|
510
|
+
if (noun === 'update' && action === 'navigation-transport-preflight') {
|
|
511
|
+
return workflow.navigationUpdateTransportPreflight(repo, required(args, 'id'), required(args, 'tarball'), jsonFile(args));
|
|
512
|
+
}
|
|
513
|
+
if (noun === 'update' && action === 'navigation-recover') {
|
|
514
|
+
return workflow.recoverNavigationUpdate(repo, required(args, 'id'), revision(args), required(args, 'tarball'), jsonFile(args), required(args, 'actor'), required(args, 'reason'));
|
|
537
515
|
}
|
|
538
516
|
if (noun === 'update' && action === 'dependency-provenance-preflight') {
|
|
539
517
|
return workflow.dependencyProvenanceRecoveryPreflight(repo, required(args, 'id'));
|
|
540
518
|
}
|
|
541
|
-
if (noun === 'update' && action === 'corrective-carryover-preflight') {
|
|
542
|
-
return workflow.correctiveCarryoverUpdatePreflight(repo, required(args, 'id'), option(args, 'file') || option(args, 'risk-audit-file') ? {
|
|
543
|
-
plan: jsonFile(args),
|
|
544
|
-
planRiskAudit: jsonFile(args, 'risk-audit-file'),
|
|
545
|
-
} : null);
|
|
546
|
-
}
|
|
547
519
|
if (noun === 'task' && action === 'historical-step-provenance-preflight') {
|
|
548
520
|
return workflow.historicalStepProvenanceRecoveryPreflight(repo, required(args, 'id'));
|
|
549
521
|
}
|
|
@@ -565,24 +537,6 @@ async function dispatch(args) {
|
|
|
565
537
|
if (noun === 'update' && action === 'downstream-proof-dependency-recover') {
|
|
566
538
|
return workflow.recoverActiveDownstreamProofDependencyProvenance(repo, required(args, 'id'), revision(args), required(args, 'actor'), required(args, 'reason'));
|
|
567
539
|
}
|
|
568
|
-
if (noun === 'update' && action === 'downstream-proof-replan-update-preflight') {
|
|
569
|
-
return workflow.downstreamProofReplanUpdatePreflight(repo, required(args, 'id'));
|
|
570
|
-
}
|
|
571
|
-
if (noun === 'update' && action === 'downstream-proof-replan-dependency-preflight') {
|
|
572
|
-
return workflow.downstreamProofReplanDependencyRecoveryPreflight(repo, required(args, 'id'));
|
|
573
|
-
}
|
|
574
|
-
if (noun === 'update' && action === 'downstream-proof-replan-dependency-recover') {
|
|
575
|
-
return workflow.recoverDownstreamProofReplanDependencyProvenance(repo, required(args, 'id'), revision(args), required(args, 'actor'), required(args, 'reason'));
|
|
576
|
-
}
|
|
577
|
-
if (noun === 'update' && action === 'plan-integrity-update-preflight') {
|
|
578
|
-
return workflow.planIntegrityUpdatePreflight(repo, required(args, 'id'));
|
|
579
|
-
}
|
|
580
|
-
if (noun === 'update' && action === 'plan-integrity-dependency-preflight') {
|
|
581
|
-
return workflow.planIntegrityDependencyRecoveryPreflight(repo, required(args, 'id'));
|
|
582
|
-
}
|
|
583
|
-
if (noun === 'update' && action === 'plan-integrity-dependency-recover') {
|
|
584
|
-
return workflow.recoverPlanIntegrityDependencyProvenance(repo, required(args, 'id'), revision(args), required(args, 'actor'), required(args, 'reason'));
|
|
585
|
-
}
|
|
586
540
|
if (noun === 'delegation' && action === 'prepare') {
|
|
587
541
|
return workflow.prepareDelegation(repo, jsonFile(args));
|
|
588
542
|
}
|
|
@@ -628,7 +582,7 @@ async function dispatch(args) {
|
|
|
628
582
|
return workflow.prepareAdoption(repo);
|
|
629
583
|
}
|
|
630
584
|
if (noun === 'state' && action === 'adoption-apply') {
|
|
631
|
-
return workflow.applyAdoption(repo, required(args, 'actor'), required(args, 'confirmation-code'));
|
|
585
|
+
return workflow.applyAdoption(repo, required(args, 'actor'), required(args, 'confirmation-code'), option(args, 'delegation-grant') ?? null);
|
|
632
586
|
}
|
|
633
587
|
if (noun === 'milestone' && action === 'recover') {
|
|
634
588
|
return workflow.recoverMilestoneTransactions(repo);
|
|
@@ -823,11 +777,6 @@ async function dispatch(args) {
|
|
|
823
777
|
const actor = required(args, 'actor');
|
|
824
778
|
return workflow.recoverStepCorrectiveDecision(repo, taskId, required(args, 'step'), revision(args), actor, credentialToken(workflow, repo, args, 'writer-lease', 'task corrective-decision-recover', taskId, actor, false));
|
|
825
779
|
}
|
|
826
|
-
if (noun === 'task' && action === 'remediation-mode-recover') {
|
|
827
|
-
const taskId = required(args, 'id');
|
|
828
|
-
const actor = required(args, 'actor');
|
|
829
|
-
return workflow.recoverRemediationMode(repo, taskId, required(args, 'step'), revision(args), actor, credentialToken(workflow, repo, args, 'writer-lease', 'task remediation-mode-recover', taskId, actor, false));
|
|
830
|
-
}
|
|
831
780
|
if (noun === 'task' && action === 'plan-integrity-recover') {
|
|
832
781
|
const taskId = required(args, 'id');
|
|
833
782
|
const actor = required(args, 'actor');
|
|
@@ -838,15 +787,6 @@ async function dispatch(args) {
|
|
|
838
787
|
const actor = required(args, 'actor');
|
|
839
788
|
return workflow.recoverDownstreamProof(repo, taskId, revision(args), actor, credentialToken(workflow, repo, args, 'writer-lease', 'task downstream-proof-recover', taskId, actor, true), required(args, 'reason'));
|
|
840
789
|
}
|
|
841
|
-
if (noun === 'task' && action === 'downstream-proof-replan-recover') {
|
|
842
|
-
return workflow.recoverDownstreamProofReplan(repo, required(args, 'id'), revision(args), required(args, 'actor'), required(args, 'reason'));
|
|
843
|
-
}
|
|
844
|
-
if (noun === 'task' && action === 'stop-override-prepare') {
|
|
845
|
-
return workflow.prepareTaskStopOverride(repo, required(args, 'id'), required(args, 'step'), revision(args), required(args, 'actor'), required(args, 'reason'));
|
|
846
|
-
}
|
|
847
|
-
if (noun === 'task' && action === 'stop-override-apply') {
|
|
848
|
-
return workflow.applyTaskStopOverride(repo, required(args, 'id'), required(args, 'step'), revision(args), required(args, 'actor'), required(args, 'reason'), required(args, 'confirmation-code'));
|
|
849
|
-
}
|
|
850
790
|
if (noun === 'task' && action === 'corrective-decision') {
|
|
851
791
|
const taskId = required(args, 'id');
|
|
852
792
|
return workflow.recordStepCorrectiveDecision(repo, taskId, required(args, 'step'), revision(args), jsonFile(args), option(args, 'actor'), credentialToken(workflow, repo, args, 'writer-lease', 'task corrective-decision', taskId, option(args, 'actor') ?? null, false));
|
|
@@ -861,6 +801,9 @@ async function dispatch(args) {
|
|
|
861
801
|
if (noun === 'task' && action === 'corrective-yield-recover') {
|
|
862
802
|
return workflow.recoverCorrectiveYield(repo, required(args, 'id'), required(args, 'transaction-id'));
|
|
863
803
|
}
|
|
804
|
+
if (noun === 'task' && action === 'corrective-replan-authorize') {
|
|
805
|
+
return workflow.authorizeDelegatedCorrectiveReplan(repo, required(args, 'id'), jsonFile(args));
|
|
806
|
+
}
|
|
864
807
|
if (noun === 'task' && action === 'corrective-replan-prepare') {
|
|
865
808
|
return workflow.prepareCorrectiveReplan(repo, required(args, 'id'), jsonFile(args));
|
|
866
809
|
}
|
|
@@ -992,6 +935,9 @@ async function dispatch(args) {
|
|
|
992
935
|
if (noun === 'milestone' && action === 'autonomy-evolve') {
|
|
993
936
|
return workflow.evolveMilestonePlanAutonomously(repo, required(args, 'id'), revision(args), jsonFile(args), required(args, 'actor'));
|
|
994
937
|
}
|
|
938
|
+
if (noun === 'milestone' && action === 'autonomy-bind') {
|
|
939
|
+
return workflow.bindMilestoneAutonomy(repo, required(args, 'id'), revision(args), required(args, 'actor'), required(args, 'delegation-grant'));
|
|
940
|
+
}
|
|
995
941
|
if (noun === 'milestone' && action === 'authorize') {
|
|
996
942
|
return workflow.authorizeMilestone(repo, required(args, 'id'), revision(args), option(args, 'actor') ?? 'user', option(args, 'reason') ?? '', option(args, 'delegation-grant') ?? null);
|
|
997
943
|
}
|