@beehexa/hexasync-template-validate 2608.7.4 → 2608.15.1
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/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/validate/agentAnswers.d.ts +48 -0
- package/dist/validate/agentAnswers.d.ts.map +1 -0
- package/dist/validate/agentAnswers.js +84 -0
- package/dist/validate/agentAnswers.js.map +1 -0
- package/dist/validate/agentTools.d.ts +37 -0
- package/dist/validate/agentTools.d.ts.map +1 -0
- package/dist/validate/agentTools.js +141 -0
- package/dist/validate/agentTools.js.map +1 -0
- package/dist/validate/context.d.ts +11 -0
- package/dist/validate/context.d.ts.map +1 -1
- package/dist/validate/context.js +5 -0
- package/dist/validate/context.js.map +1 -1
- package/dist/validate/contextFromGraph.d.ts +8 -0
- package/dist/validate/contextFromGraph.d.ts.map +1 -1
- package/dist/validate/contextFromGraph.js +4 -0
- package/dist/validate/contextFromGraph.js.map +1 -1
- package/dist/validate/harvestPullerTaskIds.d.ts.map +1 -1
- package/dist/validate/harvestPullerTaskIds.js +1 -0
- package/dist/validate/harvestPullerTaskIds.js.map +1 -1
- package/dist/validate/model.d.ts.map +1 -1
- package/dist/validate/model.js +5 -0
- package/dist/validate/model.js.map +1 -1
- package/dist/validate/registry.d.ts +4 -0
- package/dist/validate/registry.d.ts.map +1 -1
- package/dist/validate/registry.js +43 -0
- package/dist/validate/registry.js.map +1 -1
- package/dist/validate/retrieve.d.ts +125 -0
- package/dist/validate/retrieve.d.ts.map +1 -0
- package/dist/validate/retrieve.js +272 -0
- package/dist/validate/retrieve.js.map +1 -0
- package/dist/validate/ruleCatalog.d.ts.map +1 -1
- package/dist/validate/ruleCatalog.js +218 -8
- package/dist/validate/ruleCatalog.js.map +1 -1
- package/dist/validate/rules/apiShape.d.ts +51 -0
- package/dist/validate/rules/apiShape.d.ts.map +1 -0
- package/dist/validate/rules/apiShape.js +150 -0
- package/dist/validate/rules/apiShape.js.map +1 -0
- package/dist/validate/rules/arguments.d.ts +3 -0
- package/dist/validate/rules/arguments.d.ts.map +1 -0
- package/dist/validate/rules/arguments.js +301 -0
- package/dist/validate/rules/arguments.js.map +1 -0
- package/dist/validate/rules/connectorIdentity.d.ts +3 -0
- package/dist/validate/rules/connectorIdentity.d.ts.map +1 -0
- package/dist/validate/rules/connectorIdentity.js +347 -0
- package/dist/validate/rules/connectorIdentity.js.map +1 -0
- package/dist/validate/rules/context.d.ts +42 -0
- package/dist/validate/rules/context.d.ts.map +1 -0
- package/dist/validate/rules/context.js +92 -0
- package/dist/validate/rules/context.js.map +1 -0
- package/dist/validate/rules/duplicates.d.ts +6 -2
- package/dist/validate/rules/duplicates.d.ts.map +1 -1
- package/dist/validate/rules/duplicates.js +19 -3
- package/dist/validate/rules/duplicates.js.map +1 -1
- package/dist/validate/rules/flow.d.ts +20 -4
- package/dist/validate/rules/flow.d.ts.map +1 -1
- package/dist/validate/rules/flow.js +164 -9
- package/dist/validate/rules/flow.js.map +1 -1
- package/dist/validate/rules/pullerKind.d.ts.map +1 -1
- package/dist/validate/rules/pullerKind.js +10 -1
- package/dist/validate/rules/pullerKind.js.map +1 -1
- package/dist/validate/rules/reference.d.ts.map +1 -1
- package/dist/validate/rules/reference.js +38 -3
- package/dist/validate/rules/reference.js.map +1 -1
- package/dist/validate/rules/referenceKind.d.ts.map +1 -1
- package/dist/validate/rules/referenceKind.js +8 -3
- package/dist/validate/rules/referenceKind.js.map +1 -1
- package/dist/validate/rules/retiredType.d.ts +8 -1
- package/dist/validate/rules/retiredType.d.ts.map +1 -1
- package/dist/validate/rules/retiredType.js +9 -2
- package/dist/validate/rules/retiredType.js.map +1 -1
- package/dist/validate/rules/stepData.d.ts +122 -0
- package/dist/validate/rules/stepData.d.ts.map +1 -0
- package/dist/validate/rules/stepData.js +249 -0
- package/dist/validate/rules/stepData.js.map +1 -0
- package/dist/validate/rules/stepIterations.d.ts +49 -0
- package/dist/validate/rules/stepIterations.d.ts.map +1 -0
- package/dist/validate/rules/stepIterations.js +156 -0
- package/dist/validate/rules/stepIterations.js.map +1 -0
- package/package.json +6 -5
|
@@ -4,11 +4,17 @@ import { duplicatesRule } from './rules/duplicates.js';
|
|
|
4
4
|
import { tableRule } from './rules/tables.js';
|
|
5
5
|
import { variablesRule } from './rules/variables.js';
|
|
6
6
|
import { flowRule } from './rules/flow.js';
|
|
7
|
+
import { stepDataRule } from './rules/stepData.js';
|
|
7
8
|
import { variableDriftRule } from './rules/variableDrift.js';
|
|
8
9
|
import { overwriteLossRule } from './rules/overwriteLoss.js';
|
|
9
10
|
import { dependencyCycleRule, dependencyColumnRule, } from './rules/dependencyIntegrity.js';
|
|
10
11
|
import { pullerKindRule } from './rules/pullerKind.js';
|
|
11
12
|
import { retiredTypeRule } from './rules/retiredType.js';
|
|
13
|
+
import { connectorIdentityRule } from './rules/connectorIdentity.js';
|
|
14
|
+
import { argumentsRule } from './rules/arguments.js';
|
|
15
|
+
import { contextRule } from './rules/context.js';
|
|
16
|
+
import { stepIterationsRule } from './rules/stepIterations.js';
|
|
17
|
+
import { apiShapeRule } from './rules/apiShape.js';
|
|
12
18
|
/**
|
|
13
19
|
* The enabled rule catalog. Adding a rule (family) = one entry here. REF (Story 1.2)
|
|
14
20
|
* is registered; DUP (1.4) and TBL/VAR/FLOW (Epic 2) append as they land.
|
|
@@ -16,8 +22,14 @@ import { retiredTypeRule } from './rules/retiredType.js';
|
|
|
16
22
|
* Epic 7 new-kind puller rules ride their existing family rule objects (no new entries):
|
|
17
23
|
* REF-16 is emitted by `referenceRule`, and FLOW-7 (plus the refined FLOW-3/4/5) by
|
|
18
24
|
* `flowRule` — both already in this array; their catalog docs live in ruleCatalog.ts.
|
|
25
|
+
*
|
|
26
|
+
* FLOW-8 (Story 5.7 AC-3, the dangling `_outputs` read) rides `flowRule` the same way. ⚠️ Measured before it was
|
|
27
|
+
* written: **no corpus file contains `_outputs.`**, so it fires on nothing today and is a guard for a capability as
|
|
28
|
+
* it is adopted rather than a report on one in use. Worth knowing before concluding it is broken.
|
|
19
29
|
*/
|
|
20
30
|
export const VALIDATION_RULES = [
|
|
31
|
+
// Story 5.12 — one step's own `data`, so the editor and the report reach the same verdict.
|
|
32
|
+
stepDataRule,
|
|
21
33
|
referenceRule,
|
|
22
34
|
// The GENERAL reference check, beside the structure-specific one. `referenceRule` knows the shapes
|
|
23
35
|
// the corpus uses; this one knows the registry, so a reference property added to the registry is
|
|
@@ -35,6 +47,37 @@ export const VALIDATION_RULES = [
|
|
|
35
47
|
// Story 1.10: retired component types. ONE entry, which is FR-107's claim rather than a restatement of it —
|
|
36
48
|
// the editor runs this same registry, so the rule reaches the Problems panel with no extension change.
|
|
37
49
|
retiredTypeRule,
|
|
50
|
+
// Story 2.1 (FR-9): the CONN family. ONE entry — the editor's Problems panel and the composition report both
|
|
51
|
+
// run this registry, so a rule reaches both with no change in either (NFR-1). An MCP server would too, when
|
|
52
|
+
// Epic 6 builds one; it does not exist yet, and this comment used to assert that it did.
|
|
53
|
+
connectorIdentityRule,
|
|
54
|
+
// Epic TA7 (FR14 / AD-28): transform `arguments` correctness — undeclared/select ARG operand, unknown/reserved
|
|
55
|
+
// key, duplicate/unused arg. ONE entry; the editor runs this registry, so the ARG family reaches the Problems
|
|
56
|
+
// panel with no extension change. Advisory (warnings + a few errors), never fails a compose.
|
|
57
|
+
argumentsRule,
|
|
58
|
+
/**
|
|
59
|
+
* Story 8.13: the CTX family. ONE entry, and it is the whole story — Story 8.6 had already built, measured and
|
|
60
|
+
* tested these checks, but nothing imported them, so 94 corpus findings reached no author on any surface.
|
|
61
|
+
*
|
|
62
|
+
* ⚠️ **Registering here does NOT reach the Problems panel today**, unlike the sibling comments above, which say it
|
|
63
|
+
* does. The extension pins PUBLISHED `@beehexa/*` and its `diagnostics.ts` runs that copy of `runValidation`, so a
|
|
64
|
+
* rule added here reaches the composition report immediately and the editor only when the pin moves. The Epic 8
|
|
65
|
+
* review found this claim repeated in three comments in this file; it is corrected here rather than in all of
|
|
66
|
+
* them, because the accurate version belongs next to the newest entry where someone will read it.
|
|
67
|
+
*/
|
|
68
|
+
contextRule,
|
|
69
|
+
/**
|
|
70
|
+
* Epic 9: the per-step runaway guard `maxStepIterations`, carried from core.api's `ResolvePerStepCap`. ONE entry;
|
|
71
|
+
* the editor's Problems panel and the composition report both run this registry, so the rule reaches both from one
|
|
72
|
+
* computation rather than an extension-only diagnostic — which is Epic 8's lesson applied rather than restated.
|
|
73
|
+
*/
|
|
74
|
+
stepIterationsRule,
|
|
75
|
+
/**
|
|
76
|
+
* Epic 10: the API family. An `API` step's fields are decided by the request builder its `type` selects, not by a
|
|
77
|
+
* fixed HTTP shape — so this rule reads `ServiceInstaller.cs`'s keyed `REQUEST_BUILDER/{id}` registrations and
|
|
78
|
+
* judges each step against the builder it will actually get.
|
|
79
|
+
*/
|
|
80
|
+
apiShapeRule,
|
|
38
81
|
];
|
|
39
82
|
/**
|
|
40
83
|
* Run every rule and aggregate the issues. Advisory and non-blocking: a rule that
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/validate/registry.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EACL,mBAAmB,EACnB,oBAAoB,GACrB,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FAAyF;IACzF,iBAAiB;IACjB,cAAc;IACd,SAAS;IACT,aAAa;IACb,QAAQ;IACR,iBAAiB;IACjB,iBAAiB;IACjB,mBAAmB;IACnB,oBAAoB;IACpB,cAAc;IACd,4GAA4G;IAC5G,uGAAuG;IACvG,eAAe;IACf,6GAA6G;IAC7G,4GAA4G;IAC5G,yFAAyF;IACzF,qBAAqB;IACrB,+GAA+G;IAC/G,8GAA8G;IAC9G,6FAA6F;IAC7F,aAAa;IACb;;;;;;;;;OASG;IACH,WAAW;IACX;;;;OAIG;IACH,kBAAkB;IAClB;;;;OAIG;IACH,YAAY;CACb,CAAC;AAEF;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAC3B,GAAsB,EACtB,QAA0B,gBAAgB;IAE1C,MAAM,MAAM,GAAsB,EAAE,CAAC;IACrC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,CAAC;YACH,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;QAChC,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,6EAA6E;YAC7E,uDAAuD;YACvD,OAAO,CAAC,IAAI,CAAC,oBAAoB,IAAI,CAAC,EAAE,aAAa,CAAC,EAAE,CAAC,CAAC;QAC5D,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import type { ValidationIssue } from '@beehexa/hexasync-template-report-model';
|
|
2
|
+
/** How much of an answer the caller wants. `full` is opt-in, and there is no middle. */
|
|
3
|
+
export interface RetrieveOptions {
|
|
4
|
+
readonly full?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface RuleAnswer {
|
|
7
|
+
readonly id: string;
|
|
8
|
+
readonly title: string;
|
|
9
|
+
/** False when no such rule exists — what a caller gates its exit code on. */
|
|
10
|
+
readonly found: boolean;
|
|
11
|
+
/** The bounded body: what it is, and what it costs. */
|
|
12
|
+
readonly text: string;
|
|
13
|
+
/** Set when the answer was shortened, naming how to get the rest. NEVER a silent truncation. */
|
|
14
|
+
readonly more?: string;
|
|
15
|
+
/** Every rule id, when the one asked for does not exist — so a typo is recoverable. */
|
|
16
|
+
readonly didYouMean?: readonly string[];
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* One rule, explained.
|
|
20
|
+
*
|
|
21
|
+
* An unknown id answers with the family's real ids rather than nothing: an agent that asked for `REF-99` needs to learn
|
|
22
|
+
* that `REF-9` exists, and "no such rule" alone sends it to guess again.
|
|
23
|
+
*/
|
|
24
|
+
export declare function explainRule(id: string, options?: RetrieveOptions): RuleAnswer;
|
|
25
|
+
/**
|
|
26
|
+
* Only the findings that touch the files the caller named (AC-3).
|
|
27
|
+
*
|
|
28
|
+
* ### Why an agent in a fix loop needs this
|
|
29
|
+
*
|
|
30
|
+
* It changed three files and wants to know whether it broke them. A report over the whole project answers a different
|
|
31
|
+
* question, and the honest failure mode is subtle: the agent reads a pre-existing finding as its own damage, "fixes"
|
|
32
|
+
* something it did not break, and now has two problems.
|
|
33
|
+
*
|
|
34
|
+
* ⚠️ Matching is by SUFFIX, so a caller may name `partials/Puller.yaml` or an absolute path and get the same answer. A
|
|
35
|
+
* finding with **no** `sourceFile` is kept: it is project-wide, so it belongs to every set of changed files rather than
|
|
36
|
+
* to none — dropping it would let an agent believe its change was clean when a project-level rule fired.
|
|
37
|
+
*/
|
|
38
|
+
export declare function findingsTouching(issues: readonly ValidationIssue[], files: readonly string[]): readonly ValidationIssue[];
|
|
39
|
+
/**
|
|
40
|
+
* The other four subjects AC-1 names — a type, a connector, an example set and a flow (Story 6.5).
|
|
41
|
+
*
|
|
42
|
+
* ⛔ These were missing, and the story claimed AC-1 met with rule retrieval alone. The evidence for leaving them out
|
|
43
|
+
* did not survive checking: Story **7.3**'s AC-1 names the same five subjects — *"list connectors, search examples,
|
|
44
|
+
* explain a rule, describe a type or validate a project"* — as **MCP tools**, and 7.2 makes a guide and a flow
|
|
45
|
+
* addressable. The epic list states dependencies run strictly forward and that no epic requires a later one to
|
|
46
|
+
* function, so Epic 7 *wraps* these; it cannot be where they are built.
|
|
47
|
+
*
|
|
48
|
+
* Each takes its data as an argument. The schemas, the connector catalog and the example index are shipped by the
|
|
49
|
+
* extension and installed by `hexasync intellisense install`, so a pure function that is handed what it needs works for
|
|
50
|
+
* the CLI, the editor and an MCP server alike — one computation per question.
|
|
51
|
+
*/
|
|
52
|
+
/** Anything with a bounded answer. Same shape for every subject, so a caller renders them identically. */
|
|
53
|
+
export interface SubjectAnswer {
|
|
54
|
+
readonly id: string;
|
|
55
|
+
readonly title: string;
|
|
56
|
+
readonly text: string;
|
|
57
|
+
readonly found: boolean;
|
|
58
|
+
readonly more?: string;
|
|
59
|
+
readonly didYouMean?: readonly string[];
|
|
60
|
+
}
|
|
61
|
+
/** What a step, transformation or validation type accepts. `types` is `name → description`. */
|
|
62
|
+
export declare function explainType(name: string, types: ReadonlyMap<string, string>, options?: RetrieveOptions): SubjectAnswer;
|
|
63
|
+
/** One connector, from the shipped catalog. Unsupported systems are named as unsupported, never as absent. */
|
|
64
|
+
export declare function explainConnector(code: string, catalog: readonly {
|
|
65
|
+
systemCode?: string;
|
|
66
|
+
name?: string;
|
|
67
|
+
systemId?: string;
|
|
68
|
+
generation?: unknown;
|
|
69
|
+
status?: string;
|
|
70
|
+
}[], options?: RetrieveOptions): SubjectAnswer;
|
|
71
|
+
/** Examples matching a facet query, bounded to a page. `index` is the shipped example index's entries. */
|
|
72
|
+
export declare function searchExamples(query: {
|
|
73
|
+
readonly kind?: string;
|
|
74
|
+
readonly feature?: string;
|
|
75
|
+
readonly connector?: string;
|
|
76
|
+
readonly entity?: string;
|
|
77
|
+
}, index: readonly {
|
|
78
|
+
id: string;
|
|
79
|
+
kind: string;
|
|
80
|
+
features: string[];
|
|
81
|
+
connectors: string[];
|
|
82
|
+
entities?: string[];
|
|
83
|
+
summary: string;
|
|
84
|
+
}[], options?: RetrieveOptions): SubjectAnswer;
|
|
85
|
+
/** A component's flow, in the order it runs. `stages` is `stage label → step keys`. */
|
|
86
|
+
export declare function explainFlow(componentId: string, stages: readonly {
|
|
87
|
+
readonly label: string;
|
|
88
|
+
readonly steps: readonly string[];
|
|
89
|
+
}[], options?: RetrieveOptions): SubjectAnswer;
|
|
90
|
+
/**
|
|
91
|
+
* Story 8.9 — an agent asks what a POSITION allows, and gets the environment as data.
|
|
92
|
+
*
|
|
93
|
+
* ⛔ *"An agent stops inferring the alphabet from examples and getting the prefix wrong"* is the whole point. The
|
|
94
|
+
* five positions are indistinguishable in a file, and the two that look most alike behave most differently:
|
|
95
|
+
* `{{ item.sku }}` is right in a pusher step and silently wrong in a transformation.
|
|
96
|
+
*
|
|
97
|
+
* ⚠️ An UNKNOWN shape is documented as a prompt to ask or to read a hint — **never as licence to invent a field**.
|
|
98
|
+
* That distinction is the difference between an agent that says "the payload's shape is not declared here, paste one
|
|
99
|
+
* and I will write a hint" and one that confidently writes `item.customer.first_name` because it seemed likely.
|
|
100
|
+
*/
|
|
101
|
+
export interface PositionAnswer {
|
|
102
|
+
readonly position: string;
|
|
103
|
+
readonly note: string;
|
|
104
|
+
readonly roots: readonly {
|
|
105
|
+
readonly name: string;
|
|
106
|
+
readonly kind: string;
|
|
107
|
+
readonly from: string;
|
|
108
|
+
readonly unknownBecause?: string;
|
|
109
|
+
}[];
|
|
110
|
+
}
|
|
111
|
+
export declare function positionAnswer(environment: {
|
|
112
|
+
position: string;
|
|
113
|
+
note: string;
|
|
114
|
+
roots: ReadonlyMap<string, {
|
|
115
|
+
name: string;
|
|
116
|
+
shape: {
|
|
117
|
+
kind: string;
|
|
118
|
+
reason?: string;
|
|
119
|
+
};
|
|
120
|
+
provenance: {
|
|
121
|
+
kind: string;
|
|
122
|
+
};
|
|
123
|
+
}>;
|
|
124
|
+
}): PositionAnswer;
|
|
125
|
+
//# sourceMappingURL=retrieve.d.ts.map
|
|
@@ -0,0 +1 @@
|
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GAC5B,aAAa,CA6Bf;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,SAAS;QACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;KAClC,EAAE,CAAC;CACL;AAED,wBAAgB,cAAc,CAAC,WAAW,EAAE;IAC1C,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,WAAW,CAChB,MAAM,EACN;QACE,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,MAAM,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;QACzC,UAAU,EAAE;YAAE,IAAI,EAAE,MAAM,CAAA;SAAE,CAAC;KAC9B,CACF,CAAC;CACH,GAAG,cAAc,CAajB"}
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bounded retrieval — one rule, one type, one connector, at a time (Story 6.5).
|
|
3
|
+
*
|
|
4
|
+
* ### Why BOUNDED is the default (PB-2)
|
|
5
|
+
*
|
|
6
|
+
* An agent asking "what is REF-9?" and receiving the rulebook has been answered badly twice over: it pays for context
|
|
7
|
+
* it did not ask for, and the answer it needed is now buried in the answer it did not. So every answer here is short by
|
|
8
|
+
* default and says how to ask for the rest — an explicit `full: true`, never a silent truncation, because an answer
|
|
9
|
+
* that was quietly cut is worse than a long one.
|
|
10
|
+
*
|
|
11
|
+
* ### Why this lives beside the rules
|
|
12
|
+
*
|
|
13
|
+
* The catalog is the authority for what a rule means. A retrieval layer in another package would be a second place that
|
|
14
|
+
* knows, which is the failure this epic's facade exists to prevent — so retrieval sits with what it retrieves and adds
|
|
15
|
+
* no knowledge of its own.
|
|
16
|
+
*/
|
|
17
|
+
import { RULE_CATALOG } from './ruleCatalog.js';
|
|
18
|
+
const FAMILY_OF = (id) => id.split('-')[0] ?? id;
|
|
19
|
+
/**
|
|
20
|
+
* One rule, explained.
|
|
21
|
+
*
|
|
22
|
+
* An unknown id answers with the family's real ids rather than nothing: an agent that asked for `REF-99` needs to learn
|
|
23
|
+
* that `REF-9` exists, and "no such rule" alone sends it to guess again.
|
|
24
|
+
*/
|
|
25
|
+
export function explainRule(id, options = {}) {
|
|
26
|
+
const catalog = RULE_CATALOG;
|
|
27
|
+
/**
|
|
28
|
+
* ⚠️ `Object.hasOwn`, not a bare lookup. `explainRule('constructor')` returned `{title: 'constructor', text: ''}` —
|
|
29
|
+
* an invented rule from the prototype chain, through the very library API the facade re-exports.
|
|
30
|
+
*/
|
|
31
|
+
const entry = Object.hasOwn(catalog, id) ? catalog[id] : undefined;
|
|
32
|
+
if (!entry) {
|
|
33
|
+
const family = FAMILY_OF(id);
|
|
34
|
+
const siblings = Object.keys(catalog)
|
|
35
|
+
.filter((known) => FAMILY_OF(known) === family)
|
|
36
|
+
.sort();
|
|
37
|
+
return {
|
|
38
|
+
id,
|
|
39
|
+
found: false,
|
|
40
|
+
title: `No rule ${id}`,
|
|
41
|
+
text: `There is no rule \`${id}\`. ` +
|
|
42
|
+
(siblings.length
|
|
43
|
+
? `The \`${family}\` family has ${siblings.length}: ${siblings.join(', ')}.`
|
|
44
|
+
: `No rule family \`${family}\` exists either — the full list is in the agent index.`),
|
|
45
|
+
...(siblings.length ? { didYouMean: siblings } : {}),
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
const what = entry.what ?? '';
|
|
49
|
+
const consequence = entry.consequence ?? '';
|
|
50
|
+
if (options.full) {
|
|
51
|
+
return {
|
|
52
|
+
id,
|
|
53
|
+
found: true,
|
|
54
|
+
title: entry.title ?? id,
|
|
55
|
+
text: [what, consequence].filter(Boolean).join('\n\n'),
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Bounded: the first sentence of each half.
|
|
60
|
+
*
|
|
61
|
+
* Sentence-wise rather than character-wise, deliberately — cutting mid-sentence produces text that reads as though
|
|
62
|
+
* the tool broke, and a reader cannot tell a truncated rule from a badly written one.
|
|
63
|
+
*/
|
|
64
|
+
const firstSentence = (text) => {
|
|
65
|
+
const match = /^(.*?[.!?])(\s|$)/s.exec(text.trim());
|
|
66
|
+
return (match?.[1] ?? text.trim()).trim();
|
|
67
|
+
};
|
|
68
|
+
const joined = [firstSentence(what), firstSentence(consequence)]
|
|
69
|
+
.filter(Boolean)
|
|
70
|
+
.join(' ');
|
|
71
|
+
/**
|
|
72
|
+
* ⛔ A hard ceiling, because "bounded" had no bound.
|
|
73
|
+
*
|
|
74
|
+
* The sentence cut is the primary mechanism, but prose with no terminator — or one long sentence — returned 662 of 663
|
|
75
|
+
* characters with no `more` marker, telling the caller nothing was cut. Thirty of the 54 shipped entries were
|
|
76
|
+
* unflagged. A cut at the ceiling ends at a word boundary and always sets `more`.
|
|
77
|
+
*/
|
|
78
|
+
const CEILING = 320;
|
|
79
|
+
const short = joined.length <= CEILING
|
|
80
|
+
? joined
|
|
81
|
+
: `${joined.slice(0, joined.lastIndexOf(' ', CEILING))}…`;
|
|
82
|
+
const shortened = short.length < [what, consequence].filter(Boolean).join(' ').length;
|
|
83
|
+
return {
|
|
84
|
+
id,
|
|
85
|
+
found: true,
|
|
86
|
+
title: entry.title ?? id,
|
|
87
|
+
text: short,
|
|
88
|
+
...(shortened
|
|
89
|
+
? { more: `Ask again with \`--full\` for the whole entry.` }
|
|
90
|
+
: {}),
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Only the findings that touch the files the caller named (AC-3).
|
|
95
|
+
*
|
|
96
|
+
* ### Why an agent in a fix loop needs this
|
|
97
|
+
*
|
|
98
|
+
* It changed three files and wants to know whether it broke them. A report over the whole project answers a different
|
|
99
|
+
* question, and the honest failure mode is subtle: the agent reads a pre-existing finding as its own damage, "fixes"
|
|
100
|
+
* something it did not break, and now has two problems.
|
|
101
|
+
*
|
|
102
|
+
* ⚠️ Matching is by SUFFIX, so a caller may name `partials/Puller.yaml` or an absolute path and get the same answer. A
|
|
103
|
+
* finding with **no** `sourceFile` is kept: it is project-wide, so it belongs to every set of changed files rather than
|
|
104
|
+
* to none — dropping it would let an agent believe its change was clean when a project-level rule fired.
|
|
105
|
+
*/
|
|
106
|
+
export function findingsTouching(issues, files) {
|
|
107
|
+
if (files.length === 0)
|
|
108
|
+
return issues;
|
|
109
|
+
const wanted = files
|
|
110
|
+
.map((file) => file.replace(/\\/g, '/'))
|
|
111
|
+
.filter((file) => file !== '');
|
|
112
|
+
if (wanted.length === 0)
|
|
113
|
+
return issues;
|
|
114
|
+
return issues.filter((issue) => {
|
|
115
|
+
if (!issue.sourceFile)
|
|
116
|
+
return true;
|
|
117
|
+
const source = issue.sourceFile.replace(/\\/g, '/');
|
|
118
|
+
/**
|
|
119
|
+
* ⛔ Anchored on a path SEGMENT, not on any suffix.
|
|
120
|
+
*
|
|
121
|
+
* A bare `endsWith` matched one file's name inside another's: asking about `Puller.yaml` returned findings from
|
|
122
|
+
* `MyPuller.yaml` too. The consequence is exactly what this function exists to prevent — the agent reads a finding
|
|
123
|
+
* in a file it never touched as its own damage, "fixes" it, and now has two problems.
|
|
124
|
+
*/
|
|
125
|
+
const matches = (a, b) => a === b || a.endsWith(`/${b}`);
|
|
126
|
+
return wanted.some((file) => matches(source, file) || matches(file, source));
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
const CEILING = 320;
|
|
130
|
+
/** Cut at a sentence, else at a word, and always say when something was cut. */
|
|
131
|
+
function bound(text, full) {
|
|
132
|
+
const whole = text.trim();
|
|
133
|
+
if (full || whole.length <= CEILING)
|
|
134
|
+
return { text: whole };
|
|
135
|
+
const sentence = /^(.*?[.!?])(\s|$)/s.exec(whole)?.[1]?.trim();
|
|
136
|
+
if (sentence && sentence.length <= CEILING) {
|
|
137
|
+
return {
|
|
138
|
+
text: sentence,
|
|
139
|
+
more: 'Ask again with `--full` for the whole entry.',
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
return {
|
|
143
|
+
text: `${whole.slice(0, whole.lastIndexOf(' ', CEILING))}…`,
|
|
144
|
+
more: 'Ask again with `--full` for the whole entry.',
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
const miss = (id, kind, known) => ({
|
|
148
|
+
id,
|
|
149
|
+
found: false,
|
|
150
|
+
title: `No ${kind} ${id}`,
|
|
151
|
+
text: `There is no ${kind} \`${id}\`.` +
|
|
152
|
+
(known.length
|
|
153
|
+
? ` ${known.length} exist${known.length === 1 ? 's' : ''}: ${known.slice(0, 30).join(', ')}${known.length > 30 ? ', …' : ''}.`
|
|
154
|
+
: ` None are known to this tooling — the agent index lists what exists.`),
|
|
155
|
+
...(known.length ? { didYouMean: known } : {}),
|
|
156
|
+
});
|
|
157
|
+
/** What a step, transformation or validation type accepts. `types` is `name → description`. */
|
|
158
|
+
export function explainType(name, types, options = {}) {
|
|
159
|
+
const described = types.get(name);
|
|
160
|
+
if (described === undefined)
|
|
161
|
+
return miss(name, 'type', [...types.keys()].sort());
|
|
162
|
+
const { text, more } = bound(described, options.full === true);
|
|
163
|
+
return {
|
|
164
|
+
id: name,
|
|
165
|
+
found: true,
|
|
166
|
+
title: name,
|
|
167
|
+
text,
|
|
168
|
+
...(more ? { more } : {}),
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
/** One connector, from the shipped catalog. Unsupported systems are named as unsupported, never as absent. */
|
|
172
|
+
export function explainConnector(code, catalog, options = {}) {
|
|
173
|
+
const supported = catalog.filter((row) => row.systemCode);
|
|
174
|
+
const row = supported.find((entry) => entry.systemCode === code);
|
|
175
|
+
if (!row) {
|
|
176
|
+
/**
|
|
177
|
+
* ⚠️ A system the catalog knows but does not support is a DIFFERENT answer from one it has never heard of, and this
|
|
178
|
+
* is the wording every other surface uses: it is a request, not a configuration.
|
|
179
|
+
*/
|
|
180
|
+
const known = catalog.find((entry) => !entry.systemCode &&
|
|
181
|
+
String(entry.name ?? '').toLowerCase() === code.toLowerCase());
|
|
182
|
+
if (known) {
|
|
183
|
+
return {
|
|
184
|
+
id: code,
|
|
185
|
+
found: false,
|
|
186
|
+
title: `${known.name} is not supported`,
|
|
187
|
+
text: `${known.name} exists as a system and has no connector, so there is nothing to configure. Integrating it ` +
|
|
188
|
+
`is a request rather than a template change.`,
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
return miss(code, 'connector', supported.map((entry) => entry.systemCode).sort());
|
|
192
|
+
}
|
|
193
|
+
const detail = `${row.name ?? code} — use the code \`${row.systemCode}\` in a template, never the display name. ` +
|
|
194
|
+
`System id ${row.systemId ?? 'unknown'}${row.generation === undefined ? '' : `, generation ${String(row.generation)}`}.`;
|
|
195
|
+
const { text, more } = bound(detail, options.full === true);
|
|
196
|
+
return {
|
|
197
|
+
id: code,
|
|
198
|
+
found: true,
|
|
199
|
+
title: String(row.name ?? code),
|
|
200
|
+
text,
|
|
201
|
+
...(more ? { more } : {}),
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
/** Examples matching a facet query, bounded to a page. `index` is the shipped example index's entries. */
|
|
205
|
+
export function searchExamples(query, index, options = {}) {
|
|
206
|
+
const wanted = (value, haystack) => value === undefined ||
|
|
207
|
+
haystack.some((entry) => entry.toLowerCase().includes(value.toLowerCase()));
|
|
208
|
+
const matched = index.filter((entry) => (query.kind === undefined || entry.kind === query.kind) &&
|
|
209
|
+
wanted(query.feature, entry.features) &&
|
|
210
|
+
wanted(query.connector, entry.connectors) &&
|
|
211
|
+
wanted(query.entity, entry.entities ?? []));
|
|
212
|
+
const PAGE = 10;
|
|
213
|
+
const shown = options.full === true ? matched : matched.slice(0, PAGE);
|
|
214
|
+
const lines = shown.map((entry) => `- \`${entry.id}\` (${entry.kind}) — ${entry.summary}`);
|
|
215
|
+
return {
|
|
216
|
+
id: JSON.stringify(query),
|
|
217
|
+
found: matched.length > 0,
|
|
218
|
+
title: `${matched.length} example${matched.length === 1 ? '' : 's'}`,
|
|
219
|
+
text: matched.length
|
|
220
|
+
? lines.join('\n')
|
|
221
|
+
: 'No example matches. ⚠️ For a connector query this may mean the facet cannot see it rather than that no ' +
|
|
222
|
+
'example uses it — see `connectorFacetNote` in the example index.',
|
|
223
|
+
...(matched.length > shown.length
|
|
224
|
+
? {
|
|
225
|
+
more: `Showing ${shown.length} of ${matched.length}. Ask again with \`--full\` for all of them.`,
|
|
226
|
+
}
|
|
227
|
+
: {}),
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
/** A component's flow, in the order it runs. `stages` is `stage label → step keys`. */
|
|
231
|
+
export function explainFlow(componentId, stages, options = {}) {
|
|
232
|
+
const populated = stages.filter((stage) => stage.steps.length > 0);
|
|
233
|
+
if (populated.length === 0) {
|
|
234
|
+
return {
|
|
235
|
+
id: componentId,
|
|
236
|
+
found: false,
|
|
237
|
+
title: componentId,
|
|
238
|
+
text: `\`${componentId}\` declares no steps in any stage, so it has no flow to describe.`,
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
const PAGE = 6;
|
|
242
|
+
const shown = options.full === true ? populated : populated.slice(0, PAGE);
|
|
243
|
+
const lines = shown.map((stage) => `- **${stage.label}**: ${stage.steps.slice(0, options.full === true ? stage.steps.length : 8).join(' → ')}` +
|
|
244
|
+
(options.full !== true && stage.steps.length > 8
|
|
245
|
+
? ` … (${stage.steps.length} steps)`
|
|
246
|
+
: ''));
|
|
247
|
+
return {
|
|
248
|
+
id: componentId,
|
|
249
|
+
found: true,
|
|
250
|
+
title: `${componentId} — ${populated.length} stage${populated.length === 1 ? '' : 's'}`,
|
|
251
|
+
text: lines.join('\n'),
|
|
252
|
+
...(populated.length > shown.length ||
|
|
253
|
+
(options.full !== true && populated.some((s) => s.steps.length > 8))
|
|
254
|
+
? { more: 'Ask again with `--full` for every stage and every step.' }
|
|
255
|
+
: {}),
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
export function positionAnswer(environment) {
|
|
259
|
+
return {
|
|
260
|
+
position: environment.position,
|
|
261
|
+
note: environment.note,
|
|
262
|
+
roots: [...environment.roots.values()].map((root) => ({
|
|
263
|
+
name: root.name,
|
|
264
|
+
kind: root.shape.kind,
|
|
265
|
+
from: root.provenance.kind,
|
|
266
|
+
...(root.shape.kind === 'unknown' && root.shape.reason
|
|
267
|
+
? { unknownBecause: root.shape.reason }
|
|
268
|
+
: {}),
|
|
269
|
+
})),
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
//# sourceMappingURL=retrieve.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retrieve.js","sourceRoot":"","sources":["../../src/validate/retrieve.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAqBhD,MAAM,SAAS,GAAG,CAAC,EAAU,EAAU,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;AAEjE;;;;;GAKG;AACH,MAAM,UAAU,WAAW,CACzB,EAAU,EACV,UAA2B,EAAE;IAE7B,MAAM,OAAO,GAAG,YAGf,CAAC;IACF;;;OAGG;IACH,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAEnE,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,MAAM,GAAG,SAAS,CAAC,EAAE,CAAC,CAAC;QAC7B,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC;aAClC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KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;YAClE,CAAC,CAAC,EAAE,IAAI,EAAE,yDAAyD,EAAE;YACrE,CAAC,CAAC,EAAE,CAAC;KACR,CAAC;AACJ,CAAC;AAwBD,MAAM,UAAU,cAAc,CAAC,WAW9B;IACC,OAAO;QACL,QAAQ,EAAE,WAAW,CAAC,QAAQ;QAC9B,IAAI,EAAE,WAAW,CAAC,IAAI;QACtB,KAAK,EAAE,CAAC,GAAG,WAAW,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YACpD,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI;YACrB,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,IAAI;YAC1B,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM;gBACpD,CAAC,CAAC,EAAE,cAAc,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;gBACvC,CAAC,CAAC,EAAE,CAAC;SACR,CAAC,CAAC;KACJ,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ruleCatalog.d.ts","sourceRoot":"","sources":["../../src/validate/ruleCatalog.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ruleCatalog.d.ts","sourceRoot":"","sources":["../../src/validate/ruleCatalog.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,WAAW,OAAO;IACtB,yBAAyB;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,2CAA2C;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,uFAAuF;IACvF,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CA0ehD,CAAC;AA8CF;gFACgF;AAChF,wBAAgB,WAAW,CACzB,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,GACxB,KAAK,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,OAAO,CAAA;CAAE,CAAC,CAczC"}
|