@wildo-ai/dev-companion 1.1.5 → 1.1.6

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 (596) hide show
  1. package/dist/esm/.tsbuildinfo +1 -1
  2. package/dist/esm/brand/models/logo-generation.actors-system.definitions.d.ts.map +1 -1
  3. package/dist/esm/brand/models/logo-generation.actors-system.definitions.js +0 -1
  4. package/dist/esm/brand/models/logo-generation.actors-system.definitions.js.map +1 -1
  5. package/dist/esm/brand/models/logo-judge.actors-system.definitions.d.ts.map +1 -1
  6. package/dist/esm/brand/models/logo-judge.actors-system.definitions.js +0 -1
  7. package/dist/esm/brand/models/logo-judge.actors-system.definitions.js.map +1 -1
  8. package/dist/esm/brand/services/brand-accept.companion.service.d.ts +8 -0
  9. package/dist/esm/brand/services/brand-accept.companion.service.d.ts.map +1 -1
  10. package/dist/esm/brand/services/brand-accept.companion.service.js +6 -0
  11. package/dist/esm/brand/services/brand-accept.companion.service.js.map +1 -1
  12. package/dist/esm/brand/services/brand-propagation.companion.utils.d.ts +21 -0
  13. package/dist/esm/brand/services/brand-propagation.companion.utils.d.ts.map +1 -0
  14. package/dist/esm/brand/services/brand-propagation.companion.utils.js +33 -0
  15. package/dist/esm/brand/services/brand-propagation.companion.utils.js.map +1 -0
  16. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.d.ts +69 -1
  17. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.d.ts.map +1 -1
  18. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.js +84 -3
  19. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.js.map +1 -1
  20. package/dist/esm/claude-cli/models/concurrent-coding-runs.models.d.ts +8 -4
  21. package/dist/esm/claude-cli/models/concurrent-coding-runs.models.d.ts.map +1 -1
  22. package/dist/esm/claude-cli/models/concurrent-coding-runs.models.js +9 -5
  23. package/dist/esm/claude-cli/models/concurrent-coding-runs.models.js.map +1 -1
  24. package/dist/esm/claude-cli/models/parked-question-answerer.actors-system.definitions.js +1 -1
  25. package/dist/esm/claude-cli/models/parked-question-answerer.actors-system.definitions.js.map +1 -1
  26. package/dist/esm/claude-cli/services/__tests__/support/in-memory-coding-actor-plane.d.ts +4 -0
  27. package/dist/esm/claude-cli/services/__tests__/support/in-memory-coding-actor-plane.d.ts.map +1 -1
  28. package/dist/esm/claude-cli/services/__tests__/support/in-memory-coding-actor-plane.js +25 -3
  29. package/dist/esm/claude-cli/services/__tests__/support/in-memory-coding-actor-plane.js.map +1 -1
  30. package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.d.ts +159 -11
  31. package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.d.ts.map +1 -1
  32. package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.js +424 -41
  33. package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.js.map +1 -1
  34. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.d.ts +333 -60
  35. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.d.ts.map +1 -1
  36. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.js +1029 -185
  37. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.js.map +1 -1
  38. package/dist/esm/claude-cli/services/coding-run-write-register.companion.service.d.ts +8 -2
  39. package/dist/esm/claude-cli/services/coding-run-write-register.companion.service.d.ts.map +1 -1
  40. package/dist/esm/claude-cli/services/coding-run-write-register.companion.service.js +8 -2
  41. package/dist/esm/claude-cli/services/coding-run-write-register.companion.service.js.map +1 -1
  42. package/dist/esm/claude-cli/services/in-flight-coding-runs.companion.d.ts +20 -0
  43. package/dist/esm/claude-cli/services/in-flight-coding-runs.companion.d.ts.map +1 -0
  44. package/dist/esm/claude-cli/services/in-flight-coding-runs.companion.js +29 -0
  45. package/dist/esm/claude-cli/services/in-flight-coding-runs.companion.js.map +1 -0
  46. package/dist/esm/claude-cli/services/research-agent-dispatch.companion.service.d.ts +11 -0
  47. package/dist/esm/claude-cli/services/research-agent-dispatch.companion.service.d.ts.map +1 -1
  48. package/dist/esm/claude-cli/services/research-agent-dispatch.companion.service.js +60 -7
  49. package/dist/esm/claude-cli/services/research-agent-dispatch.companion.service.js.map +1 -1
  50. package/dist/esm/claude-cli/services/research-evidence-store.companion.d.ts +5 -4
  51. package/dist/esm/claude-cli/services/research-evidence-store.companion.d.ts.map +1 -1
  52. package/dist/esm/claude-cli/services/research-evidence-store.companion.js +13 -4
  53. package/dist/esm/claude-cli/services/research-evidence-store.companion.js.map +1 -1
  54. package/dist/esm/companion-api/companion-api.schemas.d.ts +193 -2
  55. package/dist/esm/companion-api/companion-api.schemas.d.ts.map +1 -1
  56. package/dist/esm/companion-api/companion-api.schemas.js +20 -1
  57. package/dist/esm/companion-api/companion-api.schemas.js.map +1 -1
  58. package/dist/esm/companion-api/companion-error-guidance.models.d.ts +25 -0
  59. package/dist/esm/companion-api/companion-error-guidance.models.d.ts.map +1 -0
  60. package/dist/esm/companion-api/companion-error-guidance.models.js +26 -0
  61. package/dist/esm/companion-api/companion-error-guidance.models.js.map +1 -0
  62. package/dist/esm/companion-api/controllers/companion-file-route-confinement.d.ts +44 -0
  63. package/dist/esm/companion-api/controllers/companion-file-route-confinement.d.ts.map +1 -0
  64. package/dist/esm/companion-api/controllers/companion-file-route-confinement.js +111 -0
  65. package/dist/esm/companion-api/controllers/companion-file-route-confinement.js.map +1 -0
  66. package/dist/esm/companion-api/controllers/companion-token-floor.policy.d.ts +6 -14
  67. package/dist/esm/companion-api/controllers/companion-token-floor.policy.d.ts.map +1 -1
  68. package/dist/esm/companion-api/controllers/companion-token-floor.policy.js +6 -14
  69. package/dist/esm/companion-api/controllers/companion-token-floor.policy.js.map +1 -1
  70. package/dist/esm/companion-api/controllers/companion-trace-exemptions.d.ts +12 -0
  71. package/dist/esm/companion-api/controllers/companion-trace-exemptions.d.ts.map +1 -0
  72. package/dist/esm/companion-api/controllers/companion-trace-exemptions.js +20 -0
  73. package/dist/esm/companion-api/controllers/companion-trace-exemptions.js.map +1 -0
  74. package/dist/esm/companion-api/controllers/companion.controller.d.ts +104 -14
  75. package/dist/esm/companion-api/controllers/companion.controller.d.ts.map +1 -1
  76. package/dist/esm/companion-api/controllers/companion.controller.js +516 -122
  77. package/dist/esm/companion-api/controllers/companion.controller.js.map +1 -1
  78. package/dist/esm/core/catalogs/structured-data-catalog-audit.service.d.ts.map +1 -1
  79. package/dist/esm/core/catalogs/structured-data-catalog-audit.service.js +6 -38
  80. package/dist/esm/core/catalogs/structured-data-catalog-audit.service.js.map +1 -1
  81. package/dist/esm/core/config/primary-language.companion.utils.d.ts +13 -0
  82. package/dist/esm/core/config/primary-language.companion.utils.d.ts.map +1 -1
  83. package/dist/esm/core/config/primary-language.companion.utils.js +19 -0
  84. package/dist/esm/core/config/primary-language.companion.utils.js.map +1 -1
  85. package/dist/esm/core/context/companion-package-loaders.companion.js +1 -39
  86. package/dist/esm/core/context/companion-package-loaders.companion.js.map +1 -1
  87. package/dist/esm/core/inject/models/container.d.ts.map +1 -1
  88. package/dist/esm/core/inject/models/container.js +4 -0
  89. package/dist/esm/core/inject/models/container.js.map +1 -1
  90. package/dist/esm/core/inject/models/service-types.d.ts +4 -0
  91. package/dist/esm/core/inject/models/service-types.d.ts.map +1 -1
  92. package/dist/esm/core/inject/models/service-types.js +4 -0
  93. package/dist/esm/core/inject/models/service-types.js.map +1 -1
  94. package/dist/esm/core/introspection/behaviors/companion-introspection-behavior-definitions.d.ts.map +1 -1
  95. package/dist/esm/core/introspection/behaviors/companion-introspection-behavior-definitions.js +16 -0
  96. package/dist/esm/core/introspection/behaviors/companion-introspection-behavior-definitions.js.map +1 -1
  97. package/dist/esm/core/introspection/models/companion-introspection.models.d.ts +1 -1
  98. package/dist/esm/core/introspection/models/companion-introspection.models.d.ts.map +1 -1
  99. package/dist/esm/core/introspection/models/companion-introspection.models.js +6 -0
  100. package/dist/esm/core/introspection/models/companion-introspection.models.js.map +1 -1
  101. package/dist/esm/core/introspection/resources/application-secrets.companion.d.ts +41 -0
  102. package/dist/esm/core/introspection/resources/application-secrets.companion.d.ts.map +1 -0
  103. package/dist/esm/core/introspection/resources/application-secrets.companion.js +155 -0
  104. package/dist/esm/core/introspection/resources/application-secrets.companion.js.map +1 -0
  105. package/dist/esm/core/introspection/resources/creation-console-answer.companion.d.ts +76 -0
  106. package/dist/esm/core/introspection/resources/creation-console-answer.companion.d.ts.map +1 -0
  107. package/dist/esm/core/introspection/resources/creation-console-answer.companion.js +197 -0
  108. package/dist/esm/core/introspection/resources/creation-console-answer.companion.js.map +1 -0
  109. package/dist/esm/core/introspection/resources/creation-console-projection.companion.d.ts +47 -0
  110. package/dist/esm/core/introspection/resources/creation-console-projection.companion.d.ts.map +1 -0
  111. package/dist/esm/core/introspection/resources/creation-console-projection.companion.js +199 -0
  112. package/dist/esm/core/introspection/resources/creation-console-projection.companion.js.map +1 -0
  113. package/dist/esm/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.d.ts +42 -0
  114. package/dist/esm/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.d.ts.map +1 -1
  115. package/dist/esm/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.js +173 -22
  116. package/dist/esm/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.js.map +1 -1
  117. package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.d.ts +78 -90
  118. package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.d.ts.map +1 -1
  119. package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.js +288 -25
  120. package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.js.map +1 -1
  121. package/dist/esm/core/introspection/resources/introspection-resource-notifier.companion.service.d.ts +22 -36
  122. package/dist/esm/core/introspection/resources/introspection-resource-notifier.companion.service.d.ts.map +1 -1
  123. package/dist/esm/core/introspection/resources/introspection-resource-notifier.companion.service.js +49 -13
  124. package/dist/esm/core/introspection/resources/introspection-resource-notifier.companion.service.js.map +1 -1
  125. package/dist/esm/core/introspection/resources/introspection-resource-source.companion.service.d.ts +1 -1
  126. package/dist/esm/core/introspection/resources/introspection-resource-source.companion.service.d.ts.map +1 -1
  127. package/dist/esm/core/introspection/resources/introspection-resource-source.companion.service.js +10 -15
  128. package/dist/esm/core/introspection/resources/introspection-resource-source.companion.service.js.map +1 -1
  129. package/dist/esm/core/introspection/subprocess/application-domain-model.behavior.d.ts +2 -0
  130. package/dist/esm/core/introspection/subprocess/application-domain-model.behavior.d.ts.map +1 -1
  131. package/dist/esm/core/introspection/subprocess/application-domain-model.behavior.js.map +1 -1
  132. package/dist/esm/core/introspection/subprocess/asset-noop-hooks.d.ts +4 -0
  133. package/dist/esm/core/introspection/subprocess/asset-noop-hooks.d.ts.map +1 -1
  134. package/dist/esm/core/introspection/subprocess/asset-noop-hooks.js.map +1 -1
  135. package/dist/esm/core/introspection/subprocess/companion-introspection-behavior-handlers.d.ts.map +1 -1
  136. package/dist/esm/core/introspection/subprocess/companion-introspection-behavior-handlers.js +77 -9
  137. package/dist/esm/core/introspection/subprocess/companion-introspection-behavior-handlers.js.map +1 -1
  138. package/dist/esm/core/introspection/subprocess/compliance-primary-facts.behavior.d.ts +45 -3
  139. package/dist/esm/core/introspection/subprocess/compliance-primary-facts.behavior.d.ts.map +1 -1
  140. package/dist/esm/core/introspection/subprocess/compliance-primary-facts.behavior.js +8 -1
  141. package/dist/esm/core/introspection/subprocess/compliance-primary-facts.behavior.js.map +1 -1
  142. package/dist/esm/core/introspection/subprocess/frontend-labels-needed-info.behavior.d.ts +3 -2
  143. package/dist/esm/core/introspection/subprocess/frontend-labels-needed-info.behavior.d.ts.map +1 -1
  144. package/dist/esm/core/introspection/subprocess/frontend-labels-needed-info.behavior.js +8 -3
  145. package/dist/esm/core/introspection/subprocess/frontend-labels-needed-info.behavior.js.map +1 -1
  146. package/dist/esm/core/introspection/subprocess/openapi-generation-input.behavior.d.ts +30 -1
  147. package/dist/esm/core/introspection/subprocess/openapi-generation-input.behavior.d.ts.map +1 -1
  148. package/dist/esm/core/introspection/subprocess/openapi-generation-input.behavior.js +128 -20
  149. package/dist/esm/core/introspection/subprocess/openapi-generation-input.behavior.js.map +1 -1
  150. package/dist/esm/core/introspection/subprocess/specification-artifacts.behavior.d.ts +13 -0
  151. package/dist/esm/core/introspection/subprocess/specification-artifacts.behavior.d.ts.map +1 -1
  152. package/dist/esm/core/introspection/subprocess/specification-artifacts.behavior.js +21 -17
  153. package/dist/esm/core/introspection/subprocess/specification-artifacts.behavior.js.map +1 -1
  154. package/dist/esm/core/runtime/companion-endpoint-record.d.ts +8 -0
  155. package/dist/esm/core/runtime/companion-endpoint-record.d.ts.map +1 -0
  156. package/dist/esm/core/runtime/companion-endpoint-record.js +23 -0
  157. package/dist/esm/core/runtime/companion-endpoint-record.js.map +1 -0
  158. package/dist/esm/core/runtime/companion-env-file.d.ts +30 -0
  159. package/dist/esm/core/runtime/companion-env-file.d.ts.map +1 -0
  160. package/dist/esm/core/runtime/companion-env-file.js +53 -0
  161. package/dist/esm/core/runtime/companion-env-file.js.map +1 -0
  162. package/dist/esm/core/runtime/dev-compile-quiet.companion.d.ts +5 -0
  163. package/dist/esm/core/runtime/dev-compile-quiet.companion.d.ts.map +1 -1
  164. package/dist/esm/core/runtime/dev-compile-quiet.companion.js +11 -0
  165. package/dist/esm/core/runtime/dev-compile-quiet.companion.js.map +1 -1
  166. package/dist/esm/core/runtime/in-flight-work-heartbeat.companion.d.ts +56 -0
  167. package/dist/esm/core/runtime/in-flight-work-heartbeat.companion.d.ts.map +1 -0
  168. package/dist/esm/core/runtime/in-flight-work-heartbeat.companion.js +97 -0
  169. package/dist/esm/core/runtime/in-flight-work-heartbeat.companion.js.map +1 -0
  170. package/dist/esm/core/runtime/services/start-companion-application.service.d.ts +43 -3
  171. package/dist/esm/core/runtime/services/start-companion-application.service.d.ts.map +1 -1
  172. package/dist/esm/core/runtime/services/start-companion-application.service.js +127 -22
  173. package/dist/esm/core/runtime/services/start-companion-application.service.js.map +1 -1
  174. package/dist/esm/core/runtime/utils/companion-platform-config.companion.d.ts +11 -1
  175. package/dist/esm/core/runtime/utils/companion-platform-config.companion.d.ts.map +1 -1
  176. package/dist/esm/core/runtime/utils/companion-platform-config.companion.js +42 -19
  177. package/dist/esm/core/runtime/utils/companion-platform-config.companion.js.map +1 -1
  178. package/dist/esm/core/specifications/resource-specification-context.factory.d.ts.map +1 -1
  179. package/dist/esm/core/specifications/resource-specification-context.factory.js +10 -1
  180. package/dist/esm/core/specifications/resource-specification-context.factory.js.map +1 -1
  181. package/dist/esm/core/traceability/companion-traceability.models.d.ts +1 -7
  182. package/dist/esm/core/traceability/companion-traceability.models.d.ts.map +1 -1
  183. package/dist/esm/core/traceability/companion-traceability.models.js +3 -5
  184. package/dist/esm/core/traceability/companion-traceability.models.js.map +1 -1
  185. package/dist/esm/creation-conversation/creation-conversation.actors-system.definitions.d.ts.map +1 -1
  186. package/dist/esm/creation-conversation/creation-conversation.actors-system.definitions.js +15 -14
  187. package/dist/esm/creation-conversation/creation-conversation.actors-system.definitions.js.map +1 -1
  188. package/dist/esm/creation-conversation/creation-conversation.function-tools.d.ts +0 -23
  189. package/dist/esm/creation-conversation/creation-conversation.function-tools.d.ts.map +1 -1
  190. package/dist/esm/creation-conversation/creation-conversation.function-tools.js +251 -50
  191. package/dist/esm/creation-conversation/creation-conversation.function-tools.js.map +1 -1
  192. package/dist/esm/deliberations/models/deliberation-agents.actors-system.definitions.d.ts.map +1 -1
  193. package/dist/esm/deliberations/models/deliberation-agents.actors-system.definitions.js +0 -2
  194. package/dist/esm/deliberations/models/deliberation-agents.actors-system.definitions.js.map +1 -1
  195. package/dist/esm/deliberations/services/deliberation.companion.service.d.ts.map +1 -1
  196. package/dist/esm/deliberations/services/deliberation.companion.service.js +3 -2
  197. package/dist/esm/deliberations/services/deliberation.companion.service.js.map +1 -1
  198. package/dist/esm/email/models/email-template.actors-system.definitions.d.ts.map +1 -1
  199. package/dist/esm/email/models/email-template.actors-system.definitions.js +0 -1
  200. package/dist/esm/email/models/email-template.actors-system.definitions.js.map +1 -1
  201. package/dist/esm/email/services/email-template.companion.service.d.ts +5 -3
  202. package/dist/esm/email/services/email-template.companion.service.d.ts.map +1 -1
  203. package/dist/esm/email/services/email-template.companion.service.js +53 -255
  204. package/dist/esm/email/services/email-template.companion.service.js.map +1 -1
  205. package/dist/esm/email/utils/email-labels-file-source.utils.d.ts +12 -0
  206. package/dist/esm/email/utils/email-labels-file-source.utils.d.ts.map +1 -1
  207. package/dist/esm/email/utils/email-labels-file-source.utils.js +62 -3
  208. package/dist/esm/email/utils/email-labels-file-source.utils.js.map +1 -1
  209. package/dist/esm/email/utils/email-labels-tree.utils.d.ts +52 -0
  210. package/dist/esm/email/utils/email-labels-tree.utils.d.ts.map +1 -0
  211. package/dist/esm/email/utils/email-labels-tree.utils.js +261 -0
  212. package/dist/esm/email/utils/email-labels-tree.utils.js.map +1 -0
  213. package/dist/esm/executions/services/companion-actor-execution-persistence.adapter.d.ts +2 -0
  214. package/dist/esm/executions/services/companion-actor-execution-persistence.adapter.d.ts.map +1 -1
  215. package/dist/esm/executions/services/companion-actor-execution-persistence.adapter.js +21 -1
  216. package/dist/esm/executions/services/companion-actor-execution-persistence.adapter.js.map +1 -1
  217. package/dist/esm/executions/services/companion-executions.companion.service.d.ts +18 -1
  218. package/dist/esm/executions/services/companion-executions.companion.service.d.ts.map +1 -1
  219. package/dist/esm/executions/services/companion-executions.companion.service.js +187 -46
  220. package/dist/esm/executions/services/companion-executions.companion.service.js.map +1 -1
  221. package/dist/esm/expert-personas/models/expert-persona-critique.actors-system.definitions.d.ts.map +1 -1
  222. package/dist/esm/expert-personas/models/expert-persona-critique.actors-system.definitions.js +0 -1
  223. package/dist/esm/expert-personas/models/expert-persona-critique.actors-system.definitions.js.map +1 -1
  224. package/dist/esm/expert-personas/models/expert-persona-derivation.actors-system.definitions.d.ts.map +1 -1
  225. package/dist/esm/expert-personas/models/expert-persona-derivation.actors-system.definitions.js +0 -1
  226. package/dist/esm/expert-personas/models/expert-persona-derivation.actors-system.definitions.js.map +1 -1
  227. package/dist/esm/expert-personas/services/expert-persona.companion.service.d.ts.map +1 -1
  228. package/dist/esm/expert-personas/services/expert-persona.companion.service.js +10 -0
  229. package/dist/esm/expert-personas/services/expert-persona.companion.service.js.map +1 -1
  230. package/dist/esm/i18n/components/APPLICATION_LEVEL_NOTIFICATION_CENTER.en.d.ts +1 -8
  231. package/dist/esm/i18n/components/APPLICATION_LEVEL_NOTIFICATION_CENTER.en.d.ts.map +1 -1
  232. package/dist/esm/i18n/components/APPLICATION_LEVEL_NOTIFICATION_CENTER.en.js +2 -9
  233. package/dist/esm/i18n/components/APPLICATION_LEVEL_NOTIFICATION_CENTER.en.js.map +1 -1
  234. package/dist/esm/i18n/components/APPLICATION_LEVEL_USER_DROPDOWN.en.d.ts +2 -0
  235. package/dist/esm/i18n/components/APPLICATION_LEVEL_USER_DROPDOWN.en.d.ts.map +1 -1
  236. package/dist/esm/i18n/components/APPLICATION_LEVEL_USER_DROPDOWN.en.js +3 -1
  237. package/dist/esm/i18n/components/APPLICATION_LEVEL_USER_DROPDOWN.en.js.map +1 -1
  238. package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_WORK_OVERRIDE_RATE_SETTINGS.en.d.ts +32 -0
  239. package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_WORK_OVERRIDE_RATE_SETTINGS.en.d.ts.map +1 -0
  240. package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_WORK_OVERRIDE_RATE_SETTINGS.en.js +32 -0
  241. package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_WORK_OVERRIDE_RATE_SETTINGS.en.js.map +1 -0
  242. package/dist/esm/i18n/components/APP_LAYOUTS_APPEARANCE_SETTINGS.en.d.ts +0 -1
  243. package/dist/esm/i18n/components/APP_LAYOUTS_APPEARANCE_SETTINGS.en.d.ts.map +1 -1
  244. package/dist/esm/i18n/components/APP_LAYOUTS_APPEARANCE_SETTINGS.en.js +0 -1
  245. package/dist/esm/i18n/components/APP_LAYOUTS_APPEARANCE_SETTINGS.en.js.map +1 -1
  246. package/dist/esm/i18n/components/APP_LAYOUTS_BILLING_SETTINGS.en.d.ts +0 -7
  247. package/dist/esm/i18n/components/APP_LAYOUTS_BILLING_SETTINGS.en.d.ts.map +1 -1
  248. package/dist/esm/i18n/components/APP_LAYOUTS_BILLING_SETTINGS.en.js +0 -7
  249. package/dist/esm/i18n/components/APP_LAYOUTS_BILLING_SETTINGS.en.js.map +1 -1
  250. package/dist/esm/i18n/components/APP_LAYOUTS_CONNECTED_ACCOUNTS_SETTINGS.en.d.ts +30 -4
  251. package/dist/esm/i18n/components/APP_LAYOUTS_CONNECTED_ACCOUNTS_SETTINGS.en.d.ts.map +1 -1
  252. package/dist/esm/i18n/components/APP_LAYOUTS_CONNECTED_ACCOUNTS_SETTINGS.en.js +31 -5
  253. package/dist/esm/i18n/components/APP_LAYOUTS_CONNECTED_ACCOUNTS_SETTINGS.en.js.map +1 -1
  254. package/dist/esm/i18n/components/APP_LAYOUTS_INVITATIONS_SETTINGS.en.d.ts +0 -2
  255. package/dist/esm/i18n/components/APP_LAYOUTS_INVITATIONS_SETTINGS.en.d.ts.map +1 -1
  256. package/dist/esm/i18n/components/APP_LAYOUTS_INVITATIONS_SETTINGS.en.js +0 -2
  257. package/dist/esm/i18n/components/APP_LAYOUTS_INVITATIONS_SETTINGS.en.js.map +1 -1
  258. package/dist/esm/i18n/components/APP_LAYOUTS_MAIN_CONTAINER.en.d.ts +4 -0
  259. package/dist/esm/i18n/components/APP_LAYOUTS_MAIN_CONTAINER.en.d.ts.map +1 -1
  260. package/dist/esm/i18n/components/APP_LAYOUTS_MAIN_CONTAINER.en.js +5 -1
  261. package/dist/esm/i18n/components/APP_LAYOUTS_MAIN_CONTAINER.en.js.map +1 -1
  262. package/dist/esm/i18n/components/APP_LAYOUTS_SECURITY_SETTINGS.en.d.ts +1 -15
  263. package/dist/esm/i18n/components/APP_LAYOUTS_SECURITY_SETTINGS.en.d.ts.map +1 -1
  264. package/dist/esm/i18n/components/APP_LAYOUTS_SECURITY_SETTINGS.en.js +1 -15
  265. package/dist/esm/i18n/components/APP_LAYOUTS_SECURITY_SETTINGS.en.js.map +1 -1
  266. package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.en.d.ts +0 -3
  267. package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.en.d.ts.map +1 -1
  268. package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.en.js +0 -3
  269. package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.en.js.map +1 -1
  270. package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.en.d.ts +49 -16
  271. package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.en.d.ts.map +1 -1
  272. package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.en.js +49 -16
  273. package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.en.js.map +1 -1
  274. package/dist/esm/i18n/components/LOW_LEVEL_AI_SYSTEM_CATALOG.en.d.ts +0 -5
  275. package/dist/esm/i18n/components/LOW_LEVEL_AI_SYSTEM_CATALOG.en.d.ts.map +1 -1
  276. package/dist/esm/i18n/components/LOW_LEVEL_AI_SYSTEM_CATALOG.en.js +0 -5
  277. package/dist/esm/i18n/components/LOW_LEVEL_AI_SYSTEM_CATALOG.en.js.map +1 -1
  278. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PLAN_CHANGE_PREVIEW.en.d.ts +3 -0
  279. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PLAN_CHANGE_PREVIEW.en.d.ts.map +1 -1
  280. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PLAN_CHANGE_PREVIEW.en.js +4 -1
  281. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PLAN_CHANGE_PREVIEW.en.js.map +1 -1
  282. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PRICING_TABLE.en.d.ts +7 -1
  283. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PRICING_TABLE.en.d.ts.map +1 -1
  284. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PRICING_TABLE.en.js +8 -2
  285. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PRICING_TABLE.en.js.map +1 -1
  286. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_USAGE_DASHBOARD.en.d.ts +1 -0
  287. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_USAGE_DASHBOARD.en.d.ts.map +1 -1
  288. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_USAGE_DASHBOARD.en.js +2 -1
  289. package/dist/esm/i18n/components/LOW_LEVEL_BILLING_USAGE_DASHBOARD.en.js.map +1 -1
  290. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE.en.d.ts +1 -0
  291. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE.en.d.ts.map +1 -1
  292. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE.en.js +2 -1
  293. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE.en.js.map +1 -1
  294. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_NUMBER.en.d.ts +12 -0
  295. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_NUMBER.en.d.ts.map +1 -0
  296. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_NUMBER.en.js +12 -0
  297. package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_NUMBER.en.js.map +1 -0
  298. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD.en.d.ts +1 -0
  299. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD.en.d.ts.map +1 -1
  300. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD.en.js +2 -1
  301. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD.en.js.map +1 -1
  302. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_ADDRESS.en.d.ts +10 -0
  303. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_ADDRESS.en.d.ts.map +1 -1
  304. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_ADDRESS.en.js +11 -1
  305. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_ADDRESS.en.js.map +1 -1
  306. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_FILE.en.d.ts +8 -0
  307. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_FILE.en.d.ts.map +1 -1
  308. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_FILE.en.js +9 -1
  309. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_FILE.en.js.map +1 -1
  310. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.en.d.ts +3 -0
  311. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.en.d.ts.map +1 -1
  312. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.en.js +4 -1
  313. package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.en.js.map +1 -1
  314. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.en.d.ts +2 -1
  315. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.en.d.ts.map +1 -1
  316. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.en.js +3 -2
  317. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.en.js.map +1 -1
  318. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_BULK.en.d.ts +6 -0
  319. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_BULK.en.d.ts.map +1 -1
  320. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_BULK.en.js +7 -1
  321. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_BULK.en.js.map +1 -1
  322. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_ITEMS.en.d.ts +1 -0
  323. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_ITEMS.en.d.ts.map +1 -1
  324. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_ITEMS.en.js +2 -1
  325. package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_ITEMS.en.js.map +1 -1
  326. package/dist/esm/i18n/components/progression_milestone_tracker.en.d.ts +0 -2
  327. package/dist/esm/i18n/components/progression_milestone_tracker.en.d.ts.map +1 -1
  328. package/dist/esm/i18n/components/progression_milestone_tracker.en.js +0 -2
  329. package/dist/esm/i18n/components/progression_milestone_tracker.en.js.map +1 -1
  330. package/dist/esm/i18n/composite_views/app.creation-conversation.en.d.ts +1 -0
  331. package/dist/esm/i18n/composite_views/app.creation-conversation.en.d.ts.map +1 -1
  332. package/dist/esm/i18n/composite_views/app.creation-conversation.en.js +123 -19
  333. package/dist/esm/i18n/composite_views/app.creation-conversation.en.js.map +1 -1
  334. package/dist/esm/i18n/composite_views/app.creation-dossier.en.d.ts.map +1 -1
  335. package/dist/esm/i18n/composite_views/app.creation-dossier.en.js +12 -0
  336. package/dist/esm/i18n/composite_views/app.creation-dossier.en.js.map +1 -1
  337. package/dist/esm/i18n/errors_guidance/errors-guidance.en.d.ts +25 -0
  338. package/dist/esm/i18n/errors_guidance/errors-guidance.en.d.ts.map +1 -0
  339. package/dist/esm/i18n/errors_guidance/errors-guidance.en.js +26 -0
  340. package/dist/esm/i18n/errors_guidance/errors-guidance.en.js.map +1 -0
  341. package/dist/esm/i18n/errors_messages/errors-messages.en.d.ts +26 -3
  342. package/dist/esm/i18n/errors_messages/errors-messages.en.d.ts.map +1 -1
  343. package/dist/esm/i18n/errors_messages/errors-messages.en.js +25 -3
  344. package/dist/esm/i18n/errors_messages/errors-messages.en.js.map +1 -1
  345. package/dist/esm/i18n/index.d.ts +10 -8
  346. package/dist/esm/i18n/index.d.ts.map +1 -1
  347. package/dist/esm/i18n/index.js +10 -8
  348. package/dist/esm/i18n/index.js.map +1 -1
  349. package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.en.d.ts +10 -0
  350. package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.en.d.ts.map +1 -1
  351. package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.en.js +2 -0
  352. package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.en.js.map +1 -1
  353. package/dist/esm/i18n/resources/workbenchApplicationSecrets.en.d.ts +97 -0
  354. package/dist/esm/i18n/resources/workbenchApplicationSecrets.en.d.ts.map +1 -0
  355. package/dist/esm/i18n/resources/workbenchApplicationSecrets.en.js +60 -0
  356. package/dist/esm/i18n/resources/workbenchApplicationSecrets.en.js.map +1 -0
  357. package/dist/esm/i18n/resources/workbenchAspects.en.d.ts.map +1 -1
  358. package/dist/esm/i18n/resources/workbenchAspects.en.js +6 -0
  359. package/dist/esm/i18n/resources/workbenchAspects.en.js.map +1 -1
  360. package/dist/esm/i18n/resources/workbenchBuildDispatches.en.d.ts +5 -0
  361. package/dist/esm/i18n/resources/workbenchBuildDispatches.en.d.ts.map +1 -1
  362. package/dist/esm/i18n/resources/workbenchBuildDispatches.en.js +1 -0
  363. package/dist/esm/i18n/resources/workbenchBuildDispatches.en.js.map +1 -1
  364. package/dist/esm/i18n/resources/workbenchCodingLaneStatus.en.d.ts +24 -0
  365. package/dist/esm/i18n/resources/workbenchCodingLaneStatus.en.d.ts.map +1 -1
  366. package/dist/esm/i18n/resources/workbenchCodingLaneStatus.en.js +8 -0
  367. package/dist/esm/i18n/resources/workbenchCodingLaneStatus.en.js.map +1 -1
  368. package/dist/esm/i18n/resources/workbenchDossierEntries.en.d.ts +30 -0
  369. package/dist/esm/i18n/resources/workbenchDossierEntries.en.d.ts.map +1 -1
  370. package/dist/esm/i18n/resources/workbenchDossierEntries.en.js +9 -0
  371. package/dist/esm/i18n/resources/workbenchDossierEntries.en.js.map +1 -1
  372. package/dist/esm/i18n/resources/workbenchGovernanceDocuments.en.d.ts +17 -4
  373. package/dist/esm/i18n/resources/workbenchGovernanceDocuments.en.d.ts.map +1 -1
  374. package/dist/esm/i18n/resources/workbenchGovernanceDocuments.en.js +32 -4
  375. package/dist/esm/i18n/resources/workbenchGovernanceDocuments.en.js.map +1 -1
  376. package/dist/esm/i18n/resources/workbenchParkedCodingQuestions.en.d.ts +8 -2
  377. package/dist/esm/i18n/resources/workbenchParkedCodingQuestions.en.d.ts.map +1 -1
  378. package/dist/esm/i18n/resources/workbenchParkedCodingQuestions.en.js +6 -2
  379. package/dist/esm/i18n/resources/workbenchParkedCodingQuestions.en.js.map +1 -1
  380. package/dist/esm/i18n/resources/workbenchPlaybookRuns.en.d.ts +18 -7
  381. package/dist/esm/i18n/resources/workbenchPlaybookRuns.en.d.ts.map +1 -1
  382. package/dist/esm/i18n/resources/workbenchPlaybookRuns.en.js +17 -7
  383. package/dist/esm/i18n/resources/workbenchPlaybookRuns.en.js.map +1 -1
  384. package/dist/esm/i18n/resources/workbenchPlaybooks.en.d.ts +28 -3
  385. package/dist/esm/i18n/resources/workbenchPlaybooks.en.d.ts.map +1 -1
  386. package/dist/esm/i18n/resources/workbenchPlaybooks.en.js +13 -3
  387. package/dist/esm/i18n/resources/workbenchPlaybooks.en.js.map +1 -1
  388. package/dist/esm/i18n/resources/workbenchRunWriteRecords.en.d.ts +3 -2
  389. package/dist/esm/i18n/resources/workbenchRunWriteRecords.en.d.ts.map +1 -1
  390. package/dist/esm/i18n/resources/workbenchRunWriteRecords.en.js +8 -2
  391. package/dist/esm/i18n/resources/workbenchRunWriteRecords.en.js.map +1 -1
  392. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.d.ts +118 -8
  393. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.d.ts.map +1 -1
  394. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.js +42 -16
  395. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.js.map +1 -1
  396. package/dist/esm/i18n/resources/workbenchWaitingPlaybookRuns.en.d.ts +12 -2
  397. package/dist/esm/i18n/resources/workbenchWaitingPlaybookRuns.en.d.ts.map +1 -1
  398. package/dist/esm/i18n/resources/workbenchWaitingPlaybookRuns.en.js +16 -2
  399. package/dist/esm/i18n/resources/workbenchWaitingPlaybookRuns.en.js.map +1 -1
  400. package/dist/esm/i18n/system_enums/application-creation.en.d.ts +10 -0
  401. package/dist/esm/i18n/system_enums/application-creation.en.d.ts.map +1 -1
  402. package/dist/esm/i18n/system_enums/application-creation.en.js +11 -0
  403. package/dist/esm/i18n/system_enums/application-creation.en.js.map +1 -1
  404. package/dist/esm/i18n/system_enums/processor-register.en.d.ts +6 -0
  405. package/dist/esm/i18n/system_enums/processor-register.en.d.ts.map +1 -1
  406. package/dist/esm/i18n/system_enums/processor-register.en.js +6 -0
  407. package/dist/esm/i18n/system_enums/processor-register.en.js.map +1 -1
  408. package/dist/esm/i18n/system_enums/workbench-dossier.en.d.ts +4 -1
  409. package/dist/esm/i18n/system_enums/workbench-dossier.en.d.ts.map +1 -1
  410. package/dist/esm/i18n/system_enums/workbench-dossier.en.js +5 -1
  411. package/dist/esm/i18n/system_enums/workbench-dossier.en.js.map +1 -1
  412. package/dist/esm/i18n/system_enums/workbench-secrets.en.d.ts +46 -0
  413. package/dist/esm/i18n/system_enums/workbench-secrets.en.d.ts.map +1 -0
  414. package/dist/esm/i18n/system_enums/workbench-secrets.en.js +46 -0
  415. package/dist/esm/i18n/system_enums/workbench-secrets.en.js.map +1 -0
  416. package/dist/esm/i18n/system_enums/workbench-specification-artifact.en.d.ts +8 -0
  417. package/dist/esm/i18n/system_enums/workbench-specification-artifact.en.d.ts.map +1 -1
  418. package/dist/esm/i18n/system_enums/workbench-specification-artifact.en.js +13 -0
  419. package/dist/esm/i18n/system_enums/workbench-specification-artifact.en.js.map +1 -1
  420. package/dist/esm/i18n-labelling/models/email-template-labelling-unit.models.d.ts +61 -0
  421. package/dist/esm/i18n-labelling/models/email-template-labelling-unit.models.d.ts.map +1 -0
  422. package/dist/esm/i18n-labelling/models/email-template-labelling-unit.models.js +22 -0
  423. package/dist/esm/i18n-labelling/models/email-template-labelling-unit.models.js.map +1 -0
  424. package/dist/esm/i18n-labelling/models/labelling-unit.models.d.ts +105 -24
  425. package/dist/esm/i18n-labelling/models/labelling-unit.models.d.ts.map +1 -1
  426. package/dist/esm/i18n-labelling/models/labelling-unit.models.js +55 -24
  427. package/dist/esm/i18n-labelling/models/labelling-unit.models.js.map +1 -1
  428. package/dist/esm/i18n-labelling/models/labelling.actors-system.definitions.d.ts.map +1 -1
  429. package/dist/esm/i18n-labelling/models/labelling.actors-system.definitions.js +0 -2
  430. package/dist/esm/i18n-labelling/models/labelling.actors-system.definitions.js.map +1 -1
  431. package/dist/esm/i18n-labelling/services/email-template-labelling-units.companion.service.d.ts +48 -0
  432. package/dist/esm/i18n-labelling/services/email-template-labelling-units.companion.service.d.ts.map +1 -0
  433. package/dist/esm/i18n-labelling/services/email-template-labelling-units.companion.service.js +145 -0
  434. package/dist/esm/i18n-labelling/services/email-template-labelling-units.companion.service.js.map +1 -0
  435. package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.d.ts +70 -18
  436. package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.d.ts.map +1 -1
  437. package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.js +330 -113
  438. package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.js.map +1 -1
  439. package/dist/esm/i18n-labelling/services/labelling-spec-context-loader.companion.service.d.ts +45 -0
  440. package/dist/esm/i18n-labelling/services/labelling-spec-context-loader.companion.service.d.ts.map +1 -1
  441. package/dist/esm/i18n-labelling/services/labelling-spec-context-loader.companion.service.js +208 -6
  442. package/dist/esm/i18n-labelling/services/labelling-spec-context-loader.companion.service.js.map +1 -1
  443. package/dist/esm/i18n-labelling/services/labellize-orchestrator.companion.service.d.ts +11 -2
  444. package/dist/esm/i18n-labelling/services/labellize-orchestrator.companion.service.d.ts.map +1 -1
  445. package/dist/esm/i18n-labelling/services/labellize-orchestrator.companion.service.js +101 -18
  446. package/dist/esm/i18n-labelling/services/labellize-orchestrator.companion.service.js.map +1 -1
  447. package/dist/esm/i18n-labelling/services/translate-orchestrator.companion.service.d.ts +64 -1
  448. package/dist/esm/i18n-labelling/services/translate-orchestrator.companion.service.d.ts.map +1 -1
  449. package/dist/esm/i18n-labelling/services/translate-orchestrator.companion.service.js +393 -70
  450. package/dist/esm/i18n-labelling/services/translate-orchestrator.companion.service.js.map +1 -1
  451. package/dist/esm/i18n-labelling/utils/declared-refusal-codes.utils.d.ts +9 -5
  452. package/dist/esm/i18n-labelling/utils/declared-refusal-codes.utils.d.ts.map +1 -1
  453. package/dist/esm/i18n-labelling/utils/declared-refusal-codes.utils.js.map +1 -1
  454. package/dist/esm/i18n-labelling/utils/email-template-translation.utils.d.ts +54 -0
  455. package/dist/esm/i18n-labelling/utils/email-template-translation.utils.d.ts.map +1 -0
  456. package/dist/esm/i18n-labelling/utils/email-template-translation.utils.js +74 -0
  457. package/dist/esm/i18n-labelling/utils/email-template-translation.utils.js.map +1 -0
  458. package/dist/esm/i18n-labelling/utils/frontend-derived-label-keys.utils.d.ts +3 -3
  459. package/dist/esm/i18n-labelling/utils/frontend-derived-label-keys.utils.js.map +1 -1
  460. package/dist/esm/i18n-labelling/utils/incomplete-plan-refusal.utils.d.ts +24 -0
  461. package/dist/esm/i18n-labelling/utils/incomplete-plan-refusal.utils.d.ts.map +1 -0
  462. package/dist/esm/i18n-labelling/utils/incomplete-plan-refusal.utils.js +34 -0
  463. package/dist/esm/i18n-labelling/utils/incomplete-plan-refusal.utils.js.map +1 -0
  464. package/dist/esm/i18n-labelling/utils/orphan-label-artifacts.utils.d.ts.map +1 -1
  465. package/dist/esm/i18n-labelling/utils/orphan-label-artifacts.utils.js +5 -1
  466. package/dist/esm/i18n-labelling/utils/orphan-label-artifacts.utils.js.map +1 -1
  467. package/dist/esm/i18n-labelling/utils/provider-display-name-keys.utils.d.ts +76 -0
  468. package/dist/esm/i18n-labelling/utils/provider-display-name-keys.utils.d.ts.map +1 -0
  469. package/dist/esm/i18n-labelling/utils/provider-display-name-keys.utils.js +110 -0
  470. package/dist/esm/i18n-labelling/utils/provider-display-name-keys.utils.js.map +1 -0
  471. package/dist/esm/i18n-labelling/utils/resource-section-label-keys.utils.d.ts +17 -0
  472. package/dist/esm/i18n-labelling/utils/resource-section-label-keys.utils.d.ts.map +1 -0
  473. package/dist/esm/i18n-labelling/utils/resource-section-label-keys.utils.js +23 -0
  474. package/dist/esm/i18n-labelling/utils/resource-section-label-keys.utils.js.map +1 -0
  475. package/dist/esm/i18n-labelling/utils/schema-fields-extractor.utils.d.ts +36 -3
  476. package/dist/esm/i18n-labelling/utils/schema-fields-extractor.utils.d.ts.map +1 -1
  477. package/dist/esm/i18n-labelling/utils/schema-fields-extractor.utils.js +77 -5
  478. package/dist/esm/i18n-labelling/utils/schema-fields-extractor.utils.js.map +1 -1
  479. package/dist/esm/i18n-labelling/utils/system-of-record-display-name-keys.utils.d.ts +38 -0
  480. package/dist/esm/i18n-labelling/utils/system-of-record-display-name-keys.utils.d.ts.map +1 -0
  481. package/dist/esm/i18n-labelling/utils/system-of-record-display-name-keys.utils.js +66 -0
  482. package/dist/esm/i18n-labelling/utils/system-of-record-display-name-keys.utils.js.map +1 -0
  483. package/dist/esm/index.d.ts.map +1 -1
  484. package/dist/esm/index.js +9 -3
  485. package/dist/esm/index.js.map +1 -1
  486. package/dist/esm/meta-workflows/models/application-build.actors-system.definitions.d.ts.map +1 -1
  487. package/dist/esm/meta-workflows/models/application-build.actors-system.definitions.js +0 -1
  488. package/dist/esm/meta-workflows/models/application-build.actors-system.definitions.js.map +1 -1
  489. package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.d.ts.map +1 -1
  490. package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.js +1 -3
  491. package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.js.map +1 -1
  492. package/dist/esm/meta-workflows/models/application-line-catalog.models.d.ts +11 -0
  493. package/dist/esm/meta-workflows/models/application-line-catalog.models.d.ts.map +1 -0
  494. package/dist/esm/meta-workflows/models/application-line-catalog.models.js +17 -0
  495. package/dist/esm/meta-workflows/models/application-line-catalog.models.js.map +1 -0
  496. package/dist/esm/meta-workflows/models/application-research-agent.actors-system.definitions.d.ts.map +1 -1
  497. package/dist/esm/meta-workflows/models/application-research-agent.actors-system.definitions.js +0 -1
  498. package/dist/esm/meta-workflows/models/application-research-agent.actors-system.definitions.js.map +1 -1
  499. package/dist/esm/meta-workflows/models/brief-adequacy.actors-system.definitions.js +1 -1
  500. package/dist/esm/meta-workflows/models/brief-adequacy.actors-system.definitions.js.map +1 -1
  501. package/dist/esm/meta-workflows/models/composite-round-relaunch.models.d.ts +14 -0
  502. package/dist/esm/meta-workflows/models/composite-round-relaunch.models.d.ts.map +1 -1
  503. package/dist/esm/meta-workflows/models/composite-round-relaunch.models.js +18 -0
  504. package/dist/esm/meta-workflows/models/composite-round-relaunch.models.js.map +1 -1
  505. package/dist/esm/meta-workflows/models/human-decision-settler.models.d.ts +14 -0
  506. package/dist/esm/meta-workflows/models/human-decision-settler.models.d.ts.map +1 -0
  507. package/dist/esm/meta-workflows/models/human-decision-settler.models.js +18 -0
  508. package/dist/esm/meta-workflows/models/human-decision-settler.models.js.map +1 -0
  509. package/dist/esm/meta-workflows/models/meta-workflows-lane.models.d.ts +31 -23
  510. package/dist/esm/meta-workflows/models/meta-workflows-lane.models.d.ts.map +1 -1
  511. package/dist/esm/meta-workflows/models/meta-workflows-lane.models.js +36 -5
  512. package/dist/esm/meta-workflows/models/meta-workflows-lane.models.js.map +1 -1
  513. package/dist/esm/meta-workflows/models/meta-workflows.actors-system.definitions.d.ts.map +1 -1
  514. package/dist/esm/meta-workflows/models/meta-workflows.actors-system.definitions.js +1 -3
  515. package/dist/esm/meta-workflows/models/meta-workflows.actors-system.definitions.js.map +1 -1
  516. package/dist/esm/meta-workflows/models/playbook-run-checkpoint.models.d.ts +19 -0
  517. package/dist/esm/meta-workflows/models/playbook-run-checkpoint.models.d.ts.map +1 -1
  518. package/dist/esm/meta-workflows/models/playbook-run-checkpoint.models.js +38 -6
  519. package/dist/esm/meta-workflows/models/playbook-run-checkpoint.models.js.map +1 -1
  520. package/dist/esm/meta-workflows/models/playbook-run-record.models.d.ts +48 -3
  521. package/dist/esm/meta-workflows/models/playbook-run-record.models.d.ts.map +1 -1
  522. package/dist/esm/meta-workflows/models/playbook-run-record.models.js +61 -8
  523. package/dist/esm/meta-workflows/models/playbook-run-record.models.js.map +1 -1
  524. package/dist/esm/meta-workflows/services/__tests__/support/in-memory-actor-plane.d.ts +15 -1
  525. package/dist/esm/meta-workflows/services/__tests__/support/in-memory-actor-plane.d.ts.map +1 -1
  526. package/dist/esm/meta-workflows/services/__tests__/support/in-memory-actor-plane.js +50 -5
  527. package/dist/esm/meta-workflows/services/__tests__/support/in-memory-actor-plane.js.map +1 -1
  528. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts +52 -9
  529. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts.map +1 -1
  530. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.js +131 -59
  531. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.js.map +1 -1
  532. package/dist/esm/meta-workflows/services/application-build-experience-skills.companion.service.d.ts +19 -0
  533. package/dist/esm/meta-workflows/services/application-build-experience-skills.companion.service.d.ts.map +1 -0
  534. package/dist/esm/meta-workflows/services/application-build-experience-skills.companion.service.js +36 -0
  535. package/dist/esm/meta-workflows/services/application-build-experience-skills.companion.service.js.map +1 -0
  536. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.d.ts +9 -0
  537. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.d.ts.map +1 -1
  538. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.js +41 -17
  539. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.js.map +1 -1
  540. package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.d.ts +42 -2
  541. package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.d.ts.map +1 -1
  542. package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.js +121 -4
  543. package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.js.map +1 -1
  544. package/dist/esm/meta-workflows/services/application-build-website-context.companion.service.d.ts +32 -0
  545. package/dist/esm/meta-workflows/services/application-build-website-context.companion.service.d.ts.map +1 -0
  546. package/dist/esm/meta-workflows/services/application-build-website-context.companion.service.js +161 -0
  547. package/dist/esm/meta-workflows/services/application-build-website-context.companion.service.js.map +1 -0
  548. package/dist/esm/meta-workflows/services/build-plan-authoring.companion.service.d.ts +2 -0
  549. package/dist/esm/meta-workflows/services/build-plan-authoring.companion.service.d.ts.map +1 -1
  550. package/dist/esm/meta-workflows/services/build-plan-authoring.companion.service.js +1 -0
  551. package/dist/esm/meta-workflows/services/build-plan-authoring.companion.service.js.map +1 -1
  552. package/dist/esm/meta-workflows/services/capability-composition-executor.companion.service.d.ts +3 -2
  553. package/dist/esm/meta-workflows/services/capability-composition-executor.companion.service.d.ts.map +1 -1
  554. package/dist/esm/meta-workflows/services/capability-composition-executor.companion.service.js +12 -3
  555. package/dist/esm/meta-workflows/services/capability-composition-executor.companion.service.js.map +1 -1
  556. package/dist/esm/meta-workflows/services/dossier.companion.service.d.ts +74 -1
  557. package/dist/esm/meta-workflows/services/dossier.companion.service.d.ts.map +1 -1
  558. package/dist/esm/meta-workflows/services/dossier.companion.service.js +227 -30
  559. package/dist/esm/meta-workflows/services/dossier.companion.service.js.map +1 -1
  560. package/dist/esm/meta-workflows/services/foundation-executor.companion.service.d.ts +29 -2
  561. package/dist/esm/meta-workflows/services/foundation-executor.companion.service.d.ts.map +1 -1
  562. package/dist/esm/meta-workflows/services/foundation-executor.companion.service.js +68 -5
  563. package/dist/esm/meta-workflows/services/foundation-executor.companion.service.js.map +1 -1
  564. package/dist/esm/meta-workflows/services/governed-document-texts.companion.d.ts +40 -0
  565. package/dist/esm/meta-workflows/services/governed-document-texts.companion.d.ts.map +1 -0
  566. package/dist/esm/meta-workflows/services/governed-document-texts.companion.js +91 -0
  567. package/dist/esm/meta-workflows/services/governed-document-texts.companion.js.map +1 -0
  568. package/dist/esm/meta-workflows/services/governed-documents-pdf.companion.d.ts +25 -0
  569. package/dist/esm/meta-workflows/services/governed-documents-pdf.companion.d.ts.map +1 -0
  570. package/dist/esm/meta-workflows/services/governed-documents-pdf.companion.js +40 -0
  571. package/dist/esm/meta-workflows/services/governed-documents-pdf.companion.js.map +1 -0
  572. package/dist/esm/meta-workflows/services/playbook-instance.companion.service.d.ts +90 -0
  573. package/dist/esm/meta-workflows/services/playbook-instance.companion.service.d.ts.map +1 -0
  574. package/dist/esm/meta-workflows/services/playbook-instance.companion.service.js +307 -0
  575. package/dist/esm/meta-workflows/services/playbook-instance.companion.service.js.map +1 -0
  576. package/dist/esm/meta-workflows/services/playbook-run-write-register.companion.service.d.ts +29 -0
  577. package/dist/esm/meta-workflows/services/playbook-run-write-register.companion.service.d.ts.map +1 -1
  578. package/dist/esm/meta-workflows/services/playbook-run-write-register.companion.service.js +44 -4
  579. package/dist/esm/meta-workflows/services/playbook-run-write-register.companion.service.js.map +1 -1
  580. package/dist/esm/meta-workflows/services/playbook-run.companion.service.d.ts +360 -47
  581. package/dist/esm/meta-workflows/services/playbook-run.companion.service.d.ts.map +1 -1
  582. package/dist/esm/meta-workflows/services/playbook-run.companion.service.js +1424 -246
  583. package/dist/esm/meta-workflows/services/playbook-run.companion.service.js.map +1 -1
  584. package/package.json +17 -17
  585. package/dist/esm/__time-gov.probe.d.mts +0 -0
  586. package/dist/esm/__time-gov.probe.d.mts.map +0 -0
  587. package/dist/esm/__time-gov.probe.mjs.map +0 -0
  588. package/dist/esm/core/introspection/subprocess/family-aspects.behavior.head-parity.tmp.d.ts +0 -0
  589. package/dist/esm/core/introspection/subprocess/family-aspects.behavior.head-parity.tmp.d.ts.map +0 -0
  590. package/dist/esm/core/introspection/subprocess/family-aspects.behavior.head-parity.tmp.js.map +0 -0
  591. package/dist/esm/i18n/composite_views/app.creation-board.en.d.ts +0 -0
  592. package/dist/esm/i18n/composite_views/app.creation-board.en.d.ts.map +0 -0
  593. package/dist/esm/i18n/composite_views/app.creation-board.en.js.map +0 -0
  594. package/dist/esm/meta-workflows/services/creator-inputs.companion.service.d.ts +0 -0
  595. package/dist/esm/meta-workflows/services/creator-inputs.companion.service.d.ts.map +0 -0
  596. package/dist/esm/meta-workflows/services/creator-inputs.companion.service.js.map +0 -0
@@ -0,0 +1,25 @@
1
+ import { type GovernedDocumentsPdfContext, type PdfCollectionTemplateDefinition } from '@wildo-ai/saas-backend-lib';
2
+ import { type Workbench_GovernanceDocument } from '@wildo-ai/platform-core-shared';
3
+ import type { DossierCompanionService } from './dossier.companion.service';
4
+ /**
5
+ * The name the workbench shows for a governed document, read from the SAME label the screen reads
6
+ * (`resources.workbenchGovernanceDocuments.titles.<sanitized ref>`), so the PDF and the dossier call a
7
+ * document by one name. `undefined` when the label is missing.
8
+ */
9
+ export declare function resolveGovernedDocumentTitleLabel(labels: unknown, definitionRef: string): string | undefined;
10
+ /**
11
+ * The workbench's "all governed documents as PDF" template (#1645): the engine's governed-documents
12
+ * template, fed from the governance-documents listing.
13
+ *
14
+ * The listing decides WHICH documents are printed, and in which order; each row's text is read here,
15
+ * once per export, from the application's releases and drafts. A document with neither is printed under
16
+ * the workbench's own name for it — the title the dossier shows — and only when that label is missing
17
+ * under its raw definition ref, which reads as the missing name it is
18
+ * (`display-text-comes-from-i18n.md`) rather than as invented words.
19
+ */
20
+ export declare function createWorkbenchGovernedDocumentsPdfTemplate(dependencies: {
21
+ readonly dossier: Pick<DossierCompanionService, 'readCurrentGovernedDocumentTexts'>;
22
+ /** The workbench's label tree for a locale (`I18nBackendService.getLabels`). */
23
+ readonly labelsFor: (locale: string) => unknown;
24
+ }): PdfCollectionTemplateDefinition<Workbench_GovernanceDocument, GovernedDocumentsPdfContext>;
25
+ //# sourceMappingURL=governed-documents-pdf.companion.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"governed-documents-pdf.companion.d.ts","sourceRoot":"","sources":["../../../../../src/meta-workflows/services/governed-documents-pdf.companion.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,2BAA2B,EAChC,KAAK,+BAA+B,EACrC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAGL,KAAK,4BAA4B,EAClC,MAAM,gCAAgC,CAAC;AAExC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAK3E;;;;GAIG;AACH,wBAAgB,iCAAiC,CAAC,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAM5G;AAED;;;;;;;;;GASG;AACH,wBAAgB,2CAA2C,CAAC,YAAY,EAAE;IACxE,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC,uBAAuB,EAAE,kCAAkC,CAAC,CAAC;IACpF,gFAAgF;IAChF,QAAQ,CAAC,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC;CACjD,GAAG,+BAA+B,CAAC,4BAA4B,EAAE,2BAA2B,CAAC,CAY7F"}
@@ -0,0 +1,40 @@
1
+ import { createGovernedDocumentsPdfTemplate, } from '@wildo-ai/saas-backend-lib';
2
+ import { WORKBENCH_GOVERNED_DOCUMENTS_PDF_TEMPLATE_ID, sanitizeWorkbenchCreationPlaneIdentity, } from '@wildo-ai/platform-core-shared';
3
+ /** Where the workbench keeps each governed document's NAME, keyed by the row's sanitized definition ref. */
4
+ const GOVERNED_DOCUMENT_TITLE_LABEL_PATH = ['resources', 'workbenchGovernanceDocuments', 'titles'];
5
+ /**
6
+ * The name the workbench shows for a governed document, read from the SAME label the screen reads
7
+ * (`resources.workbenchGovernanceDocuments.titles.<sanitized ref>`), so the PDF and the dossier call a
8
+ * document by one name. `undefined` when the label is missing.
9
+ */
10
+ export function resolveGovernedDocumentTitleLabel(labels, definitionRef) {
11
+ let node = labels;
12
+ for (const segment of [...GOVERNED_DOCUMENT_TITLE_LABEL_PATH, sanitizeWorkbenchCreationPlaneIdentity(definitionRef)]) {
13
+ node = node !== null && typeof node === 'object' ? node[segment] : undefined;
14
+ }
15
+ return typeof node === 'string' && node.trim() !== '' ? node : undefined;
16
+ }
17
+ /**
18
+ * The workbench's "all governed documents as PDF" template (#1645): the engine's governed-documents
19
+ * template, fed from the governance-documents listing.
20
+ *
21
+ * The listing decides WHICH documents are printed, and in which order; each row's text is read here,
22
+ * once per export, from the application's releases and drafts. A document with neither is printed under
23
+ * the workbench's own name for it — the title the dossier shows — and only when that label is missing
24
+ * under its raw definition ref, which reads as the missing name it is
25
+ * (`display-text-comes-from-i18n.md`) rather than as invented words.
26
+ */
27
+ export function createWorkbenchGovernedDocumentsPdfTemplate(dependencies) {
28
+ return createGovernedDocumentsPdfTemplate({
29
+ id: WORKBENCH_GOVERNED_DOCUMENTS_PDF_TEMPLATE_ID,
30
+ resolveSources: async ({ rows, generatedAt, locale }) => {
31
+ const texts = await dependencies.dossier.readCurrentGovernedDocumentTexts(generatedAt);
32
+ const labels = dependencies.labelsFor(locale);
33
+ return rows.map((row) => ({
34
+ title: resolveGovernedDocumentTitleLabel(labels, row.definitionRef) ?? row.definitionRef,
35
+ document: texts.get(row.definitionRef) ?? null,
36
+ }));
37
+ },
38
+ });
39
+ }
40
+ //# sourceMappingURL=governed-documents-pdf.companion.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"governed-documents-pdf.companion.js","sourceRoot":"","sources":["../../../../../src/meta-workflows/services/governed-documents-pdf.companion.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kCAAkC,GAGnC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,4CAA4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AI,IAAI;aAC/C,CAAC,CAAC,CAAC;QACN,CAAC;KACF,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {\n createGovernedDocumentsPdfTemplate,\n type GovernedDocumentsPdfContext,\n type PdfCollectionTemplateDefinition,\n} from '@wildo-ai/saas-backend-lib';\nimport {\n WORKBENCH_GOVERNED_DOCUMENTS_PDF_TEMPLATE_ID,\n sanitizeWorkbenchCreationPlaneIdentity,\n type Workbench_GovernanceDocument,\n} from '@wildo-ai/platform-core-shared';\n\nimport type { DossierCompanionService } from './dossier.companion.service';\n\n/** Where the workbench keeps each governed document's NAME, keyed by the row's sanitized definition ref. */\nconst GOVERNED_DOCUMENT_TITLE_LABEL_PATH = ['resources', 'workbenchGovernanceDocuments', 'titles'] as const;\n\n/**\n * The name the workbench shows for a governed document, read from the SAME label the screen reads\n * (`resources.workbenchGovernanceDocuments.titles.<sanitized ref>`), so the PDF and the dossier call a\n * document by one name. `undefined` when the label is missing.\n */\nexport function resolveGovernedDocumentTitleLabel(labels: unknown, definitionRef: string): string | undefined {\n let node: unknown = labels;\n for (const segment of [...GOVERNED_DOCUMENT_TITLE_LABEL_PATH, sanitizeWorkbenchCreationPlaneIdentity(definitionRef)]) {\n node = node !== null && typeof node === 'object' ? (node as Record<string, unknown>)[segment] : undefined;\n }\n return typeof node === 'string' && node.trim() !== '' ? node : undefined;\n}\n\n/**\n * The workbench's \"all governed documents as PDF\" template (#1645): the engine's governed-documents\n * template, fed from the governance-documents listing.\n *\n * The listing decides WHICH documents are printed, and in which order; each row's text is read here,\n * once per export, from the application's releases and drafts. A document with neither is printed under\n * the workbench's own name for it — the title the dossier shows — and only when that label is missing\n * under its raw definition ref, which reads as the missing name it is\n * (`display-text-comes-from-i18n.md`) rather than as invented words.\n */\nexport function createWorkbenchGovernedDocumentsPdfTemplate(dependencies: {\n readonly dossier: Pick<DossierCompanionService, 'readCurrentGovernedDocumentTexts'>;\n /** The workbench's label tree for a locale (`I18nBackendService.getLabels`). */\n readonly labelsFor: (locale: string) => unknown;\n}): PdfCollectionTemplateDefinition<Workbench_GovernanceDocument, GovernedDocumentsPdfContext> {\n return createGovernedDocumentsPdfTemplate<Workbench_GovernanceDocument>({\n id: WORKBENCH_GOVERNED_DOCUMENTS_PDF_TEMPLATE_ID,\n resolveSources: async ({ rows, generatedAt, locale }) => {\n const texts = await dependencies.dossier.readCurrentGovernedDocumentTexts(generatedAt);\n const labels = dependencies.labelsFor(locale);\n return rows.map((row) => ({\n title: resolveGovernedDocumentTitleLabel(labels, row.definitionRef) ?? row.definitionRef,\n document: texts.get(row.definitionRef) ?? null,\n }));\n },\n });\n}\n"]}
@@ -0,0 +1,90 @@
1
+ import type { LoggerService } from '@wildo-ai/saas-backend-lib';
2
+ import { ApplicationPlaybookInstanceClosureKind, ApplicationSpecificationFamily, type ApplicationPlaybookActivation } from '@wildo-ai/saas-specifications/application-creation';
3
+ import type { CompanionContext } from '../../core/context/companion-context';
4
+ import { DecisionRecordActor, type AcceptedChangeCommitCompanionService } from '../../claude-cli/services/accepted-change-commit.companion.service';
5
+ import type { DossierCompanionService } from './dossier.companion.service';
6
+ import type { PlaybookRunCompanionService } from './playbook-run.companion.service';
7
+ /** A request to open an instance the host cannot honour; named so the transport answers 4xx. */
8
+ export declare class PlaybookInstanceRefusedError extends Error {
9
+ }
10
+ /** The tree is being written by a coding run right now; named so the transport answers 409. */
11
+ export declare class PlaybookInstanceTreeBusyError extends Error {
12
+ }
13
+ export interface OpenPlaybookInstanceResult {
14
+ readonly activation: ApplicationPlaybookActivation;
15
+ /** `<ref>@<key>`: how every surface addresses this instance from now on. */
16
+ readonly instanceId: string;
17
+ readonly packageRelativePath: string;
18
+ /** The commit that recorded it; absent when the posture leaves acceptance to a person, or on a dry run. */
19
+ readonly commitSha?: string;
20
+ readonly note: string;
21
+ }
22
+ /**
23
+ * Opening a playbook INSTANCE (#1609): the one act that writes the dossier's activation record, and the
24
+ * first act that must be committed the moment it is taken.
25
+ *
26
+ * ## Why here, and not in the dossier service
27
+ *
28
+ * An answer is a working edit a person commits with the rest of their work; an activation is a decision
29
+ * about what the application is building, and it is committed at once under the automatic posture, with its
30
+ * purpose and actor as trailers. That needs the workspace lock and the accept door, which the dossier's
31
+ * answers never did.
32
+ *
33
+ * ## The lock is taken BEFORE the write
34
+ *
35
+ * A coding run's baseline must never see the dossier half-recorded, and a decision the tree was too busy to
36
+ * commit must not be left behind as an uncommitted edit. So the write and the commit happen together under
37
+ * the lock, or neither happens: a busy tree answers "busy, try again" with nothing written.
38
+ */
39
+ export declare class PlaybookInstanceCompanionService {
40
+ private readonly logger;
41
+ private readonly companionContext;
42
+ private readonly dossier;
43
+ private readonly acceptedChangeCommit;
44
+ private readonly playbookRuns;
45
+ private readonly logDebug;
46
+ constructor(logger: LoggerService, companionContext: CompanionContext, dossier: DossierCompanionService, acceptedChangeCommit: AcceptedChangeCommitCompanionService, playbookRuns: Pick<PlaybookRunCompanionService, 'abandonInstanceRuns' | 'readLandedFamilies'>);
47
+ openInstance(input: {
48
+ readonly playbookRef: string;
49
+ readonly instanceKey: string;
50
+ readonly purpose: string;
51
+ /** Families a secondary line needs although the main line declares them not applicable (#1608); refused on any other instance. */
52
+ readonly neededFamilies?: readonly ApplicationSpecificationFamily[];
53
+ /** The families a refinement line re-derives (#1608); required on one, refused on any other instance. */
54
+ readonly refinedFamilies?: readonly ApplicationSpecificationFamily[];
55
+ readonly actor: DecisionRecordActor;
56
+ readonly dryRun?: boolean;
57
+ }): Promise<OpenPlaybookInstanceResult>;
58
+ /**
59
+ * What a refinement line names must be something it can refine (#1608). Refused with the reason otherwise,
60
+ * before anything is written:
61
+ * - the instance must BE a refinement line (the landing refuses targets elsewhere too; saying so here first
62
+ * gives the right reason);
63
+ * - a producer the line admits must re-derive the family from its own prior output, among the playbooks
64
+ * the application's line actually runs;
65
+ * - the family must apply to the application, counting the families this same request needs back;
66
+ * - the application must already HOLD it: a refinement changes what exists, and a family nobody produced
67
+ * yet would be authored from scratch under the name of a refinement.
68
+ */
69
+ private assertRefinable;
70
+ /**
71
+ * CLOSE an instance (#1608, #1609 R10): completed, or abandoned. Recorded and committed at once under the
72
+ * workspace lock, like opening one, with the reason as the purpose trailer. What it contributed stays, marked
73
+ * with it. ABANDONING also cancels its runs waiting on a person and consumes its interrupted progress; a run
74
+ * in flight stops at its next round, when its selector reads the closure.
75
+ */
76
+ closeInstance(input: {
77
+ readonly playbookRef: string;
78
+ readonly instanceKey: string;
79
+ readonly kind: ApplicationPlaybookInstanceClosureKind;
80
+ readonly reason?: string;
81
+ readonly actor: DecisionRecordActor;
82
+ }): Promise<{
83
+ readonly instanceId: string;
84
+ readonly commitSha?: string;
85
+ readonly withdrawnRunIds: readonly string[];
86
+ readonly consumedCheckpointRunIds: readonly string[];
87
+ readonly note: string;
88
+ }>;
89
+ }
90
+ //# sourceMappingURL=playbook-instance.companion.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"playbook-instance.companion.service.d.ts","sourceRoot":"","sources":["../../../../../src/meta-workflows/services/playbook-instance.companion.service.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAGhE,OAAO,EAEL,sCAAsC,EACtC,8BAA8B,EAM9B,KAAK,6BAA6B,EACnC,MAAM,oDAAoD,CAAC;AAG5D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAgB,mBAAmB,EAAE,KAAK,oCAAoC,EAAE,MAAM,oEAAoE,CAAC;AAOlK,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAC3E,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAYpF,gGAAgG;AAChG,qBAAa,4BAA6B,SAAQ,KAAK;CAAG;AAE1D,+FAA+F;AAC/F,qBAAa,6BAA8B,SAAQ,KAAK;CAAG;AAE3D,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,UAAU,EA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CAAC,KAAK,EAAE;QAChC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;QAC7B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;QAC7B,QAAQ,CAAC,IAAI,EAAE,sCAAsC,CAAC;QACtD,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QACzB,QAAQ,CAAC,KAAK,EAAE,mBAAmB,CAAC;KACrC,GAAG,OAAO,CAAC;QACV,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;QAC5B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;QAC5B,QAAQ,CAAC,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;QAC5C,QAAQ,CAAC,wBAAwB,EAAE,SAAS,MAAM,EAAE,CAAC;QACrD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;KACvB,CAAC;CA8DH"}
@@ -0,0 +1,307 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
10
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
11
+ return function (target, key) { decorator(target, key, paramIndex); }
12
+ };
13
+ import * as path from 'node:path';
14
+ import { inject, injectable } from 'inversify';
15
+ import { PlaybookElicitationError, PlaybookLaneBoundaryDecision, landPlaybookActivation, landPlaybookInstanceClosure, refinementProducersOf, resolveApplicationLineScope, } from '@wildo-ai/application-creation-runtime';
16
+ import { getFrameworkKnowledgePlaybook } from '@wildo-ai/framework-knowledge';
17
+ import { getWorkspaceMutationLockPath, withDedicatedFileLock } from '@wildo-ai/platform-config-lib';
18
+ import { SAAS_SERVICE_TYPES } from '@wildo-ai/saas-backend-lib';
19
+ import { MetaWorkflow_Executor } from '@wildo-ai/saas-models/meta-workflows';
20
+ import { MetaWorkflowPlaybookSchema, ApplicationPlaybookInstanceClosureKind, PlaybookInstanceKeySchema, secondaryLineDefinitionOfEntry, withPlaybookActivation, playbookInstanceId, } from '@wildo-ai/saas-specifications/application-creation';
21
+ import { COMPANION_SERVICE_TYPES } from '../../core/inject/models/service-types.js';
22
+ import { AcceptOrigin } from '../../claude-cli/services/accepted-change-commit.companion.service.js';
23
+ import { APPLICATION_CREATION_AUTONOMY_POSTURE, LaneBoundaryTreatment, laneBoundaryTreatmentFor, } from '../models/playbook-run-checkpoint.models.js';
24
+ import { readCompiledApplicationLineCatalog } from '../models/application-line-catalog.models.js';
25
+ /** The same prefix every landed specification constant carries (issue #65): app identity lives in values, never in export names. */
26
+ const LANDED_CONSTANT_PREFIX = 'application';
27
+ /**
28
+ * How long opening an instance waits for the workspace lock before refusing. Short on purpose: the caller is
29
+ * a person in a conversation, and a coding run holding the tree for minutes is a reason to say "busy", not to
30
+ * hang the conversation.
31
+ */
32
+ const OPEN_INSTANCE_LOCK_RETRIES = { retries: 10, minTimeout: 250, maxTimeout: 2_000 };
33
+ /** A request to open an instance the host cannot honour; named so the transport answers 4xx. */
34
+ export class PlaybookInstanceRefusedError extends Error {
35
+ }
36
+ /** The tree is being written by a coding run right now; named so the transport answers 409. */
37
+ export class PlaybookInstanceTreeBusyError extends Error {
38
+ }
39
+ /**
40
+ * Opening a playbook INSTANCE (#1609): the one act that writes the dossier's activation record, and the
41
+ * first act that must be committed the moment it is taken.
42
+ *
43
+ * ## Why here, and not in the dossier service
44
+ *
45
+ * An answer is a working edit a person commits with the rest of their work; an activation is a decision
46
+ * about what the application is building, and it is committed at once under the automatic posture, with its
47
+ * purpose and actor as trailers. That needs the workspace lock and the accept door, which the dossier's
48
+ * answers never did.
49
+ *
50
+ * ## The lock is taken BEFORE the write
51
+ *
52
+ * A coding run's baseline must never see the dossier half-recorded, and a decision the tree was too busy to
53
+ * commit must not be left behind as an uncommitted edit. So the write and the commit happen together under
54
+ * the lock, or neither happens: a busy tree answers "busy, try again" with nothing written.
55
+ */
56
+ let PlaybookInstanceCompanionService = class PlaybookInstanceCompanionService {
57
+ logger;
58
+ companionContext;
59
+ dossier;
60
+ acceptedChangeCommit;
61
+ playbookRuns;
62
+ logDebug;
63
+ constructor(logger, companionContext, dossier, acceptedChangeCommit, playbookRuns) {
64
+ this.logger = logger;
65
+ this.companionContext = companionContext;
66
+ this.dossier = dossier;
67
+ this.acceptedChangeCommit = acceptedChangeCommit;
68
+ this.playbookRuns = playbookRuns;
69
+ this.logDebug = this.logger.debugByType('PlaybookInstanceCompanionService');
70
+ }
71
+ async openInstance(input) {
72
+ const specificationsPackageRoot = this.companionContext.resolvedSpecifications?.packageRoot;
73
+ if (!specificationsPackageRoot) {
74
+ throw new PlaybookInstanceRefusedError('No specifications package is declared in wildo.saas.config.ts; there is nowhere to record the instance.');
75
+ }
76
+ const parsedKey = PlaybookInstanceKeySchema.safeParse(input.instanceKey);
77
+ if (!parsedKey.success) {
78
+ throw new PlaybookInstanceRefusedError(`"${input.instanceKey}" is not an instance key: use a kebab-case slug, e.g. "enterprise-segment".`);
79
+ }
80
+ if (input.purpose.trim().length === 0) {
81
+ throw new PlaybookInstanceRefusedError('An instance is opened FOR something: say what, in the creator\'s terms.');
82
+ }
83
+ const playbook = MetaWorkflowPlaybookSchema.safeParse(getFrameworkKnowledgePlaybook(input.playbookRef)?.playbook);
84
+ if (!playbook.success) {
85
+ throw new PlaybookInstanceRefusedError(`No compiled playbook is registered under "${input.playbookRef}".`);
86
+ }
87
+ /*
88
+ * The same rule the run applies, stated where the instance is OPENED so nobody opens one that could
89
+ * never run: a playbook acting on the application as a whole has no instances.
90
+ */
91
+ const executor = playbook.data.executor;
92
+ if (executor === MetaWorkflow_Executor.CODING_AGENT || executor === MetaWorkflow_Executor.DETERMINISTIC_CLI || executor === MetaWorkflow_Executor.HUMAN) {
93
+ throw new PlaybookInstanceRefusedError(`"${input.playbookRef}" acts on the application as a whole, so it has no instances.`);
94
+ }
95
+ const posture = laneBoundaryTreatmentFor(APPLICATION_CREATION_AUTONOMY_POSTURE, PlaybookLaneBoundaryDecision.APPROVE_RESULT);
96
+ const commits = posture === LaneBoundaryTreatment.NOTIFY_AND_PROCEED && input.dryRun !== true;
97
+ const record = async () => {
98
+ const current = await this.dossier.readCreatorInputs();
99
+ if (input.refinedFamilies !== undefined && input.refinedFamilies.length > 0) {
100
+ await this.assertRefinable({
101
+ entryPlaybookRef: input.playbookRef, instanceKey: parsedKey.data, purpose: input.purpose, families: input.refinedFamilies,
102
+ ...(input.neededFamilies ? { neededFamilies: input.neededFamilies } : {}), current,
103
+ });
104
+ }
105
+ let landed;
106
+ try {
107
+ landed = await landPlaybookActivation({
108
+ specificationsPackageRoot,
109
+ constantPrefix: LANDED_CONSTANT_PREFIX,
110
+ playbook: playbook.data,
111
+ current,
112
+ instanceKey: parsedKey.data,
113
+ purpose: input.purpose,
114
+ ...(input.neededFamilies !== undefined ? { neededFamilies: input.neededFamilies } : {}),
115
+ ...(input.refinedFamilies !== undefined ? { refinedFamilies: input.refinedFamilies } : {}),
116
+ ...(input.dryRun === true ? { dryRun: true } : {}),
117
+ });
118
+ }
119
+ catch (error) {
120
+ // A closed instance re-opened, or families asked of an instance that is not a line: the caller's mistake, named.
121
+ if (error instanceof PlaybookElicitationError)
122
+ throw new PlaybookInstanceRefusedError(error.message);
123
+ throw error;
124
+ }
125
+ const instanceId = playbookInstanceId(input.playbookRef, parsedKey.data);
126
+ const specificationsRelativeRoot = path.relative(this.companionContext.saasRoot, specificationsPackageRoot);
127
+ const written = [landed.packageRelativePath, ...landed.wiringEdits.map((edit) => edit.packageRelativePath)]
128
+ .map((relative) => path.posix.join(specificationsRelativeRoot, relative));
129
+ if (!commits) {
130
+ return {
131
+ activation: landed.activation,
132
+ instanceId,
133
+ packageRelativePath: landed.packageRelativePath,
134
+ note: input.dryRun === true
135
+ ? 'Dry run: nothing was written.'
136
+ : 'Recorded as a working edit: the autonomy posture leaves committing it to you.',
137
+ };
138
+ }
139
+ const committed = await this.acceptedChangeCommit.commitDecisionRecord({
140
+ paths: written,
141
+ summary: `Open the playbook instance ${instanceId}${landed.activation.neededFamilies ? ` (needs ${landed.activation.neededFamilies.join(', ')})` : ''}${landed.activation.refinedFamilies ? ` (refines ${landed.activation.refinedFamilies.join(', ')})` : ''}`,
142
+ purpose: input.purpose,
143
+ actor: input.actor,
144
+ origin: AcceptOrigin.AUTONOMY_POSTURE,
145
+ });
146
+ this.logDebug('Playbook instance opened', { instanceId, commitSha: committed.commitSha });
147
+ return {
148
+ activation: landed.activation,
149
+ instanceId,
150
+ packageRelativePath: landed.packageRelativePath,
151
+ commitSha: committed.commitSha,
152
+ note: `Opened and committed (${committed.commitSha.slice(0, 8)}). Run it with instanceKey "${parsedKey.data}".`,
153
+ };
154
+ };
155
+ if (input.dryRun === true)
156
+ return record();
157
+ try {
158
+ return await withDedicatedFileLock(getWorkspaceMutationLockPath(this.companionContext.saasRoot), record, { retries: OPEN_INSTANCE_LOCK_RETRIES });
159
+ }
160
+ catch (error) {
161
+ if (error instanceof PlaybookInstanceRefusedError)
162
+ throw error;
163
+ if (isLockUnavailable(error)) {
164
+ throw new PlaybookInstanceTreeBusyError('The application\'s working tree is being written right now (a coding run holds it). Nothing was recorded; try again in a moment.');
165
+ }
166
+ throw error;
167
+ }
168
+ }
169
+ /**
170
+ * What a refinement line names must be something it can refine (#1608). Refused with the reason otherwise,
171
+ * before anything is written:
172
+ * - the instance must BE a refinement line (the landing refuses targets elsewhere too; saying so here first
173
+ * gives the right reason);
174
+ * - a producer the line admits must re-derive the family from its own prior output, among the playbooks
175
+ * the application's line actually runs;
176
+ * - the family must apply to the application, counting the families this same request needs back;
177
+ * - the application must already HOLD it: a refinement changes what exists, and a family nobody produced
178
+ * yet would be authored from scratch under the name of a refinement.
179
+ */
180
+ async assertRefinable(input) {
181
+ if (secondaryLineDefinitionOfEntry(input.entryPlaybookRef)?.namesRefinedFamilies !== true) {
182
+ throw new PlaybookInstanceRefusedError(`"${input.entryPlaybookRef}" is not a refinement line's entry, so an instance of it names no families to refine.`);
183
+ }
184
+ /*
185
+ * The dossier as it would stand with this line open, so the families it needs back already apply. A re-open
186
+ * that names none keeps what the line already needs (the landing does the same), so it is counted here too.
187
+ */
188
+ const neededFamilies = input.neededFamilies
189
+ ?? input.current?.activations?.[playbookInstanceId(input.entryPlaybookRef, input.instanceKey)]?.neededFamilies;
190
+ const withLine = withPlaybookActivation(input.current, {
191
+ playbookRef: input.entryPlaybookRef, instanceKey: input.instanceKey, purpose: input.purpose,
192
+ ...(neededFamilies && neededFamilies.length > 0 ? { neededFamilies: [...neededFamilies] } : {}),
193
+ });
194
+ const lineCatalog = readCompiledApplicationLineCatalog();
195
+ const scope = resolveApplicationLineScope({ catalog: lineCatalog, creatorInputs: withLine });
196
+ const entry = getFrameworkKnowledgePlaybook(input.entryPlaybookRef)?.playbook;
197
+ const catalog = [
198
+ ...(entry ? [entry] : []),
199
+ ...(entry?.method?.choreography?.admits ?? []).flatMap((ref) => {
200
+ const child = getFrameworkKnowledgePlaybook(ref)?.playbook;
201
+ return child ? [child] : [];
202
+ }),
203
+ ];
204
+ const inapplicable = input.families.filter((family) => scope.notApplicableFamilies.has(family));
205
+ if (inapplicable.length > 0) {
206
+ throw new PlaybookInstanceRefusedError(`${inapplicable.join(', ')} does not apply to this kind of application, so there is nothing to refine. A feature line that needs it back can bring it in.`);
207
+ }
208
+ const unrefinable = input.families.filter((family) => !refinementProducersOf(catalog, input.entryPlaybookRef, family).some((ref) => scope.admittedPlaybookRefs.has(ref)));
209
+ if (unrefinable.length > 0) {
210
+ throw new PlaybookInstanceRefusedError(`Nothing this application runs refines ${unrefinable.join(', ')} from what it already holds, so a refinement line cannot change it. Refinable: the families a model re-derives from their own prior output (the requirements, the feature drafts, the plans, the brand, the roadmap).`);
211
+ }
212
+ const landed = await this.playbookRuns.readLandedFamilies();
213
+ const absent = input.families.filter((family) => !landed.has(family));
214
+ if (absent.length > 0) {
215
+ throw new PlaybookInstanceRefusedError(`The application does not hold ${absent.join(', ')} yet, so there is nothing to refine: a refinement changes what exists. Let the main line produce it first.`);
216
+ }
217
+ }
218
+ /**
219
+ * CLOSE an instance (#1608, #1609 R10): completed, or abandoned. Recorded and committed at once under the
220
+ * workspace lock, like opening one, with the reason as the purpose trailer. What it contributed stays, marked
221
+ * with it. ABANDONING also cancels its runs waiting on a person and consumes its interrupted progress; a run
222
+ * in flight stops at its next round, when its selector reads the closure.
223
+ */
224
+ async closeInstance(input) {
225
+ const specificationsPackageRoot = this.companionContext.resolvedSpecifications?.packageRoot;
226
+ if (!specificationsPackageRoot) {
227
+ throw new PlaybookInstanceRefusedError('No specifications package is declared in wildo.saas.config.ts; there is nowhere to record the closure.');
228
+ }
229
+ const instanceId = playbookInstanceId(input.playbookRef, input.instanceKey);
230
+ const reason = input.reason?.trim() || undefined;
231
+ const commits = laneBoundaryTreatmentFor(APPLICATION_CREATION_AUTONOMY_POSTURE, PlaybookLaneBoundaryDecision.APPROVE_RESULT) === LaneBoundaryTreatment.NOTIFY_AND_PROCEED;
232
+ const record = async () => {
233
+ let landed;
234
+ try {
235
+ landed = await landPlaybookInstanceClosure({
236
+ specificationsPackageRoot,
237
+ constantPrefix: LANDED_CONSTANT_PREFIX,
238
+ current: await this.dossier.readCreatorInputs(),
239
+ playbookRef: input.playbookRef,
240
+ instanceKey: input.instanceKey,
241
+ closure: { kind: input.kind, ...(reason ? { reason } : {}) },
242
+ });
243
+ }
244
+ catch (error) {
245
+ // An instance nobody opened, or one already closed: the caller's mistake, named.
246
+ if (error instanceof PlaybookElicitationError)
247
+ throw new PlaybookInstanceRefusedError(error.message);
248
+ throw error;
249
+ }
250
+ if (!commits)
251
+ return undefined;
252
+ const specificationsRelativeRoot = path.relative(this.companionContext.saasRoot, specificationsPackageRoot);
253
+ const written = [landed.packageRelativePath, ...landed.wiringEdits.map((edit) => edit.packageRelativePath)]
254
+ .map((relative) => path.posix.join(specificationsRelativeRoot, relative));
255
+ const committed = await this.acceptedChangeCommit.commitDecisionRecord({
256
+ paths: written,
257
+ summary: `Close the playbook instance ${instanceId} (${input.kind})`,
258
+ purpose: reason ?? `The instance is ${input.kind}.`,
259
+ actor: input.actor,
260
+ origin: AcceptOrigin.AUTONOMY_POSTURE,
261
+ });
262
+ return committed.commitSha;
263
+ };
264
+ let commitSha;
265
+ try {
266
+ commitSha = await withDedicatedFileLock(getWorkspaceMutationLockPath(this.companionContext.saasRoot), record, { retries: OPEN_INSTANCE_LOCK_RETRIES });
267
+ }
268
+ catch (error) {
269
+ if (error instanceof PlaybookInstanceRefusedError)
270
+ throw error;
271
+ if (isLockUnavailable(error)) {
272
+ throw new PlaybookInstanceTreeBusyError('The application\'s working tree is being written right now (a coding run holds it). Nothing was recorded; try again in a moment.');
273
+ }
274
+ throw error;
275
+ }
276
+ /* After the record, and outside the lock: the closure is the decision, and clearing its runs follows from it. */
277
+ const cleared = input.kind === ApplicationPlaybookInstanceClosureKind.ABANDONED
278
+ ? await this.playbookRuns.abandonInstanceRuns({ playbookRef: input.playbookRef, instanceKey: input.instanceKey })
279
+ : { withdrawnRunIds: [], consumedCheckpointRunIds: [] };
280
+ this.logDebug('Playbook instance closed', { instanceId, kind: input.kind, commitSha, ...cleared });
281
+ return {
282
+ instanceId,
283
+ ...(commitSha ? { commitSha } : {}),
284
+ ...cleared,
285
+ note: `${instanceId} is ${input.kind}.${commitSha ? ` Committed (${commitSha.slice(0, 8)}).` : ' Recorded as a working edit: the autonomy posture leaves committing it to you.'}`
286
+ + (input.kind === ApplicationPlaybookInstanceClosureKind.ABANDONED
287
+ ? ` ${cleared.withdrawnRunIds.length} waiting run(s) withdrawn, ${cleared.consumedCheckpointRunIds.length} interrupted checkpoint(s) consumed; a run in flight stops at its next round.`
288
+ : ''),
289
+ };
290
+ }
291
+ };
292
+ PlaybookInstanceCompanionService = __decorate([
293
+ injectable(),
294
+ __param(0, inject(SAAS_SERVICE_TYPES.Logger)),
295
+ __param(1, inject(COMPANION_SERVICE_TYPES.CompanionContext)),
296
+ __param(2, inject(COMPANION_SERVICE_TYPES.DossierService)),
297
+ __param(3, inject(COMPANION_SERVICE_TYPES.AcceptedChangeCommitService)),
298
+ __param(4, inject(COMPANION_SERVICE_TYPES.PlaybookRunService)),
299
+ __metadata("design:paramtypes", [Function, Object, Function, Function, Object])
300
+ ], PlaybookInstanceCompanionService);
301
+ export { PlaybookInstanceCompanionService };
302
+ /** The file lock's own "could not acquire" failure, told apart from a failure of the work it guards. */
303
+ function isLockUnavailable(error) {
304
+ const code = error?.code;
305
+ return code === 'ELOCKED';
306
+ }
307
+ //# sourceMappingURL=playbook-instance.companion.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"playbook-instance.companion.service.js","sourceRoot":"","sources":["../../../../../src/meta-workflows/services/playbook-instance.companion.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE/C,OAAO,EACL,wBAAwB,EACxB,4BAA4B,EAC5B,sBAAsB,EACtB,2BAA2B,EAC3B,qBAAqB,EACrB,2BAA2B,GAE5B,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,6BAA6B,EAAE,MAAM,+BAA+B,CAAC;AAC9E,OAAO,EAAE,4BAA4B,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAEpG,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EACL,0BAA0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AAC,gBAAgB,CAAC,CAAA;IAChD,WAAA,MAAM,CAAC,uBAAuB,CAAC,cAAc,CAAC,CAAA;IAC9C,WAAA,MAAM,CAAC,uBAAuB,CAAC,2BAA2B,CAAC,CAAA;IAC3D,WAAA,MAAM,CAAC,uBAAuB,CAAC,kBAAkB,CAAC,CAAA;;GAR1C,gCAAgC,CAqQ5C;;AAED,wGAAwG;AACxG,SAAS,iBAAiB,CAAC,KAAc;IACvC,MAAM,IAAI,GAAI,KAAmC,EAAE,IAAI,CAAC;IACxD,OAAO,IAAI,KAAK,SAAS,CAAC;AAC5B,CAAC","sourcesContent":["import * as path from 'node:path';\nimport { inject, injectable } from 'inversify';\n\nimport {\n PlaybookElicitationError,\n PlaybookLaneBoundaryDecision,\n landPlaybookActivation,\n landPlaybookInstanceClosure,\n refinementProducersOf,\n resolveApplicationLineScope,\n type RefinementCatalogEntry,\n} from '@wildo-ai/application-creation-runtime';\nimport { getFrameworkKnowledgePlaybook } from '@wildo-ai/framework-knowledge';\nimport { getWorkspaceMutationLockPath, withDedicatedFileLock } from '@wildo-ai/platform-config-lib';\nimport type { LoggerService } from '@wildo-ai/saas-backend-lib';\nimport { SAAS_SERVICE_TYPES } from '@wildo-ai/saas-backend-lib';\nimport { MetaWorkflow_Executor } from '@wildo-ai/saas-models/meta-workflows';\nimport {\n MetaWorkflowPlaybookSchema,\n ApplicationPlaybookInstanceClosureKind,\n ApplicationSpecificationFamily,\n PlaybookInstanceKeySchema,\n secondaryLineDefinitionOfEntry,\n withPlaybookActivation,\n type ApplicationCreatorInputs,\n playbookInstanceId,\n type ApplicationPlaybookActivation,\n} from '@wildo-ai/saas-specifications/application-creation';\n\nimport { COMPANION_SERVICE_TYPES } from '../../core/inject/models/service-types';\nimport type { CompanionContext } from '../../core/context/companion-context';\nimport { AcceptOrigin, DecisionRecordActor, type AcceptedChangeCommitCompanionService } from '../../claude-cli/services/accepted-change-commit.companion.service';\nimport {\n APPLICATION_CREATION_AUTONOMY_POSTURE,\n LaneBoundaryTreatment,\n laneBoundaryTreatmentFor,\n} from '../models/playbook-run-checkpoint.models';\nimport { readCompiledApplicationLineCatalog } from '../models/application-line-catalog.models';\nimport type { DossierCompanionService } from './dossier.companion.service';\nimport type { PlaybookRunCompanionService } from './playbook-run.companion.service';\n\n/** The same prefix every landed specification constant carries (issue #65): app identity lives in values, never in export names. */\nconst LANDED_CONSTANT_PREFIX = 'application';\n\n/**\n * How long opening an instance waits for the workspace lock before refusing. Short on purpose: the caller is\n * a person in a conversation, and a coding run holding the tree for minutes is a reason to say \"busy\", not to\n * hang the conversation.\n */\nconst OPEN_INSTANCE_LOCK_RETRIES = { retries: 10, minTimeout: 250, maxTimeout: 2_000 } as const;\n\n/** A request to open an instance the host cannot honour; named so the transport answers 4xx. */\nexport class PlaybookInstanceRefusedError extends Error {}\n\n/** The tree is being written by a coding run right now; named so the transport answers 409. */\nexport class PlaybookInstanceTreeBusyError extends Error {}\n\nexport interface OpenPlaybookInstanceResult {\n readonly activation: ApplicationPlaybookActivation;\n /** `<ref>@<key>`: how every surface addresses this instance from now on. */\n readonly instanceId: string;\n readonly packageRelativePath: string;\n /** The commit that recorded it; absent when the posture leaves acceptance to a person, or on a dry run. */\n readonly commitSha?: string;\n readonly note: string;\n}\n\n/**\n * Opening a playbook INSTANCE (#1609): the one act that writes the dossier's activation record, and the\n * first act that must be committed the moment it is taken.\n *\n * ## Why here, and not in the dossier service\n *\n * An answer is a working edit a person commits with the rest of their work; an activation is a decision\n * about what the application is building, and it is committed at once under the automatic posture, with its\n * purpose and actor as trailers. That needs the workspace lock and the accept door, which the dossier's\n * answers never did.\n *\n * ## The lock is taken BEFORE the write\n *\n * A coding run's baseline must never see the dossier half-recorded, and a decision the tree was too busy to\n * commit must not be left behind as an uncommitted edit. So the write and the commit happen together under\n * the lock, or neither happens: a busy tree answers \"busy, try again\" with nothing written.\n */\n@injectable()\nexport class PlaybookInstanceCompanionService {\n private readonly logDebug: (message: string, context?: Record<string, unknown>) => void;\n\n public constructor(\n @inject(SAAS_SERVICE_TYPES.Logger) private readonly logger: LoggerService,\n @inject(COMPANION_SERVICE_TYPES.CompanionContext) private readonly companionContext: CompanionContext,\n @inject(COMPANION_SERVICE_TYPES.DossierService) private readonly dossier: DossierCompanionService,\n @inject(COMPANION_SERVICE_TYPES.AcceptedChangeCommitService) private readonly acceptedChangeCommit: AcceptedChangeCommitCompanionService,\n @inject(COMPANION_SERVICE_TYPES.PlaybookRunService) private readonly playbookRuns: Pick<PlaybookRunCompanionService, 'abandonInstanceRuns' | 'readLandedFamilies'>,\n ) {\n this.logDebug = this.logger.debugByType('PlaybookInstanceCompanionService');\n }\n\n public async openInstance(input: {\n readonly playbookRef: string;\n readonly instanceKey: string;\n readonly purpose: string;\n /** Families a secondary line needs although the main line declares them not applicable (#1608); refused on any other instance. */\n readonly neededFamilies?: readonly ApplicationSpecificationFamily[];\n /** The families a refinement line re-derives (#1608); required on one, refused on any other instance. */\n readonly refinedFamilies?: readonly ApplicationSpecificationFamily[];\n readonly actor: DecisionRecordActor;\n readonly dryRun?: boolean;\n }): Promise<OpenPlaybookInstanceResult> {\n const specificationsPackageRoot = this.companionContext.resolvedSpecifications?.packageRoot;\n if (!specificationsPackageRoot) {\n throw new PlaybookInstanceRefusedError('No specifications package is declared in wildo.saas.config.ts; there is nowhere to record the instance.');\n }\n const parsedKey = PlaybookInstanceKeySchema.safeParse(input.instanceKey);\n if (!parsedKey.success) {\n throw new PlaybookInstanceRefusedError(`\"${input.instanceKey}\" is not an instance key: use a kebab-case slug, e.g. \"enterprise-segment\".`);\n }\n if (input.purpose.trim().length === 0) {\n throw new PlaybookInstanceRefusedError('An instance is opened FOR something: say what, in the creator\\'s terms.');\n }\n const playbook = MetaWorkflowPlaybookSchema.safeParse(getFrameworkKnowledgePlaybook(input.playbookRef)?.playbook);\n if (!playbook.success) {\n throw new PlaybookInstanceRefusedError(`No compiled playbook is registered under \"${input.playbookRef}\".`);\n }\n /*\n * The same rule the run applies, stated where the instance is OPENED so nobody opens one that could\n * never run: a playbook acting on the application as a whole has no instances.\n */\n const executor = playbook.data.executor;\n if (executor === MetaWorkflow_Executor.CODING_AGENT || executor === MetaWorkflow_Executor.DETERMINISTIC_CLI || executor === MetaWorkflow_Executor.HUMAN) {\n throw new PlaybookInstanceRefusedError(`\"${input.playbookRef}\" acts on the application as a whole, so it has no instances.`);\n }\n\n const posture = laneBoundaryTreatmentFor(APPLICATION_CREATION_AUTONOMY_POSTURE, PlaybookLaneBoundaryDecision.APPROVE_RESULT);\n const commits = posture === LaneBoundaryTreatment.NOTIFY_AND_PROCEED && input.dryRun !== true;\n const record = async (): Promise<OpenPlaybookInstanceResult> => {\n const current = await this.dossier.readCreatorInputs();\n if (input.refinedFamilies !== undefined && input.refinedFamilies.length > 0) {\n await this.assertRefinable({\n entryPlaybookRef: input.playbookRef, instanceKey: parsedKey.data, purpose: input.purpose, families: input.refinedFamilies,\n ...(input.neededFamilies ? { neededFamilies: input.neededFamilies } : {}), current,\n });\n }\n let landed: Awaited<ReturnType<typeof landPlaybookActivation>>;\n try {\n landed = await landPlaybookActivation({\n specificationsPackageRoot,\n constantPrefix: LANDED_CONSTANT_PREFIX,\n playbook: playbook.data,\n current,\n instanceKey: parsedKey.data,\n purpose: input.purpose,\n ...(input.neededFamilies !== undefined ? { neededFamilies: input.neededFamilies } : {}),\n ...(input.refinedFamilies !== undefined ? { refinedFamilies: input.refinedFamilies } : {}),\n ...(input.dryRun === true ? { dryRun: true } : {}),\n });\n } catch (error) {\n // A closed instance re-opened, or families asked of an instance that is not a line: the caller's mistake, named.\n if (error instanceof PlaybookElicitationError) throw new PlaybookInstanceRefusedError(error.message);\n throw error;\n }\n const instanceId = playbookInstanceId(input.playbookRef, parsedKey.data);\n const specificationsRelativeRoot = path.relative(this.companionContext.saasRoot, specificationsPackageRoot);\n const written = [landed.packageRelativePath, ...landed.wiringEdits.map((edit) => edit.packageRelativePath)]\n .map((relative) => path.posix.join(specificationsRelativeRoot, relative));\n if (!commits) {\n return {\n activation: landed.activation,\n instanceId,\n packageRelativePath: landed.packageRelativePath,\n note: input.dryRun === true\n ? 'Dry run: nothing was written.'\n : 'Recorded as a working edit: the autonomy posture leaves committing it to you.',\n };\n }\n const committed = await this.acceptedChangeCommit.commitDecisionRecord({\n paths: written,\n summary: `Open the playbook instance ${instanceId}${landed.activation.neededFamilies ? ` (needs ${landed.activation.neededFamilies.join(', ')})` : ''}${landed.activation.refinedFamilies ? ` (refines ${landed.activation.refinedFamilies.join(', ')})` : ''}`,\n purpose: input.purpose,\n actor: input.actor,\n origin: AcceptOrigin.AUTONOMY_POSTURE,\n });\n this.logDebug('Playbook instance opened', { instanceId, commitSha: committed.commitSha });\n return {\n activation: landed.activation,\n instanceId,\n packageRelativePath: landed.packageRelativePath,\n commitSha: committed.commitSha,\n note: `Opened and committed (${committed.commitSha.slice(0, 8)}). Run it with instanceKey \"${parsedKey.data}\".`,\n };\n };\n if (input.dryRun === true) return record();\n try {\n return await withDedicatedFileLock(getWorkspaceMutationLockPath(this.companionContext.saasRoot), record, { retries: OPEN_INSTANCE_LOCK_RETRIES });\n } catch (error) {\n if (error instanceof PlaybookInstanceRefusedError) throw error;\n if (isLockUnavailable(error)) {\n throw new PlaybookInstanceTreeBusyError('The application\\'s working tree is being written right now (a coding run holds it). Nothing was recorded; try again in a moment.');\n }\n throw error;\n }\n }\n\n /**\n * What a refinement line names must be something it can refine (#1608). Refused with the reason otherwise,\n * before anything is written:\n * - the instance must BE a refinement line (the landing refuses targets elsewhere too; saying so here first\n * gives the right reason);\n * - a producer the line admits must re-derive the family from its own prior output, among the playbooks\n * the application's line actually runs;\n * - the family must apply to the application, counting the families this same request needs back;\n * - the application must already HOLD it: a refinement changes what exists, and a family nobody produced\n * yet would be authored from scratch under the name of a refinement.\n */\n private async assertRefinable(input: {\n readonly entryPlaybookRef: string;\n readonly instanceKey: string;\n readonly purpose: string;\n readonly families: readonly ApplicationSpecificationFamily[];\n readonly neededFamilies?: readonly ApplicationSpecificationFamily[];\n readonly current: ApplicationCreatorInputs | undefined;\n }): Promise<void> {\n if (secondaryLineDefinitionOfEntry(input.entryPlaybookRef)?.namesRefinedFamilies !== true) {\n throw new PlaybookInstanceRefusedError(`\"${input.entryPlaybookRef}\" is not a refinement line's entry, so an instance of it names no families to refine.`);\n }\n /*\n * The dossier as it would stand with this line open, so the families it needs back already apply. A re-open\n * that names none keeps what the line already needs (the landing does the same), so it is counted here too.\n */\n const neededFamilies = input.neededFamilies\n ?? input.current?.activations?.[playbookInstanceId(input.entryPlaybookRef, input.instanceKey)]?.neededFamilies;\n const withLine = withPlaybookActivation(input.current, {\n playbookRef: input.entryPlaybookRef, instanceKey: input.instanceKey, purpose: input.purpose,\n ...(neededFamilies && neededFamilies.length > 0 ? { neededFamilies: [...neededFamilies] } : {}),\n });\n const lineCatalog = readCompiledApplicationLineCatalog();\n const scope = resolveApplicationLineScope({ catalog: lineCatalog, creatorInputs: withLine });\n const entry = getFrameworkKnowledgePlaybook(input.entryPlaybookRef)?.playbook as RefinementCatalogEntry | undefined;\n const catalog: RefinementCatalogEntry[] = [\n ...(entry ? [entry] : []),\n ...(entry?.method?.choreography?.admits ?? []).flatMap((ref) => {\n const child = getFrameworkKnowledgePlaybook(ref)?.playbook as RefinementCatalogEntry | undefined;\n return child ? [child] : [];\n }),\n ];\n const inapplicable = input.families.filter((family) => scope.notApplicableFamilies.has(family));\n if (inapplicable.length > 0) {\n throw new PlaybookInstanceRefusedError(\n `${inapplicable.join(', ')} does not apply to this kind of application, so there is nothing to refine. A feature line that needs it back can bring it in.`,\n );\n }\n const unrefinable = input.families.filter((family) => !refinementProducersOf(catalog, input.entryPlaybookRef, family).some((ref) => scope.admittedPlaybookRefs.has(ref)));\n if (unrefinable.length > 0) {\n throw new PlaybookInstanceRefusedError(\n `Nothing this application runs refines ${unrefinable.join(', ')} from what it already holds, so a refinement line cannot change it. Refinable: the families a model re-derives from their own prior output (the requirements, the feature drafts, the plans, the brand, the roadmap).`,\n );\n }\n const landed = await this.playbookRuns.readLandedFamilies();\n const absent = input.families.filter((family) => !landed.has(family));\n if (absent.length > 0) {\n throw new PlaybookInstanceRefusedError(\n `The application does not hold ${absent.join(', ')} yet, so there is nothing to refine: a refinement changes what exists. Let the main line produce it first.`,\n );\n }\n }\n\n /**\n * CLOSE an instance (#1608, #1609 R10): completed, or abandoned. Recorded and committed at once under the\n * workspace lock, like opening one, with the reason as the purpose trailer. What it contributed stays, marked\n * with it. ABANDONING also cancels its runs waiting on a person and consumes its interrupted progress; a run\n * in flight stops at its next round, when its selector reads the closure.\n */\n public async closeInstance(input: {\n readonly playbookRef: string;\n readonly instanceKey: string;\n readonly kind: ApplicationPlaybookInstanceClosureKind;\n readonly reason?: string;\n readonly actor: DecisionRecordActor;\n }): Promise<{\n readonly instanceId: string;\n readonly commitSha?: string;\n readonly withdrawnRunIds: readonly string[];\n readonly consumedCheckpointRunIds: readonly string[];\n readonly note: string;\n }> {\n const specificationsPackageRoot = this.companionContext.resolvedSpecifications?.packageRoot;\n if (!specificationsPackageRoot) {\n throw new PlaybookInstanceRefusedError('No specifications package is declared in wildo.saas.config.ts; there is nowhere to record the closure.');\n }\n const instanceId = playbookInstanceId(input.playbookRef, input.instanceKey);\n const reason = input.reason?.trim() || undefined;\n const commits = laneBoundaryTreatmentFor(APPLICATION_CREATION_AUTONOMY_POSTURE, PlaybookLaneBoundaryDecision.APPROVE_RESULT) === LaneBoundaryTreatment.NOTIFY_AND_PROCEED;\n const record = async (): Promise<string | undefined> => {\n let landed: Awaited<ReturnType<typeof landPlaybookInstanceClosure>>;\n try {\n landed = await landPlaybookInstanceClosure({\n specificationsPackageRoot,\n constantPrefix: LANDED_CONSTANT_PREFIX,\n current: await this.dossier.readCreatorInputs(),\n playbookRef: input.playbookRef,\n instanceKey: input.instanceKey,\n closure: { kind: input.kind, ...(reason ? { reason } : {}) },\n });\n } catch (error) {\n // An instance nobody opened, or one already closed: the caller's mistake, named.\n if (error instanceof PlaybookElicitationError) throw new PlaybookInstanceRefusedError(error.message);\n throw error;\n }\n if (!commits) return undefined;\n const specificationsRelativeRoot = path.relative(this.companionContext.saasRoot, specificationsPackageRoot);\n const written = [landed.packageRelativePath, ...landed.wiringEdits.map((edit) => edit.packageRelativePath)]\n .map((relative) => path.posix.join(specificationsRelativeRoot, relative));\n const committed = await this.acceptedChangeCommit.commitDecisionRecord({\n paths: written,\n summary: `Close the playbook instance ${instanceId} (${input.kind})`,\n purpose: reason ?? `The instance is ${input.kind}.`,\n actor: input.actor,\n origin: AcceptOrigin.AUTONOMY_POSTURE,\n });\n return committed.commitSha;\n };\n let commitSha: string | undefined;\n try {\n commitSha = await withDedicatedFileLock(getWorkspaceMutationLockPath(this.companionContext.saasRoot), record, { retries: OPEN_INSTANCE_LOCK_RETRIES });\n } catch (error) {\n if (error instanceof PlaybookInstanceRefusedError) throw error;\n if (isLockUnavailable(error)) {\n throw new PlaybookInstanceTreeBusyError('The application\\'s working tree is being written right now (a coding run holds it). Nothing was recorded; try again in a moment.');\n }\n throw error;\n }\n /* After the record, and outside the lock: the closure is the decision, and clearing its runs follows from it. */\n const cleared = input.kind === ApplicationPlaybookInstanceClosureKind.ABANDONED\n ? await this.playbookRuns.abandonInstanceRuns({ playbookRef: input.playbookRef, instanceKey: input.instanceKey })\n : { withdrawnRunIds: [], consumedCheckpointRunIds: [] };\n this.logDebug('Playbook instance closed', { instanceId, kind: input.kind, commitSha, ...cleared });\n return {\n instanceId,\n ...(commitSha ? { commitSha } : {}),\n ...cleared,\n note: `${instanceId} is ${input.kind}.${commitSha ? ` Committed (${commitSha.slice(0, 8)}).` : ' Recorded as a working edit: the autonomy posture leaves committing it to you.'}`\n + (input.kind === ApplicationPlaybookInstanceClosureKind.ABANDONED\n ? ` ${cleared.withdrawnRunIds.length} waiting run(s) withdrawn, ${cleared.consumedCheckpointRunIds.length} interrupted checkpoint(s) consumed; a run in flight stops at its next round.`\n : ''),\n };\n }\n}\n\n/** The file lock's own \"could not acquire\" failure, told apart from a failure of the work it guards. */\nfunction isLockUnavailable(error: unknown): boolean {\n const code = (error as { code?: unknown } | null)?.code;\n return code === 'ELOCKED';\n}\n"]}
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import { ApplicationSpecificationLandingConcurrency } from '@wildo-ai/application-creation-runtime';
2
3
  import type { LoggerService } from '@wildo-ai/saas-backend-lib';
3
4
  import type { CompanionContext } from '../../core/context/companion-context';
4
5
  declare const RunWriteRecordSchema: z.ZodObject<{
@@ -19,6 +20,12 @@ declare const RunWriteRecordSchema: z.ZodObject<{
19
20
  previousContent: z.ZodOptional<z.ZodString>;
20
21
  /** The exact bytes the run wrote — revert refuses when the file has moved on from these (unless forced). */
21
22
  writtenContent: z.ZodString;
23
+ /**
24
+ * What the landing found against the bytes the run READ (#1614): unchanged since, merged over another
25
+ * writer's entries, or not compared. Absent on records from before it existed, and on files a run
26
+ * derives rather than lands (wiring, diagrams, decision records).
27
+ */
28
+ concurrency: z.ZodOptional<z.ZodEnum<typeof ApplicationSpecificationLandingConcurrency>>;
22
29
  }, z.core.$strict>>;
23
30
  /**
24
31
  * Stamped when the run's writes were ACCEPTED through the workbench (#1454, Step 7) — a cache of
@@ -50,6 +57,22 @@ export interface PlaybookRunRevertOutcome {
50
57
  readonly reverted: readonly string[];
51
58
  /** Files whose CURRENT bytes differ from what the run wrote — refused without `force` so a human edit is never silently destroyed. */
52
59
  readonly refusedDiverged: readonly string[];
60
+ /**
61
+ * Files whose current bytes are a LATER recorded run's landing (#1614). Refused even under `force`:
62
+ * restoring this run's pre-image would destroy that run's work, which a person asking to undo THIS run
63
+ * did not ask for. Revert the later run first.
64
+ */
65
+ readonly refusedLaterRun: readonly {
66
+ readonly path: string;
67
+ readonly runId: string;
68
+ }[];
69
+ }
70
+ /** Why a run's written file no longer holds its bytes: a later recorded run landed there, or something else changed it. */
71
+ export declare enum PlaybookRunFileSuccession {
72
+ /** A later recorded run landed this path; the file holds its bytes, or a still later change on top of them. */
73
+ LATER_RUN = "later_run",
74
+ /** No later recorded run wrote this path: a person or a tool outside the runs changed it. */
75
+ EDITED_OUTSIDE_RUNS = "edited_outside_runs"
53
76
  }
54
77
  export declare class PlaybookRunWriteRecordNotFoundError extends Error {
55
78
  constructor(runId: string);
@@ -127,6 +150,12 @@ export declare class PlaybookRunWriteRegisterCompanionService {
127
150
  revert(runId: string, options?: {
128
151
  readonly force?: boolean;
129
152
  }): Promise<PlaybookRunRevertOutcome>;
153
+ /**
154
+ * Why each of a run's files no longer holds what the run wrote (#1614): a LATER recorded run wrote the
155
+ * same path, or nothing recorded did. Acceptance reads this so a run whose work was refined by a later
156
+ * run is not reported the same way as one a person edited over.
157
+ */
158
+ describeSuccession(runId: string): Promise<ReadonlyMap<string, PlaybookRunFileSuccession>>;
130
159
  private resolveRegisterDirectory;
131
160
  private resolveRecordPath;
132
161
  }
@@ -1 +1 @@
1
- {"version":3,"file":"playbook-run-write-register.companion.service.d.ts","sourceRoot":"","sources":["../../../../../src/meta-workflows/services/playbook-run-write-register.companion.service.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAIhE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAc7E,QAAA,MAAM,oBAAoB;IACxB,iEAAiE;;;IAGjE;;;OAGG;;;;QAhBH,kDAAkD;;;QAGlD,yDAAyD;;QAEzD,4GAA4G;;;IAe5G;;;;OAIG;;;kBAGH,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAE1E,kDAAkD;AAClD,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAChC,iGAAiG;IACjG,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC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AC,IAAI,CAAC;IAQzE,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;IA0BxD,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,GAAE;QAAE,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAA;KAAO,GAAG,OAAO,CAAC,wBAAwB,CAAC;IA6CjH,OAAO,CAAC,wBAAwB;IAIhC,OAAO,CAAC,iBAAiB;CAK1B"}
1
+ {"version":3,"file":"playbook-run-write-register.companion.service.d.ts","sourceRoot":"","sources":["../../../../../src/meta-workflows/services/playbook-run-write-register.companion.service.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,0CAA0C,EAAE,MAAM,wCAAwC,CAAC;AACpG,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAIhE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAoB7E,QAAA,MAAM,oBAAoB;IACxB,iEAAiE;;;IAGjE;;;OAGG;;;;QAtBH,kDAAkD;;;QAGlD,yDAAyD;;QAEzD,4GAA4G;;QAE5G;;;;WAIG;;;IAeH;;;;OAIG;;;kBAGH,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAE1E,kDAAkD;AAClD,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAChC,iGAAiG;IACjG,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,oGAAoG;IACpG,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,4DAA4D;AAC5D,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,WAAW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