@intentius/chant 0.89.0 → 0.91.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 (194) hide show
  1. package/dist/cli/handlers/components.d.ts +8 -0
  2. package/dist/cli/handlers/components.d.ts.map +1 -1
  3. package/dist/cli/handlers/operator.d.ts +14 -0
  4. package/dist/cli/handlers/operator.d.ts.map +1 -1
  5. package/dist/cli/handlers/run.d.ts.map +1 -1
  6. package/dist/cli/handlers/serve.d.ts.map +1 -1
  7. package/dist/cli/main.d.ts.map +1 -1
  8. package/dist/cli/mcp/server.d.ts +10 -5
  9. package/dist/cli/mcp/server.d.ts.map +1 -1
  10. package/dist/cli/mcp/types.d.ts +13 -5
  11. package/dist/cli/mcp/types.d.ts.map +1 -1
  12. package/dist/cli/mcp/workspace-tools.d.ts +55 -0
  13. package/dist/cli/mcp/workspace-tools.d.ts.map +1 -0
  14. package/dist/cli/registry.d.ts +31 -0
  15. package/dist/cli/registry.d.ts.map +1 -1
  16. package/dist/components/verbs/vuln-scan.d.ts +72 -0
  17. package/dist/components/verbs/vuln-scan.d.ts.map +1 -1
  18. package/dist/lifecycle/git.d.ts +40 -5
  19. package/dist/lifecycle/git.d.ts.map +1 -1
  20. package/dist/lifecycle/lease.d.ts +72 -16
  21. package/dist/lifecycle/lease.d.ts.map +1 -1
  22. package/dist/lifecycle/member-ledger.d.ts +3 -2
  23. package/dist/lifecycle/member-ledger.d.ts.map +1 -1
  24. package/dist/lifecycle/plan-ledger.d.ts +114 -0
  25. package/dist/lifecycle/plan-ledger.d.ts.map +1 -0
  26. package/dist/lifecycle/work-lease.d.ts +140 -0
  27. package/dist/lifecycle/work-lease.d.ts.map +1 -0
  28. package/dist/op/activities/activity-contracts.d.ts +2 -2
  29. package/dist/op/builders.d.ts.map +1 -1
  30. package/dist/op/discover.d.ts +25 -0
  31. package/dist/op/discover.d.ts.map +1 -1
  32. package/dist/op/index.d.ts +9 -3
  33. package/dist/op/index.d.ts.map +1 -1
  34. package/dist/op/lifecycle-receipt-store.d.ts +34 -0
  35. package/dist/op/lifecycle-receipt-store.d.ts.map +1 -0
  36. package/dist/op/local-executor.d.ts +19 -0
  37. package/dist/op/local-executor.d.ts.map +1 -1
  38. package/dist/op/local-output.d.ts.map +1 -1
  39. package/dist/op/op-ir.d.ts +10 -1
  40. package/dist/op/op-ir.d.ts.map +1 -1
  41. package/dist/op/op-verb-class.d.ts.map +1 -1
  42. package/dist/op/operator.d.ts +29 -0
  43. package/dist/op/operator.d.ts.map +1 -1
  44. package/dist/op/runtime.d.ts +9 -0
  45. package/dist/op/runtime.d.ts.map +1 -1
  46. package/dist/op/runtimes/local.d.ts.map +1 -1
  47. package/dist/op/step-output-ref.d.ts +2 -2
  48. package/dist/op/step-output-ref.d.ts.map +1 -1
  49. package/dist/op/steward.d.ts +140 -0
  50. package/dist/op/steward.d.ts.map +1 -0
  51. package/dist/op/types.d.ts +51 -0
  52. package/dist/op/types.d.ts.map +1 -1
  53. package/dist/op/work-lease-decl.d.ts +18 -0
  54. package/dist/op/work-lease-decl.d.ts.map +1 -0
  55. package/dist/op/work-lease-run.d.ts +173 -0
  56. package/dist/op/work-lease-run.d.ts.map +1 -0
  57. package/dist/workspace/box-isolation.d.ts +99 -0
  58. package/dist/workspace/box-isolation.d.ts.map +1 -0
  59. package/dist/workspace/checks/box-isolation.d.ts +18 -0
  60. package/dist/workspace/checks/box-isolation.d.ts.map +1 -0
  61. package/dist/workspace/checks/boxes.d.ts +71 -0
  62. package/dist/workspace/checks/boxes.d.ts.map +1 -0
  63. package/dist/workspace/checks/records.d.ts +1 -0
  64. package/dist/workspace/checks/records.d.ts.map +1 -1
  65. package/dist/workspace/checks.d.ts +10 -1
  66. package/dist/workspace/checks.d.ts.map +1 -1
  67. package/dist/workspace/conformance/index.d.ts +42 -2
  68. package/dist/workspace/conformance/index.d.ts.map +1 -1
  69. package/dist/workspace/conformance/vitest.d.ts.map +1 -1
  70. package/dist/workspace/decide.d.ts +184 -0
  71. package/dist/workspace/decide.d.ts.map +1 -0
  72. package/dist/workspace/decision-points.schema.json +137 -0
  73. package/dist/workspace/declaration.d.ts +51 -0
  74. package/dist/workspace/declaration.d.ts.map +1 -1
  75. package/dist/workspace/declaration.schema.json +172 -0
  76. package/dist/workspace/declared-kinds.d.ts +12 -0
  77. package/dist/workspace/declared-kinds.d.ts.map +1 -1
  78. package/dist/workspace/points-cli.d.ts +113 -0
  79. package/dist/workspace/points-cli.d.ts.map +1 -0
  80. package/dist/workspace/points.d.ts +320 -0
  81. package/dist/workspace/points.d.ts.map +1 -0
  82. package/dist/workspace/reason-codes.d.ts +29 -0
  83. package/dist/workspace/reason-codes.d.ts.map +1 -1
  84. package/dist/workspace/record-assets.d.ts.map +1 -1
  85. package/dist/workspace/records-cli.d.ts +12 -0
  86. package/dist/workspace/records-cli.d.ts.map +1 -1
  87. package/dist/workspace/records-write.d.ts +35 -3
  88. package/dist/workspace/records-write.d.ts.map +1 -1
  89. package/dist/workspace/records.d.ts +12 -3
  90. package/dist/workspace/records.d.ts.map +1 -1
  91. package/dist/workspace/source-block.d.ts +85 -0
  92. package/dist/workspace/source-block.d.ts.map +1 -0
  93. package/dist/workspace/status-stewards.d.ts +121 -0
  94. package/dist/workspace/status-stewards.d.ts.map +1 -0
  95. package/dist/workspace/status.d.ts +52 -1
  96. package/dist/workspace/status.d.ts.map +1 -1
  97. package/dist/workspace/work-cli.d.ts +78 -0
  98. package/dist/workspace/work-cli.d.ts.map +1 -0
  99. package/package.json +1 -1
  100. package/src/cli/handlers/components.test.ts +93 -0
  101. package/src/cli/handlers/components.ts +44 -3
  102. package/src/cli/handlers/operator.ts +107 -2
  103. package/src/cli/handlers/run.test.ts +19 -0
  104. package/src/cli/handlers/run.ts +53 -1
  105. package/src/cli/handlers/serve.ts +2 -1
  106. package/src/cli/main.test.ts +40 -0
  107. package/src/cli/main.ts +78 -2
  108. package/src/cli/mcp/docs-parity.test.ts +20 -2
  109. package/src/cli/mcp/server.ts +23 -6
  110. package/src/cli/mcp/types.ts +15 -2
  111. package/src/cli/mcp/workspace-tools.test.ts +211 -0
  112. package/src/cli/mcp/workspace-tools.ts +449 -0
  113. package/src/cli/registry.ts +31 -0
  114. package/src/components/verbs/vuln-scan.test.ts +124 -1
  115. package/src/components/verbs/vuln-scan.ts +142 -1
  116. package/src/lifecycle/git.ts +65 -15
  117. package/src/lifecycle/lease.test.ts +22 -0
  118. package/src/lifecycle/lease.ts +133 -29
  119. package/src/lifecycle/member-ledger.ts +3 -2
  120. package/src/lifecycle/plan-ledger.test.ts +148 -0
  121. package/src/lifecycle/plan-ledger.ts +158 -0
  122. package/src/lifecycle/work-lease.test.ts +236 -0
  123. package/src/lifecycle/work-lease.ts +426 -0
  124. package/src/op/builders.ts +5 -0
  125. package/src/op/discover.ts +71 -0
  126. package/src/op/index.ts +16 -3
  127. package/src/op/lifecycle-receipt-store.test.ts +60 -0
  128. package/src/op/lifecycle-receipt-store.ts +61 -0
  129. package/src/op/local-executor.ts +216 -18
  130. package/src/op/local-output.ts +13 -0
  131. package/src/op/op-ir.ts +14 -0
  132. package/src/op/op-verb-class.ts +6 -0
  133. package/src/op/operator.ts +75 -4
  134. package/src/op/runtime.ts +6 -0
  135. package/src/op/runtimes/local.ts +3 -0
  136. package/src/op/step-output-ref.ts +6 -2
  137. package/src/op/steward.test.ts +212 -0
  138. package/src/op/steward.ts +253 -0
  139. package/src/op/types.ts +53 -0
  140. package/src/op/work-lease-decl.ts +80 -0
  141. package/src/op/work-lease-run.test.ts +326 -0
  142. package/src/op/work-lease-run.ts +395 -0
  143. package/src/workspace/box-isolation.test.ts +261 -0
  144. package/src/workspace/box-isolation.ts +205 -0
  145. package/src/workspace/check-contract.test.ts +3 -1
  146. package/src/workspace/check.schema.json +15 -7
  147. package/src/workspace/checks/box-isolation.ts +68 -0
  148. package/src/workspace/checks/boxes.test.ts +197 -0
  149. package/src/workspace/checks/boxes.ts +307 -0
  150. package/src/workspace/checks/records.ts +25 -0
  151. package/src/workspace/checks.test.ts +7 -0
  152. package/src/workspace/checks.ts +19 -2
  153. package/src/workspace/conformance/__fixture__/decisions/decision.kind.mjs +4 -0
  154. package/src/workspace/conformance/__fixture__/decisions/decision.schema.json +100 -6
  155. package/src/workspace/conformance/index.mjs +3 -0
  156. package/src/workspace/conformance/index.ts +185 -7
  157. package/src/workspace/conformance/vitest.ts +17 -8
  158. package/src/workspace/decide.test.ts +224 -0
  159. package/src/workspace/decide.ts +576 -0
  160. package/src/workspace/decision-points.schema.json +137 -0
  161. package/src/workspace/declaration.schema.json +172 -0
  162. package/src/workspace/declaration.ts +137 -0
  163. package/src/workspace/declared-kinds.ts +25 -2
  164. package/src/workspace/intent.schema.json +4 -1
  165. package/src/workspace/point-answer.schema.json +95 -0
  166. package/src/workspace/points-cli.ts +273 -0
  167. package/src/workspace/points-write.schema.json +489 -0
  168. package/src/workspace/points.schema.json +710 -0
  169. package/src/workspace/points.test.ts +264 -0
  170. package/src/workspace/points.ts +564 -0
  171. package/src/workspace/read-contract.test.ts +18 -1
  172. package/src/workspace/reason-codes.test.ts +14 -1
  173. package/src/workspace/reason-codes.ts +36 -0
  174. package/src/workspace/record-assets.test.ts +3 -2
  175. package/src/workspace/record-assets.ts +4 -1
  176. package/src/workspace/records-amend.schema.json +2 -1
  177. package/src/workspace/records-cli.ts +15 -2
  178. package/src/workspace/records-close.schema.json +2 -1
  179. package/src/workspace/records-contract.test.ts +3 -2
  180. package/src/workspace/records-new.schema.json +4 -1
  181. package/src/workspace/records-review.schema.json +2 -1
  182. package/src/workspace/records-write.ts +85 -7
  183. package/src/workspace/records.schema.json +18 -0
  184. package/src/workspace/records.ts +61 -3
  185. package/src/workspace/source-block.test.ts +167 -0
  186. package/src/workspace/source-block.ts +129 -0
  187. package/src/workspace/status-contract.test.ts +178 -0
  188. package/src/workspace/status-stewards.ts +225 -0
  189. package/src/workspace/status.schema.json +230 -4
  190. package/src/workspace/status.ts +106 -5
  191. package/src/workspace/work-cli.test.ts +180 -0
  192. package/src/workspace/work-cli.ts +246 -0
  193. package/src/workspace/work-lease.schema.json +233 -0
  194. package/src/workspace/work-readiness-chud.test.ts +145 -0
@@ -1 +1 @@
1
- {"version":3,"file":"declared-kinds.d.ts","sourceRoot":"","sources":["../../src/workspace/declared-kinds.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,EAAuB,KAAK,WAAW,EAAE,KAAK,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAElG,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAE5C,oHAAoH;AACpH,eAAO,MAAM,0BAA0B,yFAA0H,CAAC;AAClK,MAAM,MAAM,sBAAsB,GAAG,CAAC,OAAO,0BAA0B,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjF,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,qBAAqB,CAAC;IAChC,uCAAuC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,wEAAwE;IACxE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,uCAAuC;IACvC,MAAM,EAAE;QAAE,IAAI,EAAE,sBAAsB,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;CAClE;AAED,kFAAkF;AAClF,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAE5F;AAED;;;;;GAKG;AACH,wBAAsB,iBAAiB,CACrC,WAAW,EAAE,WAAW,EACxB,IAAI,EAAE,aAAa,EACnB,UAAU,EAAE,MAAM,EAClB,OAAO,GAAE;IAAE,IAAI,CAAC,EAAE,OAAO,CAAA;CAAO,GAC/B,OAAO,CAAC,YAAY,EAAE,CAAC,CAyBzB"}
1
+ {"version":3,"file":"declared-kinds.d.ts","sourceRoot":"","sources":["../../src/workspace/declared-kinds.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,EAAuB,KAAK,WAAW,EAAE,KAAK,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAElG,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAE5C,oHAAoH;AACpH,eAAO,MAAM,0BAA0B,yFAA0H,CAAC;AAClK,MAAM,MAAM,sBAAsB,GAAG,CAAC,OAAO,0BAA0B,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjF,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,qBAAqB,CAAC;IAChC,uCAAuC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,wEAAwE;IACxE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,uCAAuC;IACvC,MAAM,EAAE;QAAE,IAAI,EAAE,sBAAsB,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IACjE;;;;OAIG;IACH,MAAM,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE;YAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;YAAC,OAAO,EAAE,MAAM,CAAA;SAAE,EAAE,CAAA;KAAE,CAAC;CAClF;AAED,kFAAkF;AAClF,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAE5F;AAED;;;;;GAKG;AACH,wBAAsB,iBAAiB,CACrC,WAAW,EAAE,WAAW,EACxB,IAAI,EAAE,aAAa,EACnB,UAAU,EAAE,MAAM,EAClB,OAAO,GAAE;IAAE,IAAI,CAAC,EAAE,OAAO,CAAA;CAAO,GAC/B,OAAO,CAAC,YAAY,EAAE,CAAC,CA2BzB"}
@@ -0,0 +1,113 @@
1
+ /**
2
+ * `chant workspace points [--open] [--kind <kind file>] [--at <rev>] [--json]`
3
+ * (ws-058, #2739): the workspace's decision points and the questions asked of
4
+ * them, a read-contract output (`points.schema.json`).
5
+ *
6
+ * The points come from each record kind the declaration names with an
7
+ * `answers` block, or from `--kind`, and the questions are that kind's
8
+ * records. A question is open while it is escalated to people or proposed by a
9
+ * model and not yet confirmed, and it lists any model's answer with its
10
+ * confidence, so a reader such as hud can prompt a person and an MCP client
11
+ * can see it. With `--open`, only open questions are listed. It never writes
12
+ * and never calls a model.
13
+ *
14
+ * `points ask` and `points answer` are the writes, in `decide.ts`.
15
+ */
16
+ import type { CommandContext } from "../cli/registry.js";
17
+ import { type ErrorLocation, type WorkspaceErrorCode } from "./declaration.js";
18
+ import { type QuestionView } from "./decide.js";
19
+ import { type Decider, type ModelAsk } from "./points.js";
20
+ export declare const POINTS_CONTRACT_VERSION = 1;
21
+ export declare const POINTS_OUTPUT_SCHEMA_ID = "https://intentius.io/chant/schemas/workspace/points/v1/points.schema.json";
22
+ /** Why `points` read nothing. Closed. */
23
+ export declare const POINTS_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"];
24
+ /** Why one answer kind's points or questions could not be read. The document is still printed. Closed. */
25
+ export declare const POINTS_SOURCE_REASON_CODES: readonly ["kind-unreadable", "kind-invalid", "schema-unreadable", "schema-id-mismatch", "schema-invalid", "location-missing", "points-invalid"];
26
+ type SourceReasonCode = (typeof POINTS_SOURCE_REASON_CODES)[number];
27
+ /** One point as `points` lists it. */
28
+ export interface PointView {
29
+ name: string;
30
+ title: string;
31
+ /** The answer kind file, from the workspace root, whose records answer it. */
32
+ kind: string;
33
+ /** The points file, from the repository root. */
34
+ file: string;
35
+ /** sha256 of the declaration: a question asked under another version answers an older question. */
36
+ version: string;
37
+ questionType: string;
38
+ instructions: string;
39
+ candidates: (string | boolean)[];
40
+ /** Each input: its name, the read-contract output it names, and its description. */
41
+ inputs: {
42
+ name: string;
43
+ output: string;
44
+ description: string;
45
+ }[];
46
+ deciders: Decider[];
47
+ quorum: {
48
+ count: number;
49
+ roles?: string[];
50
+ };
51
+ }
52
+ /** One answer kind the read covered. */
53
+ export interface SourceView {
54
+ /** The kind file, as declared from the workspace root, or as given with --kind. */
55
+ kind: string;
56
+ /** The points file from the repository root, or null when the kind couldn't be loaded. */
57
+ points: string | null;
58
+ reason: {
59
+ code: SourceReasonCode;
60
+ message: string;
61
+ } | null;
62
+ }
63
+ export type PointsDocument = {
64
+ $schema: string;
65
+ contract: number;
66
+ chant: string;
67
+ at: string | null;
68
+ workspace: {
69
+ name: string;
70
+ root: string;
71
+ };
72
+ /** Whether only open questions are listed (--open). */
73
+ open: boolean;
74
+ sources: SourceView[];
75
+ points: PointView[];
76
+ questions: QuestionView[];
77
+ summary: {
78
+ points: number;
79
+ questions: number;
80
+ open: number;
81
+ escalated: number;
82
+ proposed: number;
83
+ answered: number;
84
+ };
85
+ } | {
86
+ $schema: string;
87
+ contract: number;
88
+ chant: string;
89
+ error: {
90
+ code: WorkspaceErrorCode;
91
+ message: string;
92
+ location: ErrorLocation | null;
93
+ };
94
+ };
95
+ export interface PointsQuery {
96
+ cwd: string;
97
+ at?: string;
98
+ open?: boolean;
99
+ /** One answer kind file, in place of the declared ones. */
100
+ kind?: string;
101
+ }
102
+ /** Read the points and questions. Never throws a read error: a declaration that can't be read is the failure document. */
103
+ export declare function workspacePoints(query: PointsQuery): Promise<PointsDocument>;
104
+ /** The document as lines for a person. */
105
+ export declare function formatPoints(doc: Extract<PointsDocument, {
106
+ points: unknown;
107
+ }>): string;
108
+ /** A POST /v1/systemone response the caller already has, as the model call: its answer to the point asked. */
109
+ export declare function responseAsk(response: unknown): ModelAsk;
110
+ /** `chant workspace points`, and its `ask` and `answer` verbs. */
111
+ export declare function runWorkspacePoints(ctx: CommandContext): Promise<number>;
112
+ export {};
113
+ //# sourceMappingURL=points-cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"points-cli.d.ts","sourceRoot":"","sources":["../../src/workspace/points-cli.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,OAAO,KAAK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AA0H;AAC1H,wBAAsB,eAAe,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,cAAc,CAAC,CAmEjF;AAED,0CAA0C;AAC1C,wBAAgB,YAAY,CAAC,GAAG,EAAE,OAAO,CAAC,cAAc,EAAE;IAAE,MAAM,EAAE,OAAO,CAAA;CAAE,CAAC,GAAG,MAAM,CAatF;AAED,8GAA8G;AAC9G,wBAAgB,WAAW,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,CASvD;AA0BD,kEAAkE;AAClE,wBAAsB,kBAAkB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAsC7E"}
@@ -0,0 +1,320 @@
1
+ /**
2
+ * Decision points (ws-058, #2738): the recurring questions a workspace asks of
3
+ * its own graph, declared as data, and the answers they leave (#2739).
4
+ *
5
+ * A points file is JSON, validated against `decision-points.schema.json`, and
6
+ * named by a record kind's `answers.points`: the kind whose records are the
7
+ * answers. Each point is a typed question (`noul`, `choice` or `score`, the
8
+ * question types of the POST /v1/systemone wire format, #2491), the inputs it
9
+ * reads, each named as a read-contract output, and an ordered chain of
10
+ * deciders:
11
+ *
12
+ * table rows of { when, answer }; the first row whose conditions all hold answers.
13
+ * model a backend asked the question with the inputs as its state, at a
14
+ * pinned model id. An answer at or above the threshold is a
15
+ * proposal a person confirms; below it, the next decider is asked.
16
+ * quorum people. Always last: the question escalates to them.
17
+ *
18
+ * chant never calls a model (ws-052). {@link runChain} takes the model call
19
+ * as a function, {@link ModelAsk}, which the decide Op activity (#2740), a
20
+ * runtime's decider or a test's stub supplies. Without one, a model decider is
21
+ * not asked and the chain moves on.
22
+ *
23
+ * Taken from chud's `packages/runtime/src/decide.mjs` at 43afcf1: the chain,
24
+ * the observation rule, the point version and the inputs hash. The records
25
+ * are chant records: `decide.ts` writes them, and {@link applyAnswers} warns
26
+ * about them on read.
27
+ */
28
+ import type { RecordSource } from "./record-source.js";
29
+ import type { LoadedRecordKind, ReadRecordsOptions, RecordEntry } from "./records.js";
30
+ export declare const DECISION_POINTS_SCHEMA_ID: string;
31
+ /**
32
+ * The read-contract outputs a point's input may name (#2738), each with the
33
+ * output schema and `$defs` entry that describes it. Closed: an input naming
34
+ * anything else is refused. `record`, `decision` and `work-item` are records
35
+ * as `records --json` lists them, of any kind, a decision kind and a work kind.
36
+ */
37
+ export declare const POINT_INPUT_OUTPUTS: {
38
+ readonly record: {
39
+ readonly schema: "records";
40
+ readonly def: "record";
41
+ readonly description: "a record of any kind, as records --json lists it";
42
+ };
43
+ readonly decision: {
44
+ readonly schema: "records";
45
+ readonly def: "record";
46
+ readonly description: "a decision record, as records --json lists it";
47
+ };
48
+ readonly "work-item": {
49
+ readonly schema: "records";
50
+ readonly def: "record";
51
+ readonly description: "a work item record, as records --json lists it (#2683)";
52
+ };
53
+ readonly finding: {
54
+ readonly schema: "intent";
55
+ readonly def: "finding";
56
+ readonly description: "a finding of graph --intent";
57
+ };
58
+ readonly region: {
59
+ readonly schema: "intent";
60
+ readonly def: "region";
61
+ readonly description: "the region an intent graph covers";
62
+ };
63
+ readonly commit: {
64
+ readonly schema: "intent";
65
+ readonly def: "commit";
66
+ readonly description: "a commit in an intent graph's window";
67
+ };
68
+ readonly member: {
69
+ readonly schema: "ls";
70
+ readonly def: "member";
71
+ readonly description: "a member, as ls lists it";
72
+ };
73
+ readonly gate: {
74
+ readonly schema: "status";
75
+ readonly def: "gate";
76
+ readonly description: "a gate, as status lists it";
77
+ };
78
+ readonly release: {
79
+ readonly schema: "status";
80
+ readonly def: "release";
81
+ readonly description: "a release, as status lists it; a release plan's fields until the lifecycle ledger lists plans (#2717)";
82
+ };
83
+ readonly environment: {
84
+ readonly schema: "status";
85
+ readonly def: "environment";
86
+ readonly description: "an environment, as status lists it";
87
+ };
88
+ readonly component: {
89
+ readonly schema: "composites";
90
+ readonly def: "component";
91
+ readonly description: "a component, as graph --composites lists it";
92
+ };
93
+ };
94
+ export type PointInputOutput = keyof typeof POINT_INPUT_OUTPUTS;
95
+ export declare const POINT_INPUT_OUTPUT_NAMES: PointInputOutput[];
96
+ /** The output an input name reads: the part before its first dot. */
97
+ export declare function inputOutput(name: string): string;
98
+ export type QuestionType = "noul" | "choice" | "score";
99
+ export interface Question {
100
+ /** `boolean` in a points file is read as `noul`. */
101
+ type: QuestionType;
102
+ instructions: string;
103
+ criteria: Record<string, string> | string[];
104
+ }
105
+ export type Scalar = string | number | boolean | null;
106
+ export type Condition = Scalar | {
107
+ eq?: Scalar;
108
+ ne?: Scalar;
109
+ lt?: number;
110
+ lte?: number;
111
+ gt?: number;
112
+ gte?: number;
113
+ in?: Scalar[];
114
+ };
115
+ export interface TableRow {
116
+ when: Record<string, Condition>;
117
+ answer: string | boolean;
118
+ note?: string;
119
+ }
120
+ export type Decider = {
121
+ kind: "table";
122
+ rows: TableRow[];
123
+ note?: string;
124
+ } | {
125
+ kind: "model";
126
+ backend: string;
127
+ model: string;
128
+ threshold: number;
129
+ unreachable?: "escalate" | "fail";
130
+ note?: string;
131
+ } | {
132
+ kind: "quorum";
133
+ count: number;
134
+ roles?: string[];
135
+ note?: string;
136
+ };
137
+ export interface Point {
138
+ title: string;
139
+ question: Question;
140
+ inputs: Record<string, string>;
141
+ deciders: Decider[];
142
+ }
143
+ /** One problem with a points file: the JSON path of the field, or null for the file, and what is wrong. */
144
+ export interface PointProblem {
145
+ field: string | null;
146
+ message: string;
147
+ }
148
+ export declare class PointsError extends Error {
149
+ readonly file: string;
150
+ readonly problems: PointProblem[];
151
+ constructor(file: string, problems: PointProblem[]);
152
+ }
153
+ /** A question's candidate answers: true and false, a choice's options, or a score's levels. */
154
+ export declare function candidates(question: Question): (string | boolean)[];
155
+ /** The schema's problems with `data`, as JSON paths. */
156
+ export declare function schemaProblems(data: unknown): PointProblem[];
157
+ /**
158
+ * Parse and validate a points file's text. Returns its points, with
159
+ * `boolean` read as `noul`. Throws a {@link PointsError} naming the file and
160
+ * each field.
161
+ */
162
+ export declare function parsePoints(text: string, file: string): Record<string, Point>;
163
+ /** One point by name, or undefined. */
164
+ export declare function pointOf(points: Record<string, Point>, name: string): Point | undefined;
165
+ /** JSON with keys sorted and undefined members left out, the text every hash here is taken over. */
166
+ export declare function canonical(value: unknown): string;
167
+ /** The version of a point: the sha256 of its declaration. Editing the question or any decider changes it. */
168
+ export declare const pointVersion: (point: Point) => string;
169
+ /** What is answered once: the point, its version and the inputs. */
170
+ export declare const inputsHash: (name: string, version: string, inputs: Record<string, unknown>) => string;
171
+ /** The id of the answer to `name` for inputs hashing to `hash`: the name and the hash's first 12 hex digits. */
172
+ export declare const answerId: (name: string, hash: string) => string;
173
+ /** The quorum a point ends in. */
174
+ export declare function quorumOf(point: Point): {
175
+ count: number;
176
+ roles?: string[];
177
+ };
178
+ /** Whether every condition in a row's `when` holds for these inputs. An input the state lacks never matches. */
179
+ export declare const matches: (when: Record<string, Condition>, inputs: Record<string, unknown>) => boolean;
180
+ /** A question as the POST /v1/systemone wire format asks it (#2491). */
181
+ export interface WireQuestion {
182
+ type: QuestionType;
183
+ instructions: string;
184
+ criteria: Record<string, string> | string[];
185
+ }
186
+ /** One answer in the wire format's shape. */
187
+ export type WireAnswer = {
188
+ type: "noul";
189
+ noul: number;
190
+ } | {
191
+ type: "choice";
192
+ choice: string;
193
+ probabilities?: Record<string, number>;
194
+ confidence?: number;
195
+ } | {
196
+ type: "score";
197
+ score?: number;
198
+ legend?: unknown;
199
+ probabilities?: Record<string, number>;
200
+ confidence?: number;
201
+ } | {
202
+ type: "unsupported";
203
+ };
204
+ export declare function wireQuestion(question: Question): WireQuestion;
205
+ /** What a model decider is asked. */
206
+ export interface ModelRequest {
207
+ point: string;
208
+ backend: string;
209
+ /** The pinned model id. */
210
+ model: string;
211
+ question: WireQuestion;
212
+ /** The inputs, as the state. */
213
+ state: Record<string, unknown>;
214
+ }
215
+ /**
216
+ * The model call, supplied by the caller: the decide Op activity (#2740), a
217
+ * runtime's decider, or a test's stub. It resolves with the model id that
218
+ * answered and one answer in the wire format's shape. Throwing means the
219
+ * backend could not be reached or gave nothing usable.
220
+ */
221
+ export type ModelAsk = (request: ModelRequest) => Promise<{
222
+ model: string;
223
+ answer: WireAnswer;
224
+ }>;
225
+ export type Observation = {
226
+ observed: true;
227
+ answer: string | boolean;
228
+ probabilities: Record<string, number>;
229
+ confidence: number;
230
+ } | {
231
+ observed: false;
232
+ answer?: string | boolean | null;
233
+ probabilities?: Record<string, number>;
234
+ confidence?: number;
235
+ reason: string;
236
+ };
237
+ /**
238
+ * A model's wire answer against the question and the decider's threshold
239
+ * (chud's rule):
240
+ *
241
+ * - noul p: true when p is at least the threshold, false when 1 - p is,
242
+ * otherwise not observed. Its confidence is max(p, 1 - p).
243
+ * - choice and score: the choice (a score's most probable level) when the
244
+ * reported confidence is at least the threshold. A backend that reports no
245
+ * confidence is read by its largest probability.
246
+ *
247
+ * An answer outside the candidates, or an unsupported question, is not observed.
248
+ */
249
+ export declare function observe(question: Question, answer: WireAnswer | undefined, threshold: number): Observation;
250
+ /** A decider that was asked and did not answer, and why. */
251
+ export interface Escalation {
252
+ kind: "table" | "model";
253
+ reason: string;
254
+ backend?: string;
255
+ model?: string;
256
+ answer?: string | boolean | null;
257
+ probabilities?: Record<string, number>;
258
+ confidence?: number;
259
+ threshold?: number;
260
+ }
261
+ export type ChainResult = {
262
+ status: "answered";
263
+ answer: string | boolean;
264
+ decider: {
265
+ kind: "table";
266
+ row: number;
267
+ };
268
+ note?: string;
269
+ escalations: Escalation[];
270
+ } | {
271
+ status: "proposed";
272
+ answer: string | boolean;
273
+ decider: {
274
+ kind: "model";
275
+ backend: string;
276
+ model: string;
277
+ };
278
+ probabilities: Record<string, number>;
279
+ confidence: number;
280
+ threshold: number;
281
+ escalations: Escalation[];
282
+ } | {
283
+ status: "escalated";
284
+ decider: {
285
+ kind: "quorum";
286
+ count: number;
287
+ roles?: string[];
288
+ };
289
+ escalations: Escalation[];
290
+ };
291
+ /** A model decider declared `unreachable: "fail"` could not answer, so the ask fails and nothing is written. */
292
+ export declare class DeciderFailed extends Error {
293
+ constructor(message: string);
294
+ }
295
+ /**
296
+ * Ask a point's deciders in order. A table row answers; a model at or above
297
+ * its threshold proposes; otherwise the question escalates to the quorum.
298
+ * Each decider that did not answer is in `escalations`, with why. A model
299
+ * decider is asked through `ask`; without it, it is not asked.
300
+ */
301
+ export declare function runChain(name: string, point: Point, inputs: Record<string, unknown>, ask?: ModelAsk): Promise<ChainResult>;
302
+ /** Why an answer record carries a warning. Closed, like the record warning codes. */
303
+ export declare const ANSWER_WARNING_CODES: readonly ["answer-points-unreadable", "answer-point-unknown", "answer-point-changed"];
304
+ export type AnswerWarningCode = (typeof ANSWER_WARNING_CODES)[number];
305
+ /** The points file an answer kind names, from `root` with / separators. */
306
+ export declare function pointsFileOf(loaded: LoadedRecordKind, root: string): string;
307
+ /** The points an answer kind names, read from `source` (the tree read), or the problems reading them. */
308
+ export declare function readPointsThrough(source: RecordSource, file: string): {
309
+ points: Record<string, Point>;
310
+ } | {
311
+ error: string;
312
+ problems: PointProblem[];
313
+ };
314
+ /**
315
+ * Give an answer kind's records their warnings, in place: the points file
316
+ * can't be read, the answer's point is gone, or the point changed since. They
317
+ * never make a record invalid.
318
+ */
319
+ export declare function applyAnswers(loaded: LoadedRecordKind, entries: RecordEntry[], options: ReadRecordsOptions): void;
320
+ //# sourceMappingURL=points.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"points.d.ts","sourceRoot":"","sources":["../../src/workspace/points.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAOH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAEnF,eAAO,MAAM,yBAAyB,QAAa,CAAC;AAIpD;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAC;QAAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IAAC,WAAW,EAAE,UAAU,EAAE,CAAA;CAAE,CAAC;AAErH,gHAAgH;AAChH,qBAAa,aAAc,SAAQ,KAAK;gBAC1B,OAAO,EAAE,MAAM;CAI5B;AAED;;;;;GAKG;AACH,wBAAsB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC,WAAW,CAAC,CAuDhI;AAID,qFAAqF;AACrF,eAAO,MAAM,oBAAoB,uFAOS,CAAC;AAC3C,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtE,2EAA2E;AAC3E,wBAAgB,YAAY,CAAC,MAAM,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAG3E;AAED,yGAAyG;AACzG,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;CAAE,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,YAAY,EAAE,CAAA;CAAE,CAkBrJ;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,gBAAgB,EAAE,OAAO,EAAE,WAAW,EAAE,EAAE,OAAO,EAAE,kBAAkB,GAAG,IAAI,CAoBhH"}
@@ -47,6 +47,9 @@ export declare const REASONS: {
47
47
  readonly "gates-no-ledger": "The checkout has no chant/lifecycle branch, so there is no gate ledger to read.";
48
48
  readonly "gates-no-gate-ledger": "The branch has no gate ledger for the member: no run of it has reached a gate.";
49
49
  readonly "gates-ledger-unreadable": "Reading the member's gate ledger failed, so no gate is listed.";
50
+ readonly "stewards-unreadable": "An *.op.ts file could not be imported, so a steward it declares may be missing.";
51
+ readonly "stewards-conflict": "A steward was dropped: its name, or an Op it lists, belongs to another steward.";
52
+ readonly "steward-runs-unreadable": "Reading an Op's run ledger failed, so its last run is null.";
50
53
  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
54
  readonly "record-schema-invalid": "The record's front matter, or its JSON object, does not match the kind's schema.";
52
55
  readonly "record-id-duplicate": "Another record earlier in path order has the same id.";
@@ -60,6 +63,7 @@ export declare const REASONS: {
60
63
  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.";
61
64
  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
65
  readonly "review-undigested": "A verdict names no digest of the text it judged. It still counts, and an amendment does not stop it counting.";
66
+ readonly "source-transcript-drift": "The record's source block pins a transcript by hash, the file it names can be read here, and its bytes hash to something else: it is not the transcript the record means.";
63
67
  readonly "work-needs-unknown": "A work record's needs list names a work id no record has, so the item stays blocked.";
64
68
  readonly "work-implements-unknown": "A work record's implements list names a decision id no decision has.";
65
69
  readonly "work-needs-cycle": "A work record needs itself through its needs links, so it can never be ready.";
@@ -67,6 +71,9 @@ export declare const REASONS: {
67
71
  readonly "work-done-unpinned": "A work record is done and its evidence list is empty: nothing shows the work was done.";
68
72
  readonly "work-closed-without-date": "A work record is done or dropped and has no closing date.";
69
73
  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.";
74
+ readonly "answer-points-unreadable": "The points file the answer kind names can't be read, or is not valid.";
75
+ readonly "answer-point-unknown": "The answer's point is not declared in the points file the answer kind names.";
76
+ readonly "answer-point-changed": "The point's declaration changed since the question was asked, so the answer is to an older version of the question.";
70
77
  readonly "review-decider": "The verdict is the decider's own, and the quorum counts verdicts besides the decider's.";
71
78
  readonly "review-agent": "The reviewer holds the agent role in the trust policy at base.";
72
79
  readonly "review-duplicate": "A later verdict by the same principal replaces this one. Names are compared after NFKC, trimming and lower-casing.";
@@ -95,9 +102,18 @@ export declare const REASONS: {
95
102
  readonly "review-unsupported": "The kind's schema has no reviews field, so its records take no review.";
96
103
  readonly "review-note-required": "A dissent was given with no note: a dissent needs a reason.";
97
104
  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.";
105
+ readonly "record-state-not-initial": "A record written through chant serve mcp gives a state other than the kind's first: a new record opens proposed, and a person moves it on.";
106
+ readonly "source-harvest-not-proposed": "A harvested record (source.via harvest) was written in a state other than the kind's first: a harvest proposes, and a person decides.";
98
107
  readonly "record-sign-failed": "--sign was given and no author seal could be made: the record names no author, the key can't be read or used, git names no ssh signing key, or ssh-keygen is not installed.";
99
108
  readonly "session-unknown": "--session names no session of a session kind whose subjects are the record's kind.";
100
109
  readonly "session-not-open": "--session names a session in a closed state, which takes no more verdicts.";
110
+ readonly "points-undeclared": "No record kind with an answers block is declared, or given with --kind, so there is no points file to ask.";
111
+ readonly "points-invalid": "The points file an answer kind names can't be read, or does not match decision-points.schema.json and the rules checked in code.";
112
+ readonly "point-unknown": "No points file declares the point asked, or the one an answer names.";
113
+ readonly "point-inputs-invalid": "The inputs given to an ask are not a JSON object of the point's declared inputs.";
114
+ readonly "point-decider-failed": "A model decider that fails closed (unreachable: fail) could not answer, so the ask wrote nothing.";
115
+ readonly "answer-not-candidate": "The people's answer is not one of the question's candidates.";
116
+ readonly "quorum-not-met": "Too few of the people who answered count toward the point's quorum: distinct, not holding the agent role, and holding one of its roles when it names any.";
101
117
  readonly "since-rev-unknown": "--since names no commit, or a session with no opening revision and no commit that added it.";
102
118
  readonly "since-session-unknown": "--since has the shape of a session id and names no commit, and no session the kind or the declaration reads has that id.";
103
119
  readonly "since-session-open": "--since names a session that is still open, so the comparison runs to the working tree.";
@@ -129,6 +145,19 @@ export declare const REASONS: {
129
145
  readonly "environments-none-declared": "The member's chant.config.ts declares no environments, so only local and the environments in its ledger are listed.";
130
146
  readonly "environments-ledger-undeclared": "The member's ledger has releases in an environment its config's environments don't cover, so chant run --env would refuse it and it is not listed.";
131
147
  readonly "environments-ledger-unreadable": "The chant/lifecycle branch exists and the member's ledger environments could not be listed.";
148
+ readonly "box-credential-declared": "A file in a box member's directory carries a literal secret: a credential's shape, or a literal where a credential goes. A variable or secret-manager reference is not one.";
149
+ readonly "box-capability-unbrokered": "A capability in a member's box block names no broker, so the box would hold its credential.";
150
+ readonly "work-kind-missing": "No work kind to find the item in: --kind names a kind with no work block, or the declaration names no work kind.";
151
+ readonly "work-kind-ambiguous": "More than one declared work kind has a record with the id, so --kind must name one.";
152
+ readonly "work-item-unknown": "No work record has the id, so there is nothing to lease.";
153
+ readonly "work-item-closed": "A claim on a work item in a closed state, such as done or dropped: there is no work left to claim.";
154
+ readonly "lease-held": "Someone holds a live lease on the work item: another worker, or, for a claim, the same one.";
155
+ readonly "lease-not-held": "Nobody holds a live lease on the work item: it expired, was released or was never claimed.";
156
+ readonly "lease-token-mismatch": "The live lease on the work item carries another fencing token than the one given.";
157
+ readonly "lease-race": "Another writer changed the lease between this command's read and its write.";
158
+ readonly "lease-push-rejected": "The remote refused the lease push: another clone claimed the item first, or the remote could not be reached.";
159
+ readonly "box-isolation-collision": "Two boxes on one host resolve to the same port, state path or cookie name, or two ports in one box share an offset.";
160
+ readonly "box-isolation-literal": "A host's stateRoot or a box's state entry is a literal machine path instead of one derived from an environment reference and the box's name.";
132
161
  readonly "lock-invalid": "The lineage lock can't be read.";
133
162
  readonly "manual-step-open": "A scope in the lineage lock has an open manual step.";
134
163
  };
@@ -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,uHA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AC,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED,0EAA0E;AAC1E,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,EAAE,GAAG,MAAM,GAAG,IAAI,CAO5G;AAED,0FAA0F;AAC1F,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAE1E;AAED,yCAAyC;AACzC,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACrC,MAAM,EAAE,QAAQ,EAAE,CAAC;CACpB;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,SAAS,YAAY,EAAE,EAChC,eAAe,EAAE,MAAM,GAAG,SAAS,EACnC,IAAI,EAAE,aAAa,EACnB,OAAO,EAAE,SAAS;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,EAAE,GAChD,aAAa,EAAE,CAgDjB"}
@@ -55,6 +55,18 @@ export type RecordView = RecordEntry & {
55
55
  /** true when the record's seal verifies for its author against the signers at base; false when it fails, or is missing under an active policy; null when nothing here can say (#2688). */
56
56
  attested?: boolean | null;
57
57
  attestation?: VerdictAttestation;
58
+ /**
59
+ * For a work kind read in the working tree (#2732): the item's active work
60
+ * lease, or null when nobody holds one. Read from the local lease refs of
61
+ * the ledger owning the kind, without fetching. Absent under `--at`, since a
62
+ * lease is live state and not part of a revision.
63
+ */
64
+ lease?: {
65
+ holder: string;
66
+ token: string;
67
+ acquiredAt: string;
68
+ expiresAt: string;
69
+ } | null;
58
70
  };
59
71
  /** The role in the trust policy whose holders' verdicts the quorum does not count (#2671). */
60
72
  export declare const AGENT_ROLE = "agent";
@@ -1 +1 @@
1
- {"version":3,"file":"records-cli.d.ts","sourceRoot":"","sources":["../../src/workspace/records-cli.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAMH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAItD,OAAO,EAA4D,KAAK,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAGrH,OAAO,EAQL,KAAK,gBAAgB,EACrB,KAAK,MAAM,EACX,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,WAAW,EAChB,KAAK,YAAY,EAGjB,KAAK,kBAAkB,EACxB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAwB,KAAK,aAAa,EAAE,MAAM,QAAQ,CAAC;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAC3C,OAAO,EAAmB,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACzE,OAAO,EAA+C,KAAK,UAAU,EAAE,KAAK,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAIzH,6DAA6D;AAC7D,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAE1C,kFAAkF;AAClF,eAAO,MAAM,wBAAwB,gFAAgF,CAAC;AAKtH,2EAA2E;AAC3E,eAAO,MAAM,mBAAmB,IAAI,CAAC;AAErC,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,2FAA2F;IAC3F,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iEAAiE;IACjE,GAAG,EAAE,MAAM,CAAC;IACZ;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;GAIG;AACH,M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