@deksden-com/dd-flow-cli 0.9.0-beta.15 → 0.9.0-beta.150
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 +895 -0
- package/README.md +140 -6
- package/dist/build-info.json +8 -8
- package/dist/cli/argument-values.js +38 -0
- package/dist/cli/command-inputs.js +386 -0
- package/dist/cli/command-metadata.js +232 -0
- package/dist/cli/command-option-descriptions.js +192 -0
- package/dist/cli/completion-cli.js +70 -0
- package/dist/cli/completion.js +57 -0
- package/dist/cli/diagnostic-invocation.js +46 -0
- package/dist/cli/diagnostic.js +120 -0
- package/dist/cli/error-output.js +52 -0
- package/dist/cli/executor-onboarding.js +76 -0
- package/dist/cli/flows.js +29 -0
- package/dist/cli/harnesses.js +84 -0
- package/dist/cli/help.js +396 -19
- package/dist/cli/hook-ingress.js +102 -0
- package/dist/cli/input-preparation.js +165 -0
- package/dist/cli/memory-flow-admission.js +50 -0
- package/dist/cli/memory-init-invocation.js +85 -0
- package/dist/cli/memory-init.js +249 -0
- package/dist/cli/memory-storage-admission.js +54 -0
- package/dist/cli/memory-storage-qualification.js +105 -0
- package/dist/cli/memory-storage-transition.js +123 -0
- package/dist/cli/memory-upgrade.js +189 -0
- package/dist/cli/models.js +39 -0
- package/dist/cli/native-hook-ingress.js +90 -0
- package/dist/cli/native-hook-preparation.js +55 -0
- package/dist/cli/operator-profiles.js +61 -0
- package/dist/cli/output-options.js +35 -0
- package/dist/cli/response-file.js +72 -0
- package/dist/cli/run-cli.js +1734 -550
- package/dist/cli/runtime-maintenance-diagnostics.js +46 -0
- package/dist/cli/runtime-maintenance-ingress.js +52 -0
- package/dist/cli/runtime-process.js +153 -0
- package/dist/cli/setup.js +150 -0
- package/dist/cli.js +89 -2
- package/dist/domain/diagnostic-aspects.js +103 -0
- package/dist/domain/diagnostic-flows.js +8 -0
- package/dist/domain/stage-catalog.js +1 -1
- package/dist/domain/stage-handler-identities.js +28 -0
- package/dist/harness-runtime/DD-ZCODE.md +112 -0
- package/dist/harness-runtime/OPENCODE-LICENSE.txt +24 -0
- package/dist/harness-runtime/bin/dd-agy.mjs +56 -0
- package/dist/harness-runtime/bin/dd-codex.mjs +27 -0
- package/dist/harness-runtime/bin/dd-droid.mjs +34 -0
- package/dist/harness-runtime/bin/dd-grok.mjs +40 -0
- package/dist/harness-runtime/bin/dd-opencode.mjs +22 -0
- package/dist/harness-runtime/bin/dd-zcode.mjs +87 -0
- package/dist/harness-runtime/lib/adapter-timeouts.d.mts +5 -0
- package/dist/harness-runtime/lib/adapter-timeouts.mjs +34 -0
- package/dist/harness-runtime/lib/agy-error-boundary.mjs +58 -0
- package/dist/harness-runtime/lib/agy-hooks.d.mts +1 -0
- package/dist/harness-runtime/lib/agy-hooks.mjs +9 -0
- package/dist/harness-runtime/lib/agy-native-inspection.mjs +216 -0
- package/dist/harness-runtime/lib/agy-native_pb.js +117 -0
- package/dist/harness-runtime/lib/daemon-observation.d.mts +2 -0
- package/dist/harness-runtime/lib/daemon-observation.mjs +163 -0
- package/dist/harness-runtime/lib/daemon-operations.d.mts +2 -0
- package/dist/harness-runtime/lib/daemon-operations.mjs +462 -0
- package/dist/harness-runtime/lib/dd-agy-daemon.d.mts +6 -0
- package/dist/harness-runtime/lib/dd-agy-daemon.mjs +1096 -0
- package/dist/harness-runtime/lib/dd-agy.mjs +86 -0
- package/dist/harness-runtime/lib/dd-codex-daemon.d.mts +1 -0
- package/dist/harness-runtime/lib/dd-codex-daemon.mjs +231 -0
- package/dist/harness-runtime/lib/dd-codex.d.mts +1 -0
- package/dist/harness-runtime/lib/dd-codex.mjs +954 -0
- package/dist/harness-runtime/lib/dd-droid-daemon.mjs +141 -0
- package/dist/harness-runtime/lib/dd-droid.mjs +626 -0
- package/dist/harness-runtime/lib/dd-grok-daemon.mjs +555 -0
- package/dist/harness-runtime/lib/dd-grok.mjs +180 -0
- package/dist/harness-runtime/lib/dd-opencode-daemon.mjs +622 -0
- package/dist/harness-runtime/lib/dd-opencode.mjs +390 -0
- package/dist/harness-runtime/lib/dd-zcode-daemon.mjs +752 -0
- package/dist/harness-runtime/lib/dd-zcode.mjs +1175 -0
- package/dist/harness-runtime/lib/delegation-instructions.d.mts +14 -0
- package/dist/harness-runtime/lib/delegation-instructions.mjs +157 -0
- package/dist/harness-runtime/lib/dispatch-fence.mjs +14 -0
- package/dist/harness-runtime/lib/driver-recovery.mjs +140 -0
- package/dist/harness-runtime/lib/droid-observation.mjs +66 -0
- package/dist/harness-runtime/lib/entity-references.d.mts +2 -0
- package/dist/harness-runtime/lib/entity-references.mjs +9 -0
- package/dist/harness-runtime/lib/lease-renewal.d.mts +8 -0
- package/dist/harness-runtime/lib/lease-renewal.mjs +37 -0
- package/dist/harness-runtime/lib/lifecycle-command.d.mts +20 -0
- package/dist/harness-runtime/lib/lifecycle-command.mjs +273 -0
- package/dist/harness-runtime/lib/lifecycle-contract.d.mts +10 -0
- package/dist/harness-runtime/lib/lifecycle-contract.mjs +19 -0
- package/dist/harness-runtime/lib/managed-daemon.d.mts +16 -0
- package/dist/harness-runtime/lib/managed-daemon.mjs +698 -0
- package/dist/harness-runtime/lib/managed-flow-env.mjs +15 -0
- package/dist/harness-runtime/lib/model-observations.mjs +101 -0
- package/dist/harness-runtime/lib/native-children.d.mts +23 -0
- package/dist/harness-runtime/lib/native-children.mjs +219 -0
- package/dist/harness-runtime/lib/native-hook-command.d.mts +7 -0
- package/dist/harness-runtime/lib/native-hook-command.mjs +251 -0
- package/dist/harness-runtime/lib/native-request-proof.d.mts +2 -0
- package/dist/harness-runtime/lib/native-request-proof.mjs +65 -0
- package/dist/harness-runtime/lib/native-streams.mjs +45 -0
- package/dist/harness-runtime/lib/observation-clock.d.mts +18 -0
- package/dist/harness-runtime/lib/observation-clock.mjs +95 -0
- package/dist/harness-runtime/lib/opencode-plugin.mjs +85 -0
- package/dist/harness-runtime/lib/operation-context.mjs +5 -0
- package/dist/harness-runtime/lib/operation-errors.d.mts +16 -0
- package/dist/harness-runtime/lib/operation-errors.mjs +127 -0
- package/dist/harness-runtime/lib/operation-progress.d.mts +7 -0
- package/dist/harness-runtime/lib/operation-progress.mjs +114 -0
- package/dist/harness-runtime/lib/process-json.d.mts +5 -0
- package/dist/harness-runtime/lib/process-json.mjs +201 -0
- package/dist/harness-runtime/lib/process-snapshot.mjs +10 -0
- package/dist/harness-runtime/lib/provider-overload-policy.d.mts +15 -0
- package/dist/harness-runtime/lib/provider-overload-policy.mjs +151 -0
- package/dist/harness-runtime/lib/runner-events.mjs +202 -0
- package/dist/harness-runtime/lib/runner-lock.mjs +42 -0
- package/dist/harness-runtime/lib/session-settlement.mjs +30 -0
- package/dist/harness-runtime/lib/setup-progress.d.mts +9 -0
- package/dist/harness-runtime/lib/setup-progress.mjs +53 -0
- package/dist/harness-runtime/lib/tool-observations.d.mts +21 -0
- package/dist/harness-runtime/lib/tool-observations.mjs +228 -0
- package/dist/harness-runtime/lib/zcode-usage.mjs +55 -0
- package/dist/harness-runtime/vendor/opencode-client/chunks/service-probe-1y4a697q.js +81 -0
- package/dist/harness-runtime/vendor/opencode-client/chunks/service-probe-2ny4vxct.js +92 -0
- package/dist/harness-runtime/vendor/opencode-client/chunks/service-probe-6mptkzbc.js +0 -0
- package/dist/harness-runtime/vendor/opencode-client/chunks/service-probe-7x67cf1q.js +52 -0
- package/dist/harness-runtime/vendor/opencode-client/chunks/service-probe-9rqn6x4v.js +16 -0
- package/dist/harness-runtime/vendor/opencode-client/chunks/service-probe-9vdz0zwn.js +1661 -0
- package/dist/harness-runtime/vendor/opencode-client/chunks/service-probe-ecs5ftka.js +1466 -0
- package/dist/harness-runtime/vendor/opencode-client/chunks/service-probe-frbwqjmf.js +145 -0
- package/dist/harness-runtime/vendor/opencode-client/chunks/service-probe-gne7h7mq.js +50 -0
- package/dist/harness-runtime/vendor/opencode-client/chunks/service-probe-gx9wnkzr.js +105 -0
- package/dist/harness-runtime/vendor/opencode-client/chunks/service-probe-m2eywc8w.js +0 -0
- package/dist/harness-runtime/vendor/opencode-client/chunks/service-probe-nwcpakzx.js +12 -0
- package/dist/harness-runtime/vendor/opencode-client/chunks/service-probe-q4g3afnw.js +623 -0
- package/dist/harness-runtime/vendor/opencode-client/chunks/service-probe-qav6mfdz.js +0 -0
- package/dist/harness-runtime/vendor/opencode-client/chunks/service-probe-sxt88q69.js +12 -0
- package/dist/harness-runtime/vendor/opencode-client/chunks/service-probe-t1xa31vm.js +39 -0
- package/dist/harness-runtime/vendor/opencode-client/chunks/service-probe-ve4aws36.js +103 -0
- package/dist/harness-runtime/vendor/opencode-client/chunks/service-probe-vmytr4q8.js +4 -0
- package/dist/harness-runtime/vendor/opencode-client/chunks/service-probe-vt9jbch8.js +36 -0
- package/dist/harness-runtime/vendor/opencode-client/chunks/service-probe-vyas3vgt.js +0 -0
- package/dist/harness-runtime/vendor/opencode-client/chunks/service-probe-wjyeq25y.js +30 -0
- package/dist/harness-runtime/vendor/opencode-client/chunks/service-probe-xgnj2w4v.js +20 -0
- package/dist/harness-runtime/vendor/opencode-client/chunks/service-probe-y2etg5bs.js +9 -0
- package/dist/harness-runtime/vendor/opencode-client/chunks/service-probe-ydhz1zrh.js +238 -0
- package/dist/harness-runtime/vendor/opencode-client/chunks/service-probe-z6qdwcsf.js +62 -0
- package/dist/harness-runtime/vendor/opencode-client/contract.d.ts +1 -0
- package/dist/harness-runtime/vendor/opencode-client/contract.js +12 -0
- package/dist/harness-runtime/vendor/opencode-client/effect/api/api.d.ts +2806 -0
- package/dist/harness-runtime/vendor/opencode-client/effect/api/api.js +0 -0
- package/dist/harness-runtime/vendor/opencode-client/effect/api.d.ts +4 -0
- package/dist/harness-runtime/vendor/opencode-client/effect/api.js +0 -0
- package/dist/harness-runtime/vendor/opencode-client/effect/client.d.ts +2530 -0
- package/dist/harness-runtime/vendor/opencode-client/effect/client.js +15 -0
- package/dist/harness-runtime/vendor/opencode-client/effect/generated/client-error.d.ts +7 -0
- package/dist/harness-runtime/vendor/opencode-client/effect/generated/client-error.js +6 -0
- package/dist/harness-runtime/vendor/opencode-client/effect/generated/client.d.ts +2529 -0
- package/dist/harness-runtime/vendor/opencode-client/effect/generated/client.js +8 -0
- package/dist/harness-runtime/vendor/opencode-client/effect/generated/index.d.ts +2 -0
- package/dist/harness-runtime/vendor/opencode-client/effect/generated/index.js +12 -0
- package/dist/harness-runtime/vendor/opencode-client/effect/index.d.ts +35 -0
- package/dist/harness-runtime/vendor/opencode-client/effect/index.js +75 -0
- package/dist/harness-runtime/vendor/opencode-client/effect/rpc.d.ts +20 -0
- package/dist/harness-runtime/vendor/opencode-client/effect/rpc.js +11 -0
- package/dist/harness-runtime/vendor/opencode-client/effect/service.d.ts +90 -0
- package/dist/harness-runtime/vendor/opencode-client/effect/service.js +187 -0
- package/dist/harness-runtime/vendor/opencode-client/package.json +84 -0
- package/dist/harness-runtime/vendor/opencode-client/promise/api.d.ts +21 -0
- package/dist/harness-runtime/vendor/opencode-client/promise/api.js +0 -0
- package/dist/harness-runtime/vendor/opencode-client/promise/client.d.ts +252 -0
- package/dist/harness-runtime/vendor/opencode-client/promise/client.js +14 -0
- package/dist/harness-runtime/vendor/opencode-client/promise/generated/client-error.d.ts +8 -0
- package/dist/harness-runtime/vendor/opencode-client/promise/generated/client-error.js +6 -0
- package/dist/harness-runtime/vendor/opencode-client/promise/generated/client.d.ts +259 -0
- package/dist/harness-runtime/vendor/opencode-client/promise/generated/client.js +7 -0
- package/dist/harness-runtime/vendor/opencode-client/promise/generated/index.d.ts +3 -0
- package/dist/harness-runtime/vendor/opencode-client/promise/generated/index.js +79 -0
- package/dist/harness-runtime/vendor/opencode-client/promise/generated/types.d.ts +8932 -0
- package/dist/harness-runtime/vendor/opencode-client/promise/generated/types.js +70 -0
- package/dist/harness-runtime/vendor/opencode-client/promise/index.d.ts +6 -0
- package/dist/harness-runtime/vendor/opencode-client/promise/index.js +83 -0
- package/dist/harness-runtime/vendor/opencode-client/promise/rpc.d.ts +32 -0
- package/dist/harness-runtime/vendor/opencode-client/promise/rpc.js +7 -0
- package/dist/harness-runtime/vendor/opencode-client/promise/service.d.ts +24 -0
- package/dist/harness-runtime/vendor/opencode-client/promise/service.js +187 -0
- package/dist/harness-runtime/vendor/opencode-client/pty-handoff.d.ts +12 -0
- package/dist/harness-runtime/vendor/opencode-client/pty-handoff.js +14 -0
- package/dist/harness-runtime/vendor/opencode-client/rpc-runtime.d.ts +20 -0
- package/dist/harness-runtime/vendor/opencode-client/rpc-runtime.js +14 -0
- package/dist/harness-runtime/vendor/opencode-client/service-contender.d.ts +37 -0
- package/dist/harness-runtime/vendor/opencode-client/service-contender.js +10 -0
- package/dist/harness-runtime/vendor/opencode-client/service-probe.d.ts +70 -0
- package/dist/harness-runtime/vendor/opencode-client/service-probe.js +16 -0
- package/dist/harness-runtime/vendor/opencode-client/service-timing.d.ts +12 -0
- package/dist/harness-runtime/vendor/opencode-client/service-timing.js +10 -0
- package/dist/harness-runtime/vendor/opencode-client/service-version.d.ts +2 -0
- package/dist/harness-runtime/vendor/opencode-client/service-version.js +6 -0
- package/dist/harness-runtime/vendor/opencode-client/service.d.ts +52 -0
- package/dist/harness-runtime/vendor/opencode-client/service.js +1 -0
- package/dist/harness-runtime/vendor/opencode-client/shared-events.d.ts +11 -0
- package/dist/harness-runtime/vendor/opencode-client/shared-events.js +8 -0
- package/dist/harness-runtime/vendor/opencode-client/solid/connection.d.ts +37 -0
- package/dist/harness-runtime/vendor/opencode-client/solid/connection.js +10 -0
- package/dist/harness-runtime/vendor/opencode-client/solid/data.d.ts +211 -0
- package/dist/harness-runtime/vendor/opencode-client/solid/data.js +18 -0
- package/dist/harness-runtime/vendor/opencode-client/solid/index.d.ts +3 -0
- package/dist/harness-runtime/vendor/opencode-client/solid/index.js +32 -0
- package/dist/harness-runtime/vendor/opencode-client/solid/pty.d.ts +22 -0
- package/dist/harness-runtime/vendor/opencode-client/solid/pty.js +8 -0
- package/dist/harness-runtime/vendor/opencode-plugin.mjs +3 -0
- package/dist/protocol/local-files.js +18 -9
- package/dist/runtime/context.js +8 -4
- package/dist/schemas/agent-profile.schema.json +1 -1
- package/dist/schemas/code-review-decision.schema.json +9 -0
- package/dist/schemas/code-review-result.schema.json +1 -1
- package/dist/schemas/code-verification.schema.json +7 -5
- package/dist/schemas/code-work-batch.schema.json +2 -2
- package/dist/schemas/diagnostic-stage-result.schema.json +354 -0
- package/dist/schemas/diagnostic-work-result.schema.json +296 -0
- package/dist/schemas/discovery-result.schema.json +184 -0
- package/dist/schemas/execution-bundle.schema.json +211 -0
- package/dist/schemas/execution-settings.schema.json +162 -0
- package/dist/schemas/flow-descriptor.schema.json +54 -0
- package/dist/schemas/flow-run.schema.json +29 -0
- package/dist/schemas/harness-catalog.schema.json +80 -0
- package/dist/schemas/mb-init-compose-result.schema.json +457 -0
- package/dist/schemas/mb-init-discover-result.schema.json +500 -0
- package/dist/schemas/mb-init-finish-result.schema.json +422 -0
- package/dist/schemas/mb-init-preflight-result.schema.json +367 -0
- package/dist/schemas/mb-init-review-result.schema.json +396 -0
- package/dist/schemas/mb-init-verify-result.schema.json +391 -0
- package/dist/schemas/mb-upgrade-stage-result.schema.json +863 -0
- package/dist/schemas/memory-bootstrap-receipt-v2.schema.json +67 -0
- package/dist/schemas/memory-bootstrap-receipt.schema.json +354 -0
- package/dist/schemas/memory-composition-work-result.schema.json +38 -0
- package/dist/schemas/memory-repair-work-result.schema.json +56 -0
- package/dist/schemas/memory-review-correction-plan.schema.json +30 -0
- package/dist/schemas/memory-review-work-result.schema.json +43 -0
- package/dist/schemas/model-catalog.schema.json +153 -0
- package/dist/schemas/plan-review-decision.schema.json +12 -3
- package/dist/schemas/plan-review-result.schema.json +2 -2
- package/dist/schemas/profile-settings.schema.json +122 -0
- package/dist/schemas/project-flow-pack-manifest.schema.json +1 -1
- package/dist/schemas/release-impact.schema.json +3 -3
- package/dist/schemas/release-manifest.schema.json +291 -0
- package/dist/schemas/run-control-receipt.schema.json +118 -0
- package/dist/schemas/run-control-request.schema.json +36 -0
- package/dist/schemas/run-engine-binding.schema.json +1 -1
- package/dist/schemas/stage-start-response.schema.json +4 -0
- package/dist/schemas/vnext-protocol-plan.schema.json +2 -2
- package/dist/services/accepted-intent.js +139 -0
- package/dist/services/branch-context.js +3 -3
- package/dist/services/canon.js +54 -15
- package/dist/services/check-environment.js +21 -0
- package/dist/services/check-runner-evidence.js +562 -0
- package/dist/services/cleanup.js +133 -40
- package/dist/services/cli-operation-classifier.js +26 -63
- package/dist/services/cli-upgrade-allowlist.js +27 -0
- package/dist/services/code-checks.js +1398 -119
- package/dist/services/codex-hook-delivery.js +32 -0
- package/dist/services/command-context.js +80 -0
- package/dist/services/compatibility-preflight.js +16 -3
- package/dist/services/config.js +11 -8
- package/dist/services/continuation-outcome.js +20 -0
- package/dist/services/controller-child-capacity.js +13 -0
- package/dist/services/controller-child-observer.js +115 -0
- package/dist/services/controller-execution.js +94 -0
- package/dist/services/controller-fanout.js +226 -0
- package/dist/services/controller-memory-task.js +45 -0
- package/dist/services/controller-memory-worker.js +49 -0
- package/dist/services/dashboard.js +143 -58
- package/dist/services/descriptor-coordinator-session.js +35 -0
- package/dist/services/descriptor-root-work.js +53 -0
- package/dist/services/descriptor-run-settlement.js +107 -0
- package/dist/services/descriptor-run-start.js +475 -0
- package/dist/services/descriptor-stage-coordinator.js +250 -0
- package/dist/services/descriptor-stage-settlement.js +223 -0
- package/dist/services/descriptor-stage-start.js +175 -0
- package/dist/services/diagnostic-evidence.js +73 -0
- package/dist/services/diagnostic-report-publication.js +72 -0
- package/dist/services/diagnostic-report.js +67 -0
- package/dist/services/diagnostic-run-bundle.js +74 -0
- package/dist/services/diagnostic-snapshot.js +159 -0
- package/dist/services/diagnostic-stage-handlers.js +108 -0
- package/dist/services/diagnostic-stage-results.js +132 -0
- package/dist/services/diagnostic-start.js +84 -0
- package/dist/services/diagnostic-work-batch.js +34 -0
- package/dist/services/diagnostic-work-collection.js +97 -0
- package/dist/services/diagnostic-work-registration.js +101 -0
- package/dist/services/diagnostic-work-results.js +93 -0
- package/dist/services/discovery/agy-discovery.js +2 -0
- package/dist/services/discovery/codex-discovery.js +2 -0
- package/dist/services/discovery/droid-discovery.js +2 -0
- package/dist/services/discovery/grok-discovery.js +2 -0
- package/dist/services/discovery/opencode-discovery.js +2 -0
- package/dist/services/discovery/static.js +31 -0
- package/dist/services/discovery/zcode-discovery.js +2 -0
- package/dist/services/engines.js +354 -163
- package/dist/services/eval-snapshots.js +1316 -150
- package/dist/services/execution-bundles.js +275 -0
- package/dist/services/execution-policy.js +185 -0
- package/dist/services/executor-onboarding.js +56 -0
- package/dist/services/external-work-launch.js +310 -0
- package/dist/services/flow-catalog.js +30 -0
- package/dist/services/flow-descriptors.js +82 -0
- package/dist/services/frozen-engine.js +387 -0
- package/dist/services/generic-execution.js +164 -0
- package/dist/services/harness-adapter.js +355 -36
- package/dist/services/harness-config.js +2 -0
- package/dist/services/harness-discovery.js +29 -0
- package/dist/services/harness-doctor.js +75 -0
- package/dist/services/harness-probe-effects.js +51 -0
- package/dist/services/harness-version-probe.js +100 -0
- package/dist/services/hook-memory-routing.js +188 -0
- package/dist/services/hook-recovery-guard.js +14 -0
- package/dist/services/hook-session-observation.js +24 -0
- package/dist/services/hooks.js +791 -326
- package/dist/services/hybrid-contracts.js +474 -0
- package/dist/services/hybrid-digest.js +14 -0
- package/dist/services/ids.js +29 -1
- package/dist/services/installation-lock.js +95 -0
- package/dist/services/installed-flow-source.js +226 -0
- package/dist/services/lanes.js +78 -65
- package/dist/services/lifecycle-command.js +1 -288
- package/dist/services/lifecycle-contract.js +1 -0
- package/dist/services/lifecycle-invocations.js +2148 -0
- package/dist/services/managed-daemon-binding.js +38 -0
- package/dist/services/managed-lease-monitor.js +133 -0
- package/dist/services/managed-processes.js +449 -69
- package/dist/services/memory-accepted-composition.js +78 -0
- package/dist/services/memory-baseline-preservation.js +65 -0
- package/dist/services/memory-completed-correction-wave.js +328 -0
- package/dist/services/memory-compose-handler.js +400 -0
- package/dist/services/memory-composition-acceptance.js +375 -0
- package/dist/services/memory-composition-graph.js +165 -0
- package/dist/services/memory-composition-registration.js +161 -0
- package/dist/services/memory-composition-work-custody.js +156 -0
- package/dist/services/memory-composition-work-results.js +108 -0
- package/dist/services/memory-corrected-review-acceptance.js +129 -0
- package/dist/services/memory-corrected-review-batch.js +37 -0
- package/dist/services/memory-corrected-review-findings.js +108 -0
- package/dist/services/memory-corrected-review-inputs.js +215 -0
- package/dist/services/memory-corrected-review-projection.js +78 -0
- package/dist/services/memory-corrected-review-receipt.js +178 -0
- package/dist/services/memory-corrected-review-registration.js +192 -0
- package/dist/services/memory-correction-check-receipt.js +235 -0
- package/dist/services/memory-correction-input-owner.js +6 -0
- package/dist/services/memory-custody-snapshot.js +36 -0
- package/dist/services/memory-discover-handler.js +104 -0
- package/dist/services/memory-finish-evidence.js +457 -0
- package/dist/services/memory-finish-handler.js +229 -0
- package/dist/services/memory-finish-integration.js +450 -0
- package/dist/services/memory-finish-readiness.js +169 -0
- package/dist/services/memory-git-integration.js +220 -0
- package/dist/services/memory-historical-corrected-review.js +212 -0
- package/dist/services/memory-historical-original-review.js +143 -0
- package/dist/services/memory-historical-repair-registration.js +105 -0
- package/dist/services/memory-historical-second-review.js +147 -0
- package/dist/services/memory-init-bootstrap-readiness.js +210 -0
- package/dist/services/memory-init-contexts.js +131 -0
- package/dist/services/memory-init-controller-start.js +103 -0
- package/dist/services/memory-init-engine-release.js +223 -0
- package/dist/services/memory-init-git-policy.js +165 -0
- package/dist/services/memory-init-lint-capability.js +203 -0
- package/dist/services/memory-init-native-capacity.js +309 -0
- package/dist/services/memory-init-preflight.js +334 -0
- package/dist/services/memory-init-project-bootstrap.js +599 -0
- package/dist/services/memory-init-request-candidate.js +213 -0
- package/dist/services/memory-init-request-input.js +82 -0
- package/dist/services/memory-init-resource-storage.js +125 -0
- package/dist/services/memory-init-run-allocation.js +81 -0
- package/dist/services/memory-init-run-bundle.js +135 -0
- package/dist/services/memory-init-start.js +181 -0
- package/dist/services/memory-init-startup-custody.js +80 -0
- package/dist/services/memory-init-startup-input.js +240 -0
- package/dist/services/memory-init-storage.js +91 -0
- package/dist/services/memory-init-stores.js +359 -0
- package/dist/services/memory-init-worktrunk-capability.js +174 -0
- package/dist/services/memory-layer-publication.js +611 -0
- package/dist/services/memory-layer.js +221 -0
- package/dist/services/memory-lint-config.js +194 -0
- package/dist/services/memory-native-review-copy.js +103 -0
- package/dist/services/memory-normal-flow-entry.js +87 -0
- package/dist/services/memory-ordinary-defaults.js +129 -0
- package/dist/services/memory-preflight-bootstrap-custody.js +115 -0
- package/dist/services/memory-preflight-handler.js +274 -0
- package/dist/services/memory-repair-current-view.js +299 -0
- package/dist/services/memory-repair-document-delta.js +488 -0
- package/dist/services/memory-repair-history.js +496 -0
- package/dist/services/memory-repair-physical-binding.js +194 -0
- package/dist/services/memory-repair-publication-files.js +152 -0
- package/dist/services/memory-repair-publication-intent.js +27 -0
- package/dist/services/memory-repair-publication-plan.js +162 -0
- package/dist/services/memory-repair-publication-source.js +225 -0
- package/dist/services/memory-repair-publication.js +795 -0
- package/dist/services/memory-repair-registration.js +240 -0
- package/dist/services/memory-repair-work-baseline.js +415 -0
- package/dist/services/memory-repair-work-completion.js +117 -0
- package/dist/services/memory-repair-work-custody.js +73 -0
- package/dist/services/memory-repair-work-results.js +108 -0
- package/dist/services/memory-repair-workspace.js +261 -0
- package/dist/services/memory-repair-writer-copy.js +736 -0
- package/dist/services/memory-result-binding.js +239 -0
- package/dist/services/memory-retained-review-authority.js +138 -0
- package/dist/services/memory-retained-review-results.js +70 -0
- package/dist/services/memory-retained-second-baseline.js +102 -0
- package/dist/services/memory-retained-second-repairs.js +162 -0
- package/dist/services/memory-review-acceptance.js +214 -0
- package/dist/services/memory-review-correction-plan.js +206 -0
- package/dist/services/memory-review-handler.js +585 -0
- package/dist/services/memory-review-inputs.js +246 -0
- package/dist/services/memory-review-limits.js +10 -0
- package/dist/services/memory-review-receipt.js +180 -0
- package/dist/services/memory-review-registration.js +117 -0
- package/dist/services/memory-review-work-custody.js +126 -0
- package/dist/services/memory-review-work-input.js +91 -0
- package/dist/services/memory-review-work-results.js +95 -0
- package/dist/services/memory-second-corrected-review-inputs.js +167 -0
- package/dist/services/memory-second-correction-plan.js +77 -0
- package/dist/services/memory-second-repair-baseline.js +91 -0
- package/dist/services/memory-second-repair-launch.js +614 -0
- package/dist/services/memory-second-repair-registration.js +88 -0
- package/dist/services/memory-second-repair-source.js +187 -0
- package/dist/services/memory-second-review-acceptance.js +115 -0
- package/dist/services/memory-source-observations.js +117 -0
- package/dist/services/memory-stage-dispatch.js +65 -0
- package/dist/services/memory-stage-results.js +290 -0
- package/dist/services/memory-tool-probe.js +25 -0
- package/dist/services/memory-upgrade-analysis-handler.js +243 -0
- package/dist/services/memory-upgrade-bootstrap-readiness.js +251 -0
- package/dist/services/memory-upgrade-evidence.js +100 -0
- package/dist/services/memory-upgrade-inventory.js +442 -0
- package/dist/services/memory-upgrade-publication-custody.js +73 -0
- package/dist/services/memory-upgrade-publication.js +413 -0
- package/dist/services/memory-upgrade-selection.js +430 -0
- package/dist/services/memory-upgrade-start.js +60 -0
- package/dist/services/memory-upgrade-storage-readiness.js +340 -0
- package/dist/services/memory-verification-acceptance.js +156 -0
- package/dist/services/memory-verification-checks.js +317 -0
- package/dist/services/memory-verification-receipt.js +160 -0
- package/dist/services/memory-verify-handler.js +137 -0
- package/dist/services/memory-work-result-json.js +12 -0
- package/dist/services/memory-work-result-preparation.js +64 -0
- package/dist/services/merge-queue.js +228 -149
- package/dist/services/merge-server.js +163 -35
- package/dist/services/migrations.js +164 -114
- package/dist/services/model-catalog.js +109 -0
- package/dist/services/model-discovery.js +46 -0
- package/dist/services/native-daemon-history.js +50 -0
- package/dist/services/native-session-control.js +39 -0
- package/dist/services/operator-profiles.js +236 -0
- package/dist/services/physical-startup.js +45 -0
- package/dist/services/plan-runtime.js +26 -11
- package/dist/services/plans.js +28 -25
- package/dist/services/project-registry.js +97 -0
- package/dist/services/project-summary.js +1 -1
- package/dist/services/projects.js +17 -87
- package/dist/services/prompt-delivery.js +71 -0
- package/dist/services/prompts.js +28 -17
- package/dist/services/protocols.js +163 -87
- package/dist/services/provider-capacity.js +455 -0
- package/dist/services/recovery-observation-budget.js +121 -0
- package/dist/services/recovery-snapshot-database.js +588 -0
- package/dist/services/release-archive-producer.js +52 -0
- package/dist/services/release-archive.js +143 -0
- package/dist/services/release-cache.js +150 -0
- package/dist/services/release-compatibility.js +18 -0
- package/dist/services/release-download.js +67 -0
- package/dist/services/release-envelope.js +104 -0
- package/dist/services/release-manifest.js +45 -0
- package/dist/services/release-payload.js +114 -0
- package/dist/services/release-producer.js +63 -0
- package/dist/services/release-provenance.js +160 -0
- package/dist/services/release-registry.js +66 -0
- package/dist/services/release-source.js +194 -0
- package/dist/services/repair-intents.js +31 -0
- package/dist/services/repair-receipt.js +13 -0
- package/dist/services/review-copy.js +165 -0
- package/dist/services/review-deferral.js +23 -0
- package/dist/services/run-control-receipt.js +56 -0
- package/dist/services/run-control-worker.js +428 -0
- package/dist/services/run-control.js +1092 -0
- package/dist/services/run-controller-adapter.js +400 -0
- package/dist/services/run-controller-capture.js +186 -0
- package/dist/services/run-controller-process.js +205 -0
- package/dist/services/run-controller-recovery.js +295 -0
- package/dist/services/run-controller-state.js +97 -0
- package/dist/services/run-controller.js +1326 -0
- package/dist/services/run-engine-bindings.js +1 -1
- package/dist/services/run-fork.js +147 -0
- package/dist/services/run-health.js +149 -0
- package/dist/services/run-observations.js +152 -0
- package/dist/services/run-projection.js +22 -64
- package/dist/services/run-recovery-guard.js +107 -0
- package/dist/services/run-recovery-runtime.js +112 -0
- package/dist/services/run-recovery.js +456 -0
- package/dist/services/run-start-custody.js +189 -0
- package/dist/services/runs.js +1023 -246
- package/dist/services/runtime-budget.js +446 -0
- package/dist/services/runtime-command.js +43 -0
- package/dist/services/runtime-scope-capture.js +52 -0
- package/dist/services/runtime-scope-control.js +468 -0
- package/dist/services/runtime-scope-resume.js +605 -0
- package/dist/services/runtime-scope-stop.js +211 -0
- package/dist/services/runtime-scope-worker.js +314 -0
- package/dist/services/runtime-service.js +19 -14
- package/dist/services/schema-validation.js +10 -8
- package/dist/services/scope-writer-cleanup.js +27 -0
- package/dist/services/sessions.js +36 -91
- package/dist/services/setup.js +427 -0
- package/dist/services/stage-blocker.js +17 -7
- package/dist/services/stage-context.js +193 -19
- package/dist/services/stage-handlers.js +89 -0
- package/dist/services/stage-lifecycle.js +152 -116
- package/dist/services/stage-pause.js +202 -91
- package/dist/services/stage-report-renderer.js +234 -6
- package/dist/services/stage-work-graph.js +52 -0
- package/dist/services/tooling.js +41 -30
- package/dist/services/usage.js +49 -101
- package/dist/services/verification-matrix.js +393 -0
- package/dist/services/version-status.js +1 -1
- package/dist/services/vnext-code-review.js +235 -88
- package/dist/services/vnext-code.js +327 -226
- package/dist/services/vnext-contracts.js +10 -1
- package/dist/services/vnext-execution-profile.js +80 -5
- package/dist/services/vnext-fanout.js +355 -21
- package/dist/services/vnext-merge.js +332 -111
- package/dist/services/vnext-plan-review.js +287 -132
- package/dist/services/vnext-plan.js +228 -104
- package/dist/services/vnext-protocolize.js +533 -95
- package/dist/services/vnext-specify.js +123 -81
- package/dist/services/vnext-workspace-policy.js +7 -2
- package/dist/services/work-registry.js +1706 -200
- package/dist/services/workspace-bootstrap.js +53 -15
- package/dist/services/workspace-files.js +85 -0
- package/dist/services/worktrees.js +105 -48
- package/dist/shared/entity-references.js +1 -0
- package/dist/shared/errors.js +27 -0
- package/dist/storage/agent-output.js +26 -0
- package/dist/storage/data-preservation.js +65 -0
- package/dist/storage/database.js +930 -40
- package/dist/storage/foreign-key-transaction.js +39 -0
- package/dist/storage/immutable-input.js +45 -0
- package/dist/storage/import-guard.js +159 -0
- package/dist/storage/memory-upgrade-schema-bootstrap.js +38 -0
- package/dist/storage/native-cleanup.js +52 -0
- package/dist/storage/paired-writer-migration.js +424 -0
- package/dist/storage/paths.js +17 -4
- package/dist/storage/projection-lock.js +73 -0
- package/dist/storage/work-references.js +23 -0
- package/dist/storage/writer-contract.js +96 -0
- package/dist/storage/writer-migration.js +346 -0
- package/dist/storage/writer-restore.js +217 -0
- package/package.json +50 -13
- package/tools/create-canon-release.mjs +33 -0
- package/tools/probe-codex-history.mjs +37 -0
- package/tools/produce-hybrid-release.mjs +41 -0
- package/tools/repair-paused-run-status.mjs +84 -0
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
import { commandInputs, commandAliases, physicalPathOptions } from "./command-inputs.js";
|
|
2
|
+
import { runtimeOptionDescriptions } from "./command-option-descriptions.js";
|
|
3
|
+
const optionDescriptions = {
|
|
4
|
+
"intake-sha256": "SHA-256 of the exact original intake file bytes. Fresh execution verifies the bytes; replay compares the retained hash without reopening the original file.",
|
|
5
|
+
"stage-profile": "Repeatable stage=profile assignment for the six mb-init stages. Each stage may occur once; the selected profile ID or alias is frozen before dispatch.",
|
|
6
|
+
"work-profile": "Repeatable approved Work executor profile ID or alias. Explicit order is retained; duplicate profiles refuse.",
|
|
7
|
+
"git-route": "Explicit project Git integration route. Direct integration uses the integration branch checkout; feature_worktree uses an already assigned separate checkout.",
|
|
8
|
+
"integration-branch": "Explicit project integration branch, validated with Git before project publication. No branch is inferred from the current checkout.",
|
|
9
|
+
"detach": "Return the accepted managed-controller receipt without observing until completion. Disconnecting the observer never stops the controller.",
|
|
10
|
+
"harness": "Select one supported harness family. Static discovery checks executable presence, not authentication or model access; diagnostics require separate effect consent.",
|
|
11
|
+
"provider": "Exact provider namespace for model filtering or doctor observation binding, including namespaced IDs such as builtin:zai-coding-plan. An account binding requires --account-sha256; this selector does not authenticate credentials.",
|
|
12
|
+
"executable": "Explicit installed harness executable path, including paths with spaces. Resolves ambiguous installations without choosing an arbitrary PATH candidate. Discovery never executes it; probes require explicit effect flags.",
|
|
13
|
+
"state-dir": "Existing OpenCode server state directory for the selected doctor. Its daemon configuration must bind the selected executable; doctor does not start or stop an unrelated daemon. Not an executor profile or project directory.",
|
|
14
|
+
"model-observation-file": "Optional destination for a standalone model listing snapshot from the admitted doctor. Requires --provider and --account-sha256; operator scope is unverified. Artifact publication is explicit, separate from provider writes, and never proves account access. Must differ from --response-file.",
|
|
15
|
+
"save-profile-intent": "Explicit frozen dd-flow/profile-creation-intent@1 JSON file containing before/after settings, profile and default consent. Setup binds it to request identity, saves under revision CAS and reconciles exact replay. Conflicts with --skip-agent-setup; an additional selected profile must match. This file is not provider authorization.",
|
|
16
|
+
"set-default": "Explicitly select the newly created profile as global default in the same atomic settings write. Omission preserves the existing default. Does not change frozen RUN settings.",
|
|
17
|
+
"remove": "Remove the positional operator alias binding, not its target profile; conflicts with --target.",
|
|
18
|
+
"clear": "Clear the operator global default without removing profiles or changing project routing and frozen RUN snapshots.",
|
|
19
|
+
"allow-processes": "Explicit permission to execute installed diagnostic code. Version/doctor probes are opt-in; static discovery never requires this flag.",
|
|
20
|
+
"allow-services": "Permit the selected adapter doctor's possible service process effects. Does not authorize model Turns, a flow, or reuse of an unrelated service.",
|
|
21
|
+
"allow-credentials": "Permit possible credential reads by the installed diagnostic; no credentials or raw adapter output enter this command's result.",
|
|
22
|
+
"allow-writes": "Permit possible diagnostic temporary/runtime writes by installed code; not permission to modify project packs or RUN settings.",
|
|
23
|
+
"native-executable": "Absolute native ZCode executable for the selected ZCode ACP doctor; no ambient ZCODE_BIN fallback. Invalid for other families.",
|
|
24
|
+
"timeout-ms": "Timeout in milliseconds for the selected operation. Harness diagnostics accept 1..60000: version defaults to 3000 and doctor to 30000. Other commands retain their own operation timeout policy; this option is not a productive RUN inactivity policy.",
|
|
25
|
+
"seed-file": "Optional reviewed dd-flow/model-catalog@1 JSON input; default is the bundled seed. Seed-only entries cannot establish account access or runtime qualification.",
|
|
26
|
+
"observation-file": "Explicit regular-file model listing snapshot; requires --harness, --provider and --account-sha256. Foreign scopes are ignored; malformed or secret-bearing fields refuse. No live listing is started.",
|
|
27
|
+
"account-sha256": "Opaque 64-character lowercase SHA-256 account binding, never an account name, token or credential path. Requires --harness and --provider; does not authenticate the account.",
|
|
28
|
+
"canon-source": "Explicit local signed release bundle or HTTPS envelope URL. Remote archives must use the same origin; trust comes only from --trust-file. Exclusive with --canon-version.",
|
|
29
|
+
"canon-version": "Exact canon release version in the selected channel of the operator release registry; exclusive with --canon-source. Omission selects the registry's explicit channel default.",
|
|
30
|
+
"release-registry": "Operator dd-flow/release-registry@1 JSON selector; default is DD_FLOW_RELEASE_REGISTRY or release-registry.json in DD_FLOW_HOME. Registry entries never enroll signing keys.",
|
|
31
|
+
"trust-file": "Explicit operator dd-flow/release-trust@1 file; release bytes cannot enroll their own signing key.",
|
|
32
|
+
"channel": "Selected release channel; preview and development must be requested explicitly.",
|
|
33
|
+
"skip-agent-setup": "Install without selecting or configuring an executor; conflicts with --profile.",
|
|
34
|
+
"non-interactive": "Never request interactive input; a missing executor selection fails unless agent setup is explicitly skipped.",
|
|
35
|
+
"project-root": "Stable repository identity; not the assigned feature workspace.",
|
|
36
|
+
"workspace-root": "Concrete assigned checkout used for this operation.",
|
|
37
|
+
"workspace-path": "Concrete assigned checkout; does not change project identity.",
|
|
38
|
+
"root": "Explicit root for the selected command; prevents implicit root discovery.",
|
|
39
|
+
"run": "Exact retained RUN identity; its frozen execution settings remain authoritative.",
|
|
40
|
+
"reason": "Operator explanation retained with the requested change.",
|
|
41
|
+
"request-id": "Stable request identity for reconciliation and idempotent retry.",
|
|
42
|
+
"request-key": "Stable exact-request replay identity; changed inputs or missing independent custody refuse rather than allocate again. The owning command defines scope and syntax.",
|
|
43
|
+
"expected-revision": "Required current revision; stale changes are rejected instead of overwriting concurrent edits.",
|
|
44
|
+
"profile": "Explicit configured profile identifier; credentials are not stored in profiles.",
|
|
45
|
+
"profile-file": "Complete validated executor profile; exclusive with --profile and --skip-agent-setup. Does not change operator defaults.",
|
|
46
|
+
"agent-profile": "Explicit configured executor profile; no automatic model selection.",
|
|
47
|
+
"force": "Explicit force request; does not bypass ownership, compatibility or authorization gates.",
|
|
48
|
+
"offline": "Explicit drained/offline operation; does not establish physical settlement by itself."
|
|
49
|
+
};
|
|
50
|
+
/** Option names alone are insufficient when different commands own different inputs. */
|
|
51
|
+
const memoryRepairOptions = {
|
|
52
|
+
run: "Active registered mb-init review RUN; retained correction graph and frozen execution own every repair operation.",
|
|
53
|
+
wave: "Exact causal correction wave 1 or 2; never falls back to another wave or permits a third wave.",
|
|
54
|
+
work: "Exact registered repair Work in the selected correction wave; foreign Work and generation custody refuse.",
|
|
55
|
+
"workspace-root": "Shared frozen RUN workspace, not the private repair copy; independent source and scope custody remain required.",
|
|
56
|
+
"work-session": "Exact independently started repair WorkSession; this command never creates or claims a provider Session."
|
|
57
|
+
};
|
|
58
|
+
const memoryInitOptions = {
|
|
59
|
+
"prepare-only": "Prepare or replay the frozen Memory RUN and project bootstrap without launching a controller or provider Session. This publishes project/runtime state; it is not a dry run. Use run drive launch with the returned RUN to select bounded observation/capture. Exclusive with --detach; replay never stops an existing controller.",
|
|
60
|
+
"profile-file": "Absolute regular JSON file with one complete validated operation-only executor profile. Exclusive with --profile; never saves settings or changes defaults. Omit on replay to reuse frozen bytes; supplied profile content must match the original selection.",
|
|
61
|
+
"non-interactive": "Never open the first-flow executor dialog, even on a terminal. Without an explicit profile/file or configured default, refuse before project effects; init cannot skip its executor."
|
|
62
|
+
};
|
|
63
|
+
const commandOptionDescriptions = {
|
|
64
|
+
"flow mb-audit": {
|
|
65
|
+
"project-root": "Canonical absolute project identity. The runtime creates an isolated read-only source snapshot; neither the project nor its Memory Bank is a write destination.",
|
|
66
|
+
"intake-file": "Bounded UTF-8 original diagnostic request, including audit mode/focus and constraints. Required for a fresh request; optional on exact replay, where supplied bytes must match.",
|
|
67
|
+
"stage-profile": "Repeatable preflight/audit/review/report=profile override. Each stage may occur once and all profiles are frozen before dispatch.",
|
|
68
|
+
"prepare-only": "Retain the request, source snapshot and RUN without starting its controller or provider Sessions. Runtime state is created; this is not a dry run.",
|
|
69
|
+
"max-parallel": "External Work concurrency from 1 to 64; default 1. Never claims native child qualification."
|
|
70
|
+
},
|
|
71
|
+
"flow project-review": {
|
|
72
|
+
"project-root": "Canonical absolute project identity, assessed through an isolated read-only snapshot. Findings never authorize implicit repair.",
|
|
73
|
+
"intake-file": "Bounded UTF-8 original project-conformance review request and focus. Required fresh; supplied replay bytes must match the retained objective.",
|
|
74
|
+
"stage-profile": "Repeatable preflight/analyze/review/report=profile override. This is project review, not the SDLC CODE-REVIEW stage.",
|
|
75
|
+
"prepare-only": "Retain the request, source snapshot and RUN without launching a controller or provider Sessions. Not a dry run.",
|
|
76
|
+
"max-parallel": "External Work concurrency from 1 to 64; default 1."
|
|
77
|
+
},
|
|
78
|
+
"flow mb-init": memoryInitOptions,
|
|
79
|
+
init: memoryInitOptions,
|
|
80
|
+
"flow mb-upgrade": { ...memoryInitOptions, "stage-profile": "Repeatable stage=profile assignment for preflight, diff-analysis, upgrade, verify, review or finish. The original selection is frozen before dispatch.", "prepare-only": "Prepare or replay the upgrade RUN and accepted storage/bootstrap selection without launching its controller or a productive Session. This is not a dry run; it does not publish the upgraded canonical layer or accept semantic preservation." },
|
|
81
|
+
upgrade: { ...memoryInitOptions, "stage-profile": "Repeatable stage=profile assignment for preflight, diff-analysis, upgrade, verify, review or finish. The original selection is frozen before dispatch.", "prepare-only": "Prepare or replay the upgrade RUN and accepted storage/bootstrap selection without launching its controller or a productive Session. This is not a dry run; it does not publish the upgraded canonical layer or accept semantic preservation." },
|
|
82
|
+
"runtime storage admit": { operation: "Operation-specific writable-connection admission: memory-init or memory-upgrade. Upgrade also checks retained request storage. Requires explicit canonical DD_FLOW_HOME and an existing compatible resource registry. Never initializes, migrates, repairs or starts agents." },
|
|
83
|
+
"runtime storage qualify": { operation: "memory-upgrade only. Qualify the selected engine before a native probe. Incompatible drained stores are copied privately with committed WAL; the actual transition and operation admission run on those copies. Requires both explicit canonical Homes. Never migrates real stores, grants productive admission, creates a RUN or starts agents." },
|
|
84
|
+
"runtime flow admit": { operation: "Handler admission for memory-init or memory-upgrade in the executing engine. Reads bounded UTF-8 JSON stdin with source and source_sha256; memory-init additionally accepts startup_input_schema to require its startup reader. Validates the matching six-stage descriptor using actual registered handlers. Does not establish release trust, storage/provider readiness or semantic completion, and never creates Home, RUN or agents." },
|
|
85
|
+
"profiles create": { file: "Regular UTF-8 JSON file containing one complete validated agent profile. The ID must be unused. Credentials and unknown fields are refused; creation uses --expected-revision and never starts a model Turn." },
|
|
86
|
+
"profiles edit": { file: "Regular UTF-8 JSON file containing the complete replacement agent profile, not a patch. Its ID must already exist. Revision conflicts refuse the edit; retained RUN snapshots are unchanged." },
|
|
87
|
+
"profiles alias": {
|
|
88
|
+
target: "Existing canonical profile ID for the positional alias. Aliases cannot chain or collide with profile IDs. Supply exactly one of --target or --remove, plus --expected-revision.",
|
|
89
|
+
remove: "Remove the positional alias, not its target profile. Exclusive with --target. The revision-checked change does not rewrite retained RUN settings."
|
|
90
|
+
},
|
|
91
|
+
"profiles set-default": { clear: "Clear only the operator global default. Exclusive with a positional profile ID or alias; existing profiles, project routing and frozen RUN settings remain unchanged." },
|
|
92
|
+
"work add-batch": {
|
|
93
|
+
file: "Validated Work batch JSON file declaring children of --parent, including their task and dependency inputs. Adding logical Work does not launch physical Sessions.",
|
|
94
|
+
stage: "Explicit owner stage. With --request-key it must be the active running coordinator stage; attempt and cycle are resolved from retained RUN authority.",
|
|
95
|
+
"request-key": "Stable registration ID (1..96 letters, digits, dots, underscores or hyphens, starting with a letter or digit). Requires --stage. Identical replay returns the retained Work IDs; changed input or missing custody refuses allocation. Without this option the historical non-replayable batch behavior is retained."
|
|
96
|
+
},
|
|
97
|
+
"schema validate": { file: "JSON document to validate against --schema in the selected schema directory. Validation does not execute a flow or accept semantic completion." },
|
|
98
|
+
"migration verify": { file: "Existing dd-flow/mb-upgrade-migration-report@1 JSON report to verify against migration evidence; verification does not apply a storage migration." },
|
|
99
|
+
"migration readiness": {
|
|
100
|
+
"request-id": "Stable upgrade request ID. Retains a physically verified content-only storage proof; identical replay reuses it and changed inputs refuse. Does not create a RUN, sync content or migrate stores.",
|
|
101
|
+
"workspace-root": "Existing canonical absolute assigned workspace. Recorded with the project and request; this storage-only operation does not establish Git/workspace eligibility for the full upgrade.",
|
|
102
|
+
"project-root": "Registered active project requiring a complete release-impact chain and valid current provenance. Existing compatible run/resource stores are mandatory; this command never initializes or repairs them. Explicit mb-upgrade mode is required."
|
|
103
|
+
},
|
|
104
|
+
"migration apply": { file: "Explicit migration report JSON file used for admission to the requested apply operation; backup and ownership gates remain mandatory." },
|
|
105
|
+
"prompt render": { profile: "Prompt profile name required by the assigned Work execution context; not an operator executor profile ID or a Codex home profile." },
|
|
106
|
+
"runtime process register": { harness: "Harness family associated with the registered process/budget; registration is not a discovery or doctor probe.", "state-dir": "Adapter runtime state directory retained with the physical process for later ownership/admission checks." },
|
|
107
|
+
"runtime process admission": { "state-dir": "Exact adapter runtime state directory matching the confirmed process record; mismatched ownership refuses provider admission." },
|
|
108
|
+
"runtime process release-turn": { "observation-file": "Provider turn release observation file for the selected daemon/operation budget. This is not a model inventory snapshot or account listing." },
|
|
109
|
+
"runtime scope control": { mode: "Recoverable scope control intent: pause or stop. Drain/settlement remains pending until owned physical evidence is confirmed." },
|
|
110
|
+
"merge request route": { mode: "Route this MERGE request through same_session or server; selected execution policy and workspace admission still apply." },
|
|
111
|
+
"worktree close": { mode: "keep retains the feature checkout; remove requests its guarded removal. Dirty or foreign worktrees must not be silently discarded." },
|
|
112
|
+
"codex home remove": { mode: "keep-shared preserves shared state; remove-owned removes only the verified project-owned home entries.", profile: "Isolated project Codex home profile name, not an executor agent-profile ID." },
|
|
113
|
+
"codex home plan": { profile: "Isolated project Codex home profile name, not an executor agent-profile ID." },
|
|
114
|
+
"codex home init": { profile: "Isolated project Codex home profile name, not an executor agent-profile ID." },
|
|
115
|
+
"codex home status": { profile: "Isolated project Codex home profile name, not an executor agent-profile ID." },
|
|
116
|
+
"codex home print-env": { profile: "Isolated project Codex home profile name, not an executor agent-profile ID." },
|
|
117
|
+
"codex hooks print": { target: "Hook installation target: isolated (default) or default Codex home. Printing does not install hooks.", profile: "Project Codex home profile used to locate isolated hooks; not an executor profile." },
|
|
118
|
+
"codex hooks status": { target: "Hook installation target: isolated (default) or default Codex home. Status does not install hooks.", profile: "Project Codex home profile used to locate isolated hooks; not an executor profile." },
|
|
119
|
+
"codex hooks install": { target: "Hook installation target: isolated (default) or default Codex home; mutation also requires explicit confirmation.", profile: "Project Codex home profile used to locate isolated hooks; not an executor profile." },
|
|
120
|
+
"codex hooks remove": { target: "Hook installation target: isolated (default) or default Codex home; removal also requires explicit confirmation.", profile: "Project Codex home profile used to locate isolated hooks; not an executor profile." },
|
|
121
|
+
"protocol sync-from-run": { target: "Protocol state target derived from the selected RUN; auto uses the command's supported state mapping." },
|
|
122
|
+
"run reconcile": {
|
|
123
|
+
apply: "Persist the observed RUN health under its current ownership and revision fences. Without this switch, report only; never launch, resume or stop a provider.",
|
|
124
|
+
"no-progress-ms": "Override the health-assessment progress-age threshold in milliseconds; integer at least 1000. Defaults are 120000 for starting, 300000 for capturing and 1800000 otherwise. This is not a productive command timeout or permission to stop a live owner."
|
|
125
|
+
},
|
|
126
|
+
"run fork": { from: "Existing retained snapshot path to fork into a new RUN with the explicitly selected engine; not a control request identity." },
|
|
127
|
+
"run control resume": { from: "Exact retained pause/stop control ID whose captured state authorizes this resume request; not a snapshot path." },
|
|
128
|
+
"stage block": { kind: "Blocker category: engine, harness or environment; code and summary identify the actionable cause." },
|
|
129
|
+
"migration impact": { mode: "Optional full_migration request forces the strict full-migration assessment; otherwise impact evidence determines patch, targeted_minor or full_migration." },
|
|
130
|
+
"runtime storage transition": {
|
|
131
|
+
"selection-sha256": "Exact independently retained full upgrade selection; checked before any storage effect. Commands issued by the selected engine include this value.",
|
|
132
|
+
action: "Selected frozen engine transport: plan retains the pair; apply performs its explicit cutover; status observes it. recovery-plan selects and fences separate recovery; recover executes it; recovery-status observes recovery. No command starts a model or RUN.",
|
|
133
|
+
"expected-sha256": "Exact retained migration request SHA for apply/status/recovery-plan, or retained recovery request SHA for recover/recovery-status. Not a fresh selector or permission to replace a request.",
|
|
134
|
+
"recovery-id": "Explicit recovery identity (1..86 safe ASCII characters); required only for recovery-plan. Recovery aborts the original apply.",
|
|
135
|
+
offline: "Required for apply, recovery-plan and recover after all local/external writers are drained. The engine independently checks registered logical and physical owners; it never kills them.",
|
|
136
|
+
"project-root": "Original retained upgrade project identity. No project or database is initialized by this transport.",
|
|
137
|
+
"workspace-root": "Original assigned upgrade workspace; must match the frozen request.",
|
|
138
|
+
"request-id": "Original upgrade request identity; the engine and migration files come only from that request."
|
|
139
|
+
},
|
|
140
|
+
"memory permissions preflight": { mode: "Permission contour to check: read, write, repair or report_only; write checks may create temporary permission probes.", flow: "Workflow permission contour: mb-init, mb-upgrade, mb-audit, mb-fix, mb-upgrade-review or custom. Not a filesystem path." },
|
|
141
|
+
"memory compose register": { "run": "Active mb-init or mb-upgrade RUN whose accepted discovery/diff-analysis and immutable execution bind the composition graph.", "request-key": "Stable composition registration identity; exact replay retains the original Work graph.", "result-file": "Bounded proposed composition JSON. Bytes are prepared before registration; agent fields do not grant Work or write authority." },
|
|
142
|
+
"memory upgrade publish": { run: "Active mb-upgrade authoring Stage with a registered blueprint and settled Work. Apply only its retained canonical publication plan and recovery archive; this does not accept the Stage or complete the RUN." },
|
|
143
|
+
"memory verify checks": { "run": "Active mb-init or mb-upgrade RUN. Execute only its independently selected declared verification checks." },
|
|
144
|
+
"memory review register": { "run": "Active mb-init or mb-upgrade RUN with accepted verification. Register initial independent reviewers; this does not launch providers." },
|
|
145
|
+
"memory review collect": { "run": "Active mb-init or mb-upgrade RUN. Collect genuine registered initial-wave results without accepting the Stage or granting correction authority." },
|
|
146
|
+
"memory finish evidence": { "run": "Active mb-init or mb-upgrade finish RUN. Publish independently prepared coverage, integration and readiness evidence; publication does not complete Stage or RUN." },
|
|
147
|
+
"memory finish integrate": { "run": "Active mb-init or mb-upgrade finish RUN. Commit only accepted Memory Bank and owned lint files under retained Git policy, then integrate the admitted workspace locally. Preserve unrelated staged/dirty files; never push. Lost-response replay observes the original effects without another commit." },
|
|
148
|
+
"memory corrections register": { run: "Active mb-init or mb-upgrade review RUN. Register only the correction plan bound to the independently retained preceding review.", wave: "Correction wave 1 follows initial review; wave 2 requires settled first selective review. A third wave is unsupported.", "result-file": "Bounded correction-plan JSON prepared before graph registration; exact retained replay cannot substitute another plan." },
|
|
149
|
+
"memory corrections checks": { run: "Active mb-init or mb-upgrade review RUN with a genuinely settled correction view.", wave: "Run only the independently selected finite check profile for correction wave 1 or 2; this does not accept semantic quality." },
|
|
150
|
+
"memory review selective-register": { run: "Active mb-init or mb-upgrade review RUN. Allocate selective reviewers only after their wave's committed checks.", wave: "Select correction wave 1 or 2. Unaffected accepted units remain retained; registration does not launch providers." },
|
|
151
|
+
"memory review selective-collect": { run: "Active mb-init or mb-upgrade review RUN. Return genuine selective reviewer references, not Stage or RUN acceptance.", wave: "Select independently registered review of correction wave 1 or 2; missing wave custody never falls back to initial review." },
|
|
152
|
+
"memory repair baseline": { ...memoryRepairOptions, work: "Register the immutable prelaunch baseline for this repair Work; dependent/peer changes require explicit current-view registration first. Does not launch providers." },
|
|
153
|
+
"memory repair copy-reserve": { ...memoryRepairOptions, work: "Reserve the owned private copy for this repair Work after its committed baseline; reservation does not create the copy or launch providers." },
|
|
154
|
+
"memory repair copy-materialize": { ...memoryRepairOptions, work: "Materialize the reserved private copy for this repair Work with retained build/ready receipts; no provider launch or shared document publication." },
|
|
155
|
+
"memory repair copy-dispatch": { ...memoryRepairOptions, work: "Prepare the frozen profile and verified ready-copy root for this repair Work. Read-only packet output does not launch a provider, claim a Session or replace fresh launcher custody checks." },
|
|
156
|
+
"memory repair current-view": { ...memoryRepairOptions, work: "Retain the explained settled-peer input view for this repair Work; does not replace an existing immutable baseline or grant launch authority." },
|
|
157
|
+
"memory repair publication-source": { ...memoryRepairOptions, wave: "Wave 1 only: retain independently explained shared publication source before reserving output. Wave 2 uses its separate retained launch owner." },
|
|
158
|
+
"memory repair publication-reserve": { ...memoryRepairOptions, "result-file": "Bounded exact private repair result bytes prepared before dispatch. Reserve the independently validated delta only; wave 1 requires a previously registered publication-source." },
|
|
159
|
+
"memory repair publication-apply": { ...memoryRepairOptions, work: "Apply or reconcile one retained publication action for this repair Work; repeat until physical publication completes. Unknown effect never authorizes blind retry." },
|
|
160
|
+
"memory repair publication-finish": { ...memoryRepairOptions, work: "Settle this repair Work only after independently proven physical publication completion; does not accept semantic review or finish Stage/RUN." }
|
|
161
|
+
};
|
|
162
|
+
export const globalOptionDocumentation = [
|
|
163
|
+
{ name: "help", description: "Show help before command preparation or resource access; -h is equivalent.", kind: "switch", required: false, repeatable: false, choices: [], physical_path: false },
|
|
164
|
+
{ name: "option", description: "Help-only selector for one option; accepts name or --name.", kind: "value", required: false, repeatable: false, choices: [], physical_path: false },
|
|
165
|
+
{ name: "json", description: "Emit structured JSON rather than human text.", kind: "switch", required: false, repeatable: false, choices: [], physical_path: false },
|
|
166
|
+
{ name: "progress-jsonl", description: "Emit machine-readable progress events during command execution.", kind: "switch", required: false, repeatable: false, choices: [], physical_path: false },
|
|
167
|
+
{ name: "response-file", description: "Execution-only response destination; help never opens or writes it.", kind: "value", required: false, repeatable: false, choices: [], physical_path: true }
|
|
168
|
+
];
|
|
169
|
+
export function optionsForCommand(input, command) {
|
|
170
|
+
return [...new Set([...input.values, ...input.switches])].map(name => ({
|
|
171
|
+
name,
|
|
172
|
+
description: optionDescription(name, command),
|
|
173
|
+
kind: input.switches.includes(name) ? "switch" : "value",
|
|
174
|
+
required: input.required.includes(name), repeatable: input.repeatable.includes(name),
|
|
175
|
+
choices: input.enums[name] ?? [], physical_path: physicalPathOptions.has(name) && name !== "flow" && name !== "stage"
|
|
176
|
+
}));
|
|
177
|
+
}
|
|
178
|
+
function optionDescription(name, command) {
|
|
179
|
+
const description = (command ? commandOptionDescriptions[command]?.[name]
|
|
180
|
+
?? commandOptionDescriptions[commandAliases[command] ?? command]?.[name] : undefined) ?? optionDescriptions[name] ?? runtimeOptionDescriptions[name];
|
|
181
|
+
if (!description)
|
|
182
|
+
throw new Error(`Missing CLI option documentation: ${command ?? "inventory"} --${name}`);
|
|
183
|
+
return description;
|
|
184
|
+
}
|
|
185
|
+
/** Shared help/completion option set for a route, family or root catalog. */
|
|
186
|
+
export function optionsForCommandTree(command) {
|
|
187
|
+
const options = new Map(globalOptionDocumentation.map(option => [option.name, option]));
|
|
188
|
+
for (const [key, input] of Object.entries(commandInputs)) {
|
|
189
|
+
if (!command || key === command || key.startsWith(`${command} `)) {
|
|
190
|
+
for (const option of optionsForCommand(input, key))
|
|
191
|
+
options.set(option.name, option);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
return [...options.values()].sort((left, right) => left.name.localeCompare(right.name, "en"));
|
|
195
|
+
}
|
|
196
|
+
/** One exact native routing classification shared by router and compatibility admission. */
|
|
197
|
+
export function routerNativeRoute(key) {
|
|
198
|
+
return key === "version" || key.startsWith("engine ") || key === "schema validate"
|
|
199
|
+
|| key === "flow list" || key === "flow show" || key === "flow mb-init" || key === "init" || key === "flow mb-upgrade" || key === "upgrade"
|
|
200
|
+
|| key === "flow mb-audit" || key === "flow project-review" || key === "review"
|
|
201
|
+
|| key === "run reconcile" || key === "runtime storage admit" || key === "runtime storage qualify" || key === "runtime storage transition"
|
|
202
|
+
|| key === "runtime flow admit"
|
|
203
|
+
|| key.startsWith("profiles ") || key.startsWith("models ") || key.startsWith("harnesses ") || key.startsWith("completion ") || key === "setup" || key.startsWith("setup ")
|
|
204
|
+
|| key === "storage migrate-writer" || key === "codex hook handle"
|
|
205
|
+
|| key === "zcode hook handle" || key === "zcode invocation prepare"
|
|
206
|
+
|| /^(zcode|grok|droid|opencode|agy) (event handle|usage ingest)$/.test(key);
|
|
207
|
+
}
|
|
208
|
+
export function commandKeyForPositions(positions) {
|
|
209
|
+
return Object.keys(commandInputs).filter(key => key.split(" ").every((part, index) => positions[index] === part))
|
|
210
|
+
.sort((a, b) => b.split(" ").length - a.split(" ").length)[0];
|
|
211
|
+
}
|
|
212
|
+
/** Best matching help topic for rejected argv; never validates or executes it.
|
|
213
|
+
* Option values and literal passthrough cannot impersonate a command path.
|
|
214
|
+
*/
|
|
215
|
+
export function commandHelpTopic(args, fallback) {
|
|
216
|
+
const switches = new Set([...globalOptionDocumentation.filter(option => option.kind === "switch").map(option => option.name),
|
|
217
|
+
...Object.values(commandInputs).flatMap(input => input.switches)]);
|
|
218
|
+
const positions = [];
|
|
219
|
+
for (let index = 0; index < args.length; index++) {
|
|
220
|
+
const arg = args[index];
|
|
221
|
+
if (arg === "--")
|
|
222
|
+
break;
|
|
223
|
+
if (arg.startsWith("--")) {
|
|
224
|
+
const name = arg.slice(2).split("=", 1)[0];
|
|
225
|
+
if (!arg.includes("=") && !switches.has(name) && args[index + 1] && !args[index + 1].startsWith("-"))
|
|
226
|
+
index++;
|
|
227
|
+
}
|
|
228
|
+
else if (!arg.startsWith("-"))
|
|
229
|
+
positions.push(arg);
|
|
230
|
+
}
|
|
231
|
+
return commandKeyForPositions(positions) ?? fallback;
|
|
232
|
+
}
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
/** Reviewed meanings for existing runtime options. Grammar owns requiredness,
|
|
2
|
+
* repetition and enumerations; these descriptions do not grant effect authority.
|
|
3
|
+
*/
|
|
4
|
+
export const runtimeOptionDescriptions = {
|
|
5
|
+
"acquire-lock": "Boolean: acquire the workspace lane lock when claiming the next merge job; waiting alone does not grant ownership.",
|
|
6
|
+
"adapter-executable": "Executable path retained with the registered adapter process for ownership and later reconciliation.",
|
|
7
|
+
after: "Timeline cursor for controller status; return observations after this sequence number.",
|
|
8
|
+
alias: "Additional report alias to retain with the completed stage; repeat for multiple aliases.",
|
|
9
|
+
all: "Refresh dashboards for all selected projects rather than only the current project.",
|
|
10
|
+
"allow-downgrade": "Explicitly permit lowering flow flags during a revision-checked change; other admission gates still apply.",
|
|
11
|
+
"answer-file": "File containing the user's answer for the selected paused stage or drive request; not a replacement task or execution policy.",
|
|
12
|
+
"answer-stdin": "Read the stage answer from standard input instead of --answer-file.",
|
|
13
|
+
apply: "Apply the proposed project-ID migration; without this switch the command remains a preview.",
|
|
14
|
+
"available-slots": "Record available native delegation capacity as an integer from 0 through 15; capacity is not proof of child settlement.",
|
|
15
|
+
"max-parallel": "Freeze the Work concurrency limit (external integer 1..256; explicit native 1..15). Omit on replay to retain the original selection; native capacity requires an authorized technical probe and never overrides runtime budgets or Work dependencies.",
|
|
16
|
+
"delegation": "Select external Work sessions (default) or explicit native children. Native fresh init requires --allow-live-probe; it cannot switch worker profiles.",
|
|
17
|
+
"allow-live-probe": "Authorize this request's bounded technical native child probe outside the RUN. It can incur provider usage; unknown effects retain exact operation custody and never restart fan-out.",
|
|
18
|
+
"native-config-home": "Optional absolute provider configuration home for native qualification. Otherwise preserve normal harness authentication and configuration. The CLI never copies or links credentials or rewrites operator configuration.",
|
|
19
|
+
backup: "New absolute backup destination for the explicitly drained database; an existing backup is never overwritten.",
|
|
20
|
+
"backup-created-at": "Timestamp of the retained backup used as migration evidence; must agree with the selected migration inputs.",
|
|
21
|
+
"backup-path": "Path to the retained backup bound into migration planning, reporting or application evidence.",
|
|
22
|
+
base: "Git base reference from which the requested feature worktree is created.",
|
|
23
|
+
bootstrap: "Request the supported initial stage bootstrap rather than starting a stage on an existing RUN; still requires declared intake and admission.",
|
|
24
|
+
branch: "Git branch assigned to the selected workspace or worker; a branch name does not itself authorize creation or merge.",
|
|
25
|
+
"budget-json": "Inline JSON declaration of runtime process budget; validated by the process owner before registration.",
|
|
26
|
+
"cancel-queue": "Boolean: cancel protocol queue entries as part of cancellation; does not silently settle running workers.",
|
|
27
|
+
candidate: "Mark the created snapshot as a recovery candidate rather than claiming accepted restoration.",
|
|
28
|
+
"capture-key": "Exact retained capture digest selecting the recovery state for the requested scope generation.",
|
|
29
|
+
"capture-path": "Destination for the selected RUN recovery capture; capture is distinct from accepting recovery.",
|
|
30
|
+
"capture-root": "Root directory for controller recovery captures associated with this drive request.",
|
|
31
|
+
check: "Check identity associated with a registered runtime process, preserving its ownership scope.",
|
|
32
|
+
"check-ref": "Retained check evidence reference motivating repair Work; repeat to bind multiple checks.",
|
|
33
|
+
"check-registry": "Include project registry consistency diagnostics in status; does not repair the registry.",
|
|
34
|
+
"close-sessions": "Boolean: request closing protocol Sessions during cancellation; physical completion requires separate evidence.",
|
|
35
|
+
code: "Stable diagnostic code for the engine, harness or environment blocker being recorded.",
|
|
36
|
+
command: "Command to launch as the owned runtime service, with declared ports and readiness checks.",
|
|
37
|
+
"context-file": "Prepared context file for the selected stage/controller request; its bytes must match --context-sha256.",
|
|
38
|
+
"context-sha256": "SHA-256 of the exact --context-file bytes, preventing substitution of prepared context.",
|
|
39
|
+
"control-id": "Retained RUN control request identity used by its owner or reconciliation command.",
|
|
40
|
+
"controller-id": "Retained drive controller identity; does not create an unrelated controller or bypass ownership.",
|
|
41
|
+
"daemon-id": "Selected provider daemon identity for scoped admission or recovery; not a request to start an arbitrary daemon.",
|
|
42
|
+
dashboard: "Dashboard artifact path associated with the completed stage.",
|
|
43
|
+
data: "Stage data artifact path supplied for validation and completion; its applicable schema is independently selected.",
|
|
44
|
+
"data-schema-id": "Registered schema identity for the stage data artifact; selecting a schema is not semantic acceptance.",
|
|
45
|
+
database: "Existing absolute SQLite database path to migrate; the command does not initialize a missing runtime database.",
|
|
46
|
+
"decision-file": "Retained stage decision artifact required by the selected finish contract.",
|
|
47
|
+
dir: "Stage artifact directory selected for attachment or lifecycle processing; must satisfy the selected stage's layout contract.",
|
|
48
|
+
"dispatch-barrier": "Retained dispatch barrier associated with the registered runtime process; not proof of productive admission.",
|
|
49
|
+
"engine-version": "Exact installed engine version selected for legacy binding recovery or a requested RUN fork.",
|
|
50
|
+
escalate: "Escalation policy for an owned pause/stop operation; does not authorize stopping unrelated processes.",
|
|
51
|
+
event: "Hook event name identifying the Codex event being handled; hook payload is validated separately.",
|
|
52
|
+
evidence: "Evidence reference supporting a completed plan item; repeat to retain multiple references.",
|
|
53
|
+
"execution-routing-file": "Validated execution routing JSON file used for the selected RUN creation or restoration; retained RUN profiles remain frozen.",
|
|
54
|
+
file: "JSON input file consumed by this command's declared validator; see the exact command topic for its contract.",
|
|
55
|
+
flag: "Explicit flow flag assignment for creation or revision; repeat for multiple assignments. Revision and policy gates still apply.",
|
|
56
|
+
flow: "Memory workflow whose permissions are checked; preflight does not execute that workflow.",
|
|
57
|
+
"flow-kind": "Flow kind recorded when creating the RUN; a label alone cannot register handlers or admit execution.",
|
|
58
|
+
format: "Dashboard output format; rendering and opening follow the selected command's supported formats.",
|
|
59
|
+
from: "Retained source identity for a fork or resume; its meaning is specified by the exact command topic.",
|
|
60
|
+
"from-check": "Check identity causing the repair Work, preserving traceability to the failed check.",
|
|
61
|
+
"from-finding": "Review finding identity motivating repair Work; repeat for multiple findings.",
|
|
62
|
+
"from-unresolved": "Unresolved issue identity motivating repair Work; repeat for multiple issues.",
|
|
63
|
+
generation: "Exact runtime scope generation; stale generations cannot admit recovery or new dispatch.",
|
|
64
|
+
global: "Read global dashboard data rather than one project dashboard.",
|
|
65
|
+
"grace-ms": "Grace period in milliseconds for an owned process or control stop before reconciliation/escalation.",
|
|
66
|
+
"group-by": "Usage aggregation dimension; grouping does not change source-backed usage evidence.",
|
|
67
|
+
hide: "Timeline event category to hide from the displayed view; repeat for multiple categories. Retained events are not deleted.",
|
|
68
|
+
"hook-event-id": "Trusted hook event identity binding this lifecycle invocation to its physical event.",
|
|
69
|
+
id: "Exact runtime process registry identity targeted by registration, lease operations or admission.",
|
|
70
|
+
"idempotency-key": "Stable flow-flag revision request key; retry the exact same change rather than applying it twice.",
|
|
71
|
+
"include-results": "Include retained Work result projections in the listing; listing remains an observation, not acceptance.",
|
|
72
|
+
incomplete: "Permit creation of an explicitly incomplete recovery snapshot; does not qualify it as a restorable complete snapshot.",
|
|
73
|
+
"intake-file": "File containing the raw user intake for initial stage bootstrap; do not replace it with an inferred solution.",
|
|
74
|
+
"intake-stdin": "Read raw bootstrap intake from standard input instead of --intake-file.",
|
|
75
|
+
"integrity-checksum": "Expected retained engine integrity checksum, checked independently of its version label.",
|
|
76
|
+
"interruption-json": "Inline JSON interruption evidence opening the selected RUN recovery attempt.",
|
|
77
|
+
"invocation-id": "Exact retained lifecycle invocation identity; syntax alone does not establish generation, ownership or authorization.",
|
|
78
|
+
"json-file": "JSON transition payload file; an alternative to the transition payload-file input.",
|
|
79
|
+
key: "Configuration or RUN variable key selected for reading or writing; supported configuration keys are validated by the owner.",
|
|
80
|
+
kind: "Classification of the recorded blocker or process; the exact command determines supported kinds.",
|
|
81
|
+
lane: "Named project workspace lane whose workspace, waiters or lock are being inspected or changed.",
|
|
82
|
+
"lease-ms": "Runtime process lease duration in milliseconds; renewal requires the current lease token.",
|
|
83
|
+
"lease-token": "Current owned lease token for the exact process or lane; not an executor credential or an ownership override.",
|
|
84
|
+
"registration-sha256": "Exact managed-process registration binding returned by confirmation or renewal. Pins the resource Home and registered owner/PID identity; a changed registration refuses rather than matching a reused process ID.",
|
|
85
|
+
limit: "Maximum number of Work entries returned by the listing; must be a positive integer.",
|
|
86
|
+
"manifest-json": "Inline runtime-scope manifest declaration binding the selected source manifest and executions; changed declarations refuse.",
|
|
87
|
+
"max-parallel-projects": "Maximum projects processed concurrently by the merge server; does not widen per-project merge authority.",
|
|
88
|
+
"memory-bank": "Memory Bank path whose access is checked by permission preflight; no installation or workflow is started.",
|
|
89
|
+
mode: "Operation mode accepted by this exact command; consult its allowed values and mode-specific effects.",
|
|
90
|
+
"native-session-id": "Existing physical provider Session identity for scoped recovery/admission; logical Work ancestry is separate.",
|
|
91
|
+
"next-action": "Explicit next-action projection stored with RUN creation or an operator override; it is not automatic dispatch.",
|
|
92
|
+
"observations-file": "Bounded observations JSON file for the selected fan-out/native scope; observations must satisfy ownership and settlement contracts.",
|
|
93
|
+
on: "Dependency Work identity to add or remove; repeat for multiple dependencies. Dependencies are not physical Session parentage.",
|
|
94
|
+
once: "Process one merge-server iteration instead of polling continuously.",
|
|
95
|
+
open: "Open the refreshed dashboard after rendering; does not alter RUN control state.",
|
|
96
|
+
operation: "Named operation associated with a registered process or provider admission request.",
|
|
97
|
+
"operation-id": "Exact retained provider operation identity bound to turn admission or release.",
|
|
98
|
+
"operational-decision-file": "Validated operational decision artifact authorizing the applicable snapshot restoration or fork route; not a release or arbitrary mutation permit.",
|
|
99
|
+
"origin-work": "Origin Work identity motivating repair; repeat to preserve multiple origins.",
|
|
100
|
+
outcome: "Outcome declared for the selected stage result; finish still validates its contract and evidence before transition.",
|
|
101
|
+
output: "Destination for a created snapshot, fork artifact or rendered dashboard; see the command's artifact contract.",
|
|
102
|
+
owner: "Runtime resource owner identity used for registration, admission or reconciliation; ownership is independently checked.",
|
|
103
|
+
"owner-pid": "Operating-system PID of the registered process owner, used for scoped liveness and reconciliation.",
|
|
104
|
+
package: "Engine package name used to locate the requested installed snapshot.",
|
|
105
|
+
parent: "Logical parent Work identity for batch creation or listing; does not make children physical subagents automatically.",
|
|
106
|
+
path: "Concrete workspace path used by lane, merge or worktree operations; not the stable project identity.",
|
|
107
|
+
"pause-id": "Exact retained user-interaction pause identity answered by this drive request.",
|
|
108
|
+
"payload-base64": "Base64-encoded Session registration payload; use only one payload transport.",
|
|
109
|
+
"payload-file": "File containing the selected transition or Session registration payload; validated before registration or transition.",
|
|
110
|
+
"payload-json": "Inline JSON Session registration payload; use only one payload transport.",
|
|
111
|
+
pid: "Operating-system PID of the registered physical process; a PID alone does not prove ownership or completion.",
|
|
112
|
+
"plan-file": "Previously generated cleanup plan file; application still checks its scope and explicit reason.",
|
|
113
|
+
"plan-item": "Plan item identity selected for the bounded worker prompt.",
|
|
114
|
+
"poll-interval": "Polling interval in seconds for lane/merge waiting; must be positive.",
|
|
115
|
+
"poll-seconds": "Merge server polling interval in seconds; must be positive.",
|
|
116
|
+
ports: "Comma-separated port declarations for the owned runtime service.",
|
|
117
|
+
preset: "Named flow-flag preset for creation or revision; explicit flag assignments and policy admission remain separate.",
|
|
118
|
+
"process-group-id": "Operating-system process-group identity retained for owned-tree cleanup; not a permit to kill unrelated groups.",
|
|
119
|
+
project: "Project selector for dashboard data, rendering or opening.",
|
|
120
|
+
"project-id": "Registered project identity associated with the physical runtime process.",
|
|
121
|
+
"prompt-sha256": "Digest of exact provider prompt bytes associated with operation admission.",
|
|
122
|
+
protocol: "Protocol selector limiting dashboard output to the requested protocol.",
|
|
123
|
+
"protocol-id": "Existing protocol identity whose feature worktree is planned, created, inspected or closed.",
|
|
124
|
+
"protocol-override-file": "Validated protocol override JSON input supplied at RUN creation; does not overwrite an existing frozen RUN.",
|
|
125
|
+
"question-file": "File containing the user question that pauses this stage/Work under the selected interaction contract.",
|
|
126
|
+
"question-stdin": "Read the stage question from standard input instead of --question-file.",
|
|
127
|
+
ready: "List dependency-ready Work entries rather than all entries; readiness does not launch them.",
|
|
128
|
+
"ready-path": "HTTP path used for the runtime service readiness check.",
|
|
129
|
+
"ready-port": "Declared service port used for the runtime readiness check.",
|
|
130
|
+
"ready-timeout-ms": "Maximum service readiness wait in milliseconds; must be a positive integer.",
|
|
131
|
+
"reason-file": "File containing the reason artifact required by the selected lifecycle finish contract.",
|
|
132
|
+
"recovery-id": "Exact retained RUN recovery attempt identity; recovery acceptance and physical settlement remain separate gates.",
|
|
133
|
+
"release-locks": "Boolean: request protocol lock release during cancellation; ownership checks still apply.",
|
|
134
|
+
report: "Report artifact path associated with the completed stage.",
|
|
135
|
+
request: "Retained request reference supplied to the selected stage finish contract; not a new setup request ID.",
|
|
136
|
+
requeue: "Boolean: put the failed merge job or bundle back in the queue; a failure is not converted into accepted merge evidence.",
|
|
137
|
+
"require-session-binding": "Require trusted physical Session binding before starting the stage; do not synthesize one from a RUN ID.",
|
|
138
|
+
"result-file": "Validated result JSON artifact for this stage or Work; process exit success is not a substitute for accepted result evidence.",
|
|
139
|
+
"result-stdin": "Read result JSON from standard input instead of --result-file.",
|
|
140
|
+
"retry-check": "Check identity requested for the selected bounded retry path; prior results cannot be reused without matching evidence.",
|
|
141
|
+
retryable: "Mark the recorded blocker as retryable; does not launch a retry or bypass the blocker.",
|
|
142
|
+
role: "Role metadata retained with the registered runtime process.",
|
|
143
|
+
schema: "Registered JSON schema name against which the supplied file is validated.",
|
|
144
|
+
"schema-dir": "Explicit schema directory for validation; not a workflow handler registry or permission to execute code.",
|
|
145
|
+
"scope-id": "Exact retained runtime/EVAL scope identity; operations must not affect neighboring scopes.",
|
|
146
|
+
"scope-ids-json": "Read-only JSON array of 1..16 unique retained scope IDs; returns ordered fresh inventories without fencing or stopping them.",
|
|
147
|
+
"semantic-file": "Stage semantic result artifact; applicable schema and finish checks are selected independently.",
|
|
148
|
+
session: "Physical Session selector for source-backed usage aggregation.",
|
|
149
|
+
"session-id": "Exact retained physical Session identity for registration, status, stop or usage synchronization.",
|
|
150
|
+
"settlement-json": "Inline JSON physical settlement evidence sealing a recovery attempt; logical inactivity alone is insufficient.",
|
|
151
|
+
slug: "Safe human-readable slug used for the new typed identifier or RUN.",
|
|
152
|
+
snapshot: "Existing snapshot artifact selected for bootstrap or RUN restoration; restored execution requires independent admission.",
|
|
153
|
+
"source-home": "Source Codex home used to plan or initialize the isolated project home; credentials remain operator-owned.",
|
|
154
|
+
"source-version": "Source Memory Bank version whose migration impact and evidence are being assessed.",
|
|
155
|
+
stage: "Stage identity within the selected flow/RUN; a name alone cannot admit a foreign stage.",
|
|
156
|
+
"stage-entry": "Stage entry selected for snapshot capture.",
|
|
157
|
+
"stage-report": "Stage report artifact path supplied for completion and retained observation.",
|
|
158
|
+
state: "Terminal state reported for the owned runtime process; supported values are shown below.",
|
|
159
|
+
status: "Work filter or declared stage/RUN state, depending on the exact command; lifecycle admission remains authoritative.",
|
|
160
|
+
stderr: "Retained standard-error log path associated with the registered process.",
|
|
161
|
+
stdout: "Retained standard-output log path associated with the registered process.",
|
|
162
|
+
"stop-after": "Stage boundary at which the drive controller should stop advancing; not proof of physical child settlement.",
|
|
163
|
+
subject: "Safe subject text for the bootstrap RUN; raw user intake is supplied separately.",
|
|
164
|
+
"subject-id": "Identity of the protocol or other subject associated with the new RUN.",
|
|
165
|
+
"subject-type": "Type of subject associated with RUN creation; it does not select an executor.",
|
|
166
|
+
summary: "Human summary retained with plan-item or merge completion/note evidence.",
|
|
167
|
+
"summary-file": "File containing the diagnostic summary for a stage blocker.",
|
|
168
|
+
"summary-stdin": "Read the blocker summary from standard input instead of --summary-file.",
|
|
169
|
+
target: "Destination selector for protocol synchronization or hook management; see the exact command topic.",
|
|
170
|
+
"target-home": "Destination isolated Codex home used by the project home plan/init operation.",
|
|
171
|
+
"target-version": "Target Memory Bank version selected for migration impact, planning or application.",
|
|
172
|
+
"task-file": "Bounded worker task artifact used for prompt rendering or repair Work creation.",
|
|
173
|
+
"task-profile-file": "Validated task-profile JSON input used when freezing a new RUN's task policy.",
|
|
174
|
+
"task-stdin": "Read repair task content from standard input instead of --task-file.",
|
|
175
|
+
tasks: "Task directory whose access is checked by Memory Bank permission preflight.",
|
|
176
|
+
timeout: "Maximum lane/merge waiting duration in seconds; not a provider model timeout.",
|
|
177
|
+
to: "Requested protocol lifecycle target; transition requirements are validated before changing state.",
|
|
178
|
+
ttl: "Lane lease lifetime in seconds; expiry does not by itself prove physical process settlement.",
|
|
179
|
+
type: "Typed identifier family whose next identifier is being previewed.",
|
|
180
|
+
"user-required": "Boolean indicating that the blocked plan item requires a user decision.",
|
|
181
|
+
value: "Configuration or RUN variable value to store under --key; configuration-specific validation still applies.",
|
|
182
|
+
verdict: "Operator override verdict projection; cannot turn an override into ordinary semantic acceptance.",
|
|
183
|
+
"verification-file": "Verification evidence artifact required by the selected stage finish or repair provenance contract.",
|
|
184
|
+
version: "Exact engine package version to inspect; omitted selection follows the engine-info command's existing resolver.",
|
|
185
|
+
viewer: "Viewer requested for opening the rendered dashboard.",
|
|
186
|
+
"wait-ms": "Maximum observation wait in milliseconds for the requested RUN control operation; timeout is not terminal settlement.",
|
|
187
|
+
work: "Exact Work identity within the selected RUN/stage or associated with a registered process/merge request.",
|
|
188
|
+
"worker-id": "Worker identity bound to the selected Session, lane lease or merge claim; not a model/profile selector.",
|
|
189
|
+
worktree: "Worktree handling policy requested during protocol cancellation; project ownership and cleanup guards still apply.",
|
|
190
|
+
write: "Boolean: publish the project summary instead of only returning its current projection.",
|
|
191
|
+
yes: "Explicit confirmation for hook installation/removal; does not bypass project access or target validation."
|
|
192
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { completionCandidates } from "./completion.js";
|
|
2
|
+
import { prepareCommandRoute } from "./command-inputs.js";
|
|
3
|
+
import { parseOutputOptions } from "./output-options.js";
|
|
4
|
+
import { writePreparationError } from "./error-output.js";
|
|
5
|
+
import { AppError, errorRecord } from "../shared/errors.js";
|
|
6
|
+
import { prepareResponseDestination, writeResponseFile } from "./response-file.js";
|
|
7
|
+
export function completionScript(shell) {
|
|
8
|
+
if (shell === "bash")
|
|
9
|
+
return `# dd-flow completion: bash
|
|
10
|
+
_dd_flow_complete() {
|
|
11
|
+
local candidate
|
|
12
|
+
COMPREPLY=()
|
|
13
|
+
while IFS= read -r candidate; do
|
|
14
|
+
[ -n "$candidate" ] && COMPREPLY+=("$candidate")
|
|
15
|
+
done < <("${"$"}{COMP_WORDS[0]}" completion candidates -- "${"$"}{COMP_WORDS[@]:1:COMP_CWORD}")
|
|
16
|
+
}
|
|
17
|
+
complete -o default -F _dd_flow_complete dd-flow
|
|
18
|
+
`;
|
|
19
|
+
if (shell === "zsh")
|
|
20
|
+
return `#compdef dd-flow
|
|
21
|
+
_dd_flow_complete() {
|
|
22
|
+
local -a replies
|
|
23
|
+
replies=("${"$"}{(@f)$("${"$"}{words[1]}" completion candidates -- "${"$"}{(@)words[2,CURRENT]}")}")
|
|
24
|
+
if (( ${"$"}{#replies} )) && [[ -n "$replies[1]" ]]; then
|
|
25
|
+
compadd -a replies
|
|
26
|
+
else
|
|
27
|
+
_files
|
|
28
|
+
fi
|
|
29
|
+
}
|
|
30
|
+
compdef _dd_flow_complete dd-flow
|
|
31
|
+
`;
|
|
32
|
+
if (shell === "fish")
|
|
33
|
+
return `function __dd_flow_candidates
|
|
34
|
+
set -l tokens (commandline -opc)
|
|
35
|
+
set -l prefix (commandline -ct)
|
|
36
|
+
set -l arguments
|
|
37
|
+
if test (count $tokens) -gt 1
|
|
38
|
+
set arguments $tokens[2..-1]
|
|
39
|
+
end
|
|
40
|
+
$tokens[1] completion candidates -- $arguments "$prefix"
|
|
41
|
+
end
|
|
42
|
+
complete -c dd-flow -a '(__dd_flow_candidates)'
|
|
43
|
+
`;
|
|
44
|
+
throw new AppError("usage", "Supported completion shells: bash, zsh, fish", 2, { effect: "no_effect" });
|
|
45
|
+
}
|
|
46
|
+
/** Completion is grammar-only: never constructs an AppContext or writes a home. */
|
|
47
|
+
export function runCompletionCli(args, io = { stdout: process.stdout, stderr: process.stderr }) {
|
|
48
|
+
let json = false;
|
|
49
|
+
try {
|
|
50
|
+
const output = parseOutputOptions(args);
|
|
51
|
+
json = output.json;
|
|
52
|
+
if (output.responseFile)
|
|
53
|
+
prepareResponseDestination(output.responseFile);
|
|
54
|
+
const route = prepareCommandRoute(output.args);
|
|
55
|
+
if (route.key === "completion candidates") {
|
|
56
|
+
const candidates = completionCandidates(route.parsed.positional);
|
|
57
|
+
io.stdout.write(json ? `${JSON.stringify(writeResponseFile({ candidates }, output))}\n` : candidates.map(value => `${value}\n`).join(""));
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
const script = completionScript(route.command);
|
|
61
|
+
io.stdout.write(json ? `${JSON.stringify(writeResponseFile({ shell: route.command, script }, output))}\n` : script);
|
|
62
|
+
}
|
|
63
|
+
return 0;
|
|
64
|
+
}
|
|
65
|
+
catch (error) {
|
|
66
|
+
const record = errorRecord(error);
|
|
67
|
+
writePreparationError(io, args, record);
|
|
68
|
+
return record.exitCode;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { commandInputs } from "./command-inputs.js";
|
|
2
|
+
import { globalOptionDocumentation, optionsForCommandTree } from "./command-metadata.js";
|
|
3
|
+
const globalSwitches = globalOptionDocumentation.filter(option => option.kind === "switch").map(option => `--${option.name}`);
|
|
4
|
+
const globalValues = globalOptionDocumentation.filter(option => option.kind === "value").map(option => `--${option.name}`);
|
|
5
|
+
/** Read-only completion grammar. Last word is the cursor's unfinished token. */
|
|
6
|
+
export function completionCandidates(words) {
|
|
7
|
+
const prefix = words.at(-1) ?? "";
|
|
8
|
+
const completed = words.slice(0, -1);
|
|
9
|
+
if (completed.includes("--"))
|
|
10
|
+
return [];
|
|
11
|
+
const positions = [];
|
|
12
|
+
let awaiting;
|
|
13
|
+
let routeKey;
|
|
14
|
+
const keys = Object.keys(commandInputs).filter(key => !commandInputs[key].retired);
|
|
15
|
+
const select = () => keys.filter(key => key.split(" ").every((part, index) => positions[index] === part))
|
|
16
|
+
.sort((left, right) => right.split(" ").length - left.split(" ").length)[0];
|
|
17
|
+
for (const word of completed) {
|
|
18
|
+
if (awaiting) {
|
|
19
|
+
awaiting = undefined;
|
|
20
|
+
continue;
|
|
21
|
+
}
|
|
22
|
+
if (word.startsWith("--")) {
|
|
23
|
+
const name = word.slice(2).split("=")[0];
|
|
24
|
+
const input = routeKey ? commandInputs[routeKey] : undefined;
|
|
25
|
+
const values = input?.values ?? [...new Set(Object.values(commandInputs).flatMap(item => item.values))];
|
|
26
|
+
if (!word.includes("=") && (values.includes(name) || globalValues.includes(`--${name}`)))
|
|
27
|
+
awaiting = name;
|
|
28
|
+
continue;
|
|
29
|
+
}
|
|
30
|
+
if (word === "-h")
|
|
31
|
+
continue;
|
|
32
|
+
positions.push(word);
|
|
33
|
+
routeKey = select();
|
|
34
|
+
}
|
|
35
|
+
const input = routeKey ? commandInputs[routeKey] : undefined;
|
|
36
|
+
let candidates;
|
|
37
|
+
const inline = prefix.match(/^--([^=]+)=(.*)$/);
|
|
38
|
+
if (awaiting || inline) {
|
|
39
|
+
const option = awaiting ?? inline[1];
|
|
40
|
+
candidates = option === "option" ? optionsForCommandTree(routeKey ?? positions.join(" ")).map(item => item.name)
|
|
41
|
+
: [...(input?.enums[option] ?? [])];
|
|
42
|
+
if (option === "option" && (inline?.[2] ?? prefix).startsWith("--"))
|
|
43
|
+
candidates = candidates.map(name => `--${name}`);
|
|
44
|
+
if (inline)
|
|
45
|
+
return candidates.filter(value => value.startsWith(inline[2])).map(value => `--${option}=${value}`).sort();
|
|
46
|
+
}
|
|
47
|
+
else if (prefix.startsWith("-")) {
|
|
48
|
+
candidates = [...globalSwitches, ...globalValues, ...(input ? [...input.values, ...input.switches].map(name => `--${name}`) : [])];
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
candidates = keys.filter(key => {
|
|
52
|
+
const tokens = key.split(" ");
|
|
53
|
+
return positions.every((part, index) => tokens[index] === part) && tokens.length > positions.length;
|
|
54
|
+
}).map(key => key.split(" ")[positions.length]);
|
|
55
|
+
}
|
|
56
|
+
return [...new Set(candidates)].filter(value => value.startsWith(prefix)).sort();
|
|
57
|
+
}
|