@intentius/chant 0.85.0 → 0.87.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 (129) hide show
  1. package/dist/cli/main.d.ts.map +1 -1
  2. package/dist/cli/registry.d.ts +13 -1
  3. package/dist/cli/registry.d.ts.map +1 -1
  4. package/dist/lifecycle/gate-ledger.d.ts +13 -0
  5. package/dist/lifecycle/gate-ledger.d.ts.map +1 -1
  6. package/dist/workspace/__fixtures__/sessions.d.ts +23 -0
  7. package/dist/workspace/__fixtures__/sessions.d.ts.map +1 -0
  8. package/dist/workspace/checks/records.d.ts +1 -0
  9. package/dist/workspace/checks/records.d.ts.map +1 -1
  10. package/dist/workspace/checks.d.ts +4 -0
  11. package/dist/workspace/checks.d.ts.map +1 -1
  12. package/dist/workspace/composites.d.ts +14 -1
  13. package/dist/workspace/composites.d.ts.map +1 -1
  14. package/dist/workspace/conformance/index.d.ts +211 -0
  15. package/dist/workspace/conformance/index.d.ts.map +1 -0
  16. package/dist/workspace/conformance/vitest.d.ts +11 -0
  17. package/dist/workspace/conformance/vitest.d.ts.map +1 -0
  18. package/dist/workspace/declaration.d.ts +28 -0
  19. package/dist/workspace/declaration.d.ts.map +1 -1
  20. package/dist/workspace/declaration.schema.json +40 -0
  21. package/dist/workspace/declared-kinds.d.ts +43 -0
  22. package/dist/workspace/declared-kinds.d.ts.map +1 -0
  23. package/dist/workspace/graph-cli.d.ts +11 -0
  24. package/dist/workspace/graph-cli.d.ts.map +1 -1
  25. package/dist/workspace/intent-cli.d.ts +2 -1
  26. package/dist/workspace/intent-cli.d.ts.map +1 -1
  27. package/dist/workspace/intent-joins.d.ts +45 -8
  28. package/dist/workspace/intent-joins.d.ts.map +1 -1
  29. package/dist/workspace/intent.d.ts +71 -7
  30. package/dist/workspace/intent.d.ts.map +1 -1
  31. package/dist/workspace/ls.d.ts +31 -1
  32. package/dist/workspace/ls.d.ts.map +1 -1
  33. package/dist/workspace/reason-codes.d.ts +47 -4
  34. package/dist/workspace/reason-codes.d.ts.map +1 -1
  35. package/dist/workspace/record-sessions.d.ts +51 -0
  36. package/dist/workspace/record-sessions.d.ts.map +1 -0
  37. package/dist/workspace/record-source.d.ts +2 -0
  38. package/dist/workspace/record-source.d.ts.map +1 -1
  39. package/dist/workspace/records-cli.d.ts +71 -4
  40. package/dist/workspace/records-cli.d.ts.map +1 -1
  41. package/dist/workspace/records-since.d.ts +90 -0
  42. package/dist/workspace/records-since.d.ts.map +1 -0
  43. package/dist/workspace/records-write.d.ts +171 -0
  44. package/dist/workspace/records-write.d.ts.map +1 -0
  45. package/dist/workspace/records.d.ts +244 -15
  46. package/dist/workspace/records.d.ts.map +1 -1
  47. package/dist/workspace/runtimes.d.ts +60 -0
  48. package/dist/workspace/runtimes.d.ts.map +1 -0
  49. package/dist/workspace/status-gates.d.ts +90 -0
  50. package/dist/workspace/status-gates.d.ts.map +1 -0
  51. package/dist/workspace/status.d.ts +17 -0
  52. package/dist/workspace/status.d.ts.map +1 -1
  53. package/dist/workspace/trust/seal.d.ts +85 -0
  54. package/dist/workspace/trust/seal.d.ts.map +1 -0
  55. package/dist/workspace/trust/ssh-commit.d.ts +7 -0
  56. package/dist/workspace/trust/ssh-commit.d.ts.map +1 -1
  57. package/dist/workspace/work.d.ts +56 -0
  58. package/dist/workspace/work.d.ts.map +1 -0
  59. package/package.json +19 -1
  60. package/src/cli/main.ts +55 -3
  61. package/src/cli/registry.ts +13 -1
  62. package/src/lifecycle/gate-ledger.ts +14 -0
  63. package/src/workspace/__fixtures__/sessions.ts +66 -0
  64. package/src/workspace/checks/records.ts +19 -0
  65. package/src/workspace/checks.test.ts +2 -0
  66. package/src/workspace/checks.ts +7 -1
  67. package/src/workspace/composites.schema.json +65 -3
  68. package/src/workspace/composites.test.ts +95 -5
  69. package/src/workspace/composites.ts +28 -7
  70. package/src/workspace/conformance/__fixture__/app/package.json +7 -0
  71. package/src/workspace/conformance/__fixture__/app/src/server.mjs +29 -0
  72. package/src/workspace/conformance/__fixture__/decisions/decision.kind.mjs +32 -0
  73. package/src/workspace/conformance/__fixture__/decisions/decision.schema.json +376 -0
  74. package/src/workspace/conformance/__fixture__/decisions/fix-001-how-the-app-is-deployed.md +40 -0
  75. package/src/workspace/conformance/__fixture__/delivery/chant.config.ts +7 -0
  76. package/src/workspace/conformance/__fixture__/delivery/lexicon/index.ts +26 -0
  77. package/src/workspace/conformance/__fixture__/delivery/package.json +7 -0
  78. package/src/workspace/conformance/__fixture__/delivery/src/app.component.ts +14 -0
  79. package/src/workspace/conformance/__fixture__/delivery/src/app.ts +4 -0
  80. package/src/workspace/conformance/conformance.test.ts +149 -0
  81. package/src/workspace/conformance/index.mjs +31 -0
  82. package/src/workspace/conformance/index.ts +453 -0
  83. package/src/workspace/conformance/vitest.ts +62 -0
  84. package/src/workspace/declaration.schema.json +40 -0
  85. package/src/workspace/declaration.ts +62 -0
  86. package/src/workspace/declared-kinds.test.ts +321 -0
  87. package/src/workspace/declared-kinds.ts +76 -0
  88. package/src/workspace/graph-cli.ts +8 -0
  89. package/src/workspace/intent-cli.ts +29 -6
  90. package/src/workspace/intent-gaps.test.ts +217 -0
  91. package/src/workspace/intent-joins.test.ts +60 -0
  92. package/src/workspace/intent-joins.ts +71 -19
  93. package/src/workspace/intent.schema.json +304 -7
  94. package/src/workspace/intent.test.ts +99 -0
  95. package/src/workspace/intent.ts +365 -46
  96. package/src/workspace/ls.schema.json +34 -0
  97. package/src/workspace/ls.ts +69 -4
  98. package/src/workspace/read-contract.test.ts +30 -9
  99. package/src/workspace/reason-codes.test.ts +16 -4
  100. package/src/workspace/reason-codes.ts +55 -4
  101. package/src/workspace/record-assets.test.ts +3 -1
  102. package/src/workspace/record-sessions.ts +105 -0
  103. package/src/workspace/record-source.ts +14 -5
  104. package/src/workspace/records-amend.schema.json +167 -0
  105. package/src/workspace/records-cli.ts +308 -19
  106. package/src/workspace/records-contract.test.ts +57 -2
  107. package/src/workspace/records-formats.test.ts +640 -0
  108. package/src/workspace/records-new.schema.json +158 -0
  109. package/src/workspace/records-quorum.test.ts +196 -0
  110. package/src/workspace/records-review.schema.json +227 -0
  111. package/src/workspace/records-sessions.test.ts +108 -0
  112. package/src/workspace/records-since.schema.json +193 -0
  113. package/src/workspace/records-since.test.ts +174 -0
  114. package/src/workspace/records-since.ts +259 -0
  115. package/src/workspace/records-write-contract.test.ts +125 -0
  116. package/src/workspace/records-write.test.ts +373 -0
  117. package/src/workspace/records-write.ts +765 -0
  118. package/src/workspace/records.schema.json +202 -9
  119. package/src/workspace/records.ts +700 -41
  120. package/src/workspace/runtimes.ts +107 -0
  121. package/src/workspace/status-contract.test.ts +163 -0
  122. package/src/workspace/status-gates.ts +215 -0
  123. package/src/workspace/status.schema.json +69 -3
  124. package/src/workspace/status.ts +35 -2
  125. package/src/workspace/trust/seal.test.ts +232 -0
  126. package/src/workspace/trust/seal.ts +195 -0
  127. package/src/workspace/trust/ssh-commit.ts +2 -2
  128. package/src/workspace/work.test.ts +390 -0
  129. package/src/workspace/work.ts +163 -0
@@ -44,22 +44,57 @@ export declare const REASONS: {
44
44
  readonly "ir-version-unsupported": "The member's IR has a version this chant can't read.";
45
45
  readonly "ledger-unreadable": "Reading the ledger failed, so nothing from it is listed.";
46
46
  readonly "ledger-malformed": "Some lines of the ledger aren't release records; the rest are listed.";
47
- readonly "record-unparseable": "No front matter, a YAML error, or a value outside the JSON subset of YAML.";
48
- readonly "record-schema-invalid": "The front matter does not match the kind's schema.";
47
+ readonly "gates-no-ledger": "The checkout has no chant/lifecycle branch, so there is no gate ledger to read.";
48
+ readonly "gates-no-gate-ledger": "The branch has no gate ledger for the member: no run of it has reached a gate.";
49
+ readonly "gates-ledger-unreadable": "Reading the member's gate ledger failed, so no gate is listed.";
50
+ readonly "record-unparseable": "No front matter, a YAML error or a value outside the JSON subset of YAML, or for a JSON kind a file that is not one object or repeats a member name.";
51
+ readonly "record-schema-invalid": "The record's front matter, or its JSON object, does not match the kind's schema.";
49
52
  readonly "record-id-duplicate": "Another record earlier in path order has the same id.";
50
53
  readonly "record-supersedes-unknown": "A supersedes link names an id no record has.";
51
54
  readonly "record-supersedes-conflict": "A second closed record supersedes a record another one already superseded.";
55
+ readonly "session-seal-mismatch": "A closed session's seal is not the digest of its text: the session changed after it closed.";
56
+ readonly "session-verdict-unknown-record": "A session's verdict names a record that none of the session kind's subject records has.";
52
57
  readonly "asset-drift": "A file the record pins by hash has changed: its bytes no longer hash to the pinned sha256.";
53
58
  readonly "asset-missing": "A file the record pins by hash does not exist in the tree read.";
54
59
  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
60
  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
61
  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.";
62
+ readonly "review-undigested": "A verdict names no digest of the text it judged. It still counts, and an amendment does not stop it counting.";
63
+ readonly "work-needs-unknown": "A work record's needs list names a work id no record has, so the item stays blocked.";
64
+ readonly "work-implements-unknown": "A work record's implements list names a decision id no decision has.";
65
+ readonly "work-needs-cycle": "A work record needs itself through its needs links, so it can never be ready.";
66
+ readonly "work-implements-undecided": "A work record implements a decision whose state is not approved, such as proposed.";
67
+ readonly "work-done-unpinned": "A work record is done and its evidence list is empty: nothing shows the work was done.";
68
+ readonly "work-closed-without-date": "A work record is done or dropped and has no closing date.";
69
+ readonly "work-done-gap-open": "A work record is done, and the finding it came from still fires on its region. graph --intent raises it, and records does by walking that region.";
70
+ readonly "review-decider": "The verdict is the decider's own, and the quorum counts verdicts besides the decider's.";
71
+ readonly "review-agent": "The reviewer holds the agent role in the trust policy at base.";
72
+ readonly "review-duplicate": "A later verdict by the same principal replaces this one. Names are compared after NFKC, trimming and lower-casing.";
73
+ readonly "review-older-digest": "The verdict names a digest other than the record's text now: the record changed after the verdict.";
74
+ readonly "review-unattested": "An attestation policy is active at base, and the verdict carries no seal that verifies for its reviewer.";
75
+ readonly "seal-missing": "The verdict carries no seal.";
76
+ readonly "seal-signer-unlisted": "The reviewer has no key in the signers file at base, so the seal can't count.";
77
+ readonly "seal-signature-invalid": "The seal is malformed, names a signer other than the reviewer, or its signature does not verify over the verdict.";
78
+ readonly "seal-unverifiable": "Nothing here can say whose seal it is: there is no signers file at base, or ssh-keygen is not installed.";
57
79
  readonly "kind-unreadable": "The record kind file is missing or could not be imported.";
58
80
  readonly "kind-invalid": "The record kind file exports no recordKind, or its shape is wrong.";
59
81
  readonly "schema-unreadable": "The schema file the record kind names is missing or is not JSON.";
60
82
  readonly "schema-id-mismatch": "The schema's $id differs from the id the record kind names.";
61
83
  readonly "schema-invalid": "The record schema itself does not compile.";
62
84
  readonly "location-missing": "The records directory does not exist, in the tree or at the revision.";
85
+ readonly "write-usage-invalid": "The command line lacks a value the write needs, or gives one it does not take.";
86
+ readonly "write-input-invalid": "The fields given with --from or --set can't be read, are not JSON, or are not a JSON object.";
87
+ readonly "record-not-found": "No record of the kind has the id given.";
88
+ readonly "record-id-taken": "The id given for a new record is already used, by a record or a file name.";
89
+ readonly "record-id-unallocatable": "No id was given and none can be allocated: the records share no single prefix and --prefix names none.";
90
+ readonly "record-path-unmatched": "The file name made from the record's id and title does not match the kind's location.";
91
+ readonly "record-closed": "The record is in a closed state, so nothing in it changes; a new record supersedes it instead.";
92
+ readonly "amend-id-immutable": "An amendment changes the record's id, and ids are never renumbered.";
93
+ readonly "amend-supersede-instead": "The record is approved, and the amendment changes a field the approval rule does not let change in place; a new record supersedes it instead.";
94
+ readonly "review-unsupported": "The kind's schema has no reviews field, so its records take no review.";
95
+ readonly "review-note-required": "A dissent was given with no note: a dissent needs a reason.";
96
+ readonly "review-sign-failed": "--sign was given and no seal could be made: the key can't be read or used, git names no ssh signing key, or ssh-keygen is not installed.";
97
+ readonly "since-rev-unknown": "--since names no commit.";
63
98
  readonly "intent-region-invalid": "The region's path, or its line range, does not exist in the tree read.";
64
99
  readonly "intent-history-shallow": "The repository is a shallow clone, so the region's history stops at the clone's boundary.";
65
100
  readonly "intent-plugin-failed": "A kind file's commitJoins, which joins commits to units, contracts and evidence, failed for a commit.";
@@ -67,17 +102,24 @@ export declare const REASONS: {
67
102
  readonly "intent-commit-bare": "A commit names no unit, no pull request and no decision covering the region at its time.";
68
103
  readonly "intent-pin-drifted": "A decision's pinned artifact no longer hashes to the pin.";
69
104
  readonly "intent-pin-missing": "A decision's pinned artifact does not exist in the tree read.";
105
+ readonly "intent-pin-stale": "A current decision pins an artifact at the hash a record it supersedes pinned, and the artifact has not changed since: the decision moved on and the artifact did not.";
70
106
  readonly "intent-artifact-unpinned": "An artifact decisions in the graph pinned, which no current decision pins.";
71
107
  readonly "intent-decision-superseded-live": "Every decision constraining the region is superseded.";
72
108
  readonly "intent-decision-provisional": "The current decisions constraining the region are all in states their kind does not close, such as decided.";
109
+ readonly "intent-decision-contested": "A current decision constraining the region has an open concern: a dissent neither addressed nor withdrawn.";
73
110
  readonly "intent-constraint-coarse": "The region is constrained only through its member, not by path.";
74
111
  readonly "intent-constraint-lost": "A decision's path constraint names a path that does not exist in the tree read.";
75
112
  readonly "intent-evidence-unpinned": "A decision's evidence has no hash: a URL, or a path with no sha256.";
76
113
  readonly "intent-trailer-unverified": "A commit carries a trailer a plugin says claims authorship, and the commit is not attested.";
77
114
  readonly "intent-region-unconstrained": "No decision constrains the region at any granularity.";
115
+ readonly "intent-decision-unimplemented": "A decided decision constrains the region, no work item that is not dropped implements it, and no commit falls in its window.";
116
+ readonly "intent-work-blocked": "A work item constraining the region has commits in its window while a work item it needs is not done.";
117
+ readonly "intent-work-open-decided-code": "Commits in the region are a decision's own work while the work item implementing that decision is still open.";
78
118
  readonly "composites-no-chant-member": "No member of kind chant was read, so nothing declares a composite instance or a component.";
79
119
  readonly "composites-none-declared": "The members read declare no composite instance.";
80
120
  readonly "composites-no-component": "The members read declare no component, so no composite instance has one.";
121
+ readonly "runtimes-config-unreadable": "The member's chant.config.ts could not be read, so only the built-in local runtime is listed.";
122
+ readonly "runtimes-lexicon-unreadable": "A lexicon the member's config lists could not be loaded, so it is not listed as a runtime.";
81
123
  readonly "lock-invalid": "The lineage lock can't be read.";
82
124
  readonly "manual-step-open": "A scope in the lineage lock has an open manual step.";
83
125
  };
@@ -88,11 +130,12 @@ export declare function isReasonCode(value: unknown): value is ReasonCode;
88
130
  /**
89
131
  * A finding code a plugin contributes to the intent graph through its
90
132
  * `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
133
+ * name, or the kind file's `commitJoinsName` when it has one (#2663), and
134
+ * `<code>` is lower case words joined by dashes. These are outside the
92
135
  * closed list: the plugin owns its namespace, and core only carries them.
93
136
  */
94
137
  export type PluginCode = `plugin:${string}:${string}`;
95
138
  export declare const PLUGIN_CODE: RegExp;
96
- /** Whether `value` is a plugin code, and, given `name`, one in that kind's namespace. */
139
+ /** Whether `value` is a plugin code, and, given `name` (a kind's name or its `commitJoinsName`), one in that namespace. */
97
140
  export declare function isPluginCode(value: unknown, name?: string): value is PluginCode;
98
141
  //# 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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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"}
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyHV,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;;;;;;GAMG;AACH,MAAM,MAAM,UAAU,GAAG,UAAU,MAAM,IAAI,MAAM,EAAE,CAAC;AAEtD,eAAO,MAAM,WAAW,QAAkD,CAAC;AAE3E,2HAA2H;AAC3H,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,KAAK,IAAI,UAAU,CAI/E"}
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Review sessions (#2673, #2650 C10): a record kind whose records are the
3
+ * sessions a group reviewed records in. A session kind names, in its
4
+ * `session` declaration, the list of verdicts a session produced, the field
5
+ * that seals it once closed, and the kind file of the records its verdicts
6
+ * name (the subjects, such as decisions).
7
+ *
8
+ * On read, a closed session's seal has to match its text
9
+ * (`session-seal-mismatch`), and each verdict has to name a subject record
10
+ * that exists (`session-verdict-unknown-record`). Each session also lists the
11
+ * subjects' review entries that name it in their `session` field, as
12
+ * `citedBy`. This module only reads; nothing here writes a seal into a file.
13
+ */
14
+ import { type RecordEntry, type RecordFormat, type RecordKind } from "./records.js";
15
+ /** A subject record's review entry that names a session in its `session` field. */
16
+ export interface SessionCitation {
17
+ /** The subject record's id. */
18
+ id: string;
19
+ /** The subject record's path, from the repository root. */
20
+ path: string;
21
+ /** The entry's position in the subject's reviews list, from 0. */
22
+ index: number;
23
+ /** The reviewer as the entry writes it, or null when it names none. */
24
+ reviewer: string | null;
25
+ /** The verdict as the entry writes it, or null when it names none. */
26
+ verdict: string | null;
27
+ }
28
+ /**
29
+ * The seal of a session record: {@link recordTextDigest} with the seal field
30
+ * in place of the reviews list. That is the lowercase hex SHA-256 of the
31
+ * file's text with LF line endings and without the front-matter line that
32
+ * holds the seal, a quoted string on one line. Every other byte, the `---`
33
+ * lines and the body included, is kept.
34
+ *
35
+ * `awk 'NR==1&&/^---$/{f=1;print;next} f&&/^---$/{f=0} f&&/^closed_digest:/{next} {print}' S-0001.md | shasum -a 256`
36
+ * gives the same value for a file with LF line endings that ends in one.
37
+ * For a session kind of format json (ws-053), the seal member is removed by
38
+ * the JSON rule of {@link recordTextDigest} instead.
39
+ */
40
+ export declare function sessionSeal(text: string, field: string, format?: RecordFormat): string;
41
+ /**
42
+ * Check each session in `entries` against its seal and the subject records,
43
+ * and fill in `citedBy`. `texts` holds each entry's file text by path.
44
+ * `subjects` holds the subject records and the name of their reviews list;
45
+ * it is null when they were not read, and then no verdict is checked.
46
+ */
47
+ export declare function joinSessions(kind: RecordKind, entries: RecordEntry[], texts: Map<string, string>, subjects: {
48
+ records: RecordEntry[];
49
+ reviews: string;
50
+ } | null): void;
51
+ //# sourceMappingURL=record-sessions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"record-sessions.d.ts","sourceRoot":"","sources":["../../src/workspace/record-sessions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAoB,KAAK,WAAW,EAAE,KAAK,YAAY,EAAE,KAAK,UAAU,EAAE,MAAM,WAAW,CAAC;AAEnG,mFAAmF;AACnF,MAAM,WAAW,eAAe;IAC9B,+BAA+B;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,2DAA2D;IAC3D,IAAI,EAAE,MAAM,CAAC;IACb,kEAAkE;IAClE,KAAK,EAAE,MAAM,CAAC;IACd,uEAAuE;IACvE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,sEAAsE;IACtE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,GAAE,YAAsC,GAAG,MAAM,CAE/G;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,WAAW,EAAE,EAAE,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,QAAQ,EAAE;IAAE,OAAO,EAAE,WAAW,EAAE,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,GAAG,IAAI,CAoDrK"}
@@ -10,6 +10,8 @@ export interface RecordSource {
10
10
  list(dir: string): string[] | undefined;
11
11
  /** The text of a file listed by `list`. */
12
12
  read(path: string): string;
13
+ /** The bytes of a file listed by `list`, for a content-addressed id (ws-053). */
14
+ bytes(path: string): Uint8Array;
13
15
  }
14
16
  /** Records in the working tree under `root`. */
15
17
  export declare function workingTreeSource(root: string): RecordSource;
@@ -1 +1 @@
1
- {"version":3,"file":"record-source.d.ts","sourceRoot":"","sources":["../../src/workspace/record-source.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH,MAAM,WAAW,YAAY;IAC3B,gFAAgF;IAChF,KAAK,EAAE,MAAM,CAAC;IACd,kHAAkH;IAClH,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC;IACxC,2CAA2C;IAC3C,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;CAC5B;AAED,gDAAgD;AAChD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,CAgB5D;AAYD,6EAA6E;AAC7E,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAMvD;AAED,kEAAkE;AAClE,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAOjE;AAED,gGAAgG;AAChG,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,YAAY,CA+C5E"}
1
+ {"version":3,"file":"record-source.d.ts","sourceRoot":"","sources":["../../src/workspace/record-source.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH,MAAM,WAAW,YAAY;IAC3B,gFAAgF;IAChF,KAAK,EAAE,MAAM,CAAC;IACd,kHAAkH;IAClH,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC;IACxC,2CAA2C;IAC3C,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,iFAAiF;IACjF,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAAC;CACjC;AAED,gDAAgD;AAChD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,CAmB5D;AAYD,6EAA6E;AAC7E,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAMvD;AAED,kEAAkE;AAClE,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAOjE;AAED,gGAAgG;AAChG,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,YAAY,CAmD5E"}
@@ -8,11 +8,19 @@
8
8
  * the exit code is 0 whenever the read itself worked. Only a kind, schema or
9
9
  * revision that cannot be read exits 1.
10
10
  *
11
- * It needs no `chant.workspace.json`. The kind is passed explicitly, so
12
- * nothing is inferred (#2525 rule 1).
11
+ * It needs no `chant.workspace.json`. The kind is passed explicitly, or,
12
+ * without `--kind`, it is every record kind the declaration names (#2680), so
13
+ * nothing is inferred (#2525 rule 1). Several kinds print one document per
14
+ * kind, in the declaration's order, inside one set.
15
+ *
16
+ * With `--since <rev>` it prints what changed between two revisions instead,
17
+ * through `records-since.ts` (#2673).
13
18
  */
14
19
  import type { CommandContext } from "../cli/registry.js";
15
- import { type LoadedRecordKind, type ReadErrorCode, type ReadRecordsResult, type RecordEntry } from "./records.js";
20
+ import { type RecordKindDeclaration } from "./declaration.js";
21
+ import { type LoadedRecordKind, type Quorum, type ReadErrorCode, type ReadRecordsResult, type RecordEntry, type RecordFormat } from "./records.js";
22
+ import { type WorkspaceTree } from "./tree.js";
23
+ import type { DecisionWork } from "./work.js";
16
24
  import { type ProvenanceLevel } from "./trust/attestor.js";
17
25
  import { type BaseSource, type RecordProvenance } from "./trust/provenance.js";
18
26
  /** The version of the `records` output this chant writes. */
@@ -29,11 +37,23 @@ export interface RecordsQuery {
29
37
  base?: string;
30
38
  /** Where `kind` is resolved from and the repository is found. */
31
39
  cwd: string;
40
+ /**
41
+ * For a work kind: walk the region of each done item's `source` and raise
42
+ * `work-done-gap-open` when its finding still fires (#2686). On unless
43
+ * false; the intent graph passes false, since it raises the warning itself.
44
+ */
45
+ workGaps?: boolean;
32
46
  }
33
- /** A record as the output carries it: the entry plus its provenance (#2547). */
47
+ /**
48
+ * A record as the output carries it: the entry plus its provenance (#2547),
49
+ * and its quorum when the kind has a reviews list (#2671).
50
+ */
34
51
  export type RecordView = RecordEntry & {
35
52
  provenance: RecordProvenance;
53
+ quorum?: Quorum | null;
36
54
  };
55
+ /** The role in the trust policy whose holders' verdicts the quorum does not count (#2671). */
56
+ export declare const AGENT_ROLE = "agent";
37
57
  /** Where provenance was judged from (#2547). */
38
58
  export interface TrustView {
39
59
  /** The full commit id the policy was read at, or null when there is no base. */
@@ -52,6 +72,7 @@ export type RecordsDocument = {
52
72
  name: string;
53
73
  schema: string;
54
74
  file: string;
75
+ format: RecordFormat;
55
76
  };
56
77
  at: string | null;
57
78
  /** The directory pinned paths resolve in, from the repository root: the workspace holding the kind file, or the repository root (#2549). */
@@ -65,6 +86,8 @@ export type RecordsDocument = {
65
86
  invalid: number;
66
87
  superseded: number;
67
88
  };
89
+ /** For a work kind (#2683): each decision its decision kind reads, with the work records implementing it. */
90
+ decisions?: DecisionWork[];
68
91
  } | {
69
92
  $schema: string;
70
93
  contract: number;
@@ -73,6 +96,41 @@ export type RecordsDocument = {
73
96
  message: string;
74
97
  };
75
98
  };
99
+ /** Where a document in a {@link RecordsSetDocument} comes from: the declaration's entry for its kind (#2680). */
100
+ export interface DeclaredKindView {
101
+ /** The member that declares the kind, or null for the workspace's own. */
102
+ member: string | null;
103
+ /** The kind file from the workspace root. */
104
+ path: string;
105
+ /** The name the declaration gives the kind, or null. */
106
+ name: string | null;
107
+ }
108
+ /**
109
+ * The `records` output without `--kind` when the declaration names record
110
+ * kinds (#2680): one {@link RecordsDocument} per kind, in the declaration's
111
+ * order, each with the entry that declares it.
112
+ */
113
+ export interface RecordsSetDocument {
114
+ $schema: string;
115
+ contract: number;
116
+ kinds: (RecordsDocument & {
117
+ declared: DeclaredKindView;
118
+ })[];
119
+ }
120
+ /**
121
+ * The record kinds the declaration nearest above `cwd` names, in the tree
122
+ * `at` reads, with each kind file on disk. Empty when there is no declaration.
123
+ * Throws a {@link WorkspaceReadError} for one that can't be read.
124
+ */
125
+ export declare function declaredKindFiles(cwd: string, at?: string): {
126
+ declared: RecordKindDeclaration;
127
+ file: string;
128
+ }[];
129
+ /** Read every declared kind in `kinds`, as {@link queryRecords} reads one. */
130
+ export declare function queryDeclaredRecords(kinds: {
131
+ declared: RecordKindDeclaration;
132
+ file: string;
133
+ }[], query: Omit<RecordsQuery, "kind">): Promise<RecordsSetDocument>;
76
134
  /** A records read, before provenance. */
77
135
  export interface RecordsRead {
78
136
  loaded: LoadedRecordKind;
@@ -83,8 +141,16 @@ export interface RecordsRead {
83
141
  at: string | null;
84
142
  /** Where pinned paths resolve, relative to `root` ("." for the root itself). */
85
143
  workspaceRoot: string;
144
+ /** The workspace root's tree, as read: the working tree, or the revision under `--at`. */
145
+ tree: WorkspaceTree;
86
146
  result: ReadRecordsResult;
87
147
  }
148
+ /**
149
+ * Where a kind's pinned paths resolve: the workspace whose declaration sits
150
+ * nearest above the kind file, when it is inside the repository, or else the
151
+ * repository root. Relative to `root`, with / separators.
152
+ */
153
+ export declare function pinRoot(kindFile: string, root: string): string;
88
154
  /**
89
155
  * Load the kind and read its records, in the working tree or at `query.at`,
90
156
  * with each pin checked in the same tree. Throws a {@link RecordReadError}.
@@ -105,6 +171,7 @@ export declare function pinFile(file: string, cwd: string): {
105
171
  error: string;
106
172
  };
107
173
  export declare function runWorkspaceRecords(ctx: CommandContext): Promise<number>;
174
+ export declare function realpathOr(dir: string): string;
108
175
  /** Records whose provenance falls below `required`. Only `attested` can be required. */
109
176
  export declare function belowRequired(records: RecordView[], required: ProvenanceLevel): RecordView[];
110
177
  /** `chant workspace <anything else>`. */
@@ -1 +1 @@
1
- {"version":3,"file":"records-cli.d.ts","sourceRoot":"","sources":["../../src/workspace/records-cli.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAMH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAItD,OAAO,EAAgD,KAAK,gBAAgB,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,0FAA0F;IAC1F,IAAI,EAAE,aAAa,CAAC;IACpB,MAAM,EAAE,iBAAiB,CAAC;CAC3B;AAiBD;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAK9D;AAwBD;;;;GAIG;AACH,wBAAsB,cAAc,CAAC,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,CA0B5F;AAED,oGAAoG;AACpG,wBAAsB,YAAY,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,eAAe,CAAC,CAoDhF;AAoDD;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAUvG;AAED,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAiE9E;AAuFD,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAM9C;AAED,wFAAwF;AACxF,wBAAgB,aAAa,CAAC,OAAO,EAAE,UAAU,EAAE,EAAE,QAAQ,EAAE,eAAe,GAAG,UAAU,EAAE,CAE5F;AAiCD,yCAAyC;AACzC,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAS9E"}
@@ -0,0 +1,90 @@
1
+ /**
2
+ * `chant workspace records --kind <kind file> --since <rev> [--at <rev>]
3
+ * [--json]` (#2673, #2650 C11): what changed in a kind's records between two
4
+ * revisions. It reads the records at `<rev>` and at `--at` (the working tree
5
+ * without it), through the same reader as `records`, and lists new and
6
+ * removed records, state transitions, new verdicts, new supersessions and
7
+ * changed pins. Between a review session's open and close commits, that is
8
+ * what the session did.
9
+ *
10
+ * Records are matched by id. A record whose id could not be read is left
11
+ * out of the comparison, since nothing says which record it was before.
12
+ */
13
+ import { type RecordEntry, type RecordKind } from "./records.js";
14
+ /** `$id` of the JSON Schema for `records --since --json`, shipped beside this file. */
15
+ export declare const RECORDS_SINCE_OUTPUT_SCHEMA_ID = "https://intentius.io/chant/schemas/workspace/records-since/v1/records-since.schema.json";
16
+ /** Why a `--since` read failed: any records read error, or a `--since` that names no commit. Closed. */
17
+ export declare const RECORDS_SINCE_ERROR_CODES: readonly ["kind-unreadable", "kind-invalid", "schema-unreadable", "schema-id-mismatch", "schema-invalid", "location-missing", "not-a-git-repository", "revision-unknown", "since-rev-unknown"];
18
+ export type RecordsSinceErrorCode = (typeof RECORDS_SINCE_ERROR_CODES)[number];
19
+ /** The kinds of change, in the order the output lists them. */
20
+ export declare const SINCE_CHANGE_KINDS: readonly ["new", "removed", "state", "verdict", "supersession", "pin"];
21
+ export type SinceChangeKind = (typeof SINCE_CHANGE_KINDS)[number];
22
+ export type SinceChange = {
23
+ change: "new";
24
+ id: string;
25
+ path: string;
26
+ state: string | null;
27
+ } | {
28
+ change: "removed";
29
+ id: string;
30
+ path: string;
31
+ state: string | null;
32
+ } | {
33
+ change: "state";
34
+ id: string;
35
+ from: string | null;
36
+ to: string | null;
37
+ } | {
38
+ change: "verdict";
39
+ id: string;
40
+ principal: string | null;
41
+ verdict: string | null;
42
+ index: number;
43
+ record?: string;
44
+ session?: string;
45
+ } | {
46
+ change: "supersession";
47
+ id: string;
48
+ supersedes: string;
49
+ } | {
50
+ change: "pin";
51
+ id: string;
52
+ path: string;
53
+ from: string | null;
54
+ to: string | null;
55
+ };
56
+ export type RecordsSinceDocument = {
57
+ $schema: string;
58
+ contract: number;
59
+ kind: {
60
+ name: string;
61
+ schema: string;
62
+ file: string;
63
+ };
64
+ since: string;
65
+ at: string | null;
66
+ changes: SinceChange[];
67
+ summary: Record<SinceChangeKind, number>;
68
+ } | {
69
+ $schema: string;
70
+ contract: number;
71
+ error: {
72
+ code: RecordsSinceErrorCode;
73
+ message: string;
74
+ };
75
+ };
76
+ export interface RecordsSinceQuery {
77
+ kind: string;
78
+ since: string;
79
+ at?: string;
80
+ cwd: string;
81
+ }
82
+ /** Run the comparison and build the document `--json` prints. Never throws a read error. */
83
+ export declare function queryRecordsSince(query: RecordsSinceQuery): Promise<RecordsSinceDocument>;
84
+ /** What changed from `before` to `after`, in the order of {@link SINCE_CHANGE_KINDS} and then by id. */
85
+ export declare function compareRecords(kind: RecordKind, before: RecordEntry[], after: RecordEntry[]): SinceChange[];
86
+ /** The text form: one line per change and a summary. */
87
+ export declare function formatSince(doc: Extract<RecordsSinceDocument, {
88
+ changes: SinceChange[];
89
+ }>): string;
90
+ //# sourceMappingURL=records-since.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"records-since.d.ts","sourceRoot":"","sources":["../../src/workspace/records-since.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAMH,OAAO,EAAgF,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,MAAM,WAAW,CAAC;AAI5I,uFAAuF;AACvF,eAAO,MAAM,8BAA8B,4FAA4F,CAAC;AAExI,wGAAwG;AACxG,eAAO,MAAM,yBAAyB,gMAII,CAAC;AAC3C,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE/E,+DAA+D;AAC/D,eAAO,MAAM,kBAAkB,wEAAyE,CAAC;AACzG,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AAKlE,MAAM,MAAM,WAAW,GACnB;IAAE,MAAM,EAAE,KAAK,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,GACjE;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,EAAE,EAAE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QAAQ,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE;QAAE,IAAI,EAAE,qBAAqB,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,CAAC;AAEnG,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;CACb;AAWD,4FAA4F;AAC5F,wBAAsB,iBAAiB,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAiC/F;AAyED,wGAAwG;AACxG,wBAAgB,cAAc,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,WAAW,EAAE,CAkD3G;AAED,wDAAwD;AACxD,wBAAgB,WAAW,CAAC,GAAG,EAAE,OAAO,CAAC,oBAAoB,EAAE;IAAE,OAAO,EAAE,WAAW,EAAE,CAAA;CAAE,CAAC,GAAG,MAAM,CAsBlG"}
@@ -0,0 +1,171 @@
1
+ /**
2
+ * `chant workspace records new|amend|review` (#2670): the commands a UI
3
+ * writes records through, so it never parses or writes a record file itself
4
+ * (ws-052).
5
+ *
6
+ * Each command loads the kind, reads every record it locates, builds the one
7
+ * file it would write, and reads the records again with that file in place,
8
+ * through the same {@link readRecords} a read uses. The write goes ahead only
9
+ * when the written record comes back valid and no other record gains a
10
+ * reason. So a write is refused for exactly what a later read would report,
11
+ * plus the rules only a write has: ids are allocated and never reused, a
12
+ * closed record never changes, an approved one changes only in place of
13
+ * what the approval rule allows, and a dissent needs a note.
14
+ *
15
+ * Every command writes one file or none, never commits, and prints one JSON
16
+ * document with a closed error code on refusal. `--dry-run` prints the
17
+ * document and the text it would write, and writes nothing.
18
+ */
19
+ import type { CommandContext } from "../cli/registry.js";
20
+ import { type RecordEntry, type RecordWarning } from "./records.js";
21
+ /** The version of the write documents this chant prints. */
22
+ export declare const RECORDS_WRITE_CONTRACT_VERSION = 1;
23
+ export declare const RECORDS_NEW_SCHEMA_ID = "https://intentius.io/chant/schemas/workspace/records-new/v1/records-new.schema.json";
24
+ export declare const RECORDS_AMEND_SCHEMA_ID = "https://intentius.io/chant/schemas/workspace/records-amend/v1/records-amend.schema.json";
25
+ export declare const RECORDS_REVIEW_SCHEMA_ID = "https://intentius.io/chant/schemas/workspace/records-review/v1/records-review.schema.json";
26
+ /** Why `records new` wrote nothing. Closed: a reader may switch on it. */
27
+ export declare const NEW_ERROR_CODES: readonly ["kind-unreadable", "kind-invalid", "schema-unreadable", "schema-id-mismatch", "schema-invalid", "location-missing", "write-usage-invalid", "write-input-invalid", "record-id-taken", "record-id-unallocatable", "record-path-unmatched", "record-unparseable", "record-schema-invalid", "record-id-duplicate", "record-supersedes-unknown", "record-supersedes-conflict", "session-seal-mismatch", "session-verdict-unknown-record"];
28
+ /** Why `records amend` wrote nothing. */
29
+ export declare const AMEND_ERROR_CODES: readonly ["kind-unreadable", "kind-invalid", "schema-unreadable", "schema-id-mismatch", "schema-invalid", "location-missing", "write-usage-invalid", "write-input-invalid", "record-not-found", "amend-id-immutable", "record-closed", "amend-supersede-instead", "record-unparseable", "record-schema-invalid", "record-id-duplicate", "record-supersedes-unknown", "record-supersedes-conflict", "session-seal-mismatch", "session-verdict-unknown-record"];
30
+ /** Why `records review` wrote nothing. */
31
+ export declare const REVIEW_ERROR_CODES: readonly ["kind-unreadable", "kind-invalid", "schema-unreadable", "schema-id-mismatch", "schema-invalid", "location-missing", "write-usage-invalid", "record-not-found", "review-unsupported", "record-closed", "review-note-required", "review-sign-failed", "record-unparseable", "record-schema-invalid", "record-id-duplicate", "record-supersedes-unknown", "record-supersedes-conflict", "session-seal-mismatch", "session-verdict-unknown-record"];
32
+ export type NewErrorCode = (typeof NEW_ERROR_CODES)[number];
33
+ export type AmendErrorCode = (typeof AMEND_ERROR_CODES)[number];
34
+ export type ReviewErrorCode = (typeof REVIEW_ERROR_CODES)[number];
35
+ export declare const VERDICTS: readonly ["agree", "dissent", "abstain"];
36
+ export type Verdict = (typeof VERDICTS)[number];
37
+ interface KindView {
38
+ name: string;
39
+ schema: string;
40
+ file: string;
41
+ }
42
+ /** What every write result carries. */
43
+ interface WriteResult {
44
+ $schema: string;
45
+ contract: number;
46
+ kind: KindView;
47
+ /** The record file, from the repository root (the working directory outside git), with / separators. */
48
+ path: string;
49
+ id: string;
50
+ /** True when nothing was written. */
51
+ dryRun: boolean;
52
+ /** The written record's warnings, as `records` would report them. */
53
+ warnings: RecordWarning[];
54
+ /** With --dry-run, the whole text the command would write. */
55
+ text?: string;
56
+ }
57
+ interface WriteFailure<C> {
58
+ $schema: string;
59
+ contract: number;
60
+ error: {
61
+ code: C;
62
+ message: string;
63
+ };
64
+ }
65
+ export type NewDocument = WriteResult | WriteFailure<NewErrorCode>;
66
+ export type AmendDocument = (WriteResult & {
67
+ changed: string[];
68
+ }) | WriteFailure<AmendErrorCode>;
69
+ export type ReviewDocument = (WriteResult & {
70
+ review: Record<string, unknown>;
71
+ }) | WriteFailure<ReviewErrorCode>;
72
+ /**
73
+ * YAML limited to what JSON can say, laid out as the decision README writes a
74
+ * record: every string double-quoted with JSON escapes, block mappings and
75
+ * sequences, and `[]` or `{}` for an empty one. `parseFrontMatter` reads it
76
+ * back to the same value.
77
+ */
78
+ export declare function toYaml(value: unknown, indent?: number): string;
79
+ /** A record file: the front matter, then `body` as it is. */
80
+ export declare function renderRecord(data: Record<string, unknown>, body: string): string;
81
+ /**
82
+ * `text` with the top-level fields in `set` replaced in place, and every
83
+ * other byte kept. A field's block is its key line at column 0 and the lines
84
+ * after it, up to the closing `---`, that start with a space, a tab, `#` or
85
+ * `-`: the block {@link recordTextDigest} cuts for the reviews field. Blank
86
+ * lines ending a block stay where they are. A field the front matter lacks is
87
+ * added before the closing `---`. Line endings become LF. Returns undefined
88
+ * when the text has no front matter, or when the result does not read back
89
+ * as `expected`, so a caller never writes a file it did not mean to.
90
+ */
91
+ export declare function replaceFields(text: string, set: Record<string, unknown>, expected: Record<string, unknown>): string | undefined;
92
+ /** A file-name slug from a title, as `scripts/import-decisions.mjs` makes one. */
93
+ export declare function slug(title: string): string;
94
+ /**
95
+ * The next id: `<prefix>-<n>`, one above the highest number any record in the
96
+ * directory has with that prefix, padded to at least three digits, or to the
97
+ * widest number those records use. Ids come from the records' own id field
98
+ * and, for a file that can't be read, from its name, so an id in use is never
99
+ * handed out again. The shape is derived from the records, with the prefix's
100
+ * case kept: a work kind's `W-001` and `W-002` give `W-003` (#2683), and a
101
+ * decision's `ws-052` gives `ws-053`. The kind's schema still judges the id
102
+ * written. Without `prefix`, every record must share one prefix.
103
+ */
104
+ export declare function allocateId(entries: RecordEntry[], prefix: string | undefined, kind: string): string;
105
+ export interface NewRecordOptions {
106
+ /** The kind file, resolved against `cwd`. */
107
+ kind: string;
108
+ /** The record's fields, as JSON text. */
109
+ fields: string;
110
+ /** The id prefix to allocate under, when the fields hold no id. */
111
+ prefix?: string;
112
+ dryRun?: boolean;
113
+ cwd: string;
114
+ }
115
+ /** `records new`: write one new record from validated fields. */
116
+ export declare function newRecord(opts: NewRecordOptions): Promise<NewDocument>;
117
+ export interface AmendRecordOptions {
118
+ kind: string;
119
+ id: string;
120
+ /** The fields to set, as JSON text. Each replaces the whole top-level field. */
121
+ fields: string;
122
+ dryRun?: boolean;
123
+ cwd: string;
124
+ }
125
+ /**
126
+ * `records amend`: set top-level fields of one record. A record in a closed
127
+ * state never changes. With approval ranks, a record ranked above 0 (such as
128
+ * a decided decision) changes in place only in its state, to one ranked at
129
+ * least as high, its pins field and its reviews: anything else is a new
130
+ * decision, written as a record that supersedes it (#2524 D4).
131
+ */
132
+ export declare function amendRecord(opts: AmendRecordOptions): Promise<AmendDocument>;
133
+ export interface ReviewRecordOptions {
134
+ kind: string;
135
+ id: string;
136
+ verdict: string;
137
+ /** The reviewer, as the caller names them. chant does not check who it is; a seal does, on read (#2687). */
138
+ by: string;
139
+ note?: string;
140
+ /** The review session the verdict was given in. */
141
+ session?: string;
142
+ dryRun?: boolean;
143
+ cwd: string;
144
+ /** The date written as `on`, YYYY-MM-DD. Defaults to today, in UTC. */
145
+ on?: string;
146
+ /**
147
+ * Seal the verdict (#2687): a key file, resolved against `cwd`, or true for
148
+ * git's `user.signingkey`. Without it the verdict is written unsealed.
149
+ */
150
+ sign?: string | true;
151
+ }
152
+ /**
153
+ * `records review`: append one verdict to a record's reviews, with the date
154
+ * and the digest of the record text it judged ({@link recordTextDigest}).
155
+ * With `sign`, the verdict carries a seal: an ssh signature over the record
156
+ * id, the digest, the verdict, the reviewer and the date (`trust/seal.ts`).
157
+ */
158
+ export declare function reviewRecord(opts: ReviewRecordOptions): Promise<ReviewDocument>;
159
+ export declare const WRITE_USAGE: string;
160
+ /**
161
+ * The kind file a write names: `arg` itself when it is a file, or else the
162
+ * declared record kind it names (#2683), by the name the declaration gives it
163
+ * or its file's name without `.kind.mjs`, so `records new work` finds
164
+ * `work/work.kind.mjs`. Anything else is returned as given, and loading it
165
+ * fails with kind-unreadable.
166
+ */
167
+ export declare function resolveWriteKind(arg: string, cwd: string): string;
168
+ /** `chant workspace records new|amend|review`. Prints one JSON document; exits 0 when it wrote, or would have with --dry-run. */
169
+ export declare function runRecordsWrite(ctx: CommandContext): Promise<number>;
170
+ export {};
171
+ //# sourceMappingURL=records-write.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"records-write.d.ts","sourceRoot":"","sources":["../../src/workspace/records-write.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGtD,OAAO,EAQL,KAAK,WAAW,EAChB,KAAK,aAAa,EACnB,MAAM,WAAW,CAAC;AAOnB,4DAA4D;AAC5D,eAAO,MAAM,8BAA8B,IAAI,CAAC;AAEhD,eAAO,MAAM,qBAAqB,wFAAwF,CAAC;AAC3H,eAAO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