@webpieces/rules-config 0.4.843 → 0.4.844
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 +9 -4
- package/src/abstract-rule.d.ts +1 -1
- package/src/abstract-rule.js.map +1 -1
- package/src/api-doc-rules-config.d.ts +1 -2
- package/src/api-doc-rules-config.js +9 -10
- package/src/api-doc-rules-config.js.map +1 -1
- package/src/api-lib-spelling-configs.d.ts +2 -2
- package/src/api-lib-spelling-configs.js +9 -9
- package/src/api-lib-spelling-configs.js.map +1 -1
- package/src/index.d.ts +2 -4
- package/src/index.js +10 -11
- package/src/index.js.map +1 -1
- package/src/main-sync-guard-configs.d.ts +2 -2
- package/src/main-sync-guard-configs.js +7 -7
- package/src/main-sync-guard-configs.js.map +1 -1
- package/src/match-rules-config.d.ts +2 -1
- package/src/match-rules-config.js +2 -2
- package/src/match-rules-config.js.map +1 -1
- package/src/no-client-creation-config.d.ts +2 -2
- package/src/no-client-creation-config.js +8 -8
- package/src/no-client-creation-config.js.map +1 -1
- package/src/no-root-union-config.d.ts +2 -2
- package/src/no-root-union-config.js +5 -5
- package/src/no-root-union-config.js.map +1 -1
- package/src/no-state-paths-config.d.ts +2 -2
- package/src/no-state-paths-config.js +7 -7
- package/src/no-state-paths-config.js.map +1 -1
- package/src/no-utility-types-config.d.ts +2 -2
- package/src/no-utility-types-config.js +6 -6
- package/src/no-utility-types-config.js.map +1 -1
- package/src/required-type-suffix-config.d.ts +2 -2
- package/src/required-type-suffix-config.js +8 -8
- package/src/required-type-suffix-config.js.map +1 -1
- package/src/rule-configs.d.ts +2 -10
- package/src/rule-configs.js +156 -171
- package/src/rule-configs.js.map +1 -1
- package/src/rule-pack-registry.d.ts +31 -0
- package/src/rule-pack-registry.js +175 -0
- package/src/rule-pack-registry.js.map +1 -0
- package/src/rule-schemas.d.ts +1 -1
- package/src/rule-schemas.js +3 -0
- package/src/rule-schemas.js.map +1 -1
- package/src/seed-entry.js +4 -0
- package/src/seed-entry.js.map +1 -1
- package/src/tag-truth-configs.d.ts +2 -2
- package/src/tag-truth-configs.js +30 -30
- package/src/tag-truth-configs.js.map +1 -1
- package/src/validate-config.js.map +1 -1
- package/src/field-def.d.ts +0 -24
- package/src/field-def.js +0 -59
- package/src/field-def.js.map +0 -1
- package/src/spec-temp-dirs.d.ts +0 -37
- package/src/spec-temp-dirs.js +0 -113
- package/src/spec-temp-dirs.js.map +0 -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.844",
|
|
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",
|
|
@@ -11,15 +11,17 @@
|
|
|
11
11
|
"files": [
|
|
12
12
|
"src/**/*",
|
|
13
13
|
"templates/**/*",
|
|
14
|
-
"README.md"
|
|
14
|
+
"README.md",
|
|
15
|
+
"RULE_PACKS.md"
|
|
15
16
|
],
|
|
16
17
|
"dependencies": {
|
|
17
18
|
"@inversifyjs/binding-decorators": "1.1.5",
|
|
18
19
|
"inversify": "7.10.4",
|
|
19
20
|
"reflect-metadata": "0.2.2",
|
|
20
21
|
"minimatch": "10.0.1",
|
|
21
|
-
"@webpieces/tooling-common": "0.4.
|
|
22
|
-
"@webpieces/repo-workflow-core": "0.4.
|
|
22
|
+
"@webpieces/tooling-common": "0.4.844",
|
|
23
|
+
"@webpieces/repo-workflow-core": "0.4.844",
|
|
24
|
+
"@webpieces/rules-sdk": "0.4.844"
|
|
23
25
|
},
|
|
24
26
|
"author": "Dean Hiller",
|
|
25
27
|
"license": "Apache-2.0",
|
|
@@ -31,5 +33,8 @@
|
|
|
31
33
|
"publishConfig": {
|
|
32
34
|
"access": "public"
|
|
33
35
|
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@webpieces/tooling-testkit": "0.4.844"
|
|
38
|
+
},
|
|
34
39
|
"types": "./src/index.d.ts"
|
|
35
40
|
}
|
package/src/abstract-rule.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseRuleConfig } from '
|
|
1
|
+
import { BaseRuleConfig } from '@webpieces/rules-sdk';
|
|
2
2
|
/**
|
|
3
3
|
* Shared base for every rule in BOTH packages (ai-hook-rules and code-rules). A rule is
|
|
4
4
|
* constructed with its typed config (`new NoAnyUnknownRule(config['no-any-unknown'])`), so the
|
package/src/abstract-rule.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abstract-rule.js","sourceRoot":"","sources":["../../../../../packages/tooling/rules-config/src/abstract-rule.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"abstract-rule.js","sourceRoot":"","sources":["../../../../../packages/tooling/rules-config/src/abstract-rule.ts"],"names":[],"mappings":";;;AAEA,2CAA6C;AAE7C;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAsB,YAAY;IACC;IAAoB;IAAuB;IAA1E,YAA+B,MAAS,EAAW,IAAY,EAAW,SAAiB;QAA5D,WAAM,GAAN,MAAM,CAAG;QAAW,SAAI,GAAJ,IAAI,CAAQ;QAAW,cAAS,GAAT,SAAS,CAAQ;IAAG,CAAC;IAE/F,uFAAuF;IACvF,SAAS;QACL,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,KAAK;YAAE,OAAO,KAAK,CAAC;QAC7C,MAAM,IAAI,GAAG,IAAA,0BAAc,EAAC,IAAI,CAAC,MAAM,CAAC,qBAAqB,EAAE,IAAI,CAAC,MAAM,CAAC,wBAAwB,CAAC,CAAC;QACrG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;IACtB,CAAC;CACJ;AATD,oCASC","sourcesContent":["import { BaseRuleConfig } from '@webpieces/rules-sdk';\n\nimport { shouldSkipRule } from './skip-rule';\n\n/**\n * Shared base for every rule in BOTH packages (ai-hook-rules and code-rules). A rule is\n * constructed with its typed config (`new NoAnyUnknownRule(config['no-any-unknown'])`), so the\n * config class is genuinely consumed — find-usages/rename work across packages.\n *\n * It is execution-agnostic: it owns only `name` + `configKey` + the on/off + escape-hatch decision\n * (`shouldRun`). Each package's base adds its own execution surface (ai-hook `check(ctx)`,\n * code-rules `run(workspaceRoot)`), so rules-config stays free of package-specific types.\n *\n * ## `name` and `configKey` are two different identities, and they are BOTH required\n *\n * `name` is the OPERATOR identity: it is what a decision-log line carries as `rule=`, what a deny\n * report titles itself with, and what prose in `guards/**` names when it describes behaviour. It is\n * per-CLASS and it never changes when the config collapses.\n *\n * `configKey` is the webpieces.config.json KEY whose entry configures this rule. Several classes may\n * share one key when they implement one POLICY — the four branch-state guards all read\n * `branch-state-guard`, the four PR-lifecycle guards all read `pr-lifecycle-guard` — because a\n * consumer switches a POLICY on and off, not an implementation class. Half a policy (`read-stale-guard`\n * OFF while `merged-branch-bash-guard` stays ON: read the file, yes; `cat` the same file, no) was\n * representable while the two were the same string, and this split is what makes it unrepresentable.\n *\n * BOTH are constructor params with NO default. A `configKey = name` default would make the common\n * case silent and the shared case a thing you have to remember — which is the same \"widening that is\n * an ABSENCE rather than a token\" `.claude/rules/no-backwards-compat.md` rejects. Every rule says which\n * key configures it, out loud,\n * so `grep \"'branch-state-guard'\"` lists every class that key governs.\n */\nexport abstract class AbstractRule<C extends BaseRuleConfig> {\n constructor(protected readonly config: C, readonly name: string, readonly configKey: string) {}\n\n /** True unless the rule is `mode: \"OFF\"` or skipped by a branch/epoch escape hatch. */\n shouldRun(): boolean {\n if (this.config.mode === 'OFF') return false;\n const skip = shouldSkipRule(this.config.turnOffRuleUntilEpoch, this.config.turnOffRuleWhileOnBranch);\n return !skip.skip;\n }\n}\n"]}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ApiRulesForMcpConfig = exports.ApiRulesForOpenApiConfig = exports.API_DOC_MODES = void 0;
|
|
4
|
-
const
|
|
5
|
-
const rule_configs_1 = require("./rule-configs");
|
|
4
|
+
const rules_sdk_1 = require("@webpieces/rules-sdk");
|
|
6
5
|
/**
|
|
7
6
|
* The modes the two CONTRACT rules accept (#1017).
|
|
8
7
|
*
|
|
@@ -38,12 +37,12 @@ exports.API_DOC_MODES = ['OFF', 'AFFECTED_PROJECT', 'RUN_EVERY_TIME'];
|
|
|
38
37
|
* "is this type-safe?"; this one asks "is this field PUBLISHED to a partner with no shape?" — a
|
|
39
38
|
* different question with different right answers, so it wants its own, separately argued line.
|
|
40
39
|
*/
|
|
41
|
-
class ApiRulesForOpenApiConfig extends
|
|
40
|
+
class ApiRulesForOpenApiConfig extends rules_sdk_1.BaseRuleConfig {
|
|
42
41
|
allowedPaths;
|
|
43
42
|
static SCHEMA = {
|
|
44
|
-
mode: new
|
|
45
|
-
allowedPaths:
|
|
46
|
-
...
|
|
43
|
+
mode: new rules_sdk_1.FieldDef('string', exports.API_DOC_MODES),
|
|
44
|
+
allowedPaths: rules_sdk_1.FieldDef.optional('string[]'),
|
|
45
|
+
...rules_sdk_1.BASE_RULE_SCHEMA,
|
|
47
46
|
};
|
|
48
47
|
}
|
|
49
48
|
exports.ApiRulesForOpenApiConfig = ApiRulesForOpenApiConfig;
|
|
@@ -59,12 +58,12 @@ exports.ApiRulesForOpenApiConfig = ApiRulesForOpenApiConfig;
|
|
|
59
58
|
* The MCP half drives `McpSchemaRenderer` itself, tool by tool, so "this passes" and "this renders"
|
|
60
59
|
* are the same statement rather than two that can disagree.
|
|
61
60
|
*/
|
|
62
|
-
class ApiRulesForMcpConfig extends
|
|
61
|
+
class ApiRulesForMcpConfig extends rules_sdk_1.BaseRuleConfig {
|
|
63
62
|
allowedPaths;
|
|
64
63
|
static SCHEMA = {
|
|
65
|
-
mode: new
|
|
66
|
-
allowedPaths:
|
|
67
|
-
...
|
|
64
|
+
mode: new rules_sdk_1.FieldDef('string', exports.API_DOC_MODES),
|
|
65
|
+
allowedPaths: rules_sdk_1.FieldDef.optional('string[]'),
|
|
66
|
+
...rules_sdk_1.BASE_RULE_SCHEMA,
|
|
68
67
|
};
|
|
69
68
|
}
|
|
70
69
|
exports.ApiRulesForMcpConfig = ApiRulesForMcpConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-doc-rules-config.js","sourceRoot":"","sources":["../../../../../packages/tooling/rules-config/src/api-doc-rules-config.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"api-doc-rules-config.js","sourceRoot":"","sources":["../../../../../packages/tooling/rules-config/src/api-doc-rules-config.ts"],"names":[],"mappings":";;;AAAA,oDAA+F;AAI/F;;;;;;;;;;;;;;;;GAgBG;AACU,QAAA,aAAa,GAAG,CAAC,KAAK,EAAE,kBAAkB,EAAE,gBAAgB,CAAU,CAAC;AAGpF;;;;;;;;;;;;;;;;GAgBG;AACH,MAAa,wBAAyB,SAAQ,0BAAc;IAExD,YAAY,CAAY;IAExB,MAAM,CAAU,MAAM,GAA0C;QAC5D,IAAI,EAAE,IAAI,oBAAQ,CAAC,QAAQ,EAAE,qBAAa,CAAC;QAC3C,YAAY,EAAE,oBAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC;QAC3C,GAAG,4BAAgB;KACtB,CAAC;;AARN,4DASC;AAED;;;;;;;;;;;GAWG;AACH,MAAa,oBAAqB,SAAQ,0BAAc;IAEpD,YAAY,CAAY;IAExB,MAAM,CAAU,MAAM,GAAsC;QACxD,IAAI,EAAE,IAAI,oBAAQ,CAAC,QAAQ,EAAE,qBAAa,CAAC;QAC3C,YAAY,EAAE,oBAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC;QAC3C,GAAG,4BAAgB;KACtB,CAAC;;AARN,oDASC","sourcesContent":["import { FieldDef, SchemaShape, BaseRuleConfig, BASE_RULE_SCHEMA } from '@webpieces/rules-sdk';\n\n\n\n/**\n * The modes the two CONTRACT rules accept (#1017).\n *\n * `AFFECTED_PROJECT` is the one a consumer normally picks, and it is the granularity nx already\n * gives: scan the `@ApiPath` contracts of the projects the diff actually touches, instead of every\n * contract in the workspace every time any project is affected. A contract in a project no changed\n * file belongs to cannot have changed, so scanning it is work with no verdict in it — and on a repo\n * measured at 98 endpoints that is the difference between a rule somebody leaves on and one they\n * turn off.\n *\n * `RUN_EVERY_TIME` stays, for the full-repo migration sweep: when a team decides to publish an API\n * they want the whole list at once, not the part of it they happened to edit this week.\n *\n * This is deliberately NOT diff-HUNK scoping. #1016 established that a contract's publishability is\n * not a property of the lines you touched — adding one field to a DTO can break a document through a\n * type three files away — so the unit stays the PROJECT, which is the unit nx itself works in.\n */\nexport const API_DOC_MODES = ['OFF', 'AFFECTED_PROJECT', 'RUN_EVERY_TIME'] as const;\nexport type ApiDocMode = typeof API_DOC_MODES[number];\n\n/**\n * `api-rules-for-openapi` — everything that must hold for an `@ApiPath` contract to PRODUCE an\n * OpenAPI document, checked on every contract in the workspace whether or not it declares `@ApiType`.\n *\n * The rule does not restate \"what is expressible\". It DRIVES `@webpieces/api-doc-model`'s own\n * extractor, so there is exactly one definition of it and the acceptance contract holds by\n * construction: a contract that passes is one where adding `@ApiType(...)` then generates. A second\n * implementation would drift from the generator's on the first release that improved either.\n *\n * `allowedPaths` exempts whole project trees, with the same glob semantics every other rule's\n * `allowedPaths` uses. The per-site escape hatch is\n * `// webpieces-disable api-rules-for-openapi -- <reason>`, and the REASON is mandatory.\n *\n * An EXISTING `no-any-unknown` disable deliberately does not silence this rule. That rule asks\n * \"is this type-safe?\"; this one asks \"is this field PUBLISHED to a partner with no shape?\" — a\n * different question with different right answers, so it wants its own, separately argued line.\n */\nexport class ApiRulesForOpenApiConfig extends BaseRuleConfig {\n declare mode?: ApiDocMode;\n allowedPaths?: string[];\n\n static readonly SCHEMA: SchemaShape<ApiRulesForOpenApiConfig> = {\n mode: new FieldDef('string', API_DOC_MODES),\n allowedPaths: FieldDef.optional('string[]'),\n ...BASE_RULE_SCHEMA,\n };\n}\n\n/**\n * `api-rules-for-mcp` — everything `api-rules-for-openapi` checks, PLUS what `McpToolRegistry`\n * enforces at boot, moved to CI.\n *\n * Two rules and not one because the blast radii differ. An OpenAPI defect is DOCUMENT-WIDE: one\n * unshaped field blocks client generation for every operation of that API. An MCP defect blocks one\n * tool. A team publishing a partner API and no tools must be able to run the first without the\n * second, and a config key per rule is the only way to say that.\n *\n * The MCP half drives `McpSchemaRenderer` itself, tool by tool, so \"this passes\" and \"this renders\"\n * are the same statement rather than two that can disagree.\n */\nexport class ApiRulesForMcpConfig extends BaseRuleConfig {\n declare mode?: ApiDocMode;\n allowedPaths?: string[];\n\n static readonly SCHEMA: SchemaShape<ApiRulesForMcpConfig> = {\n mode: new FieldDef('string', API_DOC_MODES),\n allowedPaths: FieldDef.optional('string[]'),\n ...BASE_RULE_SCHEMA,\n };\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SchemaShape } from '
|
|
2
|
-
import {
|
|
1
|
+
import { SchemaShape, BaseRuleConfig } from '@webpieces/rules-sdk';
|
|
2
|
+
import { ModifiedCodeMode } from './rule-configs';
|
|
3
3
|
/**
|
|
4
4
|
* `no-inline-import-in-api-lib` (#1023) — in every `role:api-lib` project, refuse an `import('…')`
|
|
5
5
|
* TYPE node (`activeAiProvider?: import('@myorg/company-core').AiProvider`) and a dynamic `import()`
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.OneEnumSpellingInApiLibConfig = exports.NoInlineImportInApiLibConfig = void 0;
|
|
4
|
-
const
|
|
4
|
+
const rules_sdk_1 = require("@webpieces/rules-sdk");
|
|
5
5
|
const rule_configs_1 = require("./rule-configs");
|
|
6
6
|
/**
|
|
7
7
|
* `no-inline-import-in-api-lib` (#1023) — in every `role:api-lib` project, refuse an `import('…')`
|
|
@@ -15,12 +15,12 @@ const rule_configs_1 = require("./rule-configs");
|
|
|
15
15
|
* project / in the repo — #1027; count what is left with `wp-validate-code --rule=… --mode=RUN_EVERY_TIME`). `allowedPaths` exempts whole trees. The per-site escape hatch is
|
|
16
16
|
* `// webpieces-disable no-inline-import-in-api-lib -- <reason>` on the line or the line above.
|
|
17
17
|
*/
|
|
18
|
-
class NoInlineImportInApiLibConfig extends
|
|
18
|
+
class NoInlineImportInApiLibConfig extends rules_sdk_1.BaseRuleConfig {
|
|
19
19
|
allowedPaths;
|
|
20
20
|
static SCHEMA = {
|
|
21
|
-
mode: new
|
|
22
|
-
allowedPaths:
|
|
23
|
-
...
|
|
21
|
+
mode: new rules_sdk_1.FieldDef('string', rule_configs_1.MODIFIED_CODE_MODES),
|
|
22
|
+
allowedPaths: rules_sdk_1.FieldDef.optional('string[]'),
|
|
23
|
+
...rules_sdk_1.BASE_RULE_SCHEMA,
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
26
|
exports.NoInlineImportInApiLibConfig = NoInlineImportInApiLibConfig;
|
|
@@ -40,12 +40,12 @@ exports.NoInlineImportInApiLibConfig = NoInlineImportInApiLibConfig;
|
|
|
40
40
|
* `mode` is REQUIRED and has no default (`.claude/rules/no-rule-defaults.md`), with the same three
|
|
41
41
|
* values as above; `allowedPaths` and the per-site disable work the same way.
|
|
42
42
|
*/
|
|
43
|
-
class OneEnumSpellingInApiLibConfig extends
|
|
43
|
+
class OneEnumSpellingInApiLibConfig extends rules_sdk_1.BaseRuleConfig {
|
|
44
44
|
allowedPaths;
|
|
45
45
|
static SCHEMA = {
|
|
46
|
-
mode: new
|
|
47
|
-
allowedPaths:
|
|
48
|
-
...
|
|
46
|
+
mode: new rules_sdk_1.FieldDef('string', rule_configs_1.MODIFIED_CODE_MODES),
|
|
47
|
+
allowedPaths: rules_sdk_1.FieldDef.optional('string[]'),
|
|
48
|
+
...rules_sdk_1.BASE_RULE_SCHEMA,
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
51
|
exports.OneEnumSpellingInApiLibConfig = OneEnumSpellingInApiLibConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-lib-spelling-configs.js","sourceRoot":"","sources":["../../../../../packages/tooling/rules-config/src/api-lib-spelling-configs.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"api-lib-spelling-configs.js","sourceRoot":"","sources":["../../../../../packages/tooling/rules-config/src/api-lib-spelling-configs.ts"],"names":[],"mappings":";;;AAAA,oDAA+F;AAE/F,iDAAuE;AAEvE;;;;;;;;;;;GAWG;AACH,MAAa,4BAA6B,SAAQ,0BAAc;IAE5D,YAAY,CAAY;IAExB,MAAM,CAAU,MAAM,GAA8C;QAChE,IAAI,EAAE,IAAI,oBAAQ,CAAC,QAAQ,EAAE,kCAAmB,CAAC;QACjD,YAAY,EAAE,oBAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC;QAC3C,GAAG,4BAAgB;KACtB,CAAC;;AARN,oEASC;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAa,6BAA8B,SAAQ,0BAAc;IAE7D,YAAY,CAAY;IAExB,MAAM,CAAU,MAAM,GAA+C;QACjE,IAAI,EAAE,IAAI,oBAAQ,CAAC,QAAQ,EAAE,kCAAmB,CAAC;QACjD,YAAY,EAAE,oBAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC;QAC3C,GAAG,4BAAgB;KACtB,CAAC;;AARN,sEASC","sourcesContent":["import { FieldDef, SchemaShape, BaseRuleConfig, BASE_RULE_SCHEMA } from '@webpieces/rules-sdk';\n\nimport { ModifiedCodeMode, MODIFIED_CODE_MODES } from './rule-configs';\n\n/**\n * `no-inline-import-in-api-lib` (#1023) — in every `role:api-lib` project, refuse an `import('…')`\n * TYPE node (`activeAiProvider?: import('@myorg/company-core').AiProvider`) and a dynamic `import()`\n * EXPRESSION. An API imports at the top of the file, only: an inline import hides a cross-library\n * dependency from every reader of the contract and from the tools that read its imports.\n *\n * `mode` is REQUIRED and has no default (`.claude/rules/no-rule-defaults.md`): OFF |\n * NEW_AND_MODIFIED_CODE (only changed lines — grandfathers the rest) | NEW_AND_MODIFIED_FILES (every\n * occurrence in a changed file) | MODIFIED_PROJECTS / RUN_EVERY_TIME (every occurrence in a touched\n * project / in the repo — #1027; count what is left with `wp-validate-code --rule=… --mode=RUN_EVERY_TIME`). `allowedPaths` exempts whole trees. The per-site escape hatch is\n * `// webpieces-disable no-inline-import-in-api-lib -- <reason>` on the line or the line above.\n */\nexport class NoInlineImportInApiLibConfig extends BaseRuleConfig {\n declare mode?: ModifiedCodeMode;\n allowedPaths?: string[];\n\n static readonly SCHEMA: SchemaShape<NoInlineImportInApiLibConfig> = {\n mode: new FieldDef('string', MODIFIED_CODE_MODES),\n allowedPaths: FieldDef.optional('string[]'),\n ...BASE_RULE_SCHEMA,\n };\n}\n\n/**\n * `one-enum-spelling-in-api-lib` (#1023) — in every `role:api-lib` project, a fixed set of string\n * values has ONE spelling: a string `enum` whose every member is explicitly initialised with a string\n * literal (`export enum SpeakerGender { FEMALE = 'female', MALE = 'male' }`), used as the enum, one\n * member of it, or a union of its members. Refused, each with a cure that prints the enum to write:\n * a string-literal union of two or more members (in a type alias, a field or a parameter),\n * `(typeof X)[number]`, `keyof typeof X`, a single string-literal type used as a union discriminator,\n * and a numeric, heterogeneous, `const` or non-initialised enum (a numeric enum puts numbers on the\n * wire).\n *\n * The GENERATOR keeps supporting string-literal unions — for other consumers, and for code this rule's\n * mode grandfathers. This rule is what forbids NEW ones in an api library.\n *\n * `mode` is REQUIRED and has no default (`.claude/rules/no-rule-defaults.md`), with the same three\n * values as above; `allowedPaths` and the per-site disable work the same way.\n */\nexport class OneEnumSpellingInApiLibConfig extends BaseRuleConfig {\n declare mode?: ModifiedCodeMode;\n allowedPaths?: string[];\n\n static readonly SCHEMA: SchemaShape<OneEnumSpellingInApiLibConfig> = {\n mode: new FieldDef('string', MODIFIED_CODE_MODES),\n allowedPaths: FieldDef.optional('string[]'),\n ...BASE_RULE_SCHEMA,\n };\n}\n"]}
|
package/src/index.d.ts
CHANGED
|
@@ -38,8 +38,6 @@ export { MatchRuleConfig, MatchRuleViolation, findMatchRuleViolations, isMatchRu
|
|
|
38
38
|
export type { ConfigSection } from './sections';
|
|
39
39
|
export { schemaFieldNames, RULE_SCHEMAS } from './rule-schemas';
|
|
40
40
|
export { HOOK_GUARD_NAMES, BRANCH_STATE_GUARD_KEY, PR_LIFECYCLE_GUARD_KEY, isHookGuard, sectionForRule, } from './sections';
|
|
41
|
-
export { FieldDef } from './field-def';
|
|
42
|
-
export type { SchemaShape } from './field-def';
|
|
43
41
|
export { shouldSkipRule, HOTFIX_BUILD_COMMAND, HOTFIX_AUDIT_BANNER } from './skip-rule';
|
|
44
42
|
export { SkipRuleResult } from './skip-rule';
|
|
45
43
|
export { detectBase, resolveBase, getChangedFiles, getFileDiff, getChangedLineNumbers, findNewMethodSignaturesInDiff, hasChangesInRange, isNewOrModified, DiffScope, DiffRange, ChangedFilesOptions, } from './diff-scope';
|
|
@@ -47,7 +45,7 @@ export { AbstractRule } from './abstract-rule';
|
|
|
47
45
|
export { WEBPIECES_DISABLE, RULE_NAMES, hasDisable, MERGE_INFO_DIR, MERGE_IN_PROGRESS_FILE, MERGE_EXPLANATION_FILE, PUSH_DEV_STATE_FILE, PRUNE_UNKNOWN_COMMAND, UPGRADE_SHIM_COMMAND } from './constants';
|
|
48
46
|
export { WebpiecesRulesConfig } from './WebpiecesRulesConfig';
|
|
49
47
|
export { SyncFlowGuidance, WP_START_UPDATE, WP_FINISH_UPDATE, WP_START_UPSERT_PR, WP_FINISH_UPSERT_PR, WP_PUSH_DEV, WP_FINISH_PUSH_DEV, } from './sync-flow-guidance';
|
|
50
|
-
export { MaxMethodLinesConfig, MaxFileLinesConfig, RequireReturnTypeConfig, NoInlineTypeLiteralsConfig, NoAnyUnknownConfig, NoImplicitAnyConfig, PrismaValidateDtosConfig, PrismaConverterConfig, NoDestructureConfig, NoUnmanagedExceptionsConfig, CatchErrorPatternConfig, ThrowCauseRequiredConfig, AngularNoDirectApiInResolverConfig, NoSymbolDiTokensConfig, NoCustomCssConfig, NoProcessExitOutsideMainConfig, NoFunctionOutsideClassConfig, InjectAnnotationNotNeededForConcreteClassConfig, FrameworkTagConfig, RoleTagConfig, EnsureWeAreSecureConfig, BranchCreationGuardConfig, PrLifecycleGuardConfig, NoFileImportCyclesConfig, RuntimeArchitectureConfig, NxWiringConfig, DiGraphConfig, NoJsFilesConfig, ValidateTsInSrcConfig, ValidateArchitectureUnchangedConfig, ValidateNoArchitectureCyclesConfig, ValidatePackageJsonConfig, ValidateVersionsLockedConfig, ValidateEslintSyncConfig,
|
|
48
|
+
export { MaxMethodLinesConfig, MaxFileLinesConfig, RequireReturnTypeConfig, NoInlineTypeLiteralsConfig, NoAnyUnknownConfig, NoImplicitAnyConfig, PrismaValidateDtosConfig, PrismaConverterConfig, NoDestructureConfig, NoUnmanagedExceptionsConfig, CatchErrorPatternConfig, ThrowCauseRequiredConfig, AngularNoDirectApiInResolverConfig, NoSymbolDiTokensConfig, NoCustomCssConfig, NoProcessExitOutsideMainConfig, NoFunctionOutsideClassConfig, InjectAnnotationNotNeededForConcreteClassConfig, FrameworkTagConfig, RoleTagConfig, EnsureWeAreSecureConfig, BranchCreationGuardConfig, PrLifecycleGuardConfig, NoFileImportCyclesConfig, RuntimeArchitectureConfig, NxWiringConfig, DiGraphConfig, NoJsFilesConfig, ValidateTsInSrcConfig, ValidateArchitectureUnchangedConfig, ValidateNoArchitectureCyclesConfig, ValidatePackageJsonConfig, ValidateVersionsLockedConfig, ValidateEslintSyncConfig, } from './rule-configs';
|
|
51
49
|
export { NoRootUnionApiTypeConfig } from './no-root-union-config';
|
|
52
50
|
export { NoInlineImportInApiLibConfig, OneEnumSpellingInApiLibConfig } from './api-lib-spelling-configs';
|
|
53
51
|
export { NoUtilityTypesInApiLibConfig } from './no-utility-types-config';
|
|
@@ -74,8 +72,8 @@ export { ReviewProvenanceService, ReviewProvenance, ReviewerTranscript, Reviewer
|
|
|
74
72
|
export { PrSummary, PrContext, ChecklistResult, ChecklistVerdict, ChecklistOverride, ChecklistOverrideService, checklistOverrideService, CK_PASS, CK_WARN, CK_OVERRIDDEN, CK_ORANGE_FIXED, CK_ORANGE, CK_FAIL, CK_MISSING, CK_BAD_FORMAT, VERDICT_GREEN, VERDICT_YELLOW, VERDICT_ORANGE, VERDICT_RED, VERDICT_STATUSES, RequiredChecklist, ChecklistReviewContext, ReviewJsonService, prDirFor, summaryJsonPath, summaryJsonSchemaHint, } from './review-json';
|
|
75
73
|
export { CommandsConfig, buildCommandsConfig, DEFAULT_UPSERT_PR_COMMAND, DEFAULT_MERGE_COMPLETE_COMMAND, } from './commands-config';
|
|
76
74
|
export { StaleBinRemoval, StaleBinSweeper, staleBinSweeper } from './stale-bin-sweep';
|
|
77
|
-
export { SpecTempDirs, specTempDirs } from './spec-temp-dirs';
|
|
78
75
|
export { RepoScratchDirs, SCRATCH_DIR_NAME } from './repo-scratch-dirs';
|
|
79
76
|
export { TmpScratchSweeper, TMP_SCRATCH_RETENTION_DAYS, TMP_SCRATCH_PREFIX } from './tmp-scratch-sweep';
|
|
80
77
|
export * from './hook-fault-codes';
|
|
81
78
|
export * from './hook-config-diagnostics';
|
|
79
|
+
export { RulePackRegistry, NodeRulePackModuleLoader, RulePackDiscovery, RulePackModuleLoader } from './rule-pack-registry';
|
package/src/index.js
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.defaultRules = exports.NoCustomCssScope = exports.GENERATED_CODE_PATHS = exports.matchesAnyGlob = exports.isPathExcluded = exports.isWebpiecesStateDir = exports.ExcludePaths = exports.DESIGN_METADATA_KEYS = exports.isDocumentDesign = exports.DocumentDesign = exports.RulesConfigDesign = exports.atRoot = exports.CLAUDE_PROJECT_DIR_UNSET = exports.CLAUDE_PROJECT_DIR_ENV = exports.claudeEnv = exports.ClaudeEnv = exports.RETENTION_DAYS = exports.SweepCount = exports.AgedTreeSweeper = 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.runMain = exports.CliArgs = exports.CliArgsCheck = exports.CliArgSet = exports.CliFlag = exports.CliUsage = exports.CliExitError = exports.formatFixOptions = exports.Option = exports.renderRuleFailForHuman = exports.renderRuleFailForAi = exports.RuleFailError = exports.ResolvedRuleConfig = exports.ResolvedConfig = void 0;
|
|
4
4
|
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 = 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 = void 0;
|
|
5
|
-
exports.
|
|
6
|
-
exports.RoleTagConfig = exports.FrameworkTagConfig = 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_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.UPGRADE_SHIM_COMMAND = exports.PRUNE_UNKNOWN_COMMAND = exports.PUSH_DEV_STATE_FILE = exports.MERGE_EXPLANATION_FILE = exports.MERGE_IN_PROGRESS_FILE = exports.MERGE_INFO_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 =
|
|
7
|
-
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.API_DOC_MODES = exports.ApiRulesForOpenApiConfig = exports.ApiRulesForMcpConfig = exports.PROJECT_SCAN_MODES = exports.FrameworkTsconfigConfig = exports.FrameworkPackagesEntry = exports.FrameworkPackagesConfig = exports.FrameworkFolderEntry = exports.FrameworkFolderConfig = exports.ApiLibPathConfig = exports.ApiLibDependenciesConfig = exports.ApiClientPackagesEntry = exports.RequiredTypeSuffixEntry = exports.RequiredTypeSuffixConfig = exports.NoUtilityTypesInApiLibConfig = exports.OneEnumSpellingInApiLibConfig = exports.NoInlineImportInApiLibConfig = exports.NoRootUnionApiTypeConfig = exports.
|
|
8
|
-
exports.PROVENANCE_SKIPPED = exports.PROVENANCE_MISSING = exports.PROVENANCE_OK = exports.ProvenanceResult = exports.TranscriptScan = exports.ExpectedReviewer = 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.DEFAULT_REVIEWER_AGENT_NAME = exports.REVIEWER_AGENTS_PLACEHOLDER = exports.ReviewerAgentPolicy = 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 = 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.DEFAULT_MAX_COMMITS_BEHIND =
|
|
9
|
-
exports.
|
|
5
|
+
exports.SkipRuleResult = exports.HOTFIX_AUDIT_BANNER = exports.HOTFIX_BUILD_COMMAND = exports.shouldSkipRule = exports.sectionForRule = exports.isHookGuard = exports.PR_LIFECYCLE_GUARD_KEY = exports.BRANCH_STATE_GUARD_KEY = exports.HOOK_GUARD_NAMES = exports.RULE_SCHEMAS = 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.BuildTermination = 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 = void 0;
|
|
6
|
+
exports.EnsureWeAreSecureConfig = exports.RoleTagConfig = exports.FrameworkTagConfig = 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_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.UPGRADE_SHIM_COMMAND = exports.PRUNE_UNKNOWN_COMMAND = exports.PUSH_DEV_STATE_FILE = exports.MERGE_EXPLANATION_FILE = exports.MERGE_IN_PROGRESS_FILE = exports.MERGE_INFO_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 = void 0;
|
|
7
|
+
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.API_DOC_MODES = exports.ApiRulesForOpenApiConfig = exports.ApiRulesForMcpConfig = exports.PROJECT_SCAN_MODES = exports.FrameworkTsconfigConfig = exports.FrameworkPackagesEntry = exports.FrameworkPackagesConfig = exports.FrameworkFolderEntry = exports.FrameworkFolderConfig = exports.ApiLibPathConfig = exports.ApiLibDependenciesConfig = exports.ApiClientPackagesEntry = exports.RequiredTypeSuffixEntry = exports.RequiredTypeSuffixConfig = exports.NoUtilityTypesInApiLibConfig = exports.OneEnumSpellingInApiLibConfig = exports.NoInlineImportInApiLibConfig = exports.NoRootUnionApiTypeConfig = 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 = void 0;
|
|
8
|
+
exports.ReviewProvenance = exports.ReviewProvenanceService = exports.PROVENANCE_SKIPPED = exports.PROVENANCE_MISSING = exports.PROVENANCE_OK = exports.ProvenanceResult = exports.TranscriptScan = exports.ExpectedReviewer = 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.DEFAULT_REVIEWER_AGENT_NAME = exports.REVIEWER_AGENTS_PLACEHOLDER = exports.ReviewerAgentPolicy = 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 = 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.DEFAULT_MAX_COMMITS_BEHIND = void 0;
|
|
9
|
+
exports.RulePackModuleLoader = exports.RulePackDiscovery = exports.NodeRulePackModuleLoader = exports.RulePackRegistry = exports.TMP_SCRATCH_PREFIX = exports.TMP_SCRATCH_RETENTION_DAYS = exports.TmpScratchSweeper = exports.SCRATCH_DIR_NAME = exports.RepoScratchDirs = exports.staleBinSweeper = exports.StaleBinSweeper = exports.StaleBinRemoval = exports.DEFAULT_MERGE_COMPLETE_COMMAND = exports.DEFAULT_UPSERT_PR_COMMAND = exports.buildCommandsConfig = exports.CommandsConfig = exports.summaryJsonSchemaHint = exports.summaryJsonPath = exports.prDirFor = exports.ReviewJsonService = exports.ChecklistReviewContext = exports.RequiredChecklist = exports.VERDICT_STATUSES = exports.VERDICT_RED = exports.VERDICT_ORANGE = exports.VERDICT_YELLOW = exports.VERDICT_GREEN = exports.CK_BAD_FORMAT = exports.CK_MISSING = exports.CK_FAIL = exports.CK_ORANGE = exports.CK_ORANGE_FIXED = exports.CK_OVERRIDDEN = exports.CK_WARN = exports.CK_PASS = exports.checklistOverrideService = exports.ChecklistOverrideService = exports.ChecklistOverride = exports.ChecklistVerdict = exports.ChecklistResult = exports.PrContext = exports.PrSummary = exports.DEFAULT_RETENTION_DAYS = exports.ProvenanceWriteRequest = exports.OfferedContext = exports.ReviewerPaths = exports.ReviewerTranscript = void 0;
|
|
10
10
|
const tslib_1 = require("tslib");
|
|
11
11
|
var types_1 = require("./types");
|
|
12
12
|
Object.defineProperty(exports, "ResolvedConfig", { enumerable: true, get: function () { return types_1.ResolvedConfig; } });
|
|
@@ -234,8 +234,6 @@ Object.defineProperty(exports, "BRANCH_STATE_GUARD_KEY", { enumerable: true, get
|
|
|
234
234
|
Object.defineProperty(exports, "PR_LIFECYCLE_GUARD_KEY", { enumerable: true, get: function () { return sections_1.PR_LIFECYCLE_GUARD_KEY; } });
|
|
235
235
|
Object.defineProperty(exports, "isHookGuard", { enumerable: true, get: function () { return sections_1.isHookGuard; } });
|
|
236
236
|
Object.defineProperty(exports, "sectionForRule", { enumerable: true, get: function () { return sections_1.sectionForRule; } });
|
|
237
|
-
var field_def_1 = require("./field-def");
|
|
238
|
-
Object.defineProperty(exports, "FieldDef", { enumerable: true, get: function () { return field_def_1.FieldDef; } });
|
|
239
237
|
var skip_rule_1 = require("./skip-rule");
|
|
240
238
|
Object.defineProperty(exports, "shouldSkipRule", { enumerable: true, get: function () { return skip_rule_1.shouldSkipRule; } });
|
|
241
239
|
Object.defineProperty(exports, "HOTFIX_BUILD_COMMAND", { enumerable: true, get: function () { return skip_rule_1.HOTFIX_BUILD_COMMAND; } });
|
|
@@ -311,7 +309,6 @@ Object.defineProperty(exports, "ValidateNoArchitectureCyclesConfig", { enumerabl
|
|
|
311
309
|
Object.defineProperty(exports, "ValidatePackageJsonConfig", { enumerable: true, get: function () { return rule_configs_1.ValidatePackageJsonConfig; } });
|
|
312
310
|
Object.defineProperty(exports, "ValidateVersionsLockedConfig", { enumerable: true, get: function () { return rule_configs_1.ValidateVersionsLockedConfig; } });
|
|
313
311
|
Object.defineProperty(exports, "ValidateEslintSyncConfig", { enumerable: true, get: function () { return rule_configs_1.ValidateEslintSyncConfig; } });
|
|
314
|
-
Object.defineProperty(exports, "BaseRuleConfig", { enumerable: true, get: function () { return rule_configs_1.BaseRuleConfig; } });
|
|
315
312
|
var no_root_union_config_1 = require("./no-root-union-config");
|
|
316
313
|
Object.defineProperty(exports, "NoRootUnionApiTypeConfig", { enumerable: true, get: function () { return no_root_union_config_1.NoRootUnionApiTypeConfig; } });
|
|
317
314
|
var api_lib_spelling_configs_1 = require("./api-lib-spelling-configs");
|
|
@@ -461,9 +458,6 @@ var stale_bin_sweep_1 = require("./stale-bin-sweep");
|
|
|
461
458
|
Object.defineProperty(exports, "StaleBinRemoval", { enumerable: true, get: function () { return stale_bin_sweep_1.StaleBinRemoval; } });
|
|
462
459
|
Object.defineProperty(exports, "StaleBinSweeper", { enumerable: true, get: function () { return stale_bin_sweep_1.StaleBinSweeper; } });
|
|
463
460
|
Object.defineProperty(exports, "staleBinSweeper", { enumerable: true, get: function () { return stale_bin_sweep_1.staleBinSweeper; } });
|
|
464
|
-
var spec_temp_dirs_1 = require("./spec-temp-dirs");
|
|
465
|
-
Object.defineProperty(exports, "SpecTempDirs", { enumerable: true, get: function () { return spec_temp_dirs_1.SpecTempDirs; } });
|
|
466
|
-
Object.defineProperty(exports, "specTempDirs", { enumerable: true, get: function () { return spec_temp_dirs_1.specTempDirs; } });
|
|
467
461
|
var repo_scratch_dirs_1 = require("./repo-scratch-dirs");
|
|
468
462
|
Object.defineProperty(exports, "RepoScratchDirs", { enumerable: true, get: function () { return repo_scratch_dirs_1.RepoScratchDirs; } });
|
|
469
463
|
Object.defineProperty(exports, "SCRATCH_DIR_NAME", { enumerable: true, get: function () { return repo_scratch_dirs_1.SCRATCH_DIR_NAME; } });
|
|
@@ -473,4 +467,9 @@ Object.defineProperty(exports, "TMP_SCRATCH_RETENTION_DAYS", { enumerable: true,
|
|
|
473
467
|
Object.defineProperty(exports, "TMP_SCRATCH_PREFIX", { enumerable: true, get: function () { return tmp_scratch_sweep_1.TMP_SCRATCH_PREFIX; } });
|
|
474
468
|
tslib_1.__exportStar(require("./hook-fault-codes"), exports);
|
|
475
469
|
tslib_1.__exportStar(require("./hook-config-diagnostics"), exports);
|
|
470
|
+
var rule_pack_registry_1 = require("./rule-pack-registry");
|
|
471
|
+
Object.defineProperty(exports, "RulePackRegistry", { enumerable: true, get: function () { return rule_pack_registry_1.RulePackRegistry; } });
|
|
472
|
+
Object.defineProperty(exports, "NodeRulePackModuleLoader", { enumerable: true, get: function () { return rule_pack_registry_1.NodeRulePackModuleLoader; } });
|
|
473
|
+
Object.defineProperty(exports, "RulePackDiscovery", { enumerable: true, get: function () { return rule_pack_registry_1.RulePackDiscovery; } });
|
|
474
|
+
Object.defineProperty(exports, "RulePackModuleLoader", { enumerable: true, get: function () { return rule_pack_registry_1.RulePackModuleLoader; } });
|
|
476
475
|
//# sourceMappingURL=index.js.map
|
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;AAE3C,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;AAEhB,6CAA4E;AAAnE,8GA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GAAA,cAAc,OAAA;AACd,0GAAA,WAAW,OAAA;AACX,+GAAA,gBAAgB,OAAA;AAChB,gHAAA,iBAAiB,OAAA;AACjB,qHAAA,sBAAsB,OAAA;AACtB,gHAAA,iBAAiB,OAAA;AACjB,uGAAA,QAAQ,OAAA;AACR,8GAAA,eAAe,OAAA;AACf,oHAAA,qBAAqB,OAAA;AAczB,qDAK2B;AAJvB,iHAAA,cAAc,OAAA;AACd,sHAAA,mBAAmB,OAAA;AACnB,4HAAA,yBAAyB,OAAA;AACzB,iIAAA,8BAA8B,OAAA;AAElC,qDAAsF;AAA7E,kHAAA,eAAe,OAAA;AAAE,kHAAA,eAAe,OAAA;AAAE,kHAAA,eAAe,OAAA;AAC1D,mDAA8D;AAArD,8GAAA,YAAY,OAAA;AAAE,8GAAA,YAAY,OAAA;AACnC,yDAAwE;AAA/D,oHAAA,eAAe,OAAA;AAAE,qHAAA,gBAAgB,OAAA;AAC1C,yDAAwG;AAA/F,sHAAA,iBAAiB,OAAA;AAAE,+HAAA,0BAA0B,OAAA;AAAE,uHAAA,kBAAkB,OAAA;AAE1E,6DAAmC;AACnC,oEAA0C","sourcesContent":["export { ResolvedConfig, ResolvedRuleConfig, RuleOptions } from './types';\n\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';\n\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 {\n findConfigFile,\n CONFIG_FILENAME,\n ConfigFile,\n ConfigParseAttempt,\n CONFIG_PARSE_ATTEMPTS,\n CONFIG_PARSE_RETRY_MILLIS,\n} 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.\n\n\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 {\n ClaudeEnv,\n claudeEnv,\n CLAUDE_PROJECT_DIR_ENV,\n CLAUDE_PROJECT_DIR_UNSET,\n} from './claude-env';\n\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 {\n loadTemplate,\n writeTemplateIfMissing,\n writeTemplate,\n TemplateWriter,\n} 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 {\n GIT_WORKFLOW_DOC,\n GitWorkflowDoc,\n InstructAiDoc,\n InstructAiDocSet,\n MergeProcessDoc,\n} from './instruct-ai-docs';\nexport {\n MERGE_PROCESS_DOC,\n MergeProcessText,\n MergeRun,\n ReferenceMergeRun,\n} from './merge-process-doc';\nexport { BUILD_LOG_DOC } from './build-log-doc';\nexport {\n validateWebpiecesConfig,\n validatePrGateSection,\n validateChecklistsSection,\n validateSectionPlacement,\n validateExcludePaths,\n validateMatchRulesSection,\n allRuleNames,\n recommendedSeedMode,\n recommendedSeedModeFor,\n seedEntryForRule,\n} from './validate-config';\nexport { validateCommandsSection } from './commands-section-validators';\nexport {\n unknownKeyErrors,\n isCommentKey,\n validateTopLevelKeys,\n COMMENT_KEY_SUFFIX,\n} 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 {\n RETIRED_CONFIG_KEYS,\n RETIRED_SCOPE_KEY,\n RETIRED_SCOPE_RULE,\n RetiredConfigKey,\n isRetiredKey,\n retiredEntry,\n retiredKeyError,\n retiredKeyErrorsIn,\n retiredRuleFor,\n} 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,\n HomeConfigService,\n RetiredHomeConfigKey,\n RETIRED_HOME_CONFIG_KEYS,\n HOME_CONFIG_DIR,\n HOME_CONFIG_FILE,\n HOME_EXPERIMENTAL_SECTION,\n HOME_KEY_ORPHAN_DIR_SWEEP,\n HOME_KEY_WHOLE_REPO_BUILD_GUARD,\n HOME_KEY_MAX_CONCURRENT_BUILDS,\n HOME_KEY_TURN_OFF_ALL_REVIEWERS,\n DEFAULT_MAX_CONCURRENT_BUILDS,\n HOME_KEY_DOC,\n HOME_KEY_AI_DOC,\n 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,\n BuildTicket,\n BuildTermination,\n RunningBuild,\n BUILDS_LOG_FILE,\n BUILDS_LOCK_FILE,\n BUILD_START,\n BUILD_DONE_SUCCESS,\n BUILD_DONE_FAIL,\n MAX_BUILDS_LOG_BYTES,\n BUILDS_LOG_GENERATIONS,\n 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,\n ArchivedOrphan,\n FailedOrphan,\n OrphanSweepResult,\n OrphanSweepManifest,\n TRASH_STATE_DIR,\n TRASH_MANIFEST_FILE,\n 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, RULE_SCHEMAS } from './rule-schemas';\nexport {\n HOOK_GUARD_NAMES,\n BRANCH_STATE_GUARD_KEY,\n PR_LIFECYCLE_GUARD_KEY,\n isHookGuard,\n sectionForRule,\n} from './sections';\nexport { FieldDef } from './field-def';\nexport type { SchemaShape } from './field-def';\nexport { shouldSkipRule, HOTFIX_BUILD_COMMAND, HOTFIX_AUDIT_BANNER } 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 { WEBPIECES_DISABLE, RULE_NAMES, hasDisable, MERGE_INFO_DIR, MERGE_IN_PROGRESS_FILE, MERGE_EXPLANATION_FILE, PUSH_DEV_STATE_FILE, PRUNE_UNKNOWN_COMMAND, UPGRADE_SHIM_COMMAND } 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 EnsureWeAreSecureConfig,\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';\nexport { NoRootUnionApiTypeConfig } from './no-root-union-config';\nexport { NoInlineImportInApiLibConfig, OneEnumSpellingInApiLibConfig } from './api-lib-spelling-configs';\nexport { NoUtilityTypesInApiLibConfig } from './no-utility-types-config';\nexport { RequiredTypeSuffixConfig, RequiredTypeSuffixEntry } from './required-type-suffix-config';\nexport {\n ApiClientPackagesEntry,\n ApiLibDependenciesConfig,\n ApiLibPathConfig,\n FrameworkFolderConfig,\n FrameworkFolderEntry,\n FrameworkPackagesConfig,\n FrameworkPackagesEntry,\n FrameworkTsconfigConfig,\n PROJECT_SCAN_MODES,\n} from './tag-truth-configs';\nexport type { ProjectScanMode } from './tag-truth-configs';\nexport { ApiRulesForMcpConfig, ApiRulesForOpenApiConfig, API_DOC_MODES } from './api-doc-rules-config';\nexport type { ApiDocMode } from './api-doc-rules-config';\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 { BranchStateGuardConfig, DEFAULT_MAX_COMMITS_BEHIND } 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 ReviewerAgentPolicy,\n REVIEWER_AGENTS_PLACEHOLDER,\n DEFAULT_REVIEWER_AGENT_NAME,\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 ExpectedReviewer,\n TranscriptScan,\n ProvenanceResult,\n PROVENANCE_OK,\n PROVENANCE_MISSING,\n PROVENANCE_SKIPPED,\n} from './subagent-provenance';\n\n\nexport {\n ReviewProvenanceService,\n ReviewProvenance,\n ReviewerTranscript,\n ReviewerPaths,\n OfferedContext,\n ProvenanceWriteRequest,\n DEFAULT_RETENTION_DAYS,\n} from './review-provenance';\nexport {\n PrSummary,\n PrContext,\n ChecklistResult,\n ChecklistVerdict,\n ChecklistOverride,\n ChecklistOverrideService,\n checklistOverrideService,\n CK_PASS,\n CK_WARN,\n CK_OVERRIDDEN,\n CK_ORANGE_FIXED,\n CK_ORANGE,\n CK_FAIL,\n CK_MISSING,\n CK_BAD_FORMAT,\n VERDICT_GREEN,\n VERDICT_YELLOW,\n VERDICT_ORANGE,\n VERDICT_RED,\n VERDICT_STATUSES,\n RequiredChecklist,\n ChecklistReviewContext,\n ReviewJsonService,\n prDirFor,\n summaryJsonPath,\n summaryJsonSchemaHint,\n} from './review-json';\n\n\n\n\n\n\n\n\n\n\n\n\nexport {\n CommandsConfig,\n buildCommandsConfig,\n DEFAULT_UPSERT_PR_COMMAND,\n DEFAULT_MERGE_COMPLETE_COMMAND,\n} from './commands-config';\nexport { StaleBinRemoval, StaleBinSweeper, staleBinSweeper } from './stale-bin-sweep';\nexport { SpecTempDirs, specTempDirs } from './spec-temp-dirs';\nexport { RepoScratchDirs, SCRATCH_DIR_NAME } from './repo-scratch-dirs';\nexport { TmpScratchSweeper, TMP_SCRATCH_RETENTION_DAYS, TMP_SCRATCH_PREFIX } from './tmp-scratch-sweep';\n\nexport * from './hook-fault-codes';\nexport * from './hook-config-diagnostics';\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;AAE3C,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;AAEhB,6CAA4E;AAAnE,8GAAA,eAAe,OAAA;AAAE,2GAAA,YAAY,OAAA;AAAE,2GAAA,YAAY,OAAA;AACpD,iGAAiG;AACjG,sCAAsC;AACtC,6DAM+B;AAL3B,+HAAA,wBAAwB,OAAA;AACxB,wHAAA,iBAAiB,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;AAczB,qDAK2B;AAJvB,iHAAA,cAAc,OAAA;AACd,sHAAA,mBAAmB,OAAA;AACnB,4HAAA,yBAAyB,OAAA;AACzB,iIAAA,8BAA8B,OAAA;AAElC,qDAAsF;AAA7E,kHAAA,eAAe,OAAA;AAAE,kHAAA,eAAe,OAAA;AAAE,kHAAA,eAAe,OAAA;AAC1D,yDAAwE;AAA/D,oHAAA,eAAe,OAAA;AAAE,qHAAA,gBAAgB,OAAA;AAC1C,yDAAwG;AAA/F,sHAAA,iBAAiB,OAAA;AAAE,+HAAA,0BAA0B,OAAA;AAAE,uHAAA,kBAAkB,OAAA;AAE1E,6DAAmC;AACnC,oEAA0C;AAC1C,2DAA2H;AAAlH,sHAAA,gBAAgB,OAAA;AAAE,8HAAA,wBAAwB,OAAA;AAAE,uHAAA,iBAAiB,OAAA;AAAE,0HAAA,oBAAoB,OAAA","sourcesContent":["export { ResolvedConfig, ResolvedRuleConfig, RuleOptions } from './types';\n\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';\n\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 {\n findConfigFile,\n CONFIG_FILENAME,\n ConfigFile,\n ConfigParseAttempt,\n CONFIG_PARSE_ATTEMPTS,\n CONFIG_PARSE_RETRY_MILLIS,\n} 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.\n\n\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 {\n ClaudeEnv,\n claudeEnv,\n CLAUDE_PROJECT_DIR_ENV,\n CLAUDE_PROJECT_DIR_UNSET,\n} from './claude-env';\n\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 {\n loadTemplate,\n writeTemplateIfMissing,\n writeTemplate,\n TemplateWriter,\n} 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 {\n GIT_WORKFLOW_DOC,\n GitWorkflowDoc,\n InstructAiDoc,\n InstructAiDocSet,\n MergeProcessDoc,\n} from './instruct-ai-docs';\nexport {\n MERGE_PROCESS_DOC,\n MergeProcessText,\n MergeRun,\n ReferenceMergeRun,\n} from './merge-process-doc';\nexport { BUILD_LOG_DOC } from './build-log-doc';\nexport {\n validateWebpiecesConfig,\n validatePrGateSection,\n validateChecklistsSection,\n validateSectionPlacement,\n validateExcludePaths,\n validateMatchRulesSection,\n allRuleNames,\n recommendedSeedMode,\n recommendedSeedModeFor,\n seedEntryForRule,\n} from './validate-config';\nexport { validateCommandsSection } from './commands-section-validators';\nexport {\n unknownKeyErrors,\n isCommentKey,\n validateTopLevelKeys,\n COMMENT_KEY_SUFFIX,\n} 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 {\n RETIRED_CONFIG_KEYS,\n RETIRED_SCOPE_KEY,\n RETIRED_SCOPE_RULE,\n RetiredConfigKey,\n isRetiredKey,\n retiredEntry,\n retiredKeyError,\n retiredKeyErrorsIn,\n retiredRuleFor,\n} 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,\n HomeConfigService,\n RetiredHomeConfigKey,\n RETIRED_HOME_CONFIG_KEYS,\n HOME_CONFIG_DIR,\n HOME_CONFIG_FILE,\n HOME_EXPERIMENTAL_SECTION,\n HOME_KEY_ORPHAN_DIR_SWEEP,\n HOME_KEY_WHOLE_REPO_BUILD_GUARD,\n HOME_KEY_MAX_CONCURRENT_BUILDS,\n HOME_KEY_TURN_OFF_ALL_REVIEWERS,\n DEFAULT_MAX_CONCURRENT_BUILDS,\n HOME_KEY_DOC,\n HOME_KEY_AI_DOC,\n 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,\n BuildTicket,\n BuildTermination,\n RunningBuild,\n BUILDS_LOG_FILE,\n BUILDS_LOCK_FILE,\n BUILD_START,\n BUILD_DONE_SUCCESS,\n BUILD_DONE_FAIL,\n MAX_BUILDS_LOG_BYTES,\n BUILDS_LOG_GENERATIONS,\n 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,\n ArchivedOrphan,\n FailedOrphan,\n OrphanSweepResult,\n OrphanSweepManifest,\n TRASH_STATE_DIR,\n TRASH_MANIFEST_FILE,\n 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, RULE_SCHEMAS } from './rule-schemas';\nexport {\n HOOK_GUARD_NAMES,\n BRANCH_STATE_GUARD_KEY,\n PR_LIFECYCLE_GUARD_KEY,\n isHookGuard,\n sectionForRule,\n} from './sections';\nexport { shouldSkipRule, HOTFIX_BUILD_COMMAND, HOTFIX_AUDIT_BANNER } 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 { WEBPIECES_DISABLE, RULE_NAMES, hasDisable, MERGE_INFO_DIR, MERGE_IN_PROGRESS_FILE, MERGE_EXPLANATION_FILE, PUSH_DEV_STATE_FILE, PRUNE_UNKNOWN_COMMAND, UPGRADE_SHIM_COMMAND } 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 EnsureWeAreSecureConfig,\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} from './rule-configs';\nexport { NoRootUnionApiTypeConfig } from './no-root-union-config';\nexport { NoInlineImportInApiLibConfig, OneEnumSpellingInApiLibConfig } from './api-lib-spelling-configs';\nexport { NoUtilityTypesInApiLibConfig } from './no-utility-types-config';\nexport { RequiredTypeSuffixConfig, RequiredTypeSuffixEntry } from './required-type-suffix-config';\nexport {\n ApiClientPackagesEntry,\n ApiLibDependenciesConfig,\n ApiLibPathConfig,\n FrameworkFolderConfig,\n FrameworkFolderEntry,\n FrameworkPackagesConfig,\n FrameworkPackagesEntry,\n FrameworkTsconfigConfig,\n PROJECT_SCAN_MODES,\n} from './tag-truth-configs';\nexport type { ProjectScanMode } from './tag-truth-configs';\nexport { ApiRulesForMcpConfig, ApiRulesForOpenApiConfig, API_DOC_MODES } from './api-doc-rules-config';\nexport type { ApiDocMode } from './api-doc-rules-config';\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 { BranchStateGuardConfig, DEFAULT_MAX_COMMITS_BEHIND } 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 ReviewerAgentPolicy,\n REVIEWER_AGENTS_PLACEHOLDER,\n DEFAULT_REVIEWER_AGENT_NAME,\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 ExpectedReviewer,\n TranscriptScan,\n ProvenanceResult,\n PROVENANCE_OK,\n PROVENANCE_MISSING,\n PROVENANCE_SKIPPED,\n} from './subagent-provenance';\n\n\nexport {\n ReviewProvenanceService,\n ReviewProvenance,\n ReviewerTranscript,\n ReviewerPaths,\n OfferedContext,\n ProvenanceWriteRequest,\n DEFAULT_RETENTION_DAYS,\n} from './review-provenance';\nexport {\n PrSummary,\n PrContext,\n ChecklistResult,\n ChecklistVerdict,\n ChecklistOverride,\n ChecklistOverrideService,\n checklistOverrideService,\n CK_PASS,\n CK_WARN,\n CK_OVERRIDDEN,\n CK_ORANGE_FIXED,\n CK_ORANGE,\n CK_FAIL,\n CK_MISSING,\n CK_BAD_FORMAT,\n VERDICT_GREEN,\n VERDICT_YELLOW,\n VERDICT_ORANGE,\n VERDICT_RED,\n VERDICT_STATUSES,\n RequiredChecklist,\n ChecklistReviewContext,\n ReviewJsonService,\n prDirFor,\n summaryJsonPath,\n summaryJsonSchemaHint,\n} from './review-json';\n\n\n\n\n\n\n\n\n\n\n\n\nexport {\n CommandsConfig,\n buildCommandsConfig,\n DEFAULT_UPSERT_PR_COMMAND,\n DEFAULT_MERGE_COMPLETE_COMMAND,\n} from './commands-config';\nexport { StaleBinRemoval, StaleBinSweeper, staleBinSweeper } from './stale-bin-sweep';\nexport { RepoScratchDirs, SCRATCH_DIR_NAME } from './repo-scratch-dirs';\nexport { TmpScratchSweeper, TMP_SCRATCH_RETENTION_DAYS, TMP_SCRATCH_PREFIX } from './tmp-scratch-sweep';\n\nexport * from './hook-fault-codes';\nexport * from './hook-config-diagnostics';\nexport { RulePackRegistry, NodeRulePackModuleLoader, RulePackDiscovery, RulePackModuleLoader } from './rule-pack-registry';\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SchemaShape } from '
|
|
2
|
-
import {
|
|
1
|
+
import { SchemaShape, BaseRuleConfig } from '@webpieces/rules-sdk';
|
|
2
|
+
import { OnOffMode } from './rule-configs';
|
|
3
3
|
export declare const DEFAULT_MAX_COMMITS_BEHIND = 5;
|
|
4
4
|
/**
|
|
5
5
|
* `branch-state-guard` — ONE key, ONE policy: *may I work here, and is what I read current?*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.BranchStateGuardConfig = exports.DEFAULT_MAX_COMMITS_BEHIND = void 0;
|
|
4
|
-
const
|
|
4
|
+
const rules_sdk_1 = require("@webpieces/rules-sdk");
|
|
5
5
|
const rule_configs_1 = require("./rule-configs");
|
|
6
6
|
exports.DEFAULT_MAX_COMMITS_BEHIND = 5;
|
|
7
7
|
/**
|
|
@@ -32,7 +32,7 @@ exports.DEFAULT_MAX_COMMITS_BEHIND = 5;
|
|
|
32
32
|
* the guards, so at most one of the four values could ever reach a spawn. Four knobs, one honoured; now
|
|
33
33
|
* one knob, honoured everywhere (runner + hook-core route through this entry too).
|
|
34
34
|
*/
|
|
35
|
-
class BranchStateGuardConfig extends
|
|
35
|
+
class BranchStateGuardConfig extends rules_sdk_1.BaseRuleConfig {
|
|
36
36
|
// Surfaced verbatim in the on-main block's message, so a project's own convention is what the agent
|
|
37
37
|
// is told to follow. Consumed by FeatureBranchGuardRule.onMainMessage.
|
|
38
38
|
branchNamingConvention;
|
|
@@ -43,11 +43,11 @@ class BranchStateGuardConfig extends rule_configs_1.BaseRuleConfig {
|
|
|
43
43
|
// carries the policy; 5 means 0..5 are allowed and stale-main blocks starting at 6.
|
|
44
44
|
maxCommitsBehind;
|
|
45
45
|
static SCHEMA = {
|
|
46
|
-
mode: new
|
|
47
|
-
branchNamingConvention:
|
|
48
|
-
hangTimeoutMinutes:
|
|
49
|
-
maxCommitsBehind: new
|
|
50
|
-
...
|
|
46
|
+
mode: new rules_sdk_1.FieldDef('string', rule_configs_1.ON_OFF_MODES),
|
|
47
|
+
branchNamingConvention: rules_sdk_1.FieldDef.optional('string'),
|
|
48
|
+
hangTimeoutMinutes: rules_sdk_1.FieldDef.optional('number'),
|
|
49
|
+
maxCommitsBehind: new rules_sdk_1.FieldDef('number'),
|
|
50
|
+
...rules_sdk_1.BASE_RULE_SCHEMA,
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
53
|
exports.BranchStateGuardConfig = BranchStateGuardConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main-sync-guard-configs.js","sourceRoot":"","sources":["../../../../../packages/tooling/rules-config/src/main-sync-guard-configs.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"main-sync-guard-configs.js","sourceRoot":"","sources":["../../../../../packages/tooling/rules-config/src/main-sync-guard-configs.ts"],"names":[],"mappings":";;;AAAA,oDAA+F;AAE/F,iDAAyD;AAE5C,QAAA,0BAA0B,GAAG,CAAC,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAa,sBAAuB,SAAQ,0BAAc;IAEtD,oGAAoG;IACpG,uEAAuE;IACvE,sBAAsB,CAAU;IAChC,oGAAoG;IACpG,wEAAwE;IACxE,kBAAkB,CAAU;IAC5B,6FAA6F;IAC7F,oFAAoF;IACpF,gBAAgB,CAAU;IAE1B,MAAM,CAAU,MAAM,GAAwC;QAC1D,IAAI,EAAE,IAAI,oBAAQ,CAAC,QAAQ,EAAE,2BAAY,CAAC;QAC1C,sBAAsB,EAAE,oBAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC;QACnD,kBAAkB,EAAE,oBAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC;QAC/C,gBAAgB,EAAE,IAAI,oBAAQ,CAAC,QAAQ,CAAC;QACxC,GAAG,4BAAgB;KACtB,CAAC;;AAlBN,wDAmBC","sourcesContent":["import { FieldDef, SchemaShape, BaseRuleConfig, BASE_RULE_SCHEMA } from '@webpieces/rules-sdk';\n\nimport { OnOffMode, ON_OFF_MODES } from './rule-configs';\n\nexport const DEFAULT_MAX_COMMITS_BEHIND = 5;\n\n/**\n * `branch-state-guard` — ONE key, ONE policy: *may I work here, and is what I read current?*\n *\n * Four CLASSES implement it, because the tool wiring genuinely differs (a Read names one file, a Bash\n * command is opaque, and the two Bash halves are not De Morgan duals of each other — see\n * guards/L2-branch-state.md, \"Deliberate divergence\"):\n *\n * | on stale `main` (state A) | on an already-merged branch (state B)\n * Write/Edit | feature-branch-guard | feature-branch-guard\n * Read | read-stale-guard | read-stale-guard\n * Bash | stale-main-bash-guard | merged-branch-bash-guard\n *\n * Those four class NAMES are unchanged and still appear in every decision-log line as `rule=`, so\n * `grep rule=stale-main-bash-guard` over `.webpieces/logs/L2-decisions` keeps working. What merged is\n * the SWITCH: all four read this one config entry (`AbstractRule.configKey`).\n *\n * ## Why one key and not four\n *\n * Four keys made **half a policy representable**: `read-stale-guard: OFF` beside\n * `merged-branch-bash-guard: ON` is \"read the file, yes; `cat` the same file, no\" — the same\n * information, opposite verdicts. Nobody chose that; it was reachable because the config had a knob\n * per class instead of a knob per decision. One key makes it unconstructible.\n *\n * And `hangTimeoutMinutes` was declared four times, read four times, and fed ONE shared refresher for\n * ONE shared cache — with a per-process latch (main-sync-refresh.ts) plus config-blind callers ahead of\n * the guards, so at most one of the four values could ever reach a spawn. Four knobs, one honoured; now\n * one knob, honoured everywhere (runner + hook-core route through this entry too).\n */\nexport class BranchStateGuardConfig extends BaseRuleConfig {\n declare mode?: OnOffMode;\n // Surfaced verbatim in the on-main block's message, so a project's own convention is what the agent\n // is told to follow. Consumed by FeatureBranchGuardRule.onMainMessage.\n branchNamingConvention?: string;\n // Tunes the DETACHED refresher's stale-lock reclaim window (main-sync.lock.json). One value for one\n // refresher writing one cache — which is what it always physically was.\n hangTimeoutMinutes?: number;\n // Maximum cached commit distance tolerated on local main. Required so every repo consciously\n // carries the policy; 5 means 0..5 are allowed and stale-main blocks starting at 6.\n maxCommitsBehind!: number;\n\n static readonly SCHEMA: SchemaShape<BranchStateGuardConfig> = {\n mode: new FieldDef('string', ON_OFF_MODES),\n branchNamingConvention: FieldDef.optional('string'),\n hangTimeoutMinutes: FieldDef.optional('number'),\n maxCommitsBehind: new FieldDef('number'),\n ...BASE_RULE_SCHEMA,\n };\n}\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { BaseRuleConfig
|
|
1
|
+
import { BaseRuleConfig } from '@webpieces/rules-sdk';
|
|
2
|
+
import { ModifiedCodeMode } from './rule-configs';
|
|
2
3
|
/**
|
|
3
4
|
* One entry of the `match-rules` array. Extends BaseRuleConfig so AbstractRule.shouldRun()
|
|
4
5
|
* (OFF / epoch / branch escape hatches) works per entry. `name` doubles as the
|
|
@@ -5,7 +5,7 @@ exports.isMatchRuleAllowedPath = isMatchRuleAllowedPath;
|
|
|
5
5
|
exports.compileMatchRulePatterns = compileMatchRulePatterns;
|
|
6
6
|
exports.findMatchRuleViolations = findMatchRuleViolations;
|
|
7
7
|
exports.renderMatchRuleMessage = renderMatchRuleMessage;
|
|
8
|
-
const
|
|
8
|
+
const rules_sdk_1 = require("@webpieces/rules-sdk");
|
|
9
9
|
const constants_1 = require("./constants");
|
|
10
10
|
// ---------------------------------------------------------------------------
|
|
11
11
|
// match-rules — a generic, client-configurable content-guard engine.
|
|
@@ -26,7 +26,7 @@ const constants_1 = require("./constants");
|
|
|
26
26
|
* (OFF / epoch / branch escape hatches) works per entry. `name` doubles as the
|
|
27
27
|
* `// webpieces-disable <name> -- <reason>` token and the report label.
|
|
28
28
|
*/
|
|
29
|
-
class MatchRuleConfig extends
|
|
29
|
+
class MatchRuleConfig extends rules_sdk_1.BaseRuleConfig {
|
|
30
30
|
name;
|
|
31
31
|
patterns;
|
|
32
32
|
mainMessage;
|