create-principles-disciple 1.150.4 → 1.151.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 (551) hide show
  1. package/README.md +5 -5
  2. package/_release/product-identity.json +1 -1
  3. package/codex-adapter/dist/ingestion/codex-version.d.ts +14 -12
  4. package/codex-adapter/dist/ingestion/codex-version.js +19 -20
  5. package/codex-adapter/dist/ingestion/ingestion.js +25 -4
  6. package/codex-adapter/dist/ingestion/transcript-decoder.d.ts +5 -3
  7. package/codex-adapter/dist/ingestion/transcript-decoder.js +61 -5
  8. package/codex-adapter/package.json +1 -1
  9. package/console/dist/server/bind-guard.d.ts +6 -13
  10. package/console/dist/server/bind-guard.js +8 -17
  11. package/console/dist/server/index.d.ts +9 -3
  12. package/console/dist/server/index.js +69 -55
  13. package/console/dist/server/models/ActivationsConsoleModel.js +5 -3
  14. package/console/dist/server/models/ApprovalsConsoleModel.js +2 -1
  15. package/console/dist/server/models/ApprovalsGroupedConsoleModel.js +2 -1
  16. package/console/dist/server/models/EvidenceChainConsoleModel.d.ts +46 -0
  17. package/console/dist/server/models/EvidenceChainConsoleModel.js +121 -2
  18. package/console/dist/server/models/GovernanceConsoleModel.js +3 -2
  19. package/console/dist/server/models/GovernanceExperienceCollector.js +2 -1
  20. package/console/dist/server/models/GovernanceProjectionCollector.js +2 -1
  21. package/console/dist/server/models/IngestionHealthModel.d.ts +34 -0
  22. package/console/dist/server/models/IngestionHealthModel.js +254 -0
  23. package/console/dist/server/models/IntentDecisionModel.js +2 -2
  24. package/console/dist/server/models/IntentPageModel.js +2 -1
  25. package/console/dist/server/models/OwnerDecisionConsoleModel.js +61 -22
  26. package/console/dist/server/models/OwnerDecisionViewModel.js +2 -2
  27. package/console/dist/server/models/PrincipleTrajectoryModel.js +2 -1
  28. package/console/dist/server/models/ReceiptsConsoleModel.js +2 -2
  29. package/console/dist/server/models/RuleCandidateBindingConsoleModel.js +3 -2
  30. package/console/dist/server/routes/activations.js +2 -2
  31. package/console/dist/server/routes/diagnostician.js +3 -2
  32. package/console/dist/server/routes/evidence-chain.d.ts +4 -0
  33. package/console/dist/server/routes/evidence-chain.js +22 -0
  34. package/console/dist/server/routes/evidence-outcomes.d.ts +3 -2
  35. package/console/dist/server/routes/evidence-outcomes.js +1 -1
  36. package/console/dist/server/routes/failed-tasks.js +79 -3
  37. package/console/dist/server/routes/governance.d.ts +9 -6
  38. package/console/dist/server/routes/governance.js +10 -6
  39. package/console/dist/server/routes/health.d.ts +8 -0
  40. package/console/dist/server/routes/health.js +72 -0
  41. package/console/dist/server/routes/owner-decisions.d.ts +3 -3
  42. package/console/dist/server/routes/owner-decisions.js +1 -1
  43. package/console/dist/server/routes/owner-identity.d.ts +10 -5
  44. package/console/dist/server/routes/owner-identity.js +11 -7
  45. package/console/dist/server/routes/principles.js +3 -3
  46. package/console/dist/server/routes/rule-candidate-bindings.js +1 -1
  47. package/console/dist/server/routes/update.js +24 -6
  48. package/console/dist/server/utils/request-guard.d.ts +35 -0
  49. package/console/dist/server/utils/request-guard.js +81 -0
  50. package/console/dist/server/utils/response.d.ts +0 -1
  51. package/console/dist/server/utils/response.js +0 -3
  52. package/console/dist/web/assets/app.css +98 -167
  53. package/console/dist/web/assets/app.js +34 -37
  54. package/core/dist/runtime/activation/activation-control-types.d.ts +3 -0
  55. package/core/dist/runtime/activation/activation-control-types.d.ts.map +1 -1
  56. package/core/dist/runtime/activation/adaptive-selection-output.d.ts +0 -21
  57. package/core/dist/runtime/activation/adaptive-selection-output.d.ts.map +1 -1
  58. package/core/dist/runtime/activation/adaptive-selection-output.js.map +1 -1
  59. package/core/dist/runtime/activation/index.d.ts +2 -6
  60. package/core/dist/runtime/activation/index.d.ts.map +1 -1
  61. package/core/dist/runtime/activation/index.js.map +1 -1
  62. package/core/dist/runtime/activation/production-gate-deps.d.ts +2 -1
  63. package/core/dist/runtime/activation/production-gate-deps.d.ts.map +1 -1
  64. package/core/dist/runtime/activation/prompt-activation-reader-contract.d.ts +2 -1
  65. package/core/dist/runtime/activation/prompt-activation-reader-contract.d.ts.map +1 -1
  66. package/core/dist/runtime/activation/rulecode-owner-decision-service.d.ts.map +1 -1
  67. package/core/dist/runtime/activation/rulecode-owner-decision-service.js +3 -2
  68. package/core/dist/runtime/activation/rulecode-owner-decision-service.js.map +1 -1
  69. package/core/dist/runtime/activation/sqlite-activation-safety-store.d.ts.map +1 -1
  70. package/core/dist/runtime/activation/sqlite-activation-safety-store.js +26 -13
  71. package/core/dist/runtime/activation/sqlite-activation-safety-store.js.map +1 -1
  72. package/core/dist/runtime/activation/writers/index.d.ts +0 -1
  73. package/core/dist/runtime/activation/writers/index.d.ts.map +1 -1
  74. package/core/dist/runtime/activation/writers/rule-host-writer.d.ts.map +1 -1
  75. package/core/dist/runtime/activation/writers/rule-host-writer.js +15 -6
  76. package/core/dist/runtime/activation/writers/rule-host-writer.js.map +1 -1
  77. package/core/dist/runtime/activation-compatibility-read-model.d.ts +3 -2
  78. package/core/dist/runtime/activation-compatibility-read-model.d.ts.map +1 -1
  79. package/core/dist/runtime/adapter/context-budget.d.ts +3 -14
  80. package/core/dist/runtime/adapter/context-budget.d.ts.map +1 -1
  81. package/core/dist/runtime/adapter/context-budget.js +2 -2
  82. package/core/dist/runtime/adapter/context-budget.js.map +1 -1
  83. package/core/dist/runtime/adapter/index.d.ts +1 -2
  84. package/core/dist/runtime/adapter/index.d.ts.map +1 -1
  85. package/core/dist/runtime/adapter/index.js +1 -1
  86. package/core/dist/runtime/adapter/index.js.map +1 -1
  87. package/core/dist/runtime/adapter/output-repair-contract.d.ts +18 -1
  88. package/core/dist/runtime/adapter/output-repair-contract.d.ts.map +1 -1
  89. package/core/dist/runtime/adapter/output-repair-contract.js +94 -0
  90. package/core/dist/runtime/adapter/output-repair-contract.js.map +1 -1
  91. package/core/dist/runtime/adapter/pi-ai-runtime-adapter.d.ts +2 -3
  92. package/core/dist/runtime/adapter/pi-ai-runtime-adapter.d.ts.map +1 -1
  93. package/core/dist/runtime/adapter/pi-ai-runtime-adapter.js +27 -10
  94. package/core/dist/runtime/adapter/pi-ai-runtime-adapter.js.map +1 -1
  95. package/core/dist/runtime/adapter/principle-tree-ledger-adapter.d.ts +1 -1
  96. package/core/dist/runtime/adapter/principle-tree-ledger-adapter.d.ts.map +1 -1
  97. package/core/dist/runtime/adapter/schema-prompt-adapter.d.ts +0 -1
  98. package/core/dist/runtime/adapter/schema-prompt-adapter.d.ts.map +1 -1
  99. package/core/dist/runtime/adapter/schema-prompt-adapter.js +43 -1
  100. package/core/dist/runtime/adapter/schema-prompt-adapter.js.map +1 -1
  101. package/core/dist/runtime/adapter/structured-output-repair.d.ts +17 -2
  102. package/core/dist/runtime/adapter/structured-output-repair.d.ts.map +1 -1
  103. package/core/dist/runtime/adapter/structured-output-repair.js +26 -5
  104. package/core/dist/runtime/adapter/structured-output-repair.js.map +1 -1
  105. package/core/dist/runtime/bridge-result-shaper.d.ts +1 -1
  106. package/core/dist/runtime/bridge-result-shaper.d.ts.map +1 -1
  107. package/core/dist/runtime/candidate-intake-service.d.ts +2 -1
  108. package/core/dist/runtime/candidate-intake-service.d.ts.map +1 -1
  109. package/core/dist/runtime/cli/diagnose.d.ts +4 -3
  110. package/core/dist/runtime/cli/diagnose.d.ts.map +1 -1
  111. package/core/dist/runtime/config/index.d.ts +2 -2
  112. package/core/dist/runtime/config/index.d.ts.map +1 -1
  113. package/core/dist/runtime/config/index.js +3 -3
  114. package/core/dist/runtime/config/index.js.map +1 -1
  115. package/core/dist/runtime/config/pd-config-defaults.d.ts +0 -2
  116. package/core/dist/runtime/config/pd-config-defaults.d.ts.map +1 -1
  117. package/core/dist/runtime/config/pd-config-defaults.js +2 -2
  118. package/core/dist/runtime/config/pd-config-defaults.js.map +1 -1
  119. package/core/dist/runtime/config/pd-config-types.d.ts +2 -0
  120. package/core/dist/runtime/config/pd-config-types.d.ts.map +1 -1
  121. package/core/dist/runtime/config/pd-config-types.js.map +1 -1
  122. package/core/dist/runtime/config/pd-config-validate.d.ts.map +1 -1
  123. package/core/dist/runtime/config/pd-config-validate.js +10 -1
  124. package/core/dist/runtime/config/pd-config-validate.js.map +1 -1
  125. package/core/dist/runtime/config/pd-profile-constants.d.ts +1 -7
  126. package/core/dist/runtime/config/pd-profile-constants.d.ts.map +1 -1
  127. package/core/dist/runtime/config/pd-profile-constants.js +5 -6
  128. package/core/dist/runtime/config/pd-profile-constants.js.map +1 -1
  129. package/core/dist/runtime/config/pd-validate-profile.d.ts +3 -2
  130. package/core/dist/runtime/config/pd-validate-profile.d.ts.map +1 -1
  131. package/core/dist/runtime/context-payload.d.ts +0 -7
  132. package/core/dist/runtime/context-payload.d.ts.map +1 -1
  133. package/core/dist/runtime/context-payload.js +1 -1
  134. package/core/dist/runtime/context-payload.js.map +1 -1
  135. package/core/dist/runtime/core-principles/index.d.ts +1 -1
  136. package/core/dist/runtime/core-principles/index.d.ts.map +1 -1
  137. package/core/dist/runtime/correction/correction-types.d.ts +0 -10
  138. package/core/dist/runtime/correction/correction-types.d.ts.map +1 -1
  139. package/core/dist/runtime/correction/correction-types.js.map +1 -1
  140. package/core/dist/runtime/diagnostician/diag-distiller-output.d.ts +0 -3
  141. package/core/dist/runtime/diagnostician/diag-distiller-output.d.ts.map +1 -1
  142. package/core/dist/runtime/diagnostician/diag-distiller-output.js +1 -1
  143. package/core/dist/runtime/diagnostician/diag-distiller-output.js.map +1 -1
  144. package/core/dist/runtime/diagnostician/diag-rootcause-output.d.ts +3 -11
  145. package/core/dist/runtime/diagnostician/diag-rootcause-output.d.ts.map +1 -1
  146. package/core/dist/runtime/diagnostician/diag-rootcause-output.js +3 -3
  147. package/core/dist/runtime/diagnostician/diag-rootcause-output.js.map +1 -1
  148. package/core/dist/runtime/diagnostician/distiller-prompt-builder.d.ts +5 -4
  149. package/core/dist/runtime/diagnostician/distiller-prompt-builder.d.ts.map +1 -1
  150. package/core/dist/runtime/diagnostician/evidence-ref-binding.d.ts +2 -1
  151. package/core/dist/runtime/diagnostician/evidence-ref-binding.d.ts.map +1 -1
  152. package/core/dist/runtime/diagnostician/rootcause-prompt-builder.d.ts +2 -1
  153. package/core/dist/runtime/diagnostician/rootcause-prompt-builder.d.ts.map +1 -1
  154. package/core/dist/runtime/diagnostician/router-prompt-builder.d.ts +22 -3
  155. package/core/dist/runtime/diagnostician/router-prompt-builder.d.ts.map +1 -1
  156. package/core/dist/runtime/diagnostician/router-prompt-builder.js +11 -1
  157. package/core/dist/runtime/diagnostician/router-prompt-builder.js.map +1 -1
  158. package/core/dist/runtime/diagnostician-association-shadow.d.ts +2 -2
  159. package/core/dist/runtime/diagnostician-association-shadow.d.ts.map +1 -1
  160. package/core/dist/runtime/diagnostician-association-validation.d.ts +3 -2
  161. package/core/dist/runtime/diagnostician-association-validation.d.ts.map +1 -1
  162. package/core/dist/runtime/diagnostician-output.d.ts +32 -5
  163. package/core/dist/runtime/diagnostician-output.d.ts.map +1 -1
  164. package/core/dist/runtime/diagnostician-output.js +47 -4
  165. package/core/dist/runtime/diagnostician-output.js.map +1 -1
  166. package/core/dist/runtime/diagnostician-prompt-builder.d.ts +2 -1
  167. package/core/dist/runtime/diagnostician-prompt-builder.d.ts.map +1 -1
  168. package/core/dist/runtime/error-categories.d.ts.map +1 -1
  169. package/core/dist/runtime/error-categories.js +10 -1
  170. package/core/dist/runtime/error-categories.js.map +1 -1
  171. package/core/dist/runtime/evidence-sanitizer.d.ts +8 -1
  172. package/core/dist/runtime/evidence-sanitizer.d.ts.map +1 -1
  173. package/core/dist/runtime/evidence-sanitizer.js +10 -3
  174. package/core/dist/runtime/evidence-sanitizer.js.map +1 -1
  175. package/core/dist/runtime/evolution/evolution-types.d.ts +0 -26
  176. package/core/dist/runtime/evolution/evolution-types.d.ts.map +1 -1
  177. package/core/dist/runtime/evolution/evolution-types.js.map +1 -1
  178. package/core/dist/runtime/feature-flags/index.d.ts +0 -1
  179. package/core/dist/runtime/feature-flags/index.d.ts.map +1 -1
  180. package/core/dist/runtime/feature-flags/index.js.map +1 -1
  181. package/core/dist/runtime/golden-trace.d.ts +9 -1
  182. package/core/dist/runtime/golden-trace.d.ts.map +1 -1
  183. package/core/dist/runtime/golden-trace.js +7 -0
  184. package/core/dist/runtime/golden-trace.js.map +1 -1
  185. package/core/dist/runtime/governance-experience-contract.d.ts +12 -12
  186. package/core/dist/runtime/governance-experience-contract.d.ts.map +1 -1
  187. package/core/dist/runtime/governance-experience-contract.js +0 -2
  188. package/core/dist/runtime/governance-experience-contract.js.map +1 -1
  189. package/core/dist/runtime/governance-experience.d.ts.map +1 -1
  190. package/core/dist/runtime/governance-experience.js +8 -16
  191. package/core/dist/runtime/governance-experience.js.map +1 -1
  192. package/core/dist/runtime/governance-projection-contract.d.ts +0 -6
  193. package/core/dist/runtime/governance-projection-contract.d.ts.map +1 -1
  194. package/core/dist/runtime/governance-projection-contract.js +3 -3
  195. package/core/dist/runtime/governance-projection-contract.js.map +1 -1
  196. package/core/dist/runtime/internalization/approved-rule-revision.d.ts.map +1 -1
  197. package/core/dist/runtime/internalization/approved-rule-revision.js +2 -1
  198. package/core/dist/runtime/internalization/approved-rule-revision.js.map +1 -1
  199. package/core/dist/runtime/internalization/artifact-summary.d.ts +5 -4
  200. package/core/dist/runtime/internalization/artifact-summary.d.ts.map +1 -1
  201. package/core/dist/runtime/internalization/artifact-summary.js +1 -1
  202. package/core/dist/runtime/internalization/artifact-summary.js.map +1 -1
  203. package/core/dist/runtime/internalization/artificer-intent-preflight.d.ts +1 -1
  204. package/core/dist/runtime/internalization/artificer-intent-preflight.d.ts.map +1 -1
  205. package/core/dist/runtime/internalization/artificer-output.d.ts +0 -2
  206. package/core/dist/runtime/internalization/artificer-output.d.ts.map +1 -1
  207. package/core/dist/runtime/internalization/artificer-output.js +17 -0
  208. package/core/dist/runtime/internalization/artificer-output.js.map +1 -1
  209. package/core/dist/runtime/internalization/artificer-prompt-builder.d.ts +14 -3
  210. package/core/dist/runtime/internalization/artificer-prompt-builder.d.ts.map +1 -1
  211. package/core/dist/runtime/internalization/artificer-prompt-builder.js +13 -1
  212. package/core/dist/runtime/internalization/artificer-prompt-builder.js.map +1 -1
  213. package/core/dist/runtime/internalization/artificer-run-correlation.d.ts +3 -2
  214. package/core/dist/runtime/internalization/artificer-run-correlation.d.ts.map +1 -1
  215. package/core/dist/runtime/internalization/consumer-evidence-preflight.d.ts +2 -1
  216. package/core/dist/runtime/internalization/consumer-evidence-preflight.d.ts.map +1 -1
  217. package/core/dist/runtime/internalization/diag-distiller-runner.d.ts +1 -1
  218. package/core/dist/runtime/internalization/diag-distiller-runner.d.ts.map +1 -1
  219. package/core/dist/runtime/internalization/diag-rootcause-runner.d.ts +1 -1
  220. package/core/dist/runtime/internalization/diag-rootcause-runner.d.ts.map +1 -1
  221. package/core/dist/runtime/internalization/diag-router-runner.d.ts +11 -1
  222. package/core/dist/runtime/internalization/diag-router-runner.d.ts.map +1 -1
  223. package/core/dist/runtime/internalization/diag-router-runner.js +105 -1
  224. package/core/dist/runtime/internalization/diag-router-runner.js.map +1 -1
  225. package/core/dist/runtime/internalization/dreamer-output.d.ts +0 -9
  226. package/core/dist/runtime/internalization/dreamer-output.d.ts.map +1 -1
  227. package/core/dist/runtime/internalization/dreamer-output.js +1 -1
  228. package/core/dist/runtime/internalization/dreamer-output.js.map +1 -1
  229. package/core/dist/runtime/internalization/dreamer-prompt-builder.d.ts +3 -2
  230. package/core/dist/runtime/internalization/dreamer-prompt-builder.d.ts.map +1 -1
  231. package/core/dist/runtime/internalization/dreamer-runner.d.ts +1 -1
  232. package/core/dist/runtime/internalization/dreamer-runner.d.ts.map +1 -1
  233. package/core/dist/runtime/internalization/evaluator-output.d.ts +7 -17
  234. package/core/dist/runtime/internalization/evaluator-output.d.ts.map +1 -1
  235. package/core/dist/runtime/internalization/evaluator-output.js +2 -2
  236. package/core/dist/runtime/internalization/evaluator-output.js.map +1 -1
  237. package/core/dist/runtime/internalization/evaluator-prompt-builder.d.ts +3 -9
  238. package/core/dist/runtime/internalization/evaluator-prompt-builder.d.ts.map +1 -1
  239. package/core/dist/runtime/internalization/evaluator-prompt-builder.js +1 -1
  240. package/core/dist/runtime/internalization/evaluator-prompt-builder.js.map +1 -1
  241. package/core/dist/runtime/internalization/formation-context.d.ts +4 -6
  242. package/core/dist/runtime/internalization/formation-context.d.ts.map +1 -1
  243. package/core/dist/runtime/internalization/formation-context.js +3 -3
  244. package/core/dist/runtime/internalization/formation-context.js.map +1 -1
  245. package/core/dist/runtime/internalization/index.d.ts +2 -4
  246. package/core/dist/runtime/internalization/index.d.ts.map +1 -1
  247. package/core/dist/runtime/internalization/index.js +8 -1
  248. package/core/dist/runtime/internalization/index.js.map +1 -1
  249. package/core/dist/runtime/internalization/intake-to-internalization-bridge.d.ts +2 -1
  250. package/core/dist/runtime/internalization/intake-to-internalization-bridge.d.ts.map +1 -1
  251. package/core/dist/runtime/internalization/intent-contract.d.ts +2 -1
  252. package/core/dist/runtime/internalization/intent-contract.d.ts.map +1 -1
  253. package/core/dist/runtime/internalization/internalization-job-graph.d.ts +1 -1
  254. package/core/dist/runtime/internalization/internalization-job-graph.d.ts.map +1 -1
  255. package/core/dist/runtime/internalization/internalization-route.d.ts +2 -1
  256. package/core/dist/runtime/internalization/internalization-route.d.ts.map +1 -1
  257. package/core/dist/runtime/internalization/owner-decision-review.d.ts +3 -2
  258. package/core/dist/runtime/internalization/owner-decision-review.d.ts.map +1 -1
  259. package/core/dist/runtime/internalization/owner-resolution-service.d.ts +2 -1
  260. package/core/dist/runtime/internalization/owner-resolution-service.d.ts.map +1 -1
  261. package/core/dist/runtime/internalization/owner-retry.d.ts +2 -1
  262. package/core/dist/runtime/internalization/owner-retry.d.ts.map +1 -1
  263. package/core/dist/runtime/internalization/owner-review.d.ts +2 -21
  264. package/core/dist/runtime/internalization/owner-review.d.ts.map +1 -1
  265. package/core/dist/runtime/internalization/owner-review.js +2 -2
  266. package/core/dist/runtime/internalization/owner-review.js.map +1 -1
  267. package/core/dist/runtime/internalization/peer-runner-contracts.d.ts +2 -5
  268. package/core/dist/runtime/internalization/peer-runner-contracts.d.ts.map +1 -1
  269. package/core/dist/runtime/internalization/peer-runner-contracts.js +1 -1
  270. package/core/dist/runtime/internalization/peer-runner-contracts.js.map +1 -1
  271. package/core/dist/runtime/internalization/philosopher-output.d.ts +0 -8
  272. package/core/dist/runtime/internalization/philosopher-output.d.ts.map +1 -1
  273. package/core/dist/runtime/internalization/philosopher-output.js +1 -1
  274. package/core/dist/runtime/internalization/philosopher-output.js.map +1 -1
  275. package/core/dist/runtime/internalization/philosopher-prompt-builder.d.ts +3 -2
  276. package/core/dist/runtime/internalization/philosopher-prompt-builder.d.ts.map +1 -1
  277. package/core/dist/runtime/internalization/pitask-metadata.d.ts +2 -2
  278. package/core/dist/runtime/internalization/pitask-metadata.d.ts.map +1 -1
  279. package/core/dist/runtime/internalization/repair-replay-resolver.d.ts +4 -3
  280. package/core/dist/runtime/internalization/repair-replay-resolver.d.ts.map +1 -1
  281. package/core/dist/runtime/internalization/rollout-reviewer-output.d.ts +2 -3
  282. package/core/dist/runtime/internalization/rollout-reviewer-output.d.ts.map +1 -1
  283. package/core/dist/runtime/internalization/rollout-reviewer-output.js.map +1 -1
  284. package/core/dist/runtime/internalization/rollout-reviewer-prompt-builder.d.ts +0 -1
  285. package/core/dist/runtime/internalization/rollout-reviewer-prompt-builder.d.ts.map +1 -1
  286. package/core/dist/runtime/internalization/rollout-reviewer-prompt-builder.js +1 -1
  287. package/core/dist/runtime/internalization/rollout-reviewer-prompt-builder.js.map +1 -1
  288. package/core/dist/runtime/internalization/router-context-reconstruction.d.ts +3 -3
  289. package/core/dist/runtime/internalization/router-context-reconstruction.d.ts.map +1 -1
  290. package/core/dist/runtime/internalization/rule-activation-contract.d.ts +3 -2
  291. package/core/dist/runtime/internalization/rule-activation-contract.d.ts.map +1 -1
  292. package/core/dist/runtime/internalization/rule-reliability-validation.d.ts +13 -18
  293. package/core/dist/runtime/internalization/rule-reliability-validation.d.ts.map +1 -1
  294. package/core/dist/runtime/internalization/rule-reliability-validation.js +43 -1
  295. package/core/dist/runtime/internalization/rule-reliability-validation.js.map +1 -1
  296. package/core/dist/runtime/internalization/scribe-output.d.ts +2 -15
  297. package/core/dist/runtime/internalization/scribe-output.d.ts.map +1 -1
  298. package/core/dist/runtime/internalization/scribe-output.js +2 -2
  299. package/core/dist/runtime/internalization/scribe-output.js.map +1 -1
  300. package/core/dist/runtime/internalization/scribe-prompt-builder.d.ts +3 -3
  301. package/core/dist/runtime/internalization/scribe-prompt-builder.d.ts.map +1 -1
  302. package/core/dist/runtime/internalization/scribe-prompt-builder.js +0 -1
  303. package/core/dist/runtime/internalization/scribe-prompt-builder.js.map +1 -1
  304. package/core/dist/runtime/internalization/split-diagnostician-runner.d.ts +17 -1
  305. package/core/dist/runtime/internalization/split-diagnostician-runner.d.ts.map +1 -1
  306. package/core/dist/runtime/internalization/split-diagnostician-runner.js +98 -3
  307. package/core/dist/runtime/internalization/split-diagnostician-runner.js.map +1 -1
  308. package/core/dist/runtime/internalization/textual-basis-anchor.d.ts +3 -6
  309. package/core/dist/runtime/internalization/textual-basis-anchor.d.ts.map +1 -1
  310. package/core/dist/runtime/internalization/textual-basis-anchor.js +2 -2
  311. package/core/dist/runtime/internalization/textual-basis-anchor.js.map +1 -1
  312. package/core/dist/runtime/language-directive.d.ts +2 -1
  313. package/core/dist/runtime/language-directive.d.ts.map +1 -1
  314. package/core/dist/runtime/owner-decision/owner-decision-view-contract.d.ts +3 -29
  315. package/core/dist/runtime/owner-decision/owner-decision-view-contract.d.ts.map +1 -1
  316. package/core/dist/runtime/owner-decision/owner-decision-view-contract.js +4 -5
  317. package/core/dist/runtime/owner-decision/owner-decision-view-contract.js.map +1 -1
  318. package/core/dist/runtime/owner-decision/owner-decision-view.d.ts +0 -49
  319. package/core/dist/runtime/owner-decision/owner-decision-view.d.ts.map +1 -1
  320. package/core/dist/runtime/owner-decision/owner-decision-view.js +5 -5
  321. package/core/dist/runtime/owner-decision/owner-decision-view.js.map +1 -1
  322. package/core/dist/runtime/owner-decision/semantic-selector.d.ts +3 -2
  323. package/core/dist/runtime/owner-decision/semantic-selector.d.ts.map +1 -1
  324. package/core/dist/runtime/owner-identity.d.ts +12 -1
  325. package/core/dist/runtime/owner-identity.d.ts.map +1 -1
  326. package/core/dist/runtime/owner-identity.js +19 -1
  327. package/core/dist/runtime/owner-identity.js.map +1 -1
  328. package/core/dist/runtime/pain-ingress-payload.d.ts +0 -39
  329. package/core/dist/runtime/pain-ingress-payload.d.ts.map +1 -1
  330. package/core/dist/runtime/pain-ingress-payload.js +4 -4
  331. package/core/dist/runtime/pain-ingress-payload.js.map +1 -1
  332. package/core/dist/runtime/pain-ingress.d.ts +1 -1
  333. package/core/dist/runtime/pain-ingress.d.ts.map +1 -1
  334. package/core/dist/runtime/pain-ingress.js.map +1 -1
  335. package/core/dist/runtime/pain-signal-bridge.d.ts +0 -2
  336. package/core/dist/runtime/pain-signal-bridge.d.ts.map +1 -1
  337. package/core/dist/runtime/pain-signal-bridge.js +1 -1
  338. package/core/dist/runtime/pain-signal-bridge.js.map +1 -1
  339. package/core/dist/runtime/pain-signal-runtime-factory.d.ts +3 -3
  340. package/core/dist/runtime/pain-signal-runtime-factory.d.ts.map +1 -1
  341. package/core/dist/runtime/pain-signal-runtime-factory.js +1 -1
  342. package/core/dist/runtime/pain-signal-runtime-factory.js.map +1 -1
  343. package/core/dist/runtime/principle-reuse/reuse-proposal.d.ts +3 -2
  344. package/core/dist/runtime/principle-reuse/reuse-proposal.d.ts.map +1 -1
  345. package/core/dist/runtime/principle-reuse/reuse-retrieval.d.ts +0 -10
  346. package/core/dist/runtime/principle-reuse/reuse-retrieval.d.ts.map +1 -1
  347. package/core/dist/runtime/principle-reuse/reuse-retrieval.js +1 -1
  348. package/core/dist/runtime/principle-reuse/reuse-retrieval.js.map +1 -1
  349. package/core/dist/runtime/principle-reuse/reuse-shortlist.d.ts +1 -8
  350. package/core/dist/runtime/principle-reuse/reuse-shortlist.d.ts.map +1 -1
  351. package/core/dist/runtime/principle-reuse/reuse-shortlist.js +1 -1
  352. package/core/dist/runtime/principle-reuse/reuse-shortlist.js.map +1 -1
  353. package/core/dist/runtime/product-telemetry/snapshot-contract.d.ts +3 -2
  354. package/core/dist/runtime/product-telemetry/snapshot-contract.d.ts.map +1 -1
  355. package/core/dist/runtime/recovery-sweep-service.d.ts +7 -0
  356. package/core/dist/runtime/recovery-sweep-service.d.ts.map +1 -1
  357. package/core/dist/runtime/recovery-sweep-service.js +1 -0
  358. package/core/dist/runtime/recovery-sweep-service.js.map +1 -1
  359. package/core/dist/runtime/runner/base-peer-runner.d.ts +32 -0
  360. package/core/dist/runtime/runner/base-peer-runner.d.ts.map +1 -1
  361. package/core/dist/runtime/runner/base-peer-runner.js +168 -16
  362. package/core/dist/runtime/runner/base-peer-runner.js.map +1 -1
  363. package/core/dist/runtime/runner/default-validator.d.ts +0 -1
  364. package/core/dist/runtime/runner/default-validator.d.ts.map +1 -1
  365. package/core/dist/runtime/runner/default-validator.js +11 -3
  366. package/core/dist/runtime/runner/default-validator.js.map +1 -1
  367. package/core/dist/runtime/runner/peer-runner-types.d.ts +11 -0
  368. package/core/dist/runtime/runner/peer-runner-types.d.ts.map +1 -1
  369. package/core/dist/runtime/storage-paths.d.ts +15 -0
  370. package/core/dist/runtime/storage-paths.d.ts.map +1 -0
  371. package/core/dist/runtime/storage-paths.js +15 -0
  372. package/core/dist/runtime/storage-paths.js.map +1 -0
  373. package/core/dist/runtime/store/artifact/index.d.ts +1 -1
  374. package/core/dist/runtime/store/artifact/index.d.ts.map +1 -1
  375. package/core/dist/runtime/store/candidate/admission-document.d.ts +4 -3
  376. package/core/dist/runtime/store/candidate/admission-document.d.ts.map +1 -1
  377. package/core/dist/runtime/store/commit/index.d.ts +0 -1
  378. package/core/dist/runtime/store/commit/index.d.ts.map +1 -1
  379. package/core/dist/runtime/store/commit/index.js.map +1 -1
  380. package/core/dist/runtime/store/context/promoted-evidence-reader.d.ts +59 -0
  381. package/core/dist/runtime/store/context/promoted-evidence-reader.d.ts.map +1 -0
  382. package/core/dist/runtime/store/context/promoted-evidence-reader.js +201 -0
  383. package/core/dist/runtime/store/context/promoted-evidence-reader.js.map +1 -0
  384. package/core/dist/runtime/store/context/sqlite-context-assembler.d.ts.map +1 -1
  385. package/core/dist/runtime/store/context/sqlite-context-assembler.js +43 -2
  386. package/core/dist/runtime/store/context/sqlite-context-assembler.js.map +1 -1
  387. package/core/dist/runtime/store/design-gate/sqlite-design-gate-store.d.ts +4 -3
  388. package/core/dist/runtime/store/design-gate/sqlite-design-gate-store.d.ts.map +1 -1
  389. package/core/dist/runtime/store/lifecycle/lease-manager.d.ts +2 -1
  390. package/core/dist/runtime/store/lifecycle/lease-manager.d.ts.map +1 -1
  391. package/core/dist/runtime/store/runtime-state-manager.d.ts +1 -2
  392. package/core/dist/runtime/store/runtime-state-manager.d.ts.map +1 -1
  393. package/core/dist/runtime/store/runtime-state-manager.js.map +1 -1
  394. package/core/dist/runtime/store/sqlite-connection.d.ts +2 -1
  395. package/core/dist/runtime/store/sqlite-connection.d.ts.map +1 -1
  396. package/core/dist/runtime/store/sqlite-connection.js +96 -37
  397. package/core/dist/runtime/store/sqlite-connection.js.map +1 -1
  398. package/core/dist/runtime/store/task/sqlite-family-reopen.d.ts +2 -1
  399. package/core/dist/runtime/store/task/sqlite-family-reopen.d.ts.map +1 -1
  400. package/core/dist/runtime/store/task/sqlite-task-store.d.ts +2 -1
  401. package/core/dist/runtime/store/task/sqlite-task-store.d.ts.map +1 -1
  402. package/core/dist/runtime/story-a-demo.d.ts.map +1 -1
  403. package/core/dist/runtime/story-a-demo.js +4 -1
  404. package/core/dist/runtime/story-a-demo.js.map +1 -1
  405. package/core/dist/runtime/tools/agent-tool-contract.d.ts +1 -2
  406. package/core/dist/runtime/tools/agent-tool-contract.d.ts.map +1 -1
  407. package/core/dist/runtime/tools/agent-tool-contract.js +0 -2
  408. package/core/dist/runtime/tools/agent-tool-contract.js.map +1 -1
  409. package/core/dist/runtime/tools/artificer-l2-tool-contract.d.ts +0 -2
  410. package/core/dist/runtime/tools/artificer-l2-tool-contract.d.ts.map +1 -1
  411. package/core/dist/runtime/tools/artificer-l2-tool-contract.js +0 -2
  412. package/core/dist/runtime/tools/artificer-l2-tool-contract.js.map +1 -1
  413. package/core/dist/runtime/types/event-payload.d.ts +0 -2
  414. package/core/dist/runtime/types/event-payload.d.ts.map +1 -1
  415. package/core/dist/runtime/types/event-payload.js.map +1 -1
  416. package/core/dist/runtime/types/evidence-chain-contract.d.ts +66 -2
  417. package/core/dist/runtime/types/evidence-chain-contract.d.ts.map +1 -1
  418. package/core/dist/runtime/types/evidence-chain-contract.js +69 -4
  419. package/core/dist/runtime/types/evidence-chain-contract.js.map +1 -1
  420. package/core/dist/runtime/types/hygiene-types.d.ts +0 -6
  421. package/core/dist/runtime/types/hygiene-types.d.ts.map +1 -1
  422. package/core/dist/runtime/types/hygiene-types.js.map +1 -1
  423. package/core/dist/runtime/types/index.d.ts +1 -1
  424. package/core/dist/runtime/types/index.d.ts.map +1 -1
  425. package/core/dist/runtime/types/index.js.map +1 -1
  426. package/core/dist/runtime/types/intervention-evidence-contract.d.ts +5 -5
  427. package/core/dist/runtime/types/intervention-evidence-contract.d.ts.map +1 -1
  428. package/core/dist/runtime/types/intervention-evidence-contract.js +0 -2
  429. package/core/dist/runtime/types/intervention-evidence-contract.js.map +1 -1
  430. package/core/dist/runtime/types/principle-dependency.d.ts +0 -2
  431. package/core/dist/runtime/types/principle-dependency.d.ts.map +1 -1
  432. package/core/dist/runtime/types/principle-dependency.js.map +1 -1
  433. package/core/dist/runtime/types/principle-lifecycle-event.d.ts +0 -2
  434. package/core/dist/runtime/types/principle-lifecycle-event.d.ts.map +1 -1
  435. package/core/dist/runtime/types/principle-lifecycle-event.js.map +1 -1
  436. package/core/dist/runtime/types/principle-schema.d.ts +0 -26
  437. package/core/dist/runtime/types/principle-schema.d.ts.map +1 -1
  438. package/core/dist/runtime/types/principle-schema.js +2 -2
  439. package/core/dist/runtime/types/principle-schema.js.map +1 -1
  440. package/core/dist/runtime/types/principle-tree-store.d.ts +0 -2
  441. package/core/dist/runtime/types/principle-tree-store.d.ts.map +1 -1
  442. package/core/dist/runtime/types/principle-tree-store.js.map +1 -1
  443. package/core/dist/runtime/types/principle-value-metrics.d.ts +0 -2
  444. package/core/dist/runtime/types/principle-value-metrics.d.ts.map +1 -1
  445. package/core/dist/runtime/types/principle-value-metrics.js.map +1 -1
  446. package/core/dist/runtime/types/rule-candidate-binding.d.ts +2 -1
  447. package/core/dist/runtime/types/rule-candidate-binding.d.ts.map +1 -1
  448. package/core/dist/telemetry-event.d.ts +2 -2
  449. package/core/dist/telemetry-event.d.ts.map +1 -1
  450. package/core/dist/telemetry-event.js +11 -0
  451. package/core/dist/telemetry-event.js.map +1 -1
  452. package/core/package.json +5 -1
  453. package/dist/installer.d.ts +14 -0
  454. package/dist/installer.d.ts.map +1 -1
  455. package/dist/installer.js +36 -77
  456. package/dist/installer.js.map +1 -1
  457. package/dist/installers/codex-host-installer.d.ts +9 -0
  458. package/dist/installers/codex-host-installer.d.ts.map +1 -1
  459. package/dist/installers/codex-host-installer.js +35 -1
  460. package/dist/installers/codex-host-installer.js.map +1 -1
  461. package/dist/mvp-config.js +1 -1
  462. package/dist/mvp-config.js.map +1 -1
  463. package/dist/update/data-compatibility.d.ts.map +1 -1
  464. package/dist/update/data-compatibility.js +3 -1
  465. package/dist/update/data-compatibility.js.map +1 -1
  466. package/dist/update/product-identity.d.ts.map +1 -1
  467. package/dist/update/product-identity.js +5 -1
  468. package/dist/update/product-identity.js.map +1 -1
  469. package/dist/update/release-manager.d.ts +5 -0
  470. package/dist/update/release-manager.d.ts.map +1 -1
  471. package/dist/update/release-manager.js +11 -1
  472. package/dist/update/release-manager.js.map +1 -1
  473. package/host-runtime/dist/active-principle-prompt.d.ts +7 -2
  474. package/host-runtime/dist/active-principle-prompt.js +80 -13
  475. package/host-runtime/dist/adaptive-decision-protocol.d.ts +36 -21
  476. package/host-runtime/dist/adaptive-decision-protocol.js +79 -34
  477. package/host-runtime/dist/adaptive-priority-provider.d.ts +2 -1
  478. package/host-runtime/dist/adaptive-priority-provider.js +6 -5
  479. package/host-runtime/dist/adaptive-selection.d.ts +4 -0
  480. package/host-runtime/dist/adaptive-selection.js +12 -4
  481. package/host-runtime/dist/cli-recovery-probe.d.ts +42 -1
  482. package/host-runtime/dist/cli-recovery-probe.js +16 -3
  483. package/host-runtime/dist/codex-disclosure.d.ts +12 -7
  484. package/host-runtime/dist/codex-disclosure.js +12 -7
  485. package/host-runtime/dist/conversation-ingestion/pipeline.d.ts +8 -29
  486. package/host-runtime/dist/conversation-ingestion/pipeline.js +45 -3
  487. package/host-runtime/dist/conversation-ingestion/text-policy.d.ts +3 -4
  488. package/host-runtime/dist/conversation-ingestion/text-policy.js +3 -4
  489. package/host-runtime/dist/governance-observation-store.d.ts +38 -5
  490. package/host-runtime/dist/governance-observation-store.js +63 -5
  491. package/host-runtime/dist/index.js +5 -2
  492. package/host-runtime/dist/production-rulehost-gate.d.ts +36 -1
  493. package/host-runtime/dist/production-rulehost-gate.js +91 -1
  494. package/host-runtime/package.json +1 -1
  495. package/package.json +2 -2
  496. package/pd-cli/dist/commands/candidate.d.ts.map +1 -1
  497. package/pd-cli/dist/commands/candidate.js +117 -3
  498. package/pd-cli/dist/commands/candidate.js.map +1 -1
  499. package/pd-cli/dist/commands/console.d.ts +0 -4
  500. package/pd-cli/dist/commands/console.d.ts.map +1 -1
  501. package/pd-cli/dist/commands/console.js +4 -67
  502. package/pd-cli/dist/commands/console.js.map +1 -1
  503. package/pd-cli/dist/commands/diagnose.js +1 -1
  504. package/pd-cli/dist/commands/diagnose.js.map +1 -1
  505. package/pd-cli/dist/commands/health-ingestion.d.ts +96 -0
  506. package/pd-cli/dist/commands/health-ingestion.d.ts.map +1 -0
  507. package/pd-cli/dist/commands/health-ingestion.js +473 -0
  508. package/pd-cli/dist/commands/health-ingestion.js.map +1 -0
  509. package/pd-cli/dist/commands/health.d.ts.map +1 -1
  510. package/pd-cli/dist/commands/health.js +10 -0
  511. package/pd-cli/dist/commands/health.js.map +1 -1
  512. package/pd-cli/dist/commands/runtime-activation.d.ts.map +1 -1
  513. package/pd-cli/dist/commands/runtime-activation.js +4 -8
  514. package/pd-cli/dist/commands/runtime-activation.js.map +1 -1
  515. package/pd-cli/dist/commands/runtime-recovery-failed-tasks.d.ts.map +1 -1
  516. package/pd-cli/dist/commands/runtime-recovery-failed-tasks.js +114 -63
  517. package/pd-cli/dist/commands/runtime-recovery-failed-tasks.js.map +1 -1
  518. package/pd-cli/dist/program.d.ts.map +1 -1
  519. package/pd-cli/dist/program.js +0 -8
  520. package/pd-cli/dist/program.js.map +1 -1
  521. package/pd-cli/dist/services/console-launcher.d.ts +1 -18
  522. package/pd-cli/dist/services/console-launcher.d.ts.map +1 -1
  523. package/pd-cli/dist/services/console-launcher.js +4 -92
  524. package/pd-cli/dist/services/console-launcher.js.map +1 -1
  525. package/pd-cli/dist/services/demo-story-a-runner.js +1 -1
  526. package/pd-cli/dist/services/demo-story-a-runner.js.map +1 -1
  527. package/pd-cli/dist/services/version-report.d.ts.map +1 -1
  528. package/pd-cli/dist/services/version-report.js +5 -1
  529. package/pd-cli/dist/services/version-report.js.map +1 -1
  530. package/pd-cli/package.json +1 -1
  531. package/plugin/dist/bundle.js +562 -534
  532. package/plugin/dist/core/experiment-workspace-guard.d.ts +25 -0
  533. package/plugin/dist/index.d.ts +1 -1
  534. package/plugin/dist/openclaw.plugin.json +1 -1
  535. package/plugin/openclaw.plugin.json +1 -1
  536. package/plugin/package.json +1 -1
  537. package/release-manager/dist/installer.js +36 -77
  538. package/release-manager/dist/installers/codex-host-installer.js +35 -1
  539. package/release-manager/dist/mvp-config.js +1 -1
  540. package/release-manager/dist/update/product-identity.js +5 -1
  541. package/release-manager/dist/update/release-manager.js +11 -1
  542. package/release-manager/package.json +1 -1
  543. package/workbuddy-adapter/dist/index.d.ts +1 -1
  544. package/workbuddy-adapter/dist/index.js +1 -1
  545. package/workbuddy-adapter/dist/ingestion/catch-up.d.ts +11 -0
  546. package/workbuddy-adapter/dist/ingestion/catch-up.js +7 -2
  547. package/workbuddy-adapter/dist/ingestion/index.d.ts +1 -1
  548. package/workbuddy-adapter/dist/ingestion/index.js +1 -1
  549. package/workbuddy-adapter/package.json +1 -1
  550. package/console/dist/server/config/AuthConfig.d.ts +0 -14
  551. package/console/dist/server/config/AuthConfig.js +0 -42
package/README.md CHANGED
@@ -84,18 +84,18 @@ The installer delivers a local pd-console web UI for principle review.
84
84
  ### Starting the Console
85
85
 
86
86
  ```bash
87
- pd console --workspace "/path/to/workspace" --no-auth
87
+ pd console --workspace "/path/to/workspace"
88
88
  ```
89
89
 
90
- The console listens on **127.0.0.1 only** (loopback) — it is not accessible from other machines on the network. When using `--no-auth`, loopback binding is enforced; the server will refuse to start if `--no-auth` is combined with a non-loopback host.
90
+ The console listens on **127.0.0.1 only** (loopback) — it is not accessible from other machines on the network. Non-loopback `--host` values are refused; there is no flag to override this.
91
91
 
92
92
  Open `http://127.0.0.1:3100` in your browser to access the console.
93
93
 
94
94
  ### Console Security
95
95
 
96
- - Default binding: `127.0.0.1` (loopback only)
97
- - `--no-auth` is only permitted with loopback binding
98
- - For network access, use `--host <ip>` with `--token <secret>` or set `PD_CONSOLE_TOKEN` environment variable
96
+ - Binding is unconditionally loopback; a non-loopback `--host` refuses to start
97
+ - There is no token or password: opening the console is equivalent to using the current local OS session
98
+ - Cross-site requests are rejected via the `Host` / `Origin` / `Sec-Fetch-Site` allow-list; HTML responses are sent with `X-Frame-Options: DENY`
99
99
 
100
100
  ## Rerun / Reinstall
101
101
 
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "productVersion": "2.8.6",
4
- "sourceCommit": "5c7389e72a6409efb00891327a63dfc01a2009cb"
4
+ "sourceCommit": "d70d277260da6f9ef2fcbecb622501cea504a12c"
5
5
  }
@@ -3,23 +3,25 @@
3
3
  * Slice A; ADR-0020 §11.2 + G1 probe report §9).
4
4
  *
5
5
  * The G1 contract baseline is: minimum supported Codex 0.148.0, verified
6
- * on-device at 0.150.1 and re-verified at 0.162.1 (PRI-953, 2026-10-13:
7
- * on-device probe against real codex-cli 0.162.1 — 125/125 captured hook
8
- * payloads decode, 8/8 real rollout transcripts ingest with only designed
9
- * unknown-record-type skips; sanitized fixtures:
10
- * tests/fixtures/g1-contract/hook-payloads/v0.162.1/ and
11
- * transcripts/v0.162.1-tool-final-turn.jsonl). The transcript itself carries
12
- * `session_meta.payload.cli_version`, which is the version signal available
13
- * inside a hook subprocess (hook payloads carry no version field — G1
14
- * fixture contract).
6
+ * on-device at 0.150.1, re-verified at 0.162.1 (PRI-953, 2026-10-13), and
7
+ * re-verified again at 0.167.0-alpha.4.1 (2026-11-13): the installed adapter
8
+ * decoded a real 4.4 MB rollout transcript (48 observations, including
9
+ * assistant turns) and a real Stop payload from that device, and the
10
+ * sanitized capture is pinned as
11
+ * tests/fixtures/g1-contract/transcripts/v0.167.0-alpha.4.1-tool-final-turn.jsonl.
12
+ * The transcript itself carries `session_meta.payload.cli_version`, which is
13
+ * the version signal available inside a hook subprocess (hook payloads carry
14
+ * no version field — G1 fixture contract).
15
15
  *
16
- * Older-than-minimum and newer-than-verified versions both degrade
17
- * explicitly; an unknown version must never silently guess record fields.
16
+ * Version comparison is on the core `MAJOR.MINOR.PATCH` triplet only:
17
+ * prerelease/build suffixes describe a distribution channel, not a different
18
+ * record contract, and the contract itself is pinned by the fixture probe.
19
+ * An unknown or malformed version must never silently guess record fields.
18
20
  * Adopting a newer Codex version requires re-running the contract probe and
19
21
  * refreshing the fixtures (G1 report §9 drift-detection boundary).
20
22
  */
21
23
  export declare const CODEX_INGESTION_MIN_VERSION = "0.148.0";
22
- export declare const CODEX_INGESTION_VERIFIED_VERSION = "0.162.1";
24
+ export declare const CODEX_INGESTION_VERIFIED_VERSION = "0.167.0";
23
25
  export type CodexVersionClassification = {
24
26
  status: 'supported';
25
27
  } | {
@@ -3,36 +3,35 @@
3
3
  * Slice A; ADR-0020 §11.2 + G1 probe report §9).
4
4
  *
5
5
  * The G1 contract baseline is: minimum supported Codex 0.148.0, verified
6
- * on-device at 0.150.1 and re-verified at 0.162.1 (PRI-953, 2026-10-13:
7
- * on-device probe against real codex-cli 0.162.1 — 125/125 captured hook
8
- * payloads decode, 8/8 real rollout transcripts ingest with only designed
9
- * unknown-record-type skips; sanitized fixtures:
10
- * tests/fixtures/g1-contract/hook-payloads/v0.162.1/ and
11
- * transcripts/v0.162.1-tool-final-turn.jsonl). The transcript itself carries
12
- * `session_meta.payload.cli_version`, which is the version signal available
13
- * inside a hook subprocess (hook payloads carry no version field — G1
14
- * fixture contract).
6
+ * on-device at 0.150.1, re-verified at 0.162.1 (PRI-953, 2026-10-13), and
7
+ * re-verified again at 0.167.0-alpha.4.1 (2026-11-13): the installed adapter
8
+ * decoded a real 4.4 MB rollout transcript (48 observations, including
9
+ * assistant turns) and a real Stop payload from that device, and the
10
+ * sanitized capture is pinned as
11
+ * tests/fixtures/g1-contract/transcripts/v0.167.0-alpha.4.1-tool-final-turn.jsonl.
12
+ * The transcript itself carries `session_meta.payload.cli_version`, which is
13
+ * the version signal available inside a hook subprocess (hook payloads carry
14
+ * no version field — G1 fixture contract).
15
15
  *
16
- * Older-than-minimum and newer-than-verified versions both degrade
17
- * explicitly; an unknown version must never silently guess record fields.
16
+ * Version comparison is on the core `MAJOR.MINOR.PATCH` triplet only:
17
+ * prerelease/build suffixes describe a distribution channel, not a different
18
+ * record contract, and the contract itself is pinned by the fixture probe.
19
+ * An unknown or malformed version must never silently guess record fields.
18
20
  * Adopting a newer Codex version requires re-running the contract probe and
19
21
  * refreshing the fixtures (G1 report §9 drift-detection boundary).
20
22
  */
21
23
  export const CODEX_INGESTION_MIN_VERSION = '0.148.0';
22
- export const CODEX_INGESTION_VERIFIED_VERSION = '0.162.1';
24
+ export const CODEX_INGESTION_VERIFIED_VERSION = '0.167.0';
23
25
  export const CODEX_VERSION_NEXT_ACTION = 'rerun the Codex contract probe / update supported fixtures (docs/architecture/CODEX_G1_CONTRACT_PROBE_REPORT.md §9)';
24
- function isDigits(value) {
25
- return value.length > 0 && /^[0-9]+$/.test(value);
26
- }
26
+ /** `1.2.3`, optional `-prerelease` / `+build`; anything else is not a version signal we trust. */
27
+ const SEMVER_PATTERN = /^(\d+)\.(\d+)\.(\d+)(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?$/;
27
28
  function parseSemver(value) {
28
- const parts = value.trim().split('.');
29
- if (parts.length < 3)
29
+ const match = SEMVER_PATTERN.exec(value.trim());
30
+ if (match === null)
30
31
  return null;
31
- const [major, minor, patch] = parts;
32
+ const [, major, minor, patch] = match;
32
33
  if (major === undefined || minor === undefined || patch === undefined)
33
34
  return null;
34
- if (!isDigits(major) || !isDigits(minor) || !isDigits(patch))
35
- return null;
36
35
  return { major: Number(major), minor: Number(minor), patch: Number(patch) };
37
36
  }
38
37
  function compareSemver(a, b) {
@@ -1,4 +1,4 @@
1
- import { ingestGovernanceObservations, recordVerifiedToolOutcomes, runConversationIngestion, } from '@principles/host-runtime';
1
+ import { CODEX_INGESTION_DISCLOSURE_VERSION, ingestGovernanceObservations, readConversationIngestionConsent, recordVerifiedToolOutcomes, resolveTextPolicy, runConversationIngestion, } from '@principles/host-runtime';
2
2
  import { createNodeTranscriptPort } from './transcript-decoder.js';
3
3
  import { createCodexTranscriptSource } from './transcript-source.js';
4
4
  import { resolveCodexHome } from './codex-home.js';
@@ -13,6 +13,19 @@ export function setCodexTranscriptPortForTest(port) {
13
13
  function activeTranscriptPort(options) {
14
14
  return options.port ?? activePort ?? createNodeTranscriptPort();
15
15
  }
16
+ /**
17
+ * PRI-1179: the consent-tiered `visible_text` bound for Codex. The full tier is
18
+ * reachable ONLY from a record that is `granted` against the CURRENT frozen
19
+ * disclosure (`CODEX_INGESTION_DISCLOSURE_VERSION`); an absent, unreadable,
20
+ * revoked or older-disclosure record resolves to the bounded tier. An
21
+ * unreadable ledger resolves narrow on purpose — the health surface reports the
22
+ * malformed record loudly, and no content is lost by staying bounded.
23
+ */
24
+ function resolveCodexTextPolicy(workspaceDir) {
25
+ const read = readConversationIngestionConsent(workspaceDir, 'codex');
26
+ const record = read.ok ? read.record : null;
27
+ return resolveTextPolicy({ decision: record?.decision ?? 'not_present', disclosureVersion: record?.disclosureVersion ?? null }, CODEX_INGESTION_DISCLOSURE_VERSION);
28
+ }
16
29
  function ingestLiveObservation({ fields, rolloutIdentity, workspaceDir, now }) {
17
30
  const nowIso = now.toISOString();
18
31
  let observation = null;
@@ -54,6 +67,11 @@ function ingestLiveObservation({ fields, rolloutIdentity, workspaceDir, now }) {
54
67
  }
55
68
  const result = ingestGovernanceObservations({
56
69
  workspaceDir,
70
+ // PRI-1179 P1: the LIVE path must apply the same consent-tiered bound as
71
+ // the transcript replay. A narrower live bound stores a truncated
72
+ // user_turn, and the replay then sees a content mismatch on the same
73
+ // logical key — a lineage conflict that stalls the checkpoint forever.
74
+ maxVisibleTextChars: resolveCodexTextPolicy(workspaceDir).maxChars,
57
75
  observations: [observation],
58
76
  now,
59
77
  });
@@ -147,11 +165,14 @@ function ingestTranscriptDelta({ fallbackRootSessionId, transcriptPath, workspac
147
165
  // codex_conversation_ingestion) is checked by pd-hook / catch-up BEFORE
148
166
  // this module is entered, and the consent LEDGER remains the governance
149
167
  // record the setup flow enforces (v2 authority model — the runtime gate
150
- // reads only the flags). The pipeline's consent gate therefore receives
151
- // the setup-flow invariant 'granted' until the P3 full-text batch wires
152
- // the real v3 record + disclosureVersion tier.
168
+ // reads only the flags). The pipeline's consent gate therefore keeps
169
+ // receiving the setup-flow invariant 'granted'.
153
170
  flags: { ingestionEnabled: true },
154
171
  consent: { decision: 'granted' },
172
+ // PRI-1179: the STORED TEXT bound is a separate fact from the gate above —
173
+ // it comes from the recorded v3 consent record, so a stale disclosure or a
174
+ // revoke can only ever narrow what is stored, never widen it.
175
+ textPolicy: resolveCodexTextPolicy(workspaceDir),
155
176
  now,
156
177
  port,
157
178
  degradeTexts: CODEX_PIPELINE_DEGRADE_TEXTS,
@@ -10,9 +10,11 @@
10
10
  * execution facts anchored on the `event_msg item_completed
11
11
  * CommandExecution` record whose `item.id` IS the hook `tool_use_id` id
12
12
  * space (the G1-verified bridge; the model-level `call_id` is a different
13
- * space). Hidden reasoning, system/developer prompts, world_state,
14
- * host-injected context, and unknown record bodies are identified by shape
15
- * and dropped before persistence — never projected, logged, or emitted.
13
+ * space). Hidden reasoning BODIES (encrypted_content) are never read — only the
14
+ * optional plaintext `summary` is projected as a `reasoning` observation
15
+ * (PRI-1179). System/developer prompts, world_state, host-injected context,
16
+ * and unknown record bodies are identified by shape and dropped before
17
+ * persistence — never projected, logged, or emitted.
16
18
  *
17
19
  * Failure classes are distinct (SPEC §14): an incomplete final line (no
18
20
  * trailing newline at EOF) is a transient append/flush boundary — the
@@ -10,9 +10,11 @@
10
10
  * execution facts anchored on the `event_msg item_completed
11
11
  * CommandExecution` record whose `item.id` IS the hook `tool_use_id` id
12
12
  * space (the G1-verified bridge; the model-level `call_id` is a different
13
- * space). Hidden reasoning, system/developer prompts, world_state,
14
- * host-injected context, and unknown record bodies are identified by shape
15
- * and dropped before persistence — never projected, logged, or emitted.
13
+ * space). Hidden reasoning BODIES (encrypted_content) are never read — only the
14
+ * optional plaintext `summary` is projected as a `reasoning` observation
15
+ * (PRI-1179). System/developer prompts, world_state, host-injected context,
16
+ * and unknown record bodies are identified by shape and dropped before
17
+ * persistence — never projected, logged, or emitted.
16
18
  *
17
19
  * Failure classes are distinct (SPEC §14): an incomplete final line (no
18
20
  * trailing newline at EOF) is a transient append/flush boundary — the
@@ -123,6 +125,28 @@ function joinItemText(item) {
123
125
  }
124
126
  return parts.length > 0 ? parts.join('') : null;
125
127
  }
128
+ /**
129
+ * PRI-1179: the storable face of a Codex reasoning record. The rollout stores
130
+ * the reasoning body encrypted (`encrypted_content`, never read) and an
131
+ * optional `summary: [{ type: 'summary_text', text }]`. Only that summary text
132
+ * is evidence; no summary means nothing is stored (not a degradation).
133
+ */
134
+ function joinReasoningSummary(payload) {
135
+ const summary = own(payload, 'summary');
136
+ if (!Array.isArray(summary))
137
+ return null;
138
+ const parts = [];
139
+ for (const entry of summary) {
140
+ if (!isRecord(entry))
141
+ continue;
142
+ if (own(entry, 'type') !== 'summary_text')
143
+ continue;
144
+ const text = own(entry, 'text');
145
+ if (typeof text === 'string' && text.trim().length > 0)
146
+ parts.push(text);
147
+ }
148
+ return parts.length > 0 ? parts.join('\n') : null;
149
+ }
126
150
  function observationBase(context, turnId) {
127
151
  return {
128
152
  hostKind: 'codex',
@@ -156,8 +180,33 @@ function projectRecord(context, record) {
156
180
  }
157
181
  if (type === 'response_item') {
158
182
  const payloadType = own(payload, 'type');
159
- if (payloadType === 'reasoning')
160
- return; // hidden/encrypted reasoning — never projected
183
+ if (payloadType === 'reasoning') {
184
+ // PRI-1179: the rollout carries the hidden reasoning ONLY as
185
+ // `encrypted_content` plus an OPTIONAL plaintext `summary` array. The
186
+ // encrypted blob is never read; the summary is the one storable face.
187
+ const summaryText = joinReasoningSummary(payload);
188
+ if (summaryText === null)
189
+ return; // no summary → nothing to store
190
+ const itemId = own(payload, 'id');
191
+ const turnId = metadataTurnId(payload) ?? context.currentTurnId;
192
+ if (turnId === null || typeof itemId !== 'string' || itemId.length === 0) {
193
+ warnBounded(context, `observation_skipped_missing_identity:${ordinal}`);
194
+ return;
195
+ }
196
+ context.observations.push({
197
+ ...observationBase(context, turnId),
198
+ kind: 'reasoning',
199
+ logicalObservationKey: `codex|${context.rolloutIdentity}|${turnId}|reasoning:${itemId}`,
200
+ transcriptRecordKey: `codex|${context.rolloutIdentity}|${ordinal}`,
201
+ recordOrdinal: ordinal,
202
+ recordByteStart,
203
+ visibleText: summaryText,
204
+ source: 'transcript',
205
+ completeness: 'complete',
206
+ observedAt,
207
+ });
208
+ return;
209
+ }
161
210
  if (payloadType === 'custom_tool_call' || payloadType === 'function_call') {
162
211
  const turnId = metadataTurnId(payload);
163
212
  const callId = own(payload, 'call_id');
@@ -205,6 +254,12 @@ function projectRecord(context, record) {
205
254
  }
206
255
  if (type === 'event_msg') {
207
256
  const payloadType = own(payload, 'type');
257
+ // PRI-1179: turn identity for records that cannot carry their own (the
258
+ // reasoning response_item). Transcript order makes the latest event-level
259
+ // turn the enclosing one.
260
+ const eventTurnId = own(payload, 'turn_id');
261
+ if (typeof eventTurnId === 'string' && eventTurnId.length > 0)
262
+ context.currentTurnId = eventTurnId;
208
263
  if (payloadType === 'item_completed') {
209
264
  const item = own(payload, 'item');
210
265
  if (!isRecord(item))
@@ -367,6 +422,7 @@ export function decodeTranscriptWindow(input) {
367
422
  observations: [],
368
423
  meta: { rootSessionId: null, cliVersion: null, parentRolloutIdentity: null, agentIdentity: null, agentDepth: null },
369
424
  modelCallsByTurn: new Map(),
425
+ currentTurnId: null,
370
426
  compactionTimestamp: null,
371
427
  rollbackTurns: [],
372
428
  warnings: [],
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@principles/codex-adapter",
3
- "version": "0.8.12",
3
+ "version": "0.10.0",
4
4
  "description": "Codex CLI host adapter for Principles Disciple — implements HostAdapter interface for OpenAI Codex CLI's stdin/stdout JSON hook model (ADR-0020).",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,16 +1,9 @@
1
1
  /**
2
- * Bind-authorization guard for the console HTTP server.
2
+ * Bind guard for the console HTTP server.
3
3
  *
4
- * The `--no-auth` CLI flag has been loopback-restricted since its introduction
5
- * (parseArgs exits on `--no-auth` + non-loopback `--host`). But authentication
6
- * is equally disabled in the *token-less* mode — no `--token` and no
7
- * `PD_CONSOLE_TOKEN` — which historically performed no host check at all, so a
8
- * direct server launch (e.g. `node dist/server.js --host 0.0.0.0` with no
9
- * token) would bind a LAN-reachable interface with every `/api/*` route
10
- * callable by unauthenticated peers.
11
- *
12
- * The invariant this enforces: authentication disabled ⇒ loopback-only bind.
13
- * It keys on the effective authentication state (AuthConfig), not on which
14
- * flag produced that state, so both unauthenticated modes are covered.
4
+ * The console has no application-level credential: the operating-system
5
+ * session is the trust boundary. That is only true while the listener is
6
+ * reachable from the local machine alone, so a non-loopback `--host` is
7
+ * refused unconditionally (it used to depend on the authentication mode).
15
8
  */
16
- export declare function assertLoopbackBindForUnauthenticatedServer(isAuthEnabled: boolean, host: string): void;
9
+ export declare function assertLoopbackBind(host: string): void;
@@ -1,26 +1,17 @@
1
1
  /**
2
- * Bind-authorization guard for the console HTTP server.
2
+ * Bind guard for the console HTTP server.
3
3
  *
4
- * The `--no-auth` CLI flag has been loopback-restricted since its introduction
5
- * (parseArgs exits on `--no-auth` + non-loopback `--host`). But authentication
6
- * is equally disabled in the *token-less* mode — no `--token` and no
7
- * `PD_CONSOLE_TOKEN` — which historically performed no host check at all, so a
8
- * direct server launch (e.g. `node dist/server.js --host 0.0.0.0` with no
9
- * token) would bind a LAN-reachable interface with every `/api/*` route
10
- * callable by unauthenticated peers.
11
- *
12
- * The invariant this enforces: authentication disabled ⇒ loopback-only bind.
13
- * It keys on the effective authentication state (AuthConfig), not on which
14
- * flag produced that state, so both unauthenticated modes are covered.
4
+ * The console has no application-level credential: the operating-system
5
+ * session is the trust boundary. That is only true while the listener is
6
+ * reachable from the local machine alone, so a non-loopback `--host` is
7
+ * refused unconditionally (it used to depend on the authentication mode).
15
8
  */
16
9
  const LOOPBACK_HOSTS = new Set(['127.0.0.1', 'localhost', '::1']);
17
- export function assertLoopbackBindForUnauthenticatedServer(isAuthEnabled, host) {
18
- if (isAuthEnabled)
19
- return;
10
+ export function assertLoopbackBind(host) {
20
11
  const normalized = String(host ?? '').toLowerCase().replace(/^\[(.+)\]$/, '$1');
21
12
  if (LOOPBACK_HOSTS.has(normalized))
22
13
  return;
23
- console.error('[pd-console] Refusing to bind non-loopback host "' + String(host) + '" without authentication. ' +
24
- 'Provide --token or PD_CONSOLE_TOKEN, or use the default loopback host (127.0.0.1).');
14
+ console.error('[pd-console] Refusing to bind non-loopback host "' + String(host) + '". ' +
15
+ 'The Console has no application-level authentication and relies on local OS access; use the default loopback host (127.0.0.1).');
25
16
  process.exit(1);
26
17
  }
@@ -1,11 +1,17 @@
1
1
  import * as http from 'http';
2
2
  import { type FeedbackChannelConfig } from './config/pd-config-store.js';
3
- import { AuthConfig } from './config/AuthConfig.js';
4
3
  import { WorkspaceConfigStore } from './config/WorkspaceConfigStore.js';
5
4
  import { WorkspaceService } from './models/WorkspaceService.js';
5
+ /**
6
+ * The Console has no application-level credential any more. Old launchers,
7
+ * shell profiles and scripts may still pass `--token` / `--no-auth`; they are
8
+ * ignored (unknown args never failed parsing) but the operator gets one line
9
+ * explaining why their secret no longer does anything.
10
+ */
11
+ export declare function warnAboutLegacyAuthArgs(argv: string[]): void;
12
+ export declare const REQUEST_TIMEOUT_MS = 10000;
6
13
  interface AppServices {
7
14
  workspaceDir: string;
8
- authConfig: AuthConfig;
9
15
  configStore: WorkspaceConfigStore;
10
16
  workspaceService: WorkspaceService;
11
17
  feedbackFlags: Record<string, {
@@ -14,7 +20,7 @@ interface AppServices {
14
20
  maintainerEmail: string;
15
21
  feedbackChannelConfig: FeedbackChannelConfig;
16
22
  }
17
- export declare function initServices(workspaceDir: string, authConfig: AuthConfig): Promise<AppServices>;
23
+ export declare function initServices(workspaceDir: string): Promise<AppServices>;
18
24
  export declare function closeServices(): Promise<void>;
19
25
  export declare function handleRequest(services: AppServices): (req: http.IncomingMessage, res: http.ServerResponse) => void;
20
26
  export declare function main(): Promise<void>;