@intentius/chant 0.83.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 +6 -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 +16 -1
  22. package/dist/workspace/graph-cli.d.ts.map +1 -1
  23. package/dist/workspace/intent-cli.d.ts +21 -0
  24. package/dist/workspace/intent-cli.d.ts.map +1 -0
  25. package/dist/workspace/intent-joins.d.ts +121 -0
  26. package/dist/workspace/intent-joins.d.ts.map +1 -0
  27. package/dist/workspace/intent.d.ts +310 -0
  28. package/dist/workspace/intent.d.ts.map +1 -0
  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 +29 -0
  32. package/dist/workspace/reason-codes.d.ts.map +1 -1
  33. package/dist/workspace/records.d.ts +7 -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 +20 -0
  38. package/src/cli/main.ts +18 -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 +6 -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 +39 -3
  54. package/src/workspace/intent-cli.ts +119 -0
  55. package/src/workspace/intent-joins.ts +210 -0
  56. package/src/workspace/intent.schema.json +1141 -0
  57. package/src/workspace/intent.test.ts +566 -0
  58. package/src/workspace/intent.ts +999 -0
  59. package/src/workspace/member-commands.ts +11 -5
  60. package/src/workspace/read-contract.test.ts +46 -3
  61. package/src/workspace/reason-codes.test.ts +39 -2
  62. package/src/workspace/reason-codes.ts +40 -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 +55 -11
@@ -0,0 +1,21 @@
1
+ /**
2
+ * `chant workspace graph --intent <path[:start-end]> [--at <rev>] [--kind <kind file>...] [--json]`
3
+ * (#2651): the intent graph over one region (`intent.ts`), printed as JSON
4
+ * with `--json` or as a walk, one line per node, in the order of #2650
5
+ * section B: the region, its decisions, their artifacts, the commits, and the
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).
9
+ */
10
+ import type { CommandContext } from "../cli/registry.js";
11
+ import { type IntentDocument } from "./intent.js";
12
+ type Result = Exclude<IntentDocument, {
13
+ error: unknown;
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?";
17
+ /** The walk as text, one line each, in the order of #2650 section B. */
18
+ export declare function formatIntent(doc: Result): string;
19
+ export declare function runWorkspaceIntent(ctx: CommandContext, cwd: string): Promise<number>;
20
+ export {};
21
+ //# sourceMappingURL=intent-cli.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,121 @@
1
+ /**
2
+ * The commit-join hook of the intent graph (#2651; #2650 C1 and C13).
3
+ *
4
+ * Commits, decisions and artifacts come from core. Units of work, contracts
5
+ * and evidence come from a plugin, such as chud's development model, because
6
+ * core ships no model of them (#2555, "Core ships no decision kind"). A kind
7
+ * file passed to `chant workspace graph --intent --kind <file>` supplies them
8
+ * through one export, `commitJoins`, in one of two forms:
9
+ *
10
+ * - A function `commitJoins(commit, context)` that returns the unit, contract
11
+ * and evidence for one commit, or nothing. It is given the commit's sha,
12
+ * subject, body, author, date and trailers, and a `read` function for files
13
+ * at the revision read.
14
+ * - Data, which core interprets with no plugin code: the trailer keys that
15
+ * name a unit, a contract or evidence, the record paths to read for each
16
+ * (`units/{id}.json`), and the trailer keys that claim authorship.
17
+ *
18
+ * Either way core never parses a plugin's own trailer or record format: it
19
+ * reads the trailers git reports and hands them over, and a key means
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.
30
+ */
31
+ import { z } from "zod";
32
+ /** A commit as the hook sees it. */
33
+ export interface IntentCommit {
34
+ sha: string;
35
+ subject: string;
36
+ body: string;
37
+ author: {
38
+ name: string;
39
+ email: string;
40
+ };
41
+ /** Author date, ISO 8601. */
42
+ date: string;
43
+ /** Every trailer git parses from the message, keyed as written, with each value in order. */
44
+ trailers: Record<string, string[]>;
45
+ }
46
+ export interface CommitJoinContext {
47
+ /** The text of a file from the workspace root, in the tree read; undefined when it is not a file there. */
48
+ read(path: string): string | undefined;
49
+ /** The full commit id read with `--at`, or null for the working tree. */
50
+ at: string | null;
51
+ }
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
+ */
57
+ export interface JoinedEntity {
58
+ id: string;
59
+ [field: string]: unknown;
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
+ }
69
+ /** What a join says about one commit. Every part is optional. */
70
+ export interface CommitJoin {
71
+ /** The unit of work that produced the commit. */
72
+ unit?: JoinedEntity;
73
+ /** The contract the unit served. */
74
+ contract?: JoinedEntity;
75
+ /** The evidence the unit or contract cites. */
76
+ evidence?: JoinedEntity | JoinedEntity[];
77
+ /** Trailer keys on this commit that claim who wrote it, which the plugin vouches for. */
78
+ authorship?: string[];
79
+ /** Findings about this commit, in the kind's own code namespace. Function form only. */
80
+ findings?: PluginFinding[];
81
+ }
82
+ export type CommitJoinsFunction = (commit: IntentCommit, context: CommitJoinContext) => CommitJoin | null | undefined | Promise<CommitJoin | null | undefined>;
83
+ /** The data form of `commitJoins`. */
84
+ export declare const commitJoinsDataSchema: z.ZodObject<{
85
+ trailers: z.ZodObject<{
86
+ unit: z.ZodOptional<z.ZodString>;
87
+ contract: z.ZodOptional<z.ZodString>;
88
+ evidence: z.ZodOptional<z.ZodString>;
89
+ }, z.core.$strict>;
90
+ records: z.ZodOptional<z.ZodObject<{
91
+ unit: z.ZodOptional<z.ZodString>;
92
+ contract: z.ZodOptional<z.ZodString>;
93
+ evidence: z.ZodOptional<z.ZodString>;
94
+ }, z.core.$strict>>;
95
+ authorship: z.ZodOptional<z.ZodArray<z.ZodString>>;
96
+ }, z.core.$strict>;
97
+ export type CommitJoinsData = z.infer<typeof commitJoinsDataSchema>;
98
+ /** A kind file's `commitJoins` export, checked: a function, or data. */
99
+ export type CommitJoins = {
100
+ form: "function";
101
+ join: CommitJoinsFunction;
102
+ } | {
103
+ form: "data";
104
+ data: CommitJoinsData;
105
+ };
106
+ /** Read a kind module's `commitJoins` export. Undefined when it has none; a string when it is malformed. */
107
+ export declare function readCommitJoins(mod: Record<string, unknown>): CommitJoins | string | undefined;
108
+ /** The first value of trailer `key`, compared without case as git does. */
109
+ export declare function trailerValue(trailers: Record<string, string[]>, key: string): string | undefined;
110
+ /** Whether the commit carries trailer `key`. */
111
+ export declare function hasTrailer(trailers: Record<string, string[]>, key: string): boolean;
112
+ /** Interpret the data form for one commit. Throws when a named record can't be read as JSON. */
113
+ export declare function joinByData(data: CommitJoinsData, commit: IntentCommit, context: CommitJoinContext): 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>;
121
+ //# sourceMappingURL=intent-joins.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"intent-joins.d.ts","sourceRoot":"","sources":["../../src/workspace/intent-joins.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,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,6BAA6B;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,6FAA6F;IAC7F,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;CACpC;AAED,MAAM,WAAW,iBAAiB;IAChC,2GAA2G;IAC3G,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IACvC,yEAAyE;IACzE,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;CACnB;AAED;;;;GAIG;AACH,MAAM,WA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G,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"}
@@ -0,0 +1,310 @@
1
+ /**
2
+ * The intent graph over one region: `chant workspace graph --intent
3
+ * <path[:start-end]>` (#2651; #2650 sections B and C1; #2524 D8, D15).
4
+ *
5
+ * A person points at some code and asks how it got this way and who decided
6
+ * it should be this way. This module gathers what the workspace records about
7
+ * that, as one document of nodes and edges, and decides nothing. It gathers
8
+ * three sources before it relates any of them, so no one of them frames the
9
+ * others:
10
+ *
11
+ * - The commits that touched the region, from git: `git log -L` for a line
12
+ * range, `git log --follow` for a file and `git log -- <dir>` for a
13
+ * directory. Each carries its trailers and its provenance level, and a
14
+ * plugin may join it to a unit of work, a contract and evidence
15
+ * (`intent-joins.ts`).
16
+ * - The decisions whose `constrains` cover the region: a `path:` entry that
17
+ * is the region or a directory above it, the region's `member:`, an issue
18
+ * the region's commits name, or a contract a plugin joined. Their
19
+ * supersession chains come along.
20
+ * - The artifacts those decisions pin. Artifacts relate to code only through
21
+ * decisions (#2549), so an artifact is in the graph because a decision in
22
+ * the graph pins it.
23
+ *
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. 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
30
+ * graph and hud renders it (#2524 D8, D15). Git is read through a local
31
+ * `git` subprocess only: no fetch, no network.
32
+ */
33
+ import { type LinkTableRow } from "./links.js";
34
+ import { type RecordView } from "./records-cli.js";
35
+ import type { PluginCode } from "./reason-codes.js";
36
+ import { type ProvenanceLevel } from "./trust/attestor.js";
37
+ /** The version of the `intent` document this chant writes. */
38
+ export declare const INTENT_CONTRACT_VERSION = 1;
39
+ /** `$id` of the JSON Schema for the document, shipped beside this file. */
40
+ export declare const INTENT_OUTPUT_SCHEMA_ID = "https://intentius.io/chant/schemas/workspace/intent/v1/intent.schema.json";
41
+ /** The finding codes. Closed: a reader may switch on them. */
42
+ export declare const INTENT_FINDING_CODES: readonly ["intent-commit-undecided", "intent-commit-bare", "intent-pin-drifted", "intent-pin-missing", "intent-artifact-unpinned", "intent-decision-superseded-live", "intent-decision-provisional", "intent-constraint-coarse", "intent-constraint-lost", "intent-evidence-unpinned", "intent-trailer-unverified", "intent-region-unconstrained"];
43
+ export type IntentFindingCode = (typeof INTENT_FINDING_CODES)[number];
44
+ /** Why part of the walk could not be read. The read still succeeds. */
45
+ export declare const INTENT_REASON_CODES: readonly ["intent-history-shallow", "intent-plugin-failed"];
46
+ export type IntentReasonCode = (typeof INTENT_REASON_CODES)[number];
47
+ /** Why the read failed as a whole: the declaration's codes, the record kind's codes, or a region that isn't there. */
48
+ export declare const INTENT_ERROR_CODES: readonly ["declaration-missing", "declaration-ambiguous", "declaration-unparseable", "declaration-invalid", "placement-invalid", "reader-too-old", "root-chant-required", "not-a-git-repository", "revision-unknown", "kind-unreadable", "kind-invalid", "schema-unreadable", "schema-id-mismatch", "schema-invalid", "location-missing", "intent-region-invalid"];
49
+ export type IntentErrorCode = (typeof INTENT_ERROR_CODES)[number];
50
+ export declare class IntentError extends Error {
51
+ readonly code: IntentErrorCode;
52
+ constructor(code: IntentErrorCode, message: string);
53
+ }
54
+ export interface LineRange {
55
+ start: number;
56
+ end: number;
57
+ }
58
+ export interface RegionNode {
59
+ id: string;
60
+ kind: "region";
61
+ /** From the workspace root. */
62
+ path: string;
63
+ lines: LineRange | null;
64
+ /** The member whose directory holds the path, or null. */
65
+ member: string | null;
66
+ at: string | null;
67
+ type: "file" | "dir";
68
+ /** For a file region, whether the file is generated (#2524 D14); null for a directory. */
69
+ generated: boolean | null;
70
+ /** Set when the region was given as a graph node id. */
71
+ node: string | null;
72
+ }
73
+ export interface FileNode {
74
+ id: string;
75
+ kind: "file";
76
+ path: string;
77
+ member: string | null;
78
+ generated: boolean;
79
+ }
80
+ export interface MemberNode {
81
+ id: string;
82
+ kind: "member";
83
+ name: string;
84
+ dir: string;
85
+ memberKind: string;
86
+ }
87
+ export interface CommitNode {
88
+ id: string;
89
+ kind: "commit";
90
+ sha: string;
91
+ subject: string;
92
+ author: {
93
+ name: string;
94
+ email: string;
95
+ };
96
+ date: string;
97
+ trailers: Record<string, string[]>;
98
+ /** The pull request number the subject ends with, as a squash merge writes it, or null. */
99
+ pullRequest: number | null;
100
+ signature: {
101
+ level: ProvenanceLevel;
102
+ reason: string;
103
+ principal?: string;
104
+ };
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. */
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;
115
+ }
116
+ export type CommitState = "decided" | "decided-by-window" | "undecided";
117
+ export interface JoinedNode {
118
+ id: string;
119
+ kind: "unit" | "contract" | "evidence";
120
+ /** The plugin's own id. */
121
+ ref: string;
122
+ /** The kind file that supplied it. */
123
+ plugin: string;
124
+ /** The fields the plugin gave, besides the id. */
125
+ data: Record<string, unknown>;
126
+ }
127
+ export interface EvidenceEntryNode {
128
+ id: string;
129
+ kind: "evidence";
130
+ ref: string;
131
+ plugin: null;
132
+ data: {
133
+ title: string | null;
134
+ url: string | null;
135
+ path: string | null;
136
+ as_of: string | null;
137
+ sha256: string | null;
138
+ };
139
+ }
140
+ export interface DecisionNode {
141
+ id: string;
142
+ kind: "decision";
143
+ recordKind: string;
144
+ record: string;
145
+ /** The record file, from the repository root. */
146
+ path: string;
147
+ title: string | null;
148
+ state: string | null;
149
+ /** Whether the kind counts the state as closed (final), such as ratified. */
150
+ closed: boolean;
151
+ valid: boolean;
152
+ reasons: RecordView["reasons"];
153
+ provenance: {
154
+ level: ProvenanceLevel;
155
+ commit: string | null;
156
+ reason: string;
157
+ };
158
+ decided_by: string | null;
159
+ decided_on: string | null;
160
+ reviews: {
161
+ agree: number;
162
+ dissent: number;
163
+ abstain: number;
164
+ openConcerns: number;
165
+ };
166
+ supersededBy: string | null;
167
+ /** The ids of the records this one's supersedes links name. */
168
+ supersedes: string[];
169
+ /** The constrains entries that cover the region, with their granularity. Empty for a decision in the graph only through supersession. */
170
+ constrains: {
171
+ entry: string;
172
+ granularity: Granularity;
173
+ }[];
174
+ }
175
+ export type PinState = "pinned" | "drifted" | "missing" | "stale" | "unpinned";
176
+ export interface ArtifactNode {
177
+ id: string;
178
+ kind: "artifact";
179
+ /** From the workspace root the pinning record's kind resolves pins in. */
180
+ path: string;
181
+ anchor: string | null;
182
+ /** The hash a current decision pins, or null when none does. */
183
+ pinnedSha256: string | null;
184
+ /** The file's hash in the tree read, or null when it is missing. */
185
+ currentSha256: string | null;
186
+ /** The state of a current decision's pin, or unpinned when only superseded decisions pin it. */
187
+ pinState: PinState;
188
+ }
189
+ export interface LinkNode {
190
+ id: string;
191
+ kind: "link";
192
+ row: LinkTableRow;
193
+ }
194
+ export interface FindingNode {
195
+ id: string;
196
+ kind: "finding";
197
+ /** A closed code, or a plugin's own `plugin:<name>:<code>` (#2656). */
198
+ code: IntentFindingCode | PluginCode;
199
+ message: string;
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[];
205
+ }
206
+ export type IntentNode = RegionNode | FileNode | MemberNode | CommitNode | JoinedNode | EvidenceEntryNode | DecisionNode | ArtifactNode | LinkNode | FindingNode;
207
+ export type Granularity = "path" | "member" | "contract" | "issue";
208
+ export type IntentEdge = {
209
+ kind: "constrains";
210
+ from: string;
211
+ to: string;
212
+ granularity: Granularity;
213
+ entry: string;
214
+ } | {
215
+ kind: "pins";
216
+ from: string;
217
+ to: string;
218
+ pinnedSha256: string | null;
219
+ pinState: PinState;
220
+ } | {
221
+ kind: "touched-by";
222
+ from: string;
223
+ to: string;
224
+ lines: LineRange[] | null;
225
+ } | {
226
+ kind: "within";
227
+ from: string;
228
+ to: string;
229
+ state: "decided" | "decided-by-window";
230
+ } | {
231
+ kind: "produced-by" | "serves" | "cites-evidence" | "supersedes" | "links";
232
+ from: string;
233
+ to: string;
234
+ };
235
+ export interface IntentReason {
236
+ code: IntentReasonCode;
237
+ message: string;
238
+ }
239
+ interface Head {
240
+ $schema: string;
241
+ contract: number;
242
+ chant: string;
243
+ }
244
+ export type IntentDocument = (Head & {
245
+ at: string | null;
246
+ workspace: {
247
+ name: string;
248
+ root: string;
249
+ };
250
+ region: string;
251
+ history: {
252
+ rev: string | null;
253
+ follows: "line-range" | "file" | "directory";
254
+ shallow: boolean;
255
+ };
256
+ kinds: {
257
+ file: string;
258
+ name: string;
259
+ records: string | null;
260
+ joins: "function" | "data" | null;
261
+ }[];
262
+ nodes: IntentNode[];
263
+ edges: IntentEdge[];
264
+ reasons: IntentReason[];
265
+ summary: {
266
+ commits: number;
267
+ decisions: number;
268
+ artifacts: number;
269
+ findings: number;
270
+ };
271
+ }) | (Head & {
272
+ error: {
273
+ code: IntentErrorCode;
274
+ message: string;
275
+ };
276
+ });
277
+ export interface IntentQuery {
278
+ /** Where the walk up to the declaration starts, and what the region path is relative to. */
279
+ cwd: string;
280
+ /** `path`, `path:line` or `path:start-end`, or a graph node id `<member>/<id>`. */
281
+ region: string;
282
+ at?: string;
283
+ /** Kind files: record kinds, plugins with `commitJoins`, or both. Relative to `cwd`. */
284
+ kinds?: string[];
285
+ /**
286
+ * Resolve a graph node id to its source location, for a region given as a
287
+ * node id. The default reads the member's graph as `chant workspace graph
288
+ * --member` does.
289
+ */
290
+ resolveNode?: (cwd: string, at: string | undefined, member: string, id: string) => Promise<{
291
+ file: string;
292
+ line: number | null;
293
+ } | null | undefined>;
294
+ }
295
+ export interface IntentResult {
296
+ doc: IntentDocument;
297
+ /** The read failed, or a plugin failed. */
298
+ failed: boolean;
299
+ }
300
+ /** Parse `path`, `path:line` or `path:start-end`. */
301
+ export declare function parseRegion(arg: string): {
302
+ path: string;
303
+ lines: LineRange | null;
304
+ } | {
305
+ error: string;
306
+ };
307
+ /** Build the intent document. Never throws an {@link IntentError}, {@link WorkspaceReadError} or {@link RecordReadError}. */
308
+ export declare function intentGraph(query: IntentQuery): Promise<IntentResult>;
309
+ export {};
310
+ //# sourceMappingURL=intent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"intent.d.ts","sourceRoot":"","sources":["../../src/workspace/intent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AASH,OAAO,EAAgB,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AAI1D,OAAO,EAAgB,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,KAAK,EAAE,UA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AAS,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;CACtJ;AAED,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,cAAc,CAAC;IACpB,2CAA2C;IAC3C,MAAM,EAAE,OAAO,CAAC;CACjB;AAiHD,qDAAqD;AACrD,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,SAAS,GAAG,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;;;;;;;;;;;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AAE,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAQ3E;AAwCD,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,YAAY,GAAG,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,cAAc,CAEzK;AAED,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,CA+EnG"}
@@ -53,12 +53,31 @@ export declare const REASONS: {
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.";
59
60
  readonly "schema-id-mismatch": "The schema's $id differs from the id the record kind names.";
60
61
  readonly "schema-invalid": "The record schema itself does not compile.";
61
62
  readonly "location-missing": "The records directory does not exist, in the tree or at the revision.";
63
+ readonly "intent-region-invalid": "The region's path, or its line range, does not exist in the tree read.";
64
+ readonly "intent-history-shallow": "The repository is a shallow clone, so the region's history stops at the clone's boundary.";
65
+ readonly "intent-plugin-failed": "A kind file's commitJoins, which joins commits to units, contracts and evidence, failed for a commit.";
66
+ readonly "intent-commit-undecided": "A commit changed the region when no decision constrained it at path granularity.";
67
+ readonly "intent-commit-bare": "A commit names no unit, no pull request and no decision covering the region at its time.";
68
+ readonly "intent-pin-drifted": "A decision's pinned artifact no longer hashes to the pin.";
69
+ readonly "intent-pin-missing": "A decision's pinned artifact does not exist in the tree read.";
70
+ readonly "intent-artifact-unpinned": "An artifact decisions in the graph pinned, which no current decision pins.";
71
+ readonly "intent-decision-superseded-live": "Every decision constraining the region is superseded.";
72
+ readonly "intent-decision-provisional": "The current decisions constraining the region are all in states their kind does not close, such as decided.";
73
+ readonly "intent-constraint-coarse": "The region is constrained only through its member, not by path.";
74
+ readonly "intent-constraint-lost": "A decision's path constraint names a path that does not exist in the tree read.";
75
+ readonly "intent-evidence-unpinned": "A decision's evidence has no hash: a URL, or a path with no sha256.";
76
+ readonly "intent-trailer-unverified": "A commit carries a trailer a plugin says claims authorship, and the commit is not attested.";
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.";
62
81
  readonly "lock-invalid": "The lineage lock can't be read.";
63
82
  readonly "manual-step-open": "A scope in the lineage lock has an open manual step.";
64
83
  };
@@ -66,4 +85,14 @@ export type ReasonCode = keyof typeof REASONS;
66
85
  /** Every code, in the order of {@link REASONS}. */
67
86
  export declare const REASON_CODES: ReasonCode[];
68
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;
69
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgDV,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;
@@ -83,6 +83,12 @@ export interface LoadedRecordKind {
83
83
  dir: string;
84
84
  schema: Record<string, unknown>;
85
85
  }
86
+ /**
87
+ * Import the kind file at `path` through the path loader lexicons use (#2520).
88
+ * The kind is registered under a name no lexicon package can have (npm names
89
+ * hold no `:`), imported and unregistered again, so no lexicon lookup sees it.
90
+ */
91
+ export declare function importKindModule(path: string): Promise<Record<string, unknown>>;
86
92
  /** Load a kind file and the schema it names. `path` is resolved against `cwd`. */
87
93
  export declare function loadRecordKind(path: string, cwd?: string): Promise<LoadedRecordKind>;
88
94
  export type FrontMatter = {
@@ -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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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] } } : {}),