@wildo-ai/dev-companion 1.1.12 → 1.1.14

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 (313) hide show
  1. package/dist/esm/.tsbuildinfo +1 -1
  2. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.d.ts +21 -0
  3. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.d.ts.map +1 -1
  4. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.js +37 -4
  5. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.js.map +1 -1
  6. package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.d.ts.map +1 -1
  7. package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.js +9 -2
  8. package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.js.map +1 -1
  9. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.d.ts +66 -0
  10. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.d.ts.map +1 -1
  11. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.js +191 -13
  12. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.js.map +1 -1
  13. package/dist/esm/claude-cli/services/git-change-set.companion.service.d.ts +6 -2
  14. package/dist/esm/claude-cli/services/git-change-set.companion.service.d.ts.map +1 -1
  15. package/dist/esm/claude-cli/services/git-change-set.companion.service.js +16 -39
  16. package/dist/esm/claude-cli/services/git-change-set.companion.service.js.map +1 -1
  17. package/dist/esm/code-compliance-check/check-raw-feature-id-literals.companion.js +31 -2
  18. package/dist/esm/code-compliance-check/check-raw-feature-id-literals.companion.js.map +1 -1
  19. package/dist/esm/companion-api/companion-api.schemas.d.ts +2 -0
  20. package/dist/esm/companion-api/companion-api.schemas.d.ts.map +1 -1
  21. package/dist/esm/companion-api/companion-api.schemas.js +8 -0
  22. package/dist/esm/companion-api/companion-api.schemas.js.map +1 -1
  23. package/dist/esm/companion-api/controllers/companion.controller.d.ts +13 -0
  24. package/dist/esm/companion-api/controllers/companion.controller.d.ts.map +1 -1
  25. package/dist/esm/companion-api/controllers/companion.controller.js +39 -13
  26. package/dist/esm/companion-api/controllers/companion.controller.js.map +1 -1
  27. package/dist/esm/companion-api/controllers/long-held-request.companion.d.ts +17 -0
  28. package/dist/esm/companion-api/controllers/long-held-request.companion.d.ts.map +1 -0
  29. package/dist/esm/companion-api/controllers/long-held-request.companion.js +33 -0
  30. package/dist/esm/companion-api/controllers/long-held-request.companion.js.map +1 -0
  31. package/dist/esm/core/introspection/resources/creation-home-projection.companion.d.ts +9 -0
  32. package/dist/esm/core/introspection/resources/creation-home-projection.companion.d.ts.map +1 -1
  33. package/dist/esm/core/introspection/resources/creation-home-projection.companion.js +19 -0
  34. package/dist/esm/core/introspection/resources/creation-home-projection.companion.js.map +1 -1
  35. package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.d.ts.map +1 -1
  36. package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.js +7 -1
  37. package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.js.map +1 -1
  38. package/dist/esm/core/introspection/resources/launch-blockers.companion.d.ts +5 -1
  39. package/dist/esm/core/introspection/resources/launch-blockers.companion.d.ts.map +1 -1
  40. package/dist/esm/core/introspection/resources/launch-blockers.companion.js +37 -4
  41. package/dist/esm/core/introspection/resources/launch-blockers.companion.js.map +1 -1
  42. package/dist/esm/core/introspection/services/companion-introspection.companion.service.d.ts +14 -0
  43. package/dist/esm/core/introspection/services/companion-introspection.companion.service.d.ts.map +1 -1
  44. package/dist/esm/core/introspection/services/companion-introspection.companion.service.js +48 -0
  45. package/dist/esm/core/introspection/services/companion-introspection.companion.service.js.map +1 -1
  46. package/dist/esm/core/introspection/services/introspection-dependency-tree.companion.d.ts +128 -0
  47. package/dist/esm/core/introspection/services/introspection-dependency-tree.companion.d.ts.map +1 -0
  48. package/dist/esm/core/introspection/services/introspection-dependency-tree.companion.js +180 -0
  49. package/dist/esm/core/introspection/services/introspection-dependency-tree.companion.js.map +1 -0
  50. package/dist/esm/core/introspection/services/introspection-source-state.companion.service.d.ts +8 -20
  51. package/dist/esm/core/introspection/services/introspection-source-state.companion.service.d.ts.map +1 -1
  52. package/dist/esm/core/introspection/services/introspection-source-state.companion.service.js +37 -142
  53. package/dist/esm/core/introspection/services/introspection-source-state.companion.service.js.map +1 -1
  54. package/dist/esm/core/introspection/services/introspection-source-walk.worker.d.ts +64 -0
  55. package/dist/esm/core/introspection/services/introspection-source-walk.worker.d.ts.map +1 -0
  56. package/dist/esm/core/introspection/services/introspection-source-walk.worker.js +304 -0
  57. package/dist/esm/core/introspection/services/introspection-source-walk.worker.js.map +1 -0
  58. package/dist/esm/core/introspection/services/introspection-worker-pool.companion.d.ts +9 -0
  59. package/dist/esm/core/introspection/services/introspection-worker-pool.companion.d.ts.map +1 -1
  60. package/dist/esm/core/introspection/services/introspection-worker-pool.companion.js +25 -3
  61. package/dist/esm/core/introspection/services/introspection-worker-pool.companion.js.map +1 -1
  62. package/dist/esm/core/runtime/companion-language-model-route.d.ts +16 -1
  63. package/dist/esm/core/runtime/companion-language-model-route.d.ts.map +1 -1
  64. package/dist/esm/core/runtime/companion-language-model-route.js +23 -1
  65. package/dist/esm/core/runtime/companion-language-model-route.js.map +1 -1
  66. package/dist/esm/core/runtime/restart-drain.companion.d.ts +107 -0
  67. package/dist/esm/core/runtime/restart-drain.companion.d.ts.map +1 -0
  68. package/dist/esm/core/runtime/restart-drain.companion.js +237 -0
  69. package/dist/esm/core/runtime/restart-drain.companion.js.map +1 -0
  70. package/dist/esm/core/runtime/services/start-companion-application.service.d.ts.map +1 -1
  71. package/dist/esm/core/runtime/services/start-companion-application.service.js +3 -2
  72. package/dist/esm/core/runtime/services/start-companion-application.service.js.map +1 -1
  73. package/dist/esm/core/utils/git-read-broker.companion.d.ts +62 -0
  74. package/dist/esm/core/utils/git-read-broker.companion.d.ts.map +1 -0
  75. package/dist/esm/core/utils/git-read-broker.companion.js +282 -0
  76. package/dist/esm/core/utils/git-read-broker.companion.js.map +1 -0
  77. package/dist/esm/core/utils/local-write-recording.companion.d.ts +8 -1
  78. package/dist/esm/core/utils/local-write-recording.companion.d.ts.map +1 -1
  79. package/dist/esm/core/utils/local-write-recording.companion.js +7 -23
  80. package/dist/esm/core/utils/local-write-recording.companion.js.map +1 -1
  81. package/dist/esm/executions/services/companion-executions.companion.service.d.ts +18 -1
  82. package/dist/esm/executions/services/companion-executions.companion.service.d.ts.map +1 -1
  83. package/dist/esm/executions/services/companion-executions.companion.service.js +34 -8
  84. package/dist/esm/executions/services/companion-executions.companion.service.js.map +1 -1
  85. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.en.d.ts +29 -0
  86. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.en.d.ts.map +1 -0
  87. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.en.js +29 -0
  88. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.en.js.map +1 -0
  89. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.fr.d.ts +29 -0
  90. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.fr.d.ts.map +1 -0
  91. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.fr.js +29 -0
  92. package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.fr.js.map +1 -0
  93. package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.en.d.ts +1 -0
  94. package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.en.d.ts.map +1 -1
  95. package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.en.js +2 -1
  96. package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.en.js.map +1 -1
  97. package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.fr.d.ts +1 -0
  98. package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.fr.d.ts.map +1 -1
  99. package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.fr.js +2 -1
  100. package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.fr.js.map +1 -1
  101. package/dist/esm/i18n/components/LOW_LEVEL_AI_CONVERSATION_THREAD.en.d.ts +5 -2
  102. package/dist/esm/i18n/components/LOW_LEVEL_AI_CONVERSATION_THREAD.en.d.ts.map +1 -1
  103. package/dist/esm/i18n/components/LOW_LEVEL_AI_CONVERSATION_THREAD.en.js +5 -2
  104. package/dist/esm/i18n/components/LOW_LEVEL_AI_CONVERSATION_THREAD.en.js.map +1 -1
  105. package/dist/esm/i18n/components/LOW_LEVEL_AI_CONVERSATION_THREAD.fr.d.ts +5 -2
  106. package/dist/esm/i18n/components/LOW_LEVEL_AI_CONVERSATION_THREAD.fr.d.ts.map +1 -1
  107. package/dist/esm/i18n/components/LOW_LEVEL_AI_CONVERSATION_THREAD.fr.js +5 -2
  108. package/dist/esm/i18n/components/LOW_LEVEL_AI_CONVERSATION_THREAD.fr.js.map +1 -1
  109. package/dist/esm/i18n/components/LOW_LEVEL_APPROVAL_SEAL.en.d.ts +41 -0
  110. package/dist/esm/i18n/components/LOW_LEVEL_APPROVAL_SEAL.en.d.ts.map +1 -0
  111. package/dist/esm/i18n/components/LOW_LEVEL_APPROVAL_SEAL.en.js +41 -0
  112. package/dist/esm/i18n/components/LOW_LEVEL_APPROVAL_SEAL.en.js.map +1 -0
  113. package/dist/esm/i18n/components/LOW_LEVEL_APPROVAL_SEAL.fr.d.ts +41 -0
  114. package/dist/esm/i18n/components/LOW_LEVEL_APPROVAL_SEAL.fr.d.ts.map +1 -0
  115. package/dist/esm/i18n/components/LOW_LEVEL_APPROVAL_SEAL.fr.js +41 -0
  116. package/dist/esm/i18n/components/LOW_LEVEL_APPROVAL_SEAL.fr.js.map +1 -0
  117. package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.en.d.ts +1 -0
  118. package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.en.d.ts.map +1 -1
  119. package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.en.js +2 -1
  120. package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.en.js.map +1 -1
  121. package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.fr.d.ts +1 -0
  122. package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.fr.d.ts.map +1 -1
  123. package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.fr.js +2 -1
  124. package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.fr.js.map +1 -1
  125. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.en.d.ts +1 -0
  126. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.en.d.ts.map +1 -1
  127. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.en.js +2 -1
  128. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.en.js.map +1 -1
  129. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.fr.d.ts +1 -0
  130. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.fr.d.ts.map +1 -1
  131. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.fr.js +2 -1
  132. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.fr.js.map +1 -1
  133. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.en.d.ts +1 -0
  134. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.en.d.ts.map +1 -1
  135. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.en.js +2 -1
  136. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.en.js.map +1 -1
  137. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.fr.d.ts +1 -0
  138. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.fr.d.ts.map +1 -1
  139. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.fr.js +2 -1
  140. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.fr.js.map +1 -1
  141. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.en.d.ts +2 -0
  142. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.en.d.ts.map +1 -1
  143. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.en.js +3 -1
  144. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.en.js.map +1 -1
  145. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.fr.d.ts +2 -0
  146. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.fr.d.ts.map +1 -1
  147. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.fr.js +3 -1
  148. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.fr.js.map +1 -1
  149. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_AUTH.en.d.ts +1 -1
  150. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_AUTH.en.js +1 -1
  151. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_AUTH.en.js.map +1 -1
  152. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_AUTH.fr.d.ts +1 -1
  153. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_AUTH.fr.js +1 -1
  154. package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_AUTH.fr.js.map +1 -1
  155. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.en.d.ts +2 -0
  156. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.en.d.ts.map +1 -1
  157. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.en.js +3 -1
  158. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.en.js.map +1 -1
  159. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.fr.d.ts +3 -1
  160. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.fr.d.ts.map +1 -1
  161. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.fr.js +4 -2
  162. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.fr.js.map +1 -1
  163. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.en.d.ts +17 -0
  164. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.en.d.ts.map +1 -1
  165. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.en.js +18 -1
  166. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.en.js.map +1 -1
  167. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.fr.d.ts +17 -0
  168. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.fr.d.ts.map +1 -1
  169. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.fr.js +18 -1
  170. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.fr.js.map +1 -1
  171. package/dist/esm/i18n/composite_views/app.creation-conversation.fr.d.ts +206 -195
  172. package/dist/esm/i18n/composite_views/app.creation-conversation.fr.d.ts.map +1 -1
  173. package/dist/esm/i18n/composite_views/app.creation-conversation.fr.js +206 -195
  174. package/dist/esm/i18n/composite_views/app.creation-conversation.fr.js.map +1 -1
  175. package/dist/esm/i18n/composite_views/app.creation-dossier.fr.d.ts +10 -0
  176. package/dist/esm/i18n/composite_views/app.creation-dossier.fr.d.ts.map +1 -1
  177. package/dist/esm/i18n/composite_views/app.creation-dossier.fr.js +12 -2
  178. package/dist/esm/i18n/composite_views/app.creation-dossier.fr.js.map +1 -1
  179. package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.fr.d.ts +70 -0
  180. package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.fr.d.ts.map +1 -1
  181. package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.fr.js +70 -0
  182. package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.fr.js.map +1 -1
  183. package/dist/esm/i18n/resources/wildoApplicationActorTasks.fr.d.ts +12 -2
  184. package/dist/esm/i18n/resources/wildoApplicationActorTasks.fr.d.ts.map +1 -1
  185. package/dist/esm/i18n/resources/wildoApplicationActorTasks.fr.js +12 -2
  186. package/dist/esm/i18n/resources/wildoApplicationActorTasks.fr.js.map +1 -1
  187. package/dist/esm/i18n/resources/wildoApplicationFlowSystemExecutions.fr.d.ts +10 -0
  188. package/dist/esm/i18n/resources/wildoApplicationFlowSystemExecutions.fr.d.ts.map +1 -1
  189. package/dist/esm/i18n/resources/wildoApplicationFlowSystemExecutions.fr.js +10 -0
  190. package/dist/esm/i18n/resources/wildoApplicationFlowSystemExecutions.fr.js.map +1 -1
  191. package/dist/esm/i18n/resources/workbenchBuildDispatchPlan.fr.d.ts +25 -20
  192. package/dist/esm/i18n/resources/workbenchBuildDispatchPlan.fr.d.ts.map +1 -1
  193. package/dist/esm/i18n/resources/workbenchBuildDispatchPlan.fr.js +25 -20
  194. package/dist/esm/i18n/resources/workbenchBuildDispatchPlan.fr.js.map +1 -1
  195. package/dist/esm/i18n/resources/workbenchBuildPlanTasks.fr.d.ts +32 -32
  196. package/dist/esm/i18n/resources/workbenchBuildPlanTasks.fr.js +32 -32
  197. package/dist/esm/i18n/resources/workbenchBuildPlanTasks.fr.js.map +1 -1
  198. package/dist/esm/i18n/resources/workbenchBuildTaskRecords.fr.d.ts +65 -65
  199. package/dist/esm/i18n/resources/workbenchBuildTaskRecords.fr.js +65 -65
  200. package/dist/esm/i18n/resources/workbenchBuildTaskRecords.fr.js.map +1 -1
  201. package/dist/esm/i18n/resources/workbenchDossierEntries.fr.d.ts +20 -0
  202. package/dist/esm/i18n/resources/workbenchDossierEntries.fr.d.ts.map +1 -1
  203. package/dist/esm/i18n/resources/workbenchDossierEntries.fr.js +20 -0
  204. package/dist/esm/i18n/resources/workbenchDossierEntries.fr.js.map +1 -1
  205. package/dist/esm/i18n/resources/workbenchGovernanceQuestions.fr.d.ts +12 -0
  206. package/dist/esm/i18n/resources/workbenchGovernanceQuestions.fr.d.ts.map +1 -1
  207. package/dist/esm/i18n/resources/workbenchGovernanceQuestions.fr.js +13 -1
  208. package/dist/esm/i18n/resources/workbenchGovernanceQuestions.fr.js.map +1 -1
  209. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.d.ts +40 -0
  210. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.d.ts.map +1 -1
  211. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.js +13 -0
  212. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.js.map +1 -1
  213. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.fr.d.ts +40 -0
  214. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.fr.d.ts.map +1 -1
  215. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.fr.js +40 -0
  216. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.fr.js.map +1 -1
  217. package/dist/esm/i18n/system_enums/application-creation.en.d.ts +5 -0
  218. package/dist/esm/i18n/system_enums/application-creation.en.d.ts.map +1 -1
  219. package/dist/esm/i18n/system_enums/application-creation.en.js +6 -0
  220. package/dist/esm/i18n/system_enums/application-creation.en.js.map +1 -1
  221. package/dist/esm/i18n/system_enums/application-creation.fr.d.ts +175 -170
  222. package/dist/esm/i18n/system_enums/application-creation.fr.d.ts.map +1 -1
  223. package/dist/esm/i18n/system_enums/application-creation.fr.js +175 -170
  224. package/dist/esm/i18n/system_enums/application-creation.fr.js.map +1 -1
  225. package/dist/esm/i18n/system_enums/flows-actors.fr.d.ts +22 -22
  226. package/dist/esm/i18n/system_enums/flows-actors.fr.js +22 -22
  227. package/dist/esm/i18n/system_enums/flows-actors.fr.js.map +1 -1
  228. package/dist/esm/i18n/system_enums/run-records.fr.d.ts +21 -21
  229. package/dist/esm/i18n/system_enums/run-records.fr.js +21 -21
  230. package/dist/esm/i18n/system_enums/run-records.fr.js.map +1 -1
  231. package/dist/esm/i18n/system_enums/workbench-build.en.d.ts +3 -0
  232. package/dist/esm/i18n/system_enums/workbench-build.en.d.ts.map +1 -1
  233. package/dist/esm/i18n/system_enums/workbench-build.en.js +3 -0
  234. package/dist/esm/i18n/system_enums/workbench-build.en.js.map +1 -1
  235. package/dist/esm/i18n/system_enums/workbench-build.fr.d.ts +37 -33
  236. package/dist/esm/i18n/system_enums/workbench-build.fr.d.ts.map +1 -1
  237. package/dist/esm/i18n/system_enums/workbench-build.fr.js +37 -33
  238. package/dist/esm/i18n/system_enums/workbench-build.fr.js.map +1 -1
  239. package/dist/esm/i18n/system_enums/workbench-creation-home.en.d.ts +1 -0
  240. package/dist/esm/i18n/system_enums/workbench-creation-home.en.d.ts.map +1 -1
  241. package/dist/esm/i18n/system_enums/workbench-creation-home.en.js +1 -0
  242. package/dist/esm/i18n/system_enums/workbench-creation-home.en.js.map +1 -1
  243. package/dist/esm/i18n/system_enums/workbench-creation-home.fr.d.ts +18 -17
  244. package/dist/esm/i18n/system_enums/workbench-creation-home.fr.d.ts.map +1 -1
  245. package/dist/esm/i18n/system_enums/workbench-creation-home.fr.js +18 -17
  246. package/dist/esm/i18n/system_enums/workbench-creation-home.fr.js.map +1 -1
  247. package/dist/esm/i18n/system_enums/workbench-dossier.fr.d.ts +7 -5
  248. package/dist/esm/i18n/system_enums/workbench-dossier.fr.d.ts.map +1 -1
  249. package/dist/esm/i18n/system_enums/workbench-dossier.fr.js +8 -6
  250. package/dist/esm/i18n/system_enums/workbench-dossier.fr.js.map +1 -1
  251. package/dist/esm/i18n/system_enums/workbench-secrets.fr.d.ts +12 -12
  252. package/dist/esm/i18n/system_enums/workbench-secrets.fr.js +12 -12
  253. package/dist/esm/i18n/system_enums/workbench-secrets.fr.js.map +1 -1
  254. package/dist/esm/i18n/system_enums/workbench-specification-artifact.fr.d.ts +1 -0
  255. package/dist/esm/i18n/system_enums/workbench-specification-artifact.fr.d.ts.map +1 -1
  256. package/dist/esm/i18n/system_enums/workbench-specification-artifact.fr.js +2 -1
  257. package/dist/esm/i18n/system_enums/workbench-specification-artifact.fr.js.map +1 -1
  258. package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.d.ts.map +1 -1
  259. package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.js +3 -4
  260. package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.js.map +1 -1
  261. package/dist/esm/i18n-labelling/utils/declared-refusal-codes.utils.d.ts +11 -0
  262. package/dist/esm/i18n-labelling/utils/declared-refusal-codes.utils.d.ts.map +1 -1
  263. package/dist/esm/i18n-labelling/utils/declared-refusal-codes.utils.js +21 -0
  264. package/dist/esm/i18n-labelling/utils/declared-refusal-codes.utils.js.map +1 -1
  265. package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.d.ts +5 -1
  266. package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.d.ts.map +1 -1
  267. package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.js +5 -1
  268. package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.js.map +1 -1
  269. package/dist/esm/meta-workflows/models/playbook-run-record.models.d.ts +12 -0
  270. package/dist/esm/meta-workflows/models/playbook-run-record.models.d.ts.map +1 -1
  271. package/dist/esm/meta-workflows/models/playbook-run-record.models.js +9 -0
  272. package/dist/esm/meta-workflows/models/playbook-run-record.models.js.map +1 -1
  273. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts +200 -20
  274. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts.map +1 -1
  275. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.js +1107 -230
  276. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.js.map +1 -1
  277. package/dist/esm/meta-workflows/services/application-build-follow-up-derivation.companion.d.ts +158 -16
  278. package/dist/esm/meta-workflows/services/application-build-follow-up-derivation.companion.d.ts.map +1 -1
  279. package/dist/esm/meta-workflows/services/application-build-follow-up-derivation.companion.js +381 -46
  280. package/dist/esm/meta-workflows/services/application-build-follow-up-derivation.companion.js.map +1 -1
  281. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.d.ts +58 -0
  282. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.d.ts.map +1 -1
  283. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.js +116 -2
  284. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.js.map +1 -1
  285. package/dist/esm/meta-workflows/services/application-build-landing-projection.companion.d.ts +3 -3
  286. package/dist/esm/meta-workflows/services/application-build-landing-projection.companion.js +3 -3
  287. package/dist/esm/meta-workflows/services/application-build-landing-projection.companion.js.map +1 -1
  288. package/dist/esm/meta-workflows/services/application-build-task-closure.companion.d.ts +9 -0
  289. package/dist/esm/meta-workflows/services/application-build-task-closure.companion.d.ts.map +1 -1
  290. package/dist/esm/meta-workflows/services/application-build-task-closure.companion.js +19 -0
  291. package/dist/esm/meta-workflows/services/application-build-task-closure.companion.js.map +1 -1
  292. package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.d.ts +12 -0
  293. package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.d.ts.map +1 -1
  294. package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.js +31 -7
  295. package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.js.map +1 -1
  296. package/dist/esm/meta-workflows/services/creation-intervention-ledger.companion.service.d.ts.map +1 -1
  297. package/dist/esm/meta-workflows/services/creation-intervention-ledger.companion.service.js +4 -5
  298. package/dist/esm/meta-workflows/services/creation-intervention-ledger.companion.service.js.map +1 -1
  299. package/dist/esm/meta-workflows/services/creation-run-report.companion.service.d.ts +2 -2
  300. package/dist/esm/meta-workflows/services/creation-run-report.companion.service.d.ts.map +1 -1
  301. package/dist/esm/meta-workflows/services/creation-run-report.companion.service.js +10 -8
  302. package/dist/esm/meta-workflows/services/creation-run-report.companion.service.js.map +1 -1
  303. package/dist/esm/meta-workflows/services/foundation-executor.companion.service.d.ts.map +1 -1
  304. package/dist/esm/meta-workflows/services/foundation-executor.companion.service.js +6 -3
  305. package/dist/esm/meta-workflows/services/foundation-executor.companion.service.js.map +1 -1
  306. package/dist/esm/meta-workflows/services/playbook-run-write-register-window.companion.d.ts.map +1 -1
  307. package/dist/esm/meta-workflows/services/playbook-run-write-register-window.companion.js +3 -5
  308. package/dist/esm/meta-workflows/services/playbook-run-write-register-window.companion.js.map +1 -1
  309. package/dist/esm/meta-workflows/services/playbook-run.companion.service.d.ts +68 -3
  310. package/dist/esm/meta-workflows/services/playbook-run.companion.service.d.ts.map +1 -1
  311. package/dist/esm/meta-workflows/services/playbook-run.companion.service.js +281 -69
  312. package/dist/esm/meta-workflows/services/playbook-run.companion.service.js.map +1 -1
  313. package/package.json +18 -18
@@ -24,7 +24,6 @@ import { inject, injectable, optional } from 'inversify';
24
24
  import { AI_ENGINE_CAPABILITIES, AI_ENGINE_CAPABILITIES_IN_THE_CONTRACTED_SERVICE, RecipientCategoriesNotDerivableReason, ENGINE_CLIENT_STORAGE_ENTRIES, DataRetentionClass, ErasureRetentionMode, SubjectErasureDisposition, SubjectErasureSeveredReferenceTreatment, ResourceRetentionBindingSchema, ResourceRowLifetime, StatutoryRetentionGroundSchema, AgentWriteOversight, AiUseDeclarationSource, AiUseRiskTier, deriveAgentWriteOversight, deriveAiRegulationRegimes, deriveApplicationAiUses, enabledEngineCapabilityNames, ApplicationAiUsePostureSchema, CoreAuditableEventType, undeclaredRetentionClasses, vendorHostedProviderRefs, uninventoriedClientStorageSurfaces, BillingConfigurationSchema, OperatorComplianceIdentityPart, outstandingOperatorComplianceIdentityParts, ApplicationOperatorComplianceIdentitySchema, ApplicationProviderComplianceChoicesSchema, ApplicationRetentionScheduleSchema, ApplicationOperatingJurisdictionsSchema, appAssertedProcessingRegions, establishedProviderComplianceProfile, PersonalDataCategory, PersonalDataCondition, ProviderComplianceChoiceAssessment, ProviderProcessingRegionReachKind, processingRegionHoldingOf, ProviderDeploymentModel, EngineCapability, deriveNextReviewOn, ReviewCadence, parseRetentionEnforcementEvidenceJson, SystemOfRecordSubjectRightsPosture, } from '@wildo-ai/saas-models';
25
25
  import { ApplicationAuthoredDocumentFactSpecificationSchema, ApplicationDocumentFactSpecificationSchema, ApplicationProcessorRegisterSchema, computeApplicationDocumentFacts, complianceFactStaleness, ComplianceFactCurrency, processorAgreementStanding, computeRecipientPopulation, joinRecipientPopulationToRegister, APPLICATION_PROVIDER_PACKAGE_MANIFEST_PATHSPEC, applicationProviderPackagesFromManifests, ProviderScopeKey, RecipientPopulationClass, RecipientPopulationMemberKind, SystemOfRecordDataFlowKind, deriveRecipientDisclosures, systemOfRecordPersonalDataOriginsOf, systemOfRecordVendorsOf, typedClientSearchNeedles, typedClientSitesFromGrepLines, overlayComputedDocumentFacts, parseAiContentGuardrailEvidence, ProcessorRegisterEntryKind, processorProcessingRegions, registerEstablishesNoProcessorRecipients, MetaWorkflow_ContextSource, ApplicationCodeSurface, collectComplianceDocumentFactAvailability, deriveComplianceRegimes, resolveApplicationOrganizationStructure, ApplicationLineDeclarationState, } from '@wildo-ai/saas-specifications/application-creation';
26
26
  import { AssuranceEvidenceJudgementVerdict, AssuranceEvidenceRunKind, AssuranceEvidenceRunSchema, deriveBrandNameTrademarkSignal, deriveCapabilitySignal, deriveChatCommandExposureSignal, deriveMcpExposureSignal, derivePersonalDataSignals, deriveProviderHostingSignal, deriveRetentionSignal, } from '@wildo-ai/saas-specifications/assurance';
27
- import { execFileSync } from 'node:child_process';
28
27
  import { existsSync, readdirSync, readFileSync } from 'node:fs';
29
28
  import { readFile } from 'node:fs/promises';
30
29
  import { importLandedTypeScriptModule } from './landed-module-import.companion.js';
@@ -32,6 +31,8 @@ import * as path from 'node:path';
32
31
  import { join } from 'node:path';
33
32
  import { loadDraftFamilyValues } from '../../core/context/draft-family-values.companion.js';
34
33
  import { InFlightWorkHeartbeat } from '../../core/runtime/in-flight-work-heartbeat.companion.js';
34
+ import { companionRestartDrain } from '../../core/runtime/restart-drain.companion.js';
35
+ import { gitReadBroker } from '../../core/utils/git-read-broker.companion.js';
35
36
  import { getFrameworkKnowledgePlaybook, listFrameworkKnowledgePlaybooks, listFrameworkKnowledgeSkillSummaries, readCompiledResearchInformedContent, readFrameworkKnowledgeSkillBody } from '@wildo-ai/framework-knowledge';
36
37
  import { MetaWorkflow_EvaluationTreatmentDefinitionSchema, MetaWorkflow_EvaluationVerdict, MetaWorkflow_Executor, MetaWorkflow_ClarificationAction, } from '@wildo-ai/saas-models/meta-workflows';
37
38
  import { APPLICATION_SPECIFICATION_SEMANTIC_SCHEMA_BINDINGS, composeElicitationSection, dispatchOutcomeStepRef, BUILD_DECOMPOSE_INPUT_FAMILIES, STANDARD_APPLICATION_SPECIFICATION_SEMANTIC_AUTHORITY, evaluatePlaybookCatalogEligibility, buildApplicationCoherenceReport, collectHeldDraftUndeclaredFactCitations, composeAssuranceDocumentBlueprintBrief, composeAssuranceDocumentFactObligationsBrief, renderAssuranceDocumentClaimGuardsForJudge, composeAssuranceEvidenceBrief, composeAuthoredDocumentFactsBrief, composeAssuranceProgramAuthorityBrief, composeApplicationRoleGraphBrief, deriveOneFamilyFreshness, resolveStepOutputSchema, runPlaybookChoreography, countCheckpointedRounds, describeStaleOutput, describePlaybookRerun, measureChangedAspects, PlaybookLaneBoundaryDecision, collectPlaybookLaneBoundaries, isJudgeVerdictStepRef, buildPlaybookReviewGuide, evaluatePlaybookEligibility, applicationLineRefusalOf, getFamilyPackageRelativePath, resolvePlaybookOutputLandingTarget, getLandableArtifactFamilies, isPlaybookGenerationSuspension, renderApplicationCoherenceReport, renderDeclaredInputFamily, composeDeclaredInputWithheldAspects, composeMarketFitScoresSection, composeRiskSignalsSection, widenDeclaredInputAspects, ARTIFACT_PRESENT_WITHOUT_VALUE, collectConvenedExpertRoles, committedCharterRoleRefs, partitionUnstaffedExpertRoles, rederivableExpertRoleRefs, renderPlaybookReviewGuide, runPlaybookGeneration, readPlaybookOutputLandingBaselines, PlaybookOutputLandingConflictError, PlaybookOutputLandingHeldError, SpecificationWriteRefusedError, writeSpecificationFileAtomicallySync, DEFAULT_MAXIMUM_CLARIFICATION_ROUNDS, accumulateClarificationRequests, validateClarificationAnswers, composeClarificationAnswersSection, runPlaybookJudge, runPlaybookLoop, PlaybookGenerationPurpose, composeBillingCommercialModelBrief, composeOperatingJurisdictionCoverageBrief, composeOperatingJurisdictionsSection, composeCreatorStatedFactsSection, projectPlaybookElicitationAsDecision, answersNoLongerOffered, materializeElicitationOptions, readAnswersForPlaybookQuestions, readNonAnswersForPlaybookQuestions, resolveElicitationAnswers, resolveElicitationNonAnswers, buildCreatorInputLatestReadAnswerByPlaybook, resolveApplicationLineScope, collectFamiliesDeactivatedByDecisions, isFamilyNotApplicable, describeApplicationActiveSet, narrowRefinementRound, refinementDependencyMaps, LANDED_SPECIFICATION_CONSTANT_PREFIX, findReadersDatedByWaitingInterviews, selectInterviewsWaitingOnThePerson, readInterviewDepthFromState, PlaybookRerunKind, } from '@wildo-ai/application-creation-runtime';
@@ -78,6 +79,9 @@ import { awaitModelProviderRecovery, isEnvironmentalPlaybookFailure, readPlayboo
78
79
  import { findOverlappingRootRuns, projectLastPlaybookLoop, projectPlaybookRunRecords, readPlaybookRunMeasurement, summarizePlaybookLoopResult, summarizePlaybookRunResult } from '../models/playbook-run-record.models.js';
79
80
  // The playbook a build WAVE runs as (#2208): any CODING_AGENT-tier playbook runs a wave, and this is the one the build console starts.
80
81
  import { BUILD_WAVE_PLAYBOOK_REF, PLAYBOOK_SPEND_NOT_OBSERVED, mergePlaybookSpend } from '@wildo-ai/application-creation-runtime';
82
+ // The maturity reading, derived live for the drive's requirements standing (#3701), from the inputs its executor lands.
83
+ import { deriveApplicationMaturity } from '@wildo-ai/application-creation-runtime';
84
+ import { listRequirementOpenItems } from '@wildo-ai/saas-specifications/application-creation';
81
85
  import { PlaybookSpendMeterCompanionService } from './playbook-spend-meter.companion.service.js';
82
86
  import { DossierCompanionService } from './dossier.companion.service.js';
83
87
  import { proposeInterviewAnswers } from './interview-answer-proposal.companion.js';
@@ -556,13 +560,12 @@ const AUTHORING_PROVIDER_SCOPE = ProviderScopeKey.COMPANION;
556
560
  * in the working tree, untracked included (#2018). `undefined` when they could not be listed, so the scan
557
561
  * reports itself UNSCANNED rather than reading "no owned package" as "nothing imports a provider".
558
562
  */
559
- function readApplicationProviderPackages(saasRoot) {
563
+ async function readApplicationProviderPackages(saasRoot) {
560
564
  try {
561
- const listed = execFileSync('git', ['ls-files', '--cached', '--others', '--exclude-standard', '--', APPLICATION_PROVIDER_PACKAGE_MANIFEST_PATHSPEC], {
562
- cwd: saasRoot,
563
- encoding: 'utf8',
564
- stdio: ['ignore', 'pipe', 'ignore'],
565
- }).split('\n').filter(Boolean);
565
+ // Through the git read helper and never synchronous (#3204): a sync spawn held the companion's event loop for the
566
+ // whole git run, and a fork from its 2 GB process blocked it besides.
567
+ const listed = (await gitReadBroker.execGit(['-C', saasRoot, 'ls-files', '--cached', '--others', '--exclude-standard', '--', APPLICATION_PROVIDER_PACKAGE_MANIFEST_PATHSPEC]))
568
+ .stdout.split('\n').filter(Boolean);
566
569
  return applicationProviderPackagesFromManifests(listed.map((manifestPath) => ({ path: manifestPath, content: readFileSync(join(saasRoot, manifestPath), 'utf8') })));
567
570
  }
568
571
  catch {
@@ -580,10 +583,10 @@ function readApplicationProviderPackages(saasRoot) {
580
583
  * line means. `undefined` when the scan could not run, which the population carries as an UNSCANNED code
581
584
  * path rather than as "nothing imports it".
582
585
  */
583
- export function scanTypedClientSites(saasRoot) {
586
+ export async function scanTypedClientSites(saasRoot) {
584
587
  if (saasRoot === undefined)
585
588
  return undefined;
586
- const applicationProviderPackages = readApplicationProviderPackages(saasRoot);
589
+ const applicationProviderPackages = await readApplicationProviderPackages(saasRoot);
587
590
  if (applicationProviderPackages === undefined)
588
591
  return undefined;
589
592
  const needles = typedClientSearchNeedles(applicationProviderPackages).flatMap((needle) => ['-e', needle]);
@@ -592,17 +595,15 @@ export function scanTypedClientSites(saasRoot) {
592
595
  if (needles.length === 0)
593
596
  return [];
594
597
  try {
595
- const output = execFileSync('git', ['grep', '--untracked', '-n', '-F', ...needles, '--', '.'], {
596
- cwd: saasRoot,
597
- encoding: 'utf8',
598
- stdio: ['ignore', 'pipe', 'ignore'],
598
+ const { stdout } = await gitReadBroker.execGit(['-C', saasRoot, 'grep', '--untracked', '-n', '-F', ...needles, '--', '.'], {
599
599
  maxBuffer: 16 * 1024 * 1024,
600
600
  });
601
- return typedClientSitesFromGrepLines(output.split('\n'), applicationProviderPackages);
601
+ return typedClientSitesFromGrepLines(stdout.split('\n'), applicationProviderPackages);
602
602
  }
603
603
  catch (error) {
604
- // `git grep` exits 1 when nothing matches: a scan that found none, not one that failed.
605
- if (error.status === 1)
604
+ // `git grep` exits 1 when nothing matches: a scan that found none, not one that failed. (`execFile` names the exit
605
+ // status `code`; the sync form this replaced named it `status`.)
606
+ if (error.code === 1)
606
607
  return [];
607
608
  return undefined;
608
609
  }
@@ -615,14 +616,14 @@ export function scanTypedClientSites(saasRoot) {
615
616
  * `frontendServices.<service>`, `minions.<minion>` or `workers.<worker>` was invisible here, and that never
616
617
  * saw a `systemsOfRecord` instance.
617
618
  */
618
- function recipientPopulationOf(saasConfig, saasRoot, providerComplianceProfiles) {
619
+ async function recipientPopulationOf(saasConfig, saasRoot, providerComplianceProfiles) {
619
620
  const config = (saasConfig ?? {});
620
621
  const choices = ApplicationProviderComplianceChoicesSchema.safeParse(config.providerComplianceChoices);
621
622
  return computeRecipientPopulation({
622
623
  providers: config.providers,
623
624
  systemsOfRecord: config.systemsOfRecord,
624
625
  providerComplianceChoices: choices.success ? choices.data : undefined,
625
- typedClientSites: scanTypedClientSites(saasRoot),
626
+ typedClientSites: await scanTypedClientSites(saasRoot),
626
627
  ...(providerComplianceProfiles === undefined ? {} : { providerComplianceProfiles }),
627
628
  });
628
629
  }
@@ -940,10 +941,14 @@ function renderProcessorRegister(population, register) {
940
941
  processor.kind === ProcessorRegisterEntryKind.CONFIGURED_PROVIDER
941
942
  ? `- \`${processor.providerRef}\` (configured provider) — ${processor.legalEntityName}; processes in `
942
943
  + `${processor.processingRegions.join(', ')}`
944
+ // #3921: where it keeps the data at rest, when the operator stated that it differs from where it processes.
945
+ + (processor.storedAtRestIn === undefined ? '' : `; stores the data at rest in ${processor.storedAtRestIn.join(', ')}`)
943
946
  + (processor.purpose === undefined ? '' : `; purpose: ${processor.purpose}`)
944
947
  : `- \`${processor.subprocessorRef}\` (AUTHORED — nothing in the configuration mentions it, so it `
945
948
  + `cannot be verified against the composition) — ${processor.legalEntityName}; processes in `
946
- + `${processor.processingRegions.join(', ')}; purpose: ${processor.purpose}`,
949
+ + `${processor.processingRegions.join(', ')}`
950
+ + (processor.storedAtRestIn === undefined ? '' : `; stores the data at rest in ${processor.storedAtRestIn.join(', ')}`)
951
+ + `; purpose: ${processor.purpose}`,
947
952
  processor.subprocessors.length > 0
948
953
  ? ` - subprocessors: ${processor.subprocessors.map((sub) => `${sub.name} (${sub.processingRegions.join(', ')})`).join('; ')}`
949
954
  : ' - subprocessors: none disclosed by this processor',
@@ -1010,6 +1015,20 @@ function renderProcessorRegisterNotRead(reason) {
1010
1015
  'location as not read for this draft. Do not say they are outstanding or that nobody has established them.',
1011
1016
  ];
1012
1017
  }
1018
+ /**
1019
+ * Where each of a vendor's regions keeps data at rest (#3921), and the account arrangement that holds on (#3920): the
1020
+ * suggestion for the register entry's `storedAtRestIn`, read from the profile and never stated as the operator's.
1021
+ */
1022
+ function storageSuggestionOf(established) {
1023
+ const regions = Object.entries(established.storageRegionTerritories ?? {});
1024
+ if (regions.length === 0)
1025
+ return '';
1026
+ const each = regions.map(([region, places]) => {
1027
+ const condition = established.storageRegionConditions?.[region];
1028
+ return `\`${region}\` → ${places.join(', ')}${condition === undefined ? '' : ` (${condition})`}`;
1029
+ });
1030
+ return `; SUGGESTED storage at rest, by region: ${each.join('; ')}`;
1031
+ }
1013
1032
  /**
1014
1033
  * For each UNDECLARED processor, what its vendor OFFERS — the QUESTION the register entry answers (#1708, #1744).
1015
1034
  *
@@ -1033,6 +1052,8 @@ function renderUndeclaredProcessorQuestions(population, undeclared) {
1033
1052
  ` - \`${ref}\` — offers ${established.deploymentModels.join(' or ')}`
1034
1053
  + (established.processingRegions.length > 0 ? ` in ${established.processingRegions.map((region) => `\`${region}\``).join(', ')}` : '')
1035
1054
  + (established.vendorLegalEntityName === undefined ? '' : `; SUGGESTED legal entity: ${established.vendorLegalEntityName}`)
1055
+ // #3921: where each region keeps data at rest, and what that holds on (#3920), for the entry's `storedAtRestIn`.
1056
+ + storageSuggestionOf(established)
1036
1057
  + (established.subprocessorListUrl === undefined ? '' : `; sub-processors listed at ${established.subprocessorListUrl}`)
1037
1058
  + (established.dataProcessingAgreementUrl === undefined ? '' : `; data processing agreement offered at ${established.dataProcessingAgreementUrl}`)
1038
1059
  + (read.length > 0 ? `. Read from ${read.join(', ')}.` : ' (undated: the provider cites no source or date).'),
@@ -2124,6 +2145,11 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
2124
2145
  readArtifactState: () => this.traceRunPhase(input.session, 'choreography-artifact-state', () => this.readArtifactState()),
2125
2146
  // A quick interview's skipped questions are assumed rather than waited on (#2129), for every lane of the tree.
2126
2147
  assumeInterviewAnswers: (request) => this.assumeInterviewAnswers(request),
2148
+ // A round waits at its top while the dev supervisor holds a restart, so the restart kills nothing (#3204); waiting on
2149
+ // its children it is paused, and a nested lane is counted as a run of its own.
2150
+ awaitRestartWindow: () => this.awaitRestartWindow(),
2151
+ whilePaused: (work) => companionRestartDrain.whilePaused(work),
2152
+ whileWorking: (work) => this.whileDrainCounted(work),
2127
2153
  // Before the first tree read: a composite whose children its line runs none of stops here (#1639).
2128
2154
  readApplicationLineScope: () => this.traceRunPhase(input.session, 'application-line-scope', () => this.readApplicationLineScope()),
2129
2155
  // Every selection and child dispatch is measured, so the row records spend per iteration and per child (#1507).
@@ -2159,7 +2185,13 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
2159
2185
  * re-dispatched until the iteration ceiling (reference run 42120979649).
2160
2186
  */
2161
2187
  readProviderAccountRefusal: readPlaybookFailureProviderAccountRefusal,
2162
- runChild: async (playbookRef, objective, stepResults, dispatchingCompositeRef) => {
2188
+ /*
2189
+ * One RUN for the restart drain (#3204 second review H1): the parent is PAUSED while its round's children run, so each
2190
+ * child is counted here, whole: its prelude, a research agent's screening and evidence records, a step output's model
2191
+ * call, and the compile wait after it. A child that IS a playbook run pauses this count while `runPlaybook` counts
2192
+ * itself (`runChoreographyChild`), so it is counted once.
2193
+ */
2194
+ runChild: (playbookRef, objective, stepResults, dispatchingCompositeRef) => this.whileDrainCounted(async () => {
2163
2195
  const parentElicitationSection = withInstancePurposeSection(await this.composeDispatchingElicitationSection({
2164
2196
  dispatchingCompositeRef,
2165
2197
  ownRef: input.playbook.ref,
@@ -2230,7 +2262,7 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
2230
2262
  },
2231
2263
  }).catch((error) => this.logDebug('Could not wait for the application packages to publish', { afterChild: playbookRef, error: describeCaughtError(error) }));
2232
2264
  }
2233
- },
2265
+ }),
2234
2266
  select: {
2235
2267
  /*
2236
2268
  * The DISPATCHING composite's round, not the root's (#1577): its declared inputs and its interview.
@@ -2582,7 +2614,8 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
2582
2614
  });
2583
2615
  return { stepResults: new Map([[stepOutput.ref, value]]) };
2584
2616
  }
2585
- const run = await this.runPlaybook({
2617
+ // `runPlaybook` counts itself for the restart drain, so the child's own count (`runChild`) pauses meanwhile (#3204).
2618
+ const run = await this.whileDrainPaused(() => this.runPlaybook({
2586
2619
  playbookRef: input.playbookRef,
2587
2620
  /*
2588
2621
  * The objective is the choreography SELECTOR's words for this child, never the creator's. It was
@@ -2604,7 +2637,7 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
2604
2637
  ...(input.parentElicitationSection ? { parentElicitationSection: input.parentElicitationSection } : {}),
2605
2638
  ...(input.dryRun === true ? { dryRun: true } : {}),
2606
2639
  ...(input.session ? { session: input.session } : {}),
2607
- });
2640
+ }));
2608
2641
  /*
2609
2642
  * Narrowed on `landedValues`, not on `landed`. A nested CHOREOGRAPHY result also carries `landed`,
2610
2643
  * so the obvious discriminator admits a union member that has no values to hand back — caught by
@@ -3654,7 +3687,7 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
3654
3687
  const schedule = saasConfig.dataRetention === undefined ? undefined : ApplicationRetentionScheduleSchema.safeParse(saasConfig.dataRetention);
3655
3688
  const jurisdictions = ApplicationOperatingJurisdictionsSchema.safeParse(saasConfig.operatingJurisdictions);
3656
3689
  const choices = ApplicationProviderComplianceChoicesSchema.safeParse(saasConfig.providerComplianceChoices);
3657
- const recipientPopulation = recipientPopulationOf(saasConfig, this.companionContext?.saasRoot);
3690
+ const recipientPopulation = await recipientPopulationOf(saasConfig, this.companionContext?.saasRoot);
3658
3691
  // Only asked when an answer needs it: the retention facts (a schedule exists) or a system-of-record recipient,
3659
3692
  // whose received categories come from the resources bound or piped to it (#1709). ONE introspection call answers
3660
3693
  // every axis: what erasure does to each resource, which retention class binds it (#1613), and what flows where.
@@ -4384,6 +4417,10 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
4384
4417
  readArtifactState: () => this.readArtifactState(),
4385
4418
  // A quick interview's skipped questions are assumed rather than waited on (#2129).
4386
4419
  assumeInterviewAnswers: (request) => this.assumeInterviewAnswers(request),
4420
+ // An iteration waits at its top while the dev supervisor holds a restart, so the restart kills nothing (#3204); waiting
4421
+ // on its lanes, which are runs counted themselves, it is paused.
4422
+ awaitRestartWindow: () => this.awaitRestartWindow(),
4423
+ whilePaused: (work) => companionRestartDrain.whilePaused(work),
4387
4424
  // Lanes of one iteration call this CONCURRENTLY. Safe because admitted lanes are output-disjoint
4388
4425
  // by construction and the write register records per run — where "output" is a lane's TRANSITIVE
4389
4426
  // write scope (`resolvePlaybookWriteScope`), so a composite lane is judged by what its children
@@ -5126,10 +5163,45 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
5126
5163
  const byValue = typeof error === 'object' && error !== null ? this.runMeasurements.get(error) : undefined;
5127
5164
  return byValue ?? (runId !== undefined ? this.failedRunMeasurements.get(runId) : undefined);
5128
5165
  }
5129
- /** The run options for ONE run: the shared readings, plus a failure record that can find this run's spend by id. */
5166
+ /**
5167
+ * Build-plan runs whose read of the tasks already built FAILED (#3449, R10), by run id, with why: the re-decompose ran
5168
+ * unheld. Written onto the run's own row by {@link playbookRunOptionsFor} however the run ends, then forgotten.
5169
+ *
5170
+ * Created on first use rather than as a field initialiser: test harnesses build this service without running field
5171
+ * initialisers (the executions service lazily creates its maps for the same reason), and a field-initialised Map is
5172
+ * absent there, so the first `get` threw. A real companion constructs it normally either way.
5173
+ */
5174
+ builtTasksUnreadByRun;
5175
+ builtTasksUnreadRuns() {
5176
+ return (this.builtTasksUnreadByRun ??= new Map());
5177
+ }
5178
+ /**
5179
+ * The run options for ONE run: the shared readings, plus a failure record that can find this run's spend by id, and the
5180
+ * marker of a re-decompose that could not read the tasks already built (`builtTasksUnread`), on every ending.
5181
+ */
5130
5182
  playbookRunOptionsFor(runIdOf) {
5183
+ const takeBuiltTasksUnread = () => {
5184
+ const runId = runIdOf();
5185
+ const reason = runId === undefined ? undefined : this.builtTasksUnreadRuns().get(runId);
5186
+ if (runId !== undefined)
5187
+ this.builtTasksUnreadRuns().delete(runId);
5188
+ return reason === undefined ? undefined : { builtTasksUnread: reason };
5189
+ };
5190
+ const shared = this.playbookRunOptions;
5131
5191
  return {
5132
- ...this.playbookRunOptions,
5192
+ ...shared,
5193
+ suspendOn: (result) => {
5194
+ const request = shared.suspendOn?.(result) ?? null;
5195
+ if (request === null)
5196
+ return null;
5197
+ const marker = takeBuiltTasksUnread();
5198
+ return marker === undefined ? request : { ...request, taskOutput: { ...request.taskOutput, ...marker } };
5199
+ },
5200
+ concludeAs: (result) => {
5201
+ const conclusion = shared.concludeAs?.(result) ?? null;
5202
+ const marker = takeBuiltTasksUnread();
5203
+ return conclusion === null || marker === undefined ? conclusion : { ...conclusion, taskOutput: { ...conclusion.taskOutput, ...marker } };
5204
+ },
5133
5205
  recordBesideFailure: (error) => {
5134
5206
  const runId = runIdOf();
5135
5207
  const measurement = this.measurementOfFailure(error, runId);
@@ -5137,11 +5209,37 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
5137
5209
  ?? (runId !== undefined ? this.failedRunOverlaps.get(runId) : undefined);
5138
5210
  if (runId !== undefined)
5139
5211
  this.failedRunOverlaps.delete(runId);
5140
- const beside = { ...(measurement ? { measurement } : {}), ...(overlappedRuns && overlappedRuns.length > 0 ? { overlappedRuns } : {}) };
5212
+ const beside = { ...(measurement ? { measurement } : {}), ...(overlappedRuns && overlappedRuns.length > 0 ? { overlappedRuns } : {}), ...takeBuiltTasksUnread() };
5141
5213
  return Object.keys(beside).length > 0 ? beside : null;
5142
5214
  },
5143
5215
  };
5144
5216
  }
5217
+ /**
5218
+ * The tasks already built, for a run producing the build plan (#3449), or `undefined` when there is nothing to keep or
5219
+ * they could not be read. When they could not be read and a plan exists, the re-decompose runs UNHELD (R10): it is not
5220
+ * stopped, because a plan that cannot be read is often what the re-decompose repairs, but it says so, as a warning
5221
+ * naming the run and as `builtTasksUnread` on the run's row. Until R10 this was a debug line, so a re-decompose that
5222
+ * rewrote built work left nothing to find.
5223
+ */
5224
+ async readBuiltTasksForBuildPlanRun(input) {
5225
+ let reason;
5226
+ try {
5227
+ const evidence = await this.buildDispatch.resolveLandedTaskEvidence();
5228
+ if (evidence !== undefined)
5229
+ return evidence.landedTasks;
5230
+ // Absent is two things: no plan yet (nothing to keep), or a plan that exists and did not read.
5231
+ if (!(await this.buildDispatch.hasAuthoredBuildPlan()))
5232
+ return undefined;
5233
+ reason = 'the build plan exists but could not be read (its module failed or it does not satisfy its schema)';
5234
+ }
5235
+ catch (error) {
5236
+ reason = describeCaughtError(error);
5237
+ }
5238
+ this.builtTasksUnreadRuns().set(input.runId, reason);
5239
+ this.logger.warn(`${input.playbookRef} (run ${input.runId}) could not read the build tasks already built, so this re-decompose is NOT held to keep `
5240
+ + `their refs, targets and products: ${reason}. Recorded on the run's row as builtTasksUnread.`, { playbookRef: input.playbookRef, runId: input.runId });
5241
+ return undefined;
5242
+ }
5145
5243
  playbookRunOptions = createPlaybookRunOptions(this.suspensionRequests, this.runMeasurements, this.runOverlaps);
5146
5244
  /**
5147
5245
  * Every choreography that ENDED without concluding and left its progress on its execution row —
@@ -5309,6 +5407,14 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
5309
5407
  if (derivable.length === 0) {
5310
5408
  return { heldTaskRefs, ran: false, detail: 'Every stale charter was edited by a person and is never derived again: update it by hand and commit it.' };
5311
5409
  }
5410
+ /*
5411
+ * Not while the dev supervisor holds a restart (#3204 review F5): it is a new run, which the restart would wait on or
5412
+ * kill. The hold stays, so the next round, in the restarted companion, meets it and derives the charters then.
5413
+ */
5414
+ const saasRoot = this.companionContext?.saasRoot;
5415
+ if (saasRoot !== undefined && companionRestartDrain.isRestartHeld(saasRoot)) {
5416
+ return { heldTaskRefs, ran: false, detail: `${EXPERT_STAFFING_PLAYBOOK_REF} not run: the dev supervisor is holding a restart; the next round runs it.` };
5417
+ }
5312
5418
  try {
5313
5419
  await this.runPlaybook({
5314
5420
  playbookRef: EXPERT_STAFFING_PLAYBOOK_REF,
@@ -5445,7 +5551,43 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
5445
5551
  */
5446
5552
  priorLeg) {
5447
5553
  // Counted here as well as at every entry, so a caller added later is covered while it executes.
5448
- return this.whileInFlight(() => this.executePlaybookRunCounted(input, priorLeg));
5554
+ // Not drain-counted HERE: every path into it is counted once, at its entry, for the run's whole life (#3204).
5555
+ return this.whileInFlight(() => this.executePlaybookRunCounted(input, priorLeg), { drainCounted: false });
5556
+ }
5557
+ /**
5558
+ * Count `work` as one RUN for the restart drain (#3204): busy for its whole life unless paused (parked at the restart
5559
+ * window, or waiting on children counted themselves). Without an application root there is no supervisor to drain for.
5560
+ */
5561
+ whileDrainCounted(work) {
5562
+ const saasRoot = this.companionContext?.saasRoot;
5563
+ return saasRoot === undefined ? work() : companionRestartDrain.whileWorking(saasRoot, work);
5564
+ }
5565
+ /** {@link whileDrainCounted}'s pause: the counted run calling it waits on work that counts itself. */
5566
+ whileDrainPaused(work) {
5567
+ return this.companionContext?.saasRoot === undefined ? work() : companionRestartDrain.whilePaused(work);
5568
+ }
5569
+ /** {@link whileDrainCounted} for a run whose life spans a detached chain: counted until the release is called. */
5570
+ beginDrainCounted() {
5571
+ const saasRoot = this.companionContext?.saasRoot;
5572
+ return saasRoot === undefined ? () => undefined : companionRestartDrain.begin(saasRoot);
5573
+ }
5574
+ /**
5575
+ * The restart window the creation loop and every choreography wait at before dispatching (#3204): returns at once
5576
+ * unless the dev supervisor is holding a restart, and otherwise parks this round until the restart comes. Said once per
5577
+ * park in the log, since a parked round is otherwise silent.
5578
+ */
5579
+ async awaitRestartWindow() {
5580
+ // No application root, no supervisor to wait for: a harness, or a companion not started from one.
5581
+ const saasRoot = this.companionContext?.saasRoot;
5582
+ if (saasRoot === undefined)
5583
+ return;
5584
+ return companionRestartDrain.awaitRestartWindow(saasRoot, (held) => {
5585
+ this.logger.info('A restart is held by the dev supervisor: this round waits at its boundary and starts nothing, so the restart '
5586
+ + 'finds nothing running; the run continues after the restart', { reason: held.reason, heldSince: held.since });
5587
+ }, (held) => {
5588
+ this.logger.warn('A restart has been held past the supervisor\'s own ceiling and is still published: the round goes on rather '
5589
+ + 'than waiting for ever', { reason: held.reason, heldSince: held.since });
5590
+ });
5449
5591
  }
5450
5592
  async executePlaybookRunCounted(input, priorLeg) {
5451
5593
  const startedAtMs = Date.now();
@@ -6025,18 +6167,8 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
6025
6167
  * for an application — the measurement moves, and the next requirement lowers it again.
6026
6168
  */
6027
6169
  if (input.playbookRef === APPLICATION_MATURITY_PLAYBOOK_REF) {
6028
- const decidedFamilyValues = {};
6029
- for (const [family, value] of artifactState.artifactsByFamily) {
6030
- if (value === undefined || value === null || value === FILE_PRESENT_WITHOUT_VALUE)
6031
- continue;
6032
- decidedFamilyValues[family] = value;
6033
- }
6034
- /*
6035
- * The landing probe's own sets, read from the build dispatch rather than recomputed here: what
6036
- * LANDED is a question the landing pass answers over the WORKING tree (#3204), and a second
6037
- * implementation of that question is how two surfaces come to disagree about whether a task is done.
6038
- */
6039
- const evidence = await this.buildDispatch.resolveLandedTaskEvidence();
6170
+ // One composition of the reading's inputs, shared with the drive's requirements standing (#3701).
6171
+ const maturityInputs = await this.composeApplicationMaturityInputs(artifactState);
6040
6172
  return this.landDeterministicExecutorRun({
6041
6173
  ...deterministicLanding,
6042
6174
  // A reading of the build's landed tasks, which are application code and no family: dated by the code (#3237 review H1).
@@ -6046,12 +6178,7 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
6046
6178
  execute: (noteWrite) => this.applicationMaturityExecutor.execute({
6047
6179
  onWillWrite: (paths) => { for (const written of this.toApplicationRelativeSpecificationPaths(paths))
6048
6180
  noteWrite(written); },
6049
- inputs: {
6050
- decidedFamilyValues,
6051
- ...(evidence === undefined ? {} : { landedTaskRefs: evidence.landedTaskRefs, provenTaskRefs: evidence.provenTaskRefs }),
6052
- // What a coding run reported still unmet caps its requirement below VERIFIED, naming the follow-up (#2580).
6053
- ...(evidence?.openReportedGaps === undefined ? {} : { openReportedGaps: evidence.openReportedGaps }),
6054
- },
6181
+ inputs: maturityInputs,
6055
6182
  ...(input.dryRun === true ? { dryRun: true } : {}),
6056
6183
  }),
6057
6184
  });
@@ -6103,15 +6230,10 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
6103
6230
  * The build tasks already built (#3449), read once for a run producing the build plan: the brief names them so the
6104
6231
  * model keeps them, and the normalizer refuses an answer that drops or renames one, or changes its target or what it
6105
6232
  * produces (#3204). ONE read for both, so the two cannot disagree about what was built. Unreadable is absent, never
6106
- * empty: "not read" is not "nothing landed".
6233
+ * empty: "not read" is not "nothing landed", and it is loud (R10, `readBuiltTasksForBuildPlanRun`).
6107
6234
  */
6108
6235
  const producesBuildPlan = (playbook.outputs ?? []).some((output) => output.family === ApplicationSpecificationFamily.BUILD_PLAN);
6109
- const landedBuildTasks = producesBuildPlan
6110
- ? (await this.buildDispatch.resolveLandedTaskEvidence().catch((error) => {
6111
- this.logDebug('The landed build tasks could not be read; the re-decompose is not held to them', { error: describeCaughtError(error) });
6112
- return undefined;
6113
- }))?.landedTasks
6114
- : undefined;
6236
+ const landedBuildTasks = producesBuildPlan ? await this.readBuiltTasksForBuildPlanRun(input) : undefined;
6115
6237
  const landedBuildTasksSection = landedBuildTasks === undefined || landedBuildTasks.length === 0 ? '' : [
6116
6238
  '# Build tasks already built (keep every one, under its ref, with its target and products)',
6117
6239
  'These tasks of the current build plan are built and committed. Your plan keeps each of them, under the same ref (author',
@@ -7523,6 +7645,79 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
7523
7645
  * no `engineCapabilities` key at all is read the same way: the blind brief and no refusal, which errs
7524
7646
  * toward refusing less rather than refusing on a capability set nobody declared.
7525
7647
  */
7648
+ /**
7649
+ * The maturity reading's inputs (#1496), composed ONCE for its two readers: the `bottom_up.maturity-reading` executor,
7650
+ * which lands the reading, and {@link readRequirementsStanding}, which the unattended drive reads before it may call the
7651
+ * goal reached (#3701). Two compositions would be two answers to "where does the application stand".
7652
+ *
7653
+ * - the landed family VALUES (a family present only as a file contributes nothing);
7654
+ * - the landing probe's own sets, read from the build dispatch rather than recomputed here: what LANDED is a question
7655
+ * the landing pass answers over the WORKING tree (#3204), and a second implementation of that question is how two
7656
+ * surfaces come to disagree about whether a task is done;
7657
+ * - the gaps coding runs reported and that are still open, which cap their requirement below VERIFIED (#2580);
7658
+ * - the CONFIGURATION a requirement's declared substance is measured against (#3702): the engine capabilities the
7659
+ * application enables and the languages it serves. Absent when either cannot be read, which the reading reports as
7660
+ * such on every requirement that declares a need, rather than as met.
7661
+ */
7662
+ async composeApplicationMaturityInputs(artifactState) {
7663
+ const decidedFamilyValues = {};
7664
+ for (const [family, value] of artifactState.artifactsByFamily) {
7665
+ if (value === undefined || value === null || value === FILE_PRESENT_WITHOUT_VALUE)
7666
+ continue;
7667
+ decidedFamilyValues[family] = value;
7668
+ }
7669
+ const evidence = await this.buildDispatch.resolveLandedTaskEvidence();
7670
+ const applicationConfiguration = this.readMaturityConfigurationFacts();
7671
+ return {
7672
+ decidedFamilyValues,
7673
+ ...(evidence === undefined ? {} : { landedTaskRefs: evidence.landedTaskRefs, provenTaskRefs: evidence.provenTaskRefs }),
7674
+ ...(evidence?.openReportedGaps === undefined ? {} : { openReportedGaps: evidence.openReportedGaps }),
7675
+ ...(applicationConfiguration === undefined ? {} : { applicationConfiguration }),
7676
+ };
7677
+ }
7678
+ /**
7679
+ * What the application's configuration turns on (#3702), for the maturity reading: the enabled engine capabilities
7680
+ * (`wildo.saas.config.ts`; none declared is none enabled) and the languages served, through the one reader the i18n
7681
+ * step and the capability composition share. `undefined` when the configuration could not be read: an unknown, never
7682
+ * an empty configuration.
7683
+ */
7684
+ readMaturityConfigurationFacts() {
7685
+ if (this.companionContext?.saasConfig === undefined)
7686
+ return undefined;
7687
+ let config;
7688
+ try {
7689
+ config = this.appConfigService?.config;
7690
+ }
7691
+ catch {
7692
+ return undefined;
7693
+ }
7694
+ if (config === undefined || config === null)
7695
+ return undefined;
7696
+ return {
7697
+ enabledEngineCapabilities: this.readEnabledEngineCapabilities() ?? [],
7698
+ servedLanguages: getCompanionServedLanguages(config),
7699
+ };
7700
+ }
7701
+ /**
7702
+ * Where the application stands against its own requirements NOW, for the unattended drive (#3701): the maturity reading
7703
+ * derived live from the same inputs the reading's executor lands, and every item still open on it. Derived rather than
7704
+ * read from the landed reading, which is only as current as the last time the reading's playbook ran: the reference run
7705
+ * stopped minutes after its last landing, and a stop rule must not judge the creation by a photograph.
7706
+ */
7707
+ async readRequirementsStanding() {
7708
+ const reading = deriveApplicationMaturity(await this.composeApplicationMaturityInputs(await this.readArtifactState()));
7709
+ return {
7710
+ measuredAt: new Date().toISOString(),
7711
+ stage: reading.stage,
7712
+ requirementCount: reading.requirements.length,
7713
+ openItems: listRequirementOpenItems(reading).map((item) => ({
7714
+ requirementRef: item.requirementRef,
7715
+ kind: item.kind,
7716
+ detail: item.detail,
7717
+ closedByTaskRef: item.closedByTaskRef ?? null,
7718
+ })),
7719
+ };
7720
+ }
7526
7721
  readEnabledEngineCapabilities() {
7527
7722
  const declared = this.companionContext.saasConfig?.engineCapabilities;
7528
7723
  if (declared === undefined)
@@ -7772,7 +7967,7 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
7772
7967
  // Every declared provider's compliance profile, from discovery (#1708). Unreadable → the population says
7773
7968
  // NOT READ, and the region report falls back to the engine specifications it always read.
7774
7969
  const discoveredProfiles = await this.resolveDiscoveredProviderComplianceProfiles(saasConfig);
7775
- const recipientPopulation = recipientPopulationOf(saasConfig, this.companionContext?.saasRoot, discoveredProfiles.profiles);
7970
+ const recipientPopulation = await recipientPopulationOf(saasConfig, this.companionContext?.saasRoot, discoveredProfiles.profiles);
7776
7971
  const complianceProfiles = { ...engineSpecificationComplianceProfiles(), ...(discoveredProfiles.profiles ?? {}) };
7777
7972
  const { register: processorRegister, notRead: processorRegisterNotRead } = await this.resolveProcessorRegister();
7778
7973
  const contractedService = new Set(partitionCapabilitiesByContractedService({ declaredCapabilities: allDeclaredCapabilities, providers: saasConfig.providers }).reachingContractedService);
@@ -8623,11 +8818,16 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
8623
8818
  * executes even if nobody remembers to wrap it. Nested counts are harmless: the file beats while the
8624
8819
  * count is above zero.
8625
8820
  */
8626
- async whileInFlight(work) {
8821
+ async whileInFlight(work, options = {}) {
8627
8822
  this.playbookExecutionsInFlight = (this.playbookExecutionsInFlight ?? 0) + 1;
8628
8823
  this.syncPlaybookRunHeartbeat();
8629
8824
  try {
8630
- return await work();
8825
+ /*
8826
+ * One RUN for the restart drain too (#3204), at the same entry points and for the same whole life, settle included.
8827
+ * The inner `executePlaybookRun` wrap passes `drainCounted: false`: counted twice, one paused run would still read
8828
+ * busy, and a held restart would never drain.
8829
+ */
8830
+ return await (options.drainCounted === false ? work() : this.whileDrainCounted(work));
8631
8831
  }
8632
8832
  finally {
8633
8833
  this.playbookExecutionsInFlight = Math.max(0, (this.playbookExecutionsInFlight ?? 1) - 1);
@@ -8907,24 +9107,36 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
8907
9107
  * run that silently never happened — and the work is completed detached against the opened ids.
8908
9108
  * Until 2026-09-20 this minted its own id and handed it in; a submission and its row now share one.
8909
9109
  */
9110
+ // Counted for the restart drain from BEFORE the open (#3204 second review L1): no drained marker between the start and the chain.
9111
+ const releaseOpeningCount = this.beginDrainCounted();
8910
9112
  const opened = await this.actorsSystem.openActorExecution(this.buildActorExecutionRequest(input))
8911
9113
  .catch(async (error) => {
9114
+ releaseOpeningCount();
8912
9115
  const subject = this.resolveExclusiveSubject(input);
8913
9116
  throw subject === undefined ? error : await this.nameTheRunHoldingTheSubject(error, MetaWorkflowsExclusiveSubject.COMPOSITE, subject, input.session);
8914
9117
  });
8915
9118
  const runId = opened.executionId;
8916
- // Registered BEFORE the run is started, so a caller that polls immediately cannot see a gap in
8917
- // which its own submission is reported nowhere.
8918
- this.runningDetachedRuns.set(runId, {
8919
- runId,
8920
- playbookRef: input.playbookRef,
8921
- ...(input.instanceKey ? { instanceKey: input.instanceKey } : {}),
8922
- startedAt,
8923
- ...(input.session ? { traceSessionId: input.session.sessionId } : {}),
8924
- ...(input.conversationId ? { conversationId: input.conversationId } : {}),
8925
- });
8926
- this.syncPlaybookRunHeartbeat();
8927
- void this.actorsSystem
9119
+ try {
9120
+ // Registered BEFORE the run is started, so a caller that polls immediately cannot see a gap in
9121
+ // which its own submission is reported nowhere.
9122
+ this.runningDetachedRuns.set(runId, {
9123
+ runId,
9124
+ playbookRef: input.playbookRef,
9125
+ ...(input.instanceKey ? { instanceKey: input.instanceKey } : {}),
9126
+ startedAt,
9127
+ ...(input.session ? { traceSessionId: input.session.sessionId } : {}),
9128
+ ...(input.conversationId ? { conversationId: input.conversationId } : {}),
9129
+ });
9130
+ this.syncPlaybookRunHeartbeat();
9131
+ }
9132
+ catch (error) {
9133
+ // Never leak the opening count (second review L4): a leaked count would keep the companion from ever draining.
9134
+ releaseOpeningCount();
9135
+ throw error;
9136
+ }
9137
+ // One RUN for the restart drain (#3204) from start to settle: the record and the chain's next round come after the work.
9138
+ // The chain's count starts before `work` is called, so releasing the opening count inside it leaves no gap.
9139
+ void this.whileDrainCounted(() => (releaseOpeningCount(), this.actorsSystem)
8928
9140
  .completeActorExecution(opened, async () => {
8929
9141
  // Where the build stood BEFORE the round, so its end can tell a round that moved from one that did not.
8930
9142
  // Only where a relaunch could read it (#1639): a dry run or a posture that never relaunches pays nothing here.
@@ -8993,7 +9205,7 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
8993
9205
  ...(input.session ? { traceSessionId: input.session.sessionId } : {}),
8994
9206
  ...(input.conversationId ? { conversationId: input.conversationId } : {}),
8995
9207
  });
8996
- });
9208
+ }));
8997
9209
  return {
8998
9210
  accepted: false,
8999
9211
  async: true,