@webpieces/rules-config 0.4.742 → 0.4.743
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/package.json +1 -1
- package/src/home-config-keys.d.ts +134 -0
- package/src/home-config-keys.js +157 -0
- package/src/home-config-keys.js.map +1 -0
- package/src/home-config.d.ts +26 -69
- package/src/home-config.js +54 -114
- package/src/home-config.js.map +1 -1
- package/src/index.d.ts +1 -1
- package/src/index.js +7 -6
- package/src/index.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webpieces/rules-config",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.743",
|
|
4
4
|
"description": "Shared webpieces.config.json loader. Single source of truth for validation rule configuration consumed by @webpieces/ai-hook-rules, @webpieces/code-rules, and @webpieces/nx-webpieces-rules.",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The KEY NAMES, the ALLOW-LISTS and the DEFAULTS of `~/.webpieces/config.json` — split out of
|
|
3
|
+
* `home-config.ts` for the same reason `home-config-doc-keys.ts` and `home-config-retired-keys.ts`
|
|
4
|
+
* already were: the loader and the vocabulary it validates against are two different things, and only
|
|
5
|
+
* one of them grows every time somebody adds a flag.
|
|
6
|
+
*
|
|
7
|
+
* `home-config.ts` RE-EXPORTS every name here, so this file is an implementation detail of that module
|
|
8
|
+
* and NOT a second import path. The barrel (`src/index.ts`) still exports these from `./home-config`,
|
|
9
|
+
* which is the one public spelling.
|
|
10
|
+
*
|
|
11
|
+
* Read `home-config.ts`'s own class docblock FIRST. It carries the two rules that govern everything
|
|
12
|
+
* below and are not negotiable: no key here may ever be REQUIRED, and an unknown key is IGNORED rather
|
|
13
|
+
* than rejected — because this document is MACHINE-GLOBAL and the repos reading it pin different
|
|
14
|
+
* releases.
|
|
15
|
+
*/
|
|
16
|
+
export declare const HOME_CONFIG_DIR = ".webpieces";
|
|
17
|
+
export declare const HOME_CONFIG_FILE = "config.json";
|
|
18
|
+
export declare const HOME_EXPERIMENTAL_SECTION = "experimental";
|
|
19
|
+
export declare const HOME_KEY_WHOLE_REPO_BUILD_GUARD = "whole-repo-build-guard";
|
|
20
|
+
export declare const HOME_KEY_ORPHAN_DIR_SWEEP = "orphan-dir-sweep";
|
|
21
|
+
/**
|
|
22
|
+
* ─── THE KILL SWITCH FOR EVERY PR-GATE REVIEWER. READ THIS BEFORE YOU TOUCH THE KEY. ──────────────────
|
|
23
|
+
*
|
|
24
|
+
* When a machine writes `{"experimental": {"turnOffAllReviewers": true}}` into
|
|
25
|
+
* `~/.webpieces/config.json`, `ChecklistScanner.scan` returns NO applicable checklists, so
|
|
26
|
+
* `wp-review-upsert-pr` briefs and names no reviewer subagent and `wp-finish-upsert-pr` has nothing
|
|
27
|
+
* outstanding to block on. The review product becomes the dashboard, and nothing else.
|
|
28
|
+
*
|
|
29
|
+
* 1. IT LIVES ONLY HERE. There is deliberately NO `webpieces.config.json` entry for it, and there must
|
|
30
|
+
* never be one. Do not "make it configurable per repo"; that request is the defect, not the feature.
|
|
31
|
+
*
|
|
32
|
+
* 2. IT IS A KILL SWITCH, NOT A FILTER. It suppresses ALL reviewers — the REQUIRED checklists included.
|
|
33
|
+
* That is the whole point: the required set is most of the token cost, so a half-measure that spared
|
|
34
|
+
* them would save nothing and would still have to be explained. It does not narrow, re-order or
|
|
35
|
+
* re-scope anything; it is on or it is off.
|
|
36
|
+
*
|
|
37
|
+
* 3. WHY A TRACKED REPO KEY IS UNACCEPTABLE. `webpieces.config.json` is TRACKED, so a key there rides in
|
|
38
|
+
* a BRANCH — and a branch that can switch off its own required reviewers is a branch that reviews
|
|
39
|
+
* itself. The required checklists exist precisely to be the one thing a diff cannot talk its way past;
|
|
40
|
+
* putting their off-switch inside the diff's own repo hands every future PR the ability to disable the
|
|
41
|
+
* gate that judges it. That is not a config preference, it is a hole in the gate. This file is
|
|
42
|
+
* machine-local, untracked, hand-authored and outside every repo, so a value here is ONE person's
|
|
43
|
+
* decision about their OWN machine and it cannot travel in a pull request.
|
|
44
|
+
* The precedent is `whole-repo-build-guard`, retired as a repo key one release after it shipped (see
|
|
45
|
+
* `RETIRED_CONFIG_KEYS`) and living only here since. This key is the same shape with a sharper edge,
|
|
46
|
+
* because what it disables IS the review gate rather than a build convenience.
|
|
47
|
+
*
|
|
48
|
+
* 4. IT IS AN `experimental.*` FLAG, so `.claude/rules/experiments.md` applies in full: an AI may never
|
|
49
|
+
* DELETE it, RENAME it, NARROW what it controls, flip its default to ON, or make EITHER branch
|
|
50
|
+
* unconditional. Only a human ends an experiment, and your own reasoning is never that human. If it
|
|
51
|
+
* looks finished, say so and leave the key alone.
|
|
52
|
+
*
|
|
53
|
+
* 5. IT IS NEVER QUIET. An unreviewed PR must not read as a reviewed one, so the suppression is stated in
|
|
54
|
+
* stage ②'s output, on the dashboard, and in the PR body — which is the squash-merge commit body, and
|
|
55
|
+
* therefore the only record that outlives the branch. Do not remove those, either.
|
|
56
|
+
*/
|
|
57
|
+
export declare const HOME_KEY_TURN_OFF_ALL_REVIEWERS = "turnOffAllReviewers";
|
|
58
|
+
/**
|
|
59
|
+
* How many builds may be live on this machine before `pnpm wp-build` refuses to start another. The FIRST
|
|
60
|
+
* NUMERIC key in this file — see `readOptionalPositiveInteger` for why "known key, wrong type → REJECT"
|
|
61
|
+
* applies to it exactly as it applies to the booleans.
|
|
62
|
+
*/
|
|
63
|
+
export declare const HOME_KEY_MAX_CONCURRENT_BUILDS = "maxConcurrentBuilds";
|
|
64
|
+
/**
|
|
65
|
+
* EVERY key's value when it is not named — including on the machine with no such file at all, which is
|
|
66
|
+
* essentially every machine. False, for all of them, with no exceptions and no per-key table.
|
|
67
|
+
*
|
|
68
|
+
* That uniformity is the policy, not a coincidence: every `experimental.*` flag ships OFF and stays OFF
|
|
69
|
+
* for two years, so "this machine never opted in" is byte-for-byte the behaviour of having no file. ON
|
|
70
|
+
* requires an explicit `true`; absent, and an explicit `false`, are the same state.
|
|
71
|
+
*
|
|
72
|
+
* Named rather than written as a bare `false` at each call site so the reason travels with the value —
|
|
73
|
+
* and there is deliberately exactly ONE such constant, because a second one would be a second place a
|
|
74
|
+
* default is stated, free to disagree with this one.
|
|
75
|
+
*/
|
|
76
|
+
export declare const GUARD_OFF_WHEN_ABSENT = false;
|
|
77
|
+
/**
|
|
78
|
+
* The one NON-boolean default, and the one key whose absent value is not `GUARD_OFF_WHEN_ABSENT`.
|
|
79
|
+
*
|
|
80
|
+
* Three, because contention between agents running full sweeps at once was measured at ~3.2x total test
|
|
81
|
+
* time (`.claude/rules/build-verification.md` § "What actually makes builds slow"), and a fourth simultaneous build
|
|
82
|
+
* is well past the
|
|
83
|
+
* point where anybody gains anything. It is a NUMBER rather than an on/off flag because the useful
|
|
84
|
+
* machine-to-machine difference here is core count, not opinion — which is also why it is the one key in
|
|
85
|
+
* this file with a non-false default: "0 builds allowed" would be a machine that cannot build at all.
|
|
86
|
+
*/
|
|
87
|
+
export declare const DEFAULT_MAX_CONCURRENT_BUILDS = 3;
|
|
88
|
+
/**
|
|
89
|
+
* The complete UNDERSTOOD shape. A key not on these lists is ignored with a warning rather than
|
|
90
|
+
* rejected (see the class docblock: this document is machine-global and older releases must survive
|
|
91
|
+
* meeting a newer release's key), so adding a key still means adding it here — a key absent from these
|
|
92
|
+
* lists is never read at all, and the flag it was meant to set keeps the default above.
|
|
93
|
+
*
|
|
94
|
+
* EXPORTED so `home-config.spec.ts` can ENUMERATE them rather than restate them. The cross-version
|
|
95
|
+
* invariant ("every key is independently omittable") is only as good as the list the test walks, and a
|
|
96
|
+
* hand-written copy of that list means a NEW key silently escapes the invariant on the day it is added —
|
|
97
|
+
* which is the one failure mode nobody would notice until an older release started rejecting files.
|
|
98
|
+
* Walking the real constant makes the test cover a new key the moment it appears here.
|
|
99
|
+
*/
|
|
100
|
+
/**
|
|
101
|
+
* The SETTINGS only. Documentation keys are deliberately NOT here: these lists are walked to build
|
|
102
|
+
* sample documents and to assert cross-version invariants, and every entry is assumed to be a setting
|
|
103
|
+
* with a typed value. `warnUnknownKeys` accepts the documentation keys separately, everywhere.
|
|
104
|
+
*/
|
|
105
|
+
export declare const ALLOWED_TOP_LEVEL: readonly string[];
|
|
106
|
+
/**
|
|
107
|
+
* The understood `experimental.*` keys, SPLIT BY VALUE TYPE — because the spec walks these lists to build
|
|
108
|
+
* a sample document, and a sample that wrote `false` into a numeric key would be rejected by the very
|
|
109
|
+
* loader it is testing. Splitting them means a key added to either list is covered by the cross-version
|
|
110
|
+
* invariants automatically, with the right sample value, which is the whole reason the lists are exported.
|
|
111
|
+
*
|
|
112
|
+
* `ALLOWED_EXPERIMENTAL` stays the ONE list the validator warns against — derived from the two, never
|
|
113
|
+
* hand-maintained beside them, so it cannot fall out of step.
|
|
114
|
+
*/
|
|
115
|
+
/**
|
|
116
|
+
* ─── ONLY A HUMAN ENDS AN EXPERIMENT ──────────────────────────────────────────────────────────────
|
|
117
|
+
*
|
|
118
|
+
* An AI agent may ADD a flag to these lists. It may NEVER DELETE one, and may never make a flagged
|
|
119
|
+
* behaviour unconditional — however settled it looks, however old the flag is, however good the
|
|
120
|
+
* reasoning. Ending an experiment judges evidence that lives on someone else's machine.
|
|
121
|
+
*
|
|
122
|
+
* From a live incident: PR #711 deleted `buildGateLogCapture` and made capture unconditional. Its
|
|
123
|
+
* owner's config said `true`, and after that release the opt-in silently meant nothing. Note the
|
|
124
|
+
* shape — that file says "AI: DO NOT EDIT this file!!", and the agent never touched it; it deleted
|
|
125
|
+
* the key from the CODE, which has the identical effect from the owner's seat. A rule protecting a
|
|
126
|
+
* FILE does not protect the SETTING it selects.
|
|
127
|
+
*
|
|
128
|
+
* If you believe an experiment should end, SAY SO and leave the flag alone.
|
|
129
|
+
* `.claude/rules/experiments.md` §"ONLY A HUMAN ENDS AN EXPERIMENT" carries the full rule and what a
|
|
130
|
+
* human-ended retirement looks like.
|
|
131
|
+
*/
|
|
132
|
+
export declare const ALLOWED_EXPERIMENTAL_BOOLEANS: readonly string[];
|
|
133
|
+
export declare const ALLOWED_EXPERIMENTAL_NUMBERS: readonly string[];
|
|
134
|
+
export declare const ALLOWED_EXPERIMENTAL: readonly string[];
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ALLOWED_EXPERIMENTAL = exports.ALLOWED_EXPERIMENTAL_NUMBERS = exports.ALLOWED_EXPERIMENTAL_BOOLEANS = exports.ALLOWED_TOP_LEVEL = exports.DEFAULT_MAX_CONCURRENT_BUILDS = exports.GUARD_OFF_WHEN_ABSENT = exports.HOME_KEY_MAX_CONCURRENT_BUILDS = exports.HOME_KEY_TURN_OFF_ALL_REVIEWERS = exports.HOME_KEY_ORPHAN_DIR_SWEEP = exports.HOME_KEY_WHOLE_REPO_BUILD_GUARD = exports.HOME_EXPERIMENTAL_SECTION = exports.HOME_CONFIG_FILE = exports.HOME_CONFIG_DIR = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* The KEY NAMES, the ALLOW-LISTS and the DEFAULTS of `~/.webpieces/config.json` — split out of
|
|
6
|
+
* `home-config.ts` for the same reason `home-config-doc-keys.ts` and `home-config-retired-keys.ts`
|
|
7
|
+
* already were: the loader and the vocabulary it validates against are two different things, and only
|
|
8
|
+
* one of them grows every time somebody adds a flag.
|
|
9
|
+
*
|
|
10
|
+
* `home-config.ts` RE-EXPORTS every name here, so this file is an implementation detail of that module
|
|
11
|
+
* and NOT a second import path. The barrel (`src/index.ts`) still exports these from `./home-config`,
|
|
12
|
+
* which is the one public spelling.
|
|
13
|
+
*
|
|
14
|
+
* Read `home-config.ts`'s own class docblock FIRST. It carries the two rules that govern everything
|
|
15
|
+
* below and are not negotiable: no key here may ever be REQUIRED, and an unknown key is IGNORED rather
|
|
16
|
+
* than rejected — because this document is MACHINE-GLOBAL and the repos reading it pin different
|
|
17
|
+
* releases.
|
|
18
|
+
*/
|
|
19
|
+
exports.HOME_CONFIG_DIR = '.webpieces';
|
|
20
|
+
exports.HOME_CONFIG_FILE = 'config.json';
|
|
21
|
+
// The `experimental` section and its keys. Named as constants because both the validator and its error
|
|
22
|
+
// text must spell them identically — a validator whose message names a different key than the one it
|
|
23
|
+
// checks is worse than no message.
|
|
24
|
+
exports.HOME_EXPERIMENTAL_SECTION = 'experimental';
|
|
25
|
+
// The on/off switch for `whole-repo-build-guard`. Spelled with the GUARD's own name, hyphens and all,
|
|
26
|
+
// so `grep -rn whole-repo-build-guard` finds the switch beside the guard — and so nobody has to learn a
|
|
27
|
+
// second name for one thing.
|
|
28
|
+
//
|
|
29
|
+
// `buildGateLogCapture` used to sit beside it and is GONE: capturing the build's output to a file is now
|
|
30
|
+
// what the gate always does (see BuildAffected.runBuildGate), so the flag had nothing left to switch. It
|
|
31
|
+
// is deliberately NOT in RETIRED_HOME_CONFIG_KEYS — a retired key here is a HARD FAILURE on exact match,
|
|
32
|
+
// and this file is machine-global and hand-authored, so a machine that opted INTO a behaviour it now
|
|
33
|
+
// gets unconditionally must not have its shell broken for saying yes early. It falls through to the
|
|
34
|
+
// unknown-key WARNING instead, which says the key had no effect and names what is understood.
|
|
35
|
+
exports.HOME_KEY_WHOLE_REPO_BUILD_GUARD = 'whole-repo-build-guard';
|
|
36
|
+
// The on/off switch for the orphan-directory sweep `wp-sync-main` runs. Named for the thing
|
|
37
|
+
// it switches, exactly as the guard key above is — one name, greppable from either end.
|
|
38
|
+
exports.HOME_KEY_ORPHAN_DIR_SWEEP = 'orphan-dir-sweep';
|
|
39
|
+
/**
|
|
40
|
+
* ─── THE KILL SWITCH FOR EVERY PR-GATE REVIEWER. READ THIS BEFORE YOU TOUCH THE KEY. ──────────────────
|
|
41
|
+
*
|
|
42
|
+
* When a machine writes `{"experimental": {"turnOffAllReviewers": true}}` into
|
|
43
|
+
* `~/.webpieces/config.json`, `ChecklistScanner.scan` returns NO applicable checklists, so
|
|
44
|
+
* `wp-review-upsert-pr` briefs and names no reviewer subagent and `wp-finish-upsert-pr` has nothing
|
|
45
|
+
* outstanding to block on. The review product becomes the dashboard, and nothing else.
|
|
46
|
+
*
|
|
47
|
+
* 1. IT LIVES ONLY HERE. There is deliberately NO `webpieces.config.json` entry for it, and there must
|
|
48
|
+
* never be one. Do not "make it configurable per repo"; that request is the defect, not the feature.
|
|
49
|
+
*
|
|
50
|
+
* 2. IT IS A KILL SWITCH, NOT A FILTER. It suppresses ALL reviewers — the REQUIRED checklists included.
|
|
51
|
+
* That is the whole point: the required set is most of the token cost, so a half-measure that spared
|
|
52
|
+
* them would save nothing and would still have to be explained. It does not narrow, re-order or
|
|
53
|
+
* re-scope anything; it is on or it is off.
|
|
54
|
+
*
|
|
55
|
+
* 3. WHY A TRACKED REPO KEY IS UNACCEPTABLE. `webpieces.config.json` is TRACKED, so a key there rides in
|
|
56
|
+
* a BRANCH — and a branch that can switch off its own required reviewers is a branch that reviews
|
|
57
|
+
* itself. The required checklists exist precisely to be the one thing a diff cannot talk its way past;
|
|
58
|
+
* putting their off-switch inside the diff's own repo hands every future PR the ability to disable the
|
|
59
|
+
* gate that judges it. That is not a config preference, it is a hole in the gate. This file is
|
|
60
|
+
* machine-local, untracked, hand-authored and outside every repo, so a value here is ONE person's
|
|
61
|
+
* decision about their OWN machine and it cannot travel in a pull request.
|
|
62
|
+
* The precedent is `whole-repo-build-guard`, retired as a repo key one release after it shipped (see
|
|
63
|
+
* `RETIRED_CONFIG_KEYS`) and living only here since. This key is the same shape with a sharper edge,
|
|
64
|
+
* because what it disables IS the review gate rather than a build convenience.
|
|
65
|
+
*
|
|
66
|
+
* 4. IT IS AN `experimental.*` FLAG, so `.claude/rules/experiments.md` applies in full: an AI may never
|
|
67
|
+
* DELETE it, RENAME it, NARROW what it controls, flip its default to ON, or make EITHER branch
|
|
68
|
+
* unconditional. Only a human ends an experiment, and your own reasoning is never that human. If it
|
|
69
|
+
* looks finished, say so and leave the key alone.
|
|
70
|
+
*
|
|
71
|
+
* 5. IT IS NEVER QUIET. An unreviewed PR must not read as a reviewed one, so the suppression is stated in
|
|
72
|
+
* stage ②'s output, on the dashboard, and in the PR body — which is the squash-merge commit body, and
|
|
73
|
+
* therefore the only record that outlives the branch. Do not remove those, either.
|
|
74
|
+
*/
|
|
75
|
+
exports.HOME_KEY_TURN_OFF_ALL_REVIEWERS = 'turnOffAllReviewers';
|
|
76
|
+
/**
|
|
77
|
+
* How many builds may be live on this machine before `pnpm wp-build` refuses to start another. The FIRST
|
|
78
|
+
* NUMERIC key in this file — see `readOptionalPositiveInteger` for why "known key, wrong type → REJECT"
|
|
79
|
+
* applies to it exactly as it applies to the booleans.
|
|
80
|
+
*/
|
|
81
|
+
exports.HOME_KEY_MAX_CONCURRENT_BUILDS = 'maxConcurrentBuilds';
|
|
82
|
+
/**
|
|
83
|
+
* EVERY key's value when it is not named — including on the machine with no such file at all, which is
|
|
84
|
+
* essentially every machine. False, for all of them, with no exceptions and no per-key table.
|
|
85
|
+
*
|
|
86
|
+
* That uniformity is the policy, not a coincidence: every `experimental.*` flag ships OFF and stays OFF
|
|
87
|
+
* for two years, so "this machine never opted in" is byte-for-byte the behaviour of having no file. ON
|
|
88
|
+
* requires an explicit `true`; absent, and an explicit `false`, are the same state.
|
|
89
|
+
*
|
|
90
|
+
* Named rather than written as a bare `false` at each call site so the reason travels with the value —
|
|
91
|
+
* and there is deliberately exactly ONE such constant, because a second one would be a second place a
|
|
92
|
+
* default is stated, free to disagree with this one.
|
|
93
|
+
*/
|
|
94
|
+
exports.GUARD_OFF_WHEN_ABSENT = false;
|
|
95
|
+
/**
|
|
96
|
+
* The one NON-boolean default, and the one key whose absent value is not `GUARD_OFF_WHEN_ABSENT`.
|
|
97
|
+
*
|
|
98
|
+
* Three, because contention between agents running full sweeps at once was measured at ~3.2x total test
|
|
99
|
+
* time (`.claude/rules/build-verification.md` § "What actually makes builds slow"), and a fourth simultaneous build
|
|
100
|
+
* is well past the
|
|
101
|
+
* point where anybody gains anything. It is a NUMBER rather than an on/off flag because the useful
|
|
102
|
+
* machine-to-machine difference here is core count, not opinion — which is also why it is the one key in
|
|
103
|
+
* this file with a non-false default: "0 builds allowed" would be a machine that cannot build at all.
|
|
104
|
+
*/
|
|
105
|
+
exports.DEFAULT_MAX_CONCURRENT_BUILDS = 3;
|
|
106
|
+
/**
|
|
107
|
+
* The complete UNDERSTOOD shape. A key not on these lists is ignored with a warning rather than
|
|
108
|
+
* rejected (see the class docblock: this document is machine-global and older releases must survive
|
|
109
|
+
* meeting a newer release's key), so adding a key still means adding it here — a key absent from these
|
|
110
|
+
* lists is never read at all, and the flag it was meant to set keeps the default above.
|
|
111
|
+
*
|
|
112
|
+
* EXPORTED so `home-config.spec.ts` can ENUMERATE them rather than restate them. The cross-version
|
|
113
|
+
* invariant ("every key is independently omittable") is only as good as the list the test walks, and a
|
|
114
|
+
* hand-written copy of that list means a NEW key silently escapes the invariant on the day it is added —
|
|
115
|
+
* which is the one failure mode nobody would notice until an older release started rejecting files.
|
|
116
|
+
* Walking the real constant makes the test cover a new key the moment it appears here.
|
|
117
|
+
*/
|
|
118
|
+
/**
|
|
119
|
+
* The SETTINGS only. Documentation keys are deliberately NOT here: these lists are walked to build
|
|
120
|
+
* sample documents and to assert cross-version invariants, and every entry is assumed to be a setting
|
|
121
|
+
* with a typed value. `warnUnknownKeys` accepts the documentation keys separately, everywhere.
|
|
122
|
+
*/
|
|
123
|
+
exports.ALLOWED_TOP_LEVEL = [exports.HOME_EXPERIMENTAL_SECTION];
|
|
124
|
+
/**
|
|
125
|
+
* The understood `experimental.*` keys, SPLIT BY VALUE TYPE — because the spec walks these lists to build
|
|
126
|
+
* a sample document, and a sample that wrote `false` into a numeric key would be rejected by the very
|
|
127
|
+
* loader it is testing. Splitting them means a key added to either list is covered by the cross-version
|
|
128
|
+
* invariants automatically, with the right sample value, which is the whole reason the lists are exported.
|
|
129
|
+
*
|
|
130
|
+
* `ALLOWED_EXPERIMENTAL` stays the ONE list the validator warns against — derived from the two, never
|
|
131
|
+
* hand-maintained beside them, so it cannot fall out of step.
|
|
132
|
+
*/
|
|
133
|
+
/**
|
|
134
|
+
* ─── ONLY A HUMAN ENDS AN EXPERIMENT ──────────────────────────────────────────────────────────────
|
|
135
|
+
*
|
|
136
|
+
* An AI agent may ADD a flag to these lists. It may NEVER DELETE one, and may never make a flagged
|
|
137
|
+
* behaviour unconditional — however settled it looks, however old the flag is, however good the
|
|
138
|
+
* reasoning. Ending an experiment judges evidence that lives on someone else's machine.
|
|
139
|
+
*
|
|
140
|
+
* From a live incident: PR #711 deleted `buildGateLogCapture` and made capture unconditional. Its
|
|
141
|
+
* owner's config said `true`, and after that release the opt-in silently meant nothing. Note the
|
|
142
|
+
* shape — that file says "AI: DO NOT EDIT this file!!", and the agent never touched it; it deleted
|
|
143
|
+
* the key from the CODE, which has the identical effect from the owner's seat. A rule protecting a
|
|
144
|
+
* FILE does not protect the SETTING it selects.
|
|
145
|
+
*
|
|
146
|
+
* If you believe an experiment should end, SAY SO and leave the flag alone.
|
|
147
|
+
* `.claude/rules/experiments.md` §"ONLY A HUMAN ENDS AN EXPERIMENT" carries the full rule and what a
|
|
148
|
+
* human-ended retirement looks like.
|
|
149
|
+
*/
|
|
150
|
+
exports.ALLOWED_EXPERIMENTAL_BOOLEANS = [
|
|
151
|
+
exports.HOME_KEY_WHOLE_REPO_BUILD_GUARD, exports.HOME_KEY_ORPHAN_DIR_SWEEP, exports.HOME_KEY_TURN_OFF_ALL_REVIEWERS,
|
|
152
|
+
];
|
|
153
|
+
exports.ALLOWED_EXPERIMENTAL_NUMBERS = [exports.HOME_KEY_MAX_CONCURRENT_BUILDS];
|
|
154
|
+
exports.ALLOWED_EXPERIMENTAL = [
|
|
155
|
+
...exports.ALLOWED_EXPERIMENTAL_BOOLEANS, ...exports.ALLOWED_EXPERIMENTAL_NUMBERS,
|
|
156
|
+
];
|
|
157
|
+
//# sourceMappingURL=home-config-keys.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"home-config-keys.js","sourceRoot":"","sources":["../../../../../packages/tooling/rules-config/src/home-config-keys.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACU,QAAA,eAAe,GAAG,YAAY,CAAC;AAC/B,QAAA,gBAAgB,GAAG,aAAa,CAAC;AAE9C,uGAAuG;AACvG,qGAAqG;AACrG,mCAAmC;AACtB,QAAA,yBAAyB,GAAG,cAAc,CAAC;AACxD,sGAAsG;AACtG,wGAAwG;AACxG,6BAA6B;AAC7B,EAAE;AACF,yGAAyG;AACzG,yGAAyG;AACzG,yGAAyG;AACzG,qGAAqG;AACrG,oGAAoG;AACpG,8FAA8F;AACjF,QAAA,+BAA+B,GAAG,wBAAwB,CAAC;AACxE,4FAA4F;AAC5F,wFAAwF;AAC3E,QAAA,yBAAyB,GAAG,kBAAkB,CAAC;AAC5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACU,QAAA,+BAA+B,GAAG,qBAAqB,CAAC;AACrE;;;;GAIG;AACU,QAAA,8BAA8B,GAAG,qBAAqB,CAAC;AAEpE;;;;;;;;;;;GAWG;AACU,QAAA,qBAAqB,GAAG,KAAK,CAAC;AAE3C;;;;;;;;;GASG;AACU,QAAA,6BAA6B,GAAG,CAAC,CAAC;AAE/C;;;;;;;;;;;GAWG;AAEH;;;;GAIG;AACU,QAAA,iBAAiB,GAAsB,CAAC,iCAAyB,CAAC,CAAC;AAChF;;;;;;;;GAQG;AACH;;;;;;;;;;;;;;;;GAgBG;AACU,QAAA,6BAA6B,GAAsB;IAC5D,uCAA+B,EAAE,iCAAyB,EAAE,uCAA+B;CAC9F,CAAC;AACW,QAAA,4BAA4B,GAAsB,CAAC,sCAA8B,CAAC,CAAC;AACnF,QAAA,oBAAoB,GAAsB;IACnD,GAAG,qCAA6B,EAAE,GAAG,oCAA4B;CACpE,CAAC","sourcesContent":["/**\n * The KEY NAMES, the ALLOW-LISTS and the DEFAULTS of `~/.webpieces/config.json` — split out of\n * `home-config.ts` for the same reason `home-config-doc-keys.ts` and `home-config-retired-keys.ts`\n * already were: the loader and the vocabulary it validates against are two different things, and only\n * one of them grows every time somebody adds a flag.\n *\n * `home-config.ts` RE-EXPORTS every name here, so this file is an implementation detail of that module\n * and NOT a second import path. The barrel (`src/index.ts`) still exports these from `./home-config`,\n * which is the one public spelling.\n *\n * Read `home-config.ts`'s own class docblock FIRST. It carries the two rules that govern everything\n * below and are not negotiable: no key here may ever be REQUIRED, and an unknown key is IGNORED rather\n * than rejected — because this document is MACHINE-GLOBAL and the repos reading it pin different\n * releases.\n */\nexport const HOME_CONFIG_DIR = '.webpieces';\nexport const HOME_CONFIG_FILE = 'config.json';\n\n// The `experimental` section and its keys. Named as constants because both the validator and its error\n// text must spell them identically — a validator whose message names a different key than the one it\n// checks is worse than no message.\nexport const HOME_EXPERIMENTAL_SECTION = 'experimental';\n// The on/off switch for `whole-repo-build-guard`. Spelled with the GUARD's own name, hyphens and all,\n// so `grep -rn whole-repo-build-guard` finds the switch beside the guard — and so nobody has to learn a\n// second name for one thing.\n//\n// `buildGateLogCapture` used to sit beside it and is GONE: capturing the build's output to a file is now\n// what the gate always does (see BuildAffected.runBuildGate), so the flag had nothing left to switch. It\n// is deliberately NOT in RETIRED_HOME_CONFIG_KEYS — a retired key here is a HARD FAILURE on exact match,\n// and this file is machine-global and hand-authored, so a machine that opted INTO a behaviour it now\n// gets unconditionally must not have its shell broken for saying yes early. It falls through to the\n// unknown-key WARNING instead, which says the key had no effect and names what is understood.\nexport const HOME_KEY_WHOLE_REPO_BUILD_GUARD = 'whole-repo-build-guard';\n// The on/off switch for the orphan-directory sweep `wp-sync-main` runs. Named for the thing\n// it switches, exactly as the guard key above is — one name, greppable from either end.\nexport const HOME_KEY_ORPHAN_DIR_SWEEP = 'orphan-dir-sweep';\n/**\n * ─── THE KILL SWITCH FOR EVERY PR-GATE REVIEWER. READ THIS BEFORE YOU TOUCH THE KEY. ──────────────────\n *\n * When a machine writes `{\"experimental\": {\"turnOffAllReviewers\": true}}` into\n * `~/.webpieces/config.json`, `ChecklistScanner.scan` returns NO applicable checklists, so\n * `wp-review-upsert-pr` briefs and names no reviewer subagent and `wp-finish-upsert-pr` has nothing\n * outstanding to block on. The review product becomes the dashboard, and nothing else.\n *\n * 1. IT LIVES ONLY HERE. There is deliberately NO `webpieces.config.json` entry for it, and there must\n * never be one. Do not \"make it configurable per repo\"; that request is the defect, not the feature.\n *\n * 2. IT IS A KILL SWITCH, NOT A FILTER. It suppresses ALL reviewers — the REQUIRED checklists included.\n * That is the whole point: the required set is most of the token cost, so a half-measure that spared\n * them would save nothing and would still have to be explained. It does not narrow, re-order or\n * re-scope anything; it is on or it is off.\n *\n * 3. WHY A TRACKED REPO KEY IS UNACCEPTABLE. `webpieces.config.json` is TRACKED, so a key there rides in\n * a BRANCH — and a branch that can switch off its own required reviewers is a branch that reviews\n * itself. The required checklists exist precisely to be the one thing a diff cannot talk its way past;\n * putting their off-switch inside the diff's own repo hands every future PR the ability to disable the\n * gate that judges it. That is not a config preference, it is a hole in the gate. This file is\n * machine-local, untracked, hand-authored and outside every repo, so a value here is ONE person's\n * decision about their OWN machine and it cannot travel in a pull request.\n * The precedent is `whole-repo-build-guard`, retired as a repo key one release after it shipped (see\n * `RETIRED_CONFIG_KEYS`) and living only here since. This key is the same shape with a sharper edge,\n * because what it disables IS the review gate rather than a build convenience.\n *\n * 4. IT IS AN `experimental.*` FLAG, so `.claude/rules/experiments.md` applies in full: an AI may never\n * DELETE it, RENAME it, NARROW what it controls, flip its default to ON, or make EITHER branch\n * unconditional. Only a human ends an experiment, and your own reasoning is never that human. If it\n * looks finished, say so and leave the key alone.\n *\n * 5. IT IS NEVER QUIET. An unreviewed PR must not read as a reviewed one, so the suppression is stated in\n * stage ②'s output, on the dashboard, and in the PR body — which is the squash-merge commit body, and\n * therefore the only record that outlives the branch. Do not remove those, either.\n */\nexport const HOME_KEY_TURN_OFF_ALL_REVIEWERS = 'turnOffAllReviewers';\n/**\n * How many builds may be live on this machine before `pnpm wp-build` refuses to start another. The FIRST\n * NUMERIC key in this file — see `readOptionalPositiveInteger` for why \"known key, wrong type → REJECT\"\n * applies to it exactly as it applies to the booleans.\n */\nexport const HOME_KEY_MAX_CONCURRENT_BUILDS = 'maxConcurrentBuilds';\n\n/**\n * EVERY key's value when it is not named — including on the machine with no such file at all, which is\n * essentially every machine. False, for all of them, with no exceptions and no per-key table.\n *\n * That uniformity is the policy, not a coincidence: every `experimental.*` flag ships OFF and stays OFF\n * for two years, so \"this machine never opted in\" is byte-for-byte the behaviour of having no file. ON\n * requires an explicit `true`; absent, and an explicit `false`, are the same state.\n *\n * Named rather than written as a bare `false` at each call site so the reason travels with the value —\n * and there is deliberately exactly ONE such constant, because a second one would be a second place a\n * default is stated, free to disagree with this one.\n */\nexport const GUARD_OFF_WHEN_ABSENT = false;\n\n/**\n * The one NON-boolean default, and the one key whose absent value is not `GUARD_OFF_WHEN_ABSENT`.\n *\n * Three, because contention between agents running full sweeps at once was measured at ~3.2x total test\n * time (`.claude/rules/build-verification.md` § \"What actually makes builds slow\"), and a fourth simultaneous build\n * is well past the\n * point where anybody gains anything. It is a NUMBER rather than an on/off flag because the useful\n * machine-to-machine difference here is core count, not opinion — which is also why it is the one key in\n * this file with a non-false default: \"0 builds allowed\" would be a machine that cannot build at all.\n */\nexport const DEFAULT_MAX_CONCURRENT_BUILDS = 3;\n\n/**\n * The complete UNDERSTOOD shape. A key not on these lists is ignored with a warning rather than\n * rejected (see the class docblock: this document is machine-global and older releases must survive\n * meeting a newer release's key), so adding a key still means adding it here — a key absent from these\n * lists is never read at all, and the flag it was meant to set keeps the default above.\n *\n * EXPORTED so `home-config.spec.ts` can ENUMERATE them rather than restate them. The cross-version\n * invariant (\"every key is independently omittable\") is only as good as the list the test walks, and a\n * hand-written copy of that list means a NEW key silently escapes the invariant on the day it is added —\n * which is the one failure mode nobody would notice until an older release started rejecting files.\n * Walking the real constant makes the test cover a new key the moment it appears here.\n */\n\n/**\n * The SETTINGS only. Documentation keys are deliberately NOT here: these lists are walked to build\n * sample documents and to assert cross-version invariants, and every entry is assumed to be a setting\n * with a typed value. `warnUnknownKeys` accepts the documentation keys separately, everywhere.\n */\nexport const ALLOWED_TOP_LEVEL: readonly string[] = [HOME_EXPERIMENTAL_SECTION];\n/**\n * The understood `experimental.*` keys, SPLIT BY VALUE TYPE — because the spec walks these lists to build\n * a sample document, and a sample that wrote `false` into a numeric key would be rejected by the very\n * loader it is testing. Splitting them means a key added to either list is covered by the cross-version\n * invariants automatically, with the right sample value, which is the whole reason the lists are exported.\n *\n * `ALLOWED_EXPERIMENTAL` stays the ONE list the validator warns against — derived from the two, never\n * hand-maintained beside them, so it cannot fall out of step.\n */\n/**\n * ─── ONLY A HUMAN ENDS AN EXPERIMENT ──────────────────────────────────────────────────────────────\n *\n * An AI agent may ADD a flag to these lists. It may NEVER DELETE one, and may never make a flagged\n * behaviour unconditional — however settled it looks, however old the flag is, however good the\n * reasoning. Ending an experiment judges evidence that lives on someone else's machine.\n *\n * From a live incident: PR #711 deleted `buildGateLogCapture` and made capture unconditional. Its\n * owner's config said `true`, and after that release the opt-in silently meant nothing. Note the\n * shape — that file says \"AI: DO NOT EDIT this file!!\", and the agent never touched it; it deleted\n * the key from the CODE, which has the identical effect from the owner's seat. A rule protecting a\n * FILE does not protect the SETTING it selects.\n *\n * If you believe an experiment should end, SAY SO and leave the flag alone.\n * `.claude/rules/experiments.md` §\"ONLY A HUMAN ENDS AN EXPERIMENT\" carries the full rule and what a\n * human-ended retirement looks like.\n */\nexport const ALLOWED_EXPERIMENTAL_BOOLEANS: readonly string[] = [\n HOME_KEY_WHOLE_REPO_BUILD_GUARD, HOME_KEY_ORPHAN_DIR_SWEEP, HOME_KEY_TURN_OFF_ALL_REVIEWERS,\n];\nexport const ALLOWED_EXPERIMENTAL_NUMBERS: readonly string[] = [HOME_KEY_MAX_CONCURRENT_BUILDS];\nexport const ALLOWED_EXPERIMENTAL: readonly string[] = [\n ...ALLOWED_EXPERIMENTAL_BOOLEANS, ...ALLOWED_EXPERIMENTAL_NUMBERS,\n];\n\n"]}
|
package/src/home-config.d.ts
CHANGED
|
@@ -123,76 +123,15 @@ export { RetiredHomeConfigKey, RETIRED_HOME_CONFIG_KEYS, EndedExperiment, ENDED_
|
|
|
123
123
|
* defaults ON is not an experiment — it is a shipped behaviour that skipped its soak period, and it
|
|
124
124
|
* changes what every agent on every machine can do the moment they upgrade. Low uptake of an opt-in
|
|
125
125
|
* experiment is information ABOUT the experiment; it is not a licence to force it on everybody.
|
|
126
|
-
*/
|
|
127
|
-
export declare const HOME_CONFIG_DIR = ".webpieces";
|
|
128
|
-
export declare const HOME_CONFIG_FILE = "config.json";
|
|
129
|
-
export declare const HOME_EXPERIMENTAL_SECTION = "experimental";
|
|
130
|
-
export declare const HOME_KEY_WHOLE_REPO_BUILD_GUARD = "whole-repo-build-guard";
|
|
131
|
-
export declare const HOME_KEY_ORPHAN_DIR_SWEEP = "orphan-dir-sweep";
|
|
132
|
-
/**
|
|
133
|
-
* How many builds may be live on this machine before `pnpm wp-build` refuses to start another. The FIRST
|
|
134
|
-
* NUMERIC key in this file — see `readOptionalPositiveInteger` for why "known key, wrong type → REJECT"
|
|
135
|
-
* applies to it exactly as it applies to the booleans.
|
|
136
|
-
*/
|
|
137
|
-
export declare const HOME_KEY_MAX_CONCURRENT_BUILDS = "maxConcurrentBuilds";
|
|
138
|
-
/**
|
|
139
|
-
* The one NON-boolean default, and the one key whose absent value is not `GUARD_OFF_WHEN_ABSENT`.
|
|
140
126
|
*
|
|
141
|
-
*
|
|
142
|
-
*
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
*
|
|
146
|
-
*
|
|
127
|
+
* ─── WHERE THE KEY NAMES LIVE ─────────────────────────────────────────────────────────────────────────
|
|
128
|
+
* The key constants, the allow-lists and the declared defaults are in `home-config-keys.ts` — split out
|
|
129
|
+
* when this file hit its line limit, exactly as `home-config-doc-keys.ts` and
|
|
130
|
+
* `home-config-retired-keys.ts` were before it. They are RE-EXPORTED below, so `./home-config` remains
|
|
131
|
+
* the one import path and nothing outside this module names the split. The per-key documentation moved
|
|
132
|
+
* WITH the keys; read it there.
|
|
147
133
|
*/
|
|
148
|
-
export
|
|
149
|
-
/**
|
|
150
|
-
* The complete UNDERSTOOD shape. A key not on these lists is ignored with a warning rather than
|
|
151
|
-
* rejected (see the class docblock: this document is machine-global and older releases must survive
|
|
152
|
-
* meeting a newer release's key), so adding a key still means adding it here — a key absent from these
|
|
153
|
-
* lists is never read at all, and the flag it was meant to set keeps the default above.
|
|
154
|
-
*
|
|
155
|
-
* EXPORTED so `home-config.spec.ts` can ENUMERATE them rather than restate them. The cross-version
|
|
156
|
-
* invariant ("every key is independently omittable") is only as good as the list the test walks, and a
|
|
157
|
-
* hand-written copy of that list means a NEW key silently escapes the invariant on the day it is added —
|
|
158
|
-
* which is the one failure mode nobody would notice until an older release started rejecting files.
|
|
159
|
-
* Walking the real constant makes the test cover a new key the moment it appears here.
|
|
160
|
-
*/
|
|
161
|
-
/**
|
|
162
|
-
* The SETTINGS only. Documentation keys are deliberately NOT here: these lists are walked to build
|
|
163
|
-
* sample documents and to assert cross-version invariants, and every entry is assumed to be a setting
|
|
164
|
-
* with a typed value. `warnUnknownKeys` accepts the documentation keys separately, everywhere.
|
|
165
|
-
*/
|
|
166
|
-
export declare const ALLOWED_TOP_LEVEL: readonly string[];
|
|
167
|
-
/**
|
|
168
|
-
* The understood `experimental.*` keys, SPLIT BY VALUE TYPE — because the spec walks these lists to build
|
|
169
|
-
* a sample document, and a sample that wrote `false` into a numeric key would be rejected by the very
|
|
170
|
-
* loader it is testing. Splitting them means a key added to either list is covered by the cross-version
|
|
171
|
-
* invariants automatically, with the right sample value, which is the whole reason the lists are exported.
|
|
172
|
-
*
|
|
173
|
-
* `ALLOWED_EXPERIMENTAL` stays the ONE list the validator warns against — derived from the two, never
|
|
174
|
-
* hand-maintained beside them, so it cannot fall out of step.
|
|
175
|
-
*/
|
|
176
|
-
/**
|
|
177
|
-
* ─── ONLY A HUMAN ENDS AN EXPERIMENT ──────────────────────────────────────────────────────────────
|
|
178
|
-
*
|
|
179
|
-
* An AI agent may ADD a flag to these lists. It may NEVER DELETE one, and may never make a flagged
|
|
180
|
-
* behaviour unconditional — however settled it looks, however old the flag is, however good the
|
|
181
|
-
* reasoning. Ending an experiment judges evidence that lives on someone else's machine.
|
|
182
|
-
*
|
|
183
|
-
* From a live incident: PR #711 deleted `buildGateLogCapture` and made capture unconditional. Its
|
|
184
|
-
* owner's config said `true`, and after that release the opt-in silently meant nothing. Note the
|
|
185
|
-
* shape — that file says "AI: DO NOT EDIT this file!!", and the agent never touched it; it deleted
|
|
186
|
-
* the key from the CODE, which has the identical effect from the owner's seat. A rule protecting a
|
|
187
|
-
* FILE does not protect the SETTING it selects.
|
|
188
|
-
*
|
|
189
|
-
* If you believe an experiment should end, SAY SO and leave the flag alone.
|
|
190
|
-
* `.claude/rules/experiments.md` §"ONLY A HUMAN ENDS AN EXPERIMENT" carries the full rule and what a
|
|
191
|
-
* human-ended retirement looks like.
|
|
192
|
-
*/
|
|
193
|
-
export declare const ALLOWED_EXPERIMENTAL_BOOLEANS: readonly string[];
|
|
194
|
-
export declare const ALLOWED_EXPERIMENTAL_NUMBERS: readonly string[];
|
|
195
|
-
export declare const ALLOWED_EXPERIMENTAL: readonly string[];
|
|
134
|
+
export { HOME_CONFIG_DIR, HOME_CONFIG_FILE, HOME_EXPERIMENTAL_SECTION, HOME_KEY_WHOLE_REPO_BUILD_GUARD, HOME_KEY_ORPHAN_DIR_SWEEP, HOME_KEY_TURN_OFF_ALL_REVIEWERS, HOME_KEY_MAX_CONCURRENT_BUILDS, DEFAULT_MAX_CONCURRENT_BUILDS, ALLOWED_TOP_LEVEL, ALLOWED_EXPERIMENTAL_BOOLEANS, ALLOWED_EXPERIMENTAL_NUMBERS, ALLOWED_EXPERIMENTAL, } from './home-config-keys';
|
|
196
135
|
/** The parsed `~/.webpieces/config.json`. Data-only (per CLAUDE.md — classes, not interfaces, for data). */
|
|
197
136
|
export declare class HomeConfig {
|
|
198
137
|
/**
|
|
@@ -233,7 +172,25 @@ export declare class HomeConfig {
|
|
|
233
172
|
* you wedge a PR — though their builds do count toward what refuses an ad-hoc `wp-build`.
|
|
234
173
|
*/
|
|
235
174
|
maxConcurrentBuilds: number;
|
|
236
|
-
|
|
175
|
+
/**
|
|
176
|
+
* EXPERIMENTAL, and OFF unless this machine opts IN with an explicit `true`. When true, the PR gate
|
|
177
|
+
* spawns NO reviewer subagents AT ALL — the REQUIRED checklists included — and the dashboard becomes
|
|
178
|
+
* the entire review product. False, absent, and no file at all are byte-for-byte today's behaviour.
|
|
179
|
+
*
|
|
180
|
+
* THE FULL CONTRACT, AND THE REASONS IT MAY NOT MOVE, ARE ON
|
|
181
|
+
* {@link HOME_KEY_TURN_OFF_ALL_REVIEWERS}. Read that docblock before you delete, rename, narrow or
|
|
182
|
+
* re-home this field. The four things it says, in one line each:
|
|
183
|
+
* • ONLY `~/.webpieces/config.json` — never a `webpieces.config.json` key, in any release;
|
|
184
|
+
* • a KILL SWITCH, not a filter — required reviewers are suppressed too, deliberately;
|
|
185
|
+
* • a tracked repo key would let a BRANCH switch off the reviewers judging that branch;
|
|
186
|
+
* • it is an `experimental.*` flag, so only a HUMAN ever ends it.
|
|
187
|
+
*
|
|
188
|
+
* The suppression is never silent: stage ②'s output, the dashboard and the PR body (which is the
|
|
189
|
+
* squash-merge commit body) all name this flag, so a `git log` reader can tell that a commit's
|
|
190
|
+
* reviewers were switched off and by what.
|
|
191
|
+
*/
|
|
192
|
+
turnOffAllReviewers: boolean;
|
|
193
|
+
constructor(wholeRepoBuildGuard: boolean, orphanDirSweep: boolean, maxConcurrentBuilds: number, turnOffAllReviewers: boolean);
|
|
237
194
|
}
|
|
238
195
|
/**
|
|
239
196
|
* Loads and validates `~/.webpieces/config.json`, and resolves whether a path IS that file (for the
|
package/src/home-config.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.HomeConfigService = exports.HomeConfig = exports.ALLOWED_EXPERIMENTAL = exports.ALLOWED_EXPERIMENTAL_NUMBERS = exports.ALLOWED_EXPERIMENTAL_BOOLEANS = exports.ALLOWED_TOP_LEVEL = exports.DEFAULT_MAX_CONCURRENT_BUILDS = exports.HOME_KEY_MAX_CONCURRENT_BUILDS = exports.HOME_KEY_ORPHAN_DIR_SWEEP = exports.HOME_KEY_WHOLE_REPO_BUILD_GUARD = exports.HOME_EXPERIMENTAL_SECTION = exports.HOME_CONFIG_FILE = exports.HOME_CONFIG_DIR = exports.ENDED_EXPERIMENTS = exports.EndedExperiment = exports.RETIRED_HOME_CONFIG_KEYS = exports.RetiredHomeConfigKey = exports.HomeDocKeys = exports.HOME_KEY_AI_DOC = exports.HOME_KEY_DOC = exports.DOCUMENTATION_KEYS = void 0;
|
|
3
|
+
exports.HomeConfigService = exports.HomeConfig = exports.ALLOWED_EXPERIMENTAL = exports.ALLOWED_EXPERIMENTAL_NUMBERS = exports.ALLOWED_EXPERIMENTAL_BOOLEANS = exports.ALLOWED_TOP_LEVEL = exports.DEFAULT_MAX_CONCURRENT_BUILDS = exports.HOME_KEY_MAX_CONCURRENT_BUILDS = exports.HOME_KEY_TURN_OFF_ALL_REVIEWERS = exports.HOME_KEY_ORPHAN_DIR_SWEEP = exports.HOME_KEY_WHOLE_REPO_BUILD_GUARD = exports.HOME_EXPERIMENTAL_SECTION = exports.HOME_CONFIG_FILE = exports.HOME_CONFIG_DIR = exports.ENDED_EXPERIMENTS = exports.EndedExperiment = exports.RETIRED_HOME_CONFIG_KEYS = exports.RetiredHomeConfigKey = exports.HomeDocKeys = exports.HOME_KEY_AI_DOC = exports.HOME_KEY_DOC = exports.DOCUMENTATION_KEYS = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const fs = tslib_1.__importStar(require("fs"));
|
|
6
6
|
const os = tslib_1.__importStar(require("os"));
|
|
@@ -18,6 +18,7 @@ Object.defineProperty(exports, "RetiredHomeConfigKey", { enumerable: true, get:
|
|
|
18
18
|
Object.defineProperty(exports, "RETIRED_HOME_CONFIG_KEYS", { enumerable: true, get: function () { return home_config_retired_keys_1.RETIRED_HOME_CONFIG_KEYS; } });
|
|
19
19
|
Object.defineProperty(exports, "EndedExperiment", { enumerable: true, get: function () { return home_config_retired_keys_1.EndedExperiment; } });
|
|
20
20
|
Object.defineProperty(exports, "ENDED_EXPERIMENTS", { enumerable: true, get: function () { return home_config_retired_keys_1.ENDED_EXPERIMENTS; } });
|
|
21
|
+
const home_config_keys_1 = require("./home-config-keys");
|
|
21
22
|
/**
|
|
22
23
|
* `~/.webpieces/config.json` — the MACHINE-GLOBAL preference file, and a different thing from the repo's
|
|
23
24
|
* tracked `webpieces.config.json`. It is EXPERIMENTAL and entirely OPTIONAL.
|
|
@@ -139,108 +140,27 @@ Object.defineProperty(exports, "ENDED_EXPERIMENTS", { enumerable: true, get: fun
|
|
|
139
140
|
* defaults ON is not an experiment — it is a shipped behaviour that skipped its soak period, and it
|
|
140
141
|
* changes what every agent on every machine can do the moment they upgrade. Low uptake of an opt-in
|
|
141
142
|
* experiment is information ABOUT the experiment; it is not a licence to force it on everybody.
|
|
142
|
-
*/
|
|
143
|
-
exports.HOME_CONFIG_DIR = '.webpieces';
|
|
144
|
-
exports.HOME_CONFIG_FILE = 'config.json';
|
|
145
|
-
// The `experimental` section and its keys. Named as constants because both the validator and its error
|
|
146
|
-
// text must spell them identically — a validator whose message names a different key than the one it
|
|
147
|
-
// checks is worse than no message.
|
|
148
|
-
exports.HOME_EXPERIMENTAL_SECTION = 'experimental';
|
|
149
|
-
// The on/off switch for `whole-repo-build-guard`. Spelled with the GUARD's own name, hyphens and all,
|
|
150
|
-
// so `grep -rn whole-repo-build-guard` finds the switch beside the guard — and so nobody has to learn a
|
|
151
|
-
// second name for one thing.
|
|
152
|
-
//
|
|
153
|
-
// `buildGateLogCapture` used to sit beside it and is GONE: capturing the build's output to a file is now
|
|
154
|
-
// what the gate always does (see BuildAffected.runBuildGate), so the flag had nothing left to switch. It
|
|
155
|
-
// is deliberately NOT in RETIRED_HOME_CONFIG_KEYS — a retired key here is a HARD FAILURE on exact match,
|
|
156
|
-
// and this file is machine-global and hand-authored, so a machine that opted INTO a behaviour it now
|
|
157
|
-
// gets unconditionally must not have its shell broken for saying yes early. It falls through to the
|
|
158
|
-
// unknown-key WARNING instead, which says the key had no effect and names what is understood.
|
|
159
|
-
exports.HOME_KEY_WHOLE_REPO_BUILD_GUARD = 'whole-repo-build-guard';
|
|
160
|
-
// The on/off switch for the orphan-directory sweep `wp-sync-main` runs. Named for the thing
|
|
161
|
-
// it switches, exactly as the guard key above is — one name, greppable from either end.
|
|
162
|
-
exports.HOME_KEY_ORPHAN_DIR_SWEEP = 'orphan-dir-sweep';
|
|
163
|
-
/**
|
|
164
|
-
* How many builds may be live on this machine before `pnpm wp-build` refuses to start another. The FIRST
|
|
165
|
-
* NUMERIC key in this file — see `readOptionalPositiveInteger` for why "known key, wrong type → REJECT"
|
|
166
|
-
* applies to it exactly as it applies to the booleans.
|
|
167
|
-
*/
|
|
168
|
-
exports.HOME_KEY_MAX_CONCURRENT_BUILDS = 'maxConcurrentBuilds';
|
|
169
|
-
/**
|
|
170
|
-
* EVERY key's value when it is not named — including on the machine with no such file at all, which is
|
|
171
|
-
* essentially every machine. False, for all of them, with no exceptions and no per-key table.
|
|
172
|
-
*
|
|
173
|
-
* That uniformity is the policy, not a coincidence: every `experimental.*` flag ships OFF and stays OFF
|
|
174
|
-
* for two years, so "this machine never opted in" is byte-for-byte the behaviour of having no file. ON
|
|
175
|
-
* requires an explicit `true`; absent, and an explicit `false`, are the same state.
|
|
176
|
-
*
|
|
177
|
-
* Named rather than written as a bare `false` at each call site so the reason travels with the value —
|
|
178
|
-
* and there is deliberately exactly ONE such constant, because a second one would be a second place a
|
|
179
|
-
* default is stated, free to disagree with this one.
|
|
180
|
-
*/
|
|
181
|
-
const GUARD_OFF_WHEN_ABSENT = false;
|
|
182
|
-
/**
|
|
183
|
-
* The one NON-boolean default, and the one key whose absent value is not `GUARD_OFF_WHEN_ABSENT`.
|
|
184
|
-
*
|
|
185
|
-
* Three, because contention between agents running full sweeps at once was measured at ~3.2x total test
|
|
186
|
-
* time (`.claude/rules/build-verification.md` § "What actually makes builds slow"), and a fourth simultaneous build
|
|
187
|
-
* is well past the
|
|
188
|
-
* point where anybody gains anything. It is a NUMBER rather than an on/off flag because the useful
|
|
189
|
-
* machine-to-machine difference here is core count, not opinion — which is also why it is the one key in
|
|
190
|
-
* this file with a non-false default: "0 builds allowed" would be a machine that cannot build at all.
|
|
191
|
-
*/
|
|
192
|
-
exports.DEFAULT_MAX_CONCURRENT_BUILDS = 3;
|
|
193
|
-
/**
|
|
194
|
-
* The complete UNDERSTOOD shape. A key not on these lists is ignored with a warning rather than
|
|
195
|
-
* rejected (see the class docblock: this document is machine-global and older releases must survive
|
|
196
|
-
* meeting a newer release's key), so adding a key still means adding it here — a key absent from these
|
|
197
|
-
* lists is never read at all, and the flag it was meant to set keeps the default above.
|
|
198
|
-
*
|
|
199
|
-
* EXPORTED so `home-config.spec.ts` can ENUMERATE them rather than restate them. The cross-version
|
|
200
|
-
* invariant ("every key is independently omittable") is only as good as the list the test walks, and a
|
|
201
|
-
* hand-written copy of that list means a NEW key silently escapes the invariant on the day it is added —
|
|
202
|
-
* which is the one failure mode nobody would notice until an older release started rejecting files.
|
|
203
|
-
* Walking the real constant makes the test cover a new key the moment it appears here.
|
|
204
|
-
*/
|
|
205
|
-
/**
|
|
206
|
-
* The SETTINGS only. Documentation keys are deliberately NOT here: these lists are walked to build
|
|
207
|
-
* sample documents and to assert cross-version invariants, and every entry is assumed to be a setting
|
|
208
|
-
* with a typed value. `warnUnknownKeys` accepts the documentation keys separately, everywhere.
|
|
209
|
-
*/
|
|
210
|
-
exports.ALLOWED_TOP_LEVEL = [exports.HOME_EXPERIMENTAL_SECTION];
|
|
211
|
-
/**
|
|
212
|
-
* The understood `experimental.*` keys, SPLIT BY VALUE TYPE — because the spec walks these lists to build
|
|
213
|
-
* a sample document, and a sample that wrote `false` into a numeric key would be rejected by the very
|
|
214
|
-
* loader it is testing. Splitting them means a key added to either list is covered by the cross-version
|
|
215
|
-
* invariants automatically, with the right sample value, which is the whole reason the lists are exported.
|
|
216
143
|
*
|
|
217
|
-
*
|
|
218
|
-
*
|
|
144
|
+
* ─── WHERE THE KEY NAMES LIVE ─────────────────────────────────────────────────────────────────────────
|
|
145
|
+
* The key constants, the allow-lists and the declared defaults are in `home-config-keys.ts` — split out
|
|
146
|
+
* when this file hit its line limit, exactly as `home-config-doc-keys.ts` and
|
|
147
|
+
* `home-config-retired-keys.ts` were before it. They are RE-EXPORTED below, so `./home-config` remains
|
|
148
|
+
* the one import path and nothing outside this module names the split. The per-key documentation moved
|
|
149
|
+
* WITH the keys; read it there.
|
|
219
150
|
*/
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
* If you believe an experiment should end, SAY SO and leave the flag alone.
|
|
234
|
-
* `.claude/rules/experiments.md` §"ONLY A HUMAN ENDS AN EXPERIMENT" carries the full rule and what a
|
|
235
|
-
* human-ended retirement looks like.
|
|
236
|
-
*/
|
|
237
|
-
exports.ALLOWED_EXPERIMENTAL_BOOLEANS = [
|
|
238
|
-
exports.HOME_KEY_WHOLE_REPO_BUILD_GUARD, exports.HOME_KEY_ORPHAN_DIR_SWEEP,
|
|
239
|
-
];
|
|
240
|
-
exports.ALLOWED_EXPERIMENTAL_NUMBERS = [exports.HOME_KEY_MAX_CONCURRENT_BUILDS];
|
|
241
|
-
exports.ALLOWED_EXPERIMENTAL = [
|
|
242
|
-
...exports.ALLOWED_EXPERIMENTAL_BOOLEANS, ...exports.ALLOWED_EXPERIMENTAL_NUMBERS,
|
|
243
|
-
];
|
|
151
|
+
var home_config_keys_2 = require("./home-config-keys");
|
|
152
|
+
Object.defineProperty(exports, "HOME_CONFIG_DIR", { enumerable: true, get: function () { return home_config_keys_2.HOME_CONFIG_DIR; } });
|
|
153
|
+
Object.defineProperty(exports, "HOME_CONFIG_FILE", { enumerable: true, get: function () { return home_config_keys_2.HOME_CONFIG_FILE; } });
|
|
154
|
+
Object.defineProperty(exports, "HOME_EXPERIMENTAL_SECTION", { enumerable: true, get: function () { return home_config_keys_2.HOME_EXPERIMENTAL_SECTION; } });
|
|
155
|
+
Object.defineProperty(exports, "HOME_KEY_WHOLE_REPO_BUILD_GUARD", { enumerable: true, get: function () { return home_config_keys_2.HOME_KEY_WHOLE_REPO_BUILD_GUARD; } });
|
|
156
|
+
Object.defineProperty(exports, "HOME_KEY_ORPHAN_DIR_SWEEP", { enumerable: true, get: function () { return home_config_keys_2.HOME_KEY_ORPHAN_DIR_SWEEP; } });
|
|
157
|
+
Object.defineProperty(exports, "HOME_KEY_TURN_OFF_ALL_REVIEWERS", { enumerable: true, get: function () { return home_config_keys_2.HOME_KEY_TURN_OFF_ALL_REVIEWERS; } });
|
|
158
|
+
Object.defineProperty(exports, "HOME_KEY_MAX_CONCURRENT_BUILDS", { enumerable: true, get: function () { return home_config_keys_2.HOME_KEY_MAX_CONCURRENT_BUILDS; } });
|
|
159
|
+
Object.defineProperty(exports, "DEFAULT_MAX_CONCURRENT_BUILDS", { enumerable: true, get: function () { return home_config_keys_2.DEFAULT_MAX_CONCURRENT_BUILDS; } });
|
|
160
|
+
Object.defineProperty(exports, "ALLOWED_TOP_LEVEL", { enumerable: true, get: function () { return home_config_keys_2.ALLOWED_TOP_LEVEL; } });
|
|
161
|
+
Object.defineProperty(exports, "ALLOWED_EXPERIMENTAL_BOOLEANS", { enumerable: true, get: function () { return home_config_keys_2.ALLOWED_EXPERIMENTAL_BOOLEANS; } });
|
|
162
|
+
Object.defineProperty(exports, "ALLOWED_EXPERIMENTAL_NUMBERS", { enumerable: true, get: function () { return home_config_keys_2.ALLOWED_EXPERIMENTAL_NUMBERS; } });
|
|
163
|
+
Object.defineProperty(exports, "ALLOWED_EXPERIMENTAL", { enumerable: true, get: function () { return home_config_keys_2.ALLOWED_EXPERIMENTAL; } });
|
|
244
164
|
/**
|
|
245
165
|
* ─── EVERY KEY IS OPTIONAL, AND THAT IS A HARD REQUIREMENT OF WHERE THIS FILE LIVES ───────────────────
|
|
246
166
|
* This file is MACHINE-GLOBAL: one document, read by every repo on the machine, and those repos pin
|
|
@@ -308,16 +228,36 @@ class HomeConfig {
|
|
|
308
228
|
* you wedge a PR — though their builds do count toward what refuses an ad-hoc `wp-build`.
|
|
309
229
|
*/
|
|
310
230
|
maxConcurrentBuilds;
|
|
311
|
-
|
|
231
|
+
/**
|
|
232
|
+
* EXPERIMENTAL, and OFF unless this machine opts IN with an explicit `true`. When true, the PR gate
|
|
233
|
+
* spawns NO reviewer subagents AT ALL — the REQUIRED checklists included — and the dashboard becomes
|
|
234
|
+
* the entire review product. False, absent, and no file at all are byte-for-byte today's behaviour.
|
|
235
|
+
*
|
|
236
|
+
* THE FULL CONTRACT, AND THE REASONS IT MAY NOT MOVE, ARE ON
|
|
237
|
+
* {@link HOME_KEY_TURN_OFF_ALL_REVIEWERS}. Read that docblock before you delete, rename, narrow or
|
|
238
|
+
* re-home this field. The four things it says, in one line each:
|
|
239
|
+
* • ONLY `~/.webpieces/config.json` — never a `webpieces.config.json` key, in any release;
|
|
240
|
+
* • a KILL SWITCH, not a filter — required reviewers are suppressed too, deliberately;
|
|
241
|
+
* • a tracked repo key would let a BRANCH switch off the reviewers judging that branch;
|
|
242
|
+
* • it is an `experimental.*` flag, so only a HUMAN ever ends it.
|
|
243
|
+
*
|
|
244
|
+
* The suppression is never silent: stage ②'s output, the dashboard and the PR body (which is the
|
|
245
|
+
* squash-merge commit body) all name this flag, so a `git log` reader can tell that a commit's
|
|
246
|
+
* reviewers were switched off and by what.
|
|
247
|
+
*/
|
|
248
|
+
turnOffAllReviewers;
|
|
249
|
+
// ALL FOUR required, no defaults. A defaulted parameter would leave `new HomeConfig(true)` compiling
|
|
312
250
|
// after this class grew a second flag, silently meaning "guard off" — an old spelling that still
|
|
313
251
|
// typechecks with a changed meaning is exactly the shim this repo does not ship. The 3-arg arity this
|
|
314
|
-
// class had before `
|
|
252
|
+
// class had before `turnOffAllReviewers` is DELETED rather than overloaded, per
|
|
315
253
|
// `.claude/rules/no-backwards-compat.md`: the compile errors ARE the migration. The
|
|
316
254
|
// absent-file state is constructed in exactly one place — load()'s absent-file branch.
|
|
317
|
-
|
|
255
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
256
|
+
constructor(wholeRepoBuildGuard, orphanDirSweep, maxConcurrentBuilds, turnOffAllReviewers) {
|
|
318
257
|
this.wholeRepoBuildGuard = wholeRepoBuildGuard;
|
|
319
258
|
this.orphanDirSweep = orphanDirSweep;
|
|
320
259
|
this.maxConcurrentBuilds = maxConcurrentBuilds;
|
|
260
|
+
this.turnOffAllReviewers = turnOffAllReviewers;
|
|
321
261
|
}
|
|
322
262
|
}
|
|
323
263
|
exports.HomeConfig = HomeConfig;
|
|
@@ -336,7 +276,7 @@ let HomeConfigService = class HomeConfigService {
|
|
|
336
276
|
}
|
|
337
277
|
/** Absolute path to the preference file. `homeDir` is a parameter so specs never touch a real HOME. */
|
|
338
278
|
configPath(homeDir = os.homedir()) {
|
|
339
|
-
return path.join(homeDir,
|
|
279
|
+
return path.join(homeDir, home_config_keys_1.HOME_CONFIG_DIR, home_config_keys_1.HOME_CONFIG_FILE);
|
|
340
280
|
}
|
|
341
281
|
/**
|
|
342
282
|
* The preferences. Returns all-defaults, silently and without touching anything, when the file is not
|
|
@@ -352,7 +292,7 @@ let HomeConfigService = class HomeConfigService {
|
|
|
352
292
|
// can never disagree. Spelled out rather than defaulted in the constructor — see the note there
|
|
353
293
|
// on why a defaulted parameter is a shim.
|
|
354
294
|
if (raw === null) {
|
|
355
|
-
return new HomeConfig(GUARD_OFF_WHEN_ABSENT, GUARD_OFF_WHEN_ABSENT,
|
|
295
|
+
return new HomeConfig(home_config_keys_1.GUARD_OFF_WHEN_ABSENT, home_config_keys_1.GUARD_OFF_WHEN_ABSENT, home_config_keys_1.DEFAULT_MAX_CONCURRENT_BUILDS, home_config_keys_1.GUARD_OFF_WHEN_ABSENT);
|
|
356
296
|
}
|
|
357
297
|
return this.validate(this.parse(raw, this.configPath(homeDir)), this.configPath(homeDir));
|
|
358
298
|
}
|
|
@@ -432,16 +372,16 @@ let HomeConfigService = class HomeConfigService {
|
|
|
432
372
|
validate(raw, file) {
|
|
433
373
|
this.assertNotRetired(raw, file);
|
|
434
374
|
this.docKeys.assertAreStrings(raw, '', (m) => this.error(file, m));
|
|
435
|
-
this.warnUnknownKeys(Object.keys(raw),
|
|
436
|
-
const section = raw[
|
|
375
|
+
this.warnUnknownKeys(Object.keys(raw), home_config_keys_1.ALLOWED_TOP_LEVEL, '');
|
|
376
|
+
const section = raw[home_config_keys_1.HOME_EXPERIMENTAL_SECTION];
|
|
437
377
|
if (section !== undefined && (typeof section !== 'object' || section === null || Array.isArray(section))) {
|
|
438
|
-
throw new inform_ai_error_1.InformAiError(this.error(file, `"${
|
|
378
|
+
throw new inform_ai_error_1.InformAiError(this.error(file, `"${home_config_keys_1.HOME_EXPERIMENTAL_SECTION}" must be a JSON object.`));
|
|
439
379
|
}
|
|
440
380
|
// webpieces-disable no-any-unknown -- narrowed to a non-null, non-array object one line above
|
|
441
381
|
const experimental = (section ?? {});
|
|
442
|
-
this.docKeys.assertAreStrings(experimental, `${
|
|
443
|
-
this.warnUnknownKeys(Object.keys(experimental),
|
|
444
|
-
return new HomeConfig(this.readOptionalBoolean(experimental,
|
|
382
|
+
this.docKeys.assertAreStrings(experimental, `${home_config_keys_1.HOME_EXPERIMENTAL_SECTION}.`, (m) => this.error(file, m));
|
|
383
|
+
this.warnUnknownKeys(Object.keys(experimental), home_config_keys_1.ALLOWED_EXPERIMENTAL, `${home_config_keys_1.HOME_EXPERIMENTAL_SECTION}.`);
|
|
384
|
+
return new HomeConfig(this.readOptionalBoolean(experimental, home_config_keys_1.HOME_KEY_WHOLE_REPO_BUILD_GUARD, file, home_config_keys_1.GUARD_OFF_WHEN_ABSENT), this.readOptionalBoolean(experimental, home_config_keys_1.HOME_KEY_ORPHAN_DIR_SWEEP, file, home_config_keys_1.GUARD_OFF_WHEN_ABSENT), this.readOptionalPositiveInteger(experimental, home_config_keys_1.HOME_KEY_MAX_CONCURRENT_BUILDS, file, home_config_keys_1.DEFAULT_MAX_CONCURRENT_BUILDS), this.readOptionalBoolean(experimental, home_config_keys_1.HOME_KEY_TURN_OFF_ALL_REVIEWERS, file, home_config_keys_1.GUARD_OFF_WHEN_ABSENT));
|
|
445
385
|
}
|
|
446
386
|
/**
|
|
447
387
|
* The NUMERIC sibling of {@link readOptionalBoolean}, and the same three rules apply unchanged: the
|
|
@@ -465,7 +405,7 @@ let HomeConfigService = class HomeConfigService {
|
|
|
465
405
|
if (value === undefined)
|
|
466
406
|
return whenAbsent;
|
|
467
407
|
if (typeof value !== 'number' || !Number.isInteger(value) || value < 1) {
|
|
468
|
-
throw new inform_ai_error_1.InformAiError(this.error(file, `"${
|
|
408
|
+
throw new inform_ai_error_1.InformAiError(this.error(file, `"${home_config_keys_1.HOME_EXPERIMENTAL_SECTION}.${key}" must be a POSITIVE WHOLE NUMBER (1 or more), not ` +
|
|
469
409
|
`${JSON.stringify(value)}. Write it as a bare JSON number, e.g. ` +
|
|
470
410
|
`"${key}": ${String(whenAbsent)} — or delete the key to use the default of ` +
|
|
471
411
|
`${String(whenAbsent)}.`));
|
|
@@ -499,7 +439,7 @@ let HomeConfigService = class HomeConfigService {
|
|
|
499
439
|
// eslint-disable-next-line @typescript-eslint/max-params
|
|
500
440
|
asBoolean(value, key, file, fix) {
|
|
501
441
|
if (typeof value !== 'boolean') {
|
|
502
|
-
throw new inform_ai_error_1.InformAiError(this.error(file, `"${
|
|
442
|
+
throw new inform_ai_error_1.InformAiError(this.error(file, `"${home_config_keys_1.HOME_EXPERIMENTAL_SECTION}.${key}" must be the boolean ` +
|
|
503
443
|
`true or false, not ${JSON.stringify(value)}.${fix}`));
|
|
504
444
|
}
|
|
505
445
|
return value;
|
package/src/home-config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"home-config.js","sourceRoot":"","sources":["../../../../../packages/tooling/rules-config/src/home-config.ts"],"names":[],"mappings":";;;;AAAA,+CAAyB;AACzB,+CAAyB;AACzB,mDAA6B;AAC7B,yCAA2D;AAE3D,uDAAkD;AAClD,yCAAqC;AACrC,iEAAwG;AAK/F,mGALA,yCAAkB,OAKA;AAAE,6FALA,mCAAY,OAKA;AAAE,gGALA,sCAAe,OAKA;AAAE,4FALA,kCAAW,OAKA;AAJvE,yEAEoC;AAG3B,qGAJL,+CAAoB,OAIK;AAAE,yGAJL,mDAAwB,OAIK;AAAE,gGAJL,0CAAe,OAIK;AAAE,kGAJL,4CAAiB,OAIK;AAE3F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyHG;AACU,QAAA,eAAe,GAAG,YAAY,CAAC;AAC/B,QAAA,gBAAgB,GAAG,aAAa,CAAC;AAE9C,uGAAuG;AACvG,qGAAqG;AACrG,mCAAmC;AACtB,QAAA,yBAAyB,GAAG,cAAc,CAAC;AACxD,sGAAsG;AACtG,wGAAwG;AACxG,6BAA6B;AAC7B,EAAE;AACF,yGAAyG;AACzG,yGAAyG;AACzG,yGAAyG;AACzG,qGAAqG;AACrG,oGAAoG;AACpG,8FAA8F;AACjF,QAAA,+BAA+B,GAAG,wBAAwB,CAAC;AACxE,4FAA4F;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C,EAAE,CAAC;gBACpC,MAAM,YAAY,GAAG,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;gBACvE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YAC9E,CAAC;YACD,QAAQ,GAAG,OAAO,CAAC;QACvB,CAAC;QACD,OAAO,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;IAC9B,CAAC;IAED,sGAAsG;IACtG,+FAA+F;IACvF,KAAK,CAAC,IAAY,EAAE,MAAc;QACtC,OAAO,8BAA8B,MAAM,MAAM;YAC7C,SAAS,IAAI,IAAI;YACjB,wFAAwF;YACxF,8FAA8F;YAC9F,qEAAqE,CAAC;IAC9E,CAAC;CACJ,CAAA;AApWY,8CAAiB;4BAAjB,iBAAiB;IAD7B,IAAA,sBAAU,EAAC,8BAAkB,CAAC,SAAS,CAAC;6CAEC,kCAAW;GADxC,iBAAiB,CAoW7B","sourcesContent":["import * as fs from 'fs';\nimport * as os from 'os';\nimport * as path from 'path';\nimport { injectable, bindingScopeValues } from 'inversify';\n\nimport { InformAiError } from './inform-ai-error';\nimport { toError } from './to-error';\nimport { DOCUMENTATION_KEYS, HOME_KEY_DOC, HOME_KEY_AI_DOC, HomeDocKeys } from './home-config-doc-keys';\nimport {\n RetiredHomeConfigKey, RETIRED_HOME_CONFIG_KEYS, EndedExperiment, ENDED_EXPERIMENTS,\n} from './home-config-retired-keys';\n\nexport { DOCUMENTATION_KEYS, HOME_KEY_DOC, HOME_KEY_AI_DOC, HomeDocKeys };\nexport { RetiredHomeConfigKey, RETIRED_HOME_CONFIG_KEYS, EndedExperiment, ENDED_EXPERIMENTS };\n\n/**\n * `~/.webpieces/config.json` — the MACHINE-GLOBAL preference file, and a different thing from the repo's\n * tracked `webpieces.config.json`. It is EXPERIMENTAL and entirely OPTIONAL.\n *\n * ─── ABSENT IS THE NORMAL STATE, AND IT IS NEVER AN ERROR ─────────────────────────────────────────────\n * Essentially every consumer of these packages has no such file, and for them every `wp-*` command must\n * behave byte-for-byte as it did before this file was ever read: no error, no warning, no log line, no\n * extra file, nothing. `load()` therefore treats EVERY failure to READ the bytes — the file missing, the\n * `~/.webpieces` directory missing, a permission error, a path component that is not a directory — as\n * \"not opted in\", and returns all-defaults silently. That is not a fallback for a wrong shape; it is the\n * definition of \"the user did not create this file\".\n *\n * ─── THE STANDING RULE, FOR WHOEVER EDITS THIS FILE NEXT ──────────────────────────────────────────────\n * This file is MACHINE-GLOBAL: ONE document on the disk, read by EVERY repo on the machine, and those\n * repos are pinned to DIFFERENT webpieces releases. Two rules follow, and they are not negotiable:\n *\n * (a) NO KEY MAY EVER BE REQUIRED. `readOptionalBoolean` and `readOptionalPositiveInteger` are the\n * ONLY readers, and BOTH are optional-by-construction. There is no `readRequiredBoolean`, no\n * `RequiredHomeFlag`, no `REQUIRED_HOME_FLAGS` — those existed once and were deleted; do not\n * reintroduce them under any name, in any type.\n * (b) AN UNKNOWN KEY IS IGNORED, never rejected. `warnUnknownKeys` warns; nothing throws.\n *\n * Both halves are needed, and either one alone still leaves a file that some installed release rejects:\n *\n * (a) covers the OLD FILE on a NEW release — a document written before a key existed, missing it.\n * (b) covers the NEW FILE on an OLD release — a document carrying a key that release never heard of.\n *\n * Break either one and every repo on the machine that is not on the newest release hard-blocks: a\n * rejection here fails config load, and that denies every tool call in that repo until somebody upgrades\n * all of them in lockstep. That is the outage this design exists to make impossible, and it is not\n * hypothetical — it is the shape of the incident recorded at the bottom of this docblock.\n *\n * `home-config.spec.ts` pins both halves, and pins them by ENUMERATING `ALLOWED_EXPERIMENTAL` rather\n * than by a hand-written list, so a key added later is covered by the invariant automatically instead of\n * silently escaping it.\n *\n * ─── PRESENT IS STRICT ABOUT WHAT IT UNDERSTANDS, AND FORWARD-COMPATIBLE ABOUT WHAT IT DOES NOT ───────\n * Once the bytes are readable, someone DELIBERATELY created this file, and three of the four failure\n * modes are REJECTED exactly as webpieces.config.json rejects them (see `retired-config-keys.ts`), with\n * an error naming the exact fix and no `??` fallback anywhere:\n *\n * UNPARSEABLE not JSON, or not a single JSON object → REJECT\n * RETIRED KEY listed in RETIRED_HOME_CONFIG_KEYS → REJECT, carrying the migration\n * WRONG TYPE a KNOWN key holding a value of the wrong type → REJECT\n * (a non-boolean for a boolean key; anything but a positive whole number for a\n * numeric one — see `readOptionalPositiveInteger`)\n * UNKNOWN KEY a key no version of this validator has heard of → IGNORED, with a warning\n *\n * ─── WHY THE LAST ROW DIFFERS FROM webpieces.config.json, WHICH STAYS STRICT ──────────────────────────\n * The difference is not a softening of policy; it is that the two files have different CARDINALITY.\n *\n * webpieces.config.json is REPO-TRACKED. One repo, one file, one pinned @webpieces release, and the\n * file moves through git in lockstep with the code that reads it. \"One version reads this document\" is\n * true by construction, so an unknown key there can only be a typo or a dead key — and rejecting it is\n * right, because it is the delivery mechanism for the migration.\n *\n * THIS file is MACHINE-GLOBAL. ONE document, read by EVERY repo on the machine, and those repos pin\n * DIFFERENT releases — deliberately, since a repo's pin is tracked and moves when its own PR lands.\n * So \"an unknown key\" here has a second, entirely legitimate cause that cannot occur in the repo file:\n * a key a NEWER release added, being read by an OLDER one. Rejecting it means adding any key to this\n * file hard-blocks every repo on the machine that has not yet been upgraded — an outage produced by\n * opting IN to an experimental flag, which is the same shape of failure that moved these flags out of\n * webpieces.config.json in the first place (see the section below).\n *\n * This is the exact mirror of the already-settled rule that no key here may be REQUIRED. Both halves fall\n * out of one fact: the set of valid documents must be non-empty for EVERY release on the machine at once.\n * • omit a new key → an old release must not demand it (already true: every key is optional)\n * • add a new key → an old release must not reject it (this change)\n * With only the first half, the set of valid files was still empty the moment a key was added.\n *\n * ─── WHAT THAT COSTS, AND WHAT PAYS FOR IT ────────────────────────────────────────────────────────────\n * The cost is real and worth stating plainly: a TYPO now silently does nothing. `\"whole-repo-build-gaurd\"`\n * used to be a loud rejection; it is now a key nothing reads, so the flag keeps its default and nothing\n * about the machine's behaviour reveals the mistake.\n *\n * Every key here is an OPT-IN that defaults OFF, so a typo costs the author the feature they meant to\n * switch on: misspell `whole-repo-build-guard` and the guard stays inert while they believe they armed\n * it. That is the milder of the two failures — nothing they were doing stops working — but it is still\n * invisible without a signal, which is why the warning below is not optional decoration, and why\n * `nearestKnownKey` had to get fuzzier than the case-insensitive match it replaced: `gaurd` is a\n * transposition, exactly the class of typo an equality test cannot see.\n *\n * That is mitigated, not eliminated, by making the ignore VISIBLE: every unknown key is printed once per\n * load as a `[webpieces]` warning on stderr, and `nearestKnownKey` upgrades that line with a \"did you\n * mean\" whenever the key is within a two-character edit of a known one — which is what a typo is, and\n * what a key from a newer release is not. A warning naming a close match is the strongest signal\n * available that does not also block a colleague on an older pin.\n *\n * The trade was taken this way round because the two mistakes are not symmetric. A typo costs its author\n * one flag that did not turn on, discoverable the moment they check whether the feature is doing\n * anything, on their own machine. A rejection costs every repo on the machine every tool call, and the\n * person it blocks is usually not the person who edited the file.\n *\n * An unknown TOP-LEVEL key is ignored on the identical argument, and it is the more important half: a\n * future release adding a second section (`preferences`, say) beside `experimental` would otherwise be\n * unreadable by every older release on the machine, which is precisely the sequencing being deleted here.\n *\n * ─── REJECTING IS STILL SELF-RECOVERABLE, FOR THE THREE ROWS THAT STILL REJECT ────────────────────────\n * A Write/Edit targeting THIS path is an unconditional PASS in the hook guards (see `isHomeConfigPath`,\n * wired into ai-hook-rules' runner beside the webpieces.config.json pass), so an agent can always repair\n * the file the loader just rejected.\n *\n * ─── WHY A MACHINE-LOCAL SWITCH LIVES HERE AND NOT IN webpieces.config.json ───────────────────────────\n * `whole-repo-build-guard` first shipped as an ordinary validated guard: `mode: 'ON'` by default AND an\n * entry required under `hookGuards`. The consequence on upgrade was an outage — a consumer repo that had\n * not yet added the entry hit fault Y, which blocks EVERY Bash call, for a feature nobody had opted into.\n *\n * The rule that buys back: a switch that lives HERE needs no file, no key and no edit to be in its\n * default state. A repo-tracked config key cannot express that — an entry there is something every\n * consumer must add, on a schedule set by whoever bumps the release.\n *\n * Note which half of that was the outage. It was the REQUIRED KEY: the failure was at config LOAD,\n * before any command was judged. That is why every key here stays OPTIONAL and why an absent file\n * returns all-defaults silently.\n *\n * The DEFAULT is settled separately, by a standing policy this file does not get to re-litigate: EVERY\n * `experimental.*` flag ships OFF and stays OFF for two years. `whole-repo-build-guard` is one of them,\n * so it is OFF unless a machine writes `{\"experimental\": {\"whole-repo-build-guard\": true}}`. A flag that\n * defaults ON is not an experiment — it is a shipped behaviour that skipped its soak period, and it\n * changes what every agent on every machine can do the moment they upgrade. Low uptake of an opt-in\n * experiment is information ABOUT the experiment; it is not a licence to force it on everybody.\n */\nexport const HOME_CONFIG_DIR = '.webpieces';\nexport const HOME_CONFIG_FILE = 'config.json';\n\n// The `experimental` section and its keys. Named as constants because both the validator and its error\n// text must spell them identically — a validator whose message names a different key than the one it\n// checks is worse than no message.\nexport const HOME_EXPERIMENTAL_SECTION = 'experimental';\n// The on/off switch for `whole-repo-build-guard`. Spelled with the GUARD's own name, hyphens and all,\n// so `grep -rn whole-repo-build-guard` finds the switch beside the guard — and so nobody has to learn a\n// second name for one thing.\n//\n// `buildGateLogCapture` used to sit beside it and is GONE: capturing the build's output to a file is now\n// what the gate always does (see BuildAffected.runBuildGate), so the flag had nothing left to switch. It\n// is deliberately NOT in RETIRED_HOME_CONFIG_KEYS — a retired key here is a HARD FAILURE on exact match,\n// and this file is machine-global and hand-authored, so a machine that opted INTO a behaviour it now\n// gets unconditionally must not have its shell broken for saying yes early. It falls through to the\n// unknown-key WARNING instead, which says the key had no effect and names what is understood.\nexport const HOME_KEY_WHOLE_REPO_BUILD_GUARD = 'whole-repo-build-guard';\n// The on/off switch for the orphan-directory sweep `wp-sync-main` runs. Named for the thing\n// it switches, exactly as the guard key above is — one name, greppable from either end.\nexport const HOME_KEY_ORPHAN_DIR_SWEEP = 'orphan-dir-sweep';\n/**\n * How many builds may be live on this machine before `pnpm wp-build` refuses to start another. The FIRST\n * NUMERIC key in this file — see `readOptionalPositiveInteger` for why \"known key, wrong type → REJECT\"\n * applies to it exactly as it applies to the booleans.\n */\nexport const HOME_KEY_MAX_CONCURRENT_BUILDS = 'maxConcurrentBuilds';\n\n/**\n * EVERY key's value when it is not named — including on the machine with no such file at all, which is\n * essentially every machine. False, for all of them, with no exceptions and no per-key table.\n *\n * That uniformity is the policy, not a coincidence: every `experimental.*` flag ships OFF and stays OFF\n * for two years, so \"this machine never opted in\" is byte-for-byte the behaviour of having no file. ON\n * requires an explicit `true`; absent, and an explicit `false`, are the same state.\n *\n * Named rather than written as a bare `false` at each call site so the reason travels with the value —\n * and there is deliberately exactly ONE such constant, because a second one would be a second place a\n * default is stated, free to disagree with this one.\n */\nconst GUARD_OFF_WHEN_ABSENT = false;\n\n/**\n * The one NON-boolean default, and the one key whose absent value is not `GUARD_OFF_WHEN_ABSENT`.\n *\n * Three, because contention between agents running full sweeps at once was measured at ~3.2x total test\n * time (`.claude/rules/build-verification.md` § \"What actually makes builds slow\"), and a fourth simultaneous build\n * is well past the\n * point where anybody gains anything. It is a NUMBER rather than an on/off flag because the useful\n * machine-to-machine difference here is core count, not opinion — which is also why it is the one key in\n * this file with a non-false default: \"0 builds allowed\" would be a machine that cannot build at all.\n */\nexport const DEFAULT_MAX_CONCURRENT_BUILDS = 3;\n\n/**\n * The complete UNDERSTOOD shape. A key not on these lists is ignored with a warning rather than\n * rejected (see the class docblock: this document is machine-global and older releases must survive\n * meeting a newer release's key), so adding a key still means adding it here — a key absent from these\n * lists is never read at all, and the flag it was meant to set keeps the default above.\n *\n * EXPORTED so `home-config.spec.ts` can ENUMERATE them rather than restate them. The cross-version\n * invariant (\"every key is independently omittable\") is only as good as the list the test walks, and a\n * hand-written copy of that list means a NEW key silently escapes the invariant on the day it is added —\n * which is the one failure mode nobody would notice until an older release started rejecting files.\n * Walking the real constant makes the test cover a new key the moment it appears here.\n */\n\n/**\n * The SETTINGS only. Documentation keys are deliberately NOT here: these lists are walked to build\n * sample documents and to assert cross-version invariants, and every entry is assumed to be a setting\n * with a typed value. `warnUnknownKeys` accepts the documentation keys separately, everywhere.\n */\nexport const ALLOWED_TOP_LEVEL: readonly string[] = [HOME_EXPERIMENTAL_SECTION];\n/**\n * The understood `experimental.*` keys, SPLIT BY VALUE TYPE — because the spec walks these lists to build\n * a sample document, and a sample that wrote `false` into a numeric key would be rejected by the very\n * loader it is testing. Splitting them means a key added to either list is covered by the cross-version\n * invariants automatically, with the right sample value, which is the whole reason the lists are exported.\n *\n * `ALLOWED_EXPERIMENTAL` stays the ONE list the validator warns against — derived from the two, never\n * hand-maintained beside them, so it cannot fall out of step.\n */\n/**\n * ─── ONLY A HUMAN ENDS AN EXPERIMENT ──────────────────────────────────────────────────────────────\n *\n * An AI agent may ADD a flag to these lists. It may NEVER DELETE one, and may never make a flagged\n * behaviour unconditional — however settled it looks, however old the flag is, however good the\n * reasoning. Ending an experiment judges evidence that lives on someone else's machine.\n *\n * From a live incident: PR #711 deleted `buildGateLogCapture` and made capture unconditional. Its\n * owner's config said `true`, and after that release the opt-in silently meant nothing. Note the\n * shape — that file says \"AI: DO NOT EDIT this file!!\", and the agent never touched it; it deleted\n * the key from the CODE, which has the identical effect from the owner's seat. A rule protecting a\n * FILE does not protect the SETTING it selects.\n *\n * If you believe an experiment should end, SAY SO and leave the flag alone.\n * `.claude/rules/experiments.md` §\"ONLY A HUMAN ENDS AN EXPERIMENT\" carries the full rule and what a\n * human-ended retirement looks like.\n */\nexport const ALLOWED_EXPERIMENTAL_BOOLEANS: readonly string[] = [\n HOME_KEY_WHOLE_REPO_BUILD_GUARD, HOME_KEY_ORPHAN_DIR_SWEEP,\n];\nexport const ALLOWED_EXPERIMENTAL_NUMBERS: readonly string[] = [HOME_KEY_MAX_CONCURRENT_BUILDS];\nexport const ALLOWED_EXPERIMENTAL: readonly string[] = [\n ...ALLOWED_EXPERIMENTAL_BOOLEANS, ...ALLOWED_EXPERIMENTAL_NUMBERS,\n];\n\n/**\n * ─── EVERY KEY IS OPTIONAL, AND THAT IS A HARD REQUIREMENT OF WHERE THIS FILE LIVES ───────────────────\n * This file is MACHINE-GLOBAL: one document, read by every repo on the machine, and those repos pin\n * DIFFERENT webpieces releases. A REQUIRED key cannot survive that, because it makes the set of valid\n * files EMPTY:\n *\n * • omit the new key → the NEW release rejects the file (\"REQUIRED and not set\")\n * • add the new key → every OLDER release rejects the file (\"not a known key\")\n *\n * There is no third option, and both rejections block. `whole-repo-build-guard` was required for the\n * reason recorded in #627 — a flag that decides whether a command RUNS should not be inferred — and that\n * reasoning was sound for a single version and wrong for a shared file. It is optional now, along with\n * every other key.\n *\n * Absent then reads as the ONE declared default, `GUARD_OFF_WHEN_ABSENT`: false, for every key without\n * exception, which is byte-for-byte the behaviour of having no file at all.\n *\n * The other half of cross-version safety — an OLD release IGNORING a key a NEW one added, rather than\n * rejecting it — is solved by `warnUnknownKeys` below. The two halves are one invariant: for the set of\n * valid documents to be non-empty across every release installed on the machine, neither omitting a key\n * nor adding one may be an error.\n */\n\n// Read errors that mean \"the file is not there / not reachable\" rather than \"the file is wrong\". Every\n// one of these resolves to the all-defaults config, silently. Widened deliberately past ENOENT: the\n// parent `~/.webpieces` may not exist (ENOENT), may be a file (ENOTDIR), may be unreadable (EACCES /\n// EPERM), and the path itself may be a directory (EISDIR). None of those is a user who opted in.\nconst ABSENT_ERROR_CODES: readonly string[] = ['ENOENT', 'ENOTDIR', 'EACCES', 'EPERM', 'EISDIR', 'ELOOP', 'ENAMETOOLONG'];\n\n/** The parsed `~/.webpieces/config.json`. Data-only (per CLAUDE.md — classes, not interfaces, for data). */\nexport class HomeConfig {\n /**\n * EXPERIMENTAL, and OFF unless this machine opts IN with an explicit `true`. When true,\n * `whole-repo-build-guard` BLOCKS a Bash command that would build the WHOLE monorepo and hands back\n * the repo's own scoped build command (`pnpm wp-build`). False — and absent, and no file at all —\n * makes the guard completely inert: no block, no log, no message.\n *\n * This is the guard's ONLY switch, and it is an OPT-IN. There is deliberately no\n * webpieces.config.json entry for it (see RETIRED_CONFIG_KEYS): a guard that every consumer must\n * ADD A KEY to avoid being blocked by is a guard that ships an outage on upgrade, which is exactly\n * what happened once. Living here means the default state needs no file, no key and no edit.\n */\n wholeRepoBuildGuard: boolean;\n\n /**\n * EXPERIMENTAL. When true, `wp-sync-main` ARCHIVES the orphan directories it finds — the\n * package directories left behind on every clone by an `nx g move`, which git cannot remove because\n * an ignored `dist/` or `node_modules/` survives the deletion of every tracked file under them.\n *\n * False — and the all-defaults value for a machine with no such file — means the sweep only REPORTS\n * what it found and moves nothing. That asymmetry is the point of shipping this behind the home\n * config at all: the author can run it live across their own clones for a release while every\n * colleague's repo is untouched, and neither state depends on a tracked key anybody must add.\n *\n * The sweep itself never deletes (see OrphanDirArchiver): directories move under `.webpieces/trash/`\n * with a printed `recover=`, so the worst case for a false positive is a `mv` somebody undoes. The\n * ARCHIVE is reaped after 30 days, which is a real deletion — of the second copy, on a timer long\n * enough that anything still wanted has been noticed.\n */\n orphanDirSweep: boolean;\n\n /**\n * How many builds may be live on this MACHINE before `pnpm wp-build` refuses to start another. Live\n * is counted from `~/.webpieces/builds.log` — see `builds-log.ts`, and\n * `decisions/0006-the-build-ledger-is-machine-global.md` for why that file lives outside any repo.\n *\n * `DEFAULT_MAX_CONCURRENT_BUILDS` when absent. The gate stages (`wp-review-upsert-pr`,\n * `wp-finish-upsert-pr`) are NEVER refused whatever this says — blocking the sanctioned path is how\n * you wedge a PR — though their builds do count toward what refuses an ad-hoc `wp-build`.\n */\n maxConcurrentBuilds: number;\n\n // ALL THREE required, no defaults. A defaulted parameter would leave `new HomeConfig(true)` compiling\n // after this class grew a second flag, silently meaning \"guard off\" — an old spelling that still\n // typechecks with a changed meaning is exactly the shim this repo does not ship. The 3-arg arity this\n // class had before `maxConcurrentBuilds` is DELETED rather than overloaded, per\n // `.claude/rules/no-backwards-compat.md`: the compile errors ARE the migration. The\n // absent-file state is constructed in exactly one place — load()'s absent-file branch.\n constructor(\n wholeRepoBuildGuard: boolean, orphanDirSweep: boolean, maxConcurrentBuilds: number,\n ) {\n this.wholeRepoBuildGuard = wholeRepoBuildGuard;\n this.orphanDirSweep = orphanDirSweep;\n this.maxConcurrentBuilds = maxConcurrentBuilds;\n }\n}\n\n\n/**\n * Loads and validates `~/.webpieces/config.json`, and resolves whether a path IS that file (for the\n * guard carve-out that keeps a rejection repairable).\n *\n * Strict about everything it UNDERSTANDS (a retired key, a known key of the wrong type, and a document\n * that is not JSON all throw); forward-compatible about everything it does not (an unknown key is\n * ignored with a warning). The class docblock at the top of this file has the reasoning.\n */\n@injectable(bindingScopeValues.Singleton)\nexport class HomeConfigService {\n constructor(private readonly docKeys: HomeDocKeys = new HomeDocKeys()) {}\n\n /** Absolute path to the preference file. `homeDir` is a parameter so specs never touch a real HOME. */\n configPath(homeDir: string = os.homedir()): string {\n return path.join(homeDir, HOME_CONFIG_DIR, HOME_CONFIG_FILE);\n }\n\n /**\n * The preferences. Returns all-defaults, silently and without touching anything, when the file is not\n * there. THROWS InformAiError, naming the fix, when a file that IS there is wrong in a way this\n * release can be sure about — unparseable, a RETIRED key, or a KNOWN key of the wrong type. A key it\n * simply does not recognise is ignored with a warning, because it may be a newer release's key and\n * this file is shared by every repo on the machine.\n */\n load(homeDir: string = os.homedir()): HomeConfig {\n const raw = this.readIfPresent(this.configPath(homeDir));\n // THE ABSENT-FILE STATE, and the ONE place it is constructed. Every flag is off — the same value\n // a present file that does not name the key gets, so \"no file\" and \"file that ignores this key\"\n // can never disagree. Spelled out rather than defaulted in the constructor — see the note there\n // on why a defaulted parameter is a shim.\n if (raw === null) {\n return new HomeConfig(\n GUARD_OFF_WHEN_ABSENT, GUARD_OFF_WHEN_ABSENT, DEFAULT_MAX_CONCURRENT_BUILDS);\n }\n return this.validate(this.parse(raw, this.configPath(homeDir)), this.configPath(homeDir));\n }\n\n /**\n * True when `candidate` names `~/.webpieces/config.json`, in any of the forms an agent writes it:\n * an absolute path, a `~/`-prefixed path, or one still spelled `$HOME/…` / `${HOME}/…`.\n *\n * This is what the hook guards call to grant the file an unconditional Write/Edit PASS. Without it a\n * strict loader could reject the file while the guards blocked the edit that would fix it — the one\n * wedge webpieces.config.json is already immune to, and the reason its own carve-out exists.\n */\n isHomeConfigPath(candidate: string, homeDir: string = os.homedir()): boolean {\n if (candidate.trim() === '') return false;\n return path.resolve(this.expandHome(candidate.trim(), homeDir)) === path.resolve(this.configPath(homeDir));\n }\n\n // `~`, `$HOME` and `${HOME}` at the FRONT only — a home reference anywhere else is not a home path.\n private expandHome(candidate: string, homeDir: string): string {\n if (candidate === '~') return homeDir;\n for (const prefix of ['~/', '$HOME/', '${HOME}/']) {\n if (candidate.startsWith(prefix)) return path.join(homeDir, candidate.slice(prefix.length));\n }\n return candidate;\n }\n\n /**\n * The file's bytes, or null meaning \"no such file — the user did not opt in\".\n *\n * EVERY read failure is null. This is the single most important behaviour in the file: the absent\n * path is the path every consumer of these packages is on, and it may never reach an error branch.\n * An error code outside ABSENT_ERROR_CODES is genuinely exceptional (EIO, EBUSY) and is rethrown,\n * because silently disabling on a failing disk would be its own kind of lie.\n */\n private readIfPresent(file: string): string | null {\n // webpieces-disable no-unmanaged-exceptions -- chokepoint: this catch IS the \"you have no such file\"\n // decision, and that decision may never surface as a failure to a user who never created the file\n // eslint-disable-next-line @webpieces/no-unmanaged-exceptions\n try {\n return fs.readFileSync(file, 'utf8');\n } catch (err: unknown) {\n const error = toError(err);\n if (this.isAbsent(error)) return null;\n throw error;\n }\n }\n\n private isAbsent(error: Error): boolean {\n // webpieces-disable no-any-unknown -- node attaches `code` to fs errors without typing it on Error\n const code = (error as unknown as Record<string, unknown>)['code'];\n return typeof code === 'string' && ABSENT_ERROR_CODES.includes(code);\n }\n\n // A readable file that is not a JSON object is a WRONG file, not an absent one — hence the throw.\n // webpieces-disable no-any-unknown -- an unvalidated user-authored document; every field is narrowed below\n private parse(raw: string, file: string): Record<string, unknown> {\n // webpieces-disable no-unmanaged-exceptions -- chokepoint: JSON.parse's own message is useless to an\n // agent on its own, so it is re-thrown as the InformAiError that names the file and the fix\n // eslint-disable-next-line @webpieces/no-unmanaged-exceptions\n try {\n // webpieces-disable no-any-unknown -- opaque parsed JSON, narrowed immediately below\n const parsed: unknown = JSON.parse(raw);\n if (typeof parsed !== 'object' || parsed === null || Array.isArray(parsed)) {\n throw new InformAiError(this.error(file, 'the file must contain a single JSON OBJECT, e.g. {}.'));\n }\n // webpieces-disable no-any-unknown -- narrowed to a non-null, non-array object one line above\n return parsed as Record<string, unknown>;\n } catch (err: unknown) {\n const error = toError(err);\n if (error instanceof InformAiError) throw error;\n throw new InformAiError(this.error(file, `the file is not valid JSON (${error.message}).`), { cause: error });\n }\n }\n\n // webpieces-disable no-any-unknown -- see parse(); the document is user-authored and unvalidated\n private validate(raw: Record<string, unknown>, file: string): HomeConfig {\n this.assertNotRetired(raw, file);\n this.docKeys.assertAreStrings(raw, '', (m: string): string => this.error(file, m));\n this.warnUnknownKeys(Object.keys(raw), ALLOWED_TOP_LEVEL, '');\n const section = raw[HOME_EXPERIMENTAL_SECTION];\n if (section !== undefined && (typeof section !== 'object' || section === null || Array.isArray(section))) {\n throw new InformAiError(this.error(file, `\"${HOME_EXPERIMENTAL_SECTION}\" must be a JSON object.`));\n }\n // webpieces-disable no-any-unknown -- narrowed to a non-null, non-array object one line above\n const experimental = (section ?? {}) as Record<string, unknown>;\n this.docKeys.assertAreStrings(experimental, `${HOME_EXPERIMENTAL_SECTION}.`,\n (m: string): string => this.error(file, m));\n this.warnUnknownKeys(Object.keys(experimental), ALLOWED_EXPERIMENTAL, `${HOME_EXPERIMENTAL_SECTION}.`);\n return new HomeConfig(\n this.readOptionalBoolean(experimental, HOME_KEY_WHOLE_REPO_BUILD_GUARD, file, GUARD_OFF_WHEN_ABSENT),\n this.readOptionalBoolean(experimental, HOME_KEY_ORPHAN_DIR_SWEEP, file, GUARD_OFF_WHEN_ABSENT),\n this.readOptionalPositiveInteger(\n experimental, HOME_KEY_MAX_CONCURRENT_BUILDS, file, DEFAULT_MAX_CONCURRENT_BUILDS),\n );\n }\n\n /**\n * The NUMERIC sibling of {@link readOptionalBoolean}, and the same three rules apply unchanged: the\n * key is OPTIONAL (absent → `whenAbsent`, stated out loud by the caller), a PRESENT value of the\n * wrong type is an ERROR, and nothing here ever guesses.\n *\n * \"Wrong type\" is stricter than `typeof value === 'number'`, because for this key the wrong NUMBERS\n * are as meaningless as the wrong types: `0` is a machine that may never build, `-1` and `2.5` are\n * not counts of anything, and `NaN` compares false against every threshold and would silently\n * disable the check. A positive integer is the only value that means something, so it is the only\n * value accepted — and the rejection names the offending value, exactly as the boolean one does.\n *\n * This does NOT soften the machine-global forward-compatibility rule: an UNKNOWN key is still\n * ignored with a warning. Only a key THIS release understands is type-checked, and no release of\n * webpieces has ever given `maxConcurrentBuilds` a non-numeric meaning.\n */\n // webpieces-disable no-any-unknown -- see parse()\n // eslint-disable-next-line @typescript-eslint/max-params\n private readOptionalPositiveInteger(\n experimental: Record<string, unknown>, key: string, file: string, whenAbsent: number,\n ): number {\n const value = experimental[key];\n if (value === undefined) return whenAbsent;\n if (typeof value !== 'number' || !Number.isInteger(value) || value < 1) {\n throw new InformAiError(this.error(file,\n `\"${HOME_EXPERIMENTAL_SECTION}.${key}\" must be a POSITIVE WHOLE NUMBER (1 or more), not ` +\n `${JSON.stringify(value)}. Write it as a bare JSON number, e.g. ` +\n `\"${key}\": ${String(whenAbsent)} — or delete the key to use the default of ` +\n `${String(whenAbsent)}.`));\n }\n return value;\n }\n\n /**\n * An absent key falls back to `whenAbsent`, which every caller states OUT LOUD by passing\n * `GUARD_OFF_WHEN_ABSENT` — an implicit \"absent means false\" buried in this method would put the\n * default and the key that carries it in different places, free to drift apart.\n *\n * A PRESENT key of the wrong type is still an ERROR, and that is the line neither the unknown-key change\n * nor this one moved: `\"whole-repo-build-guard\": \"yes\"` is a file somebody wrote wrongly, not\n * a file written for a different release. No release of webpieces has ever given this key a string\n * meaning, so there is no forward-compatibility story to protect and nothing is gained by guessing —\n * whereas guessing would turn a typed value into a silent fallback to the default, which is the very\n * cost the unknown-key warning exists to bound.\n *\n * This is the ONLY reader; see the every-key-is-optional note above for why there is no required\n * variant.\n */\n // webpieces-disable no-any-unknown -- see parse()\n // eslint-disable-next-line @typescript-eslint/max-params\n private readOptionalBoolean(\n experimental: Record<string, unknown>, key: string, file: string, whenAbsent: boolean,\n ): boolean {\n const value = experimental[key];\n if (value === undefined) return whenAbsent;\n return this.asBoolean(value, key, file, ' Remove the quotes, or delete the key.');\n }\n\n // webpieces-disable no-any-unknown -- see parse()\n // eslint-disable-next-line @typescript-eslint/max-params\n private asBoolean(value: unknown, key: string, file: string, fix: string): boolean {\n if (typeof value !== 'boolean') {\n throw new InformAiError(this.error(file,\n `\"${HOME_EXPERIMENTAL_SECTION}.${key}\" must be the boolean ` +\n `true or false, not ${JSON.stringify(value)}.${fix}`));\n }\n return value;\n }\n\n // Retired keys are checked BEFORE unknown-key reporting: \"unknown key\" would send an agent deleting a\n // key whose value it should be MOVING, which is the whole reason the retirement table exists.\n // webpieces-disable no-any-unknown -- see parse()\n private assertNotRetired(raw: Record<string, unknown>, file: string): void {\n for (const entry of RETIRED_HOME_CONFIG_KEYS) {\n if (!this.isPresentAt(raw, entry.key)) continue;\n const destination = entry.movedTo === ''\n ? 'It was removed with no replacement.'\n : `It moved to \"${entry.movedTo}\".`;\n throw new InformAiError(this.error(file,\n `\"${entry.key}\" is RETIRED. ${destination} ${entry.instruction}`));\n }\n }\n\n // Is `dotted` (one or two segments — the file is two levels deep by construction) actually present?\n // webpieces-disable no-any-unknown -- see parse()\n private isPresentAt(raw: Record<string, unknown>, dotted: string): boolean {\n const parts = dotted.split('.');\n if (parts.length === 1) return raw[parts[0]] !== undefined;\n const section = raw[parts[0]];\n if (typeof section !== 'object' || section === null || Array.isArray(section)) return false;\n // webpieces-disable no-any-unknown -- narrowed to a non-null, non-array object one line above\n return (section as Record<string, unknown>)[parts[1]] !== undefined;\n }\n\n /**\n * The understood keys AT ONE LEVEL, rendered from the allow-list rather than hand-listed — and\n * rendered at the level the reader's key was actually found, so a mistyped SECTION is answered with\n * the sections and a mistyped FLAG with the flags. The hand-listed version named two keys and went\n * stale the moment a third arrived, telling an agent its brand-new key was not accepted while the\n * validator right above accepted it.\n */\n private quotedKeys(allowed: readonly string[], prefix: string): string {\n return allowed.map((key: string): string => `\"${prefix}${key}\"`).join(', ');\n }\n\n /**\n * An unknown key is IGNORED — see the class docblock for why this one file cannot reject it — but it\n * is never SILENT. The warning is the entire mitigation for the cost of ignoring, so it says both\n * things a reader needs: that the key did nothing, and what the understood keys are.\n *\n * ─── WHY THIS IS NOT THE \"console side channel\" SHAPE ────────────────────────────────────────────\n * That shape is a rule or a library reporting a FAILURE — or a cure for one — by printing it instead\n * of throwing a structured value to the one top-level handler. This is the opposite case, and the\n * distinction is the entire subject of this change: an unknown key here is NOT a failure. The load\n * SUCCEEDS, a valid HomeConfig is returned, every caller proceeds normally, and there is no cure the\n * reader is obliged to apply — a key from a newer release is a CORRECT file being read by an older\n * validator. There is no throw this could be, because throwing is precisely the behaviour being\n * deleted here; and returning it would mean inventing a warnings channel through `load()` that no\n * caller has any reason to render.\n *\n * stderr, not stdout, for the usual reason: this runs inside hooks whose stdout is a JSON decision\n * and inside `wp-*` commands whose stdout is their real output, and neither may be polluted. It is\n * the same channel, with the same `[webpieces]` prefix, that `state-dir-migration.announce` already\n * uses in this package for the same category of finding — something a human may want to know about\n * and is not required to act on.\n */\n /**\n * The sentence for a flag a HUMAN ended, or '' when this key is not one.\n *\n * Consulted BEFORE the retired-near-miss hint and before the generic \"typo or newer release\" line,\n * because for these keys that generic line is actively misleading: it invites the reader to check\n * their spelling or upgrade, when the truth is that they spelled it correctly, they are on a new\n * enough release, and the thing they asked for now happens anyway.\n */\n private endedExperimentHint(dotted: string): string {\n const ended = ENDED_EXPERIMENTS.find((e: EndedExperiment): boolean => e.key === dotted);\n if (ended === undefined) return '';\n return ` That experiment ENDED in @webpieces ${ended.endedIn}. ${ended.note}`;\n }\n\n private warnUnknownKeys(found: string[], allowed: readonly string[], prefix: string): void {\n // ACCEPTED everywhere, ADVERTISED nowhere. A documentation key is not a setting, so it is\n // skipped here rather than added to the allowed lists: those lists are walked elsewhere to build\n // typed sample documents, and listing `_doc` under \"Understood here\" — or offering it as the\n // nearest match to a misspelled setting — would send someone hunting for what it configures.\n // It configures nothing.\n for (const key of found) {\n if (allowed.includes(key) || this.docKeys.isDocumentationKey(key)) continue;\n const near = this.nearestKnownKey(key, allowed);\n const guess = near !== ''\n ? ` Did you mean \"${prefix}${near}\"?`\n : this.endedExperimentHint(`${prefix}${key}`)\n || this.nearRetiredHint(`${prefix}${key}`)\n || ' If it is a typo, fix the spelling; if it is from a NEWER @webpieces than this repo pins, upgrade this repo to use it.';\n this.warn(\n `\"${prefix}${key}\" is not a key this @webpieces release understands, so it was IGNORED ` +\n `and had NO effect.${guess} Understood here: ${this.quotedKeys(allowed, prefix)}.`);\n }\n }\n\n /**\n * A near-miss of a RETIRED key, pointed at its migration — or '' when nothing retired is close.\n *\n * The gap this closes: `assertNotRetired` matches a retired key EXACTLY, so `captureBuildGateLog`\n * throws with its migration instruction while `captureBuildGateLogg` — one stray character away, and\n * a far likelier thing to type — falls through to the generic \"IGNORED, might be from a newer\n * release\" line. That is the least helpful of the three answers offered to the reader whose intent is the\n * clearest, so the retired table is consulted here too, at the same distance-2 threshold.\n *\n * It only ever produces a WARNING, never a throw: this release cannot know whether the reader meant\n * the retired key or a newer one, and guessing wrong in the throwing direction is what the whole\n * change is about. Known keys are matched first, so a typo of a LIVE key is never answered with a\n * dead one.\n */\n private nearRetiredHint(dottedKey: string): string {\n for (const entry of RETIRED_HOME_CONFIG_KEYS) {\n if (this.editDistance(dottedKey.toLowerCase(), entry.key.toLowerCase()) > 2) continue;\n const destination = entry.movedTo === ''\n ? 'it was removed with no replacement'\n : `it moved to \"${entry.movedTo}\"`;\n return ` Did you mean the RETIRED key \"${entry.key}\"? If so, ${destination}. ${entry.instruction}`;\n }\n return '';\n }\n\n // One shape for every non-fatal finding, matching state-dir-migration's `[webpieces] <what>:` prefix\n // so a reader can tell at a glance which subsystem is talking.\n private warn(message: string): void {\n process.stderr.write(`[webpieces] ~/.webpieces/config.json: ${message}\\n`);\n }\n\n /**\n * The closest understood key within two edits, or '' when nothing is close.\n *\n * This used to be a case-insensitive EQUALITY test, which was adequate while an unknown key was a\n * hard error — the error itself was the signal, and the suggestion only saved a reading. Now the\n * suggestion IS the signal, so it has to catch the typos an equality test misses: a doubled letter,\n * a dropped one, a transposition, a stray trailing character (`orphan-dir-sweeped`). Two is the\n * useful threshold — it covers every one of those and still refuses to guess for a genuinely new\n * key, which is the case that must NOT be dressed up as a typo.\n */\n private nearestKnownKey(key: string, allowed: readonly string[]): string {\n let best = '';\n let bestDistance = 3;\n for (const candidate of allowed) {\n const distance = this.editDistance(key.toLowerCase(), candidate.toLowerCase());\n if (distance >= bestDistance) continue;\n bestDistance = distance;\n best = candidate;\n }\n return best;\n }\n\n /** Ordinary Levenshtein distance, one row at a time — the key names are short and this runs once. */\n private editDistance(a: string, b: string): number {\n let previous: number[] = [];\n for (let j = 0; j <= b.length; j += 1) previous.push(j);\n for (let i = 1; i <= a.length; i += 1) {\n const current: number[] = [i];\n for (let j = 1; j <= b.length; j += 1) {\n const substitution = previous[j - 1] + (a[i - 1] === b[j - 1] ? 0 : 1);\n current.push(Math.min(substitution, previous[j] + 1, current[j - 1] + 1));\n }\n previous = current;\n }\n return previous[b.length];\n }\n\n // One shape for every rejection: what is wrong, in which file, and the fact that deleting the file is\n // always a legal fix — because the file is optional, and \"no file\" is a fully supported state.\n private error(file: string, detail: string): string {\n return `[~/.webpieces/config.json] ${detail}\\n\\n` +\n `File: ${file}\\n` +\n `This machine-local preference file is OPTIONAL and EXPERIMENTAL. Editing it is always ` +\n `permitted, even while it is invalid, and deleting it outright is a valid fix — with no such ` +\n `file every webpieces command behaves exactly as it does by default.`;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"home-config.js","sourceRoot":"","sources":["../../../../../packages/tooling/rules-config/src/home-config.ts"],"names":[],"mappings":";;;;AAAA,+CAAyB;AACzB,+CAAyB;AACzB,mDAA6B;AAC7B,yCAA2D;AAE3D,uDAAkD;AAClD,yCAAqC;AACrC,iEAAwG;AAU/F,mGAVA,yCAAkB,OAUA;AAAE,6FAVA,mCAAY,OAUA;AAAE,gGAVA,sCAAe,OAUA;AAAE,4FAVA,kCAAW,OAUA;AATvE,yEAEoC;AAQ3B,qGATL,+CAAoB,OASK;AAAE,yGATL,mDAAwB,OASK;AAAE,gGATL,0CAAe,OASK;AAAE,kGATL,4CAAiB,OASK;AAP3F,yDAI4B;AAK5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgIG;AACH,uDAK4B;AAJxB,mHAAA,eAAe,OAAA;AAAE,oHAAA,gBAAgB,OAAA;AAAE,6HAAA,yBAAyB,OAAA;AAC5D,mIAAA,+BAA+B,OAAA;AAAE,6HAAA,yBAAyB,OAAA;AAAE,mIAAA,+BAA+B,OAAA;AAC3F,kIAAA,8BAA8B,OAAA;AAAE,iIAAA,6BAA6B,OAAA;AAC7D,qHAAA,iBAAiB,OAAA;AAAE,iIAAA,6BAA6B,OAAA;AAAE,gIAAA,4BAA4B,OAAA;AAAE,wHAAA,oBAAoB,OAAA;AAGxG;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,uGAAuG;AACvG,oGAAoG;AACpG,qGAAqG;AACrG,iGAAiG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C;QACvB,CAAC;QACD,OAAO,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;IAC9B,CAAC;IAED,sGAAsG;IACtG,+FAA+F;IACvF,KAAK,CAAC,IAAY,EAAE,MAAc;QACtC,OAAO,8BAA8B,MAAM,MAAM;YAC7C,SAAS,IAAI,IAAI;YACjB,wFAAwF;YACxF,8FAA8F;YAC9F,qEAAqE,CAAC;IAC9E,CAAC;CACJ,CAAA;AAtWY,8CAAiB;4BAAjB,iBAAiB;IAD7B,IAAA,sBAAU,EAAC,8BAAkB,CAAC,SAAS,CAAC;6CAEC,kCAAW;GADxC,iBAAiB,CAsW7B","sourcesContent":["import * as fs from 'fs';\nimport * as os from 'os';\nimport * as path from 'path';\nimport { injectable, bindingScopeValues } from 'inversify';\n\nimport { InformAiError } from './inform-ai-error';\nimport { toError } from './to-error';\nimport { DOCUMENTATION_KEYS, HOME_KEY_DOC, HOME_KEY_AI_DOC, HomeDocKeys } from './home-config-doc-keys';\nimport {\n RetiredHomeConfigKey, RETIRED_HOME_CONFIG_KEYS, EndedExperiment, ENDED_EXPERIMENTS,\n} from './home-config-retired-keys';\nimport {\n ALLOWED_EXPERIMENTAL, ALLOWED_TOP_LEVEL, DEFAULT_MAX_CONCURRENT_BUILDS, GUARD_OFF_WHEN_ABSENT,\n HOME_CONFIG_DIR, HOME_CONFIG_FILE, HOME_EXPERIMENTAL_SECTION, HOME_KEY_MAX_CONCURRENT_BUILDS,\n HOME_KEY_ORPHAN_DIR_SWEEP, HOME_KEY_TURN_OFF_ALL_REVIEWERS, HOME_KEY_WHOLE_REPO_BUILD_GUARD,\n} from './home-config-keys';\n\nexport { DOCUMENTATION_KEYS, HOME_KEY_DOC, HOME_KEY_AI_DOC, HomeDocKeys };\nexport { RetiredHomeConfigKey, RETIRED_HOME_CONFIG_KEYS, EndedExperiment, ENDED_EXPERIMENTS };\n\n/**\n * `~/.webpieces/config.json` — the MACHINE-GLOBAL preference file, and a different thing from the repo's\n * tracked `webpieces.config.json`. It is EXPERIMENTAL and entirely OPTIONAL.\n *\n * ─── ABSENT IS THE NORMAL STATE, AND IT IS NEVER AN ERROR ─────────────────────────────────────────────\n * Essentially every consumer of these packages has no such file, and for them every `wp-*` command must\n * behave byte-for-byte as it did before this file was ever read: no error, no warning, no log line, no\n * extra file, nothing. `load()` therefore treats EVERY failure to READ the bytes — the file missing, the\n * `~/.webpieces` directory missing, a permission error, a path component that is not a directory — as\n * \"not opted in\", and returns all-defaults silently. That is not a fallback for a wrong shape; it is the\n * definition of \"the user did not create this file\".\n *\n * ─── THE STANDING RULE, FOR WHOEVER EDITS THIS FILE NEXT ──────────────────────────────────────────────\n * This file is MACHINE-GLOBAL: ONE document on the disk, read by EVERY repo on the machine, and those\n * repos are pinned to DIFFERENT webpieces releases. Two rules follow, and they are not negotiable:\n *\n * (a) NO KEY MAY EVER BE REQUIRED. `readOptionalBoolean` and `readOptionalPositiveInteger` are the\n * ONLY readers, and BOTH are optional-by-construction. There is no `readRequiredBoolean`, no\n * `RequiredHomeFlag`, no `REQUIRED_HOME_FLAGS` — those existed once and were deleted; do not\n * reintroduce them under any name, in any type.\n * (b) AN UNKNOWN KEY IS IGNORED, never rejected. `warnUnknownKeys` warns; nothing throws.\n *\n * Both halves are needed, and either one alone still leaves a file that some installed release rejects:\n *\n * (a) covers the OLD FILE on a NEW release — a document written before a key existed, missing it.\n * (b) covers the NEW FILE on an OLD release — a document carrying a key that release never heard of.\n *\n * Break either one and every repo on the machine that is not on the newest release hard-blocks: a\n * rejection here fails config load, and that denies every tool call in that repo until somebody upgrades\n * all of them in lockstep. That is the outage this design exists to make impossible, and it is not\n * hypothetical — it is the shape of the incident recorded at the bottom of this docblock.\n *\n * `home-config.spec.ts` pins both halves, and pins them by ENUMERATING `ALLOWED_EXPERIMENTAL` rather\n * than by a hand-written list, so a key added later is covered by the invariant automatically instead of\n * silently escaping it.\n *\n * ─── PRESENT IS STRICT ABOUT WHAT IT UNDERSTANDS, AND FORWARD-COMPATIBLE ABOUT WHAT IT DOES NOT ───────\n * Once the bytes are readable, someone DELIBERATELY created this file, and three of the four failure\n * modes are REJECTED exactly as webpieces.config.json rejects them (see `retired-config-keys.ts`), with\n * an error naming the exact fix and no `??` fallback anywhere:\n *\n * UNPARSEABLE not JSON, or not a single JSON object → REJECT\n * RETIRED KEY listed in RETIRED_HOME_CONFIG_KEYS → REJECT, carrying the migration\n * WRONG TYPE a KNOWN key holding a value of the wrong type → REJECT\n * (a non-boolean for a boolean key; anything but a positive whole number for a\n * numeric one — see `readOptionalPositiveInteger`)\n * UNKNOWN KEY a key no version of this validator has heard of → IGNORED, with a warning\n *\n * ─── WHY THE LAST ROW DIFFERS FROM webpieces.config.json, WHICH STAYS STRICT ──────────────────────────\n * The difference is not a softening of policy; it is that the two files have different CARDINALITY.\n *\n * webpieces.config.json is REPO-TRACKED. One repo, one file, one pinned @webpieces release, and the\n * file moves through git in lockstep with the code that reads it. \"One version reads this document\" is\n * true by construction, so an unknown key there can only be a typo or a dead key — and rejecting it is\n * right, because it is the delivery mechanism for the migration.\n *\n * THIS file is MACHINE-GLOBAL. ONE document, read by EVERY repo on the machine, and those repos pin\n * DIFFERENT releases — deliberately, since a repo's pin is tracked and moves when its own PR lands.\n * So \"an unknown key\" here has a second, entirely legitimate cause that cannot occur in the repo file:\n * a key a NEWER release added, being read by an OLDER one. Rejecting it means adding any key to this\n * file hard-blocks every repo on the machine that has not yet been upgraded — an outage produced by\n * opting IN to an experimental flag, which is the same shape of failure that moved these flags out of\n * webpieces.config.json in the first place (see the section below).\n *\n * This is the exact mirror of the already-settled rule that no key here may be REQUIRED. Both halves fall\n * out of one fact: the set of valid documents must be non-empty for EVERY release on the machine at once.\n * • omit a new key → an old release must not demand it (already true: every key is optional)\n * • add a new key → an old release must not reject it (this change)\n * With only the first half, the set of valid files was still empty the moment a key was added.\n *\n * ─── WHAT THAT COSTS, AND WHAT PAYS FOR IT ────────────────────────────────────────────────────────────\n * The cost is real and worth stating plainly: a TYPO now silently does nothing. `\"whole-repo-build-gaurd\"`\n * used to be a loud rejection; it is now a key nothing reads, so the flag keeps its default and nothing\n * about the machine's behaviour reveals the mistake.\n *\n * Every key here is an OPT-IN that defaults OFF, so a typo costs the author the feature they meant to\n * switch on: misspell `whole-repo-build-guard` and the guard stays inert while they believe they armed\n * it. That is the milder of the two failures — nothing they were doing stops working — but it is still\n * invisible without a signal, which is why the warning below is not optional decoration, and why\n * `nearestKnownKey` had to get fuzzier than the case-insensitive match it replaced: `gaurd` is a\n * transposition, exactly the class of typo an equality test cannot see.\n *\n * That is mitigated, not eliminated, by making the ignore VISIBLE: every unknown key is printed once per\n * load as a `[webpieces]` warning on stderr, and `nearestKnownKey` upgrades that line with a \"did you\n * mean\" whenever the key is within a two-character edit of a known one — which is what a typo is, and\n * what a key from a newer release is not. A warning naming a close match is the strongest signal\n * available that does not also block a colleague on an older pin.\n *\n * The trade was taken this way round because the two mistakes are not symmetric. A typo costs its author\n * one flag that did not turn on, discoverable the moment they check whether the feature is doing\n * anything, on their own machine. A rejection costs every repo on the machine every tool call, and the\n * person it blocks is usually not the person who edited the file.\n *\n * An unknown TOP-LEVEL key is ignored on the identical argument, and it is the more important half: a\n * future release adding a second section (`preferences`, say) beside `experimental` would otherwise be\n * unreadable by every older release on the machine, which is precisely the sequencing being deleted here.\n *\n * ─── REJECTING IS STILL SELF-RECOVERABLE, FOR THE THREE ROWS THAT STILL REJECT ────────────────────────\n * A Write/Edit targeting THIS path is an unconditional PASS in the hook guards (see `isHomeConfigPath`,\n * wired into ai-hook-rules' runner beside the webpieces.config.json pass), so an agent can always repair\n * the file the loader just rejected.\n *\n * ─── WHY A MACHINE-LOCAL SWITCH LIVES HERE AND NOT IN webpieces.config.json ───────────────────────────\n * `whole-repo-build-guard` first shipped as an ordinary validated guard: `mode: 'ON'` by default AND an\n * entry required under `hookGuards`. The consequence on upgrade was an outage — a consumer repo that had\n * not yet added the entry hit fault Y, which blocks EVERY Bash call, for a feature nobody had opted into.\n *\n * The rule that buys back: a switch that lives HERE needs no file, no key and no edit to be in its\n * default state. A repo-tracked config key cannot express that — an entry there is something every\n * consumer must add, on a schedule set by whoever bumps the release.\n *\n * Note which half of that was the outage. It was the REQUIRED KEY: the failure was at config LOAD,\n * before any command was judged. That is why every key here stays OPTIONAL and why an absent file\n * returns all-defaults silently.\n *\n * The DEFAULT is settled separately, by a standing policy this file does not get to re-litigate: EVERY\n * `experimental.*` flag ships OFF and stays OFF for two years. `whole-repo-build-guard` is one of them,\n * so it is OFF unless a machine writes `{\"experimental\": {\"whole-repo-build-guard\": true}}`. A flag that\n * defaults ON is not an experiment — it is a shipped behaviour that skipped its soak period, and it\n * changes what every agent on every machine can do the moment they upgrade. Low uptake of an opt-in\n * experiment is information ABOUT the experiment; it is not a licence to force it on everybody.\n *\n * ─── WHERE THE KEY NAMES LIVE ─────────────────────────────────────────────────────────────────────────\n * The key constants, the allow-lists and the declared defaults are in `home-config-keys.ts` — split out\n * when this file hit its line limit, exactly as `home-config-doc-keys.ts` and\n * `home-config-retired-keys.ts` were before it. They are RE-EXPORTED below, so `./home-config` remains\n * the one import path and nothing outside this module names the split. The per-key documentation moved\n * WITH the keys; read it there.\n */\nexport {\n HOME_CONFIG_DIR, HOME_CONFIG_FILE, HOME_EXPERIMENTAL_SECTION,\n HOME_KEY_WHOLE_REPO_BUILD_GUARD, HOME_KEY_ORPHAN_DIR_SWEEP, HOME_KEY_TURN_OFF_ALL_REVIEWERS,\n HOME_KEY_MAX_CONCURRENT_BUILDS, DEFAULT_MAX_CONCURRENT_BUILDS,\n ALLOWED_TOP_LEVEL, ALLOWED_EXPERIMENTAL_BOOLEANS, ALLOWED_EXPERIMENTAL_NUMBERS, ALLOWED_EXPERIMENTAL,\n} from './home-config-keys';\n\n/**\n * ─── EVERY KEY IS OPTIONAL, AND THAT IS A HARD REQUIREMENT OF WHERE THIS FILE LIVES ───────────────────\n * This file is MACHINE-GLOBAL: one document, read by every repo on the machine, and those repos pin\n * DIFFERENT webpieces releases. A REQUIRED key cannot survive that, because it makes the set of valid\n * files EMPTY:\n *\n * • omit the new key → the NEW release rejects the file (\"REQUIRED and not set\")\n * • add the new key → every OLDER release rejects the file (\"not a known key\")\n *\n * There is no third option, and both rejections block. `whole-repo-build-guard` was required for the\n * reason recorded in #627 — a flag that decides whether a command RUNS should not be inferred — and that\n * reasoning was sound for a single version and wrong for a shared file. It is optional now, along with\n * every other key.\n *\n * Absent then reads as the ONE declared default, `GUARD_OFF_WHEN_ABSENT`: false, for every key without\n * exception, which is byte-for-byte the behaviour of having no file at all.\n *\n * The other half of cross-version safety — an OLD release IGNORING a key a NEW one added, rather than\n * rejecting it — is solved by `warnUnknownKeys` below. The two halves are one invariant: for the set of\n * valid documents to be non-empty across every release installed on the machine, neither omitting a key\n * nor adding one may be an error.\n */\n\n// Read errors that mean \"the file is not there / not reachable\" rather than \"the file is wrong\". Every\n// one of these resolves to the all-defaults config, silently. Widened deliberately past ENOENT: the\n// parent `~/.webpieces` may not exist (ENOENT), may be a file (ENOTDIR), may be unreadable (EACCES /\n// EPERM), and the path itself may be a directory (EISDIR). None of those is a user who opted in.\nconst ABSENT_ERROR_CODES: readonly string[] = ['ENOENT', 'ENOTDIR', 'EACCES', 'EPERM', 'EISDIR', 'ELOOP', 'ENAMETOOLONG'];\n\n/** The parsed `~/.webpieces/config.json`. Data-only (per CLAUDE.md — classes, not interfaces, for data). */\nexport class HomeConfig {\n /**\n * EXPERIMENTAL, and OFF unless this machine opts IN with an explicit `true`. When true,\n * `whole-repo-build-guard` BLOCKS a Bash command that would build the WHOLE monorepo and hands back\n * the repo's own scoped build command (`pnpm wp-build`). False — and absent, and no file at all —\n * makes the guard completely inert: no block, no log, no message.\n *\n * This is the guard's ONLY switch, and it is an OPT-IN. There is deliberately no\n * webpieces.config.json entry for it (see RETIRED_CONFIG_KEYS): a guard that every consumer must\n * ADD A KEY to avoid being blocked by is a guard that ships an outage on upgrade, which is exactly\n * what happened once. Living here means the default state needs no file, no key and no edit.\n */\n wholeRepoBuildGuard: boolean;\n\n /**\n * EXPERIMENTAL. When true, `wp-sync-main` ARCHIVES the orphan directories it finds — the\n * package directories left behind on every clone by an `nx g move`, which git cannot remove because\n * an ignored `dist/` or `node_modules/` survives the deletion of every tracked file under them.\n *\n * False — and the all-defaults value for a machine with no such file — means the sweep only REPORTS\n * what it found and moves nothing. That asymmetry is the point of shipping this behind the home\n * config at all: the author can run it live across their own clones for a release while every\n * colleague's repo is untouched, and neither state depends on a tracked key anybody must add.\n *\n * The sweep itself never deletes (see OrphanDirArchiver): directories move under `.webpieces/trash/`\n * with a printed `recover=`, so the worst case for a false positive is a `mv` somebody undoes. The\n * ARCHIVE is reaped after 30 days, which is a real deletion — of the second copy, on a timer long\n * enough that anything still wanted has been noticed.\n */\n orphanDirSweep: boolean;\n\n /**\n * How many builds may be live on this MACHINE before `pnpm wp-build` refuses to start another. Live\n * is counted from `~/.webpieces/builds.log` — see `builds-log.ts`, and\n * `decisions/0006-the-build-ledger-is-machine-global.md` for why that file lives outside any repo.\n *\n * `DEFAULT_MAX_CONCURRENT_BUILDS` when absent. The gate stages (`wp-review-upsert-pr`,\n * `wp-finish-upsert-pr`) are NEVER refused whatever this says — blocking the sanctioned path is how\n * you wedge a PR — though their builds do count toward what refuses an ad-hoc `wp-build`.\n */\n maxConcurrentBuilds: number;\n\n /**\n * EXPERIMENTAL, and OFF unless this machine opts IN with an explicit `true`. When true, the PR gate\n * spawns NO reviewer subagents AT ALL — the REQUIRED checklists included — and the dashboard becomes\n * the entire review product. False, absent, and no file at all are byte-for-byte today's behaviour.\n *\n * THE FULL CONTRACT, AND THE REASONS IT MAY NOT MOVE, ARE ON\n * {@link HOME_KEY_TURN_OFF_ALL_REVIEWERS}. Read that docblock before you delete, rename, narrow or\n * re-home this field. The four things it says, in one line each:\n * • ONLY `~/.webpieces/config.json` — never a `webpieces.config.json` key, in any release;\n * • a KILL SWITCH, not a filter — required reviewers are suppressed too, deliberately;\n * • a tracked repo key would let a BRANCH switch off the reviewers judging that branch;\n * • it is an `experimental.*` flag, so only a HUMAN ever ends it.\n *\n * The suppression is never silent: stage ②'s output, the dashboard and the PR body (which is the\n * squash-merge commit body) all name this flag, so a `git log` reader can tell that a commit's\n * reviewers were switched off and by what.\n */\n turnOffAllReviewers: boolean;\n\n // ALL FOUR required, no defaults. A defaulted parameter would leave `new HomeConfig(true)` compiling\n // after this class grew a second flag, silently meaning \"guard off\" — an old spelling that still\n // typechecks with a changed meaning is exactly the shim this repo does not ship. The 3-arg arity this\n // class had before `turnOffAllReviewers` is DELETED rather than overloaded, per\n // `.claude/rules/no-backwards-compat.md`: the compile errors ARE the migration. The\n // absent-file state is constructed in exactly one place — load()'s absent-file branch.\n // eslint-disable-next-line @typescript-eslint/max-params\n constructor(\n wholeRepoBuildGuard: boolean, orphanDirSweep: boolean, maxConcurrentBuilds: number,\n turnOffAllReviewers: boolean,\n ) {\n this.wholeRepoBuildGuard = wholeRepoBuildGuard;\n this.orphanDirSweep = orphanDirSweep;\n this.maxConcurrentBuilds = maxConcurrentBuilds;\n this.turnOffAllReviewers = turnOffAllReviewers;\n }\n}\n\n\n/**\n * Loads and validates `~/.webpieces/config.json`, and resolves whether a path IS that file (for the\n * guard carve-out that keeps a rejection repairable).\n *\n * Strict about everything it UNDERSTANDS (a retired key, a known key of the wrong type, and a document\n * that is not JSON all throw); forward-compatible about everything it does not (an unknown key is\n * ignored with a warning). The class docblock at the top of this file has the reasoning.\n */\n@injectable(bindingScopeValues.Singleton)\nexport class HomeConfigService {\n constructor(private readonly docKeys: HomeDocKeys = new HomeDocKeys()) {}\n\n /** Absolute path to the preference file. `homeDir` is a parameter so specs never touch a real HOME. */\n configPath(homeDir: string = os.homedir()): string {\n return path.join(homeDir, HOME_CONFIG_DIR, HOME_CONFIG_FILE);\n }\n\n /**\n * The preferences. Returns all-defaults, silently and without touching anything, when the file is not\n * there. THROWS InformAiError, naming the fix, when a file that IS there is wrong in a way this\n * release can be sure about — unparseable, a RETIRED key, or a KNOWN key of the wrong type. A key it\n * simply does not recognise is ignored with a warning, because it may be a newer release's key and\n * this file is shared by every repo on the machine.\n */\n load(homeDir: string = os.homedir()): HomeConfig {\n const raw = this.readIfPresent(this.configPath(homeDir));\n // THE ABSENT-FILE STATE, and the ONE place it is constructed. Every flag is off — the same value\n // a present file that does not name the key gets, so \"no file\" and \"file that ignores this key\"\n // can never disagree. Spelled out rather than defaulted in the constructor — see the note there\n // on why a defaulted parameter is a shim.\n if (raw === null) {\n return new HomeConfig(\n GUARD_OFF_WHEN_ABSENT, GUARD_OFF_WHEN_ABSENT, DEFAULT_MAX_CONCURRENT_BUILDS,\n GUARD_OFF_WHEN_ABSENT);\n }\n return this.validate(this.parse(raw, this.configPath(homeDir)), this.configPath(homeDir));\n }\n\n /**\n * True when `candidate` names `~/.webpieces/config.json`, in any of the forms an agent writes it:\n * an absolute path, a `~/`-prefixed path, or one still spelled `$HOME/…` / `${HOME}/…`.\n *\n * This is what the hook guards call to grant the file an unconditional Write/Edit PASS. Without it a\n * strict loader could reject the file while the guards blocked the edit that would fix it — the one\n * wedge webpieces.config.json is already immune to, and the reason its own carve-out exists.\n */\n isHomeConfigPath(candidate: string, homeDir: string = os.homedir()): boolean {\n if (candidate.trim() === '') return false;\n return path.resolve(this.expandHome(candidate.trim(), homeDir)) === path.resolve(this.configPath(homeDir));\n }\n\n // `~`, `$HOME` and `${HOME}` at the FRONT only — a home reference anywhere else is not a home path.\n private expandHome(candidate: string, homeDir: string): string {\n if (candidate === '~') return homeDir;\n for (const prefix of ['~/', '$HOME/', '${HOME}/']) {\n if (candidate.startsWith(prefix)) return path.join(homeDir, candidate.slice(prefix.length));\n }\n return candidate;\n }\n\n /**\n * The file's bytes, or null meaning \"no such file — the user did not opt in\".\n *\n * EVERY read failure is null. This is the single most important behaviour in the file: the absent\n * path is the path every consumer of these packages is on, and it may never reach an error branch.\n * An error code outside ABSENT_ERROR_CODES is genuinely exceptional (EIO, EBUSY) and is rethrown,\n * because silently disabling on a failing disk would be its own kind of lie.\n */\n private readIfPresent(file: string): string | null {\n // webpieces-disable no-unmanaged-exceptions -- chokepoint: this catch IS the \"you have no such file\"\n // decision, and that decision may never surface as a failure to a user who never created the file\n // eslint-disable-next-line @webpieces/no-unmanaged-exceptions\n try {\n return fs.readFileSync(file, 'utf8');\n } catch (err: unknown) {\n const error = toError(err);\n if (this.isAbsent(error)) return null;\n throw error;\n }\n }\n\n private isAbsent(error: Error): boolean {\n // webpieces-disable no-any-unknown -- node attaches `code` to fs errors without typing it on Error\n const code = (error as unknown as Record<string, unknown>)['code'];\n return typeof code === 'string' && ABSENT_ERROR_CODES.includes(code);\n }\n\n // A readable file that is not a JSON object is a WRONG file, not an absent one — hence the throw.\n // webpieces-disable no-any-unknown -- an unvalidated user-authored document; every field is narrowed below\n private parse(raw: string, file: string): Record<string, unknown> {\n // webpieces-disable no-unmanaged-exceptions -- chokepoint: JSON.parse's own message is useless to an\n // agent on its own, so it is re-thrown as the InformAiError that names the file and the fix\n // eslint-disable-next-line @webpieces/no-unmanaged-exceptions\n try {\n // webpieces-disable no-any-unknown -- opaque parsed JSON, narrowed immediately below\n const parsed: unknown = JSON.parse(raw);\n if (typeof parsed !== 'object' || parsed === null || Array.isArray(parsed)) {\n throw new InformAiError(this.error(file, 'the file must contain a single JSON OBJECT, e.g. {}.'));\n }\n // webpieces-disable no-any-unknown -- narrowed to a non-null, non-array object one line above\n return parsed as Record<string, unknown>;\n } catch (err: unknown) {\n const error = toError(err);\n if (error instanceof InformAiError) throw error;\n throw new InformAiError(this.error(file, `the file is not valid JSON (${error.message}).`), { cause: error });\n }\n }\n\n // webpieces-disable no-any-unknown -- see parse(); the document is user-authored and unvalidated\n private validate(raw: Record<string, unknown>, file: string): HomeConfig {\n this.assertNotRetired(raw, file);\n this.docKeys.assertAreStrings(raw, '', (m: string): string => this.error(file, m));\n this.warnUnknownKeys(Object.keys(raw), ALLOWED_TOP_LEVEL, '');\n const section = raw[HOME_EXPERIMENTAL_SECTION];\n if (section !== undefined && (typeof section !== 'object' || section === null || Array.isArray(section))) {\n throw new InformAiError(this.error(file, `\"${HOME_EXPERIMENTAL_SECTION}\" must be a JSON object.`));\n }\n // webpieces-disable no-any-unknown -- narrowed to a non-null, non-array object one line above\n const experimental = (section ?? {}) as Record<string, unknown>;\n this.docKeys.assertAreStrings(experimental, `${HOME_EXPERIMENTAL_SECTION}.`,\n (m: string): string => this.error(file, m));\n this.warnUnknownKeys(Object.keys(experimental), ALLOWED_EXPERIMENTAL, `${HOME_EXPERIMENTAL_SECTION}.`);\n return new HomeConfig(\n this.readOptionalBoolean(experimental, HOME_KEY_WHOLE_REPO_BUILD_GUARD, file, GUARD_OFF_WHEN_ABSENT),\n this.readOptionalBoolean(experimental, HOME_KEY_ORPHAN_DIR_SWEEP, file, GUARD_OFF_WHEN_ABSENT),\n this.readOptionalPositiveInteger(\n experimental, HOME_KEY_MAX_CONCURRENT_BUILDS, file, DEFAULT_MAX_CONCURRENT_BUILDS),\n this.readOptionalBoolean(experimental, HOME_KEY_TURN_OFF_ALL_REVIEWERS, file, GUARD_OFF_WHEN_ABSENT),\n );\n }\n\n /**\n * The NUMERIC sibling of {@link readOptionalBoolean}, and the same three rules apply unchanged: the\n * key is OPTIONAL (absent → `whenAbsent`, stated out loud by the caller), a PRESENT value of the\n * wrong type is an ERROR, and nothing here ever guesses.\n *\n * \"Wrong type\" is stricter than `typeof value === 'number'`, because for this key the wrong NUMBERS\n * are as meaningless as the wrong types: `0` is a machine that may never build, `-1` and `2.5` are\n * not counts of anything, and `NaN` compares false against every threshold and would silently\n * disable the check. A positive integer is the only value that means something, so it is the only\n * value accepted — and the rejection names the offending value, exactly as the boolean one does.\n *\n * This does NOT soften the machine-global forward-compatibility rule: an UNKNOWN key is still\n * ignored with a warning. Only a key THIS release understands is type-checked, and no release of\n * webpieces has ever given `maxConcurrentBuilds` a non-numeric meaning.\n */\n // webpieces-disable no-any-unknown -- see parse()\n // eslint-disable-next-line @typescript-eslint/max-params\n private readOptionalPositiveInteger(\n experimental: Record<string, unknown>, key: string, file: string, whenAbsent: number,\n ): number {\n const value = experimental[key];\n if (value === undefined) return whenAbsent;\n if (typeof value !== 'number' || !Number.isInteger(value) || value < 1) {\n throw new InformAiError(this.error(file,\n `\"${HOME_EXPERIMENTAL_SECTION}.${key}\" must be a POSITIVE WHOLE NUMBER (1 or more), not ` +\n `${JSON.stringify(value)}. Write it as a bare JSON number, e.g. ` +\n `\"${key}\": ${String(whenAbsent)} — or delete the key to use the default of ` +\n `${String(whenAbsent)}.`));\n }\n return value;\n }\n\n /**\n * An absent key falls back to `whenAbsent`, which every caller states OUT LOUD by passing\n * `GUARD_OFF_WHEN_ABSENT` — an implicit \"absent means false\" buried in this method would put the\n * default and the key that carries it in different places, free to drift apart.\n *\n * A PRESENT key of the wrong type is still an ERROR, and that is the line neither the unknown-key change\n * nor this one moved: `\"whole-repo-build-guard\": \"yes\"` is a file somebody wrote wrongly, not\n * a file written for a different release. No release of webpieces has ever given this key a string\n * meaning, so there is no forward-compatibility story to protect and nothing is gained by guessing —\n * whereas guessing would turn a typed value into a silent fallback to the default, which is the very\n * cost the unknown-key warning exists to bound.\n *\n * This is the ONLY reader; see the every-key-is-optional note above for why there is no required\n * variant.\n */\n // webpieces-disable no-any-unknown -- see parse()\n // eslint-disable-next-line @typescript-eslint/max-params\n private readOptionalBoolean(\n experimental: Record<string, unknown>, key: string, file: string, whenAbsent: boolean,\n ): boolean {\n const value = experimental[key];\n if (value === undefined) return whenAbsent;\n return this.asBoolean(value, key, file, ' Remove the quotes, or delete the key.');\n }\n\n // webpieces-disable no-any-unknown -- see parse()\n // eslint-disable-next-line @typescript-eslint/max-params\n private asBoolean(value: unknown, key: string, file: string, fix: string): boolean {\n if (typeof value !== 'boolean') {\n throw new InformAiError(this.error(file,\n `\"${HOME_EXPERIMENTAL_SECTION}.${key}\" must be the boolean ` +\n `true or false, not ${JSON.stringify(value)}.${fix}`));\n }\n return value;\n }\n\n // Retired keys are checked BEFORE unknown-key reporting: \"unknown key\" would send an agent deleting a\n // key whose value it should be MOVING, which is the whole reason the retirement table exists.\n // webpieces-disable no-any-unknown -- see parse()\n private assertNotRetired(raw: Record<string, unknown>, file: string): void {\n for (const entry of RETIRED_HOME_CONFIG_KEYS) {\n if (!this.isPresentAt(raw, entry.key)) continue;\n const destination = entry.movedTo === ''\n ? 'It was removed with no replacement.'\n : `It moved to \"${entry.movedTo}\".`;\n throw new InformAiError(this.error(file,\n `\"${entry.key}\" is RETIRED. ${destination} ${entry.instruction}`));\n }\n }\n\n // Is `dotted` (one or two segments — the file is two levels deep by construction) actually present?\n // webpieces-disable no-any-unknown -- see parse()\n private isPresentAt(raw: Record<string, unknown>, dotted: string): boolean {\n const parts = dotted.split('.');\n if (parts.length === 1) return raw[parts[0]] !== undefined;\n const section = raw[parts[0]];\n if (typeof section !== 'object' || section === null || Array.isArray(section)) return false;\n // webpieces-disable no-any-unknown -- narrowed to a non-null, non-array object one line above\n return (section as Record<string, unknown>)[parts[1]] !== undefined;\n }\n\n /**\n * The understood keys AT ONE LEVEL, rendered from the allow-list rather than hand-listed — and\n * rendered at the level the reader's key was actually found, so a mistyped SECTION is answered with\n * the sections and a mistyped FLAG with the flags. The hand-listed version named two keys and went\n * stale the moment a third arrived, telling an agent its brand-new key was not accepted while the\n * validator right above accepted it.\n */\n private quotedKeys(allowed: readonly string[], prefix: string): string {\n return allowed.map((key: string): string => `\"${prefix}${key}\"`).join(', ');\n }\n\n /**\n * An unknown key is IGNORED — see the class docblock for why this one file cannot reject it — but it\n * is never SILENT. The warning is the entire mitigation for the cost of ignoring, so it says both\n * things a reader needs: that the key did nothing, and what the understood keys are.\n *\n * ─── WHY THIS IS NOT THE \"console side channel\" SHAPE ────────────────────────────────────────────\n * That shape is a rule or a library reporting a FAILURE — or a cure for one — by printing it instead\n * of throwing a structured value to the one top-level handler. This is the opposite case, and the\n * distinction is the entire subject of this change: an unknown key here is NOT a failure. The load\n * SUCCEEDS, a valid HomeConfig is returned, every caller proceeds normally, and there is no cure the\n * reader is obliged to apply — a key from a newer release is a CORRECT file being read by an older\n * validator. There is no throw this could be, because throwing is precisely the behaviour being\n * deleted here; and returning it would mean inventing a warnings channel through `load()` that no\n * caller has any reason to render.\n *\n * stderr, not stdout, for the usual reason: this runs inside hooks whose stdout is a JSON decision\n * and inside `wp-*` commands whose stdout is their real output, and neither may be polluted. It is\n * the same channel, with the same `[webpieces]` prefix, that `state-dir-migration.announce` already\n * uses in this package for the same category of finding — something a human may want to know about\n * and is not required to act on.\n */\n /**\n * The sentence for a flag a HUMAN ended, or '' when this key is not one.\n *\n * Consulted BEFORE the retired-near-miss hint and before the generic \"typo or newer release\" line,\n * because for these keys that generic line is actively misleading: it invites the reader to check\n * their spelling or upgrade, when the truth is that they spelled it correctly, they are on a new\n * enough release, and the thing they asked for now happens anyway.\n */\n private endedExperimentHint(dotted: string): string {\n const ended = ENDED_EXPERIMENTS.find((e: EndedExperiment): boolean => e.key === dotted);\n if (ended === undefined) return '';\n return ` That experiment ENDED in @webpieces ${ended.endedIn}. ${ended.note}`;\n }\n\n private warnUnknownKeys(found: string[], allowed: readonly string[], prefix: string): void {\n // ACCEPTED everywhere, ADVERTISED nowhere. A documentation key is not a setting, so it is\n // skipped here rather than added to the allowed lists: those lists are walked elsewhere to build\n // typed sample documents, and listing `_doc` under \"Understood here\" — or offering it as the\n // nearest match to a misspelled setting — would send someone hunting for what it configures.\n // It configures nothing.\n for (const key of found) {\n if (allowed.includes(key) || this.docKeys.isDocumentationKey(key)) continue;\n const near = this.nearestKnownKey(key, allowed);\n const guess = near !== ''\n ? ` Did you mean \"${prefix}${near}\"?`\n : this.endedExperimentHint(`${prefix}${key}`)\n || this.nearRetiredHint(`${prefix}${key}`)\n || ' If it is a typo, fix the spelling; if it is from a NEWER @webpieces than this repo pins, upgrade this repo to use it.';\n this.warn(\n `\"${prefix}${key}\" is not a key this @webpieces release understands, so it was IGNORED ` +\n `and had NO effect.${guess} Understood here: ${this.quotedKeys(allowed, prefix)}.`);\n }\n }\n\n /**\n * A near-miss of a RETIRED key, pointed at its migration — or '' when nothing retired is close.\n *\n * The gap this closes: `assertNotRetired` matches a retired key EXACTLY, so `captureBuildGateLog`\n * throws with its migration instruction while `captureBuildGateLogg` — one stray character away, and\n * a far likelier thing to type — falls through to the generic \"IGNORED, might be from a newer\n * release\" line. That is the least helpful of the three answers offered to the reader whose intent is the\n * clearest, so the retired table is consulted here too, at the same distance-2 threshold.\n *\n * It only ever produces a WARNING, never a throw: this release cannot know whether the reader meant\n * the retired key or a newer one, and guessing wrong in the throwing direction is what the whole\n * change is about. Known keys are matched first, so a typo of a LIVE key is never answered with a\n * dead one.\n */\n private nearRetiredHint(dottedKey: string): string {\n for (const entry of RETIRED_HOME_CONFIG_KEYS) {\n if (this.editDistance(dottedKey.toLowerCase(), entry.key.toLowerCase()) > 2) continue;\n const destination = entry.movedTo === ''\n ? 'it was removed with no replacement'\n : `it moved to \"${entry.movedTo}\"`;\n return ` Did you mean the RETIRED key \"${entry.key}\"? If so, ${destination}. ${entry.instruction}`;\n }\n return '';\n }\n\n // One shape for every non-fatal finding, matching state-dir-migration's `[webpieces] <what>:` prefix\n // so a reader can tell at a glance which subsystem is talking.\n private warn(message: string): void {\n process.stderr.write(`[webpieces] ~/.webpieces/config.json: ${message}\\n`);\n }\n\n /**\n * The closest understood key within two edits, or '' when nothing is close.\n *\n * This used to be a case-insensitive EQUALITY test, which was adequate while an unknown key was a\n * hard error — the error itself was the signal, and the suggestion only saved a reading. Now the\n * suggestion IS the signal, so it has to catch the typos an equality test misses: a doubled letter,\n * a dropped one, a transposition, a stray trailing character (`orphan-dir-sweeped`). Two is the\n * useful threshold — it covers every one of those and still refuses to guess for a genuinely new\n * key, which is the case that must NOT be dressed up as a typo.\n */\n private nearestKnownKey(key: string, allowed: readonly string[]): string {\n let best = '';\n let bestDistance = 3;\n for (const candidate of allowed) {\n const distance = this.editDistance(key.toLowerCase(), candidate.toLowerCase());\n if (distance >= bestDistance) continue;\n bestDistance = distance;\n best = candidate;\n }\n return best;\n }\n\n /** Ordinary Levenshtein distance, one row at a time — the key names are short and this runs once. */\n private editDistance(a: string, b: string): number {\n let previous: number[] = [];\n for (let j = 0; j <= b.length; j += 1) previous.push(j);\n for (let i = 1; i <= a.length; i += 1) {\n const current: number[] = [i];\n for (let j = 1; j <= b.length; j += 1) {\n const substitution = previous[j - 1] + (a[i - 1] === b[j - 1] ? 0 : 1);\n current.push(Math.min(substitution, previous[j] + 1, current[j - 1] + 1));\n }\n previous = current;\n }\n return previous[b.length];\n }\n\n // One shape for every rejection: what is wrong, in which file, and the fact that deleting the file is\n // always a legal fix — because the file is optional, and \"no file\" is a fully supported state.\n private error(file: string, detail: string): string {\n return `[~/.webpieces/config.json] ${detail}\\n\\n` +\n `File: ${file}\\n` +\n `This machine-local preference file is OPTIONAL and EXPERIMENTAL. Editing it is always ` +\n `permitted, even while it is invalid, and deleting it outright is a valid fix — with no such ` +\n `file every webpieces command behaves exactly as it does by default.`;\n }\n}\n"]}
|
package/src/index.d.ts
CHANGED
|
@@ -34,7 +34,7 @@ export { unknownKeyErrors, isCommentKey, validateTopLevelKeys, COMMENT_KEY_SUFFI
|
|
|
34
34
|
export { RETIRED_CONFIG_KEYS, RETIRED_SCOPE_KEY, RETIRED_SCOPE_RULE, RetiredConfigKey, isRetiredKey, retiredEntry, retiredKeyError, retiredKeyErrorsIn, retiredRuleFor } from './retired-config-keys';
|
|
35
35
|
export { ConfigPruner, PruneResult, PrunedKey } from './config-pruner';
|
|
36
36
|
export { validateChecklistDocs } from './checklist-docs-validator';
|
|
37
|
-
export { HomeConfig, HomeConfigService, RetiredHomeConfigKey, RETIRED_HOME_CONFIG_KEYS, HOME_CONFIG_DIR, HOME_CONFIG_FILE, HOME_EXPERIMENTAL_SECTION, HOME_KEY_ORPHAN_DIR_SWEEP, HOME_KEY_WHOLE_REPO_BUILD_GUARD, HOME_KEY_MAX_CONCURRENT_BUILDS, DEFAULT_MAX_CONCURRENT_BUILDS, HOME_KEY_DOC, HOME_KEY_AI_DOC, DOCUMENTATION_KEYS, } from './home-config';
|
|
37
|
+
export { HomeConfig, HomeConfigService, RetiredHomeConfigKey, RETIRED_HOME_CONFIG_KEYS, HOME_CONFIG_DIR, HOME_CONFIG_FILE, HOME_EXPERIMENTAL_SECTION, HOME_KEY_ORPHAN_DIR_SWEEP, HOME_KEY_WHOLE_REPO_BUILD_GUARD, HOME_KEY_MAX_CONCURRENT_BUILDS, HOME_KEY_TURN_OFF_ALL_REVIEWERS, DEFAULT_MAX_CONCURRENT_BUILDS, HOME_KEY_DOC, HOME_KEY_AI_DOC, DOCUMENTATION_KEYS, } from './home-config';
|
|
38
38
|
export { BuildsLog, BuildTicket, RunningBuild, BUILDS_LOG_FILE, BUILDS_LOCK_FILE, BUILD_START, BUILD_DONE_SUCCESS, BUILD_DONE_FAIL, MAX_BUILDS_LOG_BYTES, BUILDS_LOG_GENERATIONS, MAX_ROW_BYTES, } from './builds-log';
|
|
39
39
|
export { OrphanDirScanner, OrphanCandidate } from './orphan-dir-scan';
|
|
40
40
|
export { OrphanDirArchiver, ArchivedOrphan, FailedOrphan, OrphanSweepResult, OrphanSweepManifest, TRASH_STATE_DIR, TRASH_MANIFEST_FILE, TRASH_RETENTION_DAYS, } from './orphan-dir-archive';
|
package/src/index.js
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.RulesConfigDesign = exports.atRoot = exports.AtomicFile = exports.CLAUDE_PROJECT_DIR_UNSET = exports.CLAUDE_PROJECT_DIR_ENV = exports.claudeEnv = exports.ClaudeEnv = exports.RETENTION_DAYS = exports.SweepCount = exports.AgedTreeSweeper = exports.StateMigrationReport = exports.StateDirMigrator = exports.LOGS_STATE_DIR = exports.WORKTREE_STATE_DIR = exports.GitDirs = exports.dotWebpieces = exports.DotWebpieces = exports.INSTRUCT_AI_LEAF = exports.INSTRUCT_AI_DIR = exports.RepoRootFinder = exports.CONFIG_PARSE_RETRY_MILLIS = exports.CONFIG_PARSE_ATTEMPTS = exports.ConfigParseAttempt = exports.ConfigFile = exports.CONFIG_FILENAME = exports.findConfigFile = exports.SECTION_PLACEMENT_MARKER = exports.RETIRED_TOP_LEVEL_MARKER = exports.RETIRED_KEY_MARKER = exports.CONFIG_POLICY_DOC = exports.formatConfigErrorsBanner = exports.ConfigLoader = exports.LoadedConfig = exports.loadAndValidate = exports.toError = exports.runMain = exports.CliArgs = exports.CliArgsCheck = exports.CliArgSet = exports.CliFlag = exports.CliUsage = exports.CliExitError = exports.formatFixOptions = exports.Option = exports.renderRuleFailForHuman = exports.renderRuleFailForAi = exports.RuleFailError = exports.InformAiError = exports.ResolvedRuleConfig = exports.ResolvedConfig = void 0;
|
|
4
4
|
exports.ConfigPruner = exports.retiredRuleFor = exports.retiredKeyErrorsIn = exports.retiredKeyError = exports.retiredEntry = exports.isRetiredKey = exports.RetiredConfigKey = exports.RETIRED_SCOPE_RULE = exports.RETIRED_SCOPE_KEY = exports.RETIRED_CONFIG_KEYS = exports.COMMENT_KEY_SUFFIX = exports.validateTopLevelKeys = exports.isCommentKey = exports.unknownKeyErrors = exports.validateCommandsSection = exports.seedEntryForRule = exports.recommendedSeedModeFor = exports.recommendedSeedMode = exports.allRuleNames = exports.validateMatchRulesSection = exports.validateExcludePaths = exports.validateSectionPlacement = exports.validateChecklistsSection = exports.validatePrGateSection = exports.validateWebpiecesConfig = exports.BUILD_LOG_DOC = exports.ReferenceMergeRun = exports.MergeRun = exports.MergeProcessText = exports.MERGE_PROCESS_DOC = exports.MergeProcessDoc = exports.InstructAiDocSet = exports.InstructAiDoc = exports.GitWorkflowDoc = exports.GIT_WORKFLOW_DOC = exports.TemplateWriter = exports.writeTemplate = exports.writeTemplateIfMissing = exports.loadTemplate = exports.defaultRulesDir = exports.defaultRules = exports.NoCustomCssScope = exports.GENERATED_CODE_PATHS = exports.matchesAnyGlob = exports.isPathExcluded = exports.isWebpiecesStateDir = exports.ExcludePaths = exports.DESIGN_METADATA_KEYS = exports.isDocumentDesign = exports.DocumentDesign = void 0;
|
|
5
|
-
exports.
|
|
6
|
-
exports.
|
|
7
|
-
exports.
|
|
8
|
-
exports.
|
|
9
|
-
exports.
|
|
10
|
-
exports.staleBinSweeper = exports.StaleBinSweeper = exports.StaleBinRemoval = exports.DEFAULT_MERGE_COMPLETE_COMMAND = exports.DEFAULT_UPSERT_PR_COMMAND = exports.buildCommandsConfig = exports.CommandsConfig = exports.logBranchMutation = exports.branchMutationLogPath = exports.BranchMutationLog = exports.BranchMutationEvent = exports.WorktreeReaper = exports.WorktreeReapResult = exports.ReapedWorktree = exports.BranchReaper = exports.ReapResult = exports.ReapedBranch = exports.HarnessAgentActivityReader = exports.AgentActivity = exports.AGENT_TRANSCRIPT_QUIET_MS = exports.AGENT_ACTIVITY_UNKNOWN = exports.AGENT_ACTIVITY_RETURNED = exports.AGENT_ACTIVITY_LIVE = exports.WorktreeLockVerdicts = exports.LockEvidence = exports.LockDecision = exports.LOCK_LIVENESS_UNVERIFIABLE = exports.HARNESS_NOT_CONSULTED = exports.AgentWorktreeLockReader = exports.AgentWorktreeLock = exports.WorktreeService = exports.WorktreeWorkInFlight = exports.Worktree = exports.BRANCH_RETENTION_KEEP = exports.BRANCH_RETENTION_ARCHIVE_TAG = exports.BRANCH_RETENTION_DELETE = exports.BRANCH_RETENTIONS = exports.ARCHIVE_TAG_PREFIX = exports.ArchiveResult = exports.BranchArchiver = exports.ADJUDICATED_CLASSIFICATIONS = exports.CLASSIFICATION_DETACHED = exports.CLASSIFICATION_CURRENT = exports.CLASSIFICATION_LOCKED = exports.CLASSIFICATION_PRUNABLE = exports.CLASSIFICATION_IN_USE = exports.CLASSIFICATION_NEVER_PROPOSED = exports.CLASSIFICATION_CONTENT_IN_MAIN = void 0;
|
|
5
|
+
exports.HOOK_GUARD_NAMES = exports.schemaFieldNames = exports.DEFAULT_MATCH_RULES = exports.renderMatchRuleMessage = exports.compileMatchRulePatterns = exports.isMatchRuleAllowedPath = exports.findMatchRuleViolations = exports.MatchRuleViolation = exports.MatchRuleConfig = exports.OrphanSweepReport = exports.OrphanDirSweeper = exports.TRASH_RETENTION_DAYS = exports.TRASH_MANIFEST_FILE = exports.TRASH_STATE_DIR = exports.OrphanSweepManifest = exports.OrphanSweepResult = exports.FailedOrphan = exports.ArchivedOrphan = exports.OrphanDirArchiver = exports.OrphanCandidate = exports.OrphanDirScanner = exports.MAX_ROW_BYTES = exports.BUILDS_LOG_GENERATIONS = exports.MAX_BUILDS_LOG_BYTES = exports.BUILD_DONE_FAIL = exports.BUILD_DONE_SUCCESS = exports.BUILD_START = exports.BUILDS_LOCK_FILE = exports.BUILDS_LOG_FILE = exports.RunningBuild = exports.BuildTicket = exports.BuildsLog = exports.DOCUMENTATION_KEYS = exports.HOME_KEY_AI_DOC = exports.HOME_KEY_DOC = exports.DEFAULT_MAX_CONCURRENT_BUILDS = exports.HOME_KEY_TURN_OFF_ALL_REVIEWERS = exports.HOME_KEY_MAX_CONCURRENT_BUILDS = exports.HOME_KEY_WHOLE_REPO_BUILD_GUARD = exports.HOME_KEY_ORPHAN_DIR_SWEEP = exports.HOME_EXPERIMENTAL_SECTION = exports.HOME_CONFIG_FILE = exports.HOME_CONFIG_DIR = exports.RETIRED_HOME_CONFIG_KEYS = exports.RetiredHomeConfigKey = exports.HomeConfigService = exports.HomeConfig = exports.validateChecklistDocs = exports.PrunedKey = exports.PruneResult = void 0;
|
|
6
|
+
exports.ThrowCauseRequiredConfig = exports.CatchErrorPatternConfig = exports.NoUnmanagedExceptionsConfig = exports.NoDestructureConfig = exports.PrismaConverterConfig = exports.PrismaValidateDtosConfig = exports.NoImplicitAnyConfig = exports.NoAnyUnknownConfig = exports.NoInlineTypeLiteralsConfig = exports.RequireReturnTypeConfig = exports.MaxFileLinesConfig = exports.MaxMethodLinesConfig = exports.WP_FINISH_PUSH_DEV = exports.WP_PUSH_DEV = exports.WP_FINISH_UPSERT_PR = exports.WP_START_UPSERT_PR = exports.WP_FINISH_UPDATE = exports.WP_START_UPDATE = exports.SyncFlowGuidance = exports.WebpiecesRulesConfig = exports.PRUNE_UNKNOWN_COMMAND = exports.PUSH_DEV_STATE_FILE = exports.MERGE_EXPLANATION_FILE = exports.MERGE_IN_PROGRESS_FILE = exports.PR_REVIEW_DIR = exports.MERGE_INFO_DIR = exports.WEBPIECES_TMP_DIR = exports.hasDisable = exports.RULE_NAMES = exports.WEBPIECES_DISABLE = exports.AbstractRule = exports.ChangedFilesOptions = exports.DiffRange = exports.DiffScope = exports.isNewOrModified = exports.hasChangesInRange = exports.findNewMethodSignaturesInDiff = exports.getChangedLineNumbers = exports.getFileDiff = exports.getChangedFiles = exports.resolveBase = exports.detectBase = exports.SkipRuleResult = exports.getCurrentBranch = exports.shouldSkipRule = exports.FieldDef = exports.sectionForRule = exports.isHookGuard = exports.PR_LIFECYCLE_GUARD_KEY = exports.BRANCH_STATE_GUARD_KEY = void 0;
|
|
7
|
+
exports.defaultGates = exports.ReviewContextEntry = exports.DEFAULT_DEV_BRANCH = exports.DEFAULT_DEV_BRANCH_NAMESPACE = exports.DevDeployConfig = exports.LandPrConfig = exports.DEFAULT_BUILD_COMMAND = exports.PrGateConfig = exports.GateDefinition = exports.BranchStateGuardConfig = exports.DEFAULT_BANNED_STATE_PATH_PREFIXES = exports.DEFAULT_TEMPLATE_DIRS = exports.NoStatePathsInTemplatesConfig = exports.CLIENT_CREATION_SEVERITIES = exports.NoClientCreationOutsideServerOrClientConfig = exports.VALIDATE_TS_MODES = exports.STRUCTURAL_MODES = exports.ON_OFF_MODES = exports.THROW_CAUSE_MODES = exports.DIRECT_API_RESOLVER_MODES = exports.PRISMA_CONVERTER_MODES = exports.PRISMA_DTOS_MODES = exports.PROJECT_MODES = exports.MODIFIED_CODE_MODES = exports.INLINE_TYPE_MODES = exports.RETURN_TYPE_MODES = exports.FILE_LIMIT_MODES = exports.METHOD_LIMIT_MODES = exports.BaseRuleConfig = exports.ValidateEslintSyncConfig = exports.ValidateVersionsLockedConfig = exports.ValidatePackageJsonConfig = exports.ValidateNoArchitectureCyclesConfig = exports.ValidateArchitectureUnchangedConfig = exports.ValidateTsInSrcConfig = exports.NoJsFilesConfig = exports.DiGraphConfig = exports.NxWiringConfig = exports.RuntimeArchitectureConfig = exports.NoFileImportCyclesConfig = exports.PrLifecycleGuardConfig = exports.BranchCreationGuardConfig = exports.RoleTagConfig = exports.FrameworkTagConfig = exports.InjectAnnotationNotNeededForConcreteClassConfig = exports.NoFunctionOutsideClassConfig = exports.NoProcessExitOutsideMainConfig = exports.NoCustomCssConfig = exports.NoSymbolDiTokensConfig = exports.AngularNoDirectApiInResolverConfig = void 0;
|
|
8
|
+
exports.CK_WARN = exports.CK_PASS = exports.checklistOverrideService = exports.ChecklistOverrideService = exports.ChecklistOverride = exports.ChecklistVerdict = exports.ChecklistResult = exports.PrContext = exports.ReviewJson = exports.DEFAULT_RETENTION_DAYS = exports.ProvenanceWriteRequest = exports.OfferedContext = exports.ReviewerPaths = exports.ReviewerTranscript = exports.ReviewProvenance = exports.ReviewProvenanceService = exports.PROVENANCE_SKIPPED = exports.PROVENANCE_MISSING = exports.PROVENANCE_OK = exports.ProvenanceResult = exports.TranscriptScan = exports.ReviewerContext = exports.ReviewerEvidence = exports.SubagentProvenanceService = exports.verifyGateToken = exports.extractGateToken = exports.gateTokenMarker = exports.computeGateToken = exports.GateTokenService = exports.ALL_DIFF_ONE_READ_LINES = exports.READ_TRUNCATION_LINES = exports.ContextEntry = exports.BriefedFile = exports.ReviewerBriefing = exports.ReviewerInstructionsService = exports.ChecklistInstructionsService = exports.ChecklistValidator = exports.formatFileList = exports.normalizeChecklistDoc = exports.toChecklist = exports.ChecklistDefinition = exports.MERGE_MODES = exports.MERGE_MODE_NONE = exports.MERGE_MODE_AUTO = exports.buildDevDeployConfig = exports.buildLandPrConfig = exports.buildPrGateConfig = exports.defaultDevDeployConfig = exports.defaultLandPrConfig = exports.defaultPrGateConfig = void 0;
|
|
9
|
+
exports.CLASSIFICATION_NO_COMMITS = exports.CLASSIFICATION_BACKUP_OF_LIVE = exports.CLASSIFICATION_BACKUP_OF_MERGED = exports.CLASSIFICATION_MERGED_PR = exports.CACHE_STALE_AFTER_MS = exports.CacheFreshness = exports.MergedBranchesService = exports.MergedBranchesCache = exports.DeletableWorktree = exports.DeletableBranch = exports.MergedBranch = exports.squashRecoverySteps = exports.stampCleanMainSyncStatus = exports.computeMainSyncStatus = exports.finishedLock = exports.inProcessLock = exports.tryAcquireMainSyncLock = exports.isRefreshInProgress = exports.isLockStale = exports.writeMainSyncLock = exports.readMainSyncLock = exports.computeAllMainSyncStatuses = exports.writeMainSyncStatusFile = exports.writeMainSyncStatus = exports.readMainSyncStatusFile = exports.readMainSyncStatus = exports.mainSyncLockPath = exports.mainSyncStatusPath = exports.DEFAULT_HANG_TIMEOUT_MINUTES = exports.MainSyncStatusService = exports.MainSyncLock = exports.MAIN_SYNC_STATUS_VERSION = exports.PullRequestIndex = exports.MainSyncFileStore = exports.MainSyncStatusFile = exports.MainSyncStatus = exports.reviewJsonSchemaHint = exports.reviewJsonPath = exports.prDirFor = exports.ReviewJsonService = exports.ChecklistReviewContext = exports.RequiredChecklist = exports.VERDICT_STATUSES = exports.VERDICT_RED = exports.VERDICT_YELLOW = exports.VERDICT_GREEN = exports.CK_BAD_FORMAT = exports.CK_MISSING = exports.CK_FAIL = exports.CK_OVERRIDDEN = void 0;
|
|
10
|
+
exports.staleBinSweeper = exports.StaleBinSweeper = exports.StaleBinRemoval = exports.DEFAULT_MERGE_COMPLETE_COMMAND = exports.DEFAULT_UPSERT_PR_COMMAND = exports.buildCommandsConfig = exports.CommandsConfig = exports.logBranchMutation = exports.branchMutationLogPath = exports.BranchMutationLog = exports.BranchMutationEvent = exports.WorktreeReaper = exports.WorktreeReapResult = exports.ReapedWorktree = exports.BranchReaper = exports.ReapResult = exports.ReapedBranch = exports.HarnessAgentActivityReader = exports.AgentActivity = exports.AGENT_TRANSCRIPT_QUIET_MS = exports.AGENT_ACTIVITY_UNKNOWN = exports.AGENT_ACTIVITY_RETURNED = exports.AGENT_ACTIVITY_LIVE = exports.WorktreeLockVerdicts = exports.LockEvidence = exports.LockDecision = exports.LOCK_LIVENESS_UNVERIFIABLE = exports.HARNESS_NOT_CONSULTED = exports.AgentWorktreeLockReader = exports.AgentWorktreeLock = exports.WorktreeService = exports.WorktreeWorkInFlight = exports.Worktree = exports.BRANCH_RETENTION_KEEP = exports.BRANCH_RETENTION_ARCHIVE_TAG = exports.BRANCH_RETENTION_DELETE = exports.BRANCH_RETENTIONS = exports.ARCHIVE_TAG_PREFIX = exports.ArchiveResult = exports.BranchArchiver = exports.ADJUDICATED_CLASSIFICATIONS = exports.CLASSIFICATION_DETACHED = exports.CLASSIFICATION_CURRENT = exports.CLASSIFICATION_LOCKED = exports.CLASSIFICATION_PRUNABLE = exports.CLASSIFICATION_IN_USE = exports.CLASSIFICATION_NEVER_PROPOSED = exports.CLASSIFICATION_CONTENT_IN_MAIN = exports.CLASSIFICATION_SUPERSEDED = void 0;
|
|
11
11
|
var types_1 = require("./types");
|
|
12
12
|
Object.defineProperty(exports, "ResolvedConfig", { enumerable: true, get: function () { return types_1.ResolvedConfig; } });
|
|
13
13
|
Object.defineProperty(exports, "ResolvedRuleConfig", { enumerable: true, get: function () { return types_1.ResolvedRuleConfig; } });
|
|
@@ -190,6 +190,7 @@ Object.defineProperty(exports, "HOME_EXPERIMENTAL_SECTION", { enumerable: true,
|
|
|
190
190
|
Object.defineProperty(exports, "HOME_KEY_ORPHAN_DIR_SWEEP", { enumerable: true, get: function () { return home_config_1.HOME_KEY_ORPHAN_DIR_SWEEP; } });
|
|
191
191
|
Object.defineProperty(exports, "HOME_KEY_WHOLE_REPO_BUILD_GUARD", { enumerable: true, get: function () { return home_config_1.HOME_KEY_WHOLE_REPO_BUILD_GUARD; } });
|
|
192
192
|
Object.defineProperty(exports, "HOME_KEY_MAX_CONCURRENT_BUILDS", { enumerable: true, get: function () { return home_config_1.HOME_KEY_MAX_CONCURRENT_BUILDS; } });
|
|
193
|
+
Object.defineProperty(exports, "HOME_KEY_TURN_OFF_ALL_REVIEWERS", { enumerable: true, get: function () { return home_config_1.HOME_KEY_TURN_OFF_ALL_REVIEWERS; } });
|
|
193
194
|
Object.defineProperty(exports, "DEFAULT_MAX_CONCURRENT_BUILDS", { enumerable: true, get: function () { return home_config_1.DEFAULT_MAX_CONCURRENT_BUILDS; } });
|
|
194
195
|
Object.defineProperty(exports, "HOME_KEY_DOC", { enumerable: true, get: function () { return home_config_1.HOME_KEY_DOC; } });
|
|
195
196
|
Object.defineProperty(exports, "HOME_KEY_AI_DOC", { enumerable: true, get: function () { return home_config_1.HOME_KEY_AI_DOC; } });
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/tooling/rules-config/src/index.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,iCAA0E;AAAjE,uGAAA,cAAc,OAAA;AAAE,2GAAA,kBAAkB,OAAA;AAC3C,qDAAkD;AAAzC,gHAAA,aAAa,OAAA;AACtB,qDAA+F;AAAtF,gHAAA,aAAa,OAAA;AAAE,sHAAA,mBAAmB,OAAA;AAAE,yHAAA,sBAAsB,OAAA;AACnE,uGAAuG;AACvG,sFAAsF;AACtF,2CAAwD;AAA/C,oGAAA,MAAM,OAAA;AAAE,8GAAA,gBAAgB,OAAA;AACjC,mDAAgD;AAAvC,8GAAA,YAAY,OAAA;AACrB,uCAAiF;AAAxE,oGAAA,QAAQ,OAAA;AAAE,mGAAA,OAAO,OAAA;AAAE,qGAAA,SAAS,OAAA;AAAE,wGAAA,YAAY,OAAA;AAAE,mGAAA,OAAO,OAAA;AAC5D,uCAAqC;AAA5B,mGAAA,OAAO,OAAA;AAChB,uCAAqC;AAA5B,mGAAA,OAAO,OAAA;AAChB,6CAA4E;AAAnE,8GAAA,eAAe,OAAA;AAAE,2GAAA,YAAY,OAAA;AAAE,2GAAA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OAAA;AACrB,oIAAA,0BAA0B,OAAA;AAC1B,sHAAA,YAAY,OAAA;AACZ,sHAAA,YAAY,OAAA;AACZ,8HAAA,oBAAoB,OAAA;AAExB,mEAOkC;AAN9B,6HAAA,mBAAmB,OAAA;AACnB,iIAAA,uBAAuB,OAAA;AACvB,gIAAA,sBAAsB,OAAA;AACtB,mIAAA,yBAAyB,OAAA;AACzB,uHAAA,aAAa,OAAA;AACb,oIAAA,0BAA0B,OAAA;AAE9B,iDAIyB;AAHrB,6GAAA,YAAY,OAAA;AACZ,2GAAA,UAAU,OAAA;AACV,6GAAA,YAAY,OAAA;AAEhB,qDAI2B;AAHvB,iHAAA,cAAc,OAAA;AACd,qHAAA,kBAAkB,OAAA;AAClB,iHAAA,cAAc,OAAA;AAGlB,6DAK+B;AAJ3B,0HAAA,mBAAmB,OAAA;AACnB,wHAAA,iBAAiB,OAAA;AACjB,4HAAA,qBAAqB,OAAA;AACrB,wHAAA,iBAAiB,OAAA;AAErB,qDAK2B;AAJvB,iHAAA,cAAc,OAAA;AACd,sHAAA,mBAAmB,OAAA;AACnB,4HAAA,yBAAyB,OAAA;AACzB,iIAAA,8BAA8B,OAAA;AAElC,qDAI2B;AAHvB,kHAAA,eAAe,OAAA;AACf,kHAAA,eAAe,OAAA;AACf,kHAAA,eAAe,OAAA","sourcesContent":["export { ResolvedConfig, ResolvedRuleConfig, RuleOptions } from './types';\nexport { InformAiError } from './inform-ai-error';\nexport { RuleFailError, renderRuleFailForAi, renderRuleFailForHuman } from './rule-fail-error';\n// THE one representation of a cure, shared by RuleFailError (build-time) and FixHint (edit-time), plus\n// the one renderer that owns the \"Fix Option N:\" numbering and the \"(preferred)\" tag.\nexport { Option, formatFixOptions } from './fix-option';\nexport { CliExitError } from './cli-exit-error';\nexport { CliUsage, CliFlag, CliArgSet, CliArgsCheck, CliArgs } from './cli-args';\nexport { runMain } from './run-main';\nexport { toError } from './to-error';\nexport { loadAndValidate, LoadedConfig, ConfigLoader } from './load-config';\n// The validation-failure banner: ONE cure (edit the file), plus the marker phrases the validator\n// messages embed rather than re-type.\nexport {\n formatConfigErrorsBanner,\n CONFIG_POLICY_DOC,\n RETIRED_KEY_MARKER,\n RETIRED_TOP_LEVEL_MARKER,\n SECTION_PLACEMENT_MARKER,\n} from './config-error-banner';\nexport { findConfigFile, CONFIG_FILENAME, ConfigFile, ConfigParseAttempt, CONFIG_PARSE_ATTEMPTS, CONFIG_PARSE_RETRY_MILLIS } from './config-file';\n// The PARSED-BUT-UNVALIDATED config shape. Exported for readers that walk the file generically rather\n// than through the typed config (the pr-gate active-hatch dashboard section reads every rule's hatches).\nexport type { RawConfigFile } from './config-file';\nexport { RepoRootFinder, INSTRUCT_AI_DIR, INSTRUCT_AI_LEAF } from './repo-root';\n// The scoped `.webpieces` resolver. EVERY reader/writer of `.webpieces/...` goes through one of its two\n// named methods so the call site declares whether the state is repo-wide or worktree-private.\nexport { DotWebpieces, dotWebpieces, GitDirs, WORKTREE_STATE_DIR, LOGS_STATE_DIR } from './state-dir';\nexport { StateDirMigrator, StateMigrationReport } from './state-dir-migration';\n// There is NO machine-global state root. `MachineStateHome`/`StateHome`/`WEBPIECES_STATE_HOME` and the\n// `PrBodyStore` that used them are DELETED: the one artifact that needed a scope above the clone was the\n// gated squash body, and GitHub holds it now (it IS the PR description). Every `.webpieces` path a\n// webpieces tool writes is `{repo}/.webpieces`, resolved through `DotWebpieces` above. See\n// `decisions/0005-the-pr-description-is-the-merge-body.md`.\nexport { AgedTreeSweeper, SweepCount, RETENTION_DAYS } from './aged-tree-sweep';\nexport { ClaudeEnv, claudeEnv, CLAUDE_PROJECT_DIR_ENV, CLAUDE_PROJECT_DIR_UNSET } from './claude-env';\nexport { AtomicFile } from './atomic-file';\n// The ONE formatter for a remedy that must run in a named directory: `cd '<root>' && <command>`.\n// Single-quoted so a repo path containing a space is still runnable (and still un-smuggleable).\nexport { atRoot } from './at-root';\nexport { RulesConfigDesign } from './rules-config-design';\nexport { DocumentDesign, isDocumentDesign, DESIGN_METADATA_KEYS } from './di';\nexport { ExcludePaths, isWebpiecesStateDir } from './exclude-hook-paths';\nexport { isPathExcluded, matchesAnyGlob } from './exclude-paths';\n// The machine-generated trees a line-count rule never fires on. A FLOOR, not a default value:\n// `max-file-lines.allowedPaths` adds to it, so configuring your own tree cannot lose it.\nexport { GENERATED_CODE_PATHS } from './generated-code-paths';\n// THE one `no-custom-css` path exemption. Both engines that enforce the rule (the edit-time hook and the\n// CI validator) consult this class, so `allowGlobs` cannot be honoured by one half and ignored by the other.\nexport { NoCustomCssScope } from './no-custom-css-scope';\nexport { defaultRules, defaultRulesDir } from './default-rules';\nexport { loadTemplate, writeTemplateIfMissing, writeTemplate, TemplateWriter } from './load-template';\n// The instruct-ai docs are delivered as a SET: writing one writes the transitive closure of the docs it\n// links to, so a doc and everything it points at always land together. See instruct-ai-docs.ts.\nexport { GIT_WORKFLOW_DOC, GitWorkflowDoc, InstructAiDoc, InstructAiDocSet, MergeProcessDoc } from './instruct-ai-docs';\nexport { MERGE_PROCESS_DOC, MergeProcessText, MergeRun, ReferenceMergeRun } from './merge-process-doc';\nexport { BUILD_LOG_DOC } from './build-log-doc';\nexport { validateWebpiecesConfig, validatePrGateSection, validateChecklistsSection, validateSectionPlacement, validateExcludePaths, validateMatchRulesSection, allRuleNames, recommendedSeedMode, recommendedSeedModeFor, seedEntryForRule } from './validate-config';\nexport { validateCommandsSection } from './commands-section-validators';\nexport { unknownKeyErrors, isCommentKey, validateTopLevelKeys, COMMENT_KEY_SUFFIX } from './config-key-rules';\n// The retired-key table + the no-back-compat policy it enforces. Exported so the installer can migrate\n// what the errors instruct, and so consumers can enumerate retirements.\nexport { RETIRED_CONFIG_KEYS, RETIRED_SCOPE_KEY, RETIRED_SCOPE_RULE, RetiredConfigKey, isRetiredKey, retiredEntry, retiredKeyError, retiredKeyErrorsIn, retiredRuleFor } from './retired-config-keys';\n// The MECHANICAL cure the unknown-rule error and the banner both name: strip every key no validator has a\n// schema for, so cleanliness is one command rather than a judgement call made while every Bash call is\n// blocked. `PRUNE_UNKNOWN_COMMAND` (constants.ts) is the single spelling of that command.\nexport { ConfigPruner, PruneResult, PrunedKey } from './config-pruner';\nexport { validateChecklistDocs } from './checklist-docs-validator';\n// The OPTIONAL machine-local `~/.webpieces/config.json`: absent (the normal state for every consumer) means\n// each key's declared default, silently; present means STRICT about what it understands and FORWARD-COMPATIBLE\n// about what it does not. A retired key (its own retirement table), a known key of the wrong TYPE and an\n// unparseable document all REJECT; a key this release simply does not recognise is IGNORED with a warning,\n// because the file is machine-global and the repos reading it pin different releases — rejecting a newer\n// release's key would hard-block every repo on the machine that is not yet on it. See home-config.ts.\n// `isHomeConfigPath` is what grants the file its unconditional Write/Edit PASS in the hook guards, which is\n// what keeps a rejection repairable. Every `experimental.*` key is an OPT-IN that defaults OFF, including\n// `whole-repo-build-guard`: ON requires an explicit `true`, and there is no per-key default to export.\nexport {\n HomeConfig, HomeConfigService, RetiredHomeConfigKey, RETIRED_HOME_CONFIG_KEYS,\n HOME_CONFIG_DIR, HOME_CONFIG_FILE, HOME_EXPERIMENTAL_SECTION,\n HOME_KEY_ORPHAN_DIR_SWEEP, HOME_KEY_WHOLE_REPO_BUILD_GUARD, HOME_KEY_MAX_CONCURRENT_BUILDS,\n DEFAULT_MAX_CONCURRENT_BUILDS,\n HOME_KEY_DOC, HOME_KEY_AI_DOC, DOCUMENTATION_KEYS,\n} from './home-config';\n// The MACHINE-WIDE build ledger, `~/.webpieces/builds.log`. THE one carve-out from\n// `no-machine-global-state.spec.ts`'s rule that webpieces writes only under `{repo}/.webpieces` — the\n// argument is in `decisions/0006-the-build-ledger-is-machine-global.md`, and the short form is that \"how\n// many builds are burning this box's CPU\" is a fact about the MACHINE, is not a cache of anything a\n// remote owns, and cannot be answered from a per-repo file because every linked worktree has its own\n// `.webpieces/` and would be blind to the sibling it is contending with. See builds-log.ts.\nexport {\n BuildsLog, BuildTicket, RunningBuild,\n BUILDS_LOG_FILE, BUILDS_LOCK_FILE, BUILD_START, BUILD_DONE_SUCCESS, BUILD_DONE_FAIL,\n MAX_BUILDS_LOG_BYTES, BUILDS_LOG_GENERATIONS, MAX_ROW_BYTES,\n} from './builds-log';\n// The orphan-directory sweep: the corpse an `nx g move` leaves on every clone, which git cannot remove\n// because an ignored dist/ or node_modules/ outlives every tracked file under it. See orphan-dir-scan.ts\n// for why the predicate is git's own `clean -Xdn` answer rather than a hand-rolled ignore walk.\nexport { OrphanDirScanner, OrphanCandidate } from './orphan-dir-scan';\nexport {\n OrphanDirArchiver, ArchivedOrphan, FailedOrphan, OrphanSweepResult, OrphanSweepManifest,\n TRASH_STATE_DIR, TRASH_MANIFEST_FILE, TRASH_RETENTION_DAYS,\n} from './orphan-dir-archive';\nexport { OrphanDirSweeper, OrphanSweepReport } from './orphan-dir-sweep';\nexport {\n MatchRuleConfig,\n MatchRuleViolation,\n findMatchRuleViolations,\n isMatchRuleAllowedPath,\n compileMatchRulePatterns,\n renderMatchRuleMessage,\n DEFAULT_MATCH_RULES,\n} from './match-rules-config';\nexport type { ConfigSection } from './sections';\nexport { schemaFieldNames } from './rule-schemas';\nexport { HOOK_GUARD_NAMES, BRANCH_STATE_GUARD_KEY, PR_LIFECYCLE_GUARD_KEY, isHookGuard, sectionForRule } from './sections';\nexport { FieldDef } from './field-def';\nexport type { SchemaShape } from './field-def';\nexport { shouldSkipRule, getCurrentBranch } from './skip-rule';\nexport { SkipRuleResult } from './skip-rule';\nexport {\n detectBase,\n resolveBase,\n getChangedFiles,\n getFileDiff,\n getChangedLineNumbers,\n findNewMethodSignaturesInDiff,\n hasChangesInRange,\n isNewOrModified,\n DiffScope,\n DiffRange,\n ChangedFilesOptions,\n} from './diff-scope';\nexport { AbstractRule } from './abstract-rule';\nexport {\n WEBPIECES_DISABLE,\n RULE_NAMES,\n hasDisable,\n WEBPIECES_TMP_DIR,\n MERGE_INFO_DIR,\n PR_REVIEW_DIR,\n MERGE_IN_PROGRESS_FILE,\n MERGE_EXPLANATION_FILE,\n PUSH_DEV_STATE_FILE,\n PRUNE_UNKNOWN_COMMAND,\n} from './constants';\nexport { WebpiecesRulesConfig } from './WebpiecesRulesConfig';\nexport {\n SyncFlowGuidance,\n WP_START_UPDATE,\n WP_FINISH_UPDATE,\n WP_START_UPSERT_PR,\n WP_FINISH_UPSERT_PR,\n WP_PUSH_DEV,\n WP_FINISH_PUSH_DEV,\n} from './sync-flow-guidance';\nexport {\n MaxMethodLinesConfig,\n MaxFileLinesConfig,\n RequireReturnTypeConfig,\n NoInlineTypeLiteralsConfig,\n NoAnyUnknownConfig,\n NoImplicitAnyConfig,\n PrismaValidateDtosConfig,\n PrismaConverterConfig,\n NoDestructureConfig,\n NoUnmanagedExceptionsConfig,\n CatchErrorPatternConfig,\n ThrowCauseRequiredConfig,\n AngularNoDirectApiInResolverConfig,\n NoSymbolDiTokensConfig,\n NoCustomCssConfig,\n NoProcessExitOutsideMainConfig,\n NoFunctionOutsideClassConfig,\n InjectAnnotationNotNeededForConcreteClassConfig,\n FrameworkTagConfig,\n RoleTagConfig,\n BranchCreationGuardConfig,\n PrLifecycleGuardConfig,\n NoFileImportCyclesConfig,\n RuntimeArchitectureConfig,\n NxWiringConfig,\n DiGraphConfig,\n NoJsFilesConfig,\n ValidateTsInSrcConfig,\n ValidateArchitectureUnchangedConfig,\n ValidateNoArchitectureCyclesConfig,\n ValidatePackageJsonConfig,\n ValidateVersionsLockedConfig,\n ValidateEslintSyncConfig,\n BaseRuleConfig,\n} from './rule-configs';\n// Mode unions + their value arrays — the single source of truth shared with code-rules.\nexport {\n METHOD_LIMIT_MODES,\n FILE_LIMIT_MODES,\n RETURN_TYPE_MODES,\n INLINE_TYPE_MODES,\n MODIFIED_CODE_MODES,\n PROJECT_MODES,\n PRISMA_DTOS_MODES,\n PRISMA_CONVERTER_MODES,\n DIRECT_API_RESOLVER_MODES,\n THROW_CAUSE_MODES,\n ON_OFF_MODES,\n STRUCTURAL_MODES,\n VALIDATE_TS_MODES,\n} from './rule-configs';\nexport {\n NoClientCreationOutsideServerOrClientConfig,\n CLIENT_CREATION_SEVERITIES,\n} from './no-client-creation-config';\nexport type { ClientCreationSeverity } from './no-client-creation-config';\n// The `no-state-paths-in-templates` config, in its own module for the same reason no-client-creation is:\n// rule-configs.ts is at its file-size cap and a rule that carries real defaults belongs beside them.\nexport {\n NoStatePathsInTemplatesConfig,\n DEFAULT_TEMPLATE_DIRS,\n DEFAULT_BANNED_STATE_PATH_PREFIXES,\n} from './no-state-paths-config';\nexport type {\n MethodLimitMode,\n FileLimitMode,\n ReturnTypeMode,\n InlineTypeMode,\n ModifiedCodeMode,\n ProjectMode,\n PrismaValidateDtosMode,\n PrismaConverterMode,\n DirectApiResolverMode,\n ThrowCauseMode,\n OnOffMode,\n StructuralMode,\n ValidateTsMode,\n} from './rule-configs';\nexport {\n BranchStateGuardConfig,\n} from './main-sync-guard-configs';\nexport {\n GateDefinition,\n PrGateConfig,\n DEFAULT_BUILD_COMMAND,\n LandPrConfig,\n DevDeployConfig,\n DEFAULT_DEV_BRANCH_NAMESPACE,\n DEFAULT_DEV_BRANCH,\n ReviewContextEntry,\n defaultGates,\n defaultPrGateConfig,\n defaultLandPrConfig,\n defaultDevDeployConfig,\n buildPrGateConfig,\n buildLandPrConfig,\n buildDevDeployConfig,\n MERGE_MODE_AUTO,\n MERGE_MODE_NONE,\n MERGE_MODES,\n} from './pr-gate-config';\nexport {\n ChecklistDefinition,\n toChecklist,\n normalizeChecklistDoc,\n formatFileList,\n} from './checklist-config';\nexport type { RawChecklistItem } from './checklist-config';\nexport { ChecklistValidator } from './checklist-validator';\nexport { ChecklistInstructionsService } from './checklist-instructions';\nexport {\n ReviewerInstructionsService,\n ReviewerBriefing,\n BriefedFile,\n ContextEntry,\n READ_TRUNCATION_LINES,\n ALL_DIFF_ONE_READ_LINES,\n} from './reviewer-instructions';\nexport {\n GateTokenService,\n computeGateToken,\n gateTokenMarker,\n extractGateToken,\n verifyGateToken,\n} from './gate-token';\nexport {\n SubagentProvenanceService,\n ReviewerEvidence,\n ReviewerContext,\n TranscriptScan,\n ProvenanceResult,\n PROVENANCE_OK,\n PROVENANCE_MISSING,\n PROVENANCE_SKIPPED,\n} from './subagent-provenance';\nexport {\n ReviewProvenanceService,\n ReviewProvenance,\n ReviewerTranscript,\n ReviewerPaths,\n OfferedContext,\n ProvenanceWriteRequest,\n DEFAULT_RETENTION_DAYS,\n} from './review-provenance';\nexport {\n ReviewJson,\n PrContext,\n ChecklistResult,\n ChecklistVerdict,\n ChecklistOverride,\n ChecklistOverrideService,\n checklistOverrideService,\n CK_PASS,\n CK_WARN,\n CK_OVERRIDDEN,\n CK_FAIL,\n CK_MISSING,\n CK_BAD_FORMAT,\n VERDICT_GREEN,\n VERDICT_YELLOW,\n VERDICT_RED,\n VERDICT_STATUSES,\n RequiredChecklist,\n ChecklistReviewContext,\n ReviewJsonService,\n prDirFor,\n reviewJsonPath,\n reviewJsonSchemaHint,\n} from './review-json';\nexport {\n MainSyncStatus,\n MainSyncStatusFile,\n MainSyncFileStore,\n PullRequestIndex,\n MAIN_SYNC_STATUS_VERSION,\n} from './main-sync-file';\nexport {\n MainSyncLock,\n MainSyncStatusService,\n DEFAULT_HANG_TIMEOUT_MINUTES,\n mainSyncStatusPath,\n mainSyncLockPath,\n readMainSyncStatus,\n readMainSyncStatusFile,\n writeMainSyncStatus,\n writeMainSyncStatusFile,\n computeAllMainSyncStatuses,\n readMainSyncLock,\n writeMainSyncLock,\n isLockStale,\n isRefreshInProgress,\n tryAcquireMainSyncLock,\n inProcessLock,\n finishedLock,\n computeMainSyncStatus,\n stampCleanMainSyncStatus,\n squashRecoverySteps,\n} from './main-sync-status';\nexport {\n MergedBranch,\n DeletableBranch,\n DeletableWorktree,\n MergedBranchesCache,\n MergedBranchesService,\n CacheFreshness,\n CACHE_STALE_AFTER_MS,\n CLASSIFICATION_MERGED_PR,\n CLASSIFICATION_BACKUP_OF_MERGED,\n CLASSIFICATION_BACKUP_OF_LIVE,\n CLASSIFICATION_NO_COMMITS,\n CLASSIFICATION_SUPERSEDED,\n CLASSIFICATION_CONTENT_IN_MAIN,\n CLASSIFICATION_NEVER_PROPOSED,\n CLASSIFICATION_IN_USE,\n CLASSIFICATION_PRUNABLE,\n CLASSIFICATION_LOCKED,\n CLASSIFICATION_CURRENT,\n CLASSIFICATION_DETACHED,\n ADJUDICATED_CLASSIFICATIONS,\n} from './merged-branches';\nexport {\n BranchArchiver,\n ArchiveResult,\n ARCHIVE_TAG_PREFIX,\n BRANCH_RETENTIONS,\n BRANCH_RETENTION_DELETE,\n BRANCH_RETENTION_ARCHIVE_TAG,\n BRANCH_RETENTION_KEEP,\n} from './branch-archiver';\nexport {\n Worktree,\n WorktreeWorkInFlight,\n WorktreeService,\n} from './worktrees';\nexport {\n AgentWorktreeLock,\n AgentWorktreeLockReader,\n} from './agent-worktree-lock';\nexport {\n HARNESS_NOT_CONSULTED,\n LOCK_LIVENESS_UNVERIFIABLE,\n LockDecision,\n LockEvidence,\n WorktreeLockVerdicts,\n} from './worktree-lock-verdicts';\nexport {\n AGENT_ACTIVITY_LIVE,\n AGENT_ACTIVITY_RETURNED,\n AGENT_ACTIVITY_UNKNOWN,\n AGENT_TRANSCRIPT_QUIET_MS,\n AgentActivity,\n HarnessAgentActivityReader,\n} from './harness-agent-activity';\nexport {\n ReapedBranch,\n ReapResult,\n BranchReaper,\n} from './branch-reaper';\nexport {\n ReapedWorktree,\n WorktreeReapResult,\n WorktreeReaper,\n} from './worktree-reaper';\nexport type { MutationVerb, MutationPhase } from './branch-mutation-log';\nexport {\n BranchMutationEvent,\n BranchMutationLog,\n branchMutationLogPath,\n logBranchMutation,\n} from './branch-mutation-log';\nexport {\n CommandsConfig,\n buildCommandsConfig,\n DEFAULT_UPSERT_PR_COMMAND,\n DEFAULT_MERGE_COMPLETE_COMMAND,\n} from './commands-config';\nexport {\n StaleBinRemoval,\n StaleBinSweeper,\n staleBinSweeper,\n} from './stale-bin-sweep';\n"]}
|
|
1
|
+
{"version":3,"file":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AGlB,6DAK+B;AAJ3B,0HAAA,mBAAmB,OAAA;AACnB,wHAAA,iBAAiB,OAAA;AACjB,4HAAA,qBAAqB,OAAA;AACrB,wHAAA,iBAAiB,OAAA;AAErB,qDAK2B;AAJvB,iHAAA,cAAc,OAAA;AACd,sHAAA,mBAAmB,OAAA;AACnB,4HAAA,yBAAyB,OAAA;AACzB,iIAAA,8BAA8B,OAAA;AAElC,qDAI2B;AAHvB,kHAAA,eAAe,OAAA;AACf,kHAAA,eAAe,OAAA;AACf,kHAAA,eAAe,OAAA","sourcesContent":["export { ResolvedConfig, ResolvedRuleConfig, RuleOptions } from './types';\nexport { InformAiError } from './inform-ai-error';\nexport { RuleFailError, renderRuleFailForAi, renderRuleFailForHuman } from './rule-fail-error';\n// THE one representation of a cure, shared by RuleFailError (build-time) and FixHint (edit-time), plus\n// the one renderer that owns the \"Fix Option N:\" numbering and the \"(preferred)\" tag.\nexport { Option, formatFixOptions } from './fix-option';\nexport { CliExitError } from './cli-exit-error';\nexport { CliUsage, CliFlag, CliArgSet, CliArgsCheck, CliArgs } from './cli-args';\nexport { runMain } from './run-main';\nexport { toError } from './to-error';\nexport { loadAndValidate, LoadedConfig, ConfigLoader } from './load-config';\n// The validation-failure banner: ONE cure (edit the file), plus the marker phrases the validator\n// messages embed rather than re-type.\nexport {\n formatConfigErrorsBanner,\n CONFIG_POLICY_DOC,\n RETIRED_KEY_MARKER,\n RETIRED_TOP_LEVEL_MARKER,\n SECTION_PLACEMENT_MARKER,\n} from './config-error-banner';\nexport { findConfigFile, CONFIG_FILENAME, ConfigFile, ConfigParseAttempt, CONFIG_PARSE_ATTEMPTS, CONFIG_PARSE_RETRY_MILLIS } from './config-file';\n// The PARSED-BUT-UNVALIDATED config shape. Exported for readers that walk the file generically rather\n// than through the typed config (the pr-gate active-hatch dashboard section reads every rule's hatches).\nexport type { RawConfigFile } from './config-file';\nexport { RepoRootFinder, INSTRUCT_AI_DIR, INSTRUCT_AI_LEAF } from './repo-root';\n// The scoped `.webpieces` resolver. EVERY reader/writer of `.webpieces/...` goes through one of its two\n// named methods so the call site declares whether the state is repo-wide or worktree-private.\nexport { DotWebpieces, dotWebpieces, GitDirs, WORKTREE_STATE_DIR, LOGS_STATE_DIR } from './state-dir';\nexport { StateDirMigrator, StateMigrationReport } from './state-dir-migration';\n// There is NO machine-global state root. `MachineStateHome`/`StateHome`/`WEBPIECES_STATE_HOME` and the\n// `PrBodyStore` that used them are DELETED: the one artifact that needed a scope above the clone was the\n// gated squash body, and GitHub holds it now (it IS the PR description). Every `.webpieces` path a\n// webpieces tool writes is `{repo}/.webpieces`, resolved through `DotWebpieces` above. See\n// `decisions/0005-the-pr-description-is-the-merge-body.md`.\nexport { AgedTreeSweeper, SweepCount, RETENTION_DAYS } from './aged-tree-sweep';\nexport { ClaudeEnv, claudeEnv, CLAUDE_PROJECT_DIR_ENV, CLAUDE_PROJECT_DIR_UNSET } from './claude-env';\nexport { AtomicFile } from './atomic-file';\n// The ONE formatter for a remedy that must run in a named directory: `cd '<root>' && <command>`.\n// Single-quoted so a repo path containing a space is still runnable (and still un-smuggleable).\nexport { atRoot } from './at-root';\nexport { RulesConfigDesign } from './rules-config-design';\nexport { DocumentDesign, isDocumentDesign, DESIGN_METADATA_KEYS } from './di';\nexport { ExcludePaths, isWebpiecesStateDir } from './exclude-hook-paths';\nexport { isPathExcluded, matchesAnyGlob } from './exclude-paths';\n// The machine-generated trees a line-count rule never fires on. A FLOOR, not a default value:\n// `max-file-lines.allowedPaths` adds to it, so configuring your own tree cannot lose it.\nexport { GENERATED_CODE_PATHS } from './generated-code-paths';\n// THE one `no-custom-css` path exemption. Both engines that enforce the rule (the edit-time hook and the\n// CI validator) consult this class, so `allowGlobs` cannot be honoured by one half and ignored by the other.\nexport { NoCustomCssScope } from './no-custom-css-scope';\nexport { defaultRules, defaultRulesDir } from './default-rules';\nexport { loadTemplate, writeTemplateIfMissing, writeTemplate, TemplateWriter } from './load-template';\n// The instruct-ai docs are delivered as a SET: writing one writes the transitive closure of the docs it\n// links to, so a doc and everything it points at always land together. See instruct-ai-docs.ts.\nexport { GIT_WORKFLOW_DOC, GitWorkflowDoc, InstructAiDoc, InstructAiDocSet, MergeProcessDoc } from './instruct-ai-docs';\nexport { MERGE_PROCESS_DOC, MergeProcessText, MergeRun, ReferenceMergeRun } from './merge-process-doc';\nexport { BUILD_LOG_DOC } from './build-log-doc';\nexport { validateWebpiecesConfig, validatePrGateSection, validateChecklistsSection, validateSectionPlacement, validateExcludePaths, validateMatchRulesSection, allRuleNames, recommendedSeedMode, recommendedSeedModeFor, seedEntryForRule } from './validate-config';\nexport { validateCommandsSection } from './commands-section-validators';\nexport { unknownKeyErrors, isCommentKey, validateTopLevelKeys, COMMENT_KEY_SUFFIX } from './config-key-rules';\n// The retired-key table + the no-back-compat policy it enforces. Exported so the installer can migrate\n// what the errors instruct, and so consumers can enumerate retirements.\nexport { RETIRED_CONFIG_KEYS, RETIRED_SCOPE_KEY, RETIRED_SCOPE_RULE, RetiredConfigKey, isRetiredKey, retiredEntry, retiredKeyError, retiredKeyErrorsIn, retiredRuleFor } from './retired-config-keys';\n// The MECHANICAL cure the unknown-rule error and the banner both name: strip every key no validator has a\n// schema for, so cleanliness is one command rather than a judgement call made while every Bash call is\n// blocked. `PRUNE_UNKNOWN_COMMAND` (constants.ts) is the single spelling of that command.\nexport { ConfigPruner, PruneResult, PrunedKey } from './config-pruner';\nexport { validateChecklistDocs } from './checklist-docs-validator';\n// The OPTIONAL machine-local `~/.webpieces/config.json`: absent (the normal state for every consumer) means\n// each key's declared default, silently; present means STRICT about what it understands and FORWARD-COMPATIBLE\n// about what it does not. A retired key (its own retirement table), a known key of the wrong TYPE and an\n// unparseable document all REJECT; a key this release simply does not recognise is IGNORED with a warning,\n// because the file is machine-global and the repos reading it pin different releases — rejecting a newer\n// release's key would hard-block every repo on the machine that is not yet on it. See home-config.ts.\n// `isHomeConfigPath` is what grants the file its unconditional Write/Edit PASS in the hook guards, which is\n// what keeps a rejection repairable. Every `experimental.*` key is an OPT-IN that defaults OFF, including\n// `whole-repo-build-guard`: ON requires an explicit `true`, and there is no per-key default to export.\nexport {\n HomeConfig, HomeConfigService, RetiredHomeConfigKey, RETIRED_HOME_CONFIG_KEYS,\n HOME_CONFIG_DIR, HOME_CONFIG_FILE, HOME_EXPERIMENTAL_SECTION,\n HOME_KEY_ORPHAN_DIR_SWEEP, HOME_KEY_WHOLE_REPO_BUILD_GUARD, HOME_KEY_MAX_CONCURRENT_BUILDS,\n HOME_KEY_TURN_OFF_ALL_REVIEWERS,\n DEFAULT_MAX_CONCURRENT_BUILDS,\n HOME_KEY_DOC, HOME_KEY_AI_DOC, DOCUMENTATION_KEYS,\n} from './home-config';\n// The MACHINE-WIDE build ledger, `~/.webpieces/builds.log`. THE one carve-out from\n// `no-machine-global-state.spec.ts`'s rule that webpieces writes only under `{repo}/.webpieces` — the\n// argument is in `decisions/0006-the-build-ledger-is-machine-global.md`, and the short form is that \"how\n// many builds are burning this box's CPU\" is a fact about the MACHINE, is not a cache of anything a\n// remote owns, and cannot be answered from a per-repo file because every linked worktree has its own\n// `.webpieces/` and would be blind to the sibling it is contending with. See builds-log.ts.\nexport {\n BuildsLog, BuildTicket, RunningBuild,\n BUILDS_LOG_FILE, BUILDS_LOCK_FILE, BUILD_START, BUILD_DONE_SUCCESS, BUILD_DONE_FAIL,\n MAX_BUILDS_LOG_BYTES, BUILDS_LOG_GENERATIONS, MAX_ROW_BYTES,\n} from './builds-log';\n// The orphan-directory sweep: the corpse an `nx g move` leaves on every clone, which git cannot remove\n// because an ignored dist/ or node_modules/ outlives every tracked file under it. See orphan-dir-scan.ts\n// for why the predicate is git's own `clean -Xdn` answer rather than a hand-rolled ignore walk.\nexport { OrphanDirScanner, OrphanCandidate } from './orphan-dir-scan';\nexport {\n OrphanDirArchiver, ArchivedOrphan, FailedOrphan, OrphanSweepResult, OrphanSweepManifest,\n TRASH_STATE_DIR, TRASH_MANIFEST_FILE, TRASH_RETENTION_DAYS,\n} from './orphan-dir-archive';\nexport { OrphanDirSweeper, OrphanSweepReport } from './orphan-dir-sweep';\nexport {\n MatchRuleConfig,\n MatchRuleViolation,\n findMatchRuleViolations,\n isMatchRuleAllowedPath,\n compileMatchRulePatterns,\n renderMatchRuleMessage,\n DEFAULT_MATCH_RULES,\n} from './match-rules-config';\nexport type { ConfigSection } from './sections';\nexport { schemaFieldNames } from './rule-schemas';\nexport { HOOK_GUARD_NAMES, BRANCH_STATE_GUARD_KEY, PR_LIFECYCLE_GUARD_KEY, isHookGuard, sectionForRule } from './sections';\nexport { FieldDef } from './field-def';\nexport type { SchemaShape } from './field-def';\nexport { shouldSkipRule, getCurrentBranch } from './skip-rule';\nexport { SkipRuleResult } from './skip-rule';\nexport {\n detectBase,\n resolveBase,\n getChangedFiles,\n getFileDiff,\n getChangedLineNumbers,\n findNewMethodSignaturesInDiff,\n hasChangesInRange,\n isNewOrModified,\n DiffScope,\n DiffRange,\n ChangedFilesOptions,\n} from './diff-scope';\nexport { AbstractRule } from './abstract-rule';\nexport {\n WEBPIECES_DISABLE,\n RULE_NAMES,\n hasDisable,\n WEBPIECES_TMP_DIR,\n MERGE_INFO_DIR,\n PR_REVIEW_DIR,\n MERGE_IN_PROGRESS_FILE,\n MERGE_EXPLANATION_FILE,\n PUSH_DEV_STATE_FILE,\n PRUNE_UNKNOWN_COMMAND,\n} from './constants';\nexport { WebpiecesRulesConfig } from './WebpiecesRulesConfig';\nexport {\n SyncFlowGuidance,\n WP_START_UPDATE,\n WP_FINISH_UPDATE,\n WP_START_UPSERT_PR,\n WP_FINISH_UPSERT_PR,\n WP_PUSH_DEV,\n WP_FINISH_PUSH_DEV,\n} from './sync-flow-guidance';\nexport {\n MaxMethodLinesConfig,\n MaxFileLinesConfig,\n RequireReturnTypeConfig,\n NoInlineTypeLiteralsConfig,\n NoAnyUnknownConfig,\n NoImplicitAnyConfig,\n PrismaValidateDtosConfig,\n PrismaConverterConfig,\n NoDestructureConfig,\n NoUnmanagedExceptionsConfig,\n CatchErrorPatternConfig,\n ThrowCauseRequiredConfig,\n AngularNoDirectApiInResolverConfig,\n NoSymbolDiTokensConfig,\n NoCustomCssConfig,\n NoProcessExitOutsideMainConfig,\n NoFunctionOutsideClassConfig,\n InjectAnnotationNotNeededForConcreteClassConfig,\n FrameworkTagConfig,\n RoleTagConfig,\n BranchCreationGuardConfig,\n PrLifecycleGuardConfig,\n NoFileImportCyclesConfig,\n RuntimeArchitectureConfig,\n NxWiringConfig,\n DiGraphConfig,\n NoJsFilesConfig,\n ValidateTsInSrcConfig,\n ValidateArchitectureUnchangedConfig,\n ValidateNoArchitectureCyclesConfig,\n ValidatePackageJsonConfig,\n ValidateVersionsLockedConfig,\n ValidateEslintSyncConfig,\n BaseRuleConfig,\n} from './rule-configs';\n// Mode unions + their value arrays — the single source of truth shared with code-rules.\nexport {\n METHOD_LIMIT_MODES,\n FILE_LIMIT_MODES,\n RETURN_TYPE_MODES,\n INLINE_TYPE_MODES,\n MODIFIED_CODE_MODES,\n PROJECT_MODES,\n PRISMA_DTOS_MODES,\n PRISMA_CONVERTER_MODES,\n DIRECT_API_RESOLVER_MODES,\n THROW_CAUSE_MODES,\n ON_OFF_MODES,\n STRUCTURAL_MODES,\n VALIDATE_TS_MODES,\n} from './rule-configs';\nexport {\n NoClientCreationOutsideServerOrClientConfig,\n CLIENT_CREATION_SEVERITIES,\n} from './no-client-creation-config';\nexport type { ClientCreationSeverity } from './no-client-creation-config';\n// The `no-state-paths-in-templates` config, in its own module for the same reason no-client-creation is:\n// rule-configs.ts is at its file-size cap and a rule that carries real defaults belongs beside them.\nexport {\n NoStatePathsInTemplatesConfig,\n DEFAULT_TEMPLATE_DIRS,\n DEFAULT_BANNED_STATE_PATH_PREFIXES,\n} from './no-state-paths-config';\nexport type {\n MethodLimitMode,\n FileLimitMode,\n ReturnTypeMode,\n InlineTypeMode,\n ModifiedCodeMode,\n ProjectMode,\n PrismaValidateDtosMode,\n PrismaConverterMode,\n DirectApiResolverMode,\n ThrowCauseMode,\n OnOffMode,\n StructuralMode,\n ValidateTsMode,\n} from './rule-configs';\nexport {\n BranchStateGuardConfig,\n} from './main-sync-guard-configs';\nexport {\n GateDefinition,\n PrGateConfig,\n DEFAULT_BUILD_COMMAND,\n LandPrConfig,\n DevDeployConfig,\n DEFAULT_DEV_BRANCH_NAMESPACE,\n DEFAULT_DEV_BRANCH,\n ReviewContextEntry,\n defaultGates,\n defaultPrGateConfig,\n defaultLandPrConfig,\n defaultDevDeployConfig,\n buildPrGateConfig,\n buildLandPrConfig,\n buildDevDeployConfig,\n MERGE_MODE_AUTO,\n MERGE_MODE_NONE,\n MERGE_MODES,\n} from './pr-gate-config';\nexport {\n ChecklistDefinition,\n toChecklist,\n normalizeChecklistDoc,\n formatFileList,\n} from './checklist-config';\nexport type { RawChecklistItem } from './checklist-config';\nexport { ChecklistValidator } from './checklist-validator';\nexport { ChecklistInstructionsService } from './checklist-instructions';\nexport {\n ReviewerInstructionsService,\n ReviewerBriefing,\n BriefedFile,\n ContextEntry,\n READ_TRUNCATION_LINES,\n ALL_DIFF_ONE_READ_LINES,\n} from './reviewer-instructions';\nexport {\n GateTokenService,\n computeGateToken,\n gateTokenMarker,\n extractGateToken,\n verifyGateToken,\n} from './gate-token';\nexport {\n SubagentProvenanceService,\n ReviewerEvidence,\n ReviewerContext,\n TranscriptScan,\n ProvenanceResult,\n PROVENANCE_OK,\n PROVENANCE_MISSING,\n PROVENANCE_SKIPPED,\n} from './subagent-provenance';\nexport {\n ReviewProvenanceService,\n ReviewProvenance,\n ReviewerTranscript,\n ReviewerPaths,\n OfferedContext,\n ProvenanceWriteRequest,\n DEFAULT_RETENTION_DAYS,\n} from './review-provenance';\nexport {\n ReviewJson,\n PrContext,\n ChecklistResult,\n ChecklistVerdict,\n ChecklistOverride,\n ChecklistOverrideService,\n checklistOverrideService,\n CK_PASS,\n CK_WARN,\n CK_OVERRIDDEN,\n CK_FAIL,\n CK_MISSING,\n CK_BAD_FORMAT,\n VERDICT_GREEN,\n VERDICT_YELLOW,\n VERDICT_RED,\n VERDICT_STATUSES,\n RequiredChecklist,\n ChecklistReviewContext,\n ReviewJsonService,\n prDirFor,\n reviewJsonPath,\n reviewJsonSchemaHint,\n} from './review-json';\nexport {\n MainSyncStatus,\n MainSyncStatusFile,\n MainSyncFileStore,\n PullRequestIndex,\n MAIN_SYNC_STATUS_VERSION,\n} from './main-sync-file';\nexport {\n MainSyncLock,\n MainSyncStatusService,\n DEFAULT_HANG_TIMEOUT_MINUTES,\n mainSyncStatusPath,\n mainSyncLockPath,\n readMainSyncStatus,\n readMainSyncStatusFile,\n writeMainSyncStatus,\n writeMainSyncStatusFile,\n computeAllMainSyncStatuses,\n readMainSyncLock,\n writeMainSyncLock,\n isLockStale,\n isRefreshInProgress,\n tryAcquireMainSyncLock,\n inProcessLock,\n finishedLock,\n computeMainSyncStatus,\n stampCleanMainSyncStatus,\n squashRecoverySteps,\n} from './main-sync-status';\nexport {\n MergedBranch,\n DeletableBranch,\n DeletableWorktree,\n MergedBranchesCache,\n MergedBranchesService,\n CacheFreshness,\n CACHE_STALE_AFTER_MS,\n CLASSIFICATION_MERGED_PR,\n CLASSIFICATION_BACKUP_OF_MERGED,\n CLASSIFICATION_BACKUP_OF_LIVE,\n CLASSIFICATION_NO_COMMITS,\n CLASSIFICATION_SUPERSEDED,\n CLASSIFICATION_CONTENT_IN_MAIN,\n CLASSIFICATION_NEVER_PROPOSED,\n CLASSIFICATION_IN_USE,\n CLASSIFICATION_PRUNABLE,\n CLASSIFICATION_LOCKED,\n CLASSIFICATION_CURRENT,\n CLASSIFICATION_DETACHED,\n ADJUDICATED_CLASSIFICATIONS,\n} from './merged-branches';\nexport {\n BranchArchiver,\n ArchiveResult,\n ARCHIVE_TAG_PREFIX,\n BRANCH_RETENTIONS,\n BRANCH_RETENTION_DELETE,\n BRANCH_RETENTION_ARCHIVE_TAG,\n BRANCH_RETENTION_KEEP,\n} from './branch-archiver';\nexport {\n Worktree,\n WorktreeWorkInFlight,\n WorktreeService,\n} from './worktrees';\nexport {\n AgentWorktreeLock,\n AgentWorktreeLockReader,\n} from './agent-worktree-lock';\nexport {\n HARNESS_NOT_CONSULTED,\n LOCK_LIVENESS_UNVERIFIABLE,\n LockDecision,\n LockEvidence,\n WorktreeLockVerdicts,\n} from './worktree-lock-verdicts';\nexport {\n AGENT_ACTIVITY_LIVE,\n AGENT_ACTIVITY_RETURNED,\n AGENT_ACTIVITY_UNKNOWN,\n AGENT_TRANSCRIPT_QUIET_MS,\n AgentActivity,\n HarnessAgentActivityReader,\n} from './harness-agent-activity';\nexport {\n ReapedBranch,\n ReapResult,\n BranchReaper,\n} from './branch-reaper';\nexport {\n ReapedWorktree,\n WorktreeReapResult,\n WorktreeReaper,\n} from './worktree-reaper';\nexport type { MutationVerb, MutationPhase } from './branch-mutation-log';\nexport {\n BranchMutationEvent,\n BranchMutationLog,\n branchMutationLogPath,\n logBranchMutation,\n} from './branch-mutation-log';\nexport {\n CommandsConfig,\n buildCommandsConfig,\n DEFAULT_UPSERT_PR_COMMAND,\n DEFAULT_MERGE_COMPLETE_COMMAND,\n} from './commands-config';\nexport {\n StaleBinRemoval,\n StaleBinSweeper,\n staleBinSweeper,\n} from './stale-bin-sweep';\n"]}
|