create-principles-disciple 1.149.0 → 1.150.2

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 (258) hide show
  1. package/_release/product-identity.json +1 -1
  2. package/codex-adapter/dist/ingestion/ingestion.d.ts +9 -7
  3. package/codex-adapter/dist/ingestion/ingestion.js +68 -144
  4. package/codex-adapter/dist/ingestion/transcript-decoder.d.ts +35 -44
  5. package/codex-adapter/dist/ingestion/transcript-decoder.js +23 -84
  6. package/codex-adapter/dist/ingestion/transcript-source.d.ts +29 -0
  7. package/codex-adapter/dist/ingestion/transcript-source.js +65 -0
  8. package/codex-adapter/dist/pd-hook.d.ts +27 -1
  9. package/codex-adapter/dist/pd-hook.js +88 -7
  10. package/codex-adapter/dist/worker/workspace-worker.d.ts +15 -0
  11. package/codex-adapter/dist/worker/workspace-worker.js +7 -36
  12. package/codex-adapter/package.json +1 -1
  13. package/console/dist/server/index.js +14 -0
  14. package/console/dist/server/models/ActivationsConsoleModel.d.ts +3 -17
  15. package/console/dist/server/models/ActivationsConsoleModel.js +5 -44
  16. package/console/dist/server/routes/diagnostician.d.ts +50 -0
  17. package/console/dist/server/routes/diagnostician.js +388 -0
  18. package/console/dist/server/routes/examiner-eligibility.d.ts +73 -0
  19. package/console/dist/server/routes/examiner-eligibility.js +326 -0
  20. package/console/dist/server/routes/examiner.js +66 -8
  21. package/console/dist/web/assets/app.css +40 -0
  22. package/console/dist/web/assets/app.js +30 -30
  23. package/core/dist/host/host-installer.d.ts +7 -0
  24. package/core/dist/host/host-installer.d.ts.map +1 -1
  25. package/core/dist/host/host-installer.js.map +1 -1
  26. package/core/dist/runtime/activation/index.d.ts +3 -3
  27. package/core/dist/runtime/activation/index.d.ts.map +1 -1
  28. package/core/dist/runtime/activation/index.js +1 -1
  29. package/core/dist/runtime/activation/index.js.map +1 -1
  30. package/core/dist/runtime/activation/promotion-readiness-evaluator.d.ts +25 -1
  31. package/core/dist/runtime/activation/promotion-readiness-evaluator.d.ts.map +1 -1
  32. package/core/dist/runtime/activation/promotion-readiness-evaluator.js +58 -1
  33. package/core/dist/runtime/activation/promotion-readiness-evaluator.js.map +1 -1
  34. package/core/dist/runtime/activation/promotion-readiness-reader.d.ts.map +1 -1
  35. package/core/dist/runtime/activation/promotion-readiness-reader.js +4 -2
  36. package/core/dist/runtime/activation/promotion-readiness-reader.js.map +1 -1
  37. package/core/dist/runtime/activation/rulecode-owner-decision-service.d.ts +28 -0
  38. package/core/dist/runtime/activation/rulecode-owner-decision-service.d.ts.map +1 -1
  39. package/core/dist/runtime/activation/rulecode-owner-decision-service.js +2 -0
  40. package/core/dist/runtime/activation/rulecode-owner-decision-service.js.map +1 -1
  41. package/core/dist/runtime/admission-gate.d.ts +8 -1
  42. package/core/dist/runtime/admission-gate.d.ts.map +1 -1
  43. package/core/dist/runtime/admission-gate.js +2 -1
  44. package/core/dist/runtime/admission-gate.js.map +1 -1
  45. package/core/dist/runtime/config/pd-config-defaults.d.ts.map +1 -1
  46. package/core/dist/runtime/config/pd-config-defaults.js +20 -2
  47. package/core/dist/runtime/config/pd-config-defaults.js.map +1 -1
  48. package/core/dist/runtime/config/pd-config-effective.d.ts.map +1 -1
  49. package/core/dist/runtime/config/pd-config-effective.js +5 -2
  50. package/core/dist/runtime/config/pd-config-effective.js.map +1 -1
  51. package/core/dist/runtime/config/pd-config-validate.d.ts.map +1 -1
  52. package/core/dist/runtime/config/pd-config-validate.js +18 -0
  53. package/core/dist/runtime/config/pd-config-validate.js.map +1 -1
  54. package/core/dist/runtime/context-payload.d.ts +48 -3
  55. package/core/dist/runtime/context-payload.d.ts.map +1 -1
  56. package/core/dist/runtime/context-payload.js +38 -0
  57. package/core/dist/runtime/context-payload.js.map +1 -1
  58. package/core/dist/runtime/diagnostician/rootcause-prompt-builder.d.ts +8 -2
  59. package/core/dist/runtime/diagnostician/rootcause-prompt-builder.d.ts.map +1 -1
  60. package/core/dist/runtime/diagnostician/rootcause-prompt-builder.js +28 -2
  61. package/core/dist/runtime/diagnostician/rootcause-prompt-builder.js.map +1 -1
  62. package/core/dist/runtime/diagnostician-candidate.d.ts +24 -0
  63. package/core/dist/runtime/diagnostician-candidate.d.ts.map +1 -0
  64. package/core/dist/runtime/diagnostician-candidate.js +55 -0
  65. package/core/dist/runtime/diagnostician-candidate.js.map +1 -0
  66. package/core/dist/runtime/evidence-guards.d.ts +10 -4
  67. package/core/dist/runtime/evidence-guards.d.ts.map +1 -1
  68. package/core/dist/runtime/evidence-guards.js +12 -5
  69. package/core/dist/runtime/evidence-guards.js.map +1 -1
  70. package/core/dist/runtime/evolution/evolution-types.d.ts +4 -4
  71. package/core/dist/runtime/evolution/evolution-types.d.ts.map +1 -1
  72. package/core/dist/runtime/evolution/evolution-types.js +1 -0
  73. package/core/dist/runtime/evolution/evolution-types.js.map +1 -1
  74. package/core/dist/runtime/feature-flags/feature-flag-contract.d.ts.map +1 -1
  75. package/core/dist/runtime/feature-flags/feature-flag-contract.js +14 -0
  76. package/core/dist/runtime/feature-flags/feature-flag-contract.js.map +1 -1
  77. package/core/dist/runtime/feature-flags/feature-flag-lifecycle.d.ts.map +1 -1
  78. package/core/dist/runtime/feature-flags/feature-flag-lifecycle.js +16 -0
  79. package/core/dist/runtime/feature-flags/feature-flag-lifecycle.js.map +1 -1
  80. package/core/dist/runtime/index.d.ts +5 -2
  81. package/core/dist/runtime/index.d.ts.map +1 -1
  82. package/core/dist/runtime/index.js +6 -1
  83. package/core/dist/runtime/index.js.map +1 -1
  84. package/core/dist/runtime/internalization/index.d.ts +1 -0
  85. package/core/dist/runtime/internalization/index.d.ts.map +1 -1
  86. package/core/dist/runtime/internalization/index.js +2 -0
  87. package/core/dist/runtime/internalization/index.js.map +1 -1
  88. package/core/dist/runtime/internalization/rule-host-contracts.d.ts +10 -0
  89. package/core/dist/runtime/internalization/rule-host-contracts.d.ts.map +1 -1
  90. package/core/dist/runtime/internalization/rule-host-evaluator.js +10 -10
  91. package/core/dist/runtime/internalization/rule-host-evaluator.js.map +1 -1
  92. package/core/dist/runtime/internalization/rule-host-input-builder.d.ts +7 -6
  93. package/core/dist/runtime/internalization/rule-host-input-builder.d.ts.map +1 -1
  94. package/core/dist/runtime/internalization/rule-host-input-builder.js +6 -2
  95. package/core/dist/runtime/internalization/rule-host-input-builder.js.map +1 -1
  96. package/core/dist/runtime/internalization/rule-host-result-normalizer.d.ts +33 -0
  97. package/core/dist/runtime/internalization/rule-host-result-normalizer.d.ts.map +1 -0
  98. package/core/dist/runtime/internalization/rule-host-result-normalizer.js +61 -0
  99. package/core/dist/runtime/internalization/rule-host-result-normalizer.js.map +1 -0
  100. package/core/dist/runtime/internalization/rule-host-validator.d.ts.map +1 -1
  101. package/core/dist/runtime/internalization/rule-host-validator.js +17 -0
  102. package/core/dist/runtime/internalization/rule-host-validator.js.map +1 -1
  103. package/core/dist/runtime/pain-ingress-payload.d.ts +27 -2
  104. package/core/dist/runtime/pain-ingress-payload.d.ts.map +1 -1
  105. package/core/dist/runtime/pain-ingress-payload.js +45 -3
  106. package/core/dist/runtime/pain-ingress-payload.js.map +1 -1
  107. package/core/dist/runtime/pain-ingress.d.ts +4 -2
  108. package/core/dist/runtime/pain-ingress.d.ts.map +1 -1
  109. package/core/dist/runtime/pain-ingress.js +23 -3
  110. package/core/dist/runtime/pain-ingress.js.map +1 -1
  111. package/core/dist/runtime/pain-severity.d.ts +14 -0
  112. package/core/dist/runtime/pain-severity.d.ts.map +1 -0
  113. package/core/dist/runtime/pain-severity.js +14 -0
  114. package/core/dist/runtime/pain-severity.js.map +1 -0
  115. package/core/dist/runtime/pain-signal-bridge.d.ts +17 -3
  116. package/core/dist/runtime/pain-signal-bridge.d.ts.map +1 -1
  117. package/core/dist/runtime/pain-signal-bridge.js +6 -0
  118. package/core/dist/runtime/pain-signal-bridge.js.map +1 -1
  119. package/core/dist/runtime/pain-signal-observability.d.ts.map +1 -1
  120. package/core/dist/runtime/pain-signal-observability.js +3 -2
  121. package/core/dist/runtime/pain-signal-observability.js.map +1 -1
  122. package/core/dist/runtime/pain-submit-capability.d.ts +164 -0
  123. package/core/dist/runtime/pain-submit-capability.d.ts.map +1 -0
  124. package/core/dist/runtime/pain-submit-capability.js +442 -0
  125. package/core/dist/runtime/pain-submit-capability.js.map +1 -0
  126. package/core/dist/runtime/pain-to-principle-service.d.ts +4 -0
  127. package/core/dist/runtime/pain-to-principle-service.d.ts.map +1 -1
  128. package/core/dist/runtime/pain-to-principle-service.js +2 -0
  129. package/core/dist/runtime/pain-to-principle-service.js.map +1 -1
  130. package/core/dist/runtime/stalled-diagnostician-task-read-model.d.ts +56 -10
  131. package/core/dist/runtime/stalled-diagnostician-task-read-model.d.ts.map +1 -1
  132. package/core/dist/runtime/stalled-diagnostician-task-read-model.js +80 -4
  133. package/core/dist/runtime/stalled-diagnostician-task-read-model.js.map +1 -1
  134. package/core/dist/runtime/store/context/sqlite-context-assembler.d.ts.map +1 -1
  135. package/core/dist/runtime/store/context/sqlite-context-assembler.js +11 -0
  136. package/core/dist/runtime/store/context/sqlite-context-assembler.js.map +1 -1
  137. package/core/dist/runtime/store/run/memory-run-store.d.ts +10 -0
  138. package/core/dist/runtime/store/run/memory-run-store.d.ts.map +1 -1
  139. package/core/dist/runtime/store/run/memory-run-store.js +21 -0
  140. package/core/dist/runtime/store/run/memory-run-store.js.map +1 -1
  141. package/core/dist/runtime/store/run/run-store.d.ts +12 -0
  142. package/core/dist/runtime/store/run/run-store.d.ts.map +1 -1
  143. package/core/dist/runtime/store/run/sqlite-run-store.d.ts +1 -0
  144. package/core/dist/runtime/store/run/sqlite-run-store.d.ts.map +1 -1
  145. package/core/dist/runtime/store/run/sqlite-run-store.js +14 -0
  146. package/core/dist/runtime/store/run/sqlite-run-store.js.map +1 -1
  147. package/core/dist/runtime/task-status.d.ts +9 -0
  148. package/core/dist/runtime/task-status.d.ts.map +1 -1
  149. package/core/dist/runtime/task-status.js +7 -1
  150. package/core/dist/runtime/task-status.js.map +1 -1
  151. package/core/dist/runtime/types/evidence-chain-contract.d.ts +18 -0
  152. package/core/dist/runtime/types/evidence-chain-contract.d.ts.map +1 -1
  153. package/core/dist/runtime/types/evidence-chain-contract.js +37 -7
  154. package/core/dist/runtime/types/evidence-chain-contract.js.map +1 -1
  155. package/core/package.json +5 -1
  156. package/dist/install-summary.d.ts +7 -0
  157. package/dist/install-summary.d.ts.map +1 -1
  158. package/dist/install-summary.js +4 -0
  159. package/dist/install-summary.js.map +1 -1
  160. package/dist/installer.d.ts +34 -1
  161. package/dist/installer.d.ts.map +1 -1
  162. package/dist/installer.js +84 -4
  163. package/dist/installer.js.map +1 -1
  164. package/dist/installers/codex-host-installer.d.ts +88 -1
  165. package/dist/installers/codex-host-installer.d.ts.map +1 -1
  166. package/dist/installers/codex-host-installer.js +370 -11
  167. package/dist/installers/codex-host-installer.js.map +1 -1
  168. package/dist/installers/index.d.ts +23 -0
  169. package/dist/installers/index.d.ts.map +1 -1
  170. package/dist/installers/index.js +38 -1
  171. package/dist/installers/index.js.map +1 -1
  172. package/dist/installers/legacy-workbuddy-skill.d.ts +59 -0
  173. package/dist/installers/legacy-workbuddy-skill.d.ts.map +1 -0
  174. package/dist/installers/legacy-workbuddy-skill.js +168 -0
  175. package/dist/installers/legacy-workbuddy-skill.js.map +1 -0
  176. package/dist/installers/workbuddy-host-installer.d.ts.map +1 -1
  177. package/dist/installers/workbuddy-host-installer.js +7 -0
  178. package/dist/installers/workbuddy-host-installer.js.map +1 -1
  179. package/host-runtime/dist/adaptive-priority-provider.d.ts +101 -0
  180. package/host-runtime/dist/adaptive-priority-provider.js +194 -0
  181. package/host-runtime/dist/adaptive-selection.d.ts +164 -0
  182. package/host-runtime/dist/adaptive-selection.js +506 -0
  183. package/host-runtime/dist/adaptive-skip-decision.d.ts +61 -0
  184. package/host-runtime/dist/adaptive-skip-decision.js +114 -0
  185. package/host-runtime/dist/codex-ingestion-consent.d.ts +32 -95
  186. package/host-runtime/dist/codex-ingestion-consent.js +33 -205
  187. package/host-runtime/dist/conversation-ingestion/consent.d.ts +124 -0
  188. package/host-runtime/dist/conversation-ingestion/consent.js +531 -0
  189. package/host-runtime/dist/conversation-ingestion/index.d.ts +12 -0
  190. package/host-runtime/dist/conversation-ingestion/index.js +12 -0
  191. package/host-runtime/dist/conversation-ingestion/pipeline.d.ts +101 -0
  192. package/host-runtime/dist/conversation-ingestion/pipeline.js +162 -0
  193. package/host-runtime/dist/conversation-ingestion/source.d.ts +172 -0
  194. package/host-runtime/dist/conversation-ingestion/source.js +111 -0
  195. package/host-runtime/dist/conversation-ingestion/text-policy.d.ts +51 -0
  196. package/host-runtime/dist/conversation-ingestion/text-policy.js +68 -0
  197. package/host-runtime/dist/diagnostician-auto-run.d.ts +28 -0
  198. package/host-runtime/dist/diagnostician-auto-run.js +100 -0
  199. package/host-runtime/dist/governance-observation-store.d.ts +9 -7
  200. package/host-runtime/dist/governance-observation-store.js +20 -4
  201. package/host-runtime/dist/host-tool-semantic-resolver.d.ts +42 -1
  202. package/host-runtime/dist/host-tool-semantic-resolver.js +80 -14
  203. package/host-runtime/dist/index.d.ts +5 -0
  204. package/host-runtime/dist/index.js +12 -0
  205. package/host-runtime/dist/production-rulehost-gate.js +17 -17
  206. package/host-runtime/dist/rulecode-event-collection.d.ts +31 -0
  207. package/host-runtime/dist/rulecode-event-collection.js +62 -0
  208. package/host-runtime/package.json +1 -1
  209. package/package.json +3 -3
  210. package/pd-cli/dist/commands/diagnose.d.ts +30 -0
  211. package/pd-cli/dist/commands/diagnose.d.ts.map +1 -1
  212. package/pd-cli/dist/commands/diagnose.js +75 -0
  213. package/pd-cli/dist/commands/diagnose.js.map +1 -1
  214. package/pd-cli/dist/commands/pain-record.d.ts.map +1 -1
  215. package/pd-cli/dist/commands/pain-record.js +5 -4
  216. package/pd-cli/dist/commands/pain-record.js.map +1 -1
  217. package/pd-cli/dist/commands/pain-retry.d.ts.map +1 -1
  218. package/pd-cli/dist/commands/pain-retry.js +2 -1
  219. package/pd-cli/dist/commands/pain-retry.js.map +1 -1
  220. package/pd-cli/dist/commands/runtime-activation.d.ts +6 -17
  221. package/pd-cli/dist/commands/runtime-activation.d.ts.map +1 -1
  222. package/pd-cli/dist/commands/runtime-activation.js +42 -48
  223. package/pd-cli/dist/commands/runtime-activation.js.map +1 -1
  224. package/pd-cli/dist/index.js +1 -0
  225. package/pd-cli/dist/index.js.map +1 -1
  226. package/pd-cli/dist/services/delivery-surfaces.js +1 -1
  227. package/pd-cli/dist/services/delivery-surfaces.js.map +1 -1
  228. package/pd-cli/package.json +1 -1
  229. package/pd-mcp-server/dist/budget.d.ts +1 -1
  230. package/pd-mcp-server/dist/budget.js +2 -2
  231. package/pd-mcp-server/dist/envelope.d.ts +15 -0
  232. package/pd-mcp-server/dist/envelope.js +49 -1
  233. package/pd-mcp-server/dist/index.d.ts +2 -0
  234. package/pd-mcp-server/dist/index.js +6 -0
  235. package/pd-mcp-server/dist/server.d.ts +83 -14
  236. package/pd-mcp-server/dist/server.js +251 -4
  237. package/pd-mcp-server/dist/version.d.ts +1 -1
  238. package/pd-mcp-server/dist/version.js +1 -1
  239. package/pd-mcp-server/dist/workspace.d.ts +4 -2
  240. package/pd-mcp-server/dist/workspace.js +5 -2
  241. package/pd-mcp-server/package.json +1 -1
  242. package/plugin/dist/bundle.js +449 -437
  243. package/plugin/dist/core/evolution-reducer.d.ts +2 -2
  244. package/plugin/dist/hooks/hook-tool-semantics.d.ts +25 -0
  245. package/plugin/dist/hooks/pain-ingress-adapter.d.ts +1 -1
  246. package/plugin/dist/openclaw.plugin.json +1 -1
  247. package/plugin/dist/rulehost-evidence.js +1 -1
  248. package/plugin/openclaw.plugin.json +1 -1
  249. package/plugin/package.json +1 -1
  250. package/release-manager/dist/installer.js +84 -4
  251. package/release-manager/dist/installers/codex-host-installer.js +370 -11
  252. package/release-manager/dist/installers/index.js +38 -1
  253. package/release-manager/dist/installers/legacy-workbuddy-skill.js +168 -0
  254. package/release-manager/dist/installers/workbuddy-host-installer.js +7 -0
  255. package/release-manager/package.json +1 -1
  256. package/workbuddy-adapter/dist/pd-hook.js +20 -4
  257. package/workbuddy-adapter/package.json +1 -1
  258. package/workbuddy-adapter/plugin/skills/pd-pain-signal/SKILL.md +123 -20
@@ -1,111 +1,48 @@
1
1
  /**
2
- * Codex conversation-ingestion consent store — Codex Governance Closure
3
- * Slice D (SPEC rev 2 §17; G2A frozen disclosure).
2
+ * Codex conversation-ingestion consent — COMPAT SHIM over the host-neutral
3
+ * v3 ledger (PRI-1171 P1; SPEC v0.2 §8.1).
4
4
  *
5
- * Persists the Owner's recorded consent decision for enabling
6
- * `codex_conversation_ingestion` in ONE workspace to
7
- * `<workspace>/.pd/codex-ingestion-consent.json`.
5
+ * The authority moved to
6
+ * `<workspace>/.state/conversation-ingestion-consent.json` (host-keyed, schema
7
+ * v3) in `conversation-ingestion/consent.ts`. This module keeps the historical
8
+ * Codex-named API stable for existing consumers (pd-cli setup / health) for
9
+ * ONE version cycle; new code reads the seam API directly.
8
10
  *
9
- * Authority model (P4): the FEATURE FLAG stays the runtime authority for
10
- * whether ingestion runs (the hook gate reads only the flag — consent never
11
- * sits on the hot path). This store is the GOVERNANCE RECORD that the flag
12
- * may only be enabled THROUGH the disclosed consent flow (G2A); health uses
13
- * it to report consent state and to flag `flag_on_without_grant` as a
14
- * governance warning. Declining must never flip the flag off by side effect
15
- * — the setup flow owns that ordering, not this store.
16
- *
17
- * Scope: per-workspace (the flag and the transcripts it gates are
18
- * workspace-scoped). This file is consent control state — it never contains
19
- * any captured conversation text (SPEC §15 "consent state without displaying
20
- * captured text").
21
- *
22
- * Patterns mirror the product-telemetry consent store: missing file is the
23
- * normal never-asked case; a malformed file fails loud (rc-3/rc-9) because
24
- * silently treating it as "never asked" could re-prompt against a recorded
25
- * Owner decision; writes are atomic (temp + rename); unknown/malformed
26
- * fields are rejected via guards, never `as` (rc-1/rc-2/rc-5).
11
+ * Behavior notes vs the pre-PRI-1171 store:
12
+ * - the active authority file is now under `.state/` — the legacy
13
+ * `.pd/codex-ingestion-consent.json` (v2) is migrated on first read and
14
+ * renamed `.superseded` (kept for audit, never read again);
15
+ * - `decidedVia` additionally accepts `owner_directive` (with evidenceRef);
16
+ * - records gain an optional `evidenceRef`;
17
+ * - the disclosure version is still stamped from the frozen Codex
18
+ * disclosure constant unless the caller provides one explicitly.
27
19
  */
20
+ import { type ConversationIngestionConsentDecision, type ConversationIngestionConsentDecidedVia, type ConversationIngestionConsentRead, type ConversationIngestionConsentRecord, type ConversationIngestionConsentState, type ConversationIngestionConsentWrite } from './conversation-ingestion/consent.js';
28
21
  export declare const CODEX_INGESTION_CONSENT_FILENAME = "codex-ingestion-consent.json";
29
- export declare const CODEX_INGESTION_CONSENT_SCHEMA_VERSION = "2";
30
- /**
31
- * Consent transition states (review round 2, governance consistency):
32
- *
33
- * absent ──(disclosure shown, explicit decision)──▶ pending
34
- * pending ──(flag enabled successfully)───────────▶ granted
35
- * pending ──(declined / flag regularized off)─────▶ revoked
36
- * pending ──(flag enable failed)──────────────────▶ failed (with reason)
37
- * granted ──(explicit decline)────────────────────▶ revoked
38
- *
39
- * `granted` is only ever recorded AFTER the runtime flag activation has
40
- * succeeded — consent can never become granted before activation, and a
41
- * failed activation leaves an EXPLAINED `failed` state (reason + nextAction),
42
- * never a silent granted/disabled mismatch. The flag remains the runtime
43
- * authority; this record is the governance state machine that makes every
44
- * observed flag/consent combination interpretable.
45
- */
46
- export type CodexIngestionConsentDecision = 'pending' | 'granted' | 'revoked' | 'failed';
47
- export type CodexIngestionConsentDecidedVia = 'pd_codex_setup' | 'codex_plugin_setup';
48
- export interface CodexIngestionConsentRecord {
49
- decision: CodexIngestionConsentDecision;
50
- disclosureVersion: string;
51
- decidedAt: string;
52
- decidedVia: CodexIngestionConsentDecidedVia;
53
- /** Populated when decision='failed': why the flag activation did not land. */
54
- failureReason?: string;
55
- schemaVersion: string;
56
- }
57
- export type CodexIngestionConsentRead = {
58
- ok: true;
59
- existed: boolean;
60
- record: CodexIngestionConsentRecord | null;
61
- } | {
62
- ok: false;
63
- reason: string;
64
- nextAction: string;
65
- };
66
- export type CodexIngestionConsentWrite = {
67
- ok: true;
68
- record: CodexIngestionConsentRecord;
69
- } | {
70
- ok: false;
71
- reason: string;
72
- nextAction: string;
73
- };
74
- /** Health-surface consent state (SPEC §15). No captured text, ever. */
75
- export type CodexIngestionConsentState = 'granted' | 'revoked' | 'pending' | 'failed' | 'not_present' | 'flag_on_without_grant';
22
+ /** Now the v3 ledger schema version (the v2 file format is legacy/migrating-only). */
23
+ export declare const CODEX_INGESTION_CONSENT_SCHEMA_VERSION = "3";
24
+ export type CodexIngestionConsentDecision = ConversationIngestionConsentDecision;
25
+ export type CodexIngestionConsentDecidedVia = ConversationIngestionConsentDecidedVia;
26
+ export type CodexIngestionConsentRecord = ConversationIngestionConsentRecord;
27
+ export type CodexIngestionConsentRead = ConversationIngestionConsentRead;
28
+ export type CodexIngestionConsentWrite = ConversationIngestionConsentWrite;
29
+ export type CodexIngestionConsentState = ConversationIngestionConsentState;
30
+ /** Path of the ACTIVE authority (the v3 ledger under `.state/`). */
76
31
  export declare function getCodexIngestionConsentPath(workspaceDir: string): string;
77
- /**
78
- * Read the consent record. ENOENT is the normal never-asked case
79
- * (existed=false, record=null). Anything unreadable/malformed fails loud —
80
- * degrading to "never asked" could re-prompt or re-enable against the
81
- * Owner's recorded decision.
82
- */
32
+ /** Read the Codex slot of the v3 ledger (migrating a legacy v2 file when present). */
83
33
  export declare function readCodexIngestionConsent(workspaceDir: string): CodexIngestionConsentRead;
84
34
  /**
85
- * Record an explicit consent decision made AFTER the disclosure was
86
- * presented (the setup flow presents the frozen text before calling this).
87
- * The flag itself is intentionally untouched — enabling it is the setup
88
- * flow's explicit, ordered step.
35
+ * Record an explicit Codex consent decision. The disclosure version is stamped
36
+ * from the frozen Codex disclosure constant (callers may override — e.g. the
37
+ * P3 new-disclosure full-text tier). The flags remain untouched.
89
38
  */
90
39
  export declare function recordCodexIngestionConsent(workspaceDir: string, input: {
91
40
  decision: CodexIngestionConsentDecision;
92
41
  decidedVia: CodexIngestionConsentDecidedVia;
93
42
  decidedAt?: string;
94
43
  failureReason?: string;
44
+ disclosureVersion?: string;
45
+ evidenceRef?: string;
95
46
  }): CodexIngestionConsentWrite;
96
- /**
97
- * Combine the consent record with the ingestion flag into the health-surface
98
- * state (SPEC §15). Every flag×record combination maps to exactly one
99
- * interpretable state — none of them reads as silently healthy:
100
- *
101
- * record granted + flag any → 'granted' (activation succeeded)
102
- * record revoked + flag any → 'revoked' (Owner said no; flag-off
103
- * path also regularizes the flag)
104
- * record failed + flag any → 'failed' (activation did not land;
105
- * failureReason explains why)
106
- * record pending + flag off → 'pending' (decision recorded, activation not yet applied)
107
- * record pending + flag on → 'pending' (activation applied, terminal write pending)
108
- * no record + flag on → 'flag_on_without_grant' (governance warning)
109
- * no record + flag off → 'not_present'
110
- */
47
+ /** Health-surface consent state (unchanged mapping). */
111
48
  export declare function deriveCodexIngestionConsentState(record: CodexIngestionConsentRecord | null, ingestionFlagEnabled: boolean): CodexIngestionConsentState;
@@ -1,223 +1,51 @@
1
1
  /**
2
- * Codex conversation-ingestion consent store — Codex Governance Closure
3
- * Slice D (SPEC rev 2 §17; G2A frozen disclosure).
2
+ * Codex conversation-ingestion consent — COMPAT SHIM over the host-neutral
3
+ * v3 ledger (PRI-1171 P1; SPEC v0.2 §8.1).
4
4
  *
5
- * Persists the Owner's recorded consent decision for enabling
6
- * `codex_conversation_ingestion` in ONE workspace to
7
- * `<workspace>/.pd/codex-ingestion-consent.json`.
5
+ * The authority moved to
6
+ * `<workspace>/.state/conversation-ingestion-consent.json` (host-keyed, schema
7
+ * v3) in `conversation-ingestion/consent.ts`. This module keeps the historical
8
+ * Codex-named API stable for existing consumers (pd-cli setup / health) for
9
+ * ONE version cycle; new code reads the seam API directly.
8
10
  *
9
- * Authority model (P4): the FEATURE FLAG stays the runtime authority for
10
- * whether ingestion runs (the hook gate reads only the flag — consent never
11
- * sits on the hot path). This store is the GOVERNANCE RECORD that the flag
12
- * may only be enabled THROUGH the disclosed consent flow (G2A); health uses
13
- * it to report consent state and to flag `flag_on_without_grant` as a
14
- * governance warning. Declining must never flip the flag off by side effect
15
- * — the setup flow owns that ordering, not this store.
16
- *
17
- * Scope: per-workspace (the flag and the transcripts it gates are
18
- * workspace-scoped). This file is consent control state — it never contains
19
- * any captured conversation text (SPEC §15 "consent state without displaying
20
- * captured text").
21
- *
22
- * Patterns mirror the product-telemetry consent store: missing file is the
23
- * normal never-asked case; a malformed file fails loud (rc-3/rc-9) because
24
- * silently treating it as "never asked" could re-prompt against a recorded
25
- * Owner decision; writes are atomic (temp + rename); unknown/malformed
26
- * fields are rejected via guards, never `as` (rc-1/rc-2/rc-5).
11
+ * Behavior notes vs the pre-PRI-1171 store:
12
+ * - the active authority file is now under `.state/` — the legacy
13
+ * `.pd/codex-ingestion-consent.json` (v2) is migrated on first read and
14
+ * renamed `.superseded` (kept for audit, never read again);
15
+ * - `decidedVia` additionally accepts `owner_directive` (with evidenceRef);
16
+ * - records gain an optional `evidenceRef`;
17
+ * - the disclosure version is still stamped from the frozen Codex
18
+ * disclosure constant unless the caller provides one explicitly.
27
19
  */
28
- import fs from 'node:fs';
29
- import path from 'node:path';
30
20
  import { CODEX_INGESTION_DISCLOSURE_VERSION } from './codex-disclosure.js';
21
+ import { CONVERSATION_INGESTION_CONSENT_SCHEMA_VERSION, deriveConversationIngestionConsentState, getConversationIngestionConsentPath, readConversationIngestionConsent, recordConversationIngestionConsent, } from './conversation-ingestion/consent.js';
31
22
  export const CODEX_INGESTION_CONSENT_FILENAME = 'codex-ingestion-consent.json';
32
- export const CODEX_INGESTION_CONSENT_SCHEMA_VERSION = '2';
23
+ /** Now the v3 ledger schema version (the v2 file format is legacy/migrating-only). */
24
+ export const CODEX_INGESTION_CONSENT_SCHEMA_VERSION = CONVERSATION_INGESTION_CONSENT_SCHEMA_VERSION;
25
+ /** Path of the ACTIVE authority (the v3 ledger under `.state/`). */
33
26
  export function getCodexIngestionConsentPath(workspaceDir) {
34
- return path.join(path.resolve(workspaceDir), '.pd', CODEX_INGESTION_CONSENT_FILENAME);
35
- }
36
- function isDecision(value) {
37
- return value === 'granted' || value === 'pending' || value === 'revoked' || value === 'failed';
38
- }
39
- function isDecidedVia(value) {
40
- return value === 'pd_codex_setup' || value === 'codex_plugin_setup';
41
- }
42
- function isNonShortString(value, max) {
43
- return typeof value === 'string' && value.length > 0 && value.length <= max;
44
- }
45
- function isIsoTimestamp(value) {
46
- return isNonShortString(value, 40) && !Number.isNaN(Date.parse(value));
27
+ return getConversationIngestionConsentPath(workspaceDir);
47
28
  }
48
- /**
49
- * Read the consent record. ENOENT is the normal never-asked case
50
- * (existed=false, record=null). Anything unreadable/malformed fails loud —
51
- * degrading to "never asked" could re-prompt or re-enable against the
52
- * Owner's recorded decision.
53
- */
29
+ /** Read the Codex slot of the v3 ledger (migrating a legacy v2 file when present). */
54
30
  export function readCodexIngestionConsent(workspaceDir) {
55
- const filePath = getCodexIngestionConsentPath(workspaceDir);
56
- let raw;
57
- try {
58
- raw = fs.readFileSync(filePath, 'utf8');
59
- }
60
- catch (error) {
61
- const codeValue = typeof error === 'object' && error !== null && Object.hasOwn(error, 'code')
62
- ? error.code
63
- : undefined;
64
- if (codeValue === 'ENOENT') {
65
- return { ok: true, existed: false, record: null };
66
- }
67
- const code = typeof codeValue === 'string' ? codeValue : String(error);
68
- return {
69
- ok: false,
70
- reason: `codex_ingestion_consent_unreadable: ${code.slice(0, 120)}`,
71
- nextAction: `Check permissions on ${filePath}`,
72
- };
73
- }
74
- let parsed;
75
- try {
76
- parsed = JSON.parse(raw);
77
- }
78
- catch {
79
- return {
80
- ok: false,
81
- reason: 'codex_ingestion_consent_malformed_json',
82
- nextAction: `Fix or delete ${filePath} (delete = consent returns to not_present; the ingestion flag itself is unchanged)`,
83
- };
84
- }
85
- if (typeof parsed !== 'object' || parsed === null || Array.isArray(parsed)) {
86
- return {
87
- ok: false,
88
- reason: 'codex_ingestion_consent_malformed_shape',
89
- nextAction: `Fix or delete ${filePath} (delete = consent returns to not_present; the ingestion flag itself is unchanged)`,
90
- };
91
- }
92
- const obj = parsed;
93
- const allowedKeys = ['decision', 'disclosureVersion', 'decidedAt', 'decidedVia', 'failureReason', 'schemaVersion'];
94
- const errors = [];
95
- for (const key of Object.keys(obj)) {
96
- if (!allowedKeys.includes(key))
97
- errors.push(`unknown field '${key}'`);
98
- }
99
- if (!isDecision(obj.decision))
100
- errors.push('decision must be pending|granted|revoked|failed');
101
- if (!isNonShortString(obj.disclosureVersion, 40))
102
- errors.push('disclosureVersion must be a short non-empty string');
103
- if (!isIsoTimestamp(obj.decidedAt))
104
- errors.push('decidedAt must be a parseable ISO-8601 string');
105
- if (!isDecidedVia(obj.decidedVia))
106
- errors.push('decidedVia must be pd_codex_setup|codex_plugin_setup');
107
- if (obj.failureReason !== undefined && !isNonShortString(obj.failureReason, 200)) {
108
- errors.push('failureReason must be a non-empty string (≤200 chars) when present');
109
- }
110
- if (obj.schemaVersion !== CODEX_INGESTION_CONSENT_SCHEMA_VERSION) {
111
- errors.push(`schemaVersion must be '${CODEX_INGESTION_CONSENT_SCHEMA_VERSION}'`);
112
- }
113
- if (errors.length > 0) {
114
- return {
115
- ok: false,
116
- reason: `codex_ingestion_consent_malformed: ${errors.join('; ')}`,
117
- nextAction: `Fix or delete ${filePath} (delete = consent returns to not_present; the ingestion flag itself is unchanged)`,
118
- };
119
- }
120
- // Post-validation reconstruction from guard-narrowed fields — no `as` on
121
- // the untrusted parsed object (rc-2). The errors check above proves every
122
- // guard passes; the re-invoked guards here satisfy the type system the
123
- // same way the telemetry consent store does.
124
- return {
125
- ok: true,
126
- existed: true,
127
- record: {
128
- decision: isDecision(obj.decision) ? obj.decision : 'failed',
129
- disclosureVersion: isNonShortString(obj.disclosureVersion, 40) ? obj.disclosureVersion : '',
130
- decidedAt: isIsoTimestamp(obj.decidedAt) ? obj.decidedAt : '',
131
- decidedVia: isDecidedVia(obj.decidedVia) ? obj.decidedVia : 'pd_codex_setup',
132
- ...(isNonShortString(obj.failureReason, 200) && obj.failureReason !== undefined ? { failureReason: obj.failureReason } : {}),
133
- schemaVersion: CODEX_INGESTION_CONSENT_SCHEMA_VERSION,
134
- },
135
- };
31
+ return readConversationIngestionConsent(workspaceDir, 'codex');
136
32
  }
137
33
  /**
138
- * Record an explicit consent decision made AFTER the disclosure was
139
- * presented (the setup flow presents the frozen text before calling this).
140
- * The flag itself is intentionally untouched — enabling it is the setup
141
- * flow's explicit, ordered step.
34
+ * Record an explicit Codex consent decision. The disclosure version is stamped
35
+ * from the frozen Codex disclosure constant (callers may override — e.g. the
36
+ * P3 new-disclosure full-text tier). The flags remain untouched.
142
37
  */
143
38
  export function recordCodexIngestionConsent(workspaceDir, input) {
144
- // Write-side validation mirrors the read-side guards (review round 3): a
145
- // record this writer produces must never be rejected by its own reader.
146
- const errors = [];
147
- if (input.decidedAt !== undefined && !isIsoTimestamp(input.decidedAt))
148
- errors.push('decidedAt must be a parseable ISO-8601 string when provided');
149
- if (input.decision === 'failed' && (input.failureReason === undefined || input.failureReason.trim().length === 0)) {
150
- errors.push('decision=failed requires a non-empty failureReason');
151
- }
152
- if (input.failureReason !== undefined && input.decision !== 'failed' && input.failureReason.trim().length === 0) {
153
- errors.push('failureReason must be non-empty when provided');
154
- }
155
- if (errors.length > 0) {
156
- return {
157
- ok: false,
158
- reason: 'codex_ingestion_consent_input_invalid: ' + errors.join('; '),
159
- nextAction: 'Fix the recordCodexIngestionConsent arguments at the call site.',
160
- };
161
- }
162
- const filePath = getCodexIngestionConsentPath(workspaceDir);
163
- const record = {
39
+ return recordConversationIngestionConsent(workspaceDir, 'codex', {
164
40
  decision: input.decision,
165
- disclosureVersion: CODEX_INGESTION_DISCLOSURE_VERSION,
166
- decidedAt: input.decidedAt ?? new Date().toISOString(),
167
41
  decidedVia: input.decidedVia,
168
- ...(input.failureReason !== undefined ? { failureReason: input.failureReason.slice(0, 200) } : {}),
169
- schemaVersion: CODEX_INGESTION_CONSENT_SCHEMA_VERSION,
170
- };
171
- const dir = path.dirname(filePath);
172
- const tmpPath = `${filePath}.tmp-${process.pid}-${Date.now()}`;
173
- try {
174
- fs.mkdirSync(dir, { recursive: true });
175
- fs.writeFileSync(tmpPath, `${JSON.stringify(record, null, 2)}\n`, { encoding: 'utf8', mode: 0o600 });
176
- fs.renameSync(tmpPath, filePath);
177
- return { ok: true, record };
178
- }
179
- catch (error) {
180
- const message = error instanceof Error ? error.message : String(error);
181
- try {
182
- fs.rmSync(tmpPath, { force: true });
183
- }
184
- catch {
185
- // best-effort cleanup; the write failure below is the loud signal
186
- }
187
- return {
188
- ok: false,
189
- reason: `codex_ingestion_consent_write_failed: ${message.slice(0, 200)}`,
190
- nextAction: `Check permissions on ${dir}`,
191
- };
192
- }
42
+ ...(input.decidedAt !== undefined ? { decidedAt: input.decidedAt } : {}),
43
+ ...(input.failureReason !== undefined ? { failureReason: input.failureReason } : {}),
44
+ disclosureVersion: input.disclosureVersion ?? CODEX_INGESTION_DISCLOSURE_VERSION,
45
+ ...(input.evidenceRef !== undefined ? { evidenceRef: input.evidenceRef } : {}),
46
+ });
193
47
  }
194
- /**
195
- * Combine the consent record with the ingestion flag into the health-surface
196
- * state (SPEC §15). Every flag×record combination maps to exactly one
197
- * interpretable state — none of them reads as silently healthy:
198
- *
199
- * record granted + flag any → 'granted' (activation succeeded)
200
- * record revoked + flag any → 'revoked' (Owner said no; flag-off
201
- * path also regularizes the flag)
202
- * record failed + flag any → 'failed' (activation did not land;
203
- * failureReason explains why)
204
- * record pending + flag off → 'pending' (decision recorded, activation not yet applied)
205
- * record pending + flag on → 'pending' (activation applied, terminal write pending)
206
- * no record + flag on → 'flag_on_without_grant' (governance warning)
207
- * no record + flag off → 'not_present'
208
- */
48
+ /** Health-surface consent state (unchanged mapping). */
209
49
  export function deriveCodexIngestionConsentState(record, ingestionFlagEnabled) {
210
- if (record === null) {
211
- return ingestionFlagEnabled ? 'flag_on_without_grant' : 'not_present';
212
- }
213
- switch (record.decision) {
214
- case 'granted':
215
- return 'granted';
216
- case 'revoked':
217
- return 'revoked';
218
- case 'failed':
219
- return 'failed';
220
- case 'pending':
221
- return 'pending';
222
- }
50
+ return deriveConversationIngestionConsentState(record, ingestionFlagEnabled);
223
51
  }
@@ -0,0 +1,124 @@
1
+ /**
2
+ * Conversation-ingestion consent ledger v3 (PRI-1171; SPEC v0.2 §8.1).
3
+ *
4
+ * Host-neutral successor of the Codex-only consent store: ONE file per
5
+ * workspace, keyed by host kind, at
6
+ * `<workspace>/.state/conversation-ingestion-consent.json`.
7
+ *
8
+ * Authority model (P4, unchanged from v2): the FEATURE FLAGS stay the runtime
9
+ * authority for whether ingestion runs; this ledger is the GOVERNANCE RECORD
10
+ * that the conversation-ingestion flags may only be enabled THROUGH the
11
+ * disclosed consent flow (or an explicit Owner directive). The unified
12
+ * ingestion pipeline additionally consults the recorded decision as its
13
+ * consent gate (SPEC §8.2: host AND ingestion-flag AND consent=granted).
14
+ *
15
+ * v2 → v3 migration (one-way, audit-preserving): when no v3 file exists but a
16
+ * legacy `<workspace>/.pd/codex-ingestion-consent.json` (schema v2) does, the
17
+ * first read migrates it — the v3 file is written FIRST (atomic), then the
18
+ * legacy file is RENAMED with a `.superseded` suffix (never deleted). A crash
19
+ * between the two steps is safe: v3 existing means the legacy file is ignored;
20
+ * no v3 means the migration simply retries. Health and the pipeline read ONLY
21
+ * v3 (single authority — no dual-file ambiguity).
22
+ *
23
+ * Records carry `disclosureVersion`: consent binds to the disclosure text it
24
+ * was granted against. The full-text tier additionally requires the record's
25
+ * disclosureVersion to be at least the current disclosure (see
26
+ * conversation-ingestion/text-policy.ts); an old bounded-era grant stays
27
+ * bounded until a new-disclosure record exists.
28
+ *
29
+ * `decidedVia: 'owner_directive'` records an Owner decision made outside the
30
+ * setup flows (e.g. SPEC approval), with `evidenceRef` pointing at the
31
+ * decision record.
32
+ *
33
+ * Patterns mirror the v2 store: missing file is the normal never-asked case;
34
+ * malformed files fail loud (rc-3/rc-9) because silently treating them as
35
+ * "never asked" could re-enable against a recorded Owner decision; writes are
36
+ * atomic (temp + rename); unknown/malformed fields are rejected via guards,
37
+ * never `as` (rc-1/rc-2/rc-5). This file is consent control state — it never
38
+ * contains captured conversation text.
39
+ */
40
+ export declare const CONVERSATION_INGESTION_CONSENT_FILENAME = "conversation-ingestion-consent.json";
41
+ export declare const CONVERSATION_INGESTION_CONSENT_SCHEMA_VERSION = "3";
42
+ /** Suffix applied to the superseded v2 file (kept on disk for audit; never read again). */
43
+ export declare const CONVERSATION_INGESTION_CONSENT_SUPERSEDED_SUFFIX = ".superseded";
44
+ /** Legacy v2 authority location (Codex-only era); migrated on first read. */
45
+ export declare const LEGACY_CODEX_CONSENT_FILENAME = "codex-ingestion-consent.json";
46
+ export declare const LEGACY_CODEX_CONSENT_SCHEMA_VERSION = "2";
47
+ export type ConversationConsentHostKind = 'codex' | 'workbuddy' | 'openclaw';
48
+ /**
49
+ * Consent transition states (unchanged semantics from the v2 store):
50
+ *
51
+ * absent ──(disclosure shown, explicit decision)──▶ pending
52
+ * pending ──(flag enabled successfully)───────────▶ granted
53
+ * pending ──(declined / flag regularized off)─────▶ revoked
54
+ * pending ──(flag enable failed)──────────────────▶ failed (with reason)
55
+ * granted ──(explicit decline)────────────────────▶ revoked
56
+ *
57
+ * `granted` is only ever recorded AFTER the runtime flag activation has
58
+ * succeeded — consent can never become granted before activation. The flags
59
+ * remain the runtime authority; this record is the governance state machine
60
+ * that makes every observed flag/consent combination interpretable.
61
+ */
62
+ export type ConversationIngestionConsentDecision = 'pending' | 'granted' | 'revoked' | 'failed';
63
+ export type ConversationIngestionConsentDecidedVia = 'pd_codex_setup' | 'codex_plugin_setup' | 'owner_directive';
64
+ export interface ConversationIngestionConsentRecord {
65
+ decision: ConversationIngestionConsentDecision;
66
+ disclosureVersion: string;
67
+ decidedAt: string;
68
+ decidedVia: ConversationIngestionConsentDecidedVia;
69
+ /** Populated when decision='failed': why the flag activation did not land. */
70
+ failureReason?: string;
71
+ /** Populated for owner_directive grants: where the decision is recorded (e.g. SPEC revision table). */
72
+ evidenceRef?: string;
73
+ schemaVersion: string;
74
+ }
75
+ export type ConversationIngestionConsentRead = {
76
+ ok: true;
77
+ existed: boolean;
78
+ record: ConversationIngestionConsentRecord | null;
79
+ migratedFromLegacy?: boolean;
80
+ warnings?: readonly string[];
81
+ } | {
82
+ ok: false;
83
+ reason: string;
84
+ nextAction: string;
85
+ };
86
+ export type ConversationIngestionConsentWrite = {
87
+ ok: true;
88
+ record: ConversationIngestionConsentRecord;
89
+ } | {
90
+ ok: false;
91
+ reason: string;
92
+ nextAction: string;
93
+ };
94
+ /** Health-surface consent state (no captured text, ever). */
95
+ export type ConversationIngestionConsentState = 'granted' | 'revoked' | 'pending' | 'failed' | 'not_present' | 'flag_on_without_grant';
96
+ export declare function getConversationIngestionConsentPath(workspaceDir: string): string;
97
+ /**
98
+ * Read one host's consent record from the v3 ledger (the ONLY authority).
99
+ * A missing v3 file with an existing legacy v2 Codex file triggers the one-way
100
+ * migration. ENOENT on both is the normal never-asked case.
101
+ */
102
+ export declare function readConversationIngestionConsent(workspaceDir: string, hostKind: ConversationConsentHostKind): ConversationIngestionConsentRead;
103
+ /**
104
+ * Record an explicit consent decision for one host (the setup flow presents
105
+ * the frozen disclosure before calling this; an owner_directive record cites
106
+ * its evidenceRef). Other hosts' slots are preserved; the flags themselves are
107
+ * intentionally untouched.
108
+ */
109
+ export declare function recordConversationIngestionConsent(workspaceDir: string, hostKind: ConversationConsentHostKind, input: {
110
+ decision: ConversationIngestionConsentDecision;
111
+ decidedVia: ConversationIngestionConsentDecidedVia;
112
+ decidedAt?: string;
113
+ failureReason?: string;
114
+ disclosureVersion?: string;
115
+ evidenceRef?: string;
116
+ }): ConversationIngestionConsentWrite;
117
+ /**
118
+ * Combine the consent record with the ingestion flag into the health-surface
119
+ * state. Every flag×record combination maps to exactly one interpretable
120
+ * state — none of them reads as silently healthy.
121
+ */
122
+ export declare function deriveConversationIngestionConsentState(record: ConversationIngestionConsentRecord | null, ingestionFlagEnabled: boolean): ConversationIngestionConsentState;
123
+ /** Host kinds recognized by the ledger (for health surfaces). */
124
+ export declare const CONVERSATION_CONSENT_HOST_KINDS: readonly ConversationConsentHostKind[];