@webpieces/rules-config 0.4.510 → 0.4.512
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/config-file.d.ts +40 -1
- package/src/config-file.js +85 -7
- package/src/config-file.js.map +1 -1
- package/src/index.d.ts +1 -1
- package/src/index.js +9 -5
- 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.512",
|
|
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",
|
package/src/config-file.d.ts
CHANGED
|
@@ -1,4 +1,26 @@
|
|
|
1
1
|
export declare const CONFIG_FILENAME = "webpieces.config.json";
|
|
2
|
+
/**
|
|
3
|
+
* How many times a read+parse of webpieces.config.json is attempted before the failure is treated as
|
|
4
|
+
* REAL. On a machine running several agents at once the file is routinely rewritten underneath us
|
|
5
|
+
* (a dep bump, another worktree's `wp-*` command, an editor's write-then-rename), and for the few
|
|
6
|
+
* milliseconds of that write the bytes on disk are a truncated/half-written JSON document. Reading
|
|
7
|
+
* exactly then produced a hard block that self-healed seconds later — a false positive that also
|
|
8
|
+
* blocked the tools needed to look into it. Three attempts spanning ~50ms covers a normal write with
|
|
9
|
+
* a cost no human or agent can perceive, and cannot mask a file that is genuinely malformed (a
|
|
10
|
+
* conflict-marked or typo'd config fails all three, identically, and still blocks).
|
|
11
|
+
*/
|
|
12
|
+
export declare const CONFIG_PARSE_ATTEMPTS = 3;
|
|
13
|
+
/** Pause between parse attempts. Small enough to be invisible, long enough to outlast a file write. */
|
|
14
|
+
export declare const CONFIG_PARSE_RETRY_MILLIS = 25;
|
|
15
|
+
/**
|
|
16
|
+
* One read+parse attempt: EITHER a parsed config OR the error that attempt hit, never both.
|
|
17
|
+
* Data-only (per CLAUDE.md, classes for data).
|
|
18
|
+
*/
|
|
19
|
+
export declare class ConfigParseAttempt {
|
|
20
|
+
readonly config: RawConfigFile | null;
|
|
21
|
+
readonly error: Error | null;
|
|
22
|
+
constructor(config: RawConfigFile | null, error: Error | null);
|
|
23
|
+
}
|
|
2
24
|
export interface RawConfigFile {
|
|
3
25
|
extends?: string;
|
|
4
26
|
rules?: Record<string, Record<string, unknown>>;
|
|
@@ -16,8 +38,25 @@ export interface RawConfigFile {
|
|
|
16
38
|
export declare class ConfigFile {
|
|
17
39
|
/** Walk up from `startDir` looking for webpieces.config.json. Returns its absolute path or null. */
|
|
18
40
|
findConfigFile(startDir: string): string | null;
|
|
19
|
-
/**
|
|
41
|
+
/**
|
|
42
|
+
* Read + JSON.parse webpieces.config.json, RETRYING a failed attempt before escalating.
|
|
43
|
+
*
|
|
44
|
+
* A single failed read is not evidence of a broken config: another process on this machine may be
|
|
45
|
+
* mid-write, and a half-written file is unparseable for a few milliseconds and then fine. Only a
|
|
46
|
+
* failure that survives every attempt is treated as real — and then it still throws, so a
|
|
47
|
+
* genuinely invalid config blocks exactly as before. See {@link CONFIG_PARSE_ATTEMPTS}.
|
|
48
|
+
*/
|
|
20
49
|
readRawConfig(configPath: string): RawConfigFile;
|
|
50
|
+
private attemptReadAndParse;
|
|
51
|
+
/** Read the file's bytes. `protected` so a test can inject a transient failure deterministically. */
|
|
52
|
+
protected readFileText(configPath: string): string;
|
|
53
|
+
/**
|
|
54
|
+
* Block this thread for `millis`. The hook path is synchronous top to bottom (a PreToolUse hook
|
|
55
|
+
* answers on stdout before the tool runs), so an async delay is not available; `Atomics.wait` on a
|
|
56
|
+
* never-notified word is the standard dependency-free synchronous sleep.
|
|
57
|
+
*/
|
|
58
|
+
protected sleepSync(millis: number): void;
|
|
59
|
+
private formatParseFailure;
|
|
21
60
|
}
|
|
22
61
|
/**
|
|
23
62
|
* Walk up from `startDir` looking for webpieces.config.json. Returns its absolute path or null.
|
package/src/config-file.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ConfigFile = exports.CONFIG_FILENAME = void 0;
|
|
3
|
+
exports.ConfigFile = exports.ConfigParseAttempt = exports.CONFIG_PARSE_RETRY_MILLIS = exports.CONFIG_PARSE_ATTEMPTS = exports.CONFIG_FILENAME = void 0;
|
|
4
4
|
exports.findConfigFile = findConfigFile;
|
|
5
5
|
exports.readRawConfig = readRawConfig;
|
|
6
6
|
const tslib_1 = require("tslib");
|
|
@@ -10,6 +10,32 @@ const inversify_1 = require("inversify");
|
|
|
10
10
|
const inform_ai_error_1 = require("./inform-ai-error");
|
|
11
11
|
const to_error_1 = require("./to-error");
|
|
12
12
|
exports.CONFIG_FILENAME = 'webpieces.config.json';
|
|
13
|
+
/**
|
|
14
|
+
* How many times a read+parse of webpieces.config.json is attempted before the failure is treated as
|
|
15
|
+
* REAL. On a machine running several agents at once the file is routinely rewritten underneath us
|
|
16
|
+
* (a dep bump, another worktree's `wp-*` command, an editor's write-then-rename), and for the few
|
|
17
|
+
* milliseconds of that write the bytes on disk are a truncated/half-written JSON document. Reading
|
|
18
|
+
* exactly then produced a hard block that self-healed seconds later — a false positive that also
|
|
19
|
+
* blocked the tools needed to look into it. Three attempts spanning ~50ms covers a normal write with
|
|
20
|
+
* a cost no human or agent can perceive, and cannot mask a file that is genuinely malformed (a
|
|
21
|
+
* conflict-marked or typo'd config fails all three, identically, and still blocks).
|
|
22
|
+
*/
|
|
23
|
+
exports.CONFIG_PARSE_ATTEMPTS = 3;
|
|
24
|
+
/** Pause between parse attempts. Small enough to be invisible, long enough to outlast a file write. */
|
|
25
|
+
exports.CONFIG_PARSE_RETRY_MILLIS = 25;
|
|
26
|
+
/**
|
|
27
|
+
* One read+parse attempt: EITHER a parsed config OR the error that attempt hit, never both.
|
|
28
|
+
* Data-only (per CLAUDE.md, classes for data).
|
|
29
|
+
*/
|
|
30
|
+
class ConfigParseAttempt {
|
|
31
|
+
config;
|
|
32
|
+
error;
|
|
33
|
+
constructor(config, error) {
|
|
34
|
+
this.config = config;
|
|
35
|
+
this.error = error;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.ConfigParseAttempt = ConfigParseAttempt;
|
|
13
39
|
/**
|
|
14
40
|
* Locates + reads webpieces.config.json. `@injectable(bindingScopeValues.Singleton)` so it can be injected into the config
|
|
15
41
|
* loader and appear in the rules-config DI design.
|
|
@@ -28,20 +54,72 @@ let ConfigFile = class ConfigFile {
|
|
|
28
54
|
dir = parent;
|
|
29
55
|
}
|
|
30
56
|
}
|
|
31
|
-
/**
|
|
57
|
+
/**
|
|
58
|
+
* Read + JSON.parse webpieces.config.json, RETRYING a failed attempt before escalating.
|
|
59
|
+
*
|
|
60
|
+
* A single failed read is not evidence of a broken config: another process on this machine may be
|
|
61
|
+
* mid-write, and a half-written file is unparseable for a few milliseconds and then fine. Only a
|
|
62
|
+
* failure that survives every attempt is treated as real — and then it still throws, so a
|
|
63
|
+
* genuinely invalid config blocks exactly as before. See {@link CONFIG_PARSE_ATTEMPTS}.
|
|
64
|
+
*/
|
|
32
65
|
readRawConfig(configPath) {
|
|
33
|
-
|
|
66
|
+
let lastError = null;
|
|
67
|
+
for (let attempt = 1; attempt <= exports.CONFIG_PARSE_ATTEMPTS; attempt++) {
|
|
68
|
+
if (attempt > 1)
|
|
69
|
+
this.sleepSync(exports.CONFIG_PARSE_RETRY_MILLIS);
|
|
70
|
+
const outcome = this.attemptReadAndParse(configPath);
|
|
71
|
+
if (outcome.config !== null)
|
|
72
|
+
return outcome.config;
|
|
73
|
+
lastError = outcome.error;
|
|
74
|
+
}
|
|
75
|
+
throw new inform_ai_error_1.InformAiError(this.formatParseFailure(configPath, lastError));
|
|
76
|
+
}
|
|
77
|
+
// ONE read+parse attempt. The read is inside the try too: a file being replaced can momentarily
|
|
78
|
+
// fail to open (ENOENT between unlink and rename), which is the same transient class as a
|
|
79
|
+
// half-written parse failure and must be retried the same way.
|
|
80
|
+
attemptReadAndParse(configPath) {
|
|
34
81
|
// eslint-disable-next-line @webpieces/no-unmanaged-exceptions
|
|
35
82
|
try {
|
|
36
|
-
|
|
83
|
+
const raw = this.readFileText(configPath);
|
|
84
|
+
return new ConfigParseAttempt(JSON.parse(raw), null);
|
|
37
85
|
}
|
|
38
86
|
catch (err) {
|
|
39
87
|
const error = (0, to_error_1.toError)(err);
|
|
40
|
-
|
|
41
|
-
`Parse error: ${error.message}\n` +
|
|
42
|
-
`File: ${configPath}`);
|
|
88
|
+
return new ConfigParseAttempt(null, error);
|
|
43
89
|
}
|
|
44
90
|
}
|
|
91
|
+
/** Read the file's bytes. `protected` so a test can inject a transient failure deterministically. */
|
|
92
|
+
readFileText(configPath) {
|
|
93
|
+
return fs.readFileSync(configPath, 'utf8');
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Block this thread for `millis`. The hook path is synchronous top to bottom (a PreToolUse hook
|
|
97
|
+
* answers on stdout before the tool runs), so an async delay is not available; `Atomics.wait` on a
|
|
98
|
+
* never-notified word is the standard dependency-free synchronous sleep.
|
|
99
|
+
*/
|
|
100
|
+
sleepSync(millis) {
|
|
101
|
+
Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, millis);
|
|
102
|
+
}
|
|
103
|
+
// The AI-facing message for a parse failure that survived every attempt. It names the retry count
|
|
104
|
+
// on purpose: an agent that sees "invalid JSON" for a file that reads fine three seconds later has
|
|
105
|
+
// no way to tell a race from a real syntax error, and the FIRST thing it needs to know is that
|
|
106
|
+
// read-only inspection of the file is still available so it can go look.
|
|
107
|
+
formatParseFailure(configPath, error) {
|
|
108
|
+
return (`webpieces.config.json could not be parsed as JSON — retried ${exports.CONFIG_PARSE_ATTEMPTS} times ` +
|
|
109
|
+
`over ~${exports.CONFIG_PARSE_RETRY_MILLIS * (exports.CONFIG_PARSE_ATTEMPTS - 1)}ms and it failed every time.\n` +
|
|
110
|
+
`Parse error: ${error?.message ?? 'unknown'}\n` +
|
|
111
|
+
`File: ${configPath}\n\n` +
|
|
112
|
+
`Two causes, in the order to check them:\n` +
|
|
113
|
+
` 1. GENUINELY INVALID — most likely. Look at the file: a trailing comma, a missing brace, ` +
|
|
114
|
+
`or leftover conflict markers (\`<<<<<<< HEAD\`) from a merge you are in the middle of.\n` +
|
|
115
|
+
` 2. STILL BEING WRITTEN by another process (another agent/worktree on this machine, a dep ` +
|
|
116
|
+
`bump, an editor save). ${exports.CONFIG_PARSE_ATTEMPTS} attempts already ruled out a brief write, but a ` +
|
|
117
|
+
`long-running writer can outlast them — if so, simply retrying your command now will succeed.\n\n` +
|
|
118
|
+
`👉 READING AND EDITING ${exports.CONFIG_FILENAME} IS ALWAYS ALLOWED, including right now: \`Read\`, ` +
|
|
119
|
+
`\`cat\`, \`grep\`, \`sed -n\` and the other read-only inspection commands still work while the ` +
|
|
120
|
+
`config is broken. Go look at the file, fix it, then retry. (Writes to OTHER files stay ` +
|
|
121
|
+
`blocked — with an unparseable config every guard is disabled, so nothing else may proceed.)`);
|
|
122
|
+
}
|
|
45
123
|
};
|
|
46
124
|
exports.ConfigFile = ConfigFile;
|
|
47
125
|
exports.ConfigFile = ConfigFile = tslib_1.__decorate([
|
package/src/config-file.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-file.js","sourceRoot":"","sources":["../../../../../packages/tooling/rules-config/src/config-file.ts"],"names":[],"mappings":";;;AA+EA,wCAEC;AAKD,sCAEC;;AAxFD,+CAAyB;AACzB,mDAA6B;AAC7B,yCAA2D;AAE3D,uDAAkD;AAClD,yCAAqC;AAExB,QAAA,eAAe,GAAG,uBAAuB,CAAC;AA8BvD;;;GAGG;AAEI,IAAM,UAAU,GAAhB,MAAM,UAAU;IACnB,oGAAoG;IACpG,cAAc,CAAC,QAAgB;QAC3B,IA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CAAC;AACnD,CAAC","sourcesContent":["import * as fs from 'fs';\nimport * as path from 'path';\nimport { injectable, bindingScopeValues } from 'inversify';\n\nimport { InformAiError } from './inform-ai-error';\nimport { toError } from './to-error';\n\nexport const CONFIG_FILENAME = 'webpieces.config.json';\n\n// Raw shape of webpieces.config.json as parsed from JSON, before validation/typing.\n// - `rules` — code-style validators (scope edit/file).\n// - `hookGuards` — git/PR/branch protection guards (scope bash).\n// - `commands` — gated command config the guards point at; `pr-gate` lives inside it. Carried as\n// opaque JSON because its nested `gates` array can't be expressed in the FieldDef\n// schema; validated structurally by validateCommandsSection.\n// - `pr-gate` — DEPRECATED top-level block (pre-migration layout). Read only as a back-compat\n// fallback / to emit a \"move it under commands\" migration error.\n// webpieces-disable no-any-unknown -- consumer JSON config has opaque rule option values\nexport interface RawConfigFile {\n extends?: string;\n rules?: Record<string, Record<string, unknown>>;\n hookGuards?: Record<string, Record<string, unknown>>;\n // webpieces-disable no-any-unknown -- opaque commands JSON, validated by validateCommandsSection\n commands?: unknown;\n // REQUIRED top-level block: two glob lists that suppress hook enforcement per file path.\n // Opaque here (validated structurally by validateExcludePaths, then parsed into ExcludePaths).\n // webpieces-disable no-any-unknown -- opaque excludePaths JSON, validated by validateExcludePaths\n excludePaths?: unknown;\n // REQUIRED top-level array of client-authored content guards (regex patterns + message + scoping).\n // Opaque here; validated structurally by validateMatchRulesSection, then parsed into MatchRuleConfig[].\n // webpieces-disable no-any-unknown -- opaque match-rules JSON, validated by validateMatchRulesSection\n 'match-rules'?: unknown;\n rulesDir?: string[];\n // webpieces-disable no-any-unknown -- DEPRECATED top-level pr-gate, migrated under `commands`\n 'pr-gate'?: unknown;\n}\n\n/**\n * Locates + reads webpieces.config.json. `@injectable(bindingScopeValues.Singleton)` so it can be injected into the config\n * loader and appear in the rules-config DI design.\n */\n@injectable(bindingScopeValues.Singleton)\nexport class ConfigFile {\n /** Walk up from `startDir` looking for webpieces.config.json. Returns its absolute path or null. */\n findConfigFile(startDir: string): string | null {\n let dir = startDir;\n while (true) {\n const primary = path.join(dir, CONFIG_FILENAME);\n if (fs.existsSync(primary)) return primary;\n const parent = path.dirname(dir);\n if (parent === dir) return null;\n dir = parent;\n }\n }\n\n /** Read + JSON.parse webpieces.config.json, surfacing parse failures as a readable InformAiError. */\n readRawConfig(configPath: string): RawConfigFile {\n const raw = fs.readFileSync(configPath, 'utf8');\n // eslint-disable-next-line @webpieces/no-unmanaged-exceptions\n try {\n return JSON.parse(raw) as RawConfigFile;\n } catch (err: unknown) {\n const error = toError(err);\n throw new InformAiError(\n `webpieces.config.json has invalid JSON — fix the file, then retry.\\n` +\n `Parse error: ${error.message}\\n` +\n `File: ${configPath}`,\n );\n }\n }\n}\n\n// Temporary migration delegators — consumers migrate to injecting ConfigFile over follow-up PRs, then\n// these free functions are removed. Declarations kept identical to the originals (unchanged lines).\nconst configFileSvc = new ConfigFile();\n\n/**\n * Walk up from `startDir` looking for webpieces.config.json. Returns its absolute path or null.\n */\nexport function findConfigFile(startDir: string): string | null {\n return configFileSvc.findConfigFile(startDir);\n}\n\n/**\n * Read + JSON.parse webpieces.config.json, surfacing parse failures as a readable InformAiError.\n */\nexport function readRawConfig(configPath: string): RawConfigFile {\n return configFileSvc.readRawConfig(configPath);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"config-file.js","sourceRoot":"","sources":["../../../../../packages/tooling/rules-config/src/config-file.ts"],"names":[],"mappings":";;;AA+JA,wCAEC;AAKD,sCAEC;;AAxKD,+CAAyB;AACzB,mDAA6B;AAC7B,yCAA2D;AAE3D,uDAAkD;AAClD,yCAAqC;AAExB,QAAA,eAAe,GAAG,uBAAuB,CAAC;AAEvD;;;;;;;;;GASG;AACU,QAAA,qBAAqB,GAAG,CAAC,CAAC;AAEvC,uGAAuG;AAC1F,QAAA,yBAAyB,GAAG,EAAE,CAAC;AAE5C;;;GAGG;AACH,MAAa,kBAAkB;IAEd;IACA;IAFb,YACa,MAA4B,EAC5B,KAAmB;QADnB,WAAM,GAAN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AS,CAAC;GAC5B,UAAU,CAkFtB;AAED,sGAAsG;AACtG,oGAAoG;AACpG,MAAM,aAAa,GAAG,IAAI,UAAU,EAAE,CAAC;AAEvC;;GAEG;AACH,SAAgB,cAAc,CAAC,QAAgB;IAC3C,OAAO,aAAa,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;AAClD,CAAC;AAED;;GAEG;AACH,SAAgB,aAAa,CAAC,UAAkB;IAC5C,OAAO,aAAa,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;AACnD,CAAC","sourcesContent":["import * as fs from 'fs';\nimport * as path from 'path';\nimport { injectable, bindingScopeValues } from 'inversify';\n\nimport { InformAiError } from './inform-ai-error';\nimport { toError } from './to-error';\n\nexport const CONFIG_FILENAME = 'webpieces.config.json';\n\n/**\n * How many times a read+parse of webpieces.config.json is attempted before the failure is treated as\n * REAL. On a machine running several agents at once the file is routinely rewritten underneath us\n * (a dep bump, another worktree's `wp-*` command, an editor's write-then-rename), and for the few\n * milliseconds of that write the bytes on disk are a truncated/half-written JSON document. Reading\n * exactly then produced a hard block that self-healed seconds later — a false positive that also\n * blocked the tools needed to look into it. Three attempts spanning ~50ms covers a normal write with\n * a cost no human or agent can perceive, and cannot mask a file that is genuinely malformed (a\n * conflict-marked or typo'd config fails all three, identically, and still blocks).\n */\nexport const CONFIG_PARSE_ATTEMPTS = 3;\n\n/** Pause between parse attempts. Small enough to be invisible, long enough to outlast a file write. */\nexport const CONFIG_PARSE_RETRY_MILLIS = 25;\n\n/**\n * One read+parse attempt: EITHER a parsed config OR the error that attempt hit, never both.\n * Data-only (per CLAUDE.md, classes for data).\n */\nexport class ConfigParseAttempt {\n constructor(\n readonly config: RawConfigFile | null,\n readonly error: Error | null,\n ) {}\n}\n\n// Raw shape of webpieces.config.json as parsed from JSON, before validation/typing.\n// - `rules` — code-style validators (scope edit/file).\n// - `hookGuards` — git/PR/branch protection guards (scope bash).\n// - `commands` — gated command config the guards point at; `pr-gate` lives inside it. Carried as\n// opaque JSON because its nested `gates` array can't be expressed in the FieldDef\n// schema; validated structurally by validateCommandsSection.\n// - `pr-gate` — DEPRECATED top-level block (pre-migration layout). Read only as a back-compat\n// fallback / to emit a \"move it under commands\" migration error.\n// webpieces-disable no-any-unknown -- consumer JSON config has opaque rule option values\nexport interface RawConfigFile {\n extends?: string;\n rules?: Record<string, Record<string, unknown>>;\n hookGuards?: Record<string, Record<string, unknown>>;\n // webpieces-disable no-any-unknown -- opaque commands JSON, validated by validateCommandsSection\n commands?: unknown;\n // REQUIRED top-level block: two glob lists that suppress hook enforcement per file path.\n // Opaque here (validated structurally by validateExcludePaths, then parsed into ExcludePaths).\n // webpieces-disable no-any-unknown -- opaque excludePaths JSON, validated by validateExcludePaths\n excludePaths?: unknown;\n // REQUIRED top-level array of client-authored content guards (regex patterns + message + scoping).\n // Opaque here; validated structurally by validateMatchRulesSection, then parsed into MatchRuleConfig[].\n // webpieces-disable no-any-unknown -- opaque match-rules JSON, validated by validateMatchRulesSection\n 'match-rules'?: unknown;\n rulesDir?: string[];\n // webpieces-disable no-any-unknown -- DEPRECATED top-level pr-gate, migrated under `commands`\n 'pr-gate'?: unknown;\n}\n\n/**\n * Locates + reads webpieces.config.json. `@injectable(bindingScopeValues.Singleton)` so it can be injected into the config\n * loader and appear in the rules-config DI design.\n */\n@injectable(bindingScopeValues.Singleton)\nexport class ConfigFile {\n /** Walk up from `startDir` looking for webpieces.config.json. Returns its absolute path or null. */\n findConfigFile(startDir: string): string | null {\n let dir = startDir;\n while (true) {\n const primary = path.join(dir, CONFIG_FILENAME);\n if (fs.existsSync(primary)) return primary;\n const parent = path.dirname(dir);\n if (parent === dir) return null;\n dir = parent;\n }\n }\n\n /**\n * Read + JSON.parse webpieces.config.json, RETRYING a failed attempt before escalating.\n *\n * A single failed read is not evidence of a broken config: another process on this machine may be\n * mid-write, and a half-written file is unparseable for a few milliseconds and then fine. Only a\n * failure that survives every attempt is treated as real — and then it still throws, so a\n * genuinely invalid config blocks exactly as before. See {@link CONFIG_PARSE_ATTEMPTS}.\n */\n readRawConfig(configPath: string): RawConfigFile {\n let lastError: Error | null = null;\n for (let attempt = 1; attempt <= CONFIG_PARSE_ATTEMPTS; attempt++) {\n if (attempt > 1) this.sleepSync(CONFIG_PARSE_RETRY_MILLIS);\n const outcome = this.attemptReadAndParse(configPath);\n if (outcome.config !== null) return outcome.config;\n lastError = outcome.error;\n }\n throw new InformAiError(this.formatParseFailure(configPath, lastError));\n }\n\n // ONE read+parse attempt. The read is inside the try too: a file being replaced can momentarily\n // fail to open (ENOENT between unlink and rename), which is the same transient class as a\n // half-written parse failure and must be retried the same way.\n private attemptReadAndParse(configPath: string): ConfigParseAttempt {\n // eslint-disable-next-line @webpieces/no-unmanaged-exceptions\n try {\n const raw = this.readFileText(configPath);\n return new ConfigParseAttempt(JSON.parse(raw) as RawConfigFile, null);\n } catch (err: unknown) {\n const error = toError(err);\n return new ConfigParseAttempt(null, error);\n }\n }\n\n /** Read the file's bytes. `protected` so a test can inject a transient failure deterministically. */\n protected readFileText(configPath: string): string {\n return fs.readFileSync(configPath, 'utf8');\n }\n\n /**\n * Block this thread for `millis`. The hook path is synchronous top to bottom (a PreToolUse hook\n * answers on stdout before the tool runs), so an async delay is not available; `Atomics.wait` on a\n * never-notified word is the standard dependency-free synchronous sleep.\n */\n protected sleepSync(millis: number): void {\n Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, millis);\n }\n\n // The AI-facing message for a parse failure that survived every attempt. It names the retry count\n // on purpose: an agent that sees \"invalid JSON\" for a file that reads fine three seconds later has\n // no way to tell a race from a real syntax error, and the FIRST thing it needs to know is that\n // read-only inspection of the file is still available so it can go look.\n private formatParseFailure(configPath: string, error: Error | null): string {\n return (\n `webpieces.config.json could not be parsed as JSON — retried ${CONFIG_PARSE_ATTEMPTS} times ` +\n `over ~${CONFIG_PARSE_RETRY_MILLIS * (CONFIG_PARSE_ATTEMPTS - 1)}ms and it failed every time.\\n` +\n `Parse error: ${error?.message ?? 'unknown'}\\n` +\n `File: ${configPath}\\n\\n` +\n `Two causes, in the order to check them:\\n` +\n ` 1. GENUINELY INVALID — most likely. Look at the file: a trailing comma, a missing brace, ` +\n `or leftover conflict markers (\\`<<<<<<< HEAD\\`) from a merge you are in the middle of.\\n` +\n ` 2. STILL BEING WRITTEN by another process (another agent/worktree on this machine, a dep ` +\n `bump, an editor save). ${CONFIG_PARSE_ATTEMPTS} attempts already ruled out a brief write, but a ` +\n `long-running writer can outlast them — if so, simply retrying your command now will succeed.\\n\\n` +\n `👉 READING AND EDITING ${CONFIG_FILENAME} IS ALWAYS ALLOWED, including right now: \\`Read\\`, ` +\n `\\`cat\\`, \\`grep\\`, \\`sed -n\\` and the other read-only inspection commands still work while the ` +\n `config is broken. Go look at the file, fix it, then retry. (Writes to OTHER files stay ` +\n `blocked — with an unparseable config every guard is disabled, so nothing else may proceed.)`\n );\n }\n}\n\n// Temporary migration delegators — consumers migrate to injecting ConfigFile over follow-up PRs, then\n// these free functions are removed. Declarations kept identical to the originals (unchanged lines).\nconst configFileSvc = new ConfigFile();\n\n/**\n * Walk up from `startDir` looking for webpieces.config.json. Returns its absolute path or null.\n */\nexport function findConfigFile(startDir: string): string | null {\n return configFileSvc.findConfigFile(startDir);\n}\n\n/**\n * Read + JSON.parse webpieces.config.json, surfacing parse failures as a readable InformAiError.\n */\nexport function readRawConfig(configPath: string): RawConfigFile {\n return configFileSvc.readRawConfig(configPath);\n}\n"]}
|
package/src/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export { CliUsage, CliArgsCheck, CliArgs } from './cli-args';
|
|
|
6
6
|
export { runMain } from './run-main';
|
|
7
7
|
export { toError } from './to-error';
|
|
8
8
|
export { loadAndValidate, LoadedConfig, ConfigLoader } from './load-config';
|
|
9
|
-
export { findConfigFile, CONFIG_FILENAME, ConfigFile } from './config-file';
|
|
9
|
+
export { findConfigFile, CONFIG_FILENAME, ConfigFile, ConfigParseAttempt, CONFIG_PARSE_ATTEMPTS, CONFIG_PARSE_RETRY_MILLIS } from './config-file';
|
|
10
10
|
export { RepoRootFinder, INSTRUCT_AI_DIR } from './repo-root';
|
|
11
11
|
export { RulesConfigDesign } from './rules-config-design';
|
|
12
12
|
export { DocumentDesign, isDocumentDesign, DESIGN_METADATA_KEYS } from './di';
|
package/src/index.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
5
|
-
exports.
|
|
6
|
-
exports.
|
|
7
|
-
exports.
|
|
3
|
+
exports.DEFAULT_MATCH_RULES = exports.renderMatchRuleMessage = exports.compileMatchRulePatterns = exports.isMatchRuleAllowedPath = exports.findMatchRuleViolations = exports.MatchRuleViolation = exports.MatchRuleConfig = exports.validateChecklistDocs = exports.allRuleNames = exports.validateMatchRulesSection = exports.validateExcludePaths = exports.validateCommandsSection = exports.validateSectionPlacement = exports.validateChecklistsSection = exports.validatePrGateSection = exports.validateWebpiecesConfig = exports.TemplateWriter = exports.writeTemplate = exports.writeTemplateIfMissing = exports.loadTemplate = exports.defaultRulesDir = exports.defaultRules = exports.matchesAnyGlob = exports.isPathExcluded = exports.ExcludePaths = exports.DESIGN_METADATA_KEYS = exports.isDocumentDesign = exports.DocumentDesign = exports.RulesConfigDesign = 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.ConfigLoader = exports.LoadedConfig = exports.loadAndValidate = exports.toError = exports.runMain = exports.CliArgs = exports.CliArgsCheck = exports.CliUsage = exports.CliExitError = exports.RuleFailError = exports.InformAiError = exports.ResolvedRuleConfig = exports.ResolvedConfig = void 0;
|
|
4
|
+
exports.InjectAnnotationNotNeededForConcreteClassConfig = exports.NoFunctionOutsideClassConfig = exports.NoProcessExitOutsideMainConfig = exports.NoCustomCssConfig = exports.NoSymbolDiTokensConfig = exports.AngularNoDirectApiInResolverConfig = 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_UPSERT_PR = exports.WP_START_UPSERT_PR = exports.WP_FINISH_UPDATE = exports.WP_START_UPDATE = exports.SyncFlowGuidance = exports.WebpiecesRulesConfig = 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.getCurrentBranch = exports.shouldSkipRule = exports.FieldDef = exports.sectionForRule = exports.isHookGuard = exports.HOOK_GUARD_NAMES = void 0;
|
|
5
|
+
exports.MERGE_MODES = exports.MERGE_MODE_NONE = exports.MERGE_MODE_AUTO = exports.buildLandPrConfig = exports.buildPrGateConfig = exports.defaultLandPrConfig = exports.defaultPrGateConfig = exports.defaultGates = exports.ReviewContextEntry = exports.LandPrConfig = exports.PrGateConfig = exports.GateDefinition = exports.StaleMainBashGuardConfig = exports.MergedBranchBashGuardConfig = exports.ReadStaleGuardConfig = exports.FeatureBranchGuardConfig = 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.RedirectHowToMergeMainConfig = exports.PrMergeGuardConfig = exports.MergeInProgressGuardConfig = exports.PrCreationOrPushGuardConfig = exports.BranchCreationGuardConfig = exports.RoleTagConfig = exports.FrameworkTagConfig = void 0;
|
|
6
|
+
exports.readMainSyncStatus = exports.mainSyncLockPath = exports.mainSyncStatusPath = exports.DEFAULT_HANG_TIMEOUT_MINUTES = exports.MainSyncStatusService = exports.MainSyncLock = exports.MainSyncStatus = exports.reviewJsonSchemaHint = exports.reviewJsonPath = exports.prDirFor = exports.loadReviewJson = 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 = exports.CK_WARN = exports.CK_PASS = exports.ChecklistVerdict = exports.ChecklistResult = exports.PrContext = exports.ReviewJson = exports.PROVENANCE_SKIPPED = exports.PROVENANCE_MISSING = exports.PROVENANCE_OK = exports.ProvenanceResult = exports.EvidenceRequest = exports.ReviewerEvidence = exports.SubagentProvenanceService = exports.verifyGateToken = exports.extractGateToken = exports.gateTokenMarker = exports.computeGateToken = exports.GateTokenService = exports.ContextEntry = exports.BriefedFile = exports.ReviewerBriefing = exports.ReviewerInstructionsService = exports.ChecklistInstructionsService = exports.ChecklistValidator = exports.formatFileList = exports.normalizeChecklistDoc = exports.toChecklist = exports.ChecklistDefinition = void 0;
|
|
7
|
+
exports.CommandsConfig = exports.logBranchMutation = exports.branchMutationLogPath = exports.BranchMutationLog = exports.BranchMutationEvent = exports.WorktreeReaper = exports.WorktreeReapResult = exports.ReapedWorktree = exports.BranchReaper = exports.ReapResult = exports.ReapedBranch = exports.WorktreeService = 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.PROMPTABLE_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 = exports.CLASSIFICATION_NO_COMMITS = 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.writeMainSyncStatus = void 0;
|
|
8
|
+
exports.DEFAULT_MERGE_COMPLETE_COMMAND = exports.DEFAULT_UPSERT_PR_COMMAND = exports.buildCommandsConfig = void 0;
|
|
8
9
|
var types_1 = require("./types");
|
|
9
10
|
Object.defineProperty(exports, "ResolvedConfig", { enumerable: true, get: function () { return types_1.ResolvedConfig; } });
|
|
10
11
|
Object.defineProperty(exports, "ResolvedRuleConfig", { enumerable: true, get: function () { return types_1.ResolvedRuleConfig; } });
|
|
@@ -30,6 +31,9 @@ var config_file_1 = require("./config-file");
|
|
|
30
31
|
Object.defineProperty(exports, "findConfigFile", { enumerable: true, get: function () { return config_file_1.findConfigFile; } });
|
|
31
32
|
Object.defineProperty(exports, "CONFIG_FILENAME", { enumerable: true, get: function () { return config_file_1.CONFIG_FILENAME; } });
|
|
32
33
|
Object.defineProperty(exports, "ConfigFile", { enumerable: true, get: function () { return config_file_1.ConfigFile; } });
|
|
34
|
+
Object.defineProperty(exports, "ConfigParseAttempt", { enumerable: true, get: function () { return config_file_1.ConfigParseAttempt; } });
|
|
35
|
+
Object.defineProperty(exports, "CONFIG_PARSE_ATTEMPTS", { enumerable: true, get: function () { return config_file_1.CONFIG_PARSE_ATTEMPTS; } });
|
|
36
|
+
Object.defineProperty(exports, "CONFIG_PARSE_RETRY_MILLIS", { enumerable: true, get: function () { return config_file_1.CONFIG_PARSE_RETRY_MILLIS; } });
|
|
33
37
|
var repo_root_1 = require("./repo-root");
|
|
34
38
|
Object.defineProperty(exports, "RepoRootFinder", { enumerable: true, get: function () { return repo_root_1.RepoRootFinder; } });
|
|
35
39
|
Object.defineProperty(exports, "INSTRUCT_AI_DIR", { enumerable: true, get: function () { return repo_root_1.INSTRUCT_AI_DIR; } });
|
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,qDAAkD;AAAzC,gHAAA,aAAa,OAAA;AACtB,mDAAgD;AAAvC,8GAAA,YAAY,OAAA;AACr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AACd,uHAAA,oBAAoB,OAAA;AACpB,2HAAA,wBAAwB,OAAA;AACxB,kIAAA,+BAA+B,OAAA;AAC/B,4HAAA,yBAAyB,OAAA;AACzB,4HAAA,yBAAyB,OAAA;AACzB,iIAAA,8BAA8B,OAAA;AAC9B,gIAAA,6BAA6B,OAAA;AAC7B,wHAAA,qBAAqB,OAAA;AACrB,0HAAA,uBAAuB,OAAA;AACvB,wHAAA,qBAAqB,OAAA;AACrB,yHAAA,sBAAsB,OAAA;AACtB,0HAAA,uBAAuB,OAAA;AACvB,6HAAA,0BAA0B,OAAA;AAE9B,qDAQ2B;AAPvB,iHAAA,cAAc,OAAA;AACd,gHAAA,aAAa,OAAA;AACb,qHAAA,kBAAkB,OAAA;AAClB,oHAAA,iBAAiB,OAAA;AACjB,0HAAA,uBAAuB,OAAA;AACvB,+HAAA,4BAA4B,OAAA;AAC5B,wHAAA,qBAAqB,OAAA;AAEzB,yCAGqB;AAFjB,qGAAA,QAAQ,OAAA;AACR,4GAAA,eAAe,OAAA;AAEnB,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","sourcesContent":["export { ResolvedConfig, ResolvedRuleConfig, RuleOptions } from './types';\nexport { InformAiError } from './inform-ai-error';\nexport { RuleFailError } from './rule-fail-error';\nexport { CliExitError } from './cli-exit-error';\nexport { CliUsage, CliArgsCheck, CliArgs } from './cli-args';\nexport { runMain } from './run-main';\nexport { toError } from './to-error';\nexport { loadAndValidate, LoadedConfig, ConfigLoader } from './load-config';\nexport { findConfigFile, CONFIG_FILENAME, ConfigFile } from './config-file';\nexport { RepoRootFinder, INSTRUCT_AI_DIR } from './repo-root';\nexport { RulesConfigDesign } from './rules-config-design';\nexport { DocumentDesign, isDocumentDesign, DESIGN_METADATA_KEYS } from './di';\nexport { ExcludePaths } from './exclude-hook-paths';\nexport { isPathExcluded, matchesAnyGlob } from './exclude-paths';\nexport { defaultRules, defaultRulesDir } from './default-rules';\nexport { loadTemplate, writeTemplateIfMissing, writeTemplate, TemplateWriter } from './load-template';\nexport { validateWebpiecesConfig, validatePrGateSection, validateChecklistsSection, validateSectionPlacement, validateCommandsSection, validateExcludePaths, validateMatchRulesSection, allRuleNames } from './validate-config';\nexport { validateChecklistDocs } from './checklist-docs-validator';\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 { HOOK_GUARD_NAMES, isHookGuard, sectionForRule } from './sections';\nexport { FieldDef } from './field-def';\nexport type { SchemaShape } from './field-def';\nexport { shouldSkipRule, getCurrentBranch } from './skip-rule';\nexport type { 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} 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} 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 PrCreationOrPushGuardConfig,\n MergeInProgressGuardConfig,\n PrMergeGuardConfig,\n RedirectHowToMergeMainConfig,\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';\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 FeatureBranchGuardConfig,\n ReadStaleGuardConfig,\n MergedBranchBashGuardConfig,\n StaleMainBashGuardConfig,\n} from './main-sync-guard-configs';\nexport {\n GateDefinition,\n PrGateConfig,\n LandPrConfig,\n ReviewContextEntry,\n defaultGates,\n defaultPrGateConfig,\n defaultLandPrConfig,\n buildPrGateConfig,\n buildLandPrConfig,\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} from './reviewer-instructions';\nexport {\n GateTokenService,\n computeGateToken,\n gateTokenMarker,\n extractGateToken,\n verifyGateToken,\n} from './gate-token';\nexport {\n SubagentProvenanceService,\n ReviewerEvidence,\n EvidenceRequest,\n ProvenanceResult,\n PROVENANCE_OK,\n PROVENANCE_MISSING,\n PROVENANCE_SKIPPED,\n} from './subagent-provenance';\nexport {\n ReviewJson,\n PrContext,\n ChecklistResult,\n ChecklistVerdict,\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 loadReviewJson,\n prDirFor,\n reviewJsonPath,\n reviewJsonSchemaHint,\n} from './review-json';\nexport {\n MainSyncStatus,\n MainSyncLock,\n MainSyncStatusService,\n DEFAULT_HANG_TIMEOUT_MINUTES,\n mainSyncStatusPath,\n mainSyncLockPath,\n readMainSyncStatus,\n writeMainSyncStatus,\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_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 PROMPTABLE_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 WorktreeService,\n} from './worktrees';\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';\n"]}
|
|
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,qDAAkD;AAAzC,gHAAA,aAAa,OAAA;AACtB,mDAAgD;AAAvC,8GAAA,YAAY,OAAA;AACrB,uCAA6D;AAApD,oGAAA,QAAQ,OAAA;AAAE,wGAAA,YAAY,OAAA;AAAE,mGAAA,OAAO,OAAA;AACxC,uCAAqC;AAA5B,mGAAA,OAAO,OAAA;AAChB,uCAAqC;AAA5B,mGAAA,OAAO,OAAA;AAChB,6CAA4E;AAAnE,8GAAA,eAAe,OAAA;AAAE,2GAAA,YAAY,OAAA;AAAE,2GAAA,YAAY,OAAA;AACpD,6CAAkJ;AAAzI,6GAAA,cAAc,OAAA;AAAE,8GAAA,eAAe,OAAA;AAAE,yGAAA,UAAU,OAAA;AAAE,iHAAA,kBAAkB,OAAA;AAAE,oHAAA,qBAAqB,OAAA;AAAE,wHAAA,yBAAyB,OAAA;AAC1H,yCAA8D;AAArD,2GAAA,cAAc,OAAA;AAAE,4GAAA,eAAe,OAAA;AACxC,6DAA0D;AAAjD,wHAAA,iBAAiB,OAAA;AAC1B,2BAA8E;AAArE,oGAAA,cAAc,OAAA;AAAE,sGAAA,gBAAgB,OAAA;AAAE,0GAAA,oBAAoB,OAAA;AAC/D,2DAAoD;AAA3C,kHAAA,YAAY,OAAA;AACrB,iDAAiE;AAAxD,+GAAA,cAAc,OAAA;AAAE,+GAAA,cAAc,OAAA;AACvC,iDAAgE;AAAvD,6GAAA,YAAY,OAAA;AAAE,gHAAA,eAAe,OAAA;AACtC,iDAAsG;AAA7F,6GAAA,YAAY,OAAA;AAAE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AA,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","sourcesContent":["export { ResolvedConfig, ResolvedRuleConfig, RuleOptions } from './types';\nexport { InformAiError } from './inform-ai-error';\nexport { RuleFailError } from './rule-fail-error';\nexport { CliExitError } from './cli-exit-error';\nexport { CliUsage, CliArgsCheck, CliArgs } from './cli-args';\nexport { runMain } from './run-main';\nexport { toError } from './to-error';\nexport { loadAndValidate, LoadedConfig, ConfigLoader } from './load-config';\nexport { findConfigFile, CONFIG_FILENAME, ConfigFile, ConfigParseAttempt, CONFIG_PARSE_ATTEMPTS, CONFIG_PARSE_RETRY_MILLIS } from './config-file';\nexport { RepoRootFinder, INSTRUCT_AI_DIR } from './repo-root';\nexport { RulesConfigDesign } from './rules-config-design';\nexport { DocumentDesign, isDocumentDesign, DESIGN_METADATA_KEYS } from './di';\nexport { ExcludePaths } from './exclude-hook-paths';\nexport { isPathExcluded, matchesAnyGlob } from './exclude-paths';\nexport { defaultRules, defaultRulesDir } from './default-rules';\nexport { loadTemplate, writeTemplateIfMissing, writeTemplate, TemplateWriter } from './load-template';\nexport { validateWebpiecesConfig, validatePrGateSection, validateChecklistsSection, validateSectionPlacement, validateCommandsSection, validateExcludePaths, validateMatchRulesSection, allRuleNames } from './validate-config';\nexport { validateChecklistDocs } from './checklist-docs-validator';\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 { HOOK_GUARD_NAMES, isHookGuard, sectionForRule } from './sections';\nexport { FieldDef } from './field-def';\nexport type { SchemaShape } from './field-def';\nexport { shouldSkipRule, getCurrentBranch } from './skip-rule';\nexport type { 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} 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} 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 PrCreationOrPushGuardConfig,\n MergeInProgressGuardConfig,\n PrMergeGuardConfig,\n RedirectHowToMergeMainConfig,\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';\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 FeatureBranchGuardConfig,\n ReadStaleGuardConfig,\n MergedBranchBashGuardConfig,\n StaleMainBashGuardConfig,\n} from './main-sync-guard-configs';\nexport {\n GateDefinition,\n PrGateConfig,\n LandPrConfig,\n ReviewContextEntry,\n defaultGates,\n defaultPrGateConfig,\n defaultLandPrConfig,\n buildPrGateConfig,\n buildLandPrConfig,\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} from './reviewer-instructions';\nexport {\n GateTokenService,\n computeGateToken,\n gateTokenMarker,\n extractGateToken,\n verifyGateToken,\n} from './gate-token';\nexport {\n SubagentProvenanceService,\n ReviewerEvidence,\n EvidenceRequest,\n ProvenanceResult,\n PROVENANCE_OK,\n PROVENANCE_MISSING,\n PROVENANCE_SKIPPED,\n} from './subagent-provenance';\nexport {\n ReviewJson,\n PrContext,\n ChecklistResult,\n ChecklistVerdict,\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 loadReviewJson,\n prDirFor,\n reviewJsonPath,\n reviewJsonSchemaHint,\n} from './review-json';\nexport {\n MainSyncStatus,\n MainSyncLock,\n MainSyncStatusService,\n DEFAULT_HANG_TIMEOUT_MINUTES,\n mainSyncStatusPath,\n mainSyncLockPath,\n readMainSyncStatus,\n writeMainSyncStatus,\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_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 PROMPTABLE_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 WorktreeService,\n} from './worktrees';\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';\n"]}
|