@telora/daemon 0.22.181 → 0.22.189

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 (263) hide show
  1. package/build-info.json +9 -3
  2. package/dist/audit/audit-floor-policy.d.ts +188 -0
  3. package/dist/audit/audit-floor-policy.d.ts.map +1 -0
  4. package/dist/audit/audit-floor-policy.js +353 -0
  5. package/dist/audit/audit-floor-policy.js.map +1 -0
  6. package/dist/audit/audit-prompt.d.ts +4 -177
  7. package/dist/audit/audit-prompt.d.ts.map +1 -1
  8. package/dist/audit/audit-prompt.js +6 -329
  9. package/dist/audit/audit-prompt.js.map +1 -1
  10. package/dist/completion/escalations.d.ts.map +1 -1
  11. package/dist/completion/escalations.js +4 -1
  12. package/dist/completion/escalations.js.map +1 -1
  13. package/dist/completion/review-exit-phase.d.ts.map +1 -1
  14. package/dist/completion/review-exit-phase.js +11 -4
  15. package/dist/completion/review-exit-phase.js.map +1 -1
  16. package/dist/completion/standing-approval-convergence.d.ts.map +1 -1
  17. package/dist/completion/standing-approval-convergence.js +2 -1
  18. package/dist/completion/standing-approval-convergence.js.map +1 -1
  19. package/dist/focus/focus-executor.d.ts.map +1 -1
  20. package/dist/focus/focus-executor.js +2 -0
  21. package/dist/focus/focus-executor.js.map +1 -1
  22. package/dist/focus/focus-loop-registry.js +2 -2
  23. package/dist/focus/focus-loop-registry.js.map +1 -1
  24. package/dist/focus/session-health.d.ts.map +1 -1
  25. package/dist/focus/session-health.js +2 -1
  26. package/dist/focus/session-health.js.map +1 -1
  27. package/dist/focus-stage-lifecycle/planning-release.d.ts +52 -17
  28. package/dist/focus-stage-lifecycle/planning-release.d.ts.map +1 -1
  29. package/dist/focus-stage-lifecycle/planning-release.js +58 -70
  30. package/dist/focus-stage-lifecycle/planning-release.js.map +1 -1
  31. package/dist/focus-stage-lifecycle/ratify-bar-gate.d.ts +108 -0
  32. package/dist/focus-stage-lifecycle/ratify-bar-gate.d.ts.map +1 -0
  33. package/dist/focus-stage-lifecycle/ratify-bar-gate.js +174 -0
  34. package/dist/focus-stage-lifecycle/ratify-bar-gate.js.map +1 -0
  35. package/dist/git/merge-to-main.d.ts.map +1 -1
  36. package/dist/git/merge-to-main.js.map +1 -1
  37. package/dist/loops/llm-client.d.ts +1 -1
  38. package/dist/loops/llm-client.d.ts.map +1 -1
  39. package/dist/loops/llm-client.js +18 -105
  40. package/dist/loops/llm-client.js.map +1 -1
  41. package/dist/nexus/index.d.ts.map +1 -1
  42. package/dist/nexus/index.js +2 -1
  43. package/dist/nexus/index.js.map +1 -1
  44. package/dist/nexus/intake-prompt-sections.d.ts +70 -0
  45. package/dist/nexus/intake-prompt-sections.d.ts.map +1 -0
  46. package/dist/nexus/intake-prompt-sections.js +145 -0
  47. package/dist/nexus/intake-prompt-sections.js.map +1 -0
  48. package/dist/nexus/intake-spawn.d.ts +49 -13
  49. package/dist/nexus/intake-spawn.d.ts.map +1 -1
  50. package/dist/nexus/intake-spawn.js +45 -122
  51. package/dist/nexus/intake-spawn.js.map +1 -1
  52. package/dist/nexus/intake.d.ts +55 -0
  53. package/dist/nexus/intake.d.ts.map +1 -1
  54. package/dist/nexus/intake.js +62 -1
  55. package/dist/nexus/intake.js.map +1 -1
  56. package/dist/prd/arm-readiness.d.ts +93 -0
  57. package/dist/prd/arm-readiness.d.ts.map +1 -0
  58. package/dist/prd/arm-readiness.js +254 -0
  59. package/dist/prd/arm-readiness.js.map +1 -0
  60. package/dist/prd/arm-refusal.d.ts +149 -0
  61. package/dist/prd/arm-refusal.d.ts.map +1 -0
  62. package/dist/prd/arm-refusal.js +219 -0
  63. package/dist/prd/arm-refusal.js.map +1 -0
  64. package/dist/prd/controller-shared.d.ts +111 -0
  65. package/dist/prd/controller-shared.d.ts.map +1 -1
  66. package/dist/prd/controller-shared.js +3 -1
  67. package/dist/prd/controller-shared.js.map +1 -1
  68. package/dist/prd/controller.d.ts +16 -10
  69. package/dist/prd/controller.d.ts.map +1 -1
  70. package/dist/prd/controller.js +28 -35
  71. package/dist/prd/controller.js.map +1 -1
  72. package/dist/prd/frontier-arming.d.ts +151 -0
  73. package/dist/prd/frontier-arming.d.ts.map +1 -0
  74. package/dist/prd/frontier-arming.js +315 -0
  75. package/dist/prd/frontier-arming.js.map +1 -0
  76. package/dist/prd/index.d.ts +10 -1
  77. package/dist/prd/index.d.ts.map +1 -1
  78. package/dist/prd/index.js +9 -1
  79. package/dist/prd/index.js.map +1 -1
  80. package/dist/prd/scoping-prompt.d.ts +68 -0
  81. package/dist/prd/scoping-prompt.d.ts.map +1 -0
  82. package/dist/prd/scoping-prompt.js +86 -0
  83. package/dist/prd/scoping-prompt.js.map +1 -0
  84. package/dist/prompt/prompt-contradictions.d.ts +20 -1
  85. package/dist/prompt/prompt-contradictions.d.ts.map +1 -1
  86. package/dist/prompt/prompt-contradictions.js +35 -0
  87. package/dist/prompt/prompt-contradictions.js.map +1 -1
  88. package/dist/prompt/team-prompt-base.d.ts +18 -0
  89. package/dist/prompt/team-prompt-base.d.ts.map +1 -1
  90. package/dist/prompt/team-prompt-base.js +56 -11
  91. package/dist/prompt/team-prompt-base.js.map +1 -1
  92. package/dist/prompt-sections/persona-sections.d.ts +36 -13
  93. package/dist/prompt-sections/persona-sections.d.ts.map +1 -1
  94. package/dist/prompt-sections/persona-sections.js +93 -16
  95. package/dist/prompt-sections/persona-sections.js.map +1 -1
  96. package/dist/prompt-sections/scoping-sections.d.ts +19 -5
  97. package/dist/prompt-sections/scoping-sections.d.ts.map +1 -1
  98. package/dist/prompt-sections/scoping-sections.js +45 -38
  99. package/dist/prompt-sections/scoping-sections.js.map +1 -1
  100. package/dist/prompt-sections/shared.d.ts +8 -0
  101. package/dist/prompt-sections/shared.d.ts.map +1 -1
  102. package/dist/prompt-sections/shared.js.map +1 -1
  103. package/dist/queries/agent-resolvable-promotion.d.ts +12 -0
  104. package/dist/queries/agent-resolvable-promotion.d.ts.map +1 -1
  105. package/dist/queries/agent-resolvable-promotion.js +17 -6
  106. package/dist/queries/agent-resolvable-promotion.js.map +1 -1
  107. package/dist/queries/delivery-gate-state.d.ts +3 -0
  108. package/dist/queries/delivery-gate-state.d.ts.map +1 -1
  109. package/dist/queries/delivery-gate-state.js +1 -1
  110. package/dist/queries/delivery-gate-state.js.map +1 -1
  111. package/dist/queries/focus-criteria-standing.d.ts +170 -7
  112. package/dist/queries/focus-criteria-standing.d.ts.map +1 -1
  113. package/dist/queries/focus-criteria-standing.js +143 -8
  114. package/dist/queries/focus-criteria-standing.js.map +1 -1
  115. package/dist/queries/focus-ratify-release.d.ts +43 -0
  116. package/dist/queries/focus-ratify-release.d.ts.map +1 -0
  117. package/dist/queries/focus-ratify-release.js +45 -0
  118. package/dist/queries/focus-ratify-release.js.map +1 -0
  119. package/dist/queries/focuses.d.ts +0 -10
  120. package/dist/queries/focuses.d.ts.map +1 -1
  121. package/dist/queries/focuses.js +0 -14
  122. package/dist/queries/focuses.js.map +1 -1
  123. package/dist/queries/prd.d.ts +31 -0
  124. package/dist/queries/prd.d.ts.map +1 -1
  125. package/dist/queries/prd.js +26 -1
  126. package/dist/queries/prd.js.map +1 -1
  127. package/dist/queries/shared.js +1 -1
  128. package/dist/queries/verify-own-holds.d.ts +89 -0
  129. package/dist/queries/verify-own-holds.d.ts.map +1 -0
  130. package/dist/queries/verify-own-holds.js +93 -0
  131. package/dist/queries/verify-own-holds.js.map +1 -0
  132. package/dist/resolvers/focus-criteria-standing.d.ts.map +1 -1
  133. package/dist/resolvers/focus-criteria-standing.js +324 -25
  134. package/dist/resolvers/focus-criteria-standing.js.map +1 -1
  135. package/dist/security/security-auto-inject.d.ts +51 -0
  136. package/dist/security/security-auto-inject.d.ts.map +1 -1
  137. package/dist/security/security-auto-inject.js +101 -11
  138. package/dist/security/security-auto-inject.js.map +1 -1
  139. package/dist/security/security-scan-engine.d.ts +4 -4
  140. package/dist/security/security-scan-engine.d.ts.map +1 -1
  141. package/dist/security/security-scan-engine.js +6 -0
  142. package/dist/security/security-scan-engine.js.map +1 -1
  143. package/dist/session/session-lineage.d.ts.map +1 -1
  144. package/dist/session/session-lineage.js +2 -0
  145. package/dist/session/session-lineage.js.map +1 -1
  146. package/dist/shell/constants.d.ts +5 -0
  147. package/dist/shell/constants.d.ts.map +1 -1
  148. package/dist/shell/constants.js +5 -0
  149. package/dist/shell/constants.js.map +1 -1
  150. package/dist/shell/daemon-instance.d.ts +74 -64
  151. package/dist/shell/daemon-instance.d.ts.map +1 -1
  152. package/dist/shell/daemon-instance.js +16 -121
  153. package/dist/shell/daemon-instance.js.map +1 -1
  154. package/dist/shell/health-events.js +1 -1
  155. package/dist/shell/health-events.js.map +1 -1
  156. package/dist/shell/instance-liveness.d.ts +112 -0
  157. package/dist/shell/instance-liveness.d.ts.map +1 -0
  158. package/dist/shell/instance-liveness.js +205 -0
  159. package/dist/shell/instance-liveness.js.map +1 -0
  160. package/dist/shell/schema-version-gate.d.ts +22 -0
  161. package/dist/shell/schema-version-gate.d.ts.map +1 -1
  162. package/dist/shell/schema-version-gate.js +116 -6
  163. package/dist/shell/schema-version-gate.js.map +1 -1
  164. package/dist/shell/worker-pidfile.d.ts +21 -8
  165. package/dist/shell/worker-pidfile.d.ts.map +1 -1
  166. package/dist/shell/worker-pidfile.js +38 -9
  167. package/dist/shell/worker-pidfile.js.map +1 -1
  168. package/dist/spawn/lead-launch.d.ts.map +1 -1
  169. package/dist/spawn/lead-launch.js +2 -1
  170. package/dist/spawn/lead-launch.js.map +1 -1
  171. package/dist/spawn/one-shot-model.d.ts +145 -0
  172. package/dist/spawn/one-shot-model.d.ts.map +1 -0
  173. package/dist/spawn/one-shot-model.js +329 -0
  174. package/dist/spawn/one-shot-model.js.map +1 -0
  175. package/dist/spawn/one-shot-scoping-spawn.d.ts +51 -0
  176. package/dist/spawn/one-shot-scoping-spawn.d.ts.map +1 -0
  177. package/dist/spawn/one-shot-scoping-spawn.js +156 -0
  178. package/dist/spawn/one-shot-scoping-spawn.js.map +1 -0
  179. package/dist/spawn/process-spawn.d.ts +12 -0
  180. package/dist/spawn/process-spawn.d.ts.map +1 -1
  181. package/dist/spawn/process-spawn.js +1 -1
  182. package/dist/spawn/process-spawn.js.map +1 -1
  183. package/dist/spawn/prompt-assembly.d.ts +8 -0
  184. package/dist/spawn/prompt-assembly.d.ts.map +1 -1
  185. package/dist/spawn/prompt-assembly.js +15 -3
  186. package/dist/spawn/prompt-assembly.js.map +1 -1
  187. package/dist/spawn/review-hold-park.d.ts.map +1 -1
  188. package/dist/spawn/review-hold-park.js +7 -3
  189. package/dist/spawn/review-hold-park.js.map +1 -1
  190. package/dist/spawn/routing-decider-spawn.d.ts +30 -0
  191. package/dist/spawn/routing-decider-spawn.d.ts.map +1 -1
  192. package/dist/spawn/routing-decider-spawn.js +84 -2
  193. package/dist/spawn/routing-decider-spawn.js.map +1 -1
  194. package/dist/spawn/routing-decider.d.ts.map +1 -1
  195. package/dist/spawn/routing-decider.js +22 -0
  196. package/dist/spawn/routing-decider.js.map +1 -1
  197. package/dist/spawn/spawn-cooldown.d.ts +15 -1
  198. package/dist/spawn/spawn-cooldown.d.ts.map +1 -1
  199. package/dist/spawn/spawn-cooldown.js +67 -19
  200. package/dist/spawn/spawn-cooldown.js.map +1 -1
  201. package/dist/spawn/worktree-session.d.ts +24 -6
  202. package/dist/spawn/worktree-session.d.ts.map +1 -1
  203. package/dist/spawn/worktree-session.js +37 -14
  204. package/dist/spawn/worktree-session.js.map +1 -1
  205. package/dist/testing/arm-coverage-model.d.ts +75 -0
  206. package/dist/testing/arm-coverage-model.d.ts.map +1 -0
  207. package/dist/testing/arm-coverage-model.js +114 -0
  208. package/dist/testing/arm-coverage-model.js.map +1 -0
  209. package/dist/testing/fixtures/index.js +1 -1
  210. package/dist/types/index.js +1 -1
  211. package/dist/verify/ai-inspection-runner.d.ts.map +1 -1
  212. package/dist/verify/ai-inspection-runner.js +26 -7
  213. package/dist/verify/ai-inspection-runner.js.map +1 -1
  214. package/dist/verify/de-restatement.d.ts +9 -2
  215. package/dist/verify/de-restatement.d.ts.map +1 -1
  216. package/dist/verify/de-restatement.js +14 -76
  217. package/dist/verify/de-restatement.js.map +1 -1
  218. package/dist/verify/default-on-guards.d.ts +5 -2
  219. package/dist/verify/default-on-guards.d.ts.map +1 -1
  220. package/dist/verify/default-on-guards.js +5 -3
  221. package/dist/verify/default-on-guards.js.map +1 -1
  222. package/dist/verify/verification-boundary-env.d.ts +7 -2
  223. package/dist/verify/verification-boundary-env.d.ts.map +1 -1
  224. package/dist/verify/verification-boundary-env.js +9 -4
  225. package/dist/verify/verification-boundary-env.js.map +1 -1
  226. package/dist/verify/verification-deps-default.d.ts.map +1 -1
  227. package/dist/verify/verification-deps-default.js +6 -0
  228. package/dist/verify/verification-deps-default.js.map +1 -1
  229. package/dist/verify/verification-deps.d.ts +10 -0
  230. package/dist/verify/verification-deps.d.ts.map +1 -1
  231. package/dist/verify/verification-deterministic.d.ts +7 -0
  232. package/dist/verify/verification-deterministic.d.ts.map +1 -1
  233. package/dist/verify/verification-deterministic.js.map +1 -1
  234. package/dist/verify/verification-engine.d.ts +1 -20
  235. package/dist/verify/verification-engine.d.ts.map +1 -1
  236. package/dist/verify/verification-engine.js +24 -55
  237. package/dist/verify/verification-engine.js.map +1 -1
  238. package/dist/verify/verification-evidence-unavailable-feedback.d.ts +3 -1
  239. package/dist/verify/verification-evidence-unavailable-feedback.d.ts.map +1 -1
  240. package/dist/verify/verification-evidence-unavailable-feedback.js +3 -1
  241. package/dist/verify/verification-evidence-unavailable-feedback.js.map +1 -1
  242. package/dist/verify/verification-feedback.d.ts +4 -12
  243. package/dist/verify/verification-feedback.d.ts.map +1 -1
  244. package/dist/verify/verification-feedback.js +7 -12
  245. package/dist/verify/verification-feedback.js.map +1 -1
  246. package/dist/verify/verification-history-reset.d.ts.map +1 -1
  247. package/dist/verify/verification-history-reset.js +11 -3
  248. package/dist/verify/verification-history-reset.js.map +1 -1
  249. package/dist/verify/verification-model-unavailable-hold.d.ts +92 -0
  250. package/dist/verify/verification-model-unavailable-hold.d.ts.map +1 -0
  251. package/dist/verify/verification-model-unavailable-hold.js +207 -0
  252. package/dist/verify/verification-model-unavailable-hold.js.map +1 -0
  253. package/dist/verify/verification-strategies.d.ts +32 -0
  254. package/dist/verify/verification-strategies.d.ts.map +1 -0
  255. package/dist/verify/verification-strategies.js +47 -0
  256. package/dist/verify/verification-strategies.js.map +1 -0
  257. package/dist/verify/verify-reconciliation.d.ts.map +1 -1
  258. package/dist/verify/verify-reconciliation.js +2 -1
  259. package/dist/verify/verify-reconciliation.js.map +1 -1
  260. package/dist/verify/verify-restatement.d.ts.map +1 -1
  261. package/dist/verify/verify-restatement.js +21 -8
  262. package/dist/verify/verify-restatement.js.map +1 -1
  263. package/package.json +2 -2
@@ -1,6 +1,16 @@
1
1
  /**
2
- * The FOCUS CRITERIA STANDING read: which of a focus's DECLARED acceptance
3
- * criteria its current deliveries address, and which remain open.
2
+ * The FOCUS CRITERIA STANDING read: what a focus is FOR, and where each part of
3
+ * it stands. Two statements, both carried: the futures of the undesired effects
4
+ * its ARM covers (met only when verify recorded the future as landed), and the
5
+ * focus's OWN declared acceptance criteria (addressed when a current delivery
6
+ * declares one).
7
+ *
8
+ * EVERY ENUM HERE IS A DEPLOY-ORDER CONTRACT. The schemas are `.passthrough()`,
9
+ * so a field the edge adds costs nothing -- but an enum VALUE the edge adds and
10
+ * this daemon has not learned throws, and the one reader turns a throw into the
11
+ * explicit READ FAILED line. So the widening ships FIRST and the edge second;
12
+ * every optional field below is optional for the same reason, read from the
13
+ * other side.
4
14
  *
5
15
  * Read through the `focus_criteria_standing` product-api action
6
16
  * (handlers/focus/criteria-standing.ts), which loads the focus's own
@@ -47,10 +57,39 @@ declare const CriterionMatchSchema: z.ZodObject<{
47
57
  significantTokenCount: z.ZodNumber;
48
58
  }, z.core.$loose>;
49
59
  /**
50
- * One criterion and where it stands. `status` IS enumerated: rendering a
51
- * criterion as addressed or open is the decision this whole section carries, so
52
- * an unrecognized status must fail the read loudly rather than be printed as if
53
- * it were understood.
60
+ * What VERIFY recorded about a tree criterion's node -- carried out of the
61
+ * edge's landing predicate (`supabase/functions/_shared/effect-future-landed.ts`) verbatim.
62
+ *
63
+ * Every field here is a plain string, NOT an enum, for the same reason
64
+ * `matchBasis` is: the resolver only ECHOES them into prose. The met/open
65
+ * decision hangs on `status` above, which IS enumerated, so a new landing basis
66
+ * added at the edge must not cost the pass its whole standing section.
67
+ */
68
+ declare const CriterionLandingSchema: z.ZodObject<{
69
+ standing: z.ZodString;
70
+ basis: z.ZodString;
71
+ classification: z.ZodNullable<z.ZodString>;
72
+ divergenceReason: z.ZodNullable<z.ZodString>;
73
+ }, z.core.$loose>;
74
+ /**
75
+ * One criterion and where it stands.
76
+ *
77
+ * `status` IS enumerated: rendering a criterion as met, addressed or open is
78
+ * the decision this whole section carries, so an unrecognized status must fail
79
+ * the read loudly rather than be printed as if it were understood. `'met'` and
80
+ * `'addressed'` are DIFFERENT claims and the resolver renders them as such --
81
+ * `'addressed'` says a delivery POINTS AT a declared criterion (scoping),
82
+ * `'met'` says verify RECORDED a tree criterion's declared future as landed
83
+ * (reality). A daemon that lacked `'met'` threw on every armed focus carrying
84
+ * one and rendered the READ FAILED line in place of the whole section; that is
85
+ * the failure this enum's width exists to prevent, and why widening it ships
86
+ * BEFORE the edge that emits the value.
87
+ *
88
+ * `source` and the three TREE-only fields are OPTIONAL, deliberately. The
89
+ * daemon deploys ahead of the edge, so for one window the edge answering this
90
+ * action is the older one that emits neither -- and a required field would
91
+ * invert the very deploy order this widening exists to honour. An absent
92
+ * `source` is rendered as UNSTATED rather than guessed at.
54
93
  */
55
94
  declare const CriterionStandingSchema: z.ZodObject<{
56
95
  criterion: z.ZodString;
@@ -62,11 +101,63 @@ declare const CriterionStandingSchema: z.ZodObject<{
62
101
  matchedTokens: z.ZodArray<z.ZodString>;
63
102
  significantTokenCount: z.ZodNumber;
64
103
  }, z.core.$loose>>;
104
+ evidence: z.ZodOptional<z.ZodArray<z.ZodObject<{
105
+ deliveryId: z.ZodString;
106
+ deliveryName: z.ZodString;
107
+ matchBasis: z.ZodString;
108
+ overlap: z.ZodNumber;
109
+ matchedTokens: z.ZodArray<z.ZodString>;
110
+ significantTokenCount: z.ZodNumber;
111
+ }, z.core.$loose>>>;
112
+ source: z.ZodOptional<z.ZodEnum<{
113
+ declared: "declared";
114
+ tree: "tree";
115
+ }>>;
116
+ nodeId: z.ZodOptional<z.ZodString>;
117
+ seq: z.ZodOptional<z.ZodNumber>;
118
+ drafted: z.ZodOptional<z.ZodBoolean>;
119
+ landing: z.ZodOptional<z.ZodObject<{
120
+ standing: z.ZodString;
121
+ basis: z.ZodString;
122
+ classification: z.ZodNullable<z.ZodString>;
123
+ divergenceReason: z.ZodNullable<z.ZodString>;
124
+ }, z.core.$loose>>;
65
125
  status: z.ZodEnum<{
66
126
  open: "open";
67
127
  addressed: "addressed";
128
+ met: "met";
68
129
  }>;
69
130
  }, z.core.$loose>;
131
+ /**
132
+ * A covered undesired effect that states NO future. On an un-armed focus this
133
+ * is exactly what the arm would REFUSE on, named by the same `seq` the refusal
134
+ * message names -- which is the whole value of the un-armed preview.
135
+ */
136
+ declare const UnstatedCoveredEffectSchema: z.ZodObject<{
137
+ nodeId: z.ZodString;
138
+ seq: z.ZodNumber;
139
+ statement: z.ZodString;
140
+ }, z.core.$loose>;
141
+ /** A covered undesired effect whose future is only a MACHINE DRAFT. */
142
+ declare const DraftedCoveredEffectSchema: z.ZodObject<{
143
+ nodeId: z.ZodString;
144
+ seq: z.ZodNumber;
145
+ draft: z.ZodString;
146
+ }, z.core.$loose>;
147
+ /**
148
+ * The bounds the edge's TREE scans applied. OPTIONAL for the same reason
149
+ * `deliveryScan` is, and reported for a sharper reason: a truncated NODE scan
150
+ * can only move a criterion toward open, but a truncated EDGE scan SHRINKS a
151
+ * live-derived bar, so a caller must never be left to assume it saw the whole
152
+ * tree.
153
+ */
154
+ declare const TreeScanSchema: z.ZodObject<{
155
+ limit: z.ZodNumber;
156
+ injections: z.ZodNumber;
157
+ edges: z.ZodNumber;
158
+ nodes: z.ZodNumber;
159
+ truncated: z.ZodBoolean;
160
+ }, z.core.$loose>;
70
161
  /**
71
162
  * The bounds the edge's delivery scan applied. OPTIONAL on purpose: if a future
72
163
  * edge stops reporting it, the standing itself is still usable and the resolver
@@ -78,6 +169,8 @@ declare const DeliveryScanSchema: z.ZodObject<{
78
169
  scanned: z.ZodNumber;
79
170
  evaluated: z.ZodNumber;
80
171
  truncated: z.ZodBoolean;
172
+ anchors: z.ZodOptional<z.ZodNumber>;
173
+ anchorsTruncated: z.ZodOptional<z.ZodBoolean>;
81
174
  }, z.core.$loose>;
82
175
  /**
83
176
  * The standing. `floorBasis` is enumerated deliberately: `no_criteria_declared`
@@ -85,6 +178,17 @@ declare const DeliveryScanSchema: z.ZodObject<{
85
178
  * the entire point of the read. A basis this daemon cannot interpret must throw
86
179
  * -- rendering an unknown basis would be guessing at exactly the value that
87
180
  * decides whether the elaboration loop stops.
181
+ *
182
+ * `derived_live_unarmed` is the fourth member and a FIFTH situation: the tree
183
+ * half is a PREVIEW of the bar an arm would stamp, so there is no stamped bar
184
+ * to have reached. It is neither a floor nor a missed floor, and the resolver
185
+ * renders it as its own line.
186
+ *
187
+ * `treeBasis` is enumerated for the same reason -- it answers "whose statement
188
+ * of the bar am I reading", and an un-armed PREVIEW must never be rendered as
189
+ * the arm's own stamp -- but it is OPTIONAL: an edge predating the tree half
190
+ * reports none, and the resolver says the tree half was not reported rather
191
+ * than inventing one.
88
192
  */
89
193
  export declare const FocusCriteriaStandingSchema: z.ZodObject<{
90
194
  focusId: z.ZodString;
@@ -98,9 +202,31 @@ export declare const FocusCriteriaStandingSchema: z.ZodObject<{
98
202
  matchedTokens: z.ZodArray<z.ZodString>;
99
203
  significantTokenCount: z.ZodNumber;
100
204
  }, z.core.$loose>>;
205
+ evidence: z.ZodOptional<z.ZodArray<z.ZodObject<{
206
+ deliveryId: z.ZodString;
207
+ deliveryName: z.ZodString;
208
+ matchBasis: z.ZodString;
209
+ overlap: z.ZodNumber;
210
+ matchedTokens: z.ZodArray<z.ZodString>;
211
+ significantTokenCount: z.ZodNumber;
212
+ }, z.core.$loose>>>;
213
+ source: z.ZodOptional<z.ZodEnum<{
214
+ declared: "declared";
215
+ tree: "tree";
216
+ }>>;
217
+ nodeId: z.ZodOptional<z.ZodString>;
218
+ seq: z.ZodOptional<z.ZodNumber>;
219
+ drafted: z.ZodOptional<z.ZodBoolean>;
220
+ landing: z.ZodOptional<z.ZodObject<{
221
+ standing: z.ZodString;
222
+ basis: z.ZodString;
223
+ classification: z.ZodNullable<z.ZodString>;
224
+ divergenceReason: z.ZodNullable<z.ZodString>;
225
+ }, z.core.$loose>>;
101
226
  status: z.ZodEnum<{
102
227
  open: "open";
103
228
  addressed: "addressed";
229
+ met: "met";
104
230
  }>;
105
231
  }, z.core.$loose>>;
106
232
  floorReached: z.ZodBoolean;
@@ -108,21 +234,58 @@ export declare const FocusCriteriaStandingSchema: z.ZodObject<{
108
234
  all_criteria_addressed: "all_criteria_addressed";
109
235
  open_criteria_remain: "open_criteria_remain";
110
236
  no_criteria_declared: "no_criteria_declared";
237
+ derived_live_unarmed: "derived_live_unarmed";
238
+ derived_live_incomplete: "derived_live_incomplete";
111
239
  }>;
240
+ treeBasis: z.ZodOptional<z.ZodEnum<{
241
+ none: "none";
242
+ derived_live_unarmed: "derived_live_unarmed";
243
+ armed_stamp: "armed_stamp";
244
+ derived_live_unstamped_arm: "derived_live_unstamped_arm";
245
+ }>>;
246
+ unstatedCoveredEffects: z.ZodOptional<z.ZodArray<z.ZodObject<{
247
+ nodeId: z.ZodString;
248
+ seq: z.ZodNumber;
249
+ statement: z.ZodString;
250
+ }, z.core.$loose>>>;
251
+ draftedCoveredEffects: z.ZodOptional<z.ZodArray<z.ZodObject<{
252
+ nodeId: z.ZodString;
253
+ seq: z.ZodNumber;
254
+ draft: z.ZodString;
255
+ }, z.core.$loose>>>;
256
+ treeCoverageIncomplete: z.ZodOptional<z.ZodBoolean>;
257
+ armWouldRefuseNoEffect: z.ZodOptional<z.ZodBoolean>;
112
258
  openCriteria: z.ZodArray<z.ZodString>;
113
259
  deliveryScan: z.ZodOptional<z.ZodObject<{
114
260
  limit: z.ZodNumber;
115
261
  scanned: z.ZodNumber;
116
262
  evaluated: z.ZodNumber;
117
263
  truncated: z.ZodBoolean;
264
+ anchors: z.ZodOptional<z.ZodNumber>;
265
+ anchorsTruncated: z.ZodOptional<z.ZodBoolean>;
266
+ }, z.core.$loose>>;
267
+ treeScan: z.ZodOptional<z.ZodObject<{
268
+ limit: z.ZodNumber;
269
+ injections: z.ZodNumber;
270
+ edges: z.ZodNumber;
271
+ nodes: z.ZodNumber;
272
+ truncated: z.ZodBoolean;
118
273
  }, z.core.$loose>>;
119
274
  }, z.core.$loose>;
120
275
  /** One delivery's claim on one criterion, with its evidence. */
121
276
  export type CriterionMatch = z.infer<typeof CriterionMatchSchema>;
122
- /** One declared criterion and its standing. */
277
+ /** One criterion -- tree or declared -- and its standing. */
123
278
  export type CriterionStanding = z.infer<typeof CriterionStandingSchema>;
279
+ /** What verify recorded about a tree criterion's node. */
280
+ export type CriterionLanding = z.infer<typeof CriterionLandingSchema>;
281
+ /** A covered undesired effect stating no future -- what an arm would refuse on. */
282
+ export type UnstatedCoveredEffect = z.infer<typeof UnstatedCoveredEffectSchema>;
283
+ /** A covered undesired effect whose stated future is a machine draft. */
284
+ export type DraftedCoveredEffect = z.infer<typeof DraftedCoveredEffectSchema>;
124
285
  /** The bounds the edge's delivery scan applied, when it reported them. */
125
286
  export type CriteriaDeliveryScan = z.infer<typeof DeliveryScanSchema>;
287
+ /** The bounds the edge's tree scans applied, when it reported them. */
288
+ export type CriteriaTreeScan = z.infer<typeof TreeScanSchema>;
126
289
  /** A focus's declared criteria measured against its current deliveries. */
127
290
  export type FocusCriteriaStanding = z.infer<typeof FocusCriteriaStandingSchema>;
128
291
  /** Injectable API seam (a test passes a fake validated caller; no mock.module). */
@@ -1 +1 @@
1
- {"version":3,"file":"focus-criteria-standing.d.ts","sourceRoot":"","sources":["../../src/queries/focus-criteria-standing.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,wEAAwE;AACxE,eAAO,MAAM,8BAA8B,4BAA4B,CAAC;AAExE;;;;;;;GAOG;AACH,QAAA,MAAM,oBAAoB;;;;;;;iBAOV,CAAC;AAEjB;;;;;GAKG;AACH,QAAA,MAAM,uBAAuB;;;;;;;;;;;;;;iBAIb,CAAC;AAEjB;;;;;GAKG;AACH,QAAA,MAAM,kBAAkB;;;;;iBAKR,CAAC;AAEjB;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAOxB,CAAC;AAEjB,gEAAgE;AAChE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,+CAA+C;AAC/C,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,0EAA0E;AAC1E,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEtE,2EAA2E;AAC3E,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,mFAAmF;AACnF,MAAM,WAAW,8BAA8B;IAC7C,gBAAgB,CAAC,EAAE,OAAO,gBAAgB,CAAC;CAC5C;AAED;;;GAGG;AACH,wBAAsB,wBAAwB,CAC5C,OAAO,EAAE,MAAM,EACf,IAAI,GAAE,8BAAmC,GACxC,OAAO,CAAC,qBAAqB,CAAC,CAGhC"}
1
+ {"version":3,"file":"focus-criteria-standing.d.ts","sourceRoot":"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;AACnF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,yEAAyE;AACzE,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,0EAA0E;AAC1E,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEtE,uEAAuE;AACvE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAE9D,2EAA2E;AAC3E,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,mFAAmF;AACnF,MAAM,WAAW,8BAA8B;IAC7C,gBAAgB,CAAC,EAAE,OAAO,gBAAgB,CAAC;CAC5C;AAED;;;GAGG;AACH,wBAAsB,wBAAwB,CAC5C,OAAO,EAAE,MAAM,EACf,IAAI,GAAE,8BAAmC,GACxC,OAAO,CAAC,qBAAqB,CAAC,CAGhC"}
@@ -2,8 +2,18 @@
2
2
  // Pinned by: packages/daemon/src/resolvers/focus-criteria-standing.test.ts
3
3
  // PINNED-BY-END
4
4
  /**
5
- * The FOCUS CRITERIA STANDING read: which of a focus's DECLARED acceptance
6
- * criteria its current deliveries address, and which remain open.
5
+ * The FOCUS CRITERIA STANDING read: what a focus is FOR, and where each part of
6
+ * it stands. Two statements, both carried: the futures of the undesired effects
7
+ * its ARM covers (met only when verify recorded the future as landed), and the
8
+ * focus's OWN declared acceptance criteria (addressed when a current delivery
9
+ * declares one).
10
+ *
11
+ * EVERY ENUM HERE IS A DEPLOY-ORDER CONTRACT. The schemas are `.passthrough()`,
12
+ * so a field the edge adds costs nothing -- but an enum VALUE the edge adds and
13
+ * this daemon has not learned throws, and the one reader turns a throw into the
14
+ * explicit READ FAILED line. So the widening ships FIRST and the edge second;
15
+ * every optional field below is optional for the same reason, read from the
16
+ * other side.
7
17
  *
8
18
  * Read through the `focus_criteria_standing` product-api action
9
19
  * (handlers/focus/criteria-standing.ts), which loads the focus's own
@@ -50,15 +60,86 @@ const CriterionMatchSchema = z.object({
50
60
  significantTokenCount: z.number(),
51
61
  }).passthrough();
52
62
  /**
53
- * One criterion and where it stands. `status` IS enumerated: rendering a
54
- * criterion as addressed or open is the decision this whole section carries, so
55
- * an unrecognized status must fail the read loudly rather than be printed as if
56
- * it were understood.
63
+ * What VERIFY recorded about a tree criterion's node -- carried out of the
64
+ * edge's landing predicate (`supabase/functions/_shared/effect-future-landed.ts`) verbatim.
65
+ *
66
+ * Every field here is a plain string, NOT an enum, for the same reason
67
+ * `matchBasis` is: the resolver only ECHOES them into prose. The met/open
68
+ * decision hangs on `status` above, which IS enumerated, so a new landing basis
69
+ * added at the edge must not cost the pass its whole standing section.
70
+ */
71
+ const CriterionLandingSchema = z.object({
72
+ standing: z.string(),
73
+ basis: z.string(),
74
+ classification: z.string().nullable(),
75
+ divergenceReason: z.string().nullable(),
76
+ }).passthrough();
77
+ /**
78
+ * One criterion and where it stands.
79
+ *
80
+ * `status` IS enumerated: rendering a criterion as met, addressed or open is
81
+ * the decision this whole section carries, so an unrecognized status must fail
82
+ * the read loudly rather than be printed as if it were understood. `'met'` and
83
+ * `'addressed'` are DIFFERENT claims and the resolver renders them as such --
84
+ * `'addressed'` says a delivery POINTS AT a declared criterion (scoping),
85
+ * `'met'` says verify RECORDED a tree criterion's declared future as landed
86
+ * (reality). A daemon that lacked `'met'` threw on every armed focus carrying
87
+ * one and rendered the READ FAILED line in place of the whole section; that is
88
+ * the failure this enum's width exists to prevent, and why widening it ships
89
+ * BEFORE the edge that emits the value.
90
+ *
91
+ * `source` and the three TREE-only fields are OPTIONAL, deliberately. The
92
+ * daemon deploys ahead of the edge, so for one window the edge answering this
93
+ * action is the older one that emits neither -- and a required field would
94
+ * invert the very deploy order this widening exists to honour. An absent
95
+ * `source` is rendered as UNSTATED rather than guessed at.
57
96
  */
58
97
  const CriterionStandingSchema = z.object({
59
98
  criterion: z.string(),
60
99
  addressedBy: z.array(CriterionMatchSchema),
61
- status: z.enum(['addressed', 'open']),
100
+ /** Weak, NON-CLOSING signals. Absent on an edge predating the field. */
101
+ evidence: z.array(CriterionMatchSchema).optional(),
102
+ /** WHICH statement this came from, and therefore which rule judged it. */
103
+ source: z.enum(['tree', 'declared']).optional(),
104
+ /** TREE only: `reality_tree_nodes.id` of the covered undesired effect. */
105
+ nodeId: z.string().optional(),
106
+ /** TREE only: `reality_tree_nodes.seq` -- how a human names the node. */
107
+ seq: z.number().optional(),
108
+ /** TREE only: a MACHINE wrote this future and a human accepted it by arming. */
109
+ drafted: z.boolean().optional(),
110
+ /** TREE only: what verify recorded about the node. See the schema. */
111
+ landing: CriterionLandingSchema.optional(),
112
+ status: z.enum(['addressed', 'met', 'open']),
113
+ }).passthrough();
114
+ /**
115
+ * A covered undesired effect that states NO future. On an un-armed focus this
116
+ * is exactly what the arm would REFUSE on, named by the same `seq` the refusal
117
+ * message names -- which is the whole value of the un-armed preview.
118
+ */
119
+ const UnstatedCoveredEffectSchema = z.object({
120
+ nodeId: z.string(),
121
+ seq: z.number(),
122
+ statement: z.string(),
123
+ }).passthrough();
124
+ /** A covered undesired effect whose future is only a MACHINE DRAFT. */
125
+ const DraftedCoveredEffectSchema = z.object({
126
+ nodeId: z.string(),
127
+ seq: z.number(),
128
+ draft: z.string(),
129
+ }).passthrough();
130
+ /**
131
+ * The bounds the edge's TREE scans applied. OPTIONAL for the same reason
132
+ * `deliveryScan` is, and reported for a sharper reason: a truncated NODE scan
133
+ * can only move a criterion toward open, but a truncated EDGE scan SHRINKS a
134
+ * live-derived bar, so a caller must never be left to assume it saw the whole
135
+ * tree.
136
+ */
137
+ const TreeScanSchema = z.object({
138
+ limit: z.number(),
139
+ injections: z.number(),
140
+ edges: z.number(),
141
+ nodes: z.number(),
142
+ truncated: z.boolean(),
62
143
  }).passthrough();
63
144
  /**
64
145
  * The bounds the edge's delivery scan applied. OPTIONAL on purpose: if a future
@@ -71,6 +152,20 @@ const DeliveryScanSchema = z.object({
71
152
  scanned: z.number(),
72
153
  evaluated: z.number(),
73
154
  truncated: z.boolean(),
155
+ /**
156
+ * Injection anchors the TREE half was derived over. OPTIONAL: the edge that
157
+ * resolves anchors separately from the bounded delivery rows ships AFTER
158
+ * this daemon, so for one window the answer carries neither this nor
159
+ * `anchorsTruncated`.
160
+ */
161
+ anchors: z.number().optional(),
162
+ /**
163
+ * True when the separate anchor read hit its own bound -- the only case in
164
+ * which a truncated delivery scan still shortens the tree half. Absent means
165
+ * the edge did not resolve anchors separately, which the resolver reports as
166
+ * the weaker reading rather than as "the tree half is whole".
167
+ */
168
+ anchorsTruncated: z.boolean().optional(),
74
169
  }).passthrough();
75
170
  /**
76
171
  * The standing. `floorBasis` is enumerated deliberately: `no_criteria_declared`
@@ -78,14 +173,54 @@ const DeliveryScanSchema = z.object({
78
173
  * the entire point of the read. A basis this daemon cannot interpret must throw
79
174
  * -- rendering an unknown basis would be guessing at exactly the value that
80
175
  * decides whether the elaboration loop stops.
176
+ *
177
+ * `derived_live_unarmed` is the fourth member and a FIFTH situation: the tree
178
+ * half is a PREVIEW of the bar an arm would stamp, so there is no stamped bar
179
+ * to have reached. It is neither a floor nor a missed floor, and the resolver
180
+ * renders it as its own line.
181
+ *
182
+ * `treeBasis` is enumerated for the same reason -- it answers "whose statement
183
+ * of the bar am I reading", and an un-armed PREVIEW must never be rendered as
184
+ * the arm's own stamp -- but it is OPTIONAL: an edge predating the tree half
185
+ * reports none, and the resolver says the tree half was not reported rather
186
+ * than inventing one.
81
187
  */
82
188
  export const FocusCriteriaStandingSchema = z.object({
83
189
  focusId: z.string(),
84
190
  criteria: z.array(CriterionStandingSchema),
85
191
  floorReached: z.boolean(),
86
- floorBasis: z.enum(['all_criteria_addressed', 'open_criteria_remain', 'no_criteria_declared']),
192
+ floorBasis: z.enum([
193
+ 'all_criteria_addressed',
194
+ 'open_criteria_remain',
195
+ 'no_criteria_declared',
196
+ 'derived_live_unarmed',
197
+ // The FIFTH member: a live derivation over coverage the edge could not
198
+ // fully resolve. Learned here BEFORE the edge can emit it -- that is the
199
+ // whole deploy-order contract this schema's header states, and an enum
200
+ // value is exactly the kind of widening that must ship first.
201
+ 'derived_live_incomplete',
202
+ ]),
203
+ treeBasis: z
204
+ .enum(['armed_stamp', 'derived_live_unstamped_arm', 'derived_live_unarmed', 'none'])
205
+ .optional(),
206
+ unstatedCoveredEffects: z.array(UnstatedCoveredEffectSchema).optional(),
207
+ draftedCoveredEffects: z.array(DraftedCoveredEffectSchema).optional(),
208
+ /**
209
+ * True when the tree half was derived LIVE over coverage the edge could not
210
+ * fully resolve, so a criterion may be MISSING from the list entirely.
211
+ * OPTIONAL for the deploy order: the edge that computes it ships after this
212
+ * daemon, and an absent flag means the older edge, not "the bar is whole".
213
+ */
214
+ treeCoverageIncomplete: z.boolean().optional(),
215
+ /**
216
+ * True when a live derivation walked real coverage and found no judgeable
217
+ * undesired effect in it -- the `arm_criteria_required` refusal an arm would
218
+ * raise right now. OPTIONAL for the same deploy-order reason.
219
+ */
220
+ armWouldRefuseNoEffect: z.boolean().optional(),
87
221
  openCriteria: z.array(z.string()),
88
222
  deliveryScan: DeliveryScanSchema.optional(),
223
+ treeScan: TreeScanSchema.optional(),
89
224
  }).passthrough();
90
225
  /**
91
226
  * Read a focus's criteria standing. Throws on a failed or malformed read --
@@ -1 +1 @@
1
- {"version":3,"file":"focus-criteria-standing.js","sourceRoot":"","sources":["../../src/queries/focus-criteria-standing.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,2EAA2E;AAC3E,gBAAgB;AAEhB;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,wEAAwE;AACxE,MAAM,CAAC,MAAM,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
4
+ * Its own module because the crossing is its own thing, not a focus field
5
+ * update: `ratify_release_focus` flips read_only AND releases the focus's held
6
+ * 'planning' deliveries in one transaction, so the database's refusal of an
7
+ * unstated bar rolls the release back with it. Splitting the two writes -- which
8
+ * is what `queries/focuses.ts` used to offer, an `updateFocusReadOnly` beside a
9
+ * per-delivery status writer -- is the defect this replaces (review issue
10
+ * d8985d50): a refusal arriving on the flip left the deliveries queued under
11
+ * the bar it had just rejected.
12
+ *
13
+ * @module queries/focus-ratify-release
14
+ */
15
+ import { type CallApiDeps } from './shared.js';
16
+ /** What one ratify crossing did. */
17
+ export interface RatifyReleaseResult {
18
+ /** True when this call performed the crossing; false when it was already crossed or not yet ratified. */
19
+ crossed: boolean;
20
+ /** How many held 'planning' deliveries were released to 'queued'. */
21
+ released: number;
22
+ /** Their ids, in the order the crossing returned them. */
23
+ releasedDeliveryIds: string[];
24
+ }
25
+ /**
26
+ * The ratify crossing of a read_only audit focus, as ONE database transaction.
27
+ *
28
+ * `ratify_release_focus(p_focus_id)` flips read_only=false AND releases every
29
+ * held 'planning' delivery to 'queued' together, so the database's refusal of
30
+ * an unstated bar (stamp_focus_arm_baseline) rolls the release back with it.
31
+ * The daemon used to do these as two writes, releasing first so a partial
32
+ * release could retry -- which meant a refusal on the flip left the deliveries
33
+ * queued under the bar it had just rejected. There is no ordering that fixes
34
+ * that; one transaction does.
35
+ *
36
+ * The RPC re-evaluates the crossing predicate against the row it locks, so a
37
+ * focus already crossed (or not yet ratified) comes back `crossed: false` with
38
+ * nothing written -- that is the answer, not an error. A REFUSAL still throws,
39
+ * carrying the database's verbatim 'arm_criteria_required: ...' message for
40
+ * the ratify-bar gate to record.
41
+ */
42
+ export declare function ratifyReleaseFocus(focusId: string, deps?: CallApiDeps): Promise<RatifyReleaseResult>;
43
+ //# sourceMappingURL=focus-ratify-release.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"focus-ratify-release.d.ts","sourceRoot":"","sources":["../../src/queries/focus-ratify-release.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAW,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAExD,oCAAoC;AACpC,MAAM,WAAW,mBAAmB;IAClC,yGAAyG;IACzG,OAAO,EAAE,OAAO,CAAC;IACjB,qEAAqE;IACrE,QAAQ,EAAE,MAAM,CAAC;IACjB,0DAA0D;IAC1D,mBAAmB,EAAE,MAAM,EAAE,CAAC;CAC/B;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,MAAM,EACf,IAAI,GAAE,WAAgB,GACrB,OAAO,CAAC,mBAAmB,CAAC,CAY9B"}
@@ -0,0 +1,45 @@
1
+ // PINNED-BY-BEGIN (generated by gen:pinned-by -- do not hand-edit; checked by lint:pinned-by)
2
+ // Pinned by: packages/daemon/src/queries/focus-ratify-release.test.ts
3
+ // PINNED-BY-END
4
+ /**
5
+ * The ratify crossing of a read_only (audit) focus, as ONE database write.
6
+ *
7
+ * Its own module because the crossing is its own thing, not a focus field
8
+ * update: `ratify_release_focus` flips read_only AND releases the focus's held
9
+ * 'planning' deliveries in one transaction, so the database's refusal of an
10
+ * unstated bar rolls the release back with it. Splitting the two writes -- which
11
+ * is what `queries/focuses.ts` used to offer, an `updateFocusReadOnly` beside a
12
+ * per-delivery status writer -- is the defect this replaces (review issue
13
+ * d8985d50): a refusal arriving on the flip left the deliveries queued under
14
+ * the bar it had just rejected.
15
+ *
16
+ * @module queries/focus-ratify-release
17
+ */
18
+ import { callApi } from './shared.js';
19
+ /**
20
+ * The ratify crossing of a read_only audit focus, as ONE database transaction.
21
+ *
22
+ * `ratify_release_focus(p_focus_id)` flips read_only=false AND releases every
23
+ * held 'planning' delivery to 'queued' together, so the database's refusal of
24
+ * an unstated bar (stamp_focus_arm_baseline) rolls the release back with it.
25
+ * The daemon used to do these as two writes, releasing first so a partial
26
+ * release could retry -- which meant a refusal on the flip left the deliveries
27
+ * queued under the bar it had just rejected. There is no ordering that fixes
28
+ * that; one transaction does.
29
+ *
30
+ * The RPC re-evaluates the crossing predicate against the row it locks, so a
31
+ * focus already crossed (or not yet ratified) comes back `crossed: false` with
32
+ * nothing written -- that is the answer, not an error. A REFUSAL still throws,
33
+ * carrying the database's verbatim 'arm_criteria_required: ...' message for
34
+ * the ratify-bar gate to record.
35
+ */
36
+ export async function ratifyReleaseFocus(focusId, deps = {}) {
37
+ const call = deps.callApi ?? callApi;
38
+ const result = await call('daemon_ratify_release_focus', { focusId });
39
+ return {
40
+ crossed: result.crossed === true,
41
+ released: result.released ?? 0,
42
+ releasedDeliveryIds: result.releasedDeliveryIds ?? [],
43
+ };
44
+ }
45
+ //# sourceMappingURL=focus-ratify-release.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"focus-ratify-release.js","sourceRoot":"","sources":["../../src/queries/focus-ratify-release.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,sEAAsE;AACtE,gBAAgB;AAEhB;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,OAAO,EAAoB,MAAM,aAAa,CAAC;AAYxD;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,OAAe,EACf,OAAoB,EAAE;IAEtB,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC;IACrC,MAAM,MAAM,GAAG,MAAM,IAAI,CAItB,6BAA6B,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;IAC/C,OAAO;QACL,OAAO,EAAE,MAAM,CAAC,OAAO,KAAK,IAAI;QAChC,QAAQ,EAAE,MAAM,CAAC,QAAQ,IAAI,CAAC;QAC9B,mBAAmB,EAAE,MAAM,CAAC,mBAAmB,IAAI,EAAE;KACtD,CAAC;AACJ,CAAC"}
@@ -203,7 +203,6 @@ export interface FocusReviewLatest {
203
203
  outcome: 'approved' | 'gaps_found' | null;
204
204
  summary: string | null;
205
205
  createdIssueIds: string[];
206
- createdDeliveryIds: string[];
207
206
  agentSessionId: string | null;
208
207
  }
209
208
  /**
@@ -241,15 +240,6 @@ export declare function getFocusReviewFiledIssueIds(focusId: string): Promise<st
241
240
  * product_focuses.stage (see 20260513152817_focus_workflow_lifecycle...sql).
242
241
  */
243
242
  export declare function updateFocusStage(focusId: string, stage: string): Promise<void>;
244
- /**
245
- * Flip a focus's read_only flag (Safe audit-to-remediation D3).
246
- *
247
- * The daemon is the SOLE writer that flips read_only=false: the ratify-to-execute
248
- * release calls this when a read-only focus has been human-ratified. Writing
249
- * read_only=false here is half of the single planning->execution crossing (the
250
- * other half being the release of held planning deliveries to queued).
251
- */
252
- export declare function updateFocusReadOnly(focusId: string, readOnly: boolean): Promise<void>;
253
243
  /**
254
244
  * Count deliveries that were created during/after the latest review pass and
255
245
  * have not yet reached a terminal state (done/verified/cancelled). This is
@@ -1 +1 @@
1
- {"version":3,"file":"focuses.d.ts","sourceRoot":"","sources":["../../src/queries/focuses.ts"],"names":[],"mappings":"AAaA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,cAAc,EAAE,QAAQ,EAAqC,MAAM,mBAAmB,CAAC;AAExI,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAUrD;;;;;;GAMG;AACH,wBAAsB,eAAe,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,CAAC,CAatG;AAkDD,mDAAmD;AACnD,MAAM,WAAW,oBAAoB,CAAC,CAAC;IACrC,gDAAgD;IAChD,OAAO,EAAE,CAAC,EAAE,CAAC;IACb,uEAAuE;IACvE,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,wEAAwE;IACxE,MAAM,CAAC,E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wBAAsB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAoCzF;AAED;;;GAGG;AACH,wBAAsB,iCAAiC,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CA8C1F"}
@@ -376,20 +376,6 @@ export async function updateFocusStage(focusId, stage) {
376
376
  fields: { stage },
377
377
  });
378
378
  }
379
- /**
380
- * Flip a focus's read_only flag (Safe audit-to-remediation D3).
381
- *
382
- * The daemon is the SOLE writer that flips read_only=false: the ratify-to-execute
383
- * release calls this when a read-only focus has been human-ratified. Writing
384
- * read_only=false here is half of the single planning->execution crossing (the
385
- * other half being the release of held planning deliveries to queued).
386
- */
387
- export async function updateFocusReadOnly(focusId, readOnly) {
388
- await callApi('daemon_update_focus_status', {
389
- focusId,
390
- fields: { readOnly },
391
- });
392
- }
393
379
  /**
394
380
  * Count deliveries that were created during/after the latest review pass and
395
381
  * have not yet reached a terminal state (done/verified/cancelled). This is