approval-md 0.1.0 → 0.2.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 (266) hide show
  1. package/README.md +584 -553
  2. package/SPEC.md +42 -13
  3. package/dist/src/adapters/agentmail.d.ts +426 -0
  4. package/dist/src/adapters/agentmail.js +2 -2
  5. package/dist/src/adapters/conformance.d.ts +149 -0
  6. package/dist/src/adapters/contract.d.ts +628 -0
  7. package/dist/src/adapters/contract.js +110 -16
  8. package/dist/src/adapters/contract.js.map +1 -1
  9. package/dist/src/adapters/email.d.ts +324 -0
  10. package/dist/src/adapters/env-passphrase.d.ts +93 -0
  11. package/dist/src/adapters/public.d.ts +11 -0
  12. package/dist/src/adapters/public.js +11 -0
  13. package/dist/src/adapters/public.js.map +1 -0
  14. package/dist/src/adapters/registry.d.ts +59 -0
  15. package/dist/src/adapters/registry.js +2 -1
  16. package/dist/src/adapters/registry.js.map +1 -1
  17. package/dist/src/adapters/smtp.d.ts +213 -0
  18. package/dist/src/adapters/vault-provider.d.ts +114 -0
  19. package/dist/src/adapters/vault-provider.js +3 -3
  20. package/dist/src/adapters/zzz.d.ts +66 -0
  21. package/dist/src/adapters/zzz.js +299 -0
  22. package/dist/src/adapters/zzz.js.map +1 -0
  23. package/dist/src/channels/batch.d.ts +109 -0
  24. package/dist/src/channels/cli.d.ts +193 -0
  25. package/dist/src/channels/conformance.d.ts +92 -0
  26. package/dist/src/channels/contract.d.ts +623 -0
  27. package/dist/src/channels/payload-view.d.ts +35 -0
  28. package/dist/src/channels/render-queue.d.ts +149 -0
  29. package/dist/src/channels/tagging.d.ts +196 -0
  30. package/dist/src/channels/telegram.d.ts +1832 -0
  31. package/dist/src/channels/web.d.ts +341 -0
  32. package/dist/src/cli/adapter.d.ts +90 -0
  33. package/dist/src/cli/adapter.js +25 -15
  34. package/dist/src/cli/adapter.js.map +1 -1
  35. package/dist/src/cli/amend.d.ts +59 -0
  36. package/dist/src/cli/args.d.ts +43 -0
  37. package/dist/src/cli/attest.d.ts +41 -0
  38. package/dist/src/cli/audit-card.d.ts +62 -0
  39. package/dist/src/cli/audit.d.ts +59 -0
  40. package/dist/src/cli/channel-telegram.d.ts +806 -0
  41. package/dist/src/cli/channel-web.d.ts +131 -0
  42. package/dist/src/cli/channel.d.ts +71 -0
  43. package/dist/src/cli/checkpoint-tap.d.ts +169 -0
  44. package/dist/src/cli/codex.d.ts +2 -0
  45. package/dist/src/cli/codex.js +172 -0
  46. package/dist/src/cli/codex.js.map +1 -0
  47. package/dist/src/cli/coverage.d.ts +61 -0
  48. package/dist/src/cli/daemon.d.ts +120 -0
  49. package/dist/src/cli/doctor.d.ts +129 -0
  50. package/dist/src/cli/doctor.js +119 -5
  51. package/dist/src/cli/doctor.js.map +1 -1
  52. package/dist/src/cli/env.d.ts +65 -0
  53. package/dist/src/cli/execute.d.ts +202 -0
  54. package/dist/src/cli/exit-codes.d.ts +73 -0
  55. package/dist/src/cli/feedback.d.ts +60 -0
  56. package/dist/src/cli/gate-window.d.ts +40 -0
  57. package/dist/src/cli/gate.d.ts +68 -0
  58. package/dist/src/cli/git-scope.d.ts +190 -0
  59. package/dist/src/cli/gloss-attach.d.ts +85 -0
  60. package/dist/src/cli/gloss-codex-child.d.ts +9 -0
  61. package/dist/src/cli/gloss-codex.d.ts +24 -0
  62. package/dist/src/cli/gloss-options.d.ts +42 -0
  63. package/dist/src/cli/gloss.d.ts +265 -0
  64. package/dist/src/cli/help.d.ts +103 -0
  65. package/dist/src/cli/help.js +173 -51
  66. package/dist/src/cli/help.js.map +1 -1
  67. package/dist/src/cli/hook-codex.d.ts +78 -0
  68. package/dist/src/cli/hook-codex.js +167 -0
  69. package/dist/src/cli/hook-codex.js.map +1 -0
  70. package/dist/src/cli/hook.d.ts +331 -0
  71. package/dist/src/cli/hook.js +186 -80
  72. package/dist/src/cli/hook.js.map +1 -1
  73. package/dist/src/cli/import.d.ts +35 -0
  74. package/dist/src/cli/init.d.ts +84 -0
  75. package/dist/src/cli/init.js +2 -2
  76. package/dist/src/cli/init.js.map +1 -1
  77. package/dist/src/cli/instructions.d.ts +23 -0
  78. package/dist/src/cli/journal.d.ts +41 -0
  79. package/dist/src/cli/log-advance.d.ts +287 -0
  80. package/dist/src/cli/log-advance.js +102 -11
  81. package/dist/src/cli/log-advance.js.map +1 -1
  82. package/dist/src/cli/log-anchor.d.ts +176 -0
  83. package/dist/src/cli/log-checkpoint.d.ts +22 -0
  84. package/dist/src/cli/log-sync.d.ts +243 -0
  85. package/dist/src/cli/log-verbs.d.ts +16 -0
  86. package/dist/src/cli/log-verbs.js +7 -1
  87. package/dist/src/cli/log-verbs.js.map +1 -1
  88. package/dist/src/cli/long-help.d.ts +70 -0
  89. package/dist/src/cli/main.d.ts +77 -0
  90. package/dist/src/cli/main.js +155 -5
  91. package/dist/src/cli/main.js.map +1 -1
  92. package/dist/src/cli/mcp.d.ts +52 -0
  93. package/dist/src/cli/paths.d.ts +56 -0
  94. package/dist/src/cli/payload.d.ts +58 -0
  95. package/dist/src/cli/policy.d.ts +43 -0
  96. package/dist/src/cli/preflight.d.ts +363 -0
  97. package/dist/src/cli/preflight.js +294 -7
  98. package/dist/src/cli/preflight.js.map +1 -1
  99. package/dist/src/cli/progress.d.ts +78 -0
  100. package/dist/src/cli/prompt.d.ts +209 -0
  101. package/dist/src/cli/quickstart.d.ts +46 -0
  102. package/dist/src/cli/quickstart.js +297 -0
  103. package/dist/src/cli/quickstart.js.map +1 -0
  104. package/dist/src/cli/records.d.ts +34 -0
  105. package/dist/src/cli/render.d.ts +22 -0
  106. package/dist/src/cli/sandbox.d.ts +51 -0
  107. package/dist/src/cli/scaffold.d.ts +79 -0
  108. package/dist/src/cli/setup-adapter.d.ts +137 -0
  109. package/dist/src/cli/setup-adapter.js +38 -4
  110. package/dist/src/cli/setup-adapter.js.map +1 -1
  111. package/dist/src/cli/setup-channel.d.ts +117 -0
  112. package/dist/src/cli/setup-checkpoint.d.ts +57 -0
  113. package/dist/src/cli/setup-common.d.ts +275 -0
  114. package/dist/src/cli/setup-flow.d.ts +287 -0
  115. package/dist/src/cli/setup-service.d.ts +96 -0
  116. package/dist/src/cli/setup.d.ts +202 -0
  117. package/dist/src/cli/style.d.ts +320 -0
  118. package/dist/src/cli/token.d.ts +39 -0
  119. package/dist/src/cli/up.d.ts +155 -0
  120. package/dist/src/cli/up.js +4 -2
  121. package/dist/src/cli/up.js.map +1 -1
  122. package/dist/src/cli/usage.d.ts +37 -0
  123. package/dist/src/cli/values.d.ts +40 -0
  124. package/dist/src/cli/vault.d.ts +59 -0
  125. package/dist/src/cli/vault.js +2 -2
  126. package/dist/src/cli/vault.js.map +1 -1
  127. package/dist/src/cli/verb-registry.d.ts +76 -0
  128. package/dist/src/cli/verb-registry.js +176 -8
  129. package/dist/src/cli/verb-registry.js.map +1 -1
  130. package/dist/src/cli/wordmark.d.ts +31 -0
  131. package/dist/src/cli/wordmark.js +2 -2
  132. package/dist/src/codex/doctor.d.ts +13 -0
  133. package/dist/src/codex/doctor.js +41 -0
  134. package/dist/src/codex/doctor.js.map +1 -0
  135. package/dist/src/codex/manifest.d.ts +49 -0
  136. package/dist/src/codex/manifest.js +103 -0
  137. package/dist/src/codex/manifest.js.map +1 -0
  138. package/dist/src/codex/templates.d.ts +41 -0
  139. package/dist/src/codex/templates.js +319 -0
  140. package/dist/src/codex/templates.js.map +1 -0
  141. package/dist/src/codex/trust.d.ts +19 -0
  142. package/dist/src/codex/trust.js +183 -0
  143. package/dist/src/codex/trust.js.map +1 -0
  144. package/dist/src/codex/workspace-plan.d.ts +131 -0
  145. package/dist/src/codex/workspace-plan.js +561 -0
  146. package/dist/src/codex/workspace-plan.js.map +1 -0
  147. package/dist/src/core/actor.d.ts +2 -0
  148. package/dist/src/core/actor.js +5 -0
  149. package/dist/src/core/actor.js.map +1 -0
  150. package/dist/src/core/advance-cycle.d.ts +170 -0
  151. package/dist/src/core/agents-md.d.ts +276 -0
  152. package/dist/src/core/apply-patch.d.ts +49 -0
  153. package/dist/src/core/apply-patch.js +266 -0
  154. package/dist/src/core/apply-patch.js.map +1 -0
  155. package/dist/src/core/attest.d.ts +420 -0
  156. package/dist/src/core/attest.js +13 -1
  157. package/dist/src/core/attest.js.map +1 -1
  158. package/dist/src/core/audit.d.ts +492 -0
  159. package/dist/src/core/budgets.d.ts +238 -0
  160. package/dist/src/core/checkpoint.d.ts +500 -0
  161. package/dist/src/core/child-env.d.ts +88 -0
  162. package/dist/src/core/clock.d.ts +52 -0
  163. package/dist/src/core/command-class.d.ts +543 -0
  164. package/dist/src/core/command-class.js +43 -8
  165. package/dist/src/core/command-class.js.map +1 -1
  166. package/dist/src/core/coverage-sources/adapter.d.ts +40 -0
  167. package/dist/src/core/coverage-sources/gh.d.ts +48 -0
  168. package/dist/src/core/coverage-sources/git.d.ts +101 -0
  169. package/dist/src/core/coverage.d.ts +217 -0
  170. package/dist/src/core/credential-spec.d.ts +72 -0
  171. package/dist/src/core/dark-session.d.ts +331 -0
  172. package/dist/src/core/decision-refusal.d.ts +185 -0
  173. package/dist/src/core/env-file.d.ts +450 -0
  174. package/dist/src/core/execute.d.ts +858 -0
  175. package/dist/src/core/execute.js +44 -6
  176. package/dist/src/core/execute.js.map +1 -1
  177. package/dist/src/core/frontmatter.d.ts +78 -0
  178. package/dist/src/core/gate-window.d.ts +312 -0
  179. package/dist/src/core/gate.d.ts +1364 -0
  180. package/dist/src/core/gate.js +68 -13
  181. package/dist/src/core/gate.js.map +1 -1
  182. package/dist/src/core/git-run.d.ts +73 -0
  183. package/dist/src/core/harness-version.d.ts +157 -0
  184. package/dist/src/core/harness-version.js +2 -1
  185. package/dist/src/core/harness-version.js.map +1 -1
  186. package/dist/src/core/harness-wait.d.ts +55 -0
  187. package/dist/src/core/head-retry.d.ts +107 -0
  188. package/dist/src/core/instance.d.ts +253 -0
  189. package/dist/src/core/intake-limits.d.ts +247 -0
  190. package/dist/src/core/jcs.d.ts +52 -0
  191. package/dist/src/core/journal.d.ts +144 -0
  192. package/dist/src/core/live-draw.d.ts +436 -0
  193. package/dist/src/core/log-reconcile.d.ts +89 -0
  194. package/dist/src/core/log-subscribe.d.ts +36 -0
  195. package/dist/src/core/log-subscribe.js +162 -0
  196. package/dist/src/core/log-subscribe.js.map +1 -0
  197. package/dist/src/core/log.d.ts +278 -0
  198. package/dist/src/core/loop.d.ts +274 -0
  199. package/dist/src/core/loop.js +11 -0
  200. package/dist/src/core/loop.js.map +1 -1
  201. package/dist/src/core/md-fence.d.ts +41 -0
  202. package/dist/src/core/money.d.ts +147 -0
  203. package/dist/src/core/payload-census.d.ts +74 -0
  204. package/dist/src/core/payload-store.d.ts +175 -0
  205. package/dist/src/core/payload.d.ts +71 -0
  206. package/dist/src/core/policy-diff.d.ts +292 -0
  207. package/dist/src/core/policy-diff.js +27 -4
  208. package/dist/src/core/policy-diff.js.map +1 -1
  209. package/dist/src/core/policy-expectations.d.ts +199 -0
  210. package/dist/src/core/policy-explain.d.ts +150 -0
  211. package/dist/src/core/policy-explain.js +31 -3
  212. package/dist/src/core/policy-explain.js.map +1 -1
  213. package/dist/src/core/policy-load.d.ts +527 -0
  214. package/dist/src/core/policy-load.js +15 -3
  215. package/dist/src/core/policy-load.js.map +1 -1
  216. package/dist/src/core/policy-match.d.ts +281 -0
  217. package/dist/src/core/policy-match.js +20 -9
  218. package/dist/src/core/policy-match.js.map +1 -1
  219. package/dist/src/core/policy-proposal.d.ts +265 -0
  220. package/dist/src/core/prompt-layout.d.ts +221 -0
  221. package/dist/src/core/protected-path-guard.d.ts +453 -0
  222. package/dist/src/core/protected-path-guard.js +514 -35
  223. package/dist/src/core/protected-path-guard.js.map +1 -1
  224. package/dist/src/core/registration.d.ts +25 -0
  225. package/dist/src/core/reindex.d.ts +99 -0
  226. package/dist/src/core/sampler.d.ts +313 -0
  227. package/dist/src/core/sandbox.d.ts +290 -0
  228. package/dist/src/core/seal.d.ts +165 -0
  229. package/dist/src/core/state.d.ts +505 -0
  230. package/dist/src/core/task-file.d.ts +185 -0
  231. package/dist/src/core/telegram-config.d.ts +93 -0
  232. package/dist/src/core/token.d.ts +409 -0
  233. package/dist/src/core/token.js +21 -38
  234. package/dist/src/core/token.js.map +1 -1
  235. package/dist/src/core/validate.d.ts +138 -0
  236. package/dist/src/core/values.d.ts +137 -0
  237. package/dist/src/core/vault.d.ts +291 -0
  238. package/dist/src/core/verified-snapshot.d.ts +204 -0
  239. package/dist/src/core/verify.d.ts +336 -0
  240. package/dist/src/core/version.d.ts +8 -0
  241. package/dist/src/core/wysiwys.d.ts +370 -0
  242. package/dist/src/daemon/advance-child.d.ts +39 -0
  243. package/dist/src/daemon/advance.d.ts +466 -0
  244. package/dist/src/daemon/audit.d.ts +87 -0
  245. package/dist/src/daemon/daemon.d.ts +1180 -0
  246. package/dist/src/daemon/dark-session.d.ts +64 -0
  247. package/dist/src/daemon/draw-child.d.ts +36 -0
  248. package/dist/src/daemon/draw.d.ts +154 -0
  249. package/dist/src/daemon/git-evidence.d.ts +173 -0
  250. package/dist/src/daemon/git-evidence.js +1 -1
  251. package/dist/src/daemon/projection.d.ts +180 -0
  252. package/dist/src/daemon/prune.d.ts +207 -0
  253. package/dist/src/mcp/http.d.ts +113 -0
  254. package/dist/src/mcp/server.d.ts +265 -0
  255. package/dist/src/mcp/server.js +9 -1
  256. package/dist/src/mcp/server.js.map +1 -1
  257. package/docs/adapter-api.md +106 -0
  258. package/docs/cli-reference.md +389 -36
  259. package/docs/codex-enforced-session.md +30 -0
  260. package/package.json +12 -2
  261. package/schema/codex-instance.schema.json +82 -0
  262. package/schema/event.schema.json +2 -1
  263. package/schema/fixtures/codex-instance/invalid/unpinned-codex-version.json +40 -0
  264. package/schema/fixtures/codex-instance/valid/canonical.json +40 -0
  265. package/schema/policy.schema.json +21 -1
  266. package/templates/codex/README.md +9 -0
@@ -0,0 +1,527 @@
1
+ /**
2
+ * Policy loading: find `APPROVAL.md`, extract its single
3
+ * ` ```yaml approval-policy ` fenced block, parse it, validate it, and resolve
4
+ * its duration strings to milliseconds.
5
+ *
6
+ * SPEC.md §5: the policy file is "prose for humans plus exactly one fenced
7
+ * block for machines". Implementations MUST parse the fenced block, MUST
8
+ * ignore surrounding prose, and MUST accept `APPROVALS.md` as a fallback
9
+ * filename with `APPROVAL.md` winning when both exist.
10
+ *
11
+ * ## Fail-closed contract (SPEC.md §5.2)
12
+ *
13
+ * Every failure mode of this module returns `{ ok: false, code, message }` —
14
+ * nothing throws, and nothing returns a partially-understood policy. A not-ok
15
+ * result places a hard obligation on the consumer (the APRV-11 class matcher
16
+ * and everything downstream of it): **treat every class as `manual`.** There
17
+ * is no "load what we could" path, because a policy the runtime only half
18
+ * understood is a policy whose author believes constraints are in force that
19
+ * are not. A missing file is not permission to run unattended; it is the
20
+ * absence of any grant, which is `manual` for everything.
21
+ *
22
+ * ## YAML version stance
23
+ *
24
+ * The `yaml` package parses **YAML 1.2** by default and this module keeps that
25
+ * default, additionally pinning `schema: "core"` — the YAML 1.2 core schema.
26
+ * Consequences that matter for a policy file:
27
+ *
28
+ * - YAML 1.1-isms are **not** honored. `yes`, `no`, `on`, `off`, `y`, `n` parse
29
+ * as the plain strings `"yes"`, `"no"`, … and **not** as booleans; sexagesimal
30
+ * (`1:30`) is a string, not a number. This is deliberate. A policy file is a
31
+ * permission document: the difference between the string `"no"` and the
32
+ * boolean `false` must never depend on which YAML dialect an implementation
33
+ * happens to ship. Under YAML 1.2 core, only `true`/`false` are booleans, so
34
+ * a policy that writes `autonomy: no` yields the string `"no"`, fails the
35
+ * closed `autonomy` enum in `policy.schema.json`, and the whole policy fails
36
+ * closed to all-`manual` — a loud rejection instead of a silent coercion.
37
+ * - No custom or implicit-typed tags are accepted. Any node carrying an
38
+ * explicit tag (`!!timestamp`, `!!binary`, `!Anything`) is rejected as
39
+ * `yaml-error`, so a policy value can only ever be a string, number, boolean,
40
+ * null, map, or sequence. Tag-driven type coercion (and any tag-driven
41
+ * construction in a future `yaml` release) can therefore never reach the
42
+ * schema validator.
43
+ * - Anchors and aliases are permitted but bounded: {@link MAX_ALIAS_COUNT}
44
+ * caps alias expansion so a billion-laughs document fails closed as
45
+ * `yaml-error` instead of exhausting memory.
46
+ * - Duplicate mapping keys are parse errors (the `yaml` default), not
47
+ * last-one-wins.
48
+ *
49
+ * Any parser error **or warning** fails the load closed. Warnings in `yaml`
50
+ * flag constructs the parser recovered from (unsupported directives, deprecated
51
+ * syntax); "recovered from" is exactly the silent reinterpretation a policy
52
+ * file must not tolerate.
53
+ *
54
+ * ## Determinism
55
+ *
56
+ * `loadPolicy` is a pure function of the file bytes on disk plus the schema
57
+ * directory. No clock, no network, no randomness, no cross-call caching.
58
+ */
59
+ import { type ProtectedPathEntry } from "./command-class.js";
60
+ import { type ValidationError } from "./validate.js";
61
+ /**
62
+ * Upper bound on alias expansions in one policy document.
63
+ *
64
+ * Anchors are legitimate in a hand-written policy (sharing an approver list
65
+ * across a few class rules), so aliases are not banned outright — but alias
66
+ * expansion is exponential in the number of nesting levels, which is the
67
+ * "billion laughs" resource-exhaustion attack. 32 is far above what any
68
+ * plausible hand-written APPROVAL.md needs and far below anything that costs
69
+ * measurable memory. Exceeding it is a hard `yaml-error`.
70
+ */
71
+ export declare const MAX_ALIAS_COUNT = 32;
72
+ /** Info string that marks the machine-readable policy block (SPEC.md §5). */
73
+ export declare const POLICY_INFO_STRING = "yaml approval-policy";
74
+ /** Policy filenames, in precedence order (SPEC.md §5). */
75
+ export declare const POLICY_FILENAMES: readonly ["APPROVAL.md", "APPROVALS.md"];
76
+ /**
77
+ * SPEC.md §5.2 autonomy levels, strictest first — the RESOLVED vocabulary.
78
+ *
79
+ * Deliberately unchanged by APRV-127. The autonomy split is a split of
80
+ * *supervision*, not of autonomy: both supervised modes execute under
81
+ * supervision, both are metered by the same budgets, and both are eligible for
82
+ * the same retrospective review. Every consumer that asks "is this action
83
+ * supervised?" keeps asking one question and getting one answer, and the mode
84
+ * travels beside it as {@link SupervisionMode}. Widening this union instead
85
+ * would have put a third case into every `switch` in the runtime, and a
86
+ * `switch` that forgot it would have failed open.
87
+ *
88
+ * WIDENED by APRV-183's successor, APRV-185, and widened for the opposite
89
+ * reason. `human-only` is not a supervision mode and cannot travel beside
90
+ * anything: it says the action is reserved to human hands and is performed
91
+ * outside agent execution entirely, so there is no gate path, no token, and no
92
+ * record for an agent to produce. A member of this union is exactly what that
93
+ * needs to be, because the failure mode the note above worries about runs the
94
+ * other way here: a `switch` that forgets `human-only` reaches no allow, since
95
+ * every enforcement path in this runtime opens by refusing it and the remaining
96
+ * branches are all keyed to `manual`, `supervised` or `autonomous` by equality.
97
+ */
98
+ export type Autonomy = "human-only" | "manual" | "supervised" | "autonomous";
99
+ /**
100
+ * Amended SPEC.md §5.2 (APRV-127): how far a supervised class is supervised.
101
+ *
102
+ * - `live`: a declared fraction of the class's actions BLOCK on the human gate
103
+ * before executing, exactly as `manual` does. The rest proceed.
104
+ * - `retro`: the pre-split behaviour. Every action proceeds immediately and a
105
+ * fraction is drawn afterwards into a human's review backlog.
106
+ */
107
+ export type SupervisionMode = "live" | "retro";
108
+ /** What a class rule may WRITE. See {@link Autonomy} for what it resolves to. */
109
+ export type DeclaredAutonomy = Autonomy | "supervised-live" | "supervised-retro";
110
+ /**
111
+ * What `defaults.autonomy` may write: {@link DeclaredAutonomy} less
112
+ * `supervised-live`, which is meaningless without a `live_rate` and has nowhere
113
+ * on `defaults` to declare one. Enforced by `policy.schema.json`.
114
+ *
115
+ * `human-only` IS admitted here (APRV-185), and the asymmetry with
116
+ * `supervised-live` is the whole of the reason: `supervised-live` is excluded
117
+ * because it carries a required rate `defaults` cannot hold, and `human-only`
118
+ * carries nothing at all. An author who writes it as the default is declaring
119
+ * maximal strictness for everything the policy did not name, which is a
120
+ * statement a policy is entitled to make.
121
+ *
122
+ * What it is NOT is the fail-closed target. A policy that cannot be parsed
123
+ * still resolves every class to `manual` (see `policy-match.ts`), because a
124
+ * broken policy must stay recoverable through its own gate: an unparseable file
125
+ * whose classes all became `human-only` would leave no gated path to the fix,
126
+ * and the repair for a typo would sit behind a level that admits no repair.
127
+ */
128
+ export type DefaultAutonomy = Exclude<DeclaredAutonomy, "supervised-live">;
129
+ /**
130
+ * Amended SPEC.md §10.4 (APRV-105): how the raw execution token travels from the
131
+ * mint site to the spend site.
132
+ *
133
+ * - `manual` — printed once on the granting surface and carried by a human.
134
+ * THE DEFAULT, and what an absent key means.
135
+ * - `sealed` — additionally sealed to the requester's ephemeral public key and
136
+ * recorded as ciphertext, so `approval wait` can return it to the process
137
+ * that asked, across machines.
138
+ */
139
+ export type TokenDelivery = "manual" | "sealed";
140
+ /** The delivery mode in force. Fail-closed: anything unusable is `manual`. */
141
+ export declare function tokenDeliveryOf(load: PolicyLoadResult): TokenDelivery;
142
+ /** A class rule (SPEC.md §5.1); shape mirrors `policy.schema.json`. */
143
+ export interface PolicyClassRule {
144
+ autonomy: DeclaredAutonomy;
145
+ /**
146
+ * Amended SPEC.md §5.2/§7 (APRV-317): explicit operator permission for a
147
+ * truthful irreversible action to retain this rule's nonmanual autonomy.
148
+ * Absent and false preserve the manual floor. The schema permits true only
149
+ * on autonomous and supervised rules; defaults have no corresponding key.
150
+ */
151
+ allow_irreversible?: boolean;
152
+ /**
153
+ * Amended SPEC.md §5.2 (APRV-127): the fraction of `supervised-live` actions
154
+ * that block on the human gate, in (0, 1]. Required by the schema for
155
+ * `supervised-live` and forbidden for every other level, `human-only`
156
+ * included (APRV-185): a level whose actions no agent may take has no
157
+ * fraction of them to gate.
158
+ */
159
+ live_rate?: number;
160
+ /**
161
+ * Amended SPEC.md §5.2 (APRV-183): the fraction of this class's executed
162
+ * actions drawn into the retrospective review backlog, in (0, 1]. Optional on
163
+ * every supervised level (`supervised`, `supervised-retro`, `supervised-live`)
164
+ * and a schema violation on `manual`, `autonomous` and `human-only`, none of
165
+ * which has a retrospective pool. Absent means the class is sampled at
166
+ * `audit.supervised_sample_rate`.
167
+ */
168
+ retro_rate?: number;
169
+ approvers?: string[];
170
+ limits?: Record<string, number>;
171
+ }
172
+ /**
173
+ * A load-time observation about a policy that PARSED and VALIDATED.
174
+ *
175
+ * Not an error, and never a refusal: a policy carrying notes is fully in force.
176
+ * The notes exist because APRV-127 gave an existing spelling a new name, and a
177
+ * reinterpretation nobody is told about is the failure mode this project exists
178
+ * to prevent. `approval policy check` and `doctor` print them; nothing branches
179
+ * on them.
180
+ */
181
+ export interface PolicyNote {
182
+ /** Machine-readable and closed, so a reader can branch without regex. */
183
+ code: "supervised-alias";
184
+ /** Where the note applies: a class pattern, or `defaults.autonomy`. */
185
+ where: string;
186
+ message: string;
187
+ }
188
+ /** Parsed policy document. Structurally guaranteed by `policy.schema.json`. */
189
+ export interface Policy {
190
+ version: string;
191
+ defaults?: {
192
+ autonomy?: DefaultAutonomy;
193
+ channel?: string;
194
+ approval_ttl?: string;
195
+ /**
196
+ * Amended SPEC.md §10.4 (APRV-105): how the raw execution token reaches the
197
+ * process that will spend it. Absent means `manual`, and under `manual`
198
+ * nothing about the pre-APRV-105 behaviour changes byte for byte.
199
+ */
200
+ token_delivery?: TokenDelivery;
201
+ on_expiry?: "reject";
202
+ };
203
+ /**
204
+ * Amended SPEC.md §5.2 (APRV-38): duration after which a payload whose action
205
+ * reached a terminal state MAY be pruned from `.approval/payloads/`. Absent
206
+ * means retain indefinitely. Read by the M5 daemon; nothing else prunes.
207
+ */
208
+ payload_retention?: string;
209
+ /**
210
+ * Amended SPEC.md §5.2 (APRV-107): repo-relative paths whose edit is
211
+ * `policy.edit` in addition to the runtime's built-in set. Exact file paths
212
+ * (`SPEC.md`) and directory prefixes ending in `/` (`design/`); no globs, no
213
+ * negation. Purely ADDITIVE: the built-ins stay protected whatever this
214
+ * list says, so a policy can widen the protected surface and never narrow
215
+ * it.
216
+ *
217
+ * Amended again (APRV-266): an entry may instead be `{path, class}`, routing
218
+ * that path family to a named `policy.edit` sub-class so each family carries
219
+ * its own autonomy and its own live rate. A bare string keeps its APRV-107
220
+ * meaning exactly. What a routing may not do is weaken a BUILT-IN protected
221
+ * path: {@link checkProtectedRouteFloor} runs at load and makes such a policy
222
+ * inoperative.
223
+ */
224
+ protected_paths?: ProtectedPathEntry[];
225
+ approvers?: Record<string, {
226
+ channels: string[];
227
+ }>;
228
+ classes?: Record<string, PolicyClassRule>;
229
+ /**
230
+ * Named budget scopes (SPEC.md §5.1/§5.2). `max_pending` has been in
231
+ * `policy.schema.json` since v0.1 and was missing from this type until
232
+ * APRV-173, which is what a key nobody read looks like from the inside: the
233
+ * schema accepted it, the loader carried it, and no reader could see it.
234
+ * `core/intake-limits.ts` evaluates it at intake; `core/budgets.ts` skips it.
235
+ */
236
+ budgets?: Record<string, {
237
+ daily_usd?: number;
238
+ daily_actions?: number;
239
+ max_pending?: number;
240
+ }>;
241
+ audit?: {
242
+ supervised_sample_rate?: number;
243
+ /**
244
+ * Amended SPEC.md §5.2 (APRV-38): NAME of the environment variable holding
245
+ * the operator's HMAC sampling secret. The name is what a policy carries;
246
+ * the secret lives outside the repository and outside any agent-readable
247
+ * path, because an agent that can read it can predict the sample.
248
+ */
249
+ sampling_secret_env?: string;
250
+ /**
251
+ * Amended SPEC.md §8 (APRV-58): how far a gate-typed `ts` may step backwards
252
+ * from its gate-typed predecessor before `core/verify.ts` reports a
253
+ * `gate-ts-regression`. Absent means the reference runtime's 2 seconds.
254
+ * Report-only in every direction: it decides what a human is shown about a
255
+ * log that already verified, and no verdict reads it.
256
+ */
257
+ skew_tolerance?: string;
258
+ /**
259
+ * Amended SPEC.md §9 (APRV-220): the PUBLIC halves of the keys permitted to
260
+ * sign a `log.checkpoint`, base64 DER SPKI. The one key-shaped field in
261
+ * this file holding material rather than the NAME of a variable, because a
262
+ * public key is not a secret and the value of writing it here is that this
263
+ * file is committed and attested.
264
+ */
265
+ checkpoint_keys?: string[];
266
+ /**
267
+ * Amended SPEC.md §9 (APRV-220): how long a log may go without a signed
268
+ * checkpoint before verification says one is due. Report-only in every
269
+ * direction; there is no path from due to refused.
270
+ */
271
+ checkpoint_every?: string;
272
+ };
273
+ /**
274
+ * Amended SPEC.md §5.2 (APRV-217): how the long-lived readers of this log
275
+ * prove a cached prefix. Latency only, and its strictest value is the
276
+ * default, so an absent block is the behaviour that existed before it.
277
+ */
278
+ daemon?: {
279
+ read_proof?: "full" | "incremental";
280
+ full_reproof_every?: number;
281
+ full_reproof_after?: string;
282
+ };
283
+ channels?: Record<string, Record<string, unknown>>;
284
+ /**
285
+ * Amended SPEC.md §5.2 (APRV-68): the credential vault's configuration. One
286
+ * key, and it is a NAME: `passphrase_env` holds the name of the environment
287
+ * variable the operator keeps the vault passphrase in, exactly as
288
+ * `channels.telegram.token_env` and `audit.sampling_secret_env` do. A policy
289
+ * that carried the passphrase itself would be a passphrase in a file agents
290
+ * may read, which is the thing the vault exists to prevent.
291
+ */
292
+ vault?: {
293
+ passphrase_env?: string;
294
+ };
295
+ }
296
+ /**
297
+ * Duration-valued policy fields pre-resolved to milliseconds, so callers never
298
+ * re-parse a duration string (and so no two call sites can disagree about what
299
+ * `24h` means). `null` means the field was absent from the policy.
300
+ */
301
+ export interface PolicyDurations {
302
+ /** `defaults.approval_ttl` in milliseconds, or `null` when unset. */
303
+ approvalTtlMs: number | null;
304
+ /**
305
+ * `audit.skew_tolerance` in milliseconds, or `null` when unset (APRV-58).
306
+ * `null` means the verifier's own default, never "no tolerance": a zero
307
+ * allowance would report every healthy fleet's ordinary clock disagreement.
308
+ */
309
+ skewToleranceMs: number | null;
310
+ /**
311
+ * `audit.checkpoint_every` in milliseconds, or `null` when unset (APRV-220).
312
+ * `null` means the cadence is off: nothing is ever reported as due, which is
313
+ * the behaviour of every policy written before the key existed.
314
+ */
315
+ checkpointEveryMs: number | null;
316
+ }
317
+ /**
318
+ * The `daemon` block resolved, with the reference runtime's defaults applied
319
+ * (APRV-217), so no reader re-derives them and no two readers disagree.
320
+ *
321
+ * Every default is the strict end: `full` proves the whole prefix on every
322
+ * read, which is what the runtime did before this block existed. The counts are
323
+ * meaningful only under `incremental`.
324
+ */
325
+ export interface PolicyDaemonRead {
326
+ readProof: "full" | "incremental";
327
+ /** Reads one full re-proof may cover, the anchoring read included. */
328
+ fullReproofEvery: number;
329
+ /** Wall-clock milliseconds one full re-proof may cover. */
330
+ fullReproofAfterMs: number;
331
+ /**
332
+ * Whether the policy declared a `daemon` block at all. Display only — the
333
+ * three fields above are complete either way — and read by `approval doctor`,
334
+ * which skips its row rather than reporting a mode nobody wrote.
335
+ */
336
+ declared: boolean;
337
+ }
338
+ /** The defaults a policy that declares no `daemon` block is read under. */
339
+ export declare const DEFAULT_POLICY_DAEMON_READ: PolicyDaemonRead;
340
+ /** Where the loaded policy came from. */
341
+ export interface PolicySource {
342
+ /** Absolute or caller-relative path actually read. */
343
+ path: string;
344
+ /** Basename of that path, e.g. `APPROVAL.md`. */
345
+ filename: string;
346
+ }
347
+ /** Discrete fail-closed reasons. Every one means "treat all classes manual". */
348
+ export type PolicyLoadErrorCode = "file-missing" | "no-block" | "multiple-blocks" | "yaml-error" | "schema-invalid"
349
+ /**
350
+ * Amended SPEC.md §5.2 (APRV-266): a `protected_paths` routing that a
351
+ * built-in protected path may not take. Distinct from `schema-invalid`
352
+ * because the file IS valid against the schema and the fault is a
353
+ * relationship between two of its parts — the route and the `policy.edit`
354
+ * line — which no JSON Schema can state. See
355
+ * {@link checkProtectedRouteFloor}.
356
+ */
357
+ | "protected-route-floor";
358
+ /**
359
+ * Result of {@link loadPolicy}.
360
+ *
361
+ * Fail-closed contract: when `ok` is `false` the consumer MUST NOT fall back to
362
+ * any permissive default. Per SPEC.md §5.2 an unparseable, unfindable, or
363
+ * schema-invalid policy means **every class is `manual`** — the `code` is for
364
+ * diagnostics and operator messaging only, never for choosing a softer path.
365
+ */
366
+ export type PolicyLoadResult = {
367
+ ok: true;
368
+ policy: Policy;
369
+ source: PolicySource;
370
+ durations: PolicyDurations;
371
+ /**
372
+ * The `daemon` block resolved (APRV-217), defaults applied. Present for
373
+ * every loaded policy, declared or not, for the reason `durations` is:
374
+ * one parse of the grammar, one number every reader shares.
375
+ */
376
+ daemon: PolicyDaemonRead;
377
+ /**
378
+ * Amended SPEC.md §5.2 (APRV-127): observations about a policy that is in
379
+ * force. Empty for almost every policy. Never a reason to fail closed.
380
+ */
381
+ notes: PolicyNote[];
382
+ } | {
383
+ ok: false;
384
+ code: PolicyLoadErrorCode;
385
+ message: string;
386
+ errors?: ValidationError[];
387
+ /**
388
+ * The parsed-but-rejected YAML value, when the failure happened AFTER a
389
+ * successful parse (APRV-111). It exists for one consumer and one purpose:
390
+ * `core/policy-diff.ts` renders the policy's key vocabulary, and the edit
391
+ * most in need of rendering is the one that made the policy invalid — an
392
+ * unknown top-level key, which this schema rejects outright. Without the
393
+ * rejected value that edit is invisible to every reader, and a differ that
394
+ * cannot see it would report "no semantic change" over bytes that took the
395
+ * whole policy fail-closed.
396
+ *
397
+ * Absent for `file-missing`, `no-block`, `multiple-blocks` and
398
+ * `yaml-error`: there is no value to carry. NOTHING may enforce against
399
+ * it — a failed load is all-manual, full stop, and this field is for
400
+ * DISPLAY only.
401
+ */
402
+ raw?: unknown;
403
+ };
404
+ /** Options accepted by {@link loadPolicy}. */
405
+ export interface LoadPolicyOptions {
406
+ /** Directory to search for `APPROVAL.md` / `APPROVALS.md`. Default: cwd. */
407
+ dir?: string;
408
+ /** Explicit policy file path. Overrides discovery entirely. */
409
+ file?: string;
410
+ /** Schema directory passed through to {@link validate}. Injectable for tests. */
411
+ schemaDir?: string;
412
+ }
413
+ /**
414
+ * Parse a SPEC.md §5.2 duration string to milliseconds.
415
+ *
416
+ * Accepts exactly `<positive integer><unit>` with unit in `ms|s|m|h|d|w`
417
+ * (`w` = 7 days). Returns `null` for **any** deviation: zero, leading zeros,
418
+ * negatives, fractions, compound forms (`1h30m`), surrounding whitespace,
419
+ * empty input, unknown units. Deterministic and total — never throws.
420
+ */
421
+ export declare function parseDuration(text: string): number | null;
422
+ /** How a hardened parse should name itself in its failure messages. */
423
+ export interface HardenedYamlLabels {
424
+ /** Subject of the message, e.g. `"policy YAML"` or `"frontmatter YAML"`. */
425
+ subject: string;
426
+ /** Where a tag was found, e.g. `"a policy block"` / `"a task envelope"`. */
427
+ tagContext: string;
428
+ }
429
+ /** Outcome of {@link parseHardenedYaml}: a value, or one fail-closed message. */
430
+ export type HardenedYamlResult = {
431
+ ok: true;
432
+ value: unknown;
433
+ } | {
434
+ ok: false;
435
+ message: string;
436
+ };
437
+ /**
438
+ * Parse YAML under the hardened settings described in the module header:
439
+ * YAML 1.2 core schema, warnings fatal, duplicate keys fatal, explicitly tagged
440
+ * nodes rejected, alias expansion bounded by {@link MAX_ALIAS_COUNT}.
441
+ *
442
+ * **This is the one implementation.** `core/frontmatter.ts` parses the *other*
443
+ * half of the same permission surface — the task envelope declares the class,
444
+ * cost, and reversibility that policy is matched against — and used to carry a
445
+ * replica of these settings. APRV-20 (finding S5) deleted the replica: a task
446
+ * envelope and a policy block are now hardened by the same code, so the two
447
+ * cannot drift apart, and a hardening fix lands in both at once.
448
+ *
449
+ * Never throws; every failure is a message. Pure function of the source text.
450
+ */
451
+ export declare function parseHardenedYaml(source: string, labels: HardenedYamlLabels): HardenedYamlResult;
452
+ /**
453
+ * The fail-closed result for policy bytes that could not be read at all.
454
+ *
455
+ * Exported for callers that read the file themselves and still need a
456
+ * {@link PolicyLoadResult} to hand `resolve` (APRV-142): a caller must never
457
+ * have to invent one, because an invented result is where a permissive default
458
+ * would creep in. `file-missing` is the same code {@link loadPolicy} reports
459
+ * for the same fact.
460
+ */
461
+ export declare function policyUnreadable(path: string, cause: string): PolicyLoadResult;
462
+ /**
463
+ * Extract, parse, and validate the policy block of an already-read policy file.
464
+ *
465
+ * The bytes-in form of {@link loadPolicy}, split out for APRV-142: a gate
466
+ * operation reads `APPROVAL.md` **once** and feeds the same buffer to both the
467
+ * attestation hash check and this parse, so no mid-operation file swap can
468
+ * attest one policy and enforce another. `path` is used for messages and for
469
+ * {@link PolicySource}; nothing here touches the filesystem.
470
+ *
471
+ * Fails closed on every error path and never throws, exactly as
472
+ * {@link loadPolicy} does — it is the same code.
473
+ */
474
+ export declare function loadPolicyText(path: string, text: string, options?: {
475
+ schemaDir?: string;
476
+ }): PolicyLoadResult;
477
+ /**
478
+ * The routing floor (amended SPEC.md §5.2, APRV-266): a `protected_paths`
479
+ * routing may make a BUILT-IN protected path stricter and never weaker.
480
+ *
481
+ * `protected_paths` has been additive-only since APRV-107 for a reason that
482
+ * routing does not repeal: a policy that could shrink its own protected surface
483
+ * is a policy an agent can edit its way out of. Routing is a new way to try —
484
+ * `{path: CLAUDE.md, class: policy.edit.docs}` with `policy.edit.docs:
485
+ * autonomous` would take the agent instruction files out of the gate without
486
+ * removing a single path from any list, and every surface downstream would
487
+ * report the policy as widened.
488
+ *
489
+ * So: for each entry that routes a path the runtime protects on its own, the
490
+ * sub-class must resolve at least as strictly as the `policy.edit` line does.
491
+ * Strictness is `policy-match.ts`'s own table, so the floor and the resolver
492
+ * cannot come to different conclusions about which of two levels is stricter,
493
+ * and a tie on the level compares the live RATE: `supervised-live 0.01` under a
494
+ * `policy.edit` of `supervised-live 0.1` gates one tenth as often as the line it
495
+ * replaces, which is a weakening whatever the level says.
496
+ *
497
+ * A route aimed at a `policy.core` or `log.mutate` path is refused outright
498
+ * rather than allowed to sit inert. It never fires — `protectedPathClass` tier 2
499
+ * answers before the routed tier, which is §11.1 invariant 9 holding — but an
500
+ * author reading their own file would believe a rule is in force that the
501
+ * runtime will never consult, and a policy nobody can read correctly is the
502
+ * failure this project exists to prevent.
503
+ *
504
+ * The consequence of a failure is that the policy does not load AT ALL, and a
505
+ * policy that does not load resolves every class to `manual`. That is the
506
+ * strictest available answer and the one this file has always given: an author
507
+ * who wrote a weakening they did not intend gets everything gated, plus a
508
+ * message naming the entry, rather than the weakening.
509
+ *
510
+ * `null` when the policy is clear; otherwise the message.
511
+ */
512
+ export declare function checkProtectedRouteFloor(load: PolicyLoadResult): string | null;
513
+ /**
514
+ * Load, extract, parse, and validate the policy block of an `APPROVAL.md`.
515
+ *
516
+ * Discovery: `options.file` when given, otherwise `APPROVAL.md` in
517
+ * `options.dir` (default cwd), falling back to `APPROVALS.md`. `APPROVAL.md`
518
+ * wins when both exist (SPEC.md §5).
519
+ *
520
+ * Fails closed on every error path — see {@link PolicyLoadResult}. Never
521
+ * throws; a thrown error would be a policy bypass.
522
+ *
523
+ * This is discovery plus {@link loadPolicyText}. A caller that has already read
524
+ * the bytes (the gate, since APRV-142) calls the latter directly rather than
525
+ * paying for a second read that could see different bytes.
526
+ */
527
+ export declare function loadPolicy(options?: LoadPolicyOptions): PolicyLoadResult;
@@ -456,13 +456,25 @@ export function checkProtectedRouteFloor(load) {
456
456
  if (builtin === null)
457
457
  continue;
458
458
  const routed = resolve(load, parsedEntry.routed);
459
- const weaker = STRICTNESS[routed.declaredAutonomy] > STRICTNESS[line.declaredAutonomy] ||
459
+ const ordinaryWeaker = STRICTNESS[routed.declaredAutonomy] > STRICTNESS[line.declaredAutonomy] ||
460
460
  (STRICTNESS[routed.declaredAutonomy] === STRICTNESS[line.declaredAutonomy] &&
461
461
  routed.liveRate !== null &&
462
462
  line.liveRate !== null &&
463
463
  routed.liveRate < line.liveRate);
464
- if (weaker) {
465
- return `protected_paths entry ${JSON.stringify(entry.path)} routes a built-in policy.edit path to ${JSON.stringify(parsedEntry.routed)}, which resolves ${describeLevel(routed.declaredAutonomy, routed.liveRate)} — weaker than the \`policy.edit\` line's own ${describeLevel(line.declaredAutonomy, line.liveRate)}. \`protected_paths\` is additive: it may widen the protected surface and may never narrow it, and routing a built-in path to a looser sub-class would narrow it without removing anything from any list. Declare ${JSON.stringify(parsedEntry.routed)} at least as strictly as \`policy.edit\`, or route a path the runtime does not already protect.`;
464
+ const irreversibleLine = resolve(load, "policy.edit", { reversible: false });
465
+ const irreversibleRouted = resolve(load, parsedEntry.routed, { reversible: false });
466
+ const irreversibleWeaker = STRICTNESS[irreversibleRouted.declaredAutonomy] >
467
+ STRICTNESS[irreversibleLine.declaredAutonomy] ||
468
+ (STRICTNESS[irreversibleRouted.declaredAutonomy] ===
469
+ STRICTNESS[irreversibleLine.declaredAutonomy] &&
470
+ irreversibleRouted.liveRate !== null &&
471
+ irreversibleLine.liveRate !== null &&
472
+ irreversibleRouted.liveRate < irreversibleLine.liveRate);
473
+ if (ordinaryWeaker || irreversibleWeaker) {
474
+ const comparison = ordinaryWeaker
475
+ ? `${describeLevel(routed.declaredAutonomy, routed.liveRate)} — weaker than the \`policy.edit\` line's own ${describeLevel(line.declaredAutonomy, line.liveRate)}`
476
+ : `${describeLevel(irreversibleRouted.declaredAutonomy, irreversibleRouted.liveRate)} for reversible: false — weaker than the \`policy.edit\` line's effective ${describeLevel(irreversibleLine.declaredAutonomy, irreversibleLine.liveRate)} for reversible: false`;
477
+ return `protected_paths entry ${JSON.stringify(entry.path)} routes a built-in policy.edit path to ${JSON.stringify(parsedEntry.routed)}, which resolves ${comparison}. \`protected_paths\` is additive: it may widen the protected surface and may never narrow it, and routing a built-in path to a looser sub-class would narrow it without removing anything from any list. Declare ${JSON.stringify(parsedEntry.routed)} at least as strictly as \`policy.edit\`, or route a path the runtime does not already protect.`;
466
478
  }
467
479
  }
468
480
  return null;
@@ -1 +1 @@
1
- {"version":3,"file":"policy-load.js","sourceRoot":"","sources":["../../../src/core/policy-load.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE3C,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAEpD,OAAO,EACL,yBAAyB,EACzB,mBAAmB,GAEpB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAkB,MAAM,eAAe,CAAC;AAC3D,6EAA6E;AAC7E,6EAA6E;AAC7E,6EAA6E;AAC7E,uEAAuE;A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