create-principles-disciple 1.156.2 → 1.157.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 (242) hide show
  1. package/_release/product-identity.json +2 -2
  2. package/codex-adapter/dist/worker/workspace-worker.d.ts +11 -3
  3. package/codex-adapter/dist/worker/workspace-worker.js +30 -16
  4. package/codex-adapter/package.json +1 -1
  5. package/console/dist/server/models/OwnerDecisionConsoleModel.js +33 -1
  6. package/console/dist/web/assets/app.js +3 -3
  7. package/core/dist/runtime/adversarial-loop.d.ts +8 -0
  8. package/core/dist/runtime/adversarial-loop.d.ts.map +1 -1
  9. package/core/dist/runtime/adversarial-loop.js +420 -45
  10. package/core/dist/runtime/adversarial-loop.js.map +1 -1
  11. package/core/dist/runtime/feature-flags/feature-flag-lifecycle.js +3 -3
  12. package/core/dist/runtime/feature-flags/feature-flag-lifecycle.js.map +1 -1
  13. package/core/dist/runtime/feature-flags/plugin-surface-registry.d.ts.map +1 -1
  14. package/core/dist/runtime/feature-flags/plugin-surface-registry.js +0 -16
  15. package/core/dist/runtime/feature-flags/plugin-surface-registry.js.map +1 -1
  16. package/core/dist/runtime/index.d.ts +4 -0
  17. package/core/dist/runtime/index.d.ts.map +1 -1
  18. package/core/dist/runtime/index.js +10 -0
  19. package/core/dist/runtime/index.js.map +1 -1
  20. package/core/dist/runtime/internalization/artificer-runner.d.ts +9 -0
  21. package/core/dist/runtime/internalization/artificer-runner.d.ts.map +1 -1
  22. package/core/dist/runtime/internalization/artificer-runner.js +52 -0
  23. package/core/dist/runtime/internalization/artificer-runner.js.map +1 -1
  24. package/core/dist/runtime/internalization/correlation-lineage.d.ts +16 -3
  25. package/core/dist/runtime/internalization/correlation-lineage.d.ts.map +1 -1
  26. package/core/dist/runtime/internalization/correlation-lineage.js +4 -4
  27. package/core/dist/runtime/internalization/correlation-lineage.js.map +1 -1
  28. package/core/dist/runtime/internalization/evaluator-runner.d.ts +35 -0
  29. package/core/dist/runtime/internalization/evaluator-runner.d.ts.map +1 -1
  30. package/core/dist/runtime/internalization/evaluator-runner.js +390 -91
  31. package/core/dist/runtime/internalization/evaluator-runner.js.map +1 -1
  32. package/core/dist/runtime/internalization/internalization-orchestrator.d.ts +40 -13
  33. package/core/dist/runtime/internalization/internalization-orchestrator.d.ts.map +1 -1
  34. package/core/dist/runtime/internalization/internalization-orchestrator.js +520 -199
  35. package/core/dist/runtime/internalization/internalization-orchestrator.js.map +1 -1
  36. package/core/dist/runtime/internalization/internalization-transition-decision.js +1 -1
  37. package/core/dist/runtime/internalization/internalization-transition-decision.js.map +1 -1
  38. package/core/dist/runtime/internalization/owner-resolution-service.d.ts.map +1 -1
  39. package/core/dist/runtime/internalization/owner-resolution-service.js +10 -8
  40. package/core/dist/runtime/internalization/owner-resolution-service.js.map +1 -1
  41. package/core/dist/runtime/internalization/owner-review.d.ts +2 -0
  42. package/core/dist/runtime/internalization/owner-review.d.ts.map +1 -1
  43. package/core/dist/runtime/internalization/owner-review.js +17 -11
  44. package/core/dist/runtime/internalization/owner-review.js.map +1 -1
  45. package/core/dist/runtime/internalization/peer-runner-contracts.d.ts +2 -0
  46. package/core/dist/runtime/internalization/peer-runner-contracts.d.ts.map +1 -1
  47. package/core/dist/runtime/internalization/peer-runner-contracts.js.map +1 -1
  48. package/core/dist/runtime/internalization/pitask-metadata.d.ts +36 -1
  49. package/core/dist/runtime/internalization/pitask-metadata.d.ts.map +1 -1
  50. package/core/dist/runtime/internalization/pitask-metadata.js +23 -2
  51. package/core/dist/runtime/internalization/pitask-metadata.js.map +1 -1
  52. package/core/dist/runtime/internalization/repair-create.d.ts +73 -0
  53. package/core/dist/runtime/internalization/repair-create.d.ts.map +1 -0
  54. package/core/dist/runtime/internalization/repair-create.js +200 -0
  55. package/core/dist/runtime/internalization/repair-create.js.map +1 -0
  56. package/core/dist/runtime/internalization/repair-lineage-backfill.d.ts +94 -0
  57. package/core/dist/runtime/internalization/repair-lineage-backfill.d.ts.map +1 -0
  58. package/core/dist/runtime/internalization/repair-lineage-backfill.js +123 -0
  59. package/core/dist/runtime/internalization/repair-lineage-backfill.js.map +1 -0
  60. package/core/dist/runtime/internalization/repair-task-identity.d.ts +99 -4
  61. package/core/dist/runtime/internalization/repair-task-identity.d.ts.map +1 -1
  62. package/core/dist/runtime/internalization/repair-task-identity.js +225 -7
  63. package/core/dist/runtime/internalization/repair-task-identity.js.map +1 -1
  64. package/core/dist/runtime/internalization/revision-reopen.d.ts +56 -1
  65. package/core/dist/runtime/internalization/revision-reopen.d.ts.map +1 -1
  66. package/core/dist/runtime/internalization/revision-reopen.js +82 -39
  67. package/core/dist/runtime/internalization/revision-reopen.js.map +1 -1
  68. package/core/dist/runtime/internalization/rollout-reviewer-runner.d.ts +0 -7
  69. package/core/dist/runtime/internalization/rollout-reviewer-runner.d.ts.map +1 -1
  70. package/core/dist/runtime/internalization/rollout-reviewer-runner.js +13 -68
  71. package/core/dist/runtime/internalization/rollout-reviewer-runner.js.map +1 -1
  72. package/core/dist/runtime/internalization/successor-create.d.ts +69 -0
  73. package/core/dist/runtime/internalization/successor-create.d.ts.map +1 -0
  74. package/core/dist/runtime/internalization/successor-create.js +173 -0
  75. package/core/dist/runtime/internalization/successor-create.js.map +1 -0
  76. package/core/dist/runtime/internalization/successor-lookup.d.ts +50 -0
  77. package/core/dist/runtime/internalization/successor-lookup.d.ts.map +1 -0
  78. package/core/dist/runtime/internalization/successor-lookup.js +213 -0
  79. package/core/dist/runtime/internalization/successor-lookup.js.map +1 -0
  80. package/core/dist/runtime/runner/succeeded-result-recovery.d.ts +58 -0
  81. package/core/dist/runtime/runner/succeeded-result-recovery.d.ts.map +1 -0
  82. package/core/dist/runtime/runner/succeeded-result-recovery.js +117 -0
  83. package/core/dist/runtime/runner/succeeded-result-recovery.js.map +1 -0
  84. package/core/dist/runtime/store/runtime-state-manager.d.ts +1 -0
  85. package/core/dist/runtime/store/runtime-state-manager.d.ts.map +1 -1
  86. package/core/dist/runtime/store/runtime-state-manager.js +4 -0
  87. package/core/dist/runtime/store/runtime-state-manager.js.map +1 -1
  88. package/core/dist/runtime/store/task/memory-task-store.d.ts +3 -3
  89. package/core/dist/runtime/store/task/memory-task-store.d.ts.map +1 -1
  90. package/core/dist/runtime/store/task/memory-task-store.js +52 -0
  91. package/core/dist/runtime/store/task/memory-task-store.js.map +1 -1
  92. package/core/dist/runtime/store/task/sqlite-task-store.d.ts +3 -0
  93. package/core/dist/runtime/store/task/sqlite-task-store.d.ts.map +1 -1
  94. package/core/dist/runtime/store/task/sqlite-task-store.js +204 -135
  95. package/core/dist/runtime/store/task/sqlite-task-store.js.map +1 -1
  96. package/core/dist/runtime/store/task/task-store.d.ts +17 -0
  97. package/core/dist/runtime/store/task/task-store.d.ts.map +1 -1
  98. package/core/dist/telemetry-event.d.ts +2 -2
  99. package/core/dist/telemetry-event.d.ts.map +1 -1
  100. package/core/dist/telemetry-event.js +4 -0
  101. package/core/dist/telemetry-event.js.map +1 -1
  102. package/core/package.json +1 -1
  103. package/dist/index.js +1 -1
  104. package/dist/index.js.map +1 -1
  105. package/dist/installer.d.ts +69 -11
  106. package/dist/installer.d.ts.map +1 -1
  107. package/dist/installer.js +432 -120
  108. package/dist/installer.js.map +1 -1
  109. package/dist/service-host-bridge.d.ts +0 -5
  110. package/dist/service-host-bridge.d.ts.map +1 -1
  111. package/dist/service-host-bridge.js.map +1 -1
  112. package/dist/service-host-provisioning.d.ts +123 -18
  113. package/dist/service-host-provisioning.d.ts.map +1 -1
  114. package/dist/service-host-provisioning.js +645 -77
  115. package/dist/service-host-provisioning.js.map +1 -1
  116. package/dist/utils/env.d.ts +9 -0
  117. package/dist/utils/env.d.ts.map +1 -1
  118. package/dist/utils/env.js +269 -49
  119. package/dist/utils/env.js.map +1 -1
  120. package/host-runtime/dist/codex-worker-status.d.ts +6 -4
  121. package/host-runtime/dist/codex-worker-status.js +7 -5
  122. package/host-runtime/dist/diagnostician-auto-run.js +2 -2
  123. package/host-runtime/dist/governance-signal-admission.d.ts +2 -1
  124. package/host-runtime/dist/governance-signal-admission.js +2 -1
  125. package/host-runtime/dist/index.d.ts +4 -2
  126. package/host-runtime/dist/index.js +6 -2
  127. package/host-runtime/dist/internalization-consumer-cycle.d.ts +13 -106
  128. package/host-runtime/dist/internalization-consumer-cycle.js +21 -99
  129. package/host-runtime/dist/internalization-consumer-governance.d.ts +3 -3
  130. package/host-runtime/dist/internalization-consumer-governance.js +17 -96
  131. package/host-runtime/dist/internalization-task-executor.d.ts +127 -0
  132. package/host-runtime/dist/internalization-task-executor.js +121 -0
  133. package/host-runtime/dist/workbuddy-worker-status.d.ts +6 -3
  134. package/host-runtime/dist/workbuddy-worker-status.js +7 -4
  135. package/host-runtime/dist/workspace-telemetry-emitter.js +1 -1
  136. package/host-runtime/package.json +1 -1
  137. package/install-layout/dist/background-execution-transition.d.ts +25 -29
  138. package/install-layout/dist/background-execution-transition.js +90 -138
  139. package/install-layout/dist/index.d.ts +45 -33
  140. package/install-layout/dist/index.js +24 -18
  141. package/install-layout/package.json +1 -1
  142. package/package.json +5 -4
  143. package/pd-cli/dist/commands/codex-worker.d.ts +7 -3
  144. package/pd-cli/dist/commands/codex-worker.d.ts.map +1 -1
  145. package/pd-cli/dist/commands/codex-worker.js +125 -101
  146. package/pd-cli/dist/commands/codex-worker.js.map +1 -1
  147. package/pd-cli/dist/commands/runtime-internalization-enqueue-successors.d.ts.map +1 -1
  148. package/pd-cli/dist/commands/runtime-internalization-enqueue-successors.js +148 -130
  149. package/pd-cli/dist/commands/runtime-internalization-enqueue-successors.js.map +1 -1
  150. package/pd-cli/dist/commands/runtime-internalization-run-once.d.ts.map +1 -1
  151. package/pd-cli/dist/commands/runtime-internalization-run-once.js +4 -0
  152. package/pd-cli/dist/commands/runtime-internalization-run-once.js.map +1 -1
  153. package/pd-cli/dist/commands/runtime-internalization-run-rulehost.js +1 -1
  154. package/pd-cli/dist/commands/runtime-internalization-run-rulehost.js.map +1 -1
  155. package/pd-cli/dist/commands/service-run-once.d.ts +12 -27
  156. package/pd-cli/dist/commands/service-run-once.d.ts.map +1 -1
  157. package/pd-cli/dist/commands/service-run-once.js +15 -206
  158. package/pd-cli/dist/commands/service-run-once.js.map +1 -1
  159. package/pd-cli/dist/commands/workbuddy-worker.d.ts +7 -2
  160. package/pd-cli/dist/commands/workbuddy-worker.d.ts.map +1 -1
  161. package/pd-cli/dist/commands/workbuddy-worker.js +133 -99
  162. package/pd-cli/dist/commands/workbuddy-worker.js.map +1 -1
  163. package/pd-cli/dist/commands/worker-service-host-gate.d.ts +38 -0
  164. package/pd-cli/dist/commands/worker-service-host-gate.d.ts.map +1 -0
  165. package/pd-cli/dist/commands/worker-service-host-gate.js +110 -0
  166. package/pd-cli/dist/commands/worker-service-host-gate.js.map +1 -0
  167. package/pd-cli/dist/program.d.ts.map +1 -1
  168. package/pd-cli/dist/program.js +20 -84
  169. package/pd-cli/dist/program.js.map +1 -1
  170. package/pd-cli/dist/services/rulehost-pipeline-runner.d.ts.map +1 -1
  171. package/pd-cli/dist/services/rulehost-pipeline-runner.js +198 -142
  172. package/pd-cli/dist/services/rulehost-pipeline-runner.js.map +1 -1
  173. package/pd-cli/dist/services/service-host/coordinator-common.d.ts.map +1 -1
  174. package/pd-cli/dist/services/service-host/coordinator-common.js +4 -5
  175. package/pd-cli/dist/services/service-host/coordinator-common.js.map +1 -1
  176. package/pd-cli/dist/services/service-host/index.d.ts +7 -10
  177. package/pd-cli/dist/services/service-host/index.d.ts.map +1 -1
  178. package/pd-cli/dist/services/service-host/index.js +8 -11
  179. package/pd-cli/dist/services/service-host/index.js.map +1 -1
  180. package/pd-cli/dist/services/service-host/install-identity.d.ts +5 -5
  181. package/pd-cli/dist/services/service-host/managed-run.d.ts.map +1 -1
  182. package/pd-cli/dist/services/service-host/managed-run.js +19 -22
  183. package/pd-cli/dist/services/service-host/managed-run.js.map +1 -1
  184. package/pd-cli/dist/services/service-host/scheduler/linux.d.ts.map +1 -1
  185. package/pd-cli/dist/services/service-host/scheduler/linux.js +21 -2
  186. package/pd-cli/dist/services/service-host/scheduler/linux.js.map +1 -1
  187. package/pd-cli/dist/services/service-host/scheduler/service-status.d.ts +1 -1
  188. package/pd-cli/dist/services/service-host/scheduler/service-status.d.ts.map +1 -1
  189. package/pd-cli/dist/services/service-host/scheduler/service-status.js +0 -2
  190. package/pd-cli/dist/services/service-host/scheduler/service-status.js.map +1 -1
  191. package/pd-cli/dist/services/service-host/status/service-run-status.d.ts +7 -51
  192. package/pd-cli/dist/services/service-host/status/service-run-status.d.ts.map +1 -1
  193. package/pd-cli/dist/services/service-host/status/service-run-status.js.map +1 -1
  194. package/pd-cli/dist/services/service-host/worker-adapter-openclaw.js +3 -3
  195. package/pd-cli/dist/services/service-host/worker-adapter.d.ts +0 -10
  196. package/pd-cli/dist/services/service-host/worker-adapter.d.ts.map +1 -1
  197. package/pd-cli/dist/services/service-host/worker-adapter.js +4 -12
  198. package/pd-cli/dist/services/service-host/worker-adapter.js.map +1 -1
  199. package/pd-cli/dist/services/service-host/worker-env.d.ts +1 -1
  200. package/pd-cli/dist/services/service-host/workspace-dispatch.d.ts +5 -7
  201. package/pd-cli/dist/services/service-host/workspace-dispatch.d.ts.map +1 -1
  202. package/pd-cli/dist/services/service-host/workspace-dispatch.js +1 -3
  203. package/pd-cli/dist/services/service-host/workspace-dispatch.js.map +1 -1
  204. package/pd-cli/package.json +1 -1
  205. package/plugin/dist/bundle.js +616 -1319
  206. package/plugin/dist/core/openclaw-tool-declaration.d.ts +13 -0
  207. package/plugin/dist/index.d.ts +0 -9
  208. package/plugin/dist/openclaw-worker.d.ts +21 -8
  209. package/plugin/dist/openclaw-worker.js +267 -267
  210. package/plugin/dist/openclaw.plugin.json +1 -1
  211. package/plugin/openclaw.plugin.json +1 -1
  212. package/plugin/package.json +1 -1
  213. package/release-manager/dist/installer.js +432 -120
  214. package/release-manager/dist/service-host-provisioning.js +645 -77
  215. package/release-manager/dist/utils/env.js +269 -49
  216. package/release-manager/package.json +3 -2
  217. package/workbuddy-adapter/dist/worker/workspace-worker.d.ts +9 -1
  218. package/workbuddy-adapter/dist/worker/workspace-worker.js +21 -9
  219. package/workbuddy-adapter/package.json +1 -1
  220. package/pd-cli/dist/commands/service-handover.d.ts +0 -12
  221. package/pd-cli/dist/commands/service-handover.d.ts.map +0 -1
  222. package/pd-cli/dist/commands/service-handover.js +0 -117
  223. package/pd-cli/dist/commands/service-handover.js.map +0 -1
  224. package/pd-cli/dist/commands/worker-drain.d.ts +0 -7
  225. package/pd-cli/dist/commands/worker-drain.d.ts.map +0 -1
  226. package/pd-cli/dist/commands/worker-drain.js +0 -51
  227. package/pd-cli/dist/commands/worker-drain.js.map +0 -1
  228. package/pd-cli/dist/services/service-host/handover-claims.d.ts +0 -14
  229. package/pd-cli/dist/services/service-host/handover-claims.d.ts.map +0 -1
  230. package/pd-cli/dist/services/service-host/handover-claims.js +0 -50
  231. package/pd-cli/dist/services/service-host/handover-claims.js.map +0 -1
  232. package/pd-cli/dist/services/service-host/shadow-run.d.ts +0 -87
  233. package/pd-cli/dist/services/service-host/shadow-run.d.ts.map +0 -1
  234. package/pd-cli/dist/services/service-host/shadow-run.js +0 -549
  235. package/pd-cli/dist/services/service-host/shadow-run.js.map +0 -1
  236. package/pd-cli/dist/services/service-host/workspace-handover.d.ts +0 -190
  237. package/pd-cli/dist/services/service-host/workspace-handover.d.ts.map +0 -1
  238. package/pd-cli/dist/services/service-host/workspace-handover.js +0 -1393
  239. package/pd-cli/dist/services/service-host/workspace-handover.js.map +0 -1
  240. package/plugin/dist/service/gateway-consumer-lease.d.ts +0 -142
  241. package/plugin/dist/service/gateway-quiesce-ack.d.ts +0 -40
  242. package/plugin/dist/service/internalization-auto-consumer-service.d.ts +0 -100
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "productVersion": "2.8.12",
4
- "sourceCommit": "3f068988cf04b22501a5c190f52f88630d1cb12f"
3
+ "productVersion": "2.8.13",
4
+ "sourceCommit": "ff62137821c993773cc7df104a01625310776c51"
5
5
  }
@@ -77,10 +77,18 @@ export interface CodexWorkerCycleOptions {
77
77
  /**
78
78
  * WHO drove this cycle (PRI-1264 attribution, Phase 2 extension). The
79
79
  * Service Host sets `PD_INVOCATION_SOURCE=service_host` on its Worker
80
- * children (shadow mode); without the third value the stall attribution
81
- * would misreport service-driven cycles as manual (TD §5.2).
80
+ * children; without the second value the stall attribution would misreport
81
+ * service-driven cycles as manual (TD §5.2).
82
+ *
83
+ * PRI-1278 Phase 5 (Companion-runtime removal): the companion worker driver
84
+ * is retired — there is no Companion runtime left that could legitimately
85
+ * produce it. A process still self-declaring `PD_INVOCATION_SOURCE=companion`
86
+ * (a legacy env leftover) is not authoritative: no resident supervisor backs
87
+ * it, so it is attributed as what it factually is — manual. Historical
88
+ * liveness records already persisted with `lastCycleDriver: 'companion'`
89
+ * stay readable as-is; they are durable facts and are never rewritten.
82
90
  */
83
- export declare function codexWorkerCycleDriver(): 'companion' | 'service_host' | 'manual';
91
+ export declare function codexWorkerCycleDriver(): 'service_host' | 'manual';
84
92
  export declare function readCodexWorkerLiveness(workspaceDir: string): Record<string, unknown> | null;
85
93
  /**
86
94
  * SPEC §9.1 fair-share pick (review P1): pending and due-retry are both
@@ -32,7 +32,12 @@ import { createWorkspaceBehaviorEvidencePort, createCodexArtificerTrustedFactsPo
32
32
  import { catchUpCodexIngestion } from '../ingestion/catch-up.js';
33
33
  import { readCodexTargetTurnEvidence } from '../ingestion/pain-receipt-fallback.js';
34
34
  import { CODEX_TOOL_SEMANTIC_MAPPINGS, CODEX_TOOL_SEMANTICS } from '../tool-semantics.js';
35
- const WORKER_OWNER = 'companion-worker';
35
+ // PRI-1278 Phase 5 (Companion-runtime removal): the lease/consumer owner
36
+ // label for NEW writes is the Service Host worker identity — the PD Service
37
+ // Host is the only background runtime and spawns these bounded worker cycles.
38
+ // Historical lease records keep the retired 'companion-worker' string; they
39
+ // are durable facts and are deliberately NOT migrated.
40
+ const WORKER_OWNER = 'service-host-worker';
36
41
  const DEFAULT_DIAG_CANDIDATE_LIMIT = 5;
37
42
  /** CR-05 §9.1: bounded per-cycle post-processing continuation budget. */
38
43
  const DEFAULT_POST_PROCESSING_LIMIT = 2;
@@ -51,13 +56,19 @@ const LIVENESS_STAGE_DEADLINE_MS = {
51
56
  /**
52
57
  * WHO drove this cycle (PRI-1264 attribution, Phase 2 extension). The
53
58
  * Service Host sets `PD_INVOCATION_SOURCE=service_host` on its Worker
54
- * children (shadow mode); without the third value the stall attribution
55
- * would misreport service-driven cycles as manual (TD §5.2).
59
+ * children; without the second value the stall attribution would misreport
60
+ * service-driven cycles as manual (TD §5.2).
61
+ *
62
+ * PRI-1278 Phase 5 (Companion-runtime removal): the companion worker driver
63
+ * is retired — there is no Companion runtime left that could legitimately
64
+ * produce it. A process still self-declaring `PD_INVOCATION_SOURCE=companion`
65
+ * (a legacy env leftover) is not authoritative: no resident supervisor backs
66
+ * it, so it is attributed as what it factually is — manual. Historical
67
+ * liveness records already persisted with `lastCycleDriver: 'companion'`
68
+ * stay readable as-is; they are durable facts and are never rewritten.
56
69
  */
57
70
  export function codexWorkerCycleDriver() {
58
71
  const source = process.env.PD_INVOCATION_SOURCE;
59
- if (source === 'companion')
60
- return 'companion';
61
72
  if (source === 'service_host')
62
73
  return 'service_host';
63
74
  return 'manual';
@@ -66,9 +77,9 @@ export function codexWorkerCycleDriver() {
66
77
  * F13 (TD §5.2): the coordinator passes a unique invocation id; when
67
78
  * present it lands in the liveness record so the shared per-workspace file
68
79
  * can be correlated back to the exact Service Host invocation.
69
- * R5 review fix: a manual/companion cycle carries NO invocation id, so the
70
- * patch must CLEAR the field — otherwise a completed manual run would keep
71
- * masquerading under the previous shadow run's id.
80
+ * R5 review fix: a manual (non-Service-Host) cycle carries NO invocation
81
+ * id, so the patch must CLEAR the field — otherwise a completed manual run
82
+ * would keep masquerading under the previous shadow run's id.
72
83
  */
73
84
  function invocationIdLivenessPatch() {
74
85
  const invocationId = process.env.PD_INVOCATION_ID;
@@ -198,11 +209,13 @@ export async function runCodexWorkspaceWorkerCycle(options) {
198
209
  // PRI-1264 review round (2026-11-18): an intentional CONFIG pause must
199
210
  // keep the liveness heartbeat alive — the worker process IS alive and
200
211
  // cycling, it is just deliberately idle. Without this heartbeat the
201
- // Companion's stall detector (completion age > 2× interval) read the stale
202
- // pre-pause record and raised a false `workspace_worker_stalled`
203
- // notification whose "restart Companion" guidance could never fix the
204
- // config pause. The workspace directory and config were already proven
205
- // readable above (CR-08 ordering), so the write is legitimate.
212
+ // stall attribution reading this record (last-completed-cycle age —
213
+ // originally the retired Companion's detector, now the `pd codex worker
214
+ // --status` verdict and the Service Host health projection) read the
215
+ // stale pre-pause record and reported a deliberately idle worker as
216
+ // stalled — guidance no restart could ever fix, because the pause is
217
+ // config-intentional. The workspace directory and config were already
218
+ // proven readable above (CR-08 ordering), so the write is legitimate.
206
219
  writeLiveness(workspaceDir, {
207
220
  runningStage: 'paused',
208
221
  // Explicit null: a paused state has no in-flight stage, and the merge
@@ -221,9 +234,10 @@ export async function runCodexWorkspaceWorkerCycle(options) {
221
234
  runningStage: 'catch_up',
222
235
  stageDeadline: new Date(cycleStartedAt.getTime() + LIVENESS_STAGE_DEADLINE_MS.catch_up).toISOString(),
223
236
  // PRI-1264: record WHO drove this cycle. `pd codex worker --status` reads
224
- // the marker so the Owner can tell a companion-driven (resident, should
225
- // keep cycling) worker from a manual one-shot — "registered" alone said
226
- // nothing about whether a driver is actually alive.
237
+ // the marker so the Owner can tell a Service-Host-driven cycle (a bounded
238
+ // worker spawned by the OS-scheduled Service Host, expected to recur on
239
+ // its interval) from a manual one-shot — "registered" alone says nothing
240
+ // about whether a driver is actually alive.
227
241
  lastCycleDriver: codexWorkerCycleDriver(),
228
242
  });
229
243
  const consumerFlag = loadFeatureFlagFromConfig(workspaceDir, 'internalization_auto_consumer', { info: (m) => logger.info(m), warn: (m) => logger.warn(m) });
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@principles/codex-adapter",
3
- "version": "0.15.1",
3
+ "version": "0.16.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",
@@ -84,6 +84,25 @@ function makeRowReader(db) {
84
84
  return row ? rowToTaskRecord(row) : null;
85
85
  };
86
86
  }
87
+ /** Narrow read-model scan used only for lineage proof; it must accept legacy/test rows. */
88
+ function makeRowLister(db) {
89
+ return async (filter) => {
90
+ const rows = db.prepare('SELECT * FROM tasks').all()
91
+ .filter(isRecordRow)
92
+ .map((row) => rowToTaskRecord(row))
93
+ .filter((row) => row !== null);
94
+ let selected = rows;
95
+ if (filter?.status !== undefined)
96
+ selected = selected.filter((row) => row.status === filter.status);
97
+ if (filter?.statuses !== undefined)
98
+ selected = selected.filter((row) => filter.statuses?.includes(row.status));
99
+ if (filter?.taskKind !== undefined)
100
+ selected = selected.filter((row) => row.taskKind === filter.taskKind);
101
+ if (filter?.limit !== undefined)
102
+ selected = selected.slice(0, filter.limit);
103
+ return selected;
104
+ };
105
+ }
87
106
  /** 单任务 capability → 决策条目(不 eligible → null,INV-01)。 */
88
107
  async function deriveTaskDecisionItem(task, dependencies) {
89
108
  if (!GOVERNANCE_TASK_KINDS.has(task.taskKind))
@@ -99,6 +118,14 @@ async function deriveTaskDecisionItem(task, dependencies) {
99
118
  return null;
100
119
  }
101
120
  },
121
+ listTasks: async (filter) => {
122
+ try {
123
+ return await dependencies.listTaskRows(filter);
124
+ }
125
+ catch {
126
+ return [];
127
+ }
128
+ },
102
129
  listArtifactsBySourceTask: async (taskId) => {
103
130
  const list = await dependencies.artifactStore.listBySourceTaskId(taskId).catch(() => []);
104
131
  return list.map((a) => ({
@@ -265,6 +292,7 @@ export class OwnerDecisionConsoleModel {
265
292
  const item = await deriveTaskDecisionItem(task, {
266
293
  artifactStore,
267
294
  readTaskRow: makeRowReader(db),
295
+ listTaskRows: makeRowLister(db),
268
296
  });
269
297
  if (item)
270
298
  items.push(item);
@@ -403,7 +431,11 @@ export class OwnerDecisionConsoleModel {
403
431
  const task = rowToTaskRecord(row);
404
432
  if (!task)
405
433
  continue;
406
- const item = await deriveTaskDecisionItem(task, { artifactStore, readTaskRow: makeRowReader(db) });
434
+ const item = await deriveTaskDecisionItem(task, {
435
+ artifactStore,
436
+ readTaskRow: makeRowReader(db),
437
+ listTaskRows: makeRowLister(db),
438
+ });
407
439
  if (item)
408
440
  ids.add(task.taskId);
409
441
  }
@@ -77,7 +77,7 @@ It is actually 3 sub-stages chained: find root cause \u2192 abstract principle \
77
77
 
78
78
  \u5B83\u662F\u5185\u5316\u5F15\u64CE\u7684\u7B2C\u4E00\u7AD9\uFF0C\u63A5\u6536\u8BCA\u65AD\u4EA7\u7269\uFF0C\u8F93\u51FA\u5019\u9009\u65B9\u6848\u3002`,detailEn:`After diagnosis, the Dreamer proposes multiple correction options from different angles \u2014 like brainstorming, diverge first then converge. Each option includes "what went wrong / what should be done / why".
79
79
 
80
- It is the first stop of the internalization engine, receiving diagnosis output and producing candidates.`,impactLevel:"danger",impactZh:"\u5185\u5316\u5F15\u64CE\u5931\u53BB\u5165\u53E3\u3002Dreamer \u662F\u94FE\u9996\uFF0C\u5173\u6389\u540E\u65E0\u5019\u9009\u65B9\u6848\u751F\u6210\uFF0C\u5185\u5316\u762B\u75EA\u3002",impactEn:"The internalization engine loses its entry point. Dreamer is the chain head; disabling means no candidates are generated \u2014 internalization is paralyzed.",techDetailZh:{\u8F93\u5165:"\u8BCA\u65AD\u9636\u6BB5\u7684 distilled principle / candidate artifact",\u8F93\u51FA:"`DreamerOutput` \xB7 1-5 \u4E2A\u5019\u9009\uFF0C\u6BCF\u4E2A\u542B badDecision / betterDecision / riskLevel / strategicPerspective",\u6CE8\u610F:"`InternalizationAutoConsumerService` \u5F53\u524D\u4EC5\u81EA\u52A8\u6D88\u8D39 dreamer\uFF0C\u4E0B\u6E38\u9700\u624B\u52A8\u89E6\u53D1"},techDetailEn:{Input:"Distilled principle / candidate artifact from the diagnosis stage",Output:"`DreamerOutput` \xB7 1-5 candidates, each with badDecision / betterDecision / riskLevel / strategicPerspective",Note:"`InternalizationAutoConsumerService` currently only auto-consumes dreamer; downstream must be triggered manually"},isCore:!0},scribe:{name:"scribe",group:"core_trio",displayNameZh:"\u6284\u5199\u5458",displayNameEn:"Scribe",roleZh:"\u628A\u65B9\u6848\u5199\u6210\u6B63\u5F0F\u7684\u539F\u5219\u6761\u6587",roleEn:"Writes the chosen option into a formal principle statement",detailZh:`\u68A6\u60F3\u5BB6\u7ED9\u51FA\u591A\u4E2A\u65B9\u6848\u540E\uFF0C\u6284\u5199\u5458\u8D1F\u8D23\u628A\u9009\u4E2D\u7684\u65B9\u6848\u8F6C\u5199\u6210\u6E05\u6670\u3001\u53EF\u6267\u884C\u7684\u539F\u5219\u6761\u6587\u2014\u2014\u5C31\u50CF\u628A\u4F1A\u8BAE\u7EAA\u8981\u6574\u7406\u6210\u6B63\u5F0F\u6587\u6863\u3002
80
+ It is the first stop of the internalization engine, receiving diagnosis output and producing candidates.`,impactLevel:"danger",impactZh:"\u5185\u5316\u5F15\u64CE\u5931\u53BB\u5165\u53E3\u3002Dreamer \u662F\u94FE\u9996\uFF0C\u5173\u6389\u540E\u65E0\u5019\u9009\u65B9\u6848\u751F\u6210\uFF0C\u5185\u5316\u762B\u75EA\u3002",impactEn:"The internalization engine loses its entry point. Dreamer is the chain head; disabling means no candidates are generated \u2014 internalization is paralyzed.",techDetailZh:{\u8F93\u5165:"\u8BCA\u65AD\u9636\u6BB5\u7684 distilled principle / candidate artifact",\u8F93\u51FA:"`DreamerOutput` \xB7 1-5 \u4E2A\u5019\u9009\uFF0C\u6BCF\u4E2A\u542B badDecision / betterDecision / riskLevel / strategicPerspective",\u6CE8\u610F:"\u5185\u5316\u4EFB\u52A1\u7531 PD Service Host \u9A71\u52A8\u7684\u6709\u754C worker \u5468\u671F\u7EDF\u4E00\u6D88\u8D39\u3002\u9ED8\u8BA4 internalization_full_chain=ON \u65F6\u81EA\u52A8\u63A8\u8FDB dreamer\u2192philosopher\u2192scribe\u2192artificer\u2192evaluator\u2192rollout_reviewer\uFF1B\u5173\u95ED\u540E\u53EA\u81EA\u52A8\u8FD0\u884C dreamer\u3002\u65E0\u8BBA\u54EA\u79CD\u6A21\u5F0F\uFF0C\u4EBA\u5DE5\u5173\u5361\u90FD\u662F\u5BA1\u6279\u961F\u5217\u4E2D\u7684 Owner \u5BA1\u6279\u3002"},techDetailEn:{Input:"Distilled principle / candidate artifact from the diagnosis stage",Output:"`DreamerOutput` \xB7 1-5 candidates, each with badDecision / betterDecision / riskLevel / strategicPerspective",Note:"Internalization tasks are consumed by bounded worker cycles driven by the PD Service Host. With internalization_full_chain=ON (default), auto-consumption advances dreamer\u2192philosopher\u2192scribe\u2192artificer\u2192evaluator\u2192rollout_reviewer; with it OFF, only dreamer runs automatically. In both modes, the human gate is Owner approval in the approval queue."},isCore:!0},scribe:{name:"scribe",group:"core_trio",displayNameZh:"\u6284\u5199\u5458",displayNameEn:"Scribe",roleZh:"\u628A\u65B9\u6848\u5199\u6210\u6B63\u5F0F\u7684\u539F\u5219\u6761\u6587",roleEn:"Writes the chosen option into a formal principle statement",detailZh:`\u68A6\u60F3\u5BB6\u7ED9\u51FA\u591A\u4E2A\u65B9\u6848\u540E\uFF0C\u6284\u5199\u5458\u8D1F\u8D23\u628A\u9009\u4E2D\u7684\u65B9\u6848\u8F6C\u5199\u6210\u6E05\u6670\u3001\u53EF\u6267\u884C\u7684\u539F\u5219\u6761\u6587\u2014\u2014\u5C31\u50CF\u628A\u4F1A\u8BAE\u7EAA\u8981\u6574\u7406\u6210\u6B63\u5F0F\u6587\u6863\u3002
81
81
 
82
82
  \u8FD9\u6761\u539F\u5219\u6587\u672C\u662F\u540E\u7EED\u6240\u6709\u5DE5\u4F5C\u7684\u627F\u8F7D\u8005\uFF1A\u8BC4\u4F30\u5458\u4F1A\u53CD\u5411\u6EAF\u6E90\u5230\u8FD9\u91CC\u505A\u8D28\u91CF\u6821\u9A8C\u3002`,detailEn:`After the Dreamer proposes multiple options, the Scribe transforms the selected one into a clear, executable principle statement \u2014 like turning meeting notes into a formal document.
83
83
 
@@ -91,9 +91,9 @@ It returns an approved / needs_revision / rejected decision. Only approved princ
91
91
 
92
92
  Disabling it means the Dreamer output goes directly to the Scribe; principles may be slightly rougher, but can still be edited during Owner review.`,impactLevel:"green",impactZh:"\u65E0\u5F71\u54CD\u3002Dreamer \u4EA7\u51FA\u76F4\u63A5\u7ED9 Scribe\uFF0C\u8D28\u91CF\u7565\u7C97\u4F46\u4EBA\u5DE5\u5BA1\u6279\u53EF\u7EA0\u6B63\u3002\u5C5E\u8BBE\u8BA1\u9884\u671F\u3002",impactEn:"No impact. Dreamer output goes directly to Scribe; slightly rougher quality but Owner review can correct. This is by design.",techDetailZh:{"MVP \u72B6\u6001":"MVP-Quiet\uFF08ADR-0014 \xA72.5\uFF09\u3002\u9ED8\u8BA4\u5173\u95ED\uFF0C\u4EE3\u7801\u4FDD\u7559\u3002",\u8F93\u51FA:"`PhilosopherOutputV1` \xB7 principleCandidate + sourceDreamerArtifactId"},techDetailEn:{"MVP status":"MVP-Quiet (ADR-0014 \xA72.5). Off by default; code retained.",Output:"`PhilosopherOutputV1` \xB7 principleCandidate + sourceDreamerArtifactId"},isCore:!1,mvpNoteZh:"MVP-Quiet\uFF08ADR-0014 \xA72.5\uFF09\u3002\u9ED8\u8BA4\u5173\u95ED\uFF0C\u4EE3\u7801\u4FDD\u7559\u3002",mvpNoteEn:"MVP-Quiet (ADR-0014 \xA72.5). Off by default; code retained."},rolloutReviewer:{name:"rolloutReviewer",group:"quality_polish",displayNameZh:"\u4E0A\u7EBF\u8BC4\u5BA1\u5458",displayNameEn:"Rollout Reviewer",roleZh:"\u539F\u5219\u751F\u6548\u524D\u7684\u6700\u540E\u4E00\u9053\u5BA1\u67E5",roleEn:"Final review before a principle goes live",detailZh:`\u8BC4\u4F30\u5458\u901A\u8FC7\u540E\uFF0C\u4E0A\u7EBF\u8BC4\u5BA1\u5458\u505A\u6700\u7EC8\u628A\u5173\u2014\u2014\u8BC4\u4F30\u4E0A\u7EBF\u98CE\u9669\u3001\u5B89\u5168\u68C0\u67E5\uFF0C\u51B3\u5B9A\u662F\u5426\u771F\u7684\u63A8\u5411 rollout\u3002
93
93
 
94
- \u5B83\u5728 MVP_CORE_TASK_KINDS \u767D\u540D\u5355\u4E2D\uFF08\u961F\u5217\u53EF\u89C1\uFF09\uFF0C\u4F46 auto-consumer \u4E0D\u4F1A\u81EA\u52A8\u63A8\u8FDB\u5B83\u2014\u2014\u4F5C\u4E3A\u539F\u5219\u8FDB\u5165 approval \u961F\u5217\u524D\u7684\u6700\u540E\u4E00\u9053\u4EBA\u5DE5\u5173\uFF0C\u7531 Owner \u624B\u52A8\u89E6\u53D1\u3002`,detailEn:`After the Evaluator passes, the Rollout Reviewer does the final gate \u2014 assessing rollout risks and safety checks, deciding whether to actually push to rollout.
94
+ \u5B83\u5728 MVP_CORE_TASK_KINDS \u767D\u540D\u5355\u4E2D\uFF08\u961F\u5217\u53EF\u89C1\uFF09\uFF0C\u4F46\u81EA\u52A8\u6D88\u8D39\u4E0D\u4F1A\u81EA\u52A8\u63A8\u8FDB\u5B83\u2014\u2014\u4F5C\u4E3A\u539F\u5219\u8FDB\u5165 approval \u961F\u5217\u524D\u7684\u6700\u540E\u4E00\u9053\u4EBA\u5DE5\u5173\uFF0C\u7531 Owner \u624B\u52A8\u89E6\u53D1\u3002`,detailEn:`After the Evaluator passes, the Rollout Reviewer does the final gate \u2014 assessing rollout risks and safety checks, deciding whether to actually push to rollout.
95
95
 
96
- It is in the MVP_CORE_TASK_KINDS whitelist (visible in the queue), but the auto-consumer does NOT advance it \u2014 it is the last manual Owner gate before the approval queue, triggered by hand.`,impactLevel:"green",impactZh:"\u624B\u52A8\u89E6\u53D1\u7684\u6700\u540E\u5173\u3002\u4E0D\u88AB auto-consumer \u81EA\u52A8\u6D88\u8D39\u3002",impactEn:"Manual last gate. Not auto-consumed by the auto-consumer.",techDetailZh:{"MVP \u72B6\u6001":"MVP-Core\uFF08\u624B\u52A8\uFF09\u3002\u5728 `MVP_CORE_TASK_KINDS` \u4E2D\uFF0C\u4F46\u4E0D\u88AB auto-consumer \u81EA\u52A8\u63A8\u8FDB\u2014\u2014\u7531 Owner \u624B\u52A8\u89E6\u53D1\uFF08`pd runtime internalization run-once --runner rollout_reviewer`\uFF09\u3002",\u8F93\u51FA:"`RolloutReviewerOutputV1` \xB7 approve_rollout / needs_revision / reject + rolloutRisks + safetyChecks",\u5B9E\u73B0:"\u552F\u4E00\u4E0D\u7EE7\u627F `BasePeerRunner` \u7684 peer runner"},techDetailEn:{"MVP status":"MVP-Core (manual). In `MVP_CORE_TASK_KINDS`, but NOT auto-advanced \u2014 triggered by hand (pd runtime internalization run-once --runner rollout_reviewer).",Output:"`RolloutReviewerOutputV1` \xB7 approve_rollout / needs_revision / reject + rolloutRisks + safetyChecks",Implementation:"The only peer runner that does not extend `BasePeerRunner`"},isCore:!0,mvpNoteZh:"MVP-Core\uFF08\u624B\u52A8\u89E6\u53D1\uFF09\u3002\u5728\u767D\u540D\u5355\u4E2D\u4F46\u4E0D\u88AB auto-consumer \u81EA\u52A8\u6D88\u8D39\u3002",mvpNoteEn:"MVP-Core (manual trigger). In the whitelist but not auto-consumed."},correctionObserver:{name:"correctionObserver",group:"sidechain",displayNameZh:"\u7EA0\u6B63\u89C2\u5BDF\u5458",displayNameEn:"Correction Observer",roleZh:'\u540E\u53F0\u4F18\u5316"\u7EA0\u9519\u5173\u952E\u8BCD"\uFF0C\u51CF\u5C11\u8BEF\u62A5',roleEn:'Background optimizer for "correction keywords", reducing false positives',detailZh:`PD \u7528\u4E00\u7EC4\u5173\u952E\u8BCD\u68C0\u6D4B Agent \u662F\u5426\u5728\u88AB\u7EA0\u6B63\u3002\u4F46\u5173\u952E\u8BCD\u4F1A\u8FC7\u65F6\u6216\u8BEF\u62A5\u3002\u7EA0\u6B63\u89C2\u5BDF\u5458\u5B9A\u671F\u5BA1\u67E5\u5386\u53F2\uFF0C\u81EA\u52A8\u8C03\u6574\u5173\u952E\u8BCD\u6743\u91CD\uFF0C\u8870\u51CF\u8BEF\u62A5\u3002
96
+ It is in the MVP_CORE_TASK_KINDS whitelist (visible in the queue), but automatic consumption does NOT advance it \u2014 it is the last manual Owner gate before the approval queue, triggered by hand.`,impactLevel:"green",impactZh:"\u624B\u52A8\u89E6\u53D1\u7684\u6700\u540E\u5173\u3002\u4E0D\u5728\u81EA\u52A8\u6D88\u8D39\u8303\u56F4\u5185\u3002",impactEn:"Manual last gate. Not in automatic consumption scope.",techDetailZh:{"MVP \u72B6\u6001":"MVP-Core\uFF08\u624B\u52A8\uFF09\u3002\u5728 `MVP_CORE_TASK_KINDS` \u4E2D\uFF0C\u4F46\u4E0D\u81EA\u52A8\u63A8\u8FDB\u2014\u2014\u7531 Owner \u624B\u52A8\u89E6\u53D1\uFF08`pd runtime internalization run-once --runner rollout_reviewer`\uFF09\u3002",\u8F93\u51FA:"`RolloutReviewerOutputV1` \xB7 approve_rollout / needs_revision / reject + rolloutRisks + safetyChecks",\u5B9E\u73B0:"\u552F\u4E00\u4E0D\u7EE7\u627F `BasePeerRunner` \u7684 peer runner"},techDetailEn:{"MVP status":"MVP-Core (manual). In `MVP_CORE_TASK_KINDS`, but NOT auto-advanced \u2014 triggered by hand (pd runtime internalization run-once --runner rollout_reviewer).",Output:"`RolloutReviewerOutputV1` \xB7 approve_rollout / needs_revision / reject + rolloutRisks + safetyChecks",Implementation:"The only peer runner that does not extend `BasePeerRunner`"},isCore:!0,mvpNoteZh:"MVP-Core\uFF08\u624B\u52A8\u89E6\u53D1\uFF09\u3002\u5728\u767D\u540D\u5355\u4E2D\u4F46\u4E0D\u5728\u81EA\u52A8\u6D88\u8D39\u8303\u56F4\u5185\u3002",mvpNoteEn:"MVP-Core (manual trigger). In the whitelist but not auto-consumed."},correctionObserver:{name:"correctionObserver",group:"sidechain",displayNameZh:"\u7EA0\u6B63\u89C2\u5BDF\u5458",displayNameEn:"Correction Observer",roleZh:'\u540E\u53F0\u4F18\u5316"\u7EA0\u9519\u5173\u952E\u8BCD"\uFF0C\u51CF\u5C11\u8BEF\u62A5',roleEn:'Background optimizer for "correction keywords", reducing false positives',detailZh:`PD \u7528\u4E00\u7EC4\u5173\u952E\u8BCD\u68C0\u6D4B Agent \u662F\u5426\u5728\u88AB\u7EA0\u6B63\u3002\u4F46\u5173\u952E\u8BCD\u4F1A\u8FC7\u65F6\u6216\u8BEF\u62A5\u3002\u7EA0\u6B63\u89C2\u5BDF\u5458\u5B9A\u671F\u5BA1\u67E5\u5386\u53F2\uFF0C\u81EA\u52A8\u8C03\u6574\u5173\u952E\u8BCD\u6743\u91CD\uFF0C\u8870\u51CF\u8BEF\u62A5\u3002
97
97
 
98
98
  \u5B83\u5728\u540E\u53F0\u6BCF 15 \u5206\u949F\u8DD1\u4E00\u6B21\uFF0C\u4E0D\u5F71\u54CD\u4E3B\u7BA1\u9053\u3002`,detailEn:`PD uses a set of keywords to detect whether an Agent is being corrected. But keywords go stale or produce false positives. The Correction Observer periodically reviews history, auto-adjusting keyword weights and decaying false positives.
99
99
 
@@ -24,6 +24,7 @@ import type { EvaluatorRunner } from './internalization/evaluator-runner.js';
24
24
  import type { RuntimeStateManager } from './store/runtime-state-manager.js';
25
25
  import type { PIArtifactStore } from './internalization/pi-artifact.js';
26
26
  import type { EvaluatorAdversarialResult } from './internalization/evaluator-output.js';
27
+ import type { CommitNextTaskResult } from './internalization/internalization-orchestrator.js';
27
28
  /** PRD hard cap on adversarial rounds. */
28
29
  export declare const DEFAULT_MAX_ROUNDS = 2;
29
30
  export interface AdversarialLoopInput {
@@ -40,6 +41,13 @@ export interface AdversarialLoopInput {
40
41
  readonly correlationId?: string;
41
42
  /** Channel for created tasks (default 'prompt'). */
42
43
  readonly channel?: 'prompt' | 'code_tool_hook' | 'defer_archive';
44
+ /**
45
+ * Formal completion-transition authority. Production hosts must inject
46
+ * InternalizationOrchestrator.commitNextTaskProposal. Repair completion and
47
+ * upstream-revision cascades both go through this single authority; the loop
48
+ * deliberately has no fallback that creates a parallel evaluator chain.
49
+ */
50
+ readonly commitTaskTransition?: (taskId: string) => Promise<CommitNextTaskResult>;
43
51
  }
44
52
  export interface AdversarialLoopResult {
45
53
  /** Final outcome. 'approved' = rule artifact written; 'rejected' = degraded. */
@@ -1 +1 @@
1
- {"version":3,"file":"adversarial-loop.d.ts","sourceRoot":"","sources":["../../src/runtime/adversarial-loop.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAExE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,uCAAuC,CAAC;AAKxF,0CAA0C;AAC1C,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAEpC,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,eAAe,EAAE,eAAe,CAAC;IAC1C,QAAQ,CAAC,eAAe,EAAE,eAAe,CAAC;IAC1C,QAAQ,CAAC,YAAY,EAAE,mBAAmB,CAAC;IAC3C,+EAA+E;IAC/E,QAAQ,CAAC,aAAa,EAAE,eAAe,CAAC;IACxC,8DAA8D;IAC9D,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,gEAAgE;IAChE,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,oEAAoE;IACpE,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,oDAAoD;IACpD,QAAQ,CAAC,OAAO,CAAC,EAAE,QAAQ,GAAG,gBAAgB,GAAG,eAAe,CAAC;CAClE;AAED,MAAM,WAAW,qBAAqB;IACpC,gFAAgF;IAChF,QAAQ,CAAC,QAAQ,EAAE,UAAU,GAAG,UAAU,CAAC;IAC3C,yDAAyD;IACzD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,oEAAoE;IACpE,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;IACtC,sDAAsD;IACtD,QAAQ,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IACvC,0EAA0E;IAC1E,QAAQ,CAAC,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5C,iEAAiE;IACjE,QAAQ,CAAC,iBAAiB,CAAC,EAAE,0BAA0B,CAAC;IACxD,sDAAsD;IACtD,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;CACrC;AAED;;;GAGG;AACH,wBAAsB,kBAAkB,CAAC,KAAK,EAAE,oBAAoB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CA6JpG"}
1
+ {"version":3,"file":"adversarial-loop.d.ts","sourceRoot":"","sources":["../../src/runtime/adversarial-loop.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAExE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,uCAAuC,CAAC;AAUxF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mDAAmD,CAAC;AAG9F,0CAA0C;AAC1C,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAEpC,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,eAAe,EAAE,eAAe,CAAC;IAC1C,QAAQ,CAAC,eAAe,EAAE,eAAe,CAAC;IAC1C,QAAQ,CAAC,YAAY,EAAE,mBAAmB,CAAC;IAC3C,+EAA+E;IAC/E,QAAQ,CAAC,aAAa,EAAE,eAAe,CAAC;IACxC,8DAA8D;IAC9D,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,gEAAgE;IAChE,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,oEAAoE;IACpE,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,oDAAoD;IACpD,QAAQ,CAAC,OAAO,CAAC,EAAE,QAAQ,GAAG,gBAAgB,GAAG,eAAe,CAAC;IACjE;;;;;OAKG;IACH,QAAQ,CAAC,oBAAoB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,oBAAoB,CAAC,CAAC;CACnF;AAED,MAAM,WAAW,qBAAqB;IACpC,gFAAgF;IAChF,QAAQ,CAAC,QAAQ,EAAE,UAAU,GAAG,UAAU,CAAC;IAC3C,yDAAyD;IACzD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,oEAAoE;IACpE,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;IACtC,sDAAsD;IACtD,QAAQ,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IACvC,0EAA0E;IAC1E,QAAQ,CAAC,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5C,iEAAiE;IACjE,QAAQ,CAAC,iBAAiB,CAAC,EAAE,0BAA0B,CAAC;IACxD,sDAAsD;IACtD,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;CACrC;AAuED;;;GAGG;AACH,wBAAsB,kBAAkB,CAAC,KAAK,EAAE,oBAAoB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAkWpG"}