@deksden-com/dd-flow-cli 0.7.0 → 0.8.0-beta.135
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/CHANGELOG.md +630 -0
- package/README.md +6 -1
- package/dist/build-info.json +10 -10
- package/dist/cli/help.js +88 -10
- package/dist/cli/run-cli.js +525 -28
- package/dist/domain/stage-catalog.js +22 -0
- package/dist/schemas/code-review-decision.schema.json +26 -0
- package/dist/schemas/code-review-result.schema.json +14 -0
- package/dist/schemas/code-verification.schema.json +14 -0
- package/dist/schemas/code-work-batch.schema.json +24 -0
- package/dist/schemas/code-work-result.schema.json +16 -0
- package/dist/schemas/flow-contract.schema.json +6 -3
- package/dist/schemas/flow-run.schema.json +16 -123
- package/dist/schemas/plan-aspect-map.schema.json +22 -0
- package/dist/schemas/plan-review-decision.schema.json +14 -0
- package/dist/schemas/plan-review-result.schema.json +42 -0
- package/dist/schemas/protocol-plan.schema.json +15 -182
- package/dist/schemas/stage-finish-input.schema.json +16 -2
- package/dist/schemas/stage-report.schema.json +8 -7
- package/dist/schemas/vnext-protocol-plan.schema.json +37 -0
- package/dist/schemas/vnext-protocolize-result.schema.json +29 -0
- package/dist/schemas/vnext-specify.schema.json +45 -0
- package/dist/services/branch-context.js +1 -1
- package/dist/services/cleanup.js +8 -8
- package/dist/services/cli-operation-classifier.js +10 -2
- package/dist/services/code-checks.js +244 -0
- package/dist/services/config.js +7 -1
- package/dist/services/dashboard.js +12 -12
- package/dist/services/engines.js +1 -1
- package/dist/services/eval-snapshots.js +404 -0
- package/dist/services/hooks.js +774 -18
- package/dist/services/ids.js +16 -6
- package/dist/services/lanes.js +1 -1
- package/dist/services/merge-queue.js +5 -5
- package/dist/services/merge-worker.js +2 -2
- package/dist/services/migrations.js +2 -2
- package/dist/services/plan-runtime.js +1 -1
- package/dist/services/projects.js +4 -4
- package/dist/services/prompts.js +1 -1
- package/dist/services/protocols.js +8 -8
- package/dist/services/run-projection.js +49 -13
- package/dist/services/runs.js +504 -51
- package/dist/services/schema-validation.js +21 -3
- package/dist/services/sessions.js +51 -12
- package/dist/services/stage-blocker.js +57 -0
- package/dist/services/stage-context.js +90 -0
- package/dist/services/stage-lifecycle.js +198 -75
- package/dist/services/stage-pause.js +175 -0
- package/dist/services/stage-report-renderer.js +65 -0
- package/dist/services/usage.js +526 -18
- package/dist/services/vnext-code-review.js +308 -0
- package/dist/services/vnext-code.js +616 -0
- package/dist/services/vnext-contracts.js +1 -0
- package/dist/services/vnext-execution-profile.js +27 -0
- package/dist/services/vnext-fanout.js +79 -0
- package/dist/services/vnext-plan-review.js +499 -0
- package/dist/services/vnext-plan.js +576 -0
- package/dist/services/vnext-protocolize.js +542 -0
- package/dist/services/vnext-specify.js +595 -0
- package/dist/services/vnext-workspace-policy.js +87 -0
- package/dist/services/work-registry.js +499 -0
- package/dist/services/worktrees.js +58 -37
- package/dist/storage/database.js +263 -34
- package/dist/storage/paths.js +47 -1
- package/package.json +12 -12
package/dist/cli/help.js
CHANGED
|
@@ -20,10 +20,12 @@ Core commands:
|
|
|
20
20
|
protocol register/status/transition Register, inspect, transition and repair protocol state.
|
|
21
21
|
migration impact/plan/report/verify/apply Assess release impact and explicitly apply mb-upgrade migration evidence.
|
|
22
22
|
cleanup scan/apply Detect and repair stale local runtime state.
|
|
23
|
-
run start/status/list/timeline/usage/flags Track concrete flow executions, timing, source-aware usage and RUN
|
|
24
|
-
|
|
23
|
+
run start/status/list/timeline/usage/flags/vars Track concrete flow executions, timing, source-aware usage and RUN context.
|
|
24
|
+
stat usage/run sessions ls Refresh source-backed usage and reconcile settled Sessions, or list RUN Sessions.
|
|
25
|
+
stage start/pause/resume/finish Run a stage lifecycle, including in-stage user interaction.
|
|
26
|
+
work status|add-batch|ls|show|deps|delete|start|finish|fail|retry|cancel Manage vNext Work.
|
|
25
27
|
id next Preview next typed ids for protocol or run allocation.
|
|
26
|
-
plan status/item
|
|
28
|
+
plan status/item/reviews Inspect plans, update SQLite progress, or dispatch vNext grouped reviews.
|
|
27
29
|
prompt render Render one bounded, RUN-local worker launch prompt.
|
|
28
30
|
lane workspace/lock/status Manage shared workspace lanes and leases.
|
|
29
31
|
merge status/one-shot/bundle Inspect, claim, or complete merge work from the current session.
|
|
@@ -35,6 +37,10 @@ Core commands:
|
|
|
35
37
|
memory permissions preflight Check Memory Bank write/read permissions.
|
|
36
38
|
integration cmux status Inspect optional cmux integration.
|
|
37
39
|
codex home/hooks/hook Manage Codex homes, hooks, and hook events.
|
|
40
|
+
zcode event/usage Ingest trusted zcode-acp lifecycle and usage evidence.
|
|
41
|
+
grok event/usage Ingest trusted Grok Build lifecycle and usage evidence.
|
|
42
|
+
opencode event/usage Ingest trusted OpenCode lifecycle and usage evidence.
|
|
43
|
+
agy event/usage Ingest trusted Antigravity CLI lifecycle and usage evidence.
|
|
38
44
|
worktree plan/create/status Record Worktrunk-backed feature worktrees.
|
|
39
45
|
|
|
40
46
|
Examples:
|
|
@@ -147,15 +153,23 @@ Usage:
|
|
|
147
153
|
dd-flow id next --type protocol|run --project-root <root> --slug <slug> --json
|
|
148
154
|
dd-flow run status <RUN-ID|RUN-short-id> --project-root <root> --json
|
|
149
155
|
dd-flow run list --project-root <root> --json
|
|
156
|
+
dd-flow run prepare-vnext-specify --project-root <root> --slug <slug> --json
|
|
157
|
+
dd-flow run snapshot create <RUN-ID|RUN-short-id> (--stage-entry <stage>|--candidate) --project-root <root> --output <directory> --json
|
|
158
|
+
dd-flow run snapshot restore --snapshot <directory> --project-root <prepared-root> --json
|
|
159
|
+
dd-flow run snapshot bootstrap create --project-root <root> --output <directory> --json
|
|
160
|
+
dd-flow run snapshot bootstrap restore --snapshot <directory> --project-root <prepared-root> --json
|
|
150
161
|
dd-flow run timeline <RUN-ID|RUN-short-id> --project-root <root> --json
|
|
151
|
-
dd-flow
|
|
162
|
+
dd-flow stat usage --run <RUN-ID|RUN-short-id> --project-root <root> [--stage <stage[,stage...]>] [--session <session-id>] --json
|
|
163
|
+
dd-flow stat run sessions ls --run <RUN-ID|RUN-short-id> --project-root <root> --json
|
|
152
164
|
dd-flow run flags status <RUN-ID|RUN-short-id> --project-root <root> --json
|
|
153
165
|
dd-flow run flags revise <RUN-ID|RUN-short-id> --project-root <root> --expected-revision <n> --idempotency-key <key> [--preset <name>] [--flag key=value] [--flag key=value] [--allow-downgrade --reason <text>] --json
|
|
154
166
|
dd-flow run attach-stage <RUN-ID|RUN-short-id> --project-root <root> --stage <name> --dir <NN-stage-slug> --status <status> [--data-schema-id <id>] --json
|
|
155
167
|
dd-flow run complete-stage <RUN-ID|RUN-short-id> --project-root <root> --stage <name> --status <status> [--stage-report <path>] [--data <path>] [--data-schema-id <id>] [--report <path>] [--alias <path>] --json
|
|
156
|
-
dd-flow run
|
|
168
|
+
dd-flow run override <RUN-ID|RUN-short-id> --project-root <root> --status cancelled|failed --reason <text> [--verdict <text>] [--next-action <text>] --json
|
|
157
169
|
|
|
158
|
-
RUN-* is the execution envelope for one concrete flow launch. Semantic truth remains in protocol, experiment, DEF, scenario, evidence, and Memory Bank documents. New run artifacts are stored under DD_FLOW_HOME/projects/<PRJ-ID-slug>/runs/<RUN-ID-slug>/ with one run.json projection and an append-only timeline.jsonl. Timeline is the compact full run report: summary is always present, while --hide may suppress bulky sections.
|
|
170
|
+
RUN-* is the execution envelope for one concrete flow launch. Semantic truth remains in protocol, experiment, DEF, scenario, evidence, and Memory Bank documents. New run artifacts are stored under DD_FLOW_HOME/projects/<PRJ-ID-slug>/runs/<RUN-ID-slug>/ with one run.json projection and an append-only timeline.jsonl. Timeline is the compact full run report: summary is always present, while --hide may suppress bulky sections. Use \`dd-flow stat usage --run …\` to reread registered local Codex transcript counters and tool-call facts and refresh the current usage projection; unavailable data is explicit rather than zero.
|
|
171
|
+
|
|
172
|
+
run prepare-vnext-specify allocates an otherwise unstarted vNext RUN for the canonical SPECIFY entry checkpoint. run snapshot is the eval-only checkpoint boundary: it snapshots one quiescent RUN, its dedicated DD_FLOW_HOME, and the exact project tree including its Git repository, then restores them into a fresh dedicated runtime. It is not a general runtime backup command and fails closed for a shared runtime.
|
|
159
173
|
|
|
160
174
|
Examples:
|
|
161
175
|
dd-flow run start --project-root "$PWD" --flow-kind mb_sdlc --subject-type protocol --subject-id PRT-001-demo --slug demo --json
|
|
@@ -168,11 +182,31 @@ Examples:
|
|
|
168
182
|
`dd-flow stage - execute one bounded stage lifecycle
|
|
169
183
|
|
|
170
184
|
Usage:
|
|
171
|
-
dd-flow stage start <RUN-ID|RUN-short-id> --project-root <root> --stage <name> [--dir <NN-stage-slug>] --json
|
|
172
|
-
dd-flow stage start --bootstrap --project-root <root> --stage specify --subject <safe-subject>
|
|
173
|
-
dd-flow stage
|
|
185
|
+
dd-flow stage start <RUN-ID|RUN-short-id> --project-root <root> --stage <name> [--dir <NN-stage-slug>] [--require-session-binding] --json
|
|
186
|
+
dd-flow stage start --bootstrap --project-root <root> --stage specify --subject <safe-subject> (--intake-file <path>|--intake-stdin) [--require-session-binding] --json
|
|
187
|
+
dd-flow stage pause <RUN-ID|RUN-short-id> --project-root <root> --stage <name> --work <WORK-ID> --question-stdin --json
|
|
188
|
+
dd-flow stage resume <RUN-ID|RUN-short-id> --project-root <root> --stage <name> --work <WORK-ID> --answer-stdin --json
|
|
189
|
+
dd-flow stage block <RUN-ID|RUN-short-id> --project-root <root> --stage <name> --work <WORK-ID> --kind engine|harness|environment --code <code> --summary-stdin [--retryable] --json
|
|
190
|
+
dd-flow stage unblock <RUN-ID|RUN-short-id> --project-root <root> --stage <name> --work <WORK-ID> --json
|
|
191
|
+
dd-flow stage fanout status <RUN-ID|RUN-short-id> --project-root <root> --stage <name> --json
|
|
192
|
+
dd-flow stage fanout dispatch <RUN-ID|RUN-short-id> --project-root <root> --stage <name> --json
|
|
193
|
+
dd-flow stage finish <RUN-ID|RUN-short-id> --project-root <root> --stage <name> [--semantic-file <RUN-local-json>] --json
|
|
194
|
+
dd-flow stage finish <RUN-ID|RUN-short-id> --project-root <root> --stage specify (--result-file <RUN-local-specify.json>|--result-stdin) --outcome <specified|failed|cancelled> --json
|
|
174
195
|
|
|
175
|
-
stage start is the worker's first practical flow command. It performs deterministic setup and returns a ready-to-use, stage-specific work packet with trusted runtime facts, compatibility and permission preflight, aliases, write boundary and exact
|
|
196
|
+
stage start is the worker's first practical flow command. It performs deterministic setup and returns a ready-to-use, stage-specific work packet with trusted runtime facts, compatibility and permission preflight, aliases, write boundary and exact lifecycle commands. A material user question uses stage pause, not stage finish: pause leaves the same stage, Work, Session and attempt open and returns the exact resume command. Engine, harness and environment failures use stage block and never create HITL. On the next Turn, pass a complete user answer to stage resume, or repair an external blocker and call its returned stage unblock command. stage fanout is read-only orchestration state plus the stage's deterministic Work materialization action for an external runner; it never makes product decisions. stage finish is reserved for actual stage completion and generates the final deterministic reports. Generated lifecycle commands include DD_FLOW_HOME when the RUN uses a non-default runtime.`
|
|
197
|
+
],
|
|
198
|
+
[
|
|
199
|
+
"work",
|
|
200
|
+
`dd-flow work - inspect or advance a beta vNext Work
|
|
201
|
+
|
|
202
|
+
Usage:
|
|
203
|
+
dd-flow work ls (--run <RUN-ID>|--parent <WORK-ID>) [--ready] --json
|
|
204
|
+
dd-flow work show <WORK-ID> --json
|
|
205
|
+
dd-flow work start <WORK-ID> --project-root <root> --json
|
|
206
|
+
dd-flow work finish <WORK-ID> (--result-file <path>|--result-stdin) --project-root <root> --json
|
|
207
|
+
dd-flow work repair add --run <RUN-ID> --from-check <CHECK-ID> --origin-work <WORK-ID>... [--write-scope <path>...] --task-stdin --project-root <root> --json
|
|
208
|
+
|
|
209
|
+
CODE workers receive their full accepted packet from work start. work finish validates the result and executes the packet's focused checks before completion. A failed aggregate CODE gate returns the exact failed receipt and repair command; repair add creates a new Work from the selected completed origin context plus that failure evidence. Exact existing project files named by the retained receipt output are added to its repair scope deterministically; repeat --write-scope only for an additional path not named there.`
|
|
176
210
|
],
|
|
177
211
|
[
|
|
178
212
|
"id",
|
|
@@ -412,6 +446,16 @@ Usage:
|
|
|
412
446
|
dd-flow session stop-worker --project-root <root> --worker-id <id> --reason <text> --json
|
|
413
447
|
|
|
414
448
|
Session registration is the durable contract used by Stop hooks. Prompts register flow_kind, continuation_policy, protocol_id, worker_id, and workspace_path explicitly. Prefer --payload-file in Codex prompts because PreToolUse hooks see the raw shell command before variable expansion.`
|
|
449
|
+
],
|
|
450
|
+
[
|
|
451
|
+
"run config",
|
|
452
|
+
`dd-flow run config - inspect and set RUN-scoped flow choices
|
|
453
|
+
|
|
454
|
+
Usage:
|
|
455
|
+
dd-flow run config status <RUN-ID> --project-root <root> --json
|
|
456
|
+
dd-flow run config set <RUN-ID> --project-root <root> --key plan_review.mode --value auto|off|standard|deep --reason <text> --json
|
|
457
|
+
|
|
458
|
+
PLAN review policy belongs to the RUN. It defaults to auto and is frozen once PLAN-REVIEW starts. The CLI never infers this choice from intake prose.`
|
|
415
459
|
],
|
|
416
460
|
[
|
|
417
461
|
"project config",
|
|
@@ -540,6 +584,40 @@ handler resolves the registered project from cwd. The option is only a manual
|
|
|
540
584
|
override.
|
|
541
585
|
|
|
542
586
|
Managed homes isolate dd-flow hooks while sharing selected Codex state from the source home.`
|
|
587
|
+
],
|
|
588
|
+
[
|
|
589
|
+
"zcode event",
|
|
590
|
+
`dd-flow zcode event - ingest a zcode-acp session/update notification
|
|
591
|
+
|
|
592
|
+
Usage:
|
|
593
|
+
dd-flow zcode event handle --project-root <root> --json
|
|
594
|
+
dd-flow zcode usage ingest --project-root <root> --json
|
|
595
|
+
|
|
596
|
+
Both payloads are read from stdin. The event adapter retains lifecycle identity;
|
|
597
|
+
the usage adapter retains cumulative provider counters for RUN accounting.`
|
|
598
|
+
],
|
|
599
|
+
[
|
|
600
|
+
"opencode event",
|
|
601
|
+
`dd-flow opencode event - ingest a controlled OpenCode tool hook
|
|
602
|
+
|
|
603
|
+
Usage:
|
|
604
|
+
dd-flow opencode event handle --project-root <root> --json
|
|
605
|
+
dd-flow opencode usage ingest --project-root <root> --json
|
|
606
|
+
|
|
607
|
+
Both payloads are read from stdin. The event adapter reuses the trusted
|
|
608
|
+
lifecycle receipt; the usage adapter retains cumulative OpenCode Session and
|
|
609
|
+
tool counters for RUN accounting.`
|
|
610
|
+
],
|
|
611
|
+
[
|
|
612
|
+
"agy event",
|
|
613
|
+
`dd-flow agy event - ingest a controlled Antigravity CLI tool hook
|
|
614
|
+
|
|
615
|
+
Usage:
|
|
616
|
+
dd-flow agy event handle --project-root <root> --json
|
|
617
|
+
dd-flow agy usage ingest --project-root <root> --json
|
|
618
|
+
|
|
619
|
+
Both payloads are read from stdin. The event adapter records lifecycle identity;
|
|
620
|
+
the usage adapter retains cumulative conversation and tool counters.`
|
|
543
621
|
],
|
|
544
622
|
[
|
|
545
623
|
"worktree",
|