@dzhechkov/harness-cli 0.7.3 → 0.7.5
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/.dz-manifest.json +67 -7
- package/README.md +7 -5
- package/dist/boolean-flags.d.ts +26 -0
- package/dist/boolean-flags.d.ts.map +1 -0
- package/dist/boolean-flags.js +118 -0
- package/dist/boolean-flags.js.map +1 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +575 -19
- package/dist/cli.js.map +1 -1
- package/dist/install-spec.d.ts +36 -0
- package/dist/install-spec.d.ts.map +1 -0
- package/dist/install-spec.js +68 -0
- package/dist/install-spec.js.map +1 -0
- package/dist/known-flags.d.ts +13 -0
- package/dist/known-flags.d.ts.map +1 -0
- package/dist/known-flags.js +292 -0
- package/dist/known-flags.js.map +1 -0
- package/package.json +18 -18
- package/sbom.json +156 -6
- package/src/boolean-flags.ts +118 -0
- package/src/cli.ts +529 -19
- package/src/install-spec.ts +86 -0
- package/src/known-flags.ts +291 -0
package/.dz-manifest.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
},
|
|
10
10
|
{
|
|
11
11
|
"path": "README.md",
|
|
12
|
-
"sha256": "
|
|
12
|
+
"sha256": "bf6ac920e20f4e9978dbb7b1cca48790d97e44f245dc53088e189776b4a7616e"
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
"path": "dist/bin.d.ts",
|
|
@@ -27,21 +27,37 @@
|
|
|
27
27
|
"path": "dist/bin.js.map",
|
|
28
28
|
"sha256": "31849f2576f6e57a8a71f49cbb1a6e6c692f98dd8303217ec836933420d08dac"
|
|
29
29
|
},
|
|
30
|
+
{
|
|
31
|
+
"path": "dist/boolean-flags.d.ts",
|
|
32
|
+
"sha256": "014b309c8b7de90b6c0d87e4f4c6a15623fd9c261252282faa3567dd3b9d0d4d"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"path": "dist/boolean-flags.d.ts.map",
|
|
36
|
+
"sha256": "a8309c4a78c90a1c9db9518a6d07c5fa800c4d39710941a379635a65012e208d"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"path": "dist/boolean-flags.js",
|
|
40
|
+
"sha256": "8cf050f1bc0b69be1088e58cc5f88f034d2e847fba9ffc87f3cc01121d7d9d74"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"path": "dist/boolean-flags.js.map",
|
|
44
|
+
"sha256": "442b8bbb2ec9f7701ddc2232fc8662956966097d6f46ee1fce49bd06c20db97f"
|
|
45
|
+
},
|
|
30
46
|
{
|
|
31
47
|
"path": "dist/cli.d.ts",
|
|
32
48
|
"sha256": "5aeeec8ab84e3922ce0c7b7ea711fd1cdff67b68e1ded0b66e920a907e6ac267"
|
|
33
49
|
},
|
|
34
50
|
{
|
|
35
51
|
"path": "dist/cli.d.ts.map",
|
|
36
|
-
"sha256": "
|
|
52
|
+
"sha256": "6fc728a98d8a920a226a4ee2d8b045ee46e27246c7d7e8bdf15e6c7758f3efbc"
|
|
37
53
|
},
|
|
38
54
|
{
|
|
39
55
|
"path": "dist/cli.js",
|
|
40
|
-
"sha256": "
|
|
56
|
+
"sha256": "4bc5e7cb6563fd672fd7e2c38eac4ba55d54de46940c194b3d2cd5ea4519732a"
|
|
41
57
|
},
|
|
42
58
|
{
|
|
43
59
|
"path": "dist/cli.js.map",
|
|
44
|
-
"sha256": "
|
|
60
|
+
"sha256": "560d103ce98af8095eb7ee86537aa80de7a914fffa693dc23fdf2440a4f76183"
|
|
45
61
|
},
|
|
46
62
|
{
|
|
47
63
|
"path": "dist/core-compat.d.ts",
|
|
@@ -75,6 +91,38 @@
|
|
|
75
91
|
"path": "dist/index.js.map",
|
|
76
92
|
"sha256": "02b6b6f1b17a53d652a75555d185a20ea5d3e3110aa915ab228bf5521b0ce5fb"
|
|
77
93
|
},
|
|
94
|
+
{
|
|
95
|
+
"path": "dist/install-spec.d.ts",
|
|
96
|
+
"sha256": "f1a4d132eb06068e2c45ce7976f1b01482187c93021bbfaceb7f1dbe76c8c991"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"path": "dist/install-spec.d.ts.map",
|
|
100
|
+
"sha256": "59a6d12466909c86aa06c272b237ca39473f106fd544725b1e6c707ca1c06a25"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"path": "dist/install-spec.js",
|
|
104
|
+
"sha256": "354aae49a20a404eb9d0405ca6c7f6fa277e23b3e9f4988582f0c610486a2e6b"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"path": "dist/install-spec.js.map",
|
|
108
|
+
"sha256": "3f8225df12c17826d5e8642f342a2fae21f4d1c32bb0969915570258a1ce6a76"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"path": "dist/known-flags.d.ts",
|
|
112
|
+
"sha256": "40403ed4e24cdf95cb2757653485d7cb4650ef8496af96927ab503c2a189c598"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"path": "dist/known-flags.d.ts.map",
|
|
116
|
+
"sha256": "23fa9b92489e2f39d99397a57f99a4c7566d41b75682d1bbde3f113c480acdcd"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"path": "dist/known-flags.js",
|
|
120
|
+
"sha256": "f4ed9bddb45629484baf117a3b92eb4097932abda6e5a48227acbc7b5f23f561"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"path": "dist/known-flags.js.map",
|
|
124
|
+
"sha256": "41bce9592c8192431f7f023271eaf3f548398e5c15441ea69a59e78633915cd9"
|
|
125
|
+
},
|
|
78
126
|
{
|
|
79
127
|
"path": "keys/README.md",
|
|
80
128
|
"sha256": "142fc5d0d59003476b8e7367d6fc21fe40ce9e0bf70159318a05abdb10502b8a"
|
|
@@ -85,15 +133,19 @@
|
|
|
85
133
|
},
|
|
86
134
|
{
|
|
87
135
|
"path": "package.json",
|
|
88
|
-
"sha256": "
|
|
136
|
+
"sha256": "423120966d33fb4515177a7613f0ace5b392a576098987d0d9ca22aedea96716"
|
|
89
137
|
},
|
|
90
138
|
{
|
|
91
139
|
"path": "src/bin.ts",
|
|
92
140
|
"sha256": "42a1f67e1f39c4cda2df0887c16fbb6f54eb108ba0cb18612bb83ee153092463"
|
|
93
141
|
},
|
|
142
|
+
{
|
|
143
|
+
"path": "src/boolean-flags.ts",
|
|
144
|
+
"sha256": "c3ef929a729f53ca612ac67b1571d2e8da3681ac5060a1cd16e453e0bb1d4e00"
|
|
145
|
+
},
|
|
94
146
|
{
|
|
95
147
|
"path": "src/cli.ts",
|
|
96
|
-
"sha256": "
|
|
148
|
+
"sha256": "cae511b9b892c43e874ee06b439306290cd2c0a9e6b75cd0cd931d47adaef3f5"
|
|
97
149
|
},
|
|
98
150
|
{
|
|
99
151
|
"path": "src/core-compat.ts",
|
|
@@ -102,8 +154,16 @@
|
|
|
102
154
|
{
|
|
103
155
|
"path": "src/index.ts",
|
|
104
156
|
"sha256": "d4258f3b183d03047aa07399ae96bdb2b3af83f0005127a24a39f8932982bf78"
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"path": "src/install-spec.ts",
|
|
160
|
+
"sha256": "4196fd89c6d2ab1f3ba107141c32635f2739dc38d978a9f4f41a8b0db0ddc5f9"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"path": "src/known-flags.ts",
|
|
164
|
+
"sha256": "aed996e8a3741b595eba31ef694ec5b2999dc0a73933a4289325cf6b9944e254"
|
|
105
165
|
}
|
|
106
166
|
]
|
|
107
167
|
},
|
|
108
|
-
"signature": "
|
|
168
|
+
"signature": "DN7j3i23IeC8baQ4oOuoOiEPJMiyYF9/0XEVC7Du3p1QQgLZkJzdNQlHPVoUSGcmY57F5b9bn0K8tONFPTA3BQ=="
|
|
109
169
|
}
|
package/README.md
CHANGED
|
@@ -266,7 +266,7 @@ you know exactly which file is at fault, and you know whose defect it is.
|
|
|
266
266
|
|
|
267
267
|
## User Journey — from install to mastery
|
|
268
268
|
|
|
269
|
-
All
|
|
269
|
+
All 77 commands (MEASURED — reproducer: `grep -c "^ case '" src/cli.ts`, the dispatch cases) mapped to a real workflow:
|
|
270
270
|
|
|
271
271
|
```
|
|
272
272
|
DISCOVER → INSTALL → USE → CREATE → MAINTAIN → SHARE
|
|
@@ -1768,7 +1768,7 @@ runs a command that MEASURES the declared artifacts itself. It refuses a null re
|
|
|
1768
1768
|
never recorded as done), an absent or partially-present artifact set, and a stage that declares nothing
|
|
1769
1769
|
to witness — so a stage that did not happen can no longer be recorded, which the old mechanism allowed.
|
|
1770
1770
|
|
|
1771
|
-
## All Commands (
|
|
1771
|
+
## All Commands (77)
|
|
1772
1772
|
|
|
1773
1773
|
*(73 MEASURED — reproducer: `grep -c "^ case '" src/cli.ts`, the dispatch cases.)*
|
|
1774
1774
|
|
|
@@ -1837,9 +1837,11 @@ dz epoch-replay --emit [--project <dir>] [--limit <N>] [--seed <N>] [--margin <
|
|
|
1837
1837
|
dz epoch-replay --judge <filled-work-order.json> [--out <file>] [--json] # blind judge prompts from the filled plans — the file carries {id, prompt} ONLY (no assignment, no arm names); refuses an order whose digest or seed-derived assignment does not check out; half-pairs skipped WITH A REASON, on stdout
|
|
1838
1838
|
dz epoch-replay --score <judgments.json> --work-order <file> [--slice <name>] [--json] # un-blind against the VERIFIED pre-registered assignment; ONE paired binomial over DECISIVE pairs (ties excluded, reported) → SUPPORTED only when the lift interval (2p−1) lies entirely above zero; FALSIFIED only on harm or a passed non-superiority test (lift upper bound below the margin PRE-REGISTERED in the work order, default 0.05, at 10+ decisive pairs); else INCONCLUSIVE (min 5 decisive pairs). Refuses a forged work order, a --margin flag, or duplicate judgement ids; the verdict is data, not an exit code
|
|
1839
1839
|
dz score --slug <feature> [--project <dir>] [--json] # process scorecard for ONE feature-adr run, from its artifacts: ADR confirmation, discrimination proof, cross-model QE grade, live verification, README-first, learning loop, amendments — DESCRIPTIVE-ONLY (a low score exits 0); evidence lines are shown so the reader judges the heuristics
|
|
1840
|
-
dz recap [--day|--week|--month] [--at <ISO date>] [--project <dir>] [--json] # what was done over a window, from records only. Deliveries carry the grade an independent review STATED — a report naming two different grades is reported AMBIGUOUS, never guessed; registry publishes come from a cache (51 packages cost 18.3s over the network, MEASURED — never inside a report); gate verdicts and knowledge reuse come from the local stores. --quarter/--half-year/--year are RECOGNISED and REFUSED with the real span in days: there is exactly ONE complete quarter and the longest record is 174 days, so a quarter-over-quarter comparison is arithmetically impossible and a year would be fabrication. Every section carries its own data-start date, and "the source was not read" never prints as a zero. Contaminated measures are NOT computed and the report says so: commit count (this project mandates a commit per logical change), lines changed (352 of 1318 commits are docs), token spend (self-declared an estimate, once wrong sixfold), learning-event volume (the curve tracks when hooks were installed), inventory counts (monotonic — they can only flatter), lesson count (54% of the pool has never been read). exit 0 reported / 2 refused
|
|
1840
|
+
dz recap [--day|--week|--month] [--at <ISO date>] [--refresh-publishes] [--project <dir>] [--json] # what was done over a window, from records only. `--refresh-publishes` fills the third-party publish-times cache first (the ONLY place this command touches the network — 51 packages in ~7s, batches of 8); the report itself always reads the cache, prints its AGE, and names any package the registry did not answer for: those are MISSING from the numbers, not zero. Deliveries carry the grade an independent review STATED — a report naming two different grades is reported AMBIGUOUS, never guessed; registry publishes come from a cache (51 packages cost 18.3s over the network, MEASURED — never inside a report); gate verdicts and knowledge reuse come from the local stores. --quarter/--half-year/--year are RECOGNISED and REFUSED with the real span in days: there is exactly ONE complete quarter and the longest record is 174 days, so a quarter-over-quarter comparison is arithmetically impossible and a year would be fabrication. Every section carries its own data-start date, and "the source was not read" never prints as a zero. Contaminated measures are NOT computed and the report says so: commit count (this project mandates a commit per logical change), lines changed (352 of 1318 commits are docs), token spend (self-declared an estimate, once wrong sixfold), learning-event volume (the curve tracks when hooks were installed), inventory counts (monotonic — they can only flatter), lesson count (54% of the pool has never been read). exit 0 reported / 2 refused
|
|
1841
|
+
dz cadence [--window day|week|month|quarter|halfyear|year] [--json] # the RHYTHM view of what shipped: graded-shipment counts bucketed by ISO week, npm-publish cadence (reads `dz recap`'s publish-times cache — run `dz recap --refresh-publishes` to warm it), guard repeat DECAY on the FIXED rule set (a rule joins only with pre-window history, so a newborn rule's zero is youth, not virtue — the no-stubs false-zero class excluded by construction), and recall reuse per week. A window deeper than 2× the record is REFUSED with the measured depth and the largest honest window named (a cadence from under two full windows is scale forgery). Sibling of `dz recap`: recap is the narrative what-was-done report over one window; cadence is the week-by-week rhythm across the window. exit 0 / 2 refused-window / 1 usage
|
|
1841
1842
|
dz provenance-check --manifest <sources.json> [--project <dir>] [--json] # nothing goes out citing a source that may not leave this machine. Checks PROVENANCE, not words: every claim in a draft names its source, and a source is cleared only when it is a KNOWN kind that resolves safely. Repo paths are classified by `git -C <root> check-ignore` over the RESOLVED path — so a symlink into an ignored directory is refused, not cleared (MEASURED: git classifies the string and never dereferences), and the verdict does not change with your working directory. Store records need naming in the git-TRACKED `provenance-public.json`, so declaring one public is a reviewable commit rather than a field inside an ignored store. Anything else is refused: an undeclared kind is never inferred from the path's shape. exit 0 allowed / 1 blocked / 3 NOT ESTABLISHED — an empty manifest, an unreadable one, or an oracle that did not run is never a pass. **What it cannot do, said on the passing path too:** it proves what was CITED. It cannot see a paraphrase with no citation, nor confidential text pasted by hand into an allowed file. Read the draft.
|
|
1842
1843
|
dz name-check [--command <n>] [--module <basename>] [--export <a,b>] [--project <dir>] [--json] # is this name free, BEFORE a line of code? Twice in one day a collision broke the build outright — `dz retro` was already a command, `decideProvenance` already an export — and both were answerable in advance. Scans workspace SOURCE and never `dist`, because a stale build answers 'free' confidently (MEASURED: half an hour of convincing live runs against a previous build while tsc was red). Checks a command name against the dispatcher AND the help block, a module basename against every package's src/, and exported identifiers against every declaration — naming the DECLARING file, not the barrel. exit 0 all free / 1 at least one taken / 2 nothing asked or the scan read nothing — an empty sweep is never a clean bill. **Honest limit, printed on the passing path:** it reads declarations, so a re-export under a different name stays the build's job.
|
|
1844
|
+
dz tg-post --draft <file.html> [--manifest <sources.json>] [--channel <@name>] [--send --yes] [--night] [--json] # the sender for an APPROVED genai-tweets-channel post, held to the channel's own accepted ADRs: HTML mode only (never MarkdownV2 — 18 escapes against 3, one miss is a 400); link preview OFF by default (x.com previews in Telegram are broken since 2022); the 00:00-06:00 MSK quiet window refuses without an explicit --night. THE DEFAULT RUN IS A DRY-RUN: tag balance and allowed-tag checks, bare &/< detection, the 4096 visible-character limit with the overshoot counted — every issue named in one pass, not just the first. The provenance gate runs IN-PROCESS over --manifest, and a draft with no manifest is refused as unchecked when a send is asked. A real send needs --send AND --yes — ADR-004's standing order that publishing stays manual, stated out loud each time. The bot token (TELEGRAM_BOT_TOKEN or telegram.tokenFile) is never printed, and the gates run BEFORE any secret is read. exit 0 sent or clean dry-run / 1 refused / 2 usage
|
|
1843
1845
|
dz feature-adr-checkpoint (--slug <feature> | --feature-dir <abs>) --stage <s> --input-hash <h> --result <json> [--artifact a,b] [--json]
|
|
1844
1846
|
dz reqe [--slug <feature> [--done --report <f>]] [--project <dir>] [--json] # the re-QE debt ledger: a usage-switched feature-adr run whose Step-8 QE ran on the coder's OWN family (cross-model guard suspended, FR-2.9) records a debt; list debts (also surfaced by dz usage), print the cross-family review brief, settle FAIL-CLOSED against an existing GRADED report (the run's own 08_qe_report.md — even hard-linked — can never settle its own debt); settlement lands in 08_qe_report.md, evidence rotates to reqe-settled.json
|
|
1845
1847
|
dz qe-bridge --family claude --slug <feature> [--coder-family codex|claude] [--model <id>] [--files a,b] [--out <f>] [--timeout <s>] [--allow-same-family] [--json] # the REVERSE QE bridge (Codex-hosted → Claude reviewer): the reviewer runs ISOLATED (an empty temp cwd + --safe-mode --strict-mcp-config --tools '' --no-session-persistence, so no CLAUDE.md/skills/plugins/hooks/MCP load) and its verdict is read from the --output-format json RESULT ENVELOPE, so text a customization printed onto the same stdout can never become a signoff. Probes the model first; sends SCOPED extracts under a loud 200k-char ceiling; the grade must agree across three LAST-anchored channels AND the marker must be the final content — empty/gradeless/mismatched/miscounted output is a named failure with an audit record under features/<slug>/.fa-state/qe-bridge/, never a clean review. exit 0 signoff parsed (ANY grade — it reports, it does not gate) / 1 named failure / 2 usage. DZ_QE_BRIDGE_CLAUDE_BIN is a TEST SEAM (recorded as binOverride:true)
|
|
@@ -4094,10 +4096,10 @@ npx @dzhechkov/p-replicator init
|
|
|
4094
4096
|
|
|
4095
4097
|
## Status
|
|
4096
4098
|
|
|
4097
|
-
`v0.7.
|
|
4099
|
+
`v0.7.5` — **a signature-only republish.** `0.7.0` shipped through `pnpm publish` rather than
|
|
4098
4100
|
`dz publish`, so the re-signing step was skipped and 17 of 497 files in the published core did not
|
|
4099
4101
|
match their signed hashes — the content was correct, the manifest was ten hours stale. Nothing in
|
|
4100
|
-
the shipped behaviour changes between `0.7.0` and `0.7.
|
|
4102
|
+
the shipped behaviour changes between `0.7.0` and `0.7.5`; the integrity check stops reporting these
|
|
4101
4103
|
packages as tampered. The one code change is a TEST: the compat case that asserted the workspace
|
|
4102
4104
|
core sits exactly on `MIN_CORE` is split into an integration half and a boundary half, so a patch
|
|
4103
4105
|
bump of core no longer reddens it and `MIN_CORE` need not claim a version the CLI does not require.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Boolean flags DECLARED AS DATA — feature boolean-flags-declared (backlog 247ddcfa).
|
|
3
|
+
*
|
|
4
|
+
* Before this file, `parseArgs` had no concept of a boolean flag: ANY `--flag` greedily consumed
|
|
5
|
+
* the next token unless it began with `--`. MEASURED 2026-08-22 on 0.7.0: `dz sync --dry-run .`
|
|
6
|
+
* turned the safety flag into the option `dry-run=.` — `flags.has('dry-run')` was FALSE and the
|
|
7
|
+
* run WROTE, its only trace a missing label. The same class swallowed positionals
|
|
8
|
+
* (`dz recall --no-semantic "torque"` ate the query) across ~72 commands.
|
|
9
|
+
*
|
|
10
|
+
* GENERATED from a census of `cli.ts` reads — `test/boolean-flags.test.ts` re-derives the census
|
|
11
|
+
* on every run and fails on ANY divergence, in BOTH directions: a name here that gains a valued
|
|
12
|
+
* read, or a new flags.has-only name missing from here, each forces a conscious decision.
|
|
13
|
+
*
|
|
14
|
+
* Two names are declared beyond the mechanical census, both documented:
|
|
15
|
+
* - `json` — its one valued read (cli.ts, the `--json <path>` recovery in the mcp-scan family) IS
|
|
16
|
+
* the hand-patch for this very defect; with the flag declared boolean the recovery goes
|
|
17
|
+
* harmlessly dead and `--json <path>` parses as flag + positional, which that code also accepts.
|
|
18
|
+
* - `force` — valued ONLY under `dz guard` (`--force <reason>`, the audited override); boolean in
|
|
19
|
+
* every other command. Encoded via {@link VALUED_FORCE_COMMANDS}.
|
|
20
|
+
*/
|
|
21
|
+
export declare const BOOLEAN_CLI_FLAGS: ReadonlySet<string>;
|
|
22
|
+
/** Commands where `--force` takes a VALUE (`--force <reason>`, logged) and must stay greedy. */
|
|
23
|
+
export declare const VALUED_FORCE_COMMANDS: readonly string[];
|
|
24
|
+
/** Is `--<name>` a boolean flag for this command — i.e. it must never swallow the next token? */
|
|
25
|
+
export declare function isBooleanFlag(name: string, command: string): boolean;
|
|
26
|
+
//# sourceMappingURL=boolean-flags.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"boolean-flags.d.ts","sourceRoot":"","sources":["../src/boolean-flags.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,iBAAiB,EAAE,WAAW,CAAC,MAAM,CAwFhD,CAAC;AAEH,gGAAgG;AAChG,eAAO,MAAM,qBAAqB,EAAE,SAAS,MAAM,EAAc,CAAC;AAElE,iGAAiG;AACjG,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAGpE"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Boolean flags DECLARED AS DATA — feature boolean-flags-declared (backlog 247ddcfa).
|
|
3
|
+
*
|
|
4
|
+
* Before this file, `parseArgs` had no concept of a boolean flag: ANY `--flag` greedily consumed
|
|
5
|
+
* the next token unless it began with `--`. MEASURED 2026-08-22 on 0.7.0: `dz sync --dry-run .`
|
|
6
|
+
* turned the safety flag into the option `dry-run=.` — `flags.has('dry-run')` was FALSE and the
|
|
7
|
+
* run WROTE, its only trace a missing label. The same class swallowed positionals
|
|
8
|
+
* (`dz recall --no-semantic "torque"` ate the query) across ~72 commands.
|
|
9
|
+
*
|
|
10
|
+
* GENERATED from a census of `cli.ts` reads — `test/boolean-flags.test.ts` re-derives the census
|
|
11
|
+
* on every run and fails on ANY divergence, in BOTH directions: a name here that gains a valued
|
|
12
|
+
* read, or a new flags.has-only name missing from here, each forces a conscious decision.
|
|
13
|
+
*
|
|
14
|
+
* Two names are declared beyond the mechanical census, both documented:
|
|
15
|
+
* - `json` — its one valued read (cli.ts, the `--json <path>` recovery in the mcp-scan family) IS
|
|
16
|
+
* the hand-patch for this very defect; with the flag declared boolean the recovery goes
|
|
17
|
+
* harmlessly dead and `--json <path>` parses as flag + positional, which that code also accepts.
|
|
18
|
+
* - `force` — valued ONLY under `dz guard` (`--force <reason>`, the audited override); boolean in
|
|
19
|
+
* every other command. Encoded via {@link VALUED_FORCE_COMMANDS}.
|
|
20
|
+
*/
|
|
21
|
+
export const BOOLEAN_CLI_FLAGS = new Set([
|
|
22
|
+
'affected',
|
|
23
|
+
'all',
|
|
24
|
+
'allow-same-family',
|
|
25
|
+
'allow-same-family-qe',
|
|
26
|
+
'any',
|
|
27
|
+
'apply',
|
|
28
|
+
'audit-dev',
|
|
29
|
+
'auto',
|
|
30
|
+
'books',
|
|
31
|
+
'bto',
|
|
32
|
+
'bump-only',
|
|
33
|
+
'by-stage',
|
|
34
|
+
'calibrate',
|
|
35
|
+
'check',
|
|
36
|
+
'confirm',
|
|
37
|
+
'context-only',
|
|
38
|
+
'deep',
|
|
39
|
+
'diff',
|
|
40
|
+
'done',
|
|
41
|
+
'dry-run',
|
|
42
|
+
'emit',
|
|
43
|
+
'enrich',
|
|
44
|
+
'fa-record',
|
|
45
|
+
'fail-on-undergrant',
|
|
46
|
+
'finalize',
|
|
47
|
+
'force',
|
|
48
|
+
'full',
|
|
49
|
+
'gates',
|
|
50
|
+
'guard',
|
|
51
|
+
'guards',
|
|
52
|
+
'harmonize',
|
|
53
|
+
'help',
|
|
54
|
+
'include-pairs',
|
|
55
|
+
'init',
|
|
56
|
+
'install',
|
|
57
|
+
'install-driver',
|
|
58
|
+
'install-hook',
|
|
59
|
+
'json',
|
|
60
|
+
'keep-scratch',
|
|
61
|
+
'legacy',
|
|
62
|
+
'lexical',
|
|
63
|
+
'list',
|
|
64
|
+
'live-content',
|
|
65
|
+
'mock',
|
|
66
|
+
'night',
|
|
67
|
+
'no-dry-run',
|
|
68
|
+
'no-evals',
|
|
69
|
+
'no-hooks',
|
|
70
|
+
'no-issue',
|
|
71
|
+
'no-memory',
|
|
72
|
+
'no-mirror',
|
|
73
|
+
'no-provenance',
|
|
74
|
+
'no-result',
|
|
75
|
+
'no-semantic',
|
|
76
|
+
'no-teach',
|
|
77
|
+
'no-verify',
|
|
78
|
+
'once',
|
|
79
|
+
'override',
|
|
80
|
+
'preview',
|
|
81
|
+
'provenance',
|
|
82
|
+
'prune-noise',
|
|
83
|
+
'prune-quarantine',
|
|
84
|
+
'publish',
|
|
85
|
+
'reconcile',
|
|
86
|
+
'record-provisional',
|
|
87
|
+
'refresh-publishes',
|
|
88
|
+
'remove',
|
|
89
|
+
'require-plan',
|
|
90
|
+
'require-signing',
|
|
91
|
+
'rerank',
|
|
92
|
+
'revise',
|
|
93
|
+
'scope-check',
|
|
94
|
+
'semantic',
|
|
95
|
+
'send',
|
|
96
|
+
'split',
|
|
97
|
+
'stages-json',
|
|
98
|
+
'static',
|
|
99
|
+
'stats',
|
|
100
|
+
'strict',
|
|
101
|
+
'tag',
|
|
102
|
+
'teach',
|
|
103
|
+
'usage',
|
|
104
|
+
'validate',
|
|
105
|
+
'weak',
|
|
106
|
+
'with-pairs',
|
|
107
|
+
'with-references',
|
|
108
|
+
'yes',
|
|
109
|
+
]);
|
|
110
|
+
/** Commands where `--force` takes a VALUE (`--force <reason>`, logged) and must stay greedy. */
|
|
111
|
+
export const VALUED_FORCE_COMMANDS = ['guard'];
|
|
112
|
+
/** Is `--<name>` a boolean flag for this command — i.e. it must never swallow the next token? */
|
|
113
|
+
export function isBooleanFlag(name, command) {
|
|
114
|
+
if (name === 'force')
|
|
115
|
+
return !VALUED_FORCE_COMMANDS.includes(command);
|
|
116
|
+
return BOOLEAN_CLI_FLAGS.has(name);
|
|
117
|
+
}
|
|
118
|
+
//# sourceMappingURL=boolean-flags.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"boolean-flags.js","sourceRoot":"","sources":["../src/boolean-flags.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAwB,IAAI,GAAG,CAAC;IAC5D,UAAU;IACV,KAAK;IACL,mBAAmB;IACnB,sBAAsB;IACtB,KAAK;IACL,OAAO;IACP,WAAW;IACX,MAAM;IACN,OAAO;IACP,KAAK;IACL,WAAW;IACX,UAAU;IACV,WAAW;IACX,OAAO;IACP,SAAS;IACT,cAAc;IACd,MAAM;IACN,MAAM;IACN,MAAM;IACN,SAAS;IACT,MAAM;IACN,QAAQ;IACR,WAAW;IACX,oBAAoB;IACpB,UAAU;IACV,OAAO;IACP,MAAM;IACN,OAAO;IACP,OAAO;IACP,QAAQ;IACR,WAAW;IACX,MAAM;IACN,eAAe;IACf,MAAM;IACN,SAAS;IACT,gBAAgB;IAChB,cAAc;IACd,MAAM;IACN,cAAc;IACd,QAAQ;IACR,SAAS;IACT,MAAM;IACN,cAAc;IACd,MAAM;IACN,OAAO;IACP,YAAY;IACZ,UAAU;IACV,UAAU;IACV,UAAU;IACV,WAAW;IACX,WAAW;IACX,eAAe;IACf,WAAW;IACX,aAAa;IACb,UAAU;IACV,WAAW;IACX,MAAM;IACN,UAAU;IACV,SAAS;IACT,YAAY;IACZ,aAAa;IACb,kBAAkB;IAClB,SAAS;IACT,WAAW;IACX,oBAAoB;IACpB,mBAAmB;IACnB,QAAQ;IACR,cAAc;IACd,iBAAiB;IACjB,QAAQ;IACR,QAAQ;IACR,aAAa;IACb,UAAU;IACV,MAAM;IACN,OAAO;IACP,aAAa;IACb,QAAQ;IACR,OAAO;IACP,QAAQ;IACR,KAAK;IACL,OAAO;IACP,OAAO;IACP,UAAU;IACV,MAAM;IACN,YAAY;IACZ,iBAAiB;IACjB,KAAK;CACN,CAAC,CAAC;AAEH,gGAAgG;AAChG,MAAM,CAAC,MAAM,qBAAqB,GAAsB,CAAC,OAAO,CAAC,CAAC;AAElE,iGAAiG;AACjG,MAAM,UAAU,aAAa,CAAC,IAAY,EAAE,OAAe;IACzD,IAAI,IAAI,KAAK,OAAO;QAAE,OAAO,CAAC,qBAAqB,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IACtE,OAAO,iBAAiB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AACrC,CAAC"}
|
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH,OAAO,EAAoC,KAAK,EAAa,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAK3G,OAAO,EA4CL,iBAAiB,EAmBjB,KAAK,oBAAoB,EA8UzB,KAAK,YAAY,EAwClB,MAAM,yBAAyB,CAAC;AA+IjC,2EAA2E;AAC3E,MAAM,WAAW,KAAK;IACpB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC;;;;;;;;;;OAUG;IACH,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