@intentius/chant 0.84.0 → 0.85.0

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.
Files changed (66) hide show
  1. package/dist/cli/main.d.ts.map +1 -1
  2. package/dist/cli/mcp/resource-handlers.d.ts +2 -1
  3. package/dist/cli/mcp/resource-handlers.d.ts.map +1 -1
  4. package/dist/cli/mcp/server.d.ts +1 -0
  5. package/dist/cli/mcp/server.d.ts.map +1 -1
  6. package/dist/cli/mcp/tools/composites.d.ts +44 -0
  7. package/dist/cli/mcp/tools/composites.d.ts.map +1 -0
  8. package/dist/cli/mcp/tools/search.d.ts.map +1 -1
  9. package/dist/cli/registry.d.ts +2 -0
  10. package/dist/cli/registry.d.ts.map +1 -1
  11. package/dist/components/cli-support.d.ts +4 -0
  12. package/dist/components/cli-support.d.ts.map +1 -1
  13. package/dist/composite.d.ts +6 -0
  14. package/dist/composite.d.ts.map +1 -1
  15. package/dist/lexicon.d.ts +44 -0
  16. package/dist/lexicon.d.ts.map +1 -1
  17. package/dist/workspace/__fixtures__/contract-repo.d.ts +7 -0
  18. package/dist/workspace/__fixtures__/contract-repo.d.ts.map +1 -1
  19. package/dist/workspace/composites.d.ts +139 -0
  20. package/dist/workspace/composites.d.ts.map +1 -0
  21. package/dist/workspace/graph-cli.d.ts +13 -2
  22. package/dist/workspace/graph-cli.d.ts.map +1 -1
  23. package/dist/workspace/intent-cli.d.ts +5 -1
  24. package/dist/workspace/intent-cli.d.ts.map +1 -1
  25. package/dist/workspace/intent-joins.d.ts +31 -3
  26. package/dist/workspace/intent-joins.d.ts.map +1 -1
  27. package/dist/workspace/intent.d.ts +27 -2
  28. package/dist/workspace/intent.d.ts.map +1 -1
  29. package/dist/workspace/member-commands.d.ts +7 -2
  30. package/dist/workspace/member-commands.d.ts.map +1 -1
  31. package/dist/workspace/reason-codes.d.ts +14 -0
  32. package/dist/workspace/reason-codes.d.ts.map +1 -1
  33. package/dist/workspace/records.d.ts +1 -1
  34. package/dist/workspace/records.d.ts.map +1 -1
  35. package/package.json +1 -1
  36. package/src/cli/handlers/graph.ts +4 -0
  37. package/src/cli/main.test.ts +9 -0
  38. package/src/cli/main.ts +8 -0
  39. package/src/cli/mcp/resource-handlers.ts +17 -0
  40. package/src/cli/mcp/server.test.ts +140 -4
  41. package/src/cli/mcp/server.ts +5 -1
  42. package/src/cli/mcp/tools/composites.ts +98 -0
  43. package/src/cli/mcp/tools/search.ts +47 -5
  44. package/src/cli/registry.ts +2 -0
  45. package/src/components/cli-support.test.ts +16 -0
  46. package/src/components/cli-support.ts +8 -2
  47. package/src/composite.ts +9 -0
  48. package/src/lexicon.ts +47 -0
  49. package/src/workspace/__fixtures__/contract-repo.ts +17 -0
  50. package/src/workspace/composites.schema.json +471 -0
  51. package/src/workspace/composites.test.ts +244 -0
  52. package/src/workspace/composites.ts +295 -0
  53. package/src/workspace/graph-cli.ts +32 -4
  54. package/src/workspace/intent-cli.ts +26 -2
  55. package/src/workspace/intent-joins.ts +48 -3
  56. package/src/workspace/intent.schema.json +80 -17
  57. package/src/workspace/intent.test.ts +138 -20
  58. package/src/workspace/intent.ts +72 -14
  59. package/src/workspace/member-commands.ts +11 -5
  60. package/src/workspace/read-contract.test.ts +31 -3
  61. package/src/workspace/reason-codes.test.ts +34 -1
  62. package/src/workspace/reason-codes.ts +22 -0
  63. package/src/workspace/records-contract.test.ts +22 -2
  64. package/src/workspace/records.schema.json +2 -2
  65. package/src/workspace/records.test.ts +93 -0
  66. package/src/workspace/records.ts +54 -10
@@ -3,13 +3,17 @@
3
3
  * (#2651): the intent graph over one region (`intent.ts`), printed as JSON
4
4
  * with `--json` or as a walk, one line per node, in the order of #2650
5
5
  * section B: the region, its decisions, their artifacts, the commits, and the
6
- * findings.
6
+ * findings. Under each decision come the commits made inside its window, and
7
+ * when any of them is not the decision's own work, the question #2650 B puts
8
+ * to the person about it (#2656).
7
9
  */
8
10
  import type { CommandContext } from "../cli/registry.js";
9
11
  import { type IntentDocument } from "./intent.js";
10
12
  type Result = Exclude<IntentDocument, {
11
13
  error: unknown;
12
14
  }>;
15
+ /** What the walk asks about a commit made inside a decision's window that is not the decision's own work (#2650 B4, step 5). */
16
+ export declare const IN_WINDOW_QUESTION = "is this drift, a superseding decision nobody wrote down, or the decision being wrong?";
13
17
  /** The walk as text, one line each, in the order of #2650 section B. */
14
18
  export declare function formatIntent(doc: Result): string;
15
19
  export declare function runWorkspaceIntent(ctx: CommandContext, cwd: string): Promise<number>;
@@ -1 +1 @@
1
- {"version":3,"file":"intent-cli.d.ts","sourceRoot":"","sources":["../../src/workspace/intent-cli.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAsE,KAAK,cAAc,EAAoC,MAAM,UAAU,CAAC;AAIrJ,KAAK,MAAM,GAAG,OAAO,CAAC,cAAc,EAAE;IAAE,KAAK,EAAE,OAAO,CAAA;CAAE,CAAC,CAAC;AAuC1D,wEAAwE;AACxE,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAsBhD;AAED,wBAAsB,kBAAkB,CAAC,GAAG,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAe1F"}
1
+ {"version":3,"file":"intent-cli.d.ts","sourceRoot":"","sources":["../../src/workspace/intent-cli.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAsE,KAAK,cAAc,EAAoC,MAAM,UAAU,CAAC;AAIrJ,KAAK,MAAM,GAAG,OAAO,CAAC,cAAc,EAAE;IAAE,KAAK,EAAE,OAAO,CAAA;CAAE,CAAC,CAAC;AAY1D,gIAAgI;AAChI,eAAO,MAAM,kBAAkB,0FAA0F,CAAC;AAgD1H,wEAAwE;AACxE,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAsBhD;AAED,wBAAsB,kBAAkB,CAAC,GAAG,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAe1F"}
@@ -18,6 +18,15 @@
18
18
  * Either way core never parses a plugin's own trailer or record format: it
19
19
  * reads the trailers git reports and hands them over, and a key means
20
20
  * something only because a kind file said so.
21
+ *
22
+ * Two parts of a join's answer carry meaning core acts on (#2656). A unit or
23
+ * contract may list `decisions`, the ids of the decision records it carries
24
+ * out; a commit whose unit or contract names a decision is that decision's own
25
+ * work. The function form may also return `findings`, each a code in the
26
+ * kind's own namespace (`plugin:<name>:<code>`), a message and the refs it is
27
+ * about, which the graph carries as finding nodes. That is how a plugin says
28
+ * what it knows and core does not, such as a contract whose criteria changed
29
+ * in a commit that names no decision.
21
30
  */
22
31
  import { z } from "zod";
23
32
  /** A commit as the hook sees it. */
@@ -40,11 +49,23 @@ export interface CommitJoinContext {
40
49
  /** The full commit id read with `--at`, or null for the working tree. */
41
50
  at: string | null;
42
51
  }
43
- /** A plugin's unit, contract or evidence: an id and whatever fields the plugin records. */
52
+ /**
53
+ * A plugin's unit, contract or evidence: an id and whatever fields the plugin
54
+ * records. On a unit or contract, `decisions`, a list of record ids, names the
55
+ * decisions it carries out (#2656).
56
+ */
44
57
  export interface JoinedEntity {
45
58
  id: string;
46
59
  [field: string]: unknown;
47
60
  }
61
+ /** A finding a plugin contributes for one commit (#2656). */
62
+ export interface PluginFinding {
63
+ /** `plugin:<name>:<code>`, where `<name>` is the kind's name. */
64
+ code: string;
65
+ message: string;
66
+ /** What the finding is about: node ids, commit shas, record ids, unit, contract or evidence ids, or paths. */
67
+ refs?: string[];
68
+ }
48
69
  /** What a join says about one commit. Every part is optional. */
49
70
  export interface CommitJoin {
50
71
  /** The unit of work that produced the commit. */
@@ -55,6 +76,8 @@ export interface CommitJoin {
55
76
  evidence?: JoinedEntity | JoinedEntity[];
56
77
  /** Trailer keys on this commit that claim who wrote it, which the plugin vouches for. */
57
78
  authorship?: string[];
79
+ /** Findings about this commit, in the kind's own code namespace. Function form only. */
80
+ findings?: PluginFinding[];
58
81
  }
59
82
  export type CommitJoinsFunction = (commit: IntentCommit, context: CommitJoinContext) => CommitJoin | null | undefined | Promise<CommitJoin | null | undefined>;
60
83
  /** The data form of `commitJoins`. */
@@ -88,6 +111,11 @@ export declare function trailerValue(trailers: Record<string, string[]>, key: st
88
111
  export declare function hasTrailer(trailers: Record<string, string[]>, key: string): boolean;
89
112
  /** Interpret the data form for one commit. Throws when a named record can't be read as JSON. */
90
113
  export declare function joinByData(data: CommitJoinsData, commit: IntentCommit, context: CommitJoinContext): CommitJoin;
91
- /** Run a kind's joins for one commit, checking what a function returns. */
92
- export declare function runCommitJoins(joins: CommitJoins, commit: IntentCommit, context: CommitJoinContext): Promise<CommitJoin>;
114
+ /** The record ids a unit or contract says it carries out: its `decisions` field, when that is a list of strings. */
115
+ export declare function entityDecisions(entity: JoinedEntity | undefined): string[];
116
+ /**
117
+ * Run a kind's joins for one commit, checking what a function returns.
118
+ * `name` is the kind's name, the namespace its findings' codes must use.
119
+ */
120
+ export declare function runCommitJoins(joins: CommitJoins, commit: IntentCommit, context: CommitJoinContext, name: string): Promise<CommitJoin>;
93
121
  //# sourceMappingURL=intent-joins.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"intent-joins.d.ts","sourceRoot":"","sources":["../../src/workspace/intent-joins.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,oCAAoC;AACpC,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IACxC,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AG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,eAAe,CAAA;CAAE,CAAC;AAEpH,4GAA4G;AAC5G,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,WAAW,GAAG,MAAM,GAAG,SAAS,CAO9F;AAED,2EAA2E;AAC3E,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAIhG;AAED,gDAAgD;AAChD,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAGnF;AAiBD,gGAAgG;AAChG,wBAAgB,UAAU,CAAC,IAAI,EAAE,eAAe,EAAE,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,iBAAiB,GAAG,UAAU,CAa9G;AAED,oHAAoH;AACpH,wBAAgB,eAAe,CAAC,MAAM,EAAE,YAAY,GAAG,SAAS,GAAG,MAAM,EAAE,CAG1E;AAED;;;GAGG;AACH,wBAAsB,cAAc,CAAC,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,iBAAiB,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAqC5I"}
@@ -22,12 +22,17 @@
22
22
  * the graph pins it.
23
23
  *
24
24
  * Every gap the walk finds is a `finding` node with a closed code, never
25
- * prose, so a reader can draw it and a test can assert it. chant emits the
25
+ * prose, so a reader can draw it and a test can assert it. A commit made
26
+ * inside a decision's window is not taken as that decision's work: unless
27
+ * the decision's own unit made it, it is `decided-by-window`, shown for the
28
+ * person to judge (#2656). A plugin's `commitJoins` may add findings of its
29
+ * own, in its own code namespace. chant emits the
26
30
  * graph and hud renders it (#2524 D8, D15). Git is read through a local
27
31
  * `git` subprocess only: no fetch, no network.
28
32
  */
29
33
  import { type LinkTableRow } from "./links.js";
30
34
  import { type RecordView } from "./records-cli.js";
35
+ import type { PluginCode } from "./reason-codes.js";
31
36
  import { type ProvenanceLevel } from "./trust/attestor.js";
32
37
  /** The version of the `intent` document this chant writes. */
33
38
  export declare const INTENT_CONTRACT_VERSION = 1;
@@ -99,7 +104,16 @@ export interface CommitNode {
99
104
  };
100
105
  /** The line ranges the commit changed in the region, in the commit's own version of the file; null for a file or directory region. */
101
106
  lines: LineRange[] | null;
107
+ /**
108
+ * How the decisions constraining the region by path relate to the commit
109
+ * (#2656): `decided` when it falls inside a decision's window and that
110
+ * decision's own unit made it, `decided-by-window` when it only falls
111
+ * inside a window, `undecided` when it falls outside every window, and
112
+ * null when no record kind was read.
113
+ */
114
+ state: CommitState | null;
102
115
  }
116
+ export type CommitState = "decided" | "decided-by-window" | "undecided";
103
117
  export interface JoinedNode {
104
118
  id: string;
105
119
  kind: "unit" | "contract" | "evidence";
@@ -180,9 +194,14 @@ export interface LinkNode {
180
194
  export interface FindingNode {
181
195
  id: string;
182
196
  kind: "finding";
183
- code: IntentFindingCode;
197
+ /** A closed code, or a plugin's own `plugin:<name>:<code>` (#2656). */
198
+ code: IntentFindingCode | PluginCode;
184
199
  message: string;
185
200
  concerns: string[];
201
+ /** For a plugin's finding: the kind file that returned it. */
202
+ plugin?: string;
203
+ /** For a plugin's finding: the refs as the plugin gave them. The ones that name a node in the graph are in concerns. */
204
+ refs?: string[];
186
205
  }
187
206
  export type IntentNode = RegionNode | FileNode | MemberNode | CommitNode | JoinedNode | EvidenceEntryNode | DecisionNode | ArtifactNode | LinkNode | FindingNode;
188
207
  export type Granularity = "path" | "member" | "contract" | "issue";
@@ -203,6 +222,11 @@ export type IntentEdge = {
203
222
  from: string;
204
223
  to: string;
205
224
  lines: LineRange[] | null;
225
+ } | {
226
+ kind: "within";
227
+ from: string;
228
+ to: string;
229
+ state: "decided" | "decided-by-window";
206
230
  } | {
207
231
  kind: "produced-by" | "serves" | "cites-evidence" | "supersedes" | "links";
208
232
  from: string;
@@ -231,6 +255,7 @@ export type IntentDocument = (Head & {
231
255
  };
232
256
  kinds: {
233
257
  file: string;
258
+ name: string;
234
259
  records: string | null;
235
260
  joins: "function" | "data" | null;
236
261
  }[];
@@ -1 +1 @@
1
- {"version":3,"file":"intent.d.ts","sourceRoot":"","sources":["../../src/workspace/intent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AASH,OAAO,EAAgB,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AAI1D,OAAO,EAAgB,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AAG9D,OAAO,EAAmB,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAIzE,8DAA8D;AAC9D,eAAO,MAAM,uBAAuB,IAAI,CAAC;AAEzC,2EAA2E;AAC3E,eAAO,MAAM,uBAAuB,8EAA8E,CAAC;AAInH,8DAA8D;AAC9D,eAAO,MAAM,oBAAoB,oVAyBS,CAAC;AAC3C,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtE,uEAAuE;AACvE,eAAO,MAAM,mBAAmB,6DAKU,CAAC;AAC3C,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEpE,sHAAsH;AACtH,eAAO,MAAM,kBAAkB,oWAUW,CAAC;AAC3C,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AAElE,qBAAa,WAAY,SAAQ,KAAK;IAElC,QAAQ,CAAC,IAAI,EAAE,eAAe;gBAArB,IAAI,EAAE,eAAe,EAC9B,OAAO,EAAE,MAAM;CAKlB;AAID,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AAED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IAAI,CAAA;CAAE,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAOtG;AA+HD,6HAA6H;AAC7H,wBAAsB,WAAW,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC,CAU3E"}
@@ -129,8 +129,13 @@ export declare function parseMemberRunOutput(stdout: string): {
129
129
  }>>;
130
130
  stray: string;
131
131
  } | undefined;
132
- /** Run every group of the plan, one process per toolchain at a time each, and return the results in plan order. */
133
- export declare function executePlan(plan: MemberPlan, args: ParsedArgs): Promise<UnitResult[]>;
132
+ /** A command line to run in each member instead of the verb's own, such as `graph --components` (#2662). */
133
+ export type MemberArgv = (unit: RunUnit) => string[];
134
+ /**
135
+ * Run every group of the plan, one process per toolchain at a time each, and
136
+ * return the results in plan order. `argvFor` replaces the verb's command line.
137
+ */
138
+ export declare function executePlan(plan: MemberPlan, args: ParsedArgs, argvFor?: MemberArgv): Promise<UnitResult[]>;
134
139
  export declare function describePlan(plan: MemberPlan): string;
135
140
  export declare function planJson(plan: MemberPlan): unknown;
136
141
  export declare function emitDocument(doc: unknown, output: string | undefined): void;
@@ -1 +1 @@
1
- {"version":3,"file":"member-commands.d.ts","sourceRoot":"","sources":["../../src/workspace/member-commands.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAOH,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElE,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,EAA0B,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE9E,OAAO,EAAuB,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AAEjE,OAAO,EAAwC,KAAK,aAAa,EAAyB,MAAM,cAAc,CAAC;AAC/G,OAAO,EAAe,KAAK,aAAa,EAAE,MAAM,QAAQ,CAAC;AAEzD,MAAM,MAAM,aAAa,GAAG,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{
53
53
  readonly "asset-missing": "A file the record pins by hash does not exist in the tree read.";
54
54
  readonly "asset-stale": "A file the record pins is unchanged at the hash a record it supersedes pinned: the decision changed and the artifact did not follow.";
55
55
  readonly "record-supersedes-pending": "A supersedes link from a record whose state is weaker than the record it names, so the link has no effect yet.";
56
+ readonly "record-no-evidence": "The record's evidence list is empty: it cites nothing and pins no file. Information for a reviewer, never an error.";
56
57
  readonly "kind-unreadable": "The record kind file is missing or could not be imported.";
57
58
  readonly "kind-invalid": "The record kind file exports no recordKind, or its shape is wrong.";
58
59
  readonly "schema-unreadable": "The schema file the record kind names is missing or is not JSON.";
@@ -74,6 +75,9 @@ export declare const REASONS: {
74
75
  readonly "intent-evidence-unpinned": "A decision's evidence has no hash: a URL, or a path with no sha256.";
75
76
  readonly "intent-trailer-unverified": "A commit carries a trailer a plugin says claims authorship, and the commit is not attested.";
76
77
  readonly "intent-region-unconstrained": "No decision constrains the region at any granularity.";
78
+ readonly "composites-no-chant-member": "No member of kind chant was read, so nothing declares a composite instance or a component.";
79
+ readonly "composites-none-declared": "The members read declare no composite instance.";
80
+ readonly "composites-no-component": "The members read declare no component, so no composite instance has one.";
77
81
  readonly "lock-invalid": "The lineage lock can't be read.";
78
82
  readonly "manual-step-open": "A scope in the lineage lock has an open manual step.";
79
83
  };
@@ -81,4 +85,14 @@ export type ReasonCode = keyof typeof REASONS;
81
85
  /** Every code, in the order of {@link REASONS}. */
82
86
  export declare const REASON_CODES: ReasonCode[];
83
87
  export declare function isReasonCode(value: unknown): value is ReasonCode;
88
+ /**
89
+ * A finding code a plugin contributes to the intent graph through its
90
+ * `commitJoins` (#2656): `plugin:<name>:<code>`, where `<name>` is the kind's
91
+ * name and `<code>` is lower case words joined by dashes. These are outside the
92
+ * closed list: the plugin owns its namespace, and core only carries them.
93
+ */
94
+ export type PluginCode = `plugin:${string}:${string}`;
95
+ export declare const PLUGIN_CODE: RegExp;
96
+ /** Whether `value` is a plugin code, and, given `name`, one in that kind's namespace. */
97
+ export declare function isPluginCode(value: unknown, name?: string): value is PluginCode;
84
98
  //# sourceMappingURL=reason-codes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"reason-codes.d.ts","sourceRoot":"","sources":["../../src/workspace/reason-codes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,sHAAsH;AACtH,eAAO,MAAM,qBAAqB,IAAI,CAAC;AAEvC,uHAAuH;AACvH,eAAO,MAAM,mBAAmB,WAAW,CAAC;AAE5C,qFAAqF;AACrF,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkEV,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,OAAO,CAAC;AAE9C,mDAAmD;AACnD,eAAO,MAAM,YAAY,EAA2B,UAAU,EAAE,CAAC;AAEjE,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,UAAU,CAEhE"}
1
+ {"version":3,"file":"reason-codes.d.ts","sourceRoot":"","sources":["../../src/workspace/reason-codes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,sHAAsH;AACtH,eAAO,MAAM,qBAAqB,IAAI,CAAC;AAEvC,uHAAuH;AACvH,eAAO,MAAM,mBAAmB,WAAW,CAAC;AAE5C,qFAAqF;AACrF,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuEV,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,OAAO,CAAC;AAE9C,mDAAmD;AACnD,eAAO,MAAM,YAAY,EAA2B,UAAU,EAAE,CAAC;AAEjE,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,UAAU,CAEhE;AAED;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAAG,UAAU,MAAM,IAAI,MAAM,EAAE,CAAC;AAEtD,eAAO,MAAM,WAAW,QAAkD,CAAC;AAE3E,yFAAyF;AACzF,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,KAAK,IAAI,UAAU,CAI/E"}
@@ -29,7 +29,7 @@ export type RecordReasonCode = (typeof RECORD_REASON_CODES)[number];
29
29
  * Why a record carries a warning. Closed, like the reason codes. A warning
30
30
  * never makes a record invalid, and `--current` still lists the record.
31
31
  */
32
- export declare const RECORD_WARNING_CODES: readonly ["asset-drift", "asset-missing", "asset-stale", "record-supersedes-pending"];
32
+ export declare const RECORD_WARNING_CODES: readonly ["asset-drift", "asset-missing", "asset-stale", "record-supersedes-pending", "record-no-evidence"];
33
33
  export type RecordWarningCode = (typeof RECORD_WARNING_CODES)[number];
34
34
  export interface RecordWarning {
35
35
  code: RecordWarningCode;
@@ -1 +1 @@
1
- {"version":3,"file":"records.d.ts","sourceRoot":"","sources":["../../src/workspace/records.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAKH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAyB,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAI5C;;;GAGG;AACH,eAAO,MAAM,mBAAmB,4IAWU,CAAC;AAC3C,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEpE;;;GAGG;AACH,eAAO,MAAM,oBAAoB,uFAYS,CAAC;AAC3C,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtE,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,iBAAiB,CAAC;IACxB,OAAO,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AC5B,qEAAqE;IACrE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACrC,kHAAkH;IAClH,MAAM,EAAE,QAAQ,EAAE,CAAC;IACnB,wFAAwF;IACxF,QAAQ,EAAE,aAAa,EAAE,CAAC;CAC3B;AAED,MAAM,WAAW,kBAAkB;IACjC,iFAAiF;IACjF,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,YAAY,CAAC;IACrB,oDAAoD;IACpD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB;;;;OAIG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;CACzB;AAED,+DAA+D;AAC/D,MAAM,WAAW,aAAa;IAC5B,2FAA2F;IAC3F,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IACzC,+GAA+G;IAC/G,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;CACvC;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,OAAO,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC;CAChF;AAsDD,oEAAoE;AACpE,wBAAsB,WAAW,CAAC,MAAM,EAAE,gBAAgB,EAAE,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CA4HnH"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intentius/chant",
3
- "version": "0.84.0",
3
+ "version": "0.85.0",
4
4
  "description": "Declarative infrastructure-as-code toolkit — TypeScript on Node.js",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://intentius.io/chant",
@@ -619,6 +619,10 @@ async function runComponentGraphView(
619
619
  wave: waveOf.get(name) ?? null,
620
620
  liveNames: graph.liveNames?.[name] ?? [name],
621
621
  ...(graph.composites?.[name] ? { composites: graph.composites[name] } : {}),
622
+ // The archetype (#2662), declared or inferred, so a reader such as
623
+ // `chant workspace graph --composites` labels a component without
624
+ // importing its source.
625
+ ...(graph.archetypes?.[name] ? { archetype: graph.archetypes[name] } : {}),
622
626
  },
623
627
  // Deep-link the node to its `*.component.ts` (behold's inspect panel).
624
628
  ...(graph.files?.[name] ? { sourceLoc: { file: graph.files[name] } } : {}),
@@ -688,6 +688,15 @@ describe("workspace records (#2546)", () => {
688
688
  });
689
689
  });
690
690
 
691
+ describe("workspace graph --composites (#2662)", () => {
692
+ test("parses as a boolean on workspace graph", () => {
693
+ const args = parseArgs(["workspace", "graph", "--composites", "--at", "HEAD", "--json"]);
694
+ expect(args).toMatchObject({ command: "workspace", path: "graph", composites: true, at: "HEAD", json: true });
695
+ expect(() => parseArgs(["workspace", "graph", "--composites=yes"])).toThrow();
696
+ expect(resolveCommand(args, commandRegistry)?.def.name).toBe("workspace graph");
697
+ });
698
+ });
699
+
691
700
  describe("workspace graph --intent (#2651)", () => {
692
701
  test("parses the region and every --kind, in order", () => {
693
702
  const args = parseArgs(["workspace", "graph", "--intent", "app/server.mjs:3-7", "--kind", "a.kind.mjs", "--kind", "b.kind.mjs", "--at", "HEAD", "--json"]);
package/src/cli/main.ts CHANGED
@@ -69,6 +69,7 @@ const BOOLEAN_FLAGS = new Set([
69
69
  "--strict",
70
70
  "--validate",
71
71
  "--use-composites",
72
+ "--composites",
72
73
  "--stacks",
73
74
  "--components",
74
75
  "--up",
@@ -365,6 +366,9 @@ export function parseArgs(args: string[]): ParsedArgs {
365
366
  if (!result.kind || result.kind.startsWith("-")) throw new Error("--kind needs a kind file: --kind <path>");
366
367
  // Repeatable for `workspace graph --intent` (#2651); the others read the last one.
367
368
  (result.kinds ??= []).push(result.kind);
369
+ } else if (arg === "--composites") {
370
+ // `chant workspace graph --composites` (#2662)
371
+ result.composites = true;
368
372
  } else if (arg === "--intent") {
369
373
  // `chant workspace graph --intent <path[:start-end]>` (#2651)
370
374
  result.intent = args[++i];
@@ -773,6 +777,10 @@ Workspace (level 1, #2524):
773
777
  read-contract document. --at <rev> runs each member's
774
778
  source as it was at that commit; --kind adds the
775
779
  records' asset and constrains links
780
+ workspace graph --composites [--at <rev>] [--member <name>] [-o <file>]
781
+ Each composite instance the members declare, with the
782
+ components whose contract can deploy it; an instance
783
+ with none lists an empty set
776
784
  workspace graph --intent <path[:start-end]> [--at <rev>] [--kind <kind file>...] [--json]
777
785
  The intent graph over one region: the commits that
778
786
  touched it, the decisions whose constrains cover it,
@@ -1,6 +1,8 @@
1
1
  import { resolve, join, dirname } from "node:path";
2
2
  import { readFile } from "node:fs/promises";
3
3
  import type { ResourceDefinition } from "./types";
4
+ import type { LexiconPlugin } from "../../lexicon";
5
+ import { collectComposites } from "./tools/composites";
4
6
  import { getContext } from "./resources/context";
5
7
  import { readSnapshot, readEnvironmentSnapshots } from "../../lifecycle/git";
6
8
  import { discoverOps } from "../../op/discover";
@@ -44,6 +46,12 @@ export const coreResourceDefinitions: ResourceDefinition[] = [
44
46
  description: "Latest run state for a named Op",
45
47
  mimeType: "application/json",
46
48
  },
49
+ {
50
+ uri: "chant://composites",
51
+ name: "Composite catalog",
52
+ description: "Every composite the loaded lexicons export, with what each bundles and its parameters (#2662)",
53
+ mimeType: "application/json",
54
+ },
47
55
  {
48
56
  uri: "chant://knowledge",
49
57
  name: "Knowledge bundle",
@@ -99,9 +107,18 @@ export function collectExamples(
99
107
  export async function handleResourcesRead(
100
108
  params: Record<string, unknown>,
101
109
  pluginResources: Map<string, PluginResourceEntry>,
110
+ plugins: LexiconPlugin[] = [],
102
111
  ): Promise<unknown> {
103
112
  const uri = params.uri as string;
104
113
 
114
+ // The whole composite catalog (#2662), static data from each lexicon's
115
+ // `composites()`; the `composites` tool filters the same list.
116
+ if (uri === "chant://composites") {
117
+ return {
118
+ contents: [{ uri, mimeType: "application/json", text: JSON.stringify(collectComposites(plugins), null, 2) }],
119
+ };
120
+ }
121
+
105
122
  if (uri === "chant://context") {
106
123
  return {
107
124
  contents: [
@@ -778,6 +778,142 @@ describe("McpServer", () => {
778
778
  });
779
779
  });
780
780
 
781
+ // -----------------------------------------------------------------------
782
+ // Composite catalog (#2662)
783
+ // -----------------------------------------------------------------------
784
+
785
+ describe("composite catalog", () => {
786
+ const awsLike = createMockPlugin({
787
+ name: "aws",
788
+ composites: () => [
789
+ {
790
+ name: "LambdaSqs",
791
+ lexicon: "aws",
792
+ description: "A Lambda function fed by an SQS queue through an event source mapping.",
793
+ bundles: ["EventSourceMapping", "Function", "Queue", "Role"],
794
+ params: [{ name: "queueName", type: "Value<string>", required: false }],
795
+ },
796
+ {
797
+ name: "VpcDefault",
798
+ lexicon: "aws",
799
+ description: "A VPC with public and private subnets.",
800
+ bundles: ["Subnet", "Vpc"],
801
+ params: [{ name: "cidr", type: "string", required: false }],
802
+ },
803
+ ],
804
+ mcpResources: () => [
805
+ {
806
+ uri: "resource-catalog",
807
+ name: "Catalog",
808
+ description: "Resource catalog",
809
+ mimeType: "application/json",
810
+ handler: async () => JSON.stringify([
811
+ { className: "Queue", resourceType: "AWS::SQS::Queue", kind: "resource" },
812
+ ]),
813
+ },
814
+ ],
815
+ });
816
+ const k8sLike = createMockPlugin({
817
+ name: "k8s",
818
+ composites: () => [
819
+ {
820
+ name: "WebApp",
821
+ lexicon: "k8s",
822
+ description: "A Deployment and Service.",
823
+ bundles: ["Deployment", "Service"],
824
+ params: [{ name: "image", type: "string", required: true }],
825
+ },
826
+ ],
827
+ });
828
+ const noComposites = createMockPlugin({ name: "cedar" });
829
+
830
+ async function call(s: McpServer, name: string, args: Record<string, unknown>) {
831
+ const response = await s.handleRequest({
832
+ jsonrpc: "2.0",
833
+ id: 1,
834
+ method: "tools/call",
835
+ params: { name, arguments: args },
836
+ });
837
+ return JSON.parse((response.result as { content: Array<{ text: string }> }).content[0].text);
838
+ }
839
+
840
+ test("the composites tool answers what a lexicon has, with bundles and params", async () => {
841
+ const s = new McpServer([awsLike, k8sLike, noComposites]);
842
+ const parsed = await call(s, "composites", { lexicon: "aws" });
843
+ expect(parsed.total).toBe(2);
844
+ expect(parsed.composites.map((c: { name: string }) => c.name)).toEqual(["LambdaSqs", "VpcDefault"]);
845
+ expect(parsed.composites[0].bundles).toContain("Queue");
846
+ expect(parsed.composites[0].params[0].name).toBe("queueName");
847
+ expect(parsed.lexicons).toEqual(["aws", "k8s", "cedar"]);
848
+ });
849
+
850
+ test("with no filter it lists every lexicon's composites; a lexicon with none adds nothing", async () => {
851
+ const s = new McpServer([awsLike, k8sLike, noComposites]);
852
+ const parsed = await call(s, "composites", {});
853
+ expect(parsed.total).toBe(3);
854
+ expect((await call(s, "composites", { lexicon: "cedar" })).total).toBe(0);
855
+ });
856
+
857
+ test("query matches a bundled kind, and a name match ranks first", async () => {
858
+ const s = new McpServer([awsLike, k8sLike]);
859
+ const byKind = await call(s, "composites", { query: "queue" });
860
+ expect(byKind.composites.map((c: { name: string }) => c.name)).toEqual(["LambdaSqs"]);
861
+ const byName = await call(s, "composites", { query: "vpc" });
862
+ expect(byName.composites[0].name).toBe("VpcDefault");
863
+ expect((await call(s, "composites", { limit: 1 })).composites).toHaveLength(1);
864
+ });
865
+
866
+ test("chant://composites lists the whole catalog", async () => {
867
+ const s = new McpServer([awsLike, k8sLike, noComposites]);
868
+ const list = await s.handleRequest({ jsonrpc: "2.0", id: 1, method: "resources/list" });
869
+ const uris = (list.result as { resources: Array<{ uri: string }> }).resources.map((r) => r.uri);
870
+ expect(uris).toContain("chant://composites");
871
+
872
+ const read = await s.handleRequest({
873
+ jsonrpc: "2.0",
874
+ id: 2,
875
+ method: "resources/read",
876
+ params: { uri: "chant://composites" },
877
+ });
878
+ const contents = (read.result as { contents: Array<{ mimeType: string; text: string }> }).contents;
879
+ expect(contents[0].mimeType).toBe("application/json");
880
+ const catalog = JSON.parse(contents[0].text);
881
+ expect(catalog.map((c: { lexicon: string; name: string }) => `${c.lexicon}:${c.name}`)).toEqual([
882
+ "aws:LambdaSqs", "aws:VpcDefault", "k8s:WebApp",
883
+ ]);
884
+ });
885
+
886
+ test("chant://composites is an empty list with no plugins", async () => {
887
+ const read = await new McpServer().handleRequest({
888
+ jsonrpc: "2.0",
889
+ id: 1,
890
+ method: "resources/read",
891
+ params: { uri: "chant://composites" },
892
+ });
893
+ const contents = (read.result as { contents: Array<{ text: string }> }).contents;
894
+ expect(JSON.parse(contents[0].text)).toEqual([]);
895
+ });
896
+
897
+ test("search finds a resource type and the composite that bundles it", async () => {
898
+ const s = new McpServer([awsLike, k8sLike]);
899
+ const parsed = await call(s, "search", { query: "queue" });
900
+ expect(parsed.total).toBe(2);
901
+ const kinds = parsed.results.map((r: { kind: string }) => r.kind).sort();
902
+ expect(kinds).toEqual(["composite", "resource"]);
903
+ const composite = parsed.results.find((r: { kind: string }) => r.kind === "composite");
904
+ expect(composite).toMatchObject({ name: "LambdaSqs", lexicon: "aws", bundles: expect.arrayContaining(["Queue"]) });
905
+ expect(composite.params).toBeUndefined();
906
+ });
907
+
908
+ test("search's lexicon filter applies to composites too", async () => {
909
+ const s = new McpServer([awsLike, k8sLike]);
910
+ const parsed = await call(s, "search", { query: "deployment", lexicon: "aws" });
911
+ expect(parsed.total).toBe(0);
912
+ const k8s = await call(s, "search", { query: "deployment", lexicon: "k8s" });
913
+ expect(k8s.results.map((r: { name: string }) => r.name)).toEqual(["WebApp"]);
914
+ });
915
+ });
916
+
781
917
  // -----------------------------------------------------------------------
782
918
  // Scaffold tool with plugins
783
919
  // -----------------------------------------------------------------------
@@ -1466,23 +1602,23 @@ describe("McpServer", () => {
1466
1602
 
1467
1603
  const toolsRes = await s.handleRequest({ jsonrpc: "2.0", id: 2, method: "tools/list" });
1468
1604
  const tools = (toolsRes.result as { tools: Array<{ name: string }> }).tools;
1469
- expect(tools).toHaveLength(13);
1605
+ expect(tools).toHaveLength(14);
1470
1606
  expect(tools.map((t) => t.name).sort()).toEqual([
1471
- "build", "explain", "import", "lifecycle-diff", "lifecycle-snapshot", "lint",
1607
+ "build", "composites", "explain", "import", "lifecycle-diff", "lifecycle-snapshot", "lint",
1472
1608
  "op-approve", "op-list", "op-report", "op-run", "op-status",
1473
1609
  "scaffold", "search",
1474
1610
  ]);
1475
1611
 
1476
1612
  const resourcesRes = await s.handleRequest({ jsonrpc: "2.0", id: 3, method: "resources/list" });
1477
1613
  const resources = (resourcesRes.result as { resources: Array<{ uri: string }> }).resources;
1478
- expect(resources).toHaveLength(8);
1614
+ expect(resources).toHaveLength(9);
1479
1615
  });
1480
1616
 
1481
1617
  test("server with empty plugins array works", async () => {
1482
1618
  const s = new McpServer([]);
1483
1619
  const toolsRes = await s.handleRequest({ jsonrpc: "2.0", id: 1, method: "tools/list" });
1484
1620
  const tools = (toolsRes.result as { tools: Array<{ name: string }> }).tools;
1485
- expect(tools).toHaveLength(13);
1621
+ expect(tools).toHaveLength(14);
1486
1622
  });
1487
1623
  });
1488
1624
  });
@@ -6,6 +6,7 @@ import { importTool, handleImport } from "./tools/import";
6
6
  import { explainTool, handleExplain } from "./tools/explain";
7
7
  import { scaffoldTool, createScaffoldHandler } from "./tools/scaffold";
8
8
  import { searchTool, createSearchHandler } from "./tools/search";
9
+ import { compositesTool, createCompositesHandler } from "./tools/composites";
9
10
  import type { LexiconPlugin } from "../../lexicon";
10
11
  import type { McpRequest, McpResponse, McpRequestMeta, ToolDefinition, ToolHandler, ResourceDefinition } from "./types";
11
12
  import { createSnapshotTool, createDiffTool } from "./lifecycle-tools";
@@ -90,8 +91,10 @@ export class McpServer {
90
91
  private tools: Map<string, ToolDefinition> = new Map();
91
92
  private toolHandlers: Map<string, ToolHandler> = new Map();
92
93
  private pluginResources: Map<string, { definition: ResourceDefinition; handler: () => Promise<string> }> = new Map();
94
+ private plugins: LexiconPlugin[];
93
95
 
94
96
  constructor(plugins?: LexiconPlugin[]) {
97
+ this.plugins = plugins ?? [];
95
98
  // Register core tools
96
99
  this.registerTool(buildTool, handleBuild);
97
100
  this.registerTool(lintTool, handleLint);
@@ -99,6 +102,7 @@ export class McpServer {
99
102
  this.registerTool(explainTool, handleExplain);
100
103
  this.registerTool(scaffoldTool, createScaffoldHandler(plugins ?? []));
101
104
  this.registerTool(searchTool, createSearchHandler(plugins ?? []));
105
+ this.registerTool(compositesTool, createCompositesHandler(plugins ?? []));
102
106
 
103
107
  // Register state tools
104
108
  const snapshot = createSnapshotTool(plugins ?? []);
@@ -252,7 +256,7 @@ export class McpServer {
252
256
  return buildResourcesList(this.pluginResources);
253
257
 
254
258
  case "resources/read":
255
- return handleResourcesRead(params, this.pluginResources);
259
+ return handleResourcesRead(params, this.pluginResources, this.plugins);
256
260
 
257
261
  default:
258
262
  throw new Error(`Unknown method: ${method}`);