@intentius/chant 0.90.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 (164) 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/main.d.ts.map +1 -1
  7. package/dist/cli/mcp/workspace-tools.d.ts +6 -4
  8. package/dist/cli/mcp/workspace-tools.d.ts.map +1 -1
  9. package/dist/cli/registry.d.ts +31 -0
  10. package/dist/cli/registry.d.ts.map +1 -1
  11. package/dist/components/verbs/vuln-scan.d.ts +72 -0
  12. package/dist/components/verbs/vuln-scan.d.ts.map +1 -1
  13. package/dist/lifecycle/git.d.ts +40 -5
  14. package/dist/lifecycle/git.d.ts.map +1 -1
  15. package/dist/lifecycle/lease.d.ts +72 -16
  16. package/dist/lifecycle/lease.d.ts.map +1 -1
  17. package/dist/lifecycle/member-ledger.d.ts +3 -2
  18. package/dist/lifecycle/member-ledger.d.ts.map +1 -1
  19. package/dist/lifecycle/plan-ledger.d.ts +114 -0
  20. package/dist/lifecycle/plan-ledger.d.ts.map +1 -0
  21. package/dist/lifecycle/work-lease.d.ts +140 -0
  22. package/dist/lifecycle/work-lease.d.ts.map +1 -0
  23. package/dist/op/activities/activity-contracts.d.ts +2 -2
  24. package/dist/op/builders.d.ts.map +1 -1
  25. package/dist/op/discover.d.ts +25 -0
  26. package/dist/op/discover.d.ts.map +1 -1
  27. package/dist/op/index.d.ts +9 -3
  28. package/dist/op/index.d.ts.map +1 -1
  29. package/dist/op/lifecycle-receipt-store.d.ts +34 -0
  30. package/dist/op/lifecycle-receipt-store.d.ts.map +1 -0
  31. package/dist/op/local-executor.d.ts +19 -0
  32. package/dist/op/local-executor.d.ts.map +1 -1
  33. package/dist/op/local-output.d.ts.map +1 -1
  34. package/dist/op/op-ir.d.ts +10 -1
  35. package/dist/op/op-ir.d.ts.map +1 -1
  36. package/dist/op/operator.d.ts +29 -0
  37. package/dist/op/operator.d.ts.map +1 -1
  38. package/dist/op/runtime.d.ts +9 -0
  39. package/dist/op/runtime.d.ts.map +1 -1
  40. package/dist/op/runtimes/local.d.ts.map +1 -1
  41. package/dist/op/step-output-ref.d.ts +2 -2
  42. package/dist/op/step-output-ref.d.ts.map +1 -1
  43. package/dist/op/steward.d.ts +140 -0
  44. package/dist/op/steward.d.ts.map +1 -0
  45. package/dist/op/types.d.ts +51 -0
  46. package/dist/op/types.d.ts.map +1 -1
  47. package/dist/op/work-lease-decl.d.ts +18 -0
  48. package/dist/op/work-lease-decl.d.ts.map +1 -0
  49. package/dist/op/work-lease-run.d.ts +173 -0
  50. package/dist/op/work-lease-run.d.ts.map +1 -0
  51. package/dist/workspace/box-isolation.d.ts +99 -0
  52. package/dist/workspace/box-isolation.d.ts.map +1 -0
  53. package/dist/workspace/checks/box-isolation.d.ts +18 -0
  54. package/dist/workspace/checks/box-isolation.d.ts.map +1 -0
  55. package/dist/workspace/checks/boxes.d.ts +71 -0
  56. package/dist/workspace/checks/boxes.d.ts.map +1 -0
  57. package/dist/workspace/checks/records.d.ts +1 -0
  58. package/dist/workspace/checks/records.d.ts.map +1 -1
  59. package/dist/workspace/checks.d.ts +10 -1
  60. package/dist/workspace/checks.d.ts.map +1 -1
  61. package/dist/workspace/decide.d.ts +184 -0
  62. package/dist/workspace/decide.d.ts.map +1 -0
  63. package/dist/workspace/decision-points.schema.json +137 -0
  64. package/dist/workspace/declaration.d.ts +51 -0
  65. package/dist/workspace/declaration.d.ts.map +1 -1
  66. package/dist/workspace/declaration.schema.json +172 -0
  67. package/dist/workspace/declared-kinds.d.ts +12 -0
  68. package/dist/workspace/declared-kinds.d.ts.map +1 -1
  69. package/dist/workspace/points-cli.d.ts +113 -0
  70. package/dist/workspace/points-cli.d.ts.map +1 -0
  71. package/dist/workspace/points.d.ts +320 -0
  72. package/dist/workspace/points.d.ts.map +1 -0
  73. package/dist/workspace/reason-codes.d.ts +26 -0
  74. package/dist/workspace/reason-codes.d.ts.map +1 -1
  75. package/dist/workspace/record-assets.d.ts.map +1 -1
  76. package/dist/workspace/records-cli.d.ts +12 -0
  77. package/dist/workspace/records-cli.d.ts.map +1 -1
  78. package/dist/workspace/records.d.ts +8 -2
  79. package/dist/workspace/records.d.ts.map +1 -1
  80. package/dist/workspace/status-stewards.d.ts +121 -0
  81. package/dist/workspace/status-stewards.d.ts.map +1 -0
  82. package/dist/workspace/status.d.ts +52 -1
  83. package/dist/workspace/status.d.ts.map +1 -1
  84. package/dist/workspace/work-cli.d.ts +78 -0
  85. package/dist/workspace/work-cli.d.ts.map +1 -0
  86. package/package.json +1 -1
  87. package/src/cli/handlers/components.test.ts +93 -0
  88. package/src/cli/handlers/components.ts +44 -3
  89. package/src/cli/handlers/operator.ts +107 -2
  90. package/src/cli/handlers/run.test.ts +19 -0
  91. package/src/cli/handlers/run.ts +53 -1
  92. package/src/cli/main.test.ts +40 -0
  93. package/src/cli/main.ts +78 -2
  94. package/src/cli/mcp/workspace-tools.test.ts +14 -1
  95. package/src/cli/mcp/workspace-tools.ts +49 -5
  96. package/src/cli/registry.ts +31 -0
  97. package/src/components/verbs/vuln-scan.test.ts +124 -1
  98. package/src/components/verbs/vuln-scan.ts +142 -1
  99. package/src/lifecycle/git.ts +65 -15
  100. package/src/lifecycle/lease.test.ts +22 -0
  101. package/src/lifecycle/lease.ts +133 -29
  102. package/src/lifecycle/member-ledger.ts +3 -2
  103. package/src/lifecycle/plan-ledger.test.ts +148 -0
  104. package/src/lifecycle/plan-ledger.ts +158 -0
  105. package/src/lifecycle/work-lease.test.ts +236 -0
  106. package/src/lifecycle/work-lease.ts +426 -0
  107. package/src/op/builders.ts +5 -0
  108. package/src/op/discover.ts +71 -0
  109. package/src/op/index.ts +16 -3
  110. package/src/op/lifecycle-receipt-store.test.ts +60 -0
  111. package/src/op/lifecycle-receipt-store.ts +61 -0
  112. package/src/op/local-executor.ts +216 -18
  113. package/src/op/local-output.ts +13 -0
  114. package/src/op/op-ir.ts +14 -0
  115. package/src/op/operator.ts +75 -4
  116. package/src/op/runtime.ts +6 -0
  117. package/src/op/runtimes/local.ts +3 -0
  118. package/src/op/step-output-ref.ts +6 -2
  119. package/src/op/steward.test.ts +212 -0
  120. package/src/op/steward.ts +253 -0
  121. package/src/op/types.ts +53 -0
  122. package/src/op/work-lease-decl.ts +80 -0
  123. package/src/op/work-lease-run.test.ts +326 -0
  124. package/src/op/work-lease-run.ts +395 -0
  125. package/src/workspace/box-isolation.test.ts +261 -0
  126. package/src/workspace/box-isolation.ts +205 -0
  127. package/src/workspace/check-contract.test.ts +3 -1
  128. package/src/workspace/check.schema.json +15 -7
  129. package/src/workspace/checks/box-isolation.ts +68 -0
  130. package/src/workspace/checks/boxes.test.ts +197 -0
  131. package/src/workspace/checks/boxes.ts +307 -0
  132. package/src/workspace/checks/records.ts +25 -0
  133. package/src/workspace/checks.test.ts +7 -0
  134. package/src/workspace/checks.ts +19 -2
  135. package/src/workspace/decide.test.ts +224 -0
  136. package/src/workspace/decide.ts +576 -0
  137. package/src/workspace/decision-points.schema.json +137 -0
  138. package/src/workspace/declaration.schema.json +172 -0
  139. package/src/workspace/declaration.ts +137 -0
  140. package/src/workspace/declared-kinds.ts +25 -2
  141. package/src/workspace/intent.schema.json +4 -1
  142. package/src/workspace/point-answer.schema.json +95 -0
  143. package/src/workspace/points-cli.ts +273 -0
  144. package/src/workspace/points-write.schema.json +489 -0
  145. package/src/workspace/points.schema.json +710 -0
  146. package/src/workspace/points.test.ts +264 -0
  147. package/src/workspace/points.ts +564 -0
  148. package/src/workspace/read-contract.test.ts +18 -1
  149. package/src/workspace/reason-codes.test.ts +14 -1
  150. package/src/workspace/reason-codes.ts +33 -0
  151. package/src/workspace/record-assets.test.ts +3 -2
  152. package/src/workspace/record-assets.ts +4 -1
  153. package/src/workspace/records-cli.ts +15 -2
  154. package/src/workspace/records-contract.test.ts +3 -2
  155. package/src/workspace/records.schema.json +17 -0
  156. package/src/workspace/records.ts +33 -3
  157. package/src/workspace/status-contract.test.ts +178 -0
  158. package/src/workspace/status-stewards.ts +225 -0
  159. package/src/workspace/status.schema.json +230 -4
  160. package/src/workspace/status.ts +106 -5
  161. package/src/workspace/work-cli.test.ts +180 -0
  162. package/src/workspace/work-cli.ts +246 -0
  163. package/src/workspace/work-lease.schema.json +233 -0
  164. package/src/workspace/work-readiness-chud.test.ts +145 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"box-isolation.d.ts","sourceRoot":"","sources":["../../../src/workspace/checks/box-isolation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAGhD,eAAO,MAAM,iBAAiB,WAAW,CAAC;AAC1C,eAAO,MAAM,eAAe,WAAW,CAAC;AAIxC,eAAO,MAAM,oBAAoB,EAAE,SAAS,cAAc,EA6CzD,CAAC"}
@@ -0,0 +1,71 @@
1
+ /**
2
+ * The box checks, WSP121 and WSP122 (#2726).
3
+ *
4
+ * A member whose entry has a `box` block is a box, or holds a box's
5
+ * declarations. A box holds no credential: each capability it needs outside
6
+ * itself (inference, Fountain, a third-party API) is reached through a
7
+ * broker, a runtime such as a lobby or a door, which holds the credential
8
+ * and enforces the scope the block declares. chant only states and checks
9
+ * this; it never runs a broker (ws-052).
10
+ *
11
+ * | Id | Code | Fails when |
12
+ * |---|---|---|
13
+ * | WSP121 | `box-credential-declared` | a file in the box member's directory carries a literal secret (fixed) |
14
+ * | WSP122 | `box-capability-unbrokered` | a capability in the block names no broker |
15
+ *
16
+ * WSP121 reads the member's files from the tree checked, so it works under
17
+ * `--at`, and runs no member code. A literal secret is either a value with a
18
+ * well-known credential shape (an AWS key id, a GitHub or Slack token, an
19
+ * `sk-` key, private key material), wherever it sits, or a literal string
20
+ * where a credential goes: under a key named like one (`API_KEY`, `token`,
21
+ * `credential`, `password`, ...), or the `value` of a `{ key, value }` vault
22
+ * secret. A reference is never one: `${VAR}` and `$VAR`, a secret-manager
23
+ * reference (`op://`, `bws://`, `infisical://`), a `{{...}}` template
24
+ * placeholder, and any expression, such as `process.env.X`, that is not a
25
+ * string literal. WSP121 is fixed: a credential in a box's files is in git.
26
+ *
27
+ * WSP123 and WSP124, box isolation (#2727), are in `./box-isolation.ts` and
28
+ * listed here after these two.
29
+ */
30
+ import * as ts from "typescript";
31
+ import type { WorkspaceCheck } from "../checks.js";
32
+ /** The read contract's codes for the box findings, carried as `code` on each. */
33
+ export declare const BOX_FINDING_CODES: readonly ["box-credential-declared", "box-capability-unbrokered", "box-isolation-collision", "box-isolation-literal"];
34
+ export declare const WSP_BOX_CREDENTIAL = "WSP121";
35
+ export declare const WSP_BOX_UNBROKERED = "WSP122";
36
+ /** Values whose shape alone says they are a credential. The list FTN001 uses, plus Anthropic keys. */
37
+ export declare const CREDENTIAL_SHAPES: readonly {
38
+ pattern: RegExp;
39
+ label: string;
40
+ }[];
41
+ /** Secret-manager references a value may be instead of the secret. */
42
+ export declare const SECRET_REFERENCE_SCHEMES: readonly ["op://", "bws://", "infisical://"];
43
+ /** Whether `key` names a credential. Exported for tests. */
44
+ export declare function isCredentialKey(key: string): boolean;
45
+ /** Whether `value` refers to a secret rather than being one. Exported for tests. */
46
+ export declare function isSecretReference(value: string): boolean;
47
+ /** The credential shape `value` has, or undefined. */
48
+ export declare function credentialShape(value: string): string | undefined;
49
+ /** One literal secret found in a file. */
50
+ export interface LiteralSecret {
51
+ /** 1-based. */
52
+ line: number;
53
+ column: number;
54
+ /** What was found, for the message: never the value itself. */
55
+ what: string;
56
+ }
57
+ /**
58
+ * The literal secrets in a TypeScript, JavaScript or JSON file, read as
59
+ * syntax and never run.
60
+ */
61
+ export declare function literalSecretsInCode(text: string, file: string, kind: ts.ScriptKind): LiteralSecret[];
62
+ /**
63
+ * The literal secrets in any other text file, such as a shell script, an
64
+ * env file or YAML: a credential shape anywhere, or a line assigning a
65
+ * literal to a credential-named key.
66
+ */
67
+ export declare function literalSecretsInText(text: string, assignments?: boolean): LiteralSecret[];
68
+ /** The literal secrets in one file, or none when the file is binary or too large. */
69
+ export declare function literalSecretsInFile(text: string, path: string): LiteralSecret[];
70
+ export declare const BOX_CHECKS: readonly WorkspaceCheck[];
71
+ //# sourceMappingURL=boxes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"boxes.d.ts","sourceRoot":"","sources":["../../../src/workspace/checks/boxes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,KAAK,EAAE,cAAc,EAA8C,MAAM,WAAW,CAAC;AAM5F,iFAAiF;AACjF,eAAO,MAAM,iBAAiB,uHAAwJ,CAAC;AAEvL,eAAO,MAAM,kBAAkB,WAAW,CAAC;AAC3C,eAAO,MAAM,kBAAkB,WAAW,CAAC;AAE3C,sGAAsG;AACtG,eAAO,MAAM,iBAAiB,EAAE,SAAS;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,EAS1E,CAAC;AAEF,sEAAsE;AACtE,eAAO,MAAM,wBAAwB,8CAA+C,CAAC;AASrF,4DAA4D;AAC5D,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAEpD;AAED,oFAAoF;AACpF,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAQxD;AAYD,sDAAsD;AACtD,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAEjE;AAED,0CAA0C;AAC1C,MAAM,WAAW,aAAa;IAC5B,eAAe;IACf,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,+DAA+D;IAC/D,IAAI,EAAE,MAAM,CAAC;CACd;AA4BD;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,CAAC,UAAU,GAAG,aAAa,EAAE,CAkCrG;AAkBD;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,UAAO,GAAG,aAAa,EAAE,CAgBtF;AAQD,qFAAqF;AACrF,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,aAAa,EAAE,CAMhF;AAmBD,eAAO,MAAM,UAAU,EAAE,SAAS,cAAc,EAgE/C,CAAC"}
@@ -14,6 +14,7 @@
14
14
  * | WSP113 | a pinned file that a superseding record pins at the old hash: the artifact did not follow the decision |
15
15
  * | WSP114 | the records of `--kind` can't be read (fixed) |
16
16
  * | WSP115 | a record kind the declaration names is missing or does not load as one (fixed, #2680) |
17
+ * | WSP116 | an answer kind's decision points file is missing or not valid (fixed, ws-058, #2738) |
17
18
  */
18
19
  import type { WorkspaceCheck } from "../checks.js";
19
20
  import type { ReadErrorCode, RecordEntry } from "../records.js";
@@ -1 +1 @@
1
- {"version":3,"file":"records.d.ts","sourceRoot":"","sources":["../../../src/workspace/checks/records.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAuB,MAAM,WAAW,CAAC;AACrE,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE7D,sEAAsE;AACtE,MAAM,MAAM,WAAW,GACnB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,SAAS,CAAC,WAAW,GAAG;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,EAAE,CAAA;CAAE,GACtE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE;QAAE,IAAI,EAAE,aAAa,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,CAAC;AAgBtE,eAAO,MAAM,aAAa,EAAE,SAAS,cAAc,EA6DlD,CAAC"}
1
+ {"version":3,"file":"records.d.ts","sourceRoot":"","sources":["../../../src/workspace/checks/records.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAuB,MAAM,WAAW,CAAC;AACrE,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE7D,sEAAsE;AACtE,MAAM,MAAM,WAAW,GACnB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,SAAS,CAAC,WAAW,GAAG;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,EAAE,CAAA;CAAE,GACtE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE;QAAE,IAAI,EAAE,aAAa,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,CAAC;AAgBtE,eAAO,MAAM,aAAa,EAAE,SAAS,cAAc,EAqFlD,CAAC"}
@@ -28,6 +28,9 @@
28
28
  * | WSP101 to WSP106 | generated files |
29
29
  * | WSP111 to WSP114 | records read with `--kind` (#2549) |
30
30
  * | WSP115 | the record kinds the declaration names (#2680) |
31
+ * | WSP116 | the decision points file of each declared answer kind (ws-058) |
32
+ * | WSP121, WSP122 | boxes: no literal credential, every capability brokered (#2726) |
33
+ * | WSP123, WSP124 | box isolation: no shared port, state path or cookie, no literal machine path (#2727) |
31
34
  */
32
35
  import type { LintDiagnostic, LintRule, Severity } from "../lint/rule.js";
33
36
  import type { PostSynthDiagnostic } from "../lint/post-synth.js";
@@ -79,6 +82,12 @@ export interface WorkspaceDiagnostic extends PostSynthDiagnostic {
79
82
  pointer: string;
80
83
  /** An absolute path, for a finding about a file other than the declaration, such as a record (#2549). It is reported at its first line. */
81
84
  file?: string;
85
+ /** A path in the tree checked, relative to the workspace root, for a finding about a file there (#2726). It is reported at `line` and `column`. */
86
+ treeFile?: string;
87
+ line?: number;
88
+ column?: number;
89
+ /** The read contract's code for the finding, when it has one (#2726). */
90
+ code?: ReasonCode;
82
91
  }
83
92
  export interface WorkspaceCheck {
84
93
  /** `WSP` and three digits. Public once shipped. */
@@ -94,7 +103,7 @@ export interface WorkspaceCheck {
94
103
  /** A diagnostic ready for lint's reporters, with the entry it is about. */
95
104
  export interface WorkspaceFinding extends LintDiagnostic {
96
105
  entity?: string;
97
- /** The read contract's reason code, for a WSP001 finding: why the declaration can't be read (#2536). */
106
+ /** The read contract's reason code: for a WSP001 finding, why the declaration can't be read (#2536); for a box check, its finding code (#2726). */
98
107
  code?: ReasonCode;
99
108
  }
100
109
  export interface SuppressedFinding extends WorkspaceFinding {
@@ -1 +1 @@
1
- {"version":3,"file":"checks.d.ts","sourceRoot":"","sources":["../../src/workspace/checks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACvE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAsD,KAAK,WAAW,EAAkC,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AACzJ,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD,OAAO,EAA4C,KAAK,eAAe,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5G,OAAO,EAAuB,KAAK,aAAa,EAAE,MAAM,QAAQ,CAAC;AAEjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAA0C,KAAK,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACrG,OAAO,EAAoC,KAAK,iBAAiB,EAAE,MAAM,kBAAkB,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AAa,CAAC;IACrB,8FAA8F;IAC9F,OAAO,CAAC,EAAE,WAAW,CAAC;CACvB;AAED;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,OAAO,GAAE;IAAE,aAAa,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,OAAO,CAAC,cAAc,CAAC,CASrJ;AAUD;;;;;;;;GAQG;AACH,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAiB,EAC5C,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,sBAAsB,CAAC,CAsDjC"}
@@ -0,0 +1,184 @@
1
+ /**
2
+ * Answers to decision points as records (ws-058, #2739).
3
+ *
4
+ * {@link askPoint} asks a point's deciders for one set of inputs and records
5
+ * the answer in the answer kind's records directory, and {@link answerPoint}
6
+ * records people's answer to an open question. Both write one Markdown record
7
+ * or none, never commit, and go through the checks every records write goes
8
+ * through (`records-write.ts`): the record is read back with the kind's schema
9
+ * before it is written, and no other record may become invalid.
10
+ *
11
+ * - A table's answer is `answered`.
12
+ * - A model's answer at or above its threshold is `proposed`, whatever its
13
+ * confidence, with the probabilities, confidence and threshold, until a
14
+ * person confirms it. Below the threshold the question is `escalated`.
15
+ * - A question no decider before the quorum answered is `escalated`: open for
16
+ * people, with every decider's reason and any model's answer.
17
+ *
18
+ * The same point, declaration and inputs are answered once: the record's id is
19
+ * the point's name and the first 12 hex digits of the inputs hash. Asking again
20
+ * returns the record that is there when it is proposed or answered. An
21
+ * escalated one is asked again, since a backend may answer now, and rewritten
22
+ * only when the chain no longer escalates.
23
+ *
24
+ * chant never calls a model (ws-052): the model call is the caller's
25
+ * {@link ModelAsk}, such as the decide Op activity (#2740), or a backend's
26
+ * response the caller already has (`points ask --response`).
27
+ */
28
+ import { type RecordEntry, type RecordWarning } from "./records.js";
29
+ import { type KindView } from "./records-write.js";
30
+ import { type Escalation, type ModelAsk, type Point } from "./points.js";
31
+ import { type TrustPolicy } from "./trust/policy.js";
32
+ import type { SourceVia } from "./source-block.js";
33
+ /** The version of the write documents `points ask` and `points answer` print. */
34
+ export declare const POINTS_WRITE_CONTRACT_VERSION = 1;
35
+ export declare const POINTS_WRITE_SCHEMA_ID = "https://intentius.io/chant/schemas/workspace/points-write/v1/points-write.schema.json";
36
+ /** Why `points ask` or `points answer` wrote nothing. Closed: a reader may switch on it. */
37
+ export declare const POINTS_WRITE_ERROR_CODES: readonly ["kind-unreadable", "kind-invalid", "schema-unreadable", "schema-id-mismatch", "schema-invalid", "location-missing", "write-usage-invalid", "write-input-invalid", "points-undeclared", "points-invalid", "point-unknown", "point-inputs-invalid", "point-decider-failed", "answer-not-candidate", "quorum-not-met", "record-not-found", "record-closed", "record-id-taken", "record-unparseable", "record-schema-invalid", "record-id-duplicate", "record-supersedes-unknown", "record-supersedes-conflict", "session-seal-mismatch", "session-verdict-unknown-record"];
38
+ export type PointsWriteErrorCode = (typeof POINTS_WRITE_ERROR_CODES)[number];
39
+ export declare class PointsWriteError extends Error {
40
+ readonly code: PointsWriteErrorCode;
41
+ constructor(code: PointsWriteErrorCode, message: string);
42
+ }
43
+ /** An answer as the read contract shows it: in `points --json` and in the documents `points ask` and `points answer` print. */
44
+ export interface QuestionView {
45
+ id: string;
46
+ /** The record file, from the repository root, with / separators. */
47
+ path: string;
48
+ point: string;
49
+ title: string;
50
+ /** What the question is about, the record's first `constrains` entry, or null. */
51
+ subject: string | null;
52
+ state: "escalated" | "proposed" | "answered";
53
+ /** Not answered yet: escalated to people, or proposed by a model and waiting for a person to confirm it. */
54
+ open: boolean;
55
+ questionType: string;
56
+ candidates: (string | boolean)[];
57
+ inputs: Record<string, unknown>;
58
+ inputsHash: string;
59
+ pointVersion: string;
60
+ /** The point's declaration is still the one the question was asked under, or null when the points file no longer declares the point. */
61
+ current: boolean | null;
62
+ answer: string | boolean | null;
63
+ decider: Record<string, unknown>;
64
+ probabilities: Record<string, number> | null;
65
+ confidence: number | null;
66
+ threshold: number | null;
67
+ /**
68
+ * Any model answer: the proposal for a proposed question, or for an
69
+ * escalated one the last model answer below its threshold. null when no
70
+ * model answered.
71
+ */
72
+ model: {
73
+ answer: string | boolean | null;
74
+ confidence: number | null;
75
+ threshold: number | null;
76
+ model: string | null;
77
+ backend: string | null;
78
+ observed: boolean;
79
+ } | null;
80
+ escalations: Escalation[];
81
+ answeredBy: string[];
82
+ askedOn: string | null;
83
+ answeredOn: string | null;
84
+ valid: boolean;
85
+ warnings: RecordWarning[];
86
+ }
87
+ /** One answer record as a {@link QuestionView}, or null when its front matter can't be read. `point` is its point as declared now, when there is one. */
88
+ export declare function questionView(entry: RecordEntry, point: Point | undefined): QuestionView | null;
89
+ /** What `points ask` and `points answer` print. */
90
+ export type PointsWriteDocument = {
91
+ $schema: string;
92
+ contract: number;
93
+ verb: "ask" | "answer";
94
+ kind: KindView;
95
+ id: string;
96
+ path: string;
97
+ /** True when the record was already there and nothing new was written. */
98
+ reused: boolean;
99
+ /** True when a file was written. False when reused, and with --dry-run. */
100
+ written: boolean;
101
+ dryRun: boolean;
102
+ question: QuestionView;
103
+ /** With --dry-run, the text the command would write. */
104
+ text?: string;
105
+ } | {
106
+ $schema: string;
107
+ contract: number;
108
+ verb: "ask" | "answer";
109
+ error: {
110
+ code: PointsWriteErrorCode;
111
+ message: string;
112
+ };
113
+ };
114
+ /**
115
+ * The answer kinds a write can go through: the one `kind` names (a file, or a
116
+ * declared kind's name), or every declared kind with an answers block.
117
+ */
118
+ export declare function answerKindFiles(cwd: string, kind?: string): Promise<string[]>;
119
+ export interface AskPointOptions {
120
+ /** Where the kind resolves and the workspace is found. */
121
+ cwd: string;
122
+ /** The point's name. */
123
+ point: string;
124
+ /** The inputs, keyed by the point's declared input names. */
125
+ inputs: unknown;
126
+ /** What the question is about, such as a work item's id: written to `constrains`. */
127
+ subject?: string;
128
+ /** The answer kind file, or a declared kind's name. Without it, the declared answer kind whose points file declares the point. */
129
+ kind?: string;
130
+ /** The model call. Without it, a model decider is not asked. */
131
+ ask?: ModelAsk;
132
+ /** How the answer reached the workspace, for its source block (#2708). Defaults to cli. */
133
+ via?: SourceVia;
134
+ /** The client that asked, for its source block. */
135
+ client?: {
136
+ name: string;
137
+ version?: string;
138
+ };
139
+ /** The date written as asked_on, and answered_on for a table's answer, YYYY-MM-DD. Defaults to today, in UTC. */
140
+ on?: string;
141
+ dryRun?: boolean;
142
+ }
143
+ /**
144
+ * Ask a point for these inputs, and record the answer: `points ask`. Returns
145
+ * the record that is there when the same point, declaration and inputs were
146
+ * answered or proposed before.
147
+ */
148
+ export declare function askPoint(opts: AskPointOptions): Promise<PointsWriteDocument>;
149
+ export interface AnswerPointOptions {
150
+ cwd: string;
151
+ /** The answer record's id. */
152
+ id: string;
153
+ /** The people's answer: one of the question's candidates. For a noul, true, false, yes or no. */
154
+ answer: string | boolean;
155
+ /** Who answered, as the caller names them. chant does not check who they are; the trust policy says who counts. */
156
+ by: string[];
157
+ kind?: string;
158
+ on?: string;
159
+ dryRun?: boolean;
160
+ }
161
+ /**
162
+ * Count `by` toward a point's quorum: distinct people, after normalising,
163
+ * leaving out anyone holding the agent role in the trust policy at base, and,
164
+ * when the quorum names roles, anyone holding none of them.
165
+ */
166
+ export declare function tallyQuorum(by: string[], quorum: {
167
+ count: number;
168
+ roles?: string[];
169
+ }, policy: TrustPolicy): {
170
+ counted: string[];
171
+ left: {
172
+ name: string;
173
+ why: string;
174
+ }[];
175
+ met: boolean;
176
+ };
177
+ /**
178
+ * People answer an open question: `points answer`. A proposed question the
179
+ * people answer as the model did is confirmed, and keeps the model as its
180
+ * decider; any other answer is the quorum's, and a model's proposal moves into
181
+ * the escalations. The question becomes `answered`.
182
+ */
183
+ export declare function answerPoint(opts: AnswerPointOptions): Promise<PointsWriteDocument>;
184
+ //# sourceMappingURL=decide.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decide.d.ts","sourceRoot":"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;AAqED;;;;GAIG;AACH,wBAAsB,QAAQ,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAgElF;AAQD,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,MAAM,CAAC;IACZ,8BAA8B;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,iGAAiG;IACjG,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC;IACzB,mHAAmH;IACnH,EAAE,EAAE,MAAM,EAAE,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAYD;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,EAAE,MAAM,EAAE,WAAW,GAAG;IAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAAC,GAAG,EAAE,OAAO,CAAA;CAAE,CAqBtL;AAED;;;;;GAKG;AACH,wBAAsB,WAAW,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CA2FxF"}
@@ -0,0 +1,137 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://intentius.io/chant/schemas/workspace/decision-points/v1/decision-points.schema.json",
4
+ "title": "Decision points",
5
+ "description": "A workspace's decision points (ws-058, #2738): the recurring questions it asks of its own graph, declared as data in a JSON file that an answer record kind names in `answers.points`. Each point is a typed question (`noul`, `choice` with 2 to 255 options, or `score` with 2 to 10 ordered levels, the question types of the POST /v1/systemone wire format, #2491), the inputs it reads, each named as a read-contract output, and an ordered chain of deciders: `table` rows, `model` deciders with a backend, a pinned model id and a threshold, and a `quorum` of people, always last. Taken from chud's decision-points.schema.json; `boolean` is read as `noul`. What JSON Schema cannot say is checked in code (`points.ts`): an input's output is one the read contract has, a table row tests declared inputs and answers a candidate, a field belongs to its decider's kind, a model id is pinned rather than an alias, and the chain ends in its one quorum. Unknown fields are refused, except fields whose names start with x-.",
6
+ "type": "object",
7
+ "required": ["points"],
8
+ "properties": {
9
+ "$schema": { "type": "string" },
10
+ "points": {
11
+ "type": "object",
12
+ "minProperties": 1,
13
+ "propertyNames": { "pattern": "^[a-z][a-z0-9-]*$" },
14
+ "additionalProperties": { "$ref": "#/$defs/point" }
15
+ }
16
+ },
17
+ "patternProperties": { "^x-": true },
18
+ "additionalProperties": false,
19
+ "$defs": {
20
+ "text": { "type": "string", "minLength": 1 },
21
+ "point": {
22
+ "type": "object",
23
+ "required": ["title", "question", "inputs", "deciders"],
24
+ "properties": {
25
+ "title": { "$ref": "#/$defs/text" },
26
+ "question": { "$ref": "#/$defs/question" },
27
+ "inputs": {
28
+ "type": "object",
29
+ "description": "The state the deciders see, input name to description. A name is a read-contract output (record, decision, work-item, finding, region, commit, member, gate, release, environment, component), optionally followed by dotted field names, such as work-item.fits_small: a field of that output, or a value the caller derives from it. The caller supplies the values; a table row can only test these names.",
30
+ "minProperties": 1,
31
+ "propertyNames": { "pattern": "^[A-Za-z_][A-Za-z0-9_-]*(\\.[A-Za-z_][A-Za-z0-9_]*)*$" },
32
+ "additionalProperties": { "type": "string" }
33
+ },
34
+ "deciders": {
35
+ "type": "array",
36
+ "minItems": 1,
37
+ "items": { "$ref": "#/$defs/decider" }
38
+ }
39
+ },
40
+ "patternProperties": { "^x-": true },
41
+ "additionalProperties": false
42
+ },
43
+ "question": {
44
+ "type": "object",
45
+ "required": ["type", "instructions", "criteria"],
46
+ "properties": {
47
+ "type": { "enum": ["noul", "boolean", "choice", "score"], "description": "boolean is chud's name for noul, read as noul." },
48
+ "instructions": { "$ref": "#/$defs/text" },
49
+ "criteria": {
50
+ "description": "The candidates. noul: {true, false} descriptions. choice: option to description, 2 to 255 options. score: 2 to 10 ordered levels.",
51
+ "type": ["object", "array"]
52
+ }
53
+ },
54
+ "additionalProperties": false,
55
+ "allOf": [
56
+ {
57
+ "if": { "properties": { "type": { "enum": ["noul", "boolean"] } } },
58
+ "then": {
59
+ "properties": {
60
+ "criteria": {
61
+ "type": "object",
62
+ "required": ["true", "false"],
63
+ "properties": { "true": { "type": "string" }, "false": { "type": "string" } },
64
+ "additionalProperties": false
65
+ }
66
+ }
67
+ }
68
+ },
69
+ {
70
+ "if": { "properties": { "type": { "const": "choice" } } },
71
+ "then": { "properties": { "criteria": { "type": "object", "minProperties": 2, "maxProperties": 255, "additionalProperties": { "type": "string" } } } }
72
+ },
73
+ {
74
+ "if": { "properties": { "type": { "const": "score" } } },
75
+ "then": { "properties": { "criteria": { "type": "array", "minItems": 2, "maxItems": 10, "uniqueItems": true, "items": { "$ref": "#/$defs/text" } } } }
76
+ }
77
+ ]
78
+ },
79
+ "scalar": { "type": ["string", "number", "boolean", "null"] },
80
+ "condition": {
81
+ "description": "A value the input must equal, or one comparison.",
82
+ "oneOf": [
83
+ { "$ref": "#/$defs/scalar" },
84
+ {
85
+ "type": "object",
86
+ "minProperties": 1,
87
+ "maxProperties": 1,
88
+ "properties": {
89
+ "eq": { "$ref": "#/$defs/scalar" },
90
+ "ne": { "$ref": "#/$defs/scalar" },
91
+ "lt": { "type": "number" },
92
+ "lte": { "type": "number" },
93
+ "gt": { "type": "number" },
94
+ "gte": { "type": "number" },
95
+ "in": { "type": "array", "items": { "$ref": "#/$defs/scalar" } }
96
+ },
97
+ "additionalProperties": false
98
+ }
99
+ ]
100
+ },
101
+ "row": {
102
+ "type": "object",
103
+ "required": ["when", "answer"],
104
+ "properties": {
105
+ "when": {
106
+ "type": "object",
107
+ "description": "Every named input must meet its condition. An empty object matches every state.",
108
+ "additionalProperties": { "$ref": "#/$defs/condition" }
109
+ },
110
+ "answer": { "type": ["string", "boolean"] },
111
+ "note": { "type": "string" }
112
+ },
113
+ "additionalProperties": false
114
+ },
115
+ "decider": {
116
+ "type": "object",
117
+ "required": ["kind"],
118
+ "properties": {
119
+ "kind": { "enum": ["table", "model", "quorum"] },
120
+ "rows": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/row" } },
121
+ "backend": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$", "description": "model: which backend answers, such as systemone (any server with the POST /v1/systemone wire format). chant never calls it: the decide Op activity or a runtime's decider does." },
122
+ "model": { "type": "string", "minLength": 1, "description": "model: the pinned model id the backend is asked for, such as jev-1.13.0. An alias such as jev-latest is refused." },
123
+ "threshold": { "type": "number", "exclusiveMinimum": 0, "maximum": 1, "description": "model: the least confidence that makes the answer a proposal. Below it the answer is not observed and the next decider is asked." },
124
+ "unreachable": { "enum": ["escalate", "fail"], "description": "model: what happens when the backend can't be reached or gives no usable answer: escalate to the next decider (the default), or fail the ask and write nothing." },
125
+ "count": { "type": "integer", "minimum": 1, "description": "quorum: how many distinct people must answer." },
126
+ "roles": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/text" }, "description": "quorum: the trust policy roles whose holders count." },
127
+ "note": { "type": "string" }
128
+ },
129
+ "additionalProperties": false,
130
+ "allOf": [
131
+ { "if": { "properties": { "kind": { "const": "table" } } }, "then": { "required": ["rows"] } },
132
+ { "if": { "properties": { "kind": { "const": "model" } } }, "then": { "required": ["backend", "model", "threshold"] } },
133
+ { "if": { "properties": { "kind": { "const": "quorum" } } }, "then": { "required": ["count"] } }
134
+ ]
135
+ }
136
+ }
137
+ }
@@ -96,6 +96,53 @@ export interface RecordKindDeclaration {
96
96
  /** The entry's JSON Pointer in the file, for messages. */
97
97
  pointer: string;
98
98
  }
99
+ /**
100
+ * A capability a box reaches through a broker (#2726): inference, Fountain,
101
+ * a third-party API. The broker is runtime (a lobby, a door, a studio) and
102
+ * holds the credential; the declaration names it and the scope it enforces.
103
+ */
104
+ export interface BoxCapability {
105
+ name: string;
106
+ /** What brokers it, such as `lobby`, or null when the entry names no broker (WSP122). */
107
+ broker: string | null;
108
+ /** What of the box's own the broker lets it reach, such as `agent`, `vault`, `conversations`, `sandboxes`. */
109
+ scope: string[];
110
+ /** The entry's JSON Pointer in the file, for messages. */
111
+ pointer: string;
112
+ }
113
+ /** A member that is a box, or a box's declarations (#2726). */
114
+ export interface BoxDeclaration {
115
+ capabilities: BoxCapability[];
116
+ /** The host and slot of the box's isolation, or null when the block declares none (#2727). The values are derived in `boxes.ts`. */
117
+ isolation: BoxIsolationDeclaration | null;
118
+ /** The block's JSON Pointer in the file, for messages. */
119
+ pointer: string;
120
+ }
121
+ /** What a box declares about its isolation (#2727): its identity on a host, and the names of what it needs kept apart. */
122
+ export interface BoxIsolationDeclaration {
123
+ host: string;
124
+ slot: number;
125
+ /** Port name to offset in the box's block, in file order. */
126
+ ports: Record<string, number>;
127
+ /** State name to a path relative to the box's state directory, in file order. */
128
+ state: Record<string, string>;
129
+ cookies: string[];
130
+ }
131
+ /** A host boxes run on (#2727): one machine under one hostname. */
132
+ export interface Host {
133
+ name: string;
134
+ ports: {
135
+ from: number;
136
+ to: number;
137
+ perBox: number;
138
+ };
139
+ /** As written, or null for the default ({@link DEFAULT_STATE_ROOT}). */
140
+ stateRoot: string | null;
141
+ /** The entry's JSON Pointer in the file, for messages. */
142
+ pointer: string;
143
+ }
144
+ /** Where boxes keep state when their host names no stateRoot (#2727). */
145
+ export declare const DEFAULT_STATE_ROOT = "${XDG_STATE_HOME}/chant/boxes";
99
146
  export interface Member {
100
147
  type: "member";
101
148
  name: string;
@@ -111,6 +158,8 @@ export interface Member {
111
158
  links: LinkDeclaration[];
112
159
  /** The record kinds this member declares, in file order (#2680). */
113
160
  records: RecordKindDeclaration[];
161
+ /** The member's box block, or null when it declares none (#2726). */
162
+ box: BoxDeclaration | null;
114
163
  upstream: string | null;
115
164
  because: string | null;
116
165
  suppress: Suppression[];
@@ -149,6 +198,8 @@ export interface Declaration {
149
198
  quorum: number | null;
150
199
  /** The workspace's own record kinds, from the top-level `records`, in file order (#2680). A member's are on the member. */
151
200
  records: RecordKindDeclaration[];
201
+ /** The hosts boxes run on, in file order (#2727). */
202
+ hosts: Host[];
152
203
  /** The file, relative to the workspace root's tree (`chant.workspace.json` or `.jsonc`). */
153
204
  file: string;
154
205
  }
@@ -1 +1 @@
1
- {"version":3,"file":"declaration.d.ts","sourceRoot":"","sources":["../../src/workspace/declaration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAOH,OAAO,EAAE,aAAa,EAAqB,MAAM,SAAS,CAAC;AAC3D,OAAO,EAA+B,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AAEzE,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,QAAQ,CAAC;AAEtD,eAAO,MAAM,qBAAqB,QAAa,CAAC;AAChD,eAAO,MAAM,iBAAiB,4DAA6D,CAAC;AAC5F,eAAO,MAAM,0BAA0B,IAAI,CAAC;AAE5C,gFAAgF;AAChF,eAAO,MAAM,cAAc,qCAAsC,CAAC;AAClE,eAAO,MAAM,YAAY,QAA8B,CAAC;AAIxD;;;GAGG;AACH,eAAO,MAAM,qBAAqB,uNAmBQ,CAAC;AAC3C,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAExE,MAAM,WAAW,aAAc,SAAQ,YAAY;IACjD,mEAAmE;IACnE,IAAI,EAAE,MAAM,CAAC;CACd;AAED,qBAAa,kBAAmB,SAAQ,KAAK;IAEzC,QAAQ,CAAC,IAAI,EAAE,kBAAkB;IAEjC,QAAQ,CAAC,QAAQ,CAAC,EAAE,aAAa;gBAFxB,IAAI,EAAE,kBAAkB,EACjC,OAAO,EAAE,MAAM,EACN,QAAQ,CAAC,EAAE,aAAa,YAAA;IAMnC,yDAAyD;IACzD,QAAQ,IAAI,MAAM;CAInB;AAID,4DAA4D;AAC5D,MAAM,WAAW,WAAW;IAC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