@wildo-ai/dev-companion 1.1.8 → 1.1.9

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 (325) hide show
  1. package/bin/companion-supervisor.d.mts +33 -0
  2. package/bin/companion-supervisor.mjs +174 -0
  3. package/bin/wildo-dev-companion-supervised.mjs +16 -0
  4. package/dist/esm/brand/models/logo-generation.actors-system.definitions.d.ts.map +1 -1
  5. package/dist/esm/brand/models/logo-generation.actors-system.definitions.js +8 -2
  6. package/dist/esm/brand/models/logo-generation.actors-system.definitions.js.map +1 -1
  7. package/dist/esm/brand/models/logo-judge.actors-system.definitions.d.ts.map +1 -1
  8. package/dist/esm/brand/models/logo-judge.actors-system.definitions.js +8 -2
  9. package/dist/esm/brand/models/logo-judge.actors-system.definitions.js.map +1 -1
  10. package/dist/esm/brand/services/brand-accept.companion.service.d.ts +1 -1
  11. package/dist/esm/brand/services/brand-accept.companion.service.d.ts.map +1 -1
  12. package/dist/esm/brand/services/brand-accept.companion.service.js +9 -11
  13. package/dist/esm/brand/services/brand-accept.companion.service.js.map +1 -1
  14. package/dist/esm/claude-cli/models/application-coding-run-checkpoint.models.d.ts +21 -0
  15. package/dist/esm/claude-cli/models/application-coding-run-checkpoint.models.d.ts.map +1 -1
  16. package/dist/esm/claude-cli/models/application-coding-run-checkpoint.models.js +33 -1
  17. package/dist/esm/claude-cli/models/application-coding-run-checkpoint.models.js.map +1 -1
  18. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.d.ts +41 -2
  19. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.d.ts.map +1 -1
  20. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.js +43 -1
  21. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.js.map +1 -1
  22. package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.d.ts +57 -1
  23. package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.d.ts.map +1 -1
  24. package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.js +75 -1
  25. package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.js.map +1 -1
  26. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.d.ts +90 -5
  27. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.d.ts.map +1 -1
  28. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.js +242 -22
  29. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.js.map +1 -1
  30. package/dist/esm/companion-api/companion-api.schemas.d.ts +23 -2
  31. package/dist/esm/companion-api/companion-api.schemas.d.ts.map +1 -1
  32. package/dist/esm/companion-api/companion-api.schemas.js +13 -2
  33. package/dist/esm/companion-api/companion-api.schemas.js.map +1 -1
  34. package/dist/esm/companion-api/controllers/companion.controller.d.ts +63 -7
  35. package/dist/esm/companion-api/controllers/companion.controller.d.ts.map +1 -1
  36. package/dist/esm/companion-api/controllers/companion.controller.js +315 -39
  37. package/dist/esm/companion-api/controllers/companion.controller.js.map +1 -1
  38. package/dist/esm/core/config/primary-language.companion.utils.d.ts +5 -4
  39. package/dist/esm/core/config/primary-language.companion.utils.d.ts.map +1 -1
  40. package/dist/esm/core/config/primary-language.companion.utils.js +5 -4
  41. package/dist/esm/core/config/primary-language.companion.utils.js.map +1 -1
  42. package/dist/esm/core/context/application-module-generations.companion.d.ts +103 -0
  43. package/dist/esm/core/context/application-module-generations.companion.d.ts.map +1 -0
  44. package/dist/esm/core/context/application-module-generations.companion.js +313 -0
  45. package/dist/esm/core/context/application-module-generations.companion.js.map +1 -0
  46. package/dist/esm/core/context/companion-package-loaders.companion.d.ts +19 -19
  47. package/dist/esm/core/context/companion-package-loaders.companion.d.ts.map +1 -1
  48. package/dist/esm/core/context/companion-package-loaders.companion.js +52 -40
  49. package/dist/esm/core/context/companion-package-loaders.companion.js.map +1 -1
  50. package/dist/esm/core/inject/models/container.d.ts.map +1 -1
  51. package/dist/esm/core/inject/models/container.js +4 -0
  52. package/dist/esm/core/inject/models/container.js.map +1 -1
  53. package/dist/esm/core/inject/models/service-types.d.ts +4 -0
  54. package/dist/esm/core/inject/models/service-types.d.ts.map +1 -1
  55. package/dist/esm/core/inject/models/service-types.js +4 -0
  56. package/dist/esm/core/inject/models/service-types.js.map +1 -1
  57. package/dist/esm/core/introspection/resources/creation-console-answer.companion.d.ts +15 -1
  58. package/dist/esm/core/introspection/resources/creation-console-answer.companion.d.ts.map +1 -1
  59. package/dist/esm/core/introspection/resources/creation-console-answer.companion.js +38 -3
  60. package/dist/esm/core/introspection/resources/creation-console-answer.companion.js.map +1 -1
  61. package/dist/esm/core/introspection/resources/creation-console-projection.companion.d.ts +21 -0
  62. package/dist/esm/core/introspection/resources/creation-console-projection.companion.d.ts.map +1 -1
  63. package/dist/esm/core/introspection/resources/creation-console-projection.companion.js +64 -25
  64. package/dist/esm/core/introspection/resources/creation-console-projection.companion.js.map +1 -1
  65. package/dist/esm/core/introspection/resources/creation-home-projection.companion.d.ts.map +1 -1
  66. package/dist/esm/core/introspection/resources/creation-home-projection.companion.js +2 -0
  67. package/dist/esm/core/introspection/resources/creation-home-projection.companion.js.map +1 -1
  68. package/dist/esm/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.d.ts +0 -28
  69. package/dist/esm/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.d.ts.map +1 -1
  70. package/dist/esm/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.js +192 -19
  71. package/dist/esm/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.js.map +1 -1
  72. package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.d.ts.map +1 -1
  73. package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.js +27 -5
  74. package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.js.map +1 -1
  75. package/dist/esm/core/introspection/resources/launch-blockers.companion.d.ts +47 -0
  76. package/dist/esm/core/introspection/resources/launch-blockers.companion.d.ts.map +1 -0
  77. package/dist/esm/core/introspection/resources/launch-blockers.companion.js +98 -0
  78. package/dist/esm/core/introspection/resources/launch-blockers.companion.js.map +1 -0
  79. package/dist/esm/core/introspection/services/companion-introspection.companion.service.d.ts +6 -1
  80. package/dist/esm/core/introspection/services/companion-introspection.companion.service.d.ts.map +1 -1
  81. package/dist/esm/core/introspection/services/companion-introspection.companion.service.js +20 -1
  82. package/dist/esm/core/introspection/services/companion-introspection.companion.service.js.map +1 -1
  83. package/dist/esm/core/introspection/services/introspection-derivation-state.companion.service.d.ts +34 -8
  84. package/dist/esm/core/introspection/services/introspection-derivation-state.companion.service.d.ts.map +1 -1
  85. package/dist/esm/core/introspection/services/introspection-derivation-state.companion.service.js +61 -12
  86. package/dist/esm/core/introspection/services/introspection-derivation-state.companion.service.js.map +1 -1
  87. package/dist/esm/core/introspection/services/introspection-input-closure.companion.d.ts +44 -0
  88. package/dist/esm/core/introspection/services/introspection-input-closure.companion.d.ts.map +1 -0
  89. package/dist/esm/core/introspection/services/introspection-input-closure.companion.js +104 -0
  90. package/dist/esm/core/introspection/services/introspection-input-closure.companion.js.map +1 -0
  91. package/dist/esm/core/introspection/services/introspection-source-state.companion.service.d.ts +41 -22
  92. package/dist/esm/core/introspection/services/introspection-source-state.companion.service.d.ts.map +1 -1
  93. package/dist/esm/core/introspection/services/introspection-source-state.companion.service.js +64 -47
  94. package/dist/esm/core/introspection/services/introspection-source-state.companion.service.js.map +1 -1
  95. package/dist/esm/core/introspection/subprocess/expert-persona-brief.renderer.d.ts +7 -1
  96. package/dist/esm/core/introspection/subprocess/expert-persona-brief.renderer.d.ts.map +1 -1
  97. package/dist/esm/core/introspection/subprocess/expert-persona-brief.renderer.js +13 -4
  98. package/dist/esm/core/introspection/subprocess/expert-persona-brief.renderer.js.map +1 -1
  99. package/dist/esm/core/introspection/subprocess/specification-artifacts.behavior.d.ts.map +1 -1
  100. package/dist/esm/core/introspection/subprocess/specification-artifacts.behavior.js +7 -0
  101. package/dist/esm/core/introspection/subprocess/specification-artifacts.behavior.js.map +1 -1
  102. package/dist/esm/core/lock/wildo-saas-lock.schemas.d.ts +4 -4
  103. package/dist/esm/core/runtime/companion-env-file.d.ts +39 -9
  104. package/dist/esm/core/runtime/companion-env-file.d.ts.map +1 -1
  105. package/dist/esm/core/runtime/companion-env-file.js +75 -16
  106. package/dist/esm/core/runtime/companion-env-file.js.map +1 -1
  107. package/dist/esm/core/runtime/services/start-companion-application.service.d.ts +7 -3
  108. package/dist/esm/core/runtime/services/start-companion-application.service.d.ts.map +1 -1
  109. package/dist/esm/core/runtime/services/start-companion-application.service.js +29 -11
  110. package/dist/esm/core/runtime/services/start-companion-application.service.js.map +1 -1
  111. package/dist/esm/core/utils/bounded-concurrency.utils.d.ts +17 -0
  112. package/dist/esm/core/utils/bounded-concurrency.utils.d.ts.map +1 -0
  113. package/dist/esm/core/utils/bounded-concurrency.utils.js +37 -0
  114. package/dist/esm/core/utils/bounded-concurrency.utils.js.map +1 -0
  115. package/dist/esm/core/utils/derived-input-signature.companion.utils.d.ts +10 -1
  116. package/dist/esm/core/utils/derived-input-signature.companion.utils.d.ts.map +1 -1
  117. package/dist/esm/core/utils/derived-input-signature.companion.utils.js +9 -2
  118. package/dist/esm/core/utils/derived-input-signature.companion.utils.js.map +1 -1
  119. package/dist/esm/creation-conversation/creation-conversation.actors-system.definitions.d.ts.map +1 -1
  120. package/dist/esm/creation-conversation/creation-conversation.actors-system.definitions.js +2 -0
  121. package/dist/esm/creation-conversation/creation-conversation.actors-system.definitions.js.map +1 -1
  122. package/dist/esm/creation-conversation/creation-conversation.function-tools.d.ts.map +1 -1
  123. package/dist/esm/creation-conversation/creation-conversation.function-tools.js +66 -6
  124. package/dist/esm/creation-conversation/creation-conversation.function-tools.js.map +1 -1
  125. package/dist/esm/deliberations/models/deliberation-agents.actors-system.definitions.d.ts +0 -17
  126. package/dist/esm/deliberations/models/deliberation-agents.actors-system.definitions.d.ts.map +1 -1
  127. package/dist/esm/deliberations/models/deliberation-agents.actors-system.definitions.js +10 -4
  128. package/dist/esm/deliberations/models/deliberation-agents.actors-system.definitions.js.map +1 -1
  129. package/dist/esm/email/services/email-template.companion.service.d.ts +6 -1
  130. package/dist/esm/email/services/email-template.companion.service.d.ts.map +1 -1
  131. package/dist/esm/email/services/email-template.companion.service.js +4 -1
  132. package/dist/esm/email/services/email-template.companion.service.js.map +1 -1
  133. package/dist/esm/expert-personas/models/expert-persona-critique.actors-system.definitions.d.ts.map +1 -1
  134. package/dist/esm/expert-personas/models/expert-persona-critique.actors-system.definitions.js +8 -2
  135. package/dist/esm/expert-personas/models/expert-persona-critique.actors-system.definitions.js.map +1 -1
  136. package/dist/esm/expert-personas/models/expert-persona-derivation.actors-system.definitions.d.ts.map +1 -1
  137. package/dist/esm/expert-personas/models/expert-persona-derivation.actors-system.definitions.js +8 -2
  138. package/dist/esm/expert-personas/models/expert-persona-derivation.actors-system.definitions.js.map +1 -1
  139. package/dist/esm/expert-personas/services/expert-persona.companion.service.d.ts.map +1 -1
  140. package/dist/esm/expert-personas/services/expert-persona.companion.service.js +7 -7
  141. package/dist/esm/expert-personas/services/expert-persona.companion.service.js.map +1 -1
  142. package/dist/esm/i18n/composite_views/app.creation-conversation.en.d.ts.map +1 -1
  143. package/dist/esm/i18n/composite_views/app.creation-conversation.en.js +41 -1
  144. package/dist/esm/i18n/composite_views/app.creation-conversation.en.js.map +1 -1
  145. package/dist/esm/i18n/resources/workbenchAspects.en.d.ts.map +1 -1
  146. package/dist/esm/i18n/resources/workbenchAspects.en.js +7 -0
  147. package/dist/esm/i18n/resources/workbenchAspects.en.js.map +1 -1
  148. package/dist/esm/i18n/resources/workbenchBuildDispatchPlan.en.d.ts +5 -0
  149. package/dist/esm/i18n/resources/workbenchBuildDispatchPlan.en.d.ts.map +1 -1
  150. package/dist/esm/i18n/resources/workbenchBuildDispatchPlan.en.js +5 -0
  151. package/dist/esm/i18n/resources/workbenchBuildDispatchPlan.en.js.map +1 -1
  152. package/dist/esm/i18n/resources/workbenchBuildPlanTasks.en.d.ts +1 -1
  153. package/dist/esm/i18n/resources/workbenchBuildPlanTasks.en.d.ts.map +1 -1
  154. package/dist/esm/i18n/resources/workbenchBuildPlanTasks.en.js +2 -1
  155. package/dist/esm/i18n/resources/workbenchBuildPlanTasks.en.js.map +1 -1
  156. package/dist/esm/i18n/resources/workbenchDossierEntries.en.d.ts +46 -0
  157. package/dist/esm/i18n/resources/workbenchDossierEntries.en.d.ts.map +1 -1
  158. package/dist/esm/i18n/resources/workbenchDossierEntries.en.js +12 -0
  159. package/dist/esm/i18n/resources/workbenchDossierEntries.en.js.map +1 -1
  160. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.d.ts +266 -0
  161. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.d.ts.map +1 -1
  162. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.js +91 -5
  163. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.js.map +1 -1
  164. package/dist/esm/i18n/system_enums/application-creation.en.d.ts +41 -0
  165. package/dist/esm/i18n/system_enums/application-creation.en.d.ts.map +1 -1
  166. package/dist/esm/i18n/system_enums/application-creation.en.js +45 -1
  167. package/dist/esm/i18n/system_enums/application-creation.en.js.map +1 -1
  168. package/dist/esm/i18n/system_enums/localization.en.d.ts +82 -0
  169. package/dist/esm/i18n/system_enums/localization.en.d.ts.map +1 -0
  170. package/dist/esm/i18n/system_enums/localization.en.js +82 -0
  171. package/dist/esm/i18n/system_enums/localization.en.js.map +1 -0
  172. package/dist/esm/i18n/system_enums/risk-register.en.d.ts +1 -0
  173. package/dist/esm/i18n/system_enums/risk-register.en.d.ts.map +1 -1
  174. package/dist/esm/i18n/system_enums/risk-register.en.js +1 -0
  175. package/dist/esm/i18n/system_enums/risk-register.en.js.map +1 -1
  176. package/dist/esm/i18n/system_enums/workbench-dossier.en.d.ts +10 -0
  177. package/dist/esm/i18n/system_enums/workbench-dossier.en.d.ts.map +1 -1
  178. package/dist/esm/i18n/system_enums/workbench-dossier.en.js +13 -0
  179. package/dist/esm/i18n/system_enums/workbench-dossier.en.js.map +1 -1
  180. package/dist/esm/i18n-labelling/models/labelling-progress.models.d.ts +43 -0
  181. package/dist/esm/i18n-labelling/models/labelling-progress.models.d.ts.map +1 -0
  182. package/dist/esm/i18n-labelling/models/labelling-progress.models.js +34 -0
  183. package/dist/esm/i18n-labelling/models/labelling-progress.models.js.map +1 -0
  184. package/dist/esm/i18n-labelling/services/labellize-orchestrator.companion.service.d.ts +8 -0
  185. package/dist/esm/i18n-labelling/services/labellize-orchestrator.companion.service.d.ts.map +1 -1
  186. package/dist/esm/i18n-labelling/services/labellize-orchestrator.companion.service.js +97 -56
  187. package/dist/esm/i18n-labelling/services/labellize-orchestrator.companion.service.js.map +1 -1
  188. package/dist/esm/i18n-labelling/services/translate-orchestrator.companion.service.d.ts +18 -0
  189. package/dist/esm/i18n-labelling/services/translate-orchestrator.companion.service.d.ts.map +1 -1
  190. package/dist/esm/i18n-labelling/services/translate-orchestrator.companion.service.js +269 -153
  191. package/dist/esm/i18n-labelling/services/translate-orchestrator.companion.service.js.map +1 -1
  192. package/dist/esm/i18n-labelling/utils/labelling-concurrency.utils.d.ts +41 -0
  193. package/dist/esm/i18n-labelling/utils/labelling-concurrency.utils.d.ts.map +1 -0
  194. package/dist/esm/i18n-labelling/utils/labelling-concurrency.utils.js +47 -0
  195. package/dist/esm/i18n-labelling/utils/labelling-concurrency.utils.js.map +1 -0
  196. package/dist/esm/i18n-labelling/utils/per-unit-file.utils.d.ts +12 -0
  197. package/dist/esm/i18n-labelling/utils/per-unit-file.utils.d.ts.map +1 -1
  198. package/dist/esm/i18n-labelling/utils/per-unit-file.utils.js +10 -2
  199. package/dist/esm/i18n-labelling/utils/per-unit-file.utils.js.map +1 -1
  200. package/dist/esm/i18n-labelling/utils/staged-label-file-writer.utils.d.ts +89 -0
  201. package/dist/esm/i18n-labelling/utils/staged-label-file-writer.utils.d.ts.map +1 -0
  202. package/dist/esm/i18n-labelling/utils/staged-label-file-writer.utils.js +229 -0
  203. package/dist/esm/i18n-labelling/utils/staged-label-file-writer.utils.js.map +1 -0
  204. package/dist/esm/meta-workflows/models/build-task-rearm.models.d.ts +67 -1
  205. package/dist/esm/meta-workflows/models/build-task-rearm.models.d.ts.map +1 -1
  206. package/dist/esm/meta-workflows/models/build-task-rearm.models.js +64 -0
  207. package/dist/esm/meta-workflows/models/build-task-rearm.models.js.map +1 -1
  208. package/dist/esm/meta-workflows/models/creation-intervention.models.d.ts +308 -0
  209. package/dist/esm/meta-workflows/models/creation-intervention.models.d.ts.map +1 -0
  210. package/dist/esm/meta-workflows/models/creation-intervention.models.js +365 -0
  211. package/dist/esm/meta-workflows/models/creation-intervention.models.js.map +1 -0
  212. package/dist/esm/meta-workflows/models/generation-step-progress.models.d.ts +61 -0
  213. package/dist/esm/meta-workflows/models/generation-step-progress.models.d.ts.map +1 -0
  214. package/dist/esm/meta-workflows/models/generation-step-progress.models.js +58 -0
  215. package/dist/esm/meta-workflows/models/generation-step-progress.models.js.map +1 -0
  216. package/dist/esm/meta-workflows/models/meta-workflows-lane.models.d.ts +10 -6
  217. package/dist/esm/meta-workflows/models/meta-workflows-lane.models.d.ts.map +1 -1
  218. package/dist/esm/meta-workflows/models/meta-workflows-lane.models.js +11 -6
  219. package/dist/esm/meta-workflows/models/meta-workflows-lane.models.js.map +1 -1
  220. package/dist/esm/meta-workflows/models/playbook-run-checkpoint.models.d.ts +3 -0
  221. package/dist/esm/meta-workflows/models/playbook-run-checkpoint.models.d.ts.map +1 -1
  222. package/dist/esm/meta-workflows/models/playbook-run-checkpoint.models.js +8 -1
  223. package/dist/esm/meta-workflows/models/playbook-run-checkpoint.models.js.map +1 -1
  224. package/dist/esm/meta-workflows/models/playbook-run-record.models.d.ts +26 -0
  225. package/dist/esm/meta-workflows/models/playbook-run-record.models.d.ts.map +1 -1
  226. package/dist/esm/meta-workflows/models/playbook-run-record.models.js +66 -10
  227. package/dist/esm/meta-workflows/models/playbook-run-record.models.js.map +1 -1
  228. package/dist/esm/meta-workflows/services/application-assembly-checks.companion.utils.d.ts +13 -0
  229. package/dist/esm/meta-workflows/services/application-assembly-checks.companion.utils.d.ts.map +1 -0
  230. package/dist/esm/meta-workflows/services/application-assembly-checks.companion.utils.js +33 -0
  231. package/dist/esm/meta-workflows/services/application-assembly-checks.companion.utils.js.map +1 -0
  232. package/dist/esm/meta-workflows/services/application-assembly-repair.companion.utils.d.ts +145 -0
  233. package/dist/esm/meta-workflows/services/application-assembly-repair.companion.utils.d.ts.map +1 -0
  234. package/dist/esm/meta-workflows/services/application-assembly-repair.companion.utils.js +179 -0
  235. package/dist/esm/meta-workflows/services/application-assembly-repair.companion.utils.js.map +1 -0
  236. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts +376 -17
  237. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts.map +1 -1
  238. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.js +805 -39
  239. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.js.map +1 -1
  240. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.d.ts +93 -7
  241. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.d.ts.map +1 -1
  242. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.js +142 -25
  243. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.js.map +1 -1
  244. package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.d.ts +120 -3
  245. package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.d.ts.map +1 -1
  246. package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.js +325 -16
  247. package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.js.map +1 -1
  248. package/dist/esm/meta-workflows/services/application-build-website-context.companion.service.d.ts.map +1 -1
  249. package/dist/esm/meta-workflows/services/application-build-website-context.companion.service.js +15 -6
  250. package/dist/esm/meta-workflows/services/application-build-website-context.companion.service.js.map +1 -1
  251. package/dist/esm/meta-workflows/services/application-maturity-executor.companion.service.d.ts.map +1 -1
  252. package/dist/esm/meta-workflows/services/application-maturity-executor.companion.service.js +10 -11
  253. package/dist/esm/meta-workflows/services/application-maturity-executor.companion.service.js.map +1 -1
  254. package/dist/esm/meta-workflows/services/capability-composition-executor.companion.service.d.ts.map +1 -1
  255. package/dist/esm/meta-workflows/services/capability-composition-executor.companion.service.js +10 -11
  256. package/dist/esm/meta-workflows/services/capability-composition-executor.companion.service.js.map +1 -1
  257. package/dist/esm/meta-workflows/services/creation-intervention-ledger.companion.service.d.ts +82 -0
  258. package/dist/esm/meta-workflows/services/creation-intervention-ledger.companion.service.d.ts.map +1 -0
  259. package/dist/esm/meta-workflows/services/creation-intervention-ledger.companion.service.js +291 -0
  260. package/dist/esm/meta-workflows/services/creation-intervention-ledger.companion.service.js.map +1 -0
  261. package/dist/esm/meta-workflows/services/creation-lane-preflight.companion.service.d.ts +60 -0
  262. package/dist/esm/meta-workflows/services/creation-lane-preflight.companion.service.d.ts.map +1 -0
  263. package/dist/esm/meta-workflows/services/creation-lane-preflight.companion.service.js +66 -0
  264. package/dist/esm/meta-workflows/services/creation-lane-preflight.companion.service.js.map +1 -0
  265. package/dist/esm/meta-workflows/services/creation-run-report.companion.service.d.ts +53 -0
  266. package/dist/esm/meta-workflows/services/creation-run-report.companion.service.d.ts.map +1 -0
  267. package/dist/esm/meta-workflows/services/creation-run-report.companion.service.js +164 -0
  268. package/dist/esm/meta-workflows/services/creation-run-report.companion.service.js.map +1 -0
  269. package/dist/esm/meta-workflows/services/dossier-write-queue.companion.utils.d.ts +37 -0
  270. package/dist/esm/meta-workflows/services/dossier-write-queue.companion.utils.d.ts.map +1 -0
  271. package/dist/esm/meta-workflows/services/dossier-write-queue.companion.utils.js +52 -0
  272. package/dist/esm/meta-workflows/services/dossier-write-queue.companion.utils.js.map +1 -0
  273. package/dist/esm/meta-workflows/services/dossier.companion.service.d.ts +74 -14
  274. package/dist/esm/meta-workflows/services/dossier.companion.service.d.ts.map +1 -1
  275. package/dist/esm/meta-workflows/services/dossier.companion.service.js +180 -28
  276. package/dist/esm/meta-workflows/services/dossier.companion.service.js.map +1 -1
  277. package/dist/esm/meta-workflows/services/foundation-executor.companion.service.d.ts +2 -3
  278. package/dist/esm/meta-workflows/services/foundation-executor.companion.service.d.ts.map +1 -1
  279. package/dist/esm/meta-workflows/services/foundation-executor.companion.service.js +2 -8
  280. package/dist/esm/meta-workflows/services/foundation-executor.companion.service.js.map +1 -1
  281. package/dist/esm/meta-workflows/services/interview-answer-proposal.companion.d.ts +67 -0
  282. package/dist/esm/meta-workflows/services/interview-answer-proposal.companion.d.ts.map +1 -0
  283. package/dist/esm/meta-workflows/services/interview-answer-proposal.companion.js +64 -0
  284. package/dist/esm/meta-workflows/services/interview-answer-proposal.companion.js.map +1 -0
  285. package/dist/esm/meta-workflows/services/playbook-instance.companion.service.d.ts.map +1 -1
  286. package/dist/esm/meta-workflows/services/playbook-instance.companion.service.js +11 -3
  287. package/dist/esm/meta-workflows/services/playbook-instance.companion.service.js.map +1 -1
  288. package/dist/esm/meta-workflows/services/playbook-run-write-register.companion.service.d.ts +92 -4
  289. package/dist/esm/meta-workflows/services/playbook-run-write-register.companion.service.d.ts.map +1 -1
  290. package/dist/esm/meta-workflows/services/playbook-run-write-register.companion.service.js +328 -7
  291. package/dist/esm/meta-workflows/services/playbook-run-write-register.companion.service.js.map +1 -1
  292. package/dist/esm/meta-workflows/services/playbook-run.companion.service.d.ts +105 -6
  293. package/dist/esm/meta-workflows/services/playbook-run.companion.service.d.ts.map +1 -1
  294. package/dist/esm/meta-workflows/services/playbook-run.companion.service.js +309 -39
  295. package/dist/esm/meta-workflows/services/playbook-run.companion.service.js.map +1 -1
  296. package/dist/esm/meta-workflows/services/playbook-spend-meter.companion.service.d.ts +62 -1
  297. package/dist/esm/meta-workflows/services/playbook-spend-meter.companion.service.d.ts.map +1 -1
  298. package/dist/esm/meta-workflows/services/playbook-spend-meter.companion.service.js +152 -2
  299. package/dist/esm/meta-workflows/services/playbook-spend-meter.companion.service.js.map +1 -1
  300. package/package.json +22 -18
  301. package/dist/esm/.tsbuildinfo +0 -1
  302. package/dist/esm/__tests__/asset-noop.d.ts +0 -3
  303. package/dist/esm/__tests__/asset-noop.d.ts.map +0 -1
  304. package/dist/esm/__tests__/asset-noop.js +0 -2
  305. package/dist/esm/__tests__/asset-noop.js.map +0 -1
  306. package/dist/esm/__tests__/chdir-dogfood-app.setup.d.ts +0 -2
  307. package/dist/esm/__tests__/chdir-dogfood-app.setup.d.ts.map +0 -1
  308. package/dist/esm/__tests__/chdir-dogfood-app.setup.js +0 -44
  309. package/dist/esm/__tests__/chdir-dogfood-app.setup.js.map +0 -1
  310. package/dist/esm/__tests__/internal-test-view.d.ts +0 -39
  311. package/dist/esm/__tests__/internal-test-view.d.ts.map +0 -1
  312. package/dist/esm/__tests__/internal-test-view.js +0 -2
  313. package/dist/esm/__tests__/internal-test-view.js.map +0 -1
  314. package/dist/esm/claude-cli/services/__tests__/support/in-memory-coding-actor-plane.d.ts +0 -50
  315. package/dist/esm/claude-cli/services/__tests__/support/in-memory-coding-actor-plane.d.ts.map +0 -1
  316. package/dist/esm/claude-cli/services/__tests__/support/in-memory-coding-actor-plane.js +0 -157
  317. package/dist/esm/claude-cli/services/__tests__/support/in-memory-coding-actor-plane.js.map +0 -1
  318. package/dist/esm/meta-workflows/services/__tests__/application-build-task-coding.companion.test-fixtures.d.ts +0 -8
  319. package/dist/esm/meta-workflows/services/__tests__/application-build-task-coding.companion.test-fixtures.d.ts.map +0 -1
  320. package/dist/esm/meta-workflows/services/__tests__/application-build-task-coding.companion.test-fixtures.js +0 -43
  321. package/dist/esm/meta-workflows/services/__tests__/application-build-task-coding.companion.test-fixtures.js.map +0 -1
  322. package/dist/esm/meta-workflows/services/__tests__/support/in-memory-actor-plane.d.ts +0 -79
  323. package/dist/esm/meta-workflows/services/__tests__/support/in-memory-actor-plane.d.ts.map +0 -1
  324. package/dist/esm/meta-workflows/services/__tests__/support/in-memory-actor-plane.js +0 -193
  325. package/dist/esm/meta-workflows/services/__tests__/support/in-memory-actor-plane.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"service-types.js","sourceRoot":"","sources":["../../../../../../src/core/inject/models/service-types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,gBAAgB,EAAE,MAAM,CAAC,GAAG,CAAC,4BAA4B,CAAC;IAC1D,8FAA8F;IAC9F,kBAAkB,EAAE,MAAM,CAAC,GAAG,CAAC,8BAA8B,CAAC;IAC9D,yBAAyB,EAAE,MAAM,CAAC,GAAG,CAAC,qCAAqC,CAAC;IAC5E,mFAAmF;IACnF,oCAAoC,EAAE,MAAM,CAAC,GAAG,CAAC,gDAAgD,CAAC;IAClG,kCAAkC,EAAE,MAAM,CAAC,GAAG,CAAC,8CAA8C,CAAC;IAC9F,qFAAqF;IACrF,+BAA+B,EAAE,MAAM,CAAC,GAAG,CAAC,2CAA2C,CAAC;IACxF,0BAA0B,EAAE,MAAM,CAAC,GAAG,CAAC,sCAAsC,CAAC;IAC9E,+BAA+B,EAAE,MAAM,CAAC,GAAG,CAAC,2CAA2C,CAAC;IACxF,8DAA8D;IAC9D,yBAAyB,EAAE,MAAM,CAAC,GAAG,CAAC,qCAAqC,CAAC;IAC5E,kGAAkG;IAClG,cAAc,EAAE,MAAM,CAAC,GAAG,CAAC,0BAA0B,CAAC;IACtD,qGAAqG;IACrG,uBAAuB,EAAE,MAAM,CAAC,GAAG,CAAC,mCAAmC,CAAC;IACxE,8EAA8E;IAC9E,yBAAyB,EAAE,MAAM,CAAC,GAAG,CAAC,qCAAqC,CAAC;IAC5E,0GAA0G;IAC1G,6BAA6B,EAAE,MAAM,CAAC,GAAG,CAAC,yCAAyC,CAAC;IACpF,oIAAoI;IACpI,2BAA2B,EAAE,MAAM,CAAC,GAAG,CAAC,uCAAuC,CAAC;IAChF,qIAAqI;IACrI,8BAA8B,EAAE,MAAM,CAAC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AM,CAAC,GAAG,CAAC,gCAAgC,CAAC;IAClE,oCAAoC,EAAE,MAAM,CAAC,GAAG,CAAC,gDAAgD,CAAC;IAClG,mCAAmC,EAAE,MAAM,CAAC,GAAG,CAAC,+CAA+C,CAAC;IAChG,iCAAiC,EAAE,MAAM,CAAC,GAAG,CAAC,6CAA6C,CAAC;IAC5F,oCAAoC,EAAE,MAAM,CAAC,GAAG,CAAC,gDAAgD,CAAC;IAClG,2BAA2B,EAAE,MAAM,CAAC,GAAG,CAAC,uCAAuC,CAAC;IAChF,iBAAiB,EAAE,MAAM,CAAC,GAAG,CAAC,6BAA6B,CAAC;IAC5D,mBAAmB,EAAE,MAAM,CAAC,GAAG,CAAC,+BAA+B,CAAC;IAEhE,cAAc;IACd,mBAAmB,EAAE,MAAM,CAAC,GAAG,CAAC,sBAAsB,CAAC;CAC/C,CAAC","sourcesContent":["/**\n * Dev Companion Service Types for Dependency Injection\n */\n\nexport const COMPANION_SERVICE_TYPES = {\n CompanionContext: Symbol.for(\"Companion.CompanionContext\"),\n /** Runs one compiled Framework Knowledge playbook: model generation → specification files. */\n PlaybookRunService: Symbol.for(\"Companion.PlaybookRunService\"),\n FoundationExecutorService: Symbol.for(\"Companion.FoundationExecutorService\"),\n /** Derives and lands which composition scenarios the application needs (#1491). */\n CapabilityCompositionExecutorService: Symbol.for(\"Companion.CapabilityCompositionExecutorService\"),\n ApplicationMaturityExecutorService: Symbol.for(\"Companion.ApplicationMaturityExecutorService\"),\n /** Selects the next ready build-plan task and composes its coding-agent dispatch. */\n ApplicationBuildDispatchService: Symbol.for(\"Companion.ApplicationBuildDispatchService\"),\n BuildGenerationStepService: Symbol.for(\"Companion.BuildGenerationStepService\"),\n PlaybookRunWriteRegisterService: Symbol.for(\"Companion.PlaybookRunWriteRegisterService\"),\n /** Read-only browser over the companion traceability tree. */\n ExecutionTraceReadService: Symbol.for(\"Companion.ExecutionTraceReadService\"),\n /** The dossier: the creator's interview answers (`creator-inputs`), read and recorded (#1454). */\n DossierService: Symbol.for(\"Companion.DossierService\"),\n /** Opens playbook instances: the activation record's one writer, committed at write time (#1609). */\n PlaybookInstanceService: Symbol.for(\"Companion.PlaybookInstanceService\"),\n /** Appends a task the creator asked for to the build plan (#1454, Step 7). */\n BuildPlanAuthoringService: Symbol.for(\"Companion.BuildPlanAuthoringService\"),\n /** Which paths each CODING run changed, attributed and hashed — what `accept` commits (#1454, Step 7). */\n CodingRunWriteRegisterService: Symbol.for(\"Companion.CodingRunWriteRegisterService\"),\n /** Acceptance as a commit: the companion's one WRITE-shaped git carve-out, pathspec-bounded to a run's register (#1454, Step 7). */\n AcceptedChangeCommitService: Symbol.for(\"Companion.AcceptedChangeCommitService\"),\n /** In-process creation-plane projections (playbook eligibility, build-plan board, write records, traces) + the eligibility cache. */\n CreationPlaneProjectionService: Symbol.for(\"Companion.CreationPlaneProjectionService\"),\n CompanionRuntimeConfig: Symbol.for(\"Companion.CompanionRuntimeConfig\"),\n\n // Shared companion-managed lock file (wildo-saas.lock.json)\n WildoSaasLockService: Symbol.for(\"Companion.WildoSaasLockService\"),\n\n // i18n labelling pipeline (planner / spec loader / orchestrators)\n LabellingPlannerService: Symbol.for(\"Companion.LabellingPlannerService\"),\n LabellingSpecContextLoader: Symbol.for(\"Companion.LabellingSpecContextLoader\"),\n LabellizeOrchestratorService: Symbol.for(\"Companion.LabellizeOrchestratorService\"),\n TranslateOrchestratorService: Symbol.for(\"Companion.TranslateOrchestratorService\"),\n /** Plans the translate pipeline's email lane — one unit per email template (#1908). */\n EmailTemplateLabellingUnitsService: Symbol.for(\"Companion.EmailTemplateLabellingUnitsService\"),\n ComponentLabelsBootstrapService: Symbol.for(\"Companion.ComponentLabelsBootstrapService\"),\n\n // AI services\n\n // Email template service\n EmailTemplateService: Symbol.for(\"Companion.EmailTemplateService\"),\n EmailSpecContextLoader: Symbol.for(\"Companion.EmailSpecContextLoader\"),\n\n // Market generation service (Phase 4.2)\n MarketGenerationService: Symbol.for(\"Companion.MarketGenerationService\"),\n\n // Logo generation service (brand/logo step). Companion-owned orchestrator\n // of the IMAGE-modality `brand.logo.generation.agent`.\n LogoGenerationService: Symbol.for(\"Companion.LogoGenerationService\"),\n\n // Logo DELIBERATION (agentic deliberation system, Step 4): the art-director\n // authors the creative brief, one candidate generates per direction, the\n // expert panel deliberates (craft + coherence + strategy lenses), and the\n // winner is staged as the single-candidate manifest the accept step promotes.\n LogoDeliberationService: Symbol.for(\"Companion.LogoDeliberationService\"),\n\n // Brand accept/promote service (brand/logo ACCEPT step). Companion-owned:\n // runs the `brand.logo.judge.agent` review point + promotes an accepted\n // staged candidate into the specification SSOT (assets/ + resolved-assets.generated.ts).\n BrandAcceptService: Symbol.for(\"Companion.BrandAcceptService\"),\n\n // Expert-persona derive→accept lifecycle (agentic deliberation system).\n // Companion-owned: derives app-specific persona charters from the framework\n // role templates + the app's spec artifacts (staged proposal), and promotes\n // accepted proposals into `specifications/src/personas/` (the committed SSOT).\n ExpertPersonaService: Symbol.for(\"Companion.ExpertPersonaService\"),\n\n // Deliberation composer (agentic deliberation system, Step 3): composes\n // charter-built expert panels into engine deliberations and persists the\n // returned DeliberationRecord to companion staging.\n DeliberationService: Symbol.for(\"Companion.DeliberationService\"),\n StructuredDeliberationService: Symbol.for(\"Companion.StructuredDeliberationService\"),\n\n // Direct Claude-CLI invocation from the companion (lower-level than\n // the agents path used by `MarketGenerationService`). Pulls the\n // `kind: 'cli-runtime'` runtime contract for the configured provider\n // off `BackendProviderRegistryBackendService` and spawns the binary\n // `anthropic` provider (in `wildo.saas.config.ts`) is what makes the\n // contract reachable from this process.\n\n // Coding-agent dispatch lane (meta-workflows Step 4 / L2).\n // GitChangeSetService = READ-ONLY git observation (DD-8 carve-out, P-19);\n // CodingAgentDispatchService = async task-backed CLI runs (P-16..P-21);\n // AuthFloorService = loopback assertion + companion.token middleware (P-29).\n GitChangeSetService: Symbol.for(\"Companion.GitChangeSetService\"),\n CodingAgentDispatchService: Symbol.for(\"Companion.CodingAgentDispatchService\"),\n // ResearchAgentDispatchService = the READ-ONLY sibling. Same ACP transport, no lock and no change\n // set: a run that cannot mutate has nothing to attribute, which is also what lets several run at once.\n ResearchAgentDispatchService: Symbol.for(\"Companion.ResearchAgentDispatchService\"),\n // PlaybookSpendMeter = what the playbook lane's model calls reported, per run / iteration / child\n // (#1507). A report, never a ceiling: it listens at the engine's provider-call recorder.\n PlaybookSpendMeter: Symbol.for(\"Companion.PlaybookSpendMeter\"),\n AuthFloorService: Symbol.for(\"Companion.AuthFloorService\"),\n\n // Journey transition-control lane. The legacy runner/registry/choreographer/\n // snapshot services were deleted at the first-activation hard cut; the\n // controller retains only bootstrap-scope intake and the route-bound\n // transition authority/commit protocol.\n\n // Private assessment-episode vertical (flexible intelligence). One\n // composition root owns the whole private graph — working definition, current\n // input, context composition, retained working evaluator, admission,\n // filesystem checkpoint store, generic-loop host with its application\n // adapters, local operator attestation and the sanitized public-v2 membrane.\n // The public-v2 controller is its only HTTP surface and is mounted in the\n // READY posture only.\n\n // Report-only new-contract assessment lane. These services project only the exact\n // current-process v2 registry and assess caller-supplied candidate bytes;\n // they have no route, startup, Journey or legacy-runner effect.\n\n // Application-creation workbench runtime/static delivery. These tokens own\n // only package distribution and transport; they carry no application\n // authentication or semantic decision authority.\n\n // Application execution-continuity integration. Portable records and durable\n // mechanics remain engine-owned; these tokens expose only the narrow local\n // startup, family-binding and physical Task adapter boundaries.\n\n // Technical documentation orchestrator (saas-technical-doc.md Step 3)\n TechnicalDocumentationEnvironmentClock: Symbol.for(\"Companion.TechnicalDocumentationEnvironmentClock\"),\n TechnicalDocumentationEnvironmentIdentityService: Symbol.for(\"Companion.TechnicalDocumentationEnvironmentIdentityService\"),\n TechnicalDocumentationApplicationDerivationService: Symbol.for(\"Companion.TechnicalDocumentationApplicationDerivationService\"),\n TechnicalDocService: Symbol.for(\"Companion.TechnicalDocService\"),\n\n // Companion introspection\n IntrospectionService: Symbol.for(\"Companion.IntrospectionService\"),\n IntrospectionBehaviorRegistryService: Symbol.for(\"Companion.IntrospectionBehaviorRegistryService\"),\n IntrospectionDerivationStateService: Symbol.for(\"Companion.IntrospectionDerivationStateService\"),\n IntrospectionSourceWatcherService: Symbol.for(\"Companion.IntrospectionSourceWatcherService\"),\n IntrospectionResourceNotifierService: Symbol.for(\"Companion.IntrospectionResourceNotifierService\"),\n TranslationPlacementService: Symbol.for(\"Companion.TranslationPlacementService\"),\n ExecutionsService: Symbol.for(\"Companion.ExecutionsService\"),\n TraceabilityService: Symbol.for(\"Companion.TraceabilityService\"),\n\n // Controllers\n CompanionController: Symbol.for(\"Companion.Controller\"),\n} as const;\n\nexport type CompanionServiceType = (typeof COMPANION_SERVICE_TYPES)[keyof typeof COMPANION_SERVICE_TYPES];\n"]}
1
+ {"version":3,"file":"service-types.js","sourceRoot":"","sources":["../../../../../../src/core/inject/models/service-types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,gBAAgB,EAAE,MAAM,CAAC,GAAG,CAAC,4BAA4B,CAAC;IAC1D,8FAA8F;IAC9F,kBAAkB,EAAE,MAAM,CAAC,GAAG,CAAC,8BAA8B,CAAC;IAC9D,yBAAyB,EAAE,MAAM,CAAC,GAAG,CAAC,qCAAqC,CAAC;IAC5E,mFAAmF;IACnF,oCAAoC,EAAE,MAAM,CAAC,GAAG,CAAC,gDAAgD,CAAC;IAClG,kCAAkC,EAAE,MAAM,CAAC,GAAG,CAAC,8CAA8C,CAAC;IAC9F,qFAAqF;IACrF,+BAA+B,EAAE,MAAM,CAAC,GAAG,CAAC,2CAA2C,CAAC;IACxF,0BAA0B,EAAE,MAAM,CAAC,GAAG,CAAC,sCAAsC,CAAC;IAC9E,+BAA+B,EAAE,MAAM,CAAC,GAAG,CAAC,2CAA2C,CAAC;IACxF,8DAA8D;IAC9D,yBAAyB,EAAE,MAAM,CAAC,GAAG,CAAC,qCAAqC,CAAC;IAC5E,kGAAkG;IAClG,cAAc,EAAE,MAAM,CA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IACnE,8EAA8E;IAC9E,qEAAqE;IACrE,sEAAsE;IACtE,6EAA6E;IAC7E,0EAA0E;IAC1E,sBAAsB;IAEtB,kFAAkF;IAClF,0EAA0E;IAC1E,gEAAgE;IAEhE,2EAA2E;IAC3E,qEAAqE;IACrE,iDAAiD;IAEjD,6EAA6E;IAC7E,2EAA2E;IAC3E,gEAAgE;IAEhE,sEAAsE;IACtE,sCAAsC,EAAE,MAAM,CAAC,GAAG,CAAC,kDAAkD,CAAC;IACtG,gDAAgD,EAAE,MAAM,CAAC,GAAG,CAAC,4DAA4D,CAAC;IAC1H,kDAAkD,EAAE,MAAM,CAAC,GAAG,CAAC,8DAA8D,CAAC;IAC9H,mBAAmB,EAAE,MAAM,CAAC,GAAG,CAAC,+BAA+B,CAAC;IAEhE,0BAA0B;IAC1B,oBAAoB,EAAE,MAAM,CAAC,GAAG,CAAC,gCAAgC,CAAC;IAClE,oCAAoC,EAAE,MAAM,CAAC,GAAG,CAAC,gDAAgD,CAAC;IAClG,mCAAmC,EAAE,MAAM,CAAC,GAAG,CAAC,+CAA+C,CAAC;IAChG,iCAAiC,EAAE,MAAM,CAAC,GAAG,CAAC,6CAA6C,CAAC;IAC5F,oCAAoC,EAAE,MAAM,CAAC,GAAG,CAAC,gDAAgD,CAAC;IAClG,2BAA2B,EAAE,MAAM,CAAC,GAAG,CAAC,uCAAuC,CAAC;IAChF,iBAAiB,EAAE,MAAM,CAAC,GAAG,CAAC,6BAA6B,CAAC;IAC5D,mBAAmB,EAAE,MAAM,CAAC,GAAG,CAAC,+BAA+B,CAAC;IAEhE,cAAc;IACd,mBAAmB,EAAE,MAAM,CAAC,GAAG,CAAC,sBAAsB,CAAC;CAC/C,CAAC","sourcesContent":["/**\n * Dev Companion Service Types for Dependency Injection\n */\n\nexport const COMPANION_SERVICE_TYPES = {\n CompanionContext: Symbol.for(\"Companion.CompanionContext\"),\n /** Runs one compiled Framework Knowledge playbook: model generation → specification files. */\n PlaybookRunService: Symbol.for(\"Companion.PlaybookRunService\"),\n FoundationExecutorService: Symbol.for(\"Companion.FoundationExecutorService\"),\n /** Derives and lands which composition scenarios the application needs (#1491). */\n CapabilityCompositionExecutorService: Symbol.for(\"Companion.CapabilityCompositionExecutorService\"),\n ApplicationMaturityExecutorService: Symbol.for(\"Companion.ApplicationMaturityExecutorService\"),\n /** Selects the next ready build-plan task and composes its coding-agent dispatch. */\n ApplicationBuildDispatchService: Symbol.for(\"Companion.ApplicationBuildDispatchService\"),\n BuildGenerationStepService: Symbol.for(\"Companion.BuildGenerationStepService\"),\n PlaybookRunWriteRegisterService: Symbol.for(\"Companion.PlaybookRunWriteRegisterService\"),\n /** Read-only browser over the companion traceability tree. */\n ExecutionTraceReadService: Symbol.for(\"Companion.ExecutionTraceReadService\"),\n /** The dossier: the creator's interview answers (`creator-inputs`), read and recorded (#1454). */\n DossierService: Symbol.for(\"Companion.DossierService\"),\n /** Opens playbook instances: the activation record's one writer, committed at write time (#1609). */\n PlaybookInstanceService: Symbol.for(\"Companion.PlaybookInstanceService\"),\n /** Appends a task the creator asked for to the build plan (#1454, Step 7). */\n BuildPlanAuthoringService: Symbol.for(\"Companion.BuildPlanAuthoringService\"),\n /** Which paths each CODING run changed, attributed and hashed — what `accept` commits (#1454, Step 7). */\n CodingRunWriteRegisterService: Symbol.for(\"Companion.CodingRunWriteRegisterService\"),\n /** The creation run's interventions, derived from the registers, git and the run rows; keeps restarts and stated reasons (#2231). */\n CreationInterventionLedgerService: Symbol.for(\"Companion.CreationInterventionLedgerService\"),\n /** The creation run report: interventions per lane, spend per run, the independence score (#2231). */\n CreationRunReportService: Symbol.for(\"Companion.CreationRunReportService\"),\n /** Acceptance as a commit: the companion's one WRITE-shaped git carve-out, pathspec-bounded to a run's register (#1454, Step 7). */\n AcceptedChangeCommitService: Symbol.for(\"Companion.AcceptedChangeCommitService\"),\n /** In-process creation-plane projections (playbook eligibility, build-plan board, write records, traces) + the eligibility cache. */\n CreationPlaneProjectionService: Symbol.for(\"Companion.CreationPlaneProjectionService\"),\n CompanionRuntimeConfig: Symbol.for(\"Companion.CompanionRuntimeConfig\"),\n\n // Shared companion-managed lock file (wildo-saas.lock.json)\n WildoSaasLockService: Symbol.for(\"Companion.WildoSaasLockService\"),\n\n // i18n labelling pipeline (planner / spec loader / orchestrators)\n LabellingPlannerService: Symbol.for(\"Companion.LabellingPlannerService\"),\n LabellingSpecContextLoader: Symbol.for(\"Companion.LabellingSpecContextLoader\"),\n LabellizeOrchestratorService: Symbol.for(\"Companion.LabellizeOrchestratorService\"),\n TranslateOrchestratorService: Symbol.for(\"Companion.TranslateOrchestratorService\"),\n /** Plans the translate pipeline's email lane — one unit per email template (#1908). */\n EmailTemplateLabellingUnitsService: Symbol.for(\"Companion.EmailTemplateLabellingUnitsService\"),\n ComponentLabelsBootstrapService: Symbol.for(\"Companion.ComponentLabelsBootstrapService\"),\n\n // AI services\n\n // Email template service\n EmailTemplateService: Symbol.for(\"Companion.EmailTemplateService\"),\n EmailSpecContextLoader: Symbol.for(\"Companion.EmailSpecContextLoader\"),\n\n // Market generation service (Phase 4.2)\n MarketGenerationService: Symbol.for(\"Companion.MarketGenerationService\"),\n\n // Logo generation service (brand/logo step). Companion-owned orchestrator\n // of the IMAGE-modality `brand.logo.generation.agent`.\n LogoGenerationService: Symbol.for(\"Companion.LogoGenerationService\"),\n\n // Logo DELIBERATION (agentic deliberation system, Step 4): the art-director\n // authors the creative brief, one candidate generates per direction, the\n // expert panel deliberates (craft + coherence + strategy lenses), and the\n // winner is staged as the single-candidate manifest the accept step promotes.\n LogoDeliberationService: Symbol.for(\"Companion.LogoDeliberationService\"),\n\n // Brand accept/promote service (brand/logo ACCEPT step). Companion-owned:\n // runs the `brand.logo.judge.agent` review point + promotes an accepted\n // staged candidate into the specification SSOT (assets/ + resolved-assets.generated.ts).\n BrandAcceptService: Symbol.for(\"Companion.BrandAcceptService\"),\n\n // Expert-persona derive→accept lifecycle (agentic deliberation system).\n // Companion-owned: derives app-specific persona charters from the framework\n // role templates + the app's spec artifacts (staged proposal), and promotes\n // accepted proposals into `specifications/src/personas/` (the committed SSOT).\n ExpertPersonaService: Symbol.for(\"Companion.ExpertPersonaService\"),\n\n // Deliberation composer (agentic deliberation system, Step 3): composes\n // charter-built expert panels into engine deliberations and persists the\n // returned DeliberationRecord to companion staging.\n DeliberationService: Symbol.for(\"Companion.DeliberationService\"),\n StructuredDeliberationService: Symbol.for(\"Companion.StructuredDeliberationService\"),\n\n // Direct Claude-CLI invocation from the companion (lower-level than\n // the agents path used by `MarketGenerationService`). Pulls the\n // `kind: 'cli-runtime'` runtime contract for the configured provider\n // off `BackendProviderRegistryBackendService` and spawns the binary\n // `anthropic` provider (in `wildo.saas.config.ts`) is what makes the\n // contract reachable from this process.\n\n // Coding-agent dispatch lane (meta-workflows Step 4 / L2).\n // GitChangeSetService = READ-ONLY git observation (DD-8 carve-out, P-19);\n // CodingAgentDispatchService = async task-backed CLI runs (P-16..P-21);\n // AuthFloorService = loopback assertion + companion.token middleware (P-29).\n GitChangeSetService: Symbol.for(\"Companion.GitChangeSetService\"),\n CodingAgentDispatchService: Symbol.for(\"Companion.CodingAgentDispatchService\"),\n // ResearchAgentDispatchService = the READ-ONLY sibling. Same ACP transport, no lock and no change\n // set: a run that cannot mutate has nothing to attribute, which is also what lets several run at once.\n ResearchAgentDispatchService: Symbol.for(\"Companion.ResearchAgentDispatchService\"),\n // PlaybookSpendMeter = what the playbook lane's model calls reported, per run / iteration / child\n // (#1507). A report, never a ceiling: it listens at the engine's provider-call recorder.\n PlaybookSpendMeter: Symbol.for(\"Companion.PlaybookSpendMeter\"),\n AuthFloorService: Symbol.for(\"Companion.AuthFloorService\"),\n\n // Journey transition-control lane. The legacy runner/registry/choreographer/\n // snapshot services were deleted at the first-activation hard cut; the\n // controller retains only bootstrap-scope intake and the route-bound\n // transition authority/commit protocol.\n\n // Private assessment-episode vertical (flexible intelligence). One\n // composition root owns the whole private graph — working definition, current\n // input, context composition, retained working evaluator, admission,\n // filesystem checkpoint store, generic-loop host with its application\n // adapters, local operator attestation and the sanitized public-v2 membrane.\n // The public-v2 controller is its only HTTP surface and is mounted in the\n // READY posture only.\n\n // Report-only new-contract assessment lane. These services project only the exact\n // current-process v2 registry and assess caller-supplied candidate bytes;\n // they have no route, startup, Journey or legacy-runner effect.\n\n // Application-creation workbench runtime/static delivery. These tokens own\n // only package distribution and transport; they carry no application\n // authentication or semantic decision authority.\n\n // Application execution-continuity integration. Portable records and durable\n // mechanics remain engine-owned; these tokens expose only the narrow local\n // startup, family-binding and physical Task adapter boundaries.\n\n // Technical documentation orchestrator (saas-technical-doc.md Step 3)\n TechnicalDocumentationEnvironmentClock: Symbol.for(\"Companion.TechnicalDocumentationEnvironmentClock\"),\n TechnicalDocumentationEnvironmentIdentityService: Symbol.for(\"Companion.TechnicalDocumentationEnvironmentIdentityService\"),\n TechnicalDocumentationApplicationDerivationService: Symbol.for(\"Companion.TechnicalDocumentationApplicationDerivationService\"),\n TechnicalDocService: Symbol.for(\"Companion.TechnicalDocService\"),\n\n // Companion introspection\n IntrospectionService: Symbol.for(\"Companion.IntrospectionService\"),\n IntrospectionBehaviorRegistryService: Symbol.for(\"Companion.IntrospectionBehaviorRegistryService\"),\n IntrospectionDerivationStateService: Symbol.for(\"Companion.IntrospectionDerivationStateService\"),\n IntrospectionSourceWatcherService: Symbol.for(\"Companion.IntrospectionSourceWatcherService\"),\n IntrospectionResourceNotifierService: Symbol.for(\"Companion.IntrospectionResourceNotifierService\"),\n TranslationPlacementService: Symbol.for(\"Companion.TranslationPlacementService\"),\n ExecutionsService: Symbol.for(\"Companion.ExecutionsService\"),\n TraceabilityService: Symbol.for(\"Companion.TraceabilityService\"),\n\n // Controllers\n CompanionController: Symbol.for(\"Companion.Controller\"),\n} as const;\n\nexport type CompanionServiceType = (typeof COMPANION_SERVICE_TYPES)[keyof typeof COMPANION_SERVICE_TYPES];\n"]}
@@ -1,4 +1,6 @@
1
1
  import { CreationConsoleQuestionKind, WorkbenchCreationPlaneBehavior, type CreationConsole_AnswerOutcome, type CreationConsole_AnswerRequest, type CreationConsole_Question } from '@wildo-ai/platform-core-shared';
2
+ import { type InterviewQuestionDisposition } from './creation-console-projection.companion';
3
+ import { ApplicationCreatorInputAnswerStanding } from '@wildo-ai/saas-specifications/application-creation';
2
4
  import { MetaWorkflow_ClarificationAction } from '@wildo-ai/saas-models/meta-workflows';
3
5
  /**
4
6
  * The CREATION CONSOLE's answer door — one entry for every question the companion asks, routed to the
@@ -55,10 +57,17 @@ export interface CreationConsolePorts {
55
57
  }>;
56
58
  readonly recordInterviewAnswer: (input: {
57
59
  readonly playbookRef: string;
60
+ /** The opened INSTANCE the question is asked for (#1609); absent for the step itself. */
61
+ readonly instanceKey?: string;
58
62
  readonly questionRef: string;
59
63
  readonly value: string;
60
64
  readonly answeredByRef: string;
65
+ /** ASSUMED when the person let a proposed answer stand (#2129). */
66
+ readonly standing?: ApplicationCreatorInputAnswerStanding;
67
+ readonly assumptionRationale?: string;
61
68
  }) => Promise<unknown>;
69
+ /** Each interview question's depth and whether it may be proposed (#2129), for the queue to carry. */
70
+ readonly readInterviewDispositions?: () => Promise<ReadonlyMap<string, InterviewQuestionDisposition>>;
62
71
  /** The boards move after an answer; the next read must not answer "as of before". */
63
72
  readonly invalidate: () => void;
64
73
  }
@@ -66,7 +75,12 @@ export interface CreationConsolePorts {
66
75
  * The question queue, derived from the rows of the kinds asked for (every kind by default). Deriving
67
76
  * only what an answer needs keeps the answer door from paying for boards it never reads.
68
77
  */
69
- export declare function readCreationConsoleQuestions(ports: Pick<CreationConsolePorts, 'deriveRows'>, kinds?: readonly CreationConsoleQuestionKind[]): Promise<CreationConsole_Question[]>;
78
+ export declare function readCreationConsoleQuestions(ports: Pick<CreationConsolePorts, 'deriveRows' | 'readInterviewDispositions'>, kinds?: readonly CreationConsoleQuestionKind[]): Promise<CreationConsole_Question[]>;
79
+ /**
80
+ * The interview answers that are ASSUMPTIONS (#2129), listed apart from the queue so nothing reads them as
81
+ * waiting. The answer door finds an item here too, so answering one records the person's own answer.
82
+ */
83
+ export declare function readCreationConsoleAssumptions(ports: Pick<CreationConsolePorts, 'deriveRows' | 'readInterviewDispositions'>): Promise<CreationConsole_Question[]>;
70
84
  /**
71
85
  * Apply one answer. Refusals the services raise (a validation of the answer's content, a run that
72
86
  * moved between this read and theirs) propagate UNTOUCHED, for the caller to translate the way it
@@ -1 +1 @@
1
- {"version":3,"file":"creation-console-answer.companion.d.ts","sourceRoot":"","sources":["../../../../../../src/core/introspection/resources/creation-console-answer.companion.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,2BAA2B,EAC3B,8BAA8B,EAE9B,KAAK,6BAA6B,EAClC,KAAK,6BAA6B,EAClC,KAAK,wBAAwB,EAK9B,MAAM,gCAAgC,CAAC;AAGxC,OAAO,EAAE,gCAAgC,EAAE,MAAM,sCAAsC,CAAC;AAExF;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,mGAAmG;AACnG,oBAAY,0BAA0B;IACpC,sDAAsD;IACtD,SAAS,cAAc;IACvB,wFAAwF;IACxF,WAAW,gBAAgB;IAC3B,6EAA6E;IAC7E,UAAU,eAAe;CAC1B;AAED,qBAAa,sBAAuB,SAAQ,KAAK;aACZ,OAAO,EAAE,0BAA0B;gBAAnC,OAAO,EAAE,0BAA0B,EAAE,OAAO,EAAE,MAAM;CAIxF;AAED,MAAM,WAAW,oBAAoB;IACnC,iFAAiF;IACjF,QAAQ,CAAC,UAAU,EAAE,CAAC,QAAQ,EAAE,8BAA8B,KAAK,OAAO,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC;IAC/G,QAAQ,CAAC,iBAAiB,EAAE,CAAC,KAAK,EAAE;QAClC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QACvB,QAAQ,CAAC,MAAM,EAAE,gCAAgC,CAAC;QAClD,QAAQ,CAAC,OAAO,CAAC,E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":"creation-console-answer.companion.d.ts","sourceRoot":"","sources":["../../../../../../src/core/introspection/resources/creation-console-answer.companion.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,2BAA2B,EAC3B,8BAA8B,EAE9B,KAAK,6BAA6B,EAClC,KAAK,6BAA6B,EAClC,KAAK,wBAAwB,EAK9B,MAAM,gCAAgC,CAAC;AAExC,OAAO,EAAkE,KAAK,4BAA4B,EAAE,MAAM,yCAAyC,CAAC;AAC5J,OAAO,EAAE,qCAAqC,EAAE,MAAM,oDAAoD,CAAC;AAC3G,OAAO,EAAE,gCAAgC,EAAE,MAAM,sCAAsC,CAAC;AAExF;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,mGAAmG;AACnG,oBAAY,0BAA0B;IACpC,sDAAsD;IACtD,SAAS,cAAc;IACvB,wFAAwF;IACxF,WAAW,gBAAgB;IAC3B,6EAA6E;IAC7E,UAAU,eAAe;CAC1B;AAED,qBAAa,sBAAuB,SAAQ,KAAK;aACZ,OAAO,EAAE,0BAA0B;gBAAnC,OAAO,EAAE,0BAA0B,EAAE,OAAO,EAAE,MAAM;CAIxF;AAED,MAAM,WAAW,oBAAoB;IACnC,iFAAiF;IACjF,QAAQ,CAAC,UAAU,EAAE,CAAC,QAAQ,EAAE,8BAA8B,KAAK,OAAO,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC;IAC/G,QAAQ,CAAC,iBAAiB,EAAE,CAAC,KAAK,EAAE;QAClC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QACvB,QAAQ,CAAC,MAAM,EAAE,gCAAgC,CAAC;QAClD,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS;YAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;YAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;YAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAA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,wBAAwB,EAAE,CAAC,CAWrC;AAED;;;GAGG;AACH,wBAAsB,8BAA8B,CAAC,KAAK,EAAE,IAAI,CAAC,oBAAoB,EAAE,YAAY,GAAG,2BAA2B,CAAC,GAAG,OAAO,CAAC,wBAAwB,EAAE,CAAC,CAIvK;AA2ED;;;;GAIG;AACH,wBAAsB,6BAA6B,CACjD,KAAK,EAAE,oBAAoB,EAC3B,OAAO,EAAE,6BAA6B,GACrC,OAAO,CAAC,6BAA6B,CAAC,CAoFxC"}
@@ -1,5 +1,6 @@
1
1
  import { CreationConsoleAnswerAction, CreationConsoleQuestionKind, WorkbenchCreationPlaneBehavior, parseCreationConsoleQuestionId, } from '@wildo-ai/platform-core-shared';
2
- import { buildCreationConsoleQuestions } from './creation-console-projection.companion.js';
2
+ import { buildCreationConsoleAssumptions, buildCreationConsoleQuestions } from './creation-console-projection.companion.js';
3
+ import { ApplicationCreatorInputAnswerStanding } from '@wildo-ai/saas-specifications/application-creation';
3
4
  import { MetaWorkflow_ClarificationAction } from '@wildo-ai/saas-models/meta-workflows';
4
5
  /**
5
6
  * The CREATION CONSOLE's answer door — one entry for every question the companion asks, routed to the
@@ -60,7 +61,17 @@ export async function readCreationConsoleQuestions(ports, kinds = Object.values(
60
61
  rowsOf(CreationConsoleQuestionKind.INTERVIEW),
61
62
  rowsOf(CreationConsoleQuestionKind.GOVERNANCE_FACT),
62
63
  ]);
63
- return buildCreationConsoleQuestions({ waiting, parked, dossier, governance });
64
+ const interviewDispositions = kinds.includes(CreationConsoleQuestionKind.INTERVIEW) ? await ports.readInterviewDispositions?.() : undefined;
65
+ return buildCreationConsoleQuestions({ waiting, parked, dossier, governance, ...(interviewDispositions ? { interviewDispositions } : {}) });
66
+ }
67
+ /**
68
+ * The interview answers that are ASSUMPTIONS (#2129), listed apart from the queue so nothing reads them as
69
+ * waiting. The answer door finds an item here too, so answering one records the person's own answer.
70
+ */
71
+ export async function readCreationConsoleAssumptions(ports) {
72
+ const dossier = (await ports.deriveRows(WorkbenchCreationPlaneBehavior.DOSSIER_ENTRIES));
73
+ const interviewDispositions = await ports.readInterviewDispositions?.();
74
+ return buildCreationConsoleAssumptions({ dossier, ...(interviewDispositions ? { interviewDispositions } : {}) });
64
75
  }
65
76
  function refuse(kind, message) {
66
77
  throw new CreationConsoleRefusal(kind, message);
@@ -109,6 +120,21 @@ function admit(question, request) {
109
120
  if (new Set(answers.map((answer) => answer.ref)).size !== answers.length) {
110
121
  refuse(CreationConsoleRefusalKind.MALFORMED, 'Each question is answered once per request.');
111
122
  }
123
+ /*
124
+ * An ASSUMED answer (#2129) exists only in the dossier: a run's clarification has `decline` for "decide it
125
+ * yourself", and a parked coding question is the agent's own. Elsewhere it is refused rather than dropped,
126
+ * because dropping it would record a proposal as the person's decision.
127
+ */
128
+ for (const answer of answers) {
129
+ if (answer.standing === undefined && answer.assumptionRationale === undefined)
130
+ continue;
131
+ if (question.kind !== CreationConsoleQuestionKind.INTERVIEW) {
132
+ refuse(CreationConsoleRefusalKind.MALFORMED, `Only an interview answer can be recorded as an assumption; "${question.questionId}" is a ${question.kind}.`);
133
+ }
134
+ if (answer.standing !== undefined && !Object.values(ApplicationCreatorInputAnswerStanding).includes(answer.standing)) {
135
+ refuse(CreationConsoleRefusalKind.MALFORMED, `"${answer.standing}" is not a standing; send one of ${Object.values(ApplicationCreatorInputAnswerStanding).join(', ')}.`);
136
+ }
137
+ }
112
138
  }
113
139
  const CLARIFICATION_ACTION_BY_CONSOLE_ACTION = {
114
140
  [CreationConsoleAnswerAction.ANSWER]: MetaWorkflow_ClarificationAction.ACCEPT,
@@ -127,7 +153,11 @@ export async function answerCreationConsoleQuestion(ports, request) {
127
153
  + `the kinds are ${Object.values(CreationConsoleQuestionKind).join(', ')}.`);
128
154
  }
129
155
  const question = (await readCreationConsoleQuestions(ports, [parsed.kind]))
130
- .find((candidate) => candidate.questionId === request.questionId);
156
+ .find((candidate) => candidate.questionId === request.questionId)
157
+ /* An assumption is not waiting, but it is answerable: revisiting it records the person's own answer (#2129). */
158
+ ?? (parsed.kind === CreationConsoleQuestionKind.INTERVIEW
159
+ ? (await readCreationConsoleAssumptions(ports)).find((candidate) => candidate.questionId === request.questionId)
160
+ : undefined);
131
161
  if (!question) {
132
162
  refuse(CreationConsoleRefusalKind.NOT_WAITING, `Nothing waits under "${request.questionId}" now — it was answered, cancelled or finished meanwhile. Read the queue again.`);
133
163
  }
@@ -178,11 +208,16 @@ export async function answerCreationConsoleQuestion(ports, request) {
178
208
  if (!answeredByRef) {
179
209
  refuse(CreationConsoleRefusalKind.MALFORMED, 'An interview answer records who gave it: send `answeredByRef` (`wildo` sends your git identity; an agent answering on its own sends its own ref).');
180
210
  }
211
+ const standing = answers[0].standing;
181
212
  return settle(await ports.recordInterviewAnswer({
182
213
  playbookRef: String(question.playbookRef),
214
+ /* The instance the question is asked for: without it an instance's answer landed on the step itself. */
215
+ ...(question.instanceKey !== null ? { instanceKey: question.instanceKey } : {}),
183
216
  questionRef: answers[0].ref,
184
217
  value: answers[0].value,
185
218
  answeredByRef,
219
+ ...(standing !== undefined ? { standing } : {}),
220
+ ...(answers[0].assumptionRationale !== undefined ? { assumptionRationale: answers[0].assumptionRationale } : {}),
186
221
  }));
187
222
  }
188
223
  case CreationConsoleQuestionKind.GOVERNANCE_FACT:
@@ -1 +1 @@
1
- {"version":3,"file":"creation-console-answer.companion.js","sourceRoot":"","sources":["../../../../../../src/core/introspection/resources/creation-console-answer.companion.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,2BAA2B,EAC3B,2BAA2B,EAC3B,8BAA8B,EAC9B,8BAA8B,GAQ/B,MAAM,gCAAgC,CAAC;AAExC,OAAO,EAAE,6BAA6B,EAAE,MAAM,yCAAyC,CAAC;AACxF,OAAO,EAAE,gCAAgC,EAAE,MAAM,sCAAsC,CAAC;AAExF;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,mGAAmG;AACnG,MAAM,CAAN,IAAY,0BAOX;AAPD,WAAY,0BAA0B;IACpC,sDAA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parseCreationConsoleQuestionId,\n type CreationConsole_AnswerOutcome,\n type CreationConsole_AnswerRequest,\n type CreationConsole_Question,\n type Workbench_DossierEntry,\n type Workbench_GovernanceQuestion,\n type Workbench_ParkedCodingQuestion,\n type Workbench_WaitingPlaybookRun,\n} from '@wildo-ai/platform-core-shared';\n\nimport { buildCreationConsoleQuestions } from './creation-console-projection.companion';\nimport { MetaWorkflow_ClarificationAction } from '@wildo-ai/saas-models/meta-workflows';\n\n/**\n * The CREATION CONSOLE's answer door — one entry for every question the companion asks, routed to the\n * SAME service the matching workbench operation calls:\n *\n * | kind | service | workbench operation it mirrors |\n * |---|---|---|\n * | clarification | `PlaybookRunCompanionService.resumePlaybookRun` | `workbenchPlaybooks.resume_run` |\n * | parked coding question | `CodingAgentDispatchCompanionService.respondToApplicationCodingTaskQuestion` / `cancelApplicationCodingTask` | `workbenchParkedCodingQuestions.answer` / `.cancel` |\n * | interview | `DossierCompanionService.recordAnswer` | `workbenchDossierEntries.answer` |\n *\n * The services are reached through PORTS so this module is a pure function of its inputs and can be\n * pinned without a container; the controller binds them.\n *\n * ## The item is resolved FRESH, and its revision must match\n *\n * The request names a question by the id the console read, and carries the REVISION it read (a\n * clarification's round, a parked run's suspension ref). The queue is re-derived here and the item\n * found by id; a revision that moved is refused as SUPERSEDED rather than applied — the hazard #1581\n * and #1584 closed on the workbench's doors, where an answer typed for one question landed on the\n * next one the run asked under the same id. The services check it again; this refusal is the one\n * that names the console's own terms.\n */\n\n/** Why an answer was refused before any service was reached — each maps to its own HTTP status. */\nexport enum CreationConsoleRefusalKind {\n /** The request cannot be applied as written — 400. */\n MALFORMED = 'malformed',\n /** Nothing waits under that id now: answered, cancelled or finished meanwhile — 409. */\n NOT_WAITING = 'not-waiting',\n /** The question waiting under that id is not the one that was read — 409. */\n SUPERSEDED = 'superseded',\n}\n\nexport class CreationConsoleRefusal extends Error {\n public constructor(public readonly refusal: CreationConsoleRefusalKind, message: string) {\n super(message);\n this.name = 'CreationConsoleRefusal';\n }\n}\n\nexport interface CreationConsolePorts {\n /** The creation plane's rows for one behavior, as the projection serves them. */\n readonly deriveRows: (behavior: WorkbenchCreationPlaneBehavior) => Promise<readonly Record<string, unknown>[]>;\n readonly resumePlaybookRun: (input: {\n readonly runId: string;\n readonly round: number;\n readonly action: MetaWorkflow_ClarificationAction;\n readonly answers?: readonly { readonly ref: string; readonly answer: string; readonly answeredByRef?: string }[];\n readonly answeredByRef?: string;\n }) => Promise<unknown>;\n readonly respondToParkedQuestion: (taskId: string, answer: string, suspensionRef: string, answeredByRef?: string) => Promise<unknown>;\n readonly cancelCodingRun: (taskId: string) => Promise<{ readonly cancelled: boolean }>;\n readonly recordInterviewAnswer: (input: {\n readonly playbookRef: string;\n readonly questionRef: string;\n readonly value: string;\n readonly answeredByRef: string;\n }) => Promise<unknown>;\n /** The boards move after an answer; the next read must not answer \"as of before\". */\n readonly invalidate: () => void;\n}\n\n/** The behavior each question kind is derived from — TOTAL, so a new kind is a compile error until placed. */\nconst SOURCE_BEHAVIOR_BY_KIND: Readonly<Record<CreationConsoleQuestionKind, WorkbenchCreationPlaneBehavior>> = {\n [CreationConsoleQuestionKind.CLARIFICATION]: WorkbenchCreationPlaneBehavior.WAITING_PLAYBOOK_RUNS,\n [CreationConsoleQuestionKind.PARKED_CODING_QUESTION]: WorkbenchCreationPlaneBehavior.PARKED_CODING_QUESTIONS,\n [CreationConsoleQuestionKind.INTERVIEW]: WorkbenchCreationPlaneBehavior.DOSSIER_ENTRIES,\n [CreationConsoleQuestionKind.GOVERNANCE_FACT]: WorkbenchCreationPlaneBehavior.GOVERNANCE_QUESTIONS,\n};\n\n/**\n * The question queue, derived from the rows of the kinds asked for (every kind by default). Deriving\n * only what an answer needs keeps the answer door from paying for boards it never reads.\n */\nexport async function readCreationConsoleQuestions(\n ports: Pick<CreationConsolePorts, 'deriveRows'>,\n kinds: readonly CreationConsoleQuestionKind[] = Object.values(CreationConsoleQuestionKind),\n): Promise<CreationConsole_Question[]> {\n const rowsOf = async <Row>(kind: CreationConsoleQuestionKind): Promise<readonly Row[]> =>\n kinds.includes(kind) ? (await ports.deriveRows(SOURCE_BEHAVIOR_BY_KIND[kind])) as unknown as readonly Row[] : [];\n const [waiting, parked, dossier, governance] = await Promise.all([\n rowsOf<Workbench_WaitingPlaybookRun>(CreationConsoleQuestionKind.CLARIFICATION),\n rowsOf<Workbench_ParkedCodingQuestion>(CreationConsoleQuestionKind.PARKED_CODING_QUESTION),\n rowsOf<Workbench_DossierEntry>(CreationConsoleQuestionKind.INTERVIEW),\n rowsOf<Workbench_GovernanceQuestion>(CreationConsoleQuestionKind.GOVERNANCE_FACT),\n ]);\n return buildCreationConsoleQuestions({ waiting, parked, dossier, governance });\n}\n\nfunction refuse(kind: CreationConsoleRefusalKind, message: string): never {\n throw new CreationConsoleRefusal(kind, message);\n}\n\n/** Check the request against the item as it stands now, before any service is reached. */\nfunction admit(question: CreationConsole_Question, request: CreationConsole_AnswerRequest): void {\n if (question.actions.length === 0) {\n refuse(CreationConsoleRefusalKind.MALFORMED, question.kind === CreationConsoleQuestionKind.GOVERNANCE_FACT\n ? `\"${question.questionId}\" is a governed-document fact. Facts are landed as a whole-document sitting that also names the `\n + 'governance scope and who decided, which the console does not carry — answer it in the workbench\\'s governance panel.'\n : question.routedToUserId\n ? `\"${question.questionId}\" was asked of the person who started its run, and only they may answer it. `\n + 'The console carries no signed-in person — answer it in the workbench, signed in as them.'\n : `\"${question.questionId}\" cannot be answered from the console.`);\n }\n if (!question.actions.includes(request.action)) {\n refuse(CreationConsoleRefusalKind.MALFORMED, `\"${question.questionId}\" admits ${question.actions.join(', ')} — not ${request.action}.`);\n }\n if (question.revision !== null) {\n if (!request.revision) {\n refuse(CreationConsoleRefusalKind.MALFORMED,\n `\"${question.questionId}\" carries a revision (${question.revision}); send the one you read, so an answer never lands on a later question.`);\n }\n if (request.revision !== question.revision) {\n refuse(CreationConsoleRefusalKind.SUPERSEDED,\n `\"${question.questionId}\" has moved on: it now waits on revision ${question.revision}, and this answer was written for ${request.revision}. `\n + 'Read the queue again and answer what it asks now.');\n }\n }\n const answers = request.answers ?? [];\n /*\n * A DECLINE may carry the answers the person DID give (#1658) — \"these I answered, decide the rest\" —\n * so they are checked like an answer's. A CANCEL withdraws the run and carries none.\n */\n if (request.action === CreationConsoleAnswerAction.CANCEL) {\n if (answers.length > 0) refuse(CreationConsoleRefusalKind.MALFORMED, '`cancel` carries no answers; send `answer` to answer, or `decline` with the answers you did give.');\n return;\n }\n if (request.action === CreationConsoleAnswerAction.ANSWER && answers.length === 0) {\n refuse(CreationConsoleRefusalKind.MALFORMED, '`answer` needs at least one `{ ref, value }`.');\n }\n const known = new Set(question.fields.map((field) => field.ref));\n const unknown = answers.filter((answer) => !known.has(answer.ref)).map((answer) => answer.ref);\n if (unknown.length > 0) {\n refuse(CreationConsoleRefusalKind.MALFORMED,\n `\"${question.questionId}\" asks ${[...known].map((ref) => `\"${ref}\"`).join(', ')} — not ${unknown.map((ref) => `\"${ref}\"`).join(', ')}.`);\n }\n if (new Set(answers.map((answer) => answer.ref)).size !== answers.length) {\n refuse(CreationConsoleRefusalKind.MALFORMED, 'Each question is answered once per request.');\n }\n}\n\nconst CLARIFICATION_ACTION_BY_CONSOLE_ACTION: Readonly<Record<CreationConsoleAnswerAction, MetaWorkflow_ClarificationAction>> = {\n [CreationConsoleAnswerAction.ANSWER]: MetaWorkflow_ClarificationAction.ACCEPT,\n [CreationConsoleAnswerAction.DECLINE]: MetaWorkflow_ClarificationAction.DECLINE,\n [CreationConsoleAnswerAction.CANCEL]: MetaWorkflow_ClarificationAction.CANCEL,\n};\n\n/**\n * Apply one answer. Refusals the services raise (a validation of the answer's content, a run that\n * moved between this read and theirs) propagate UNTOUCHED, for the caller to translate the way it\n * translates them on every other door.\n */\nexport async function answerCreationConsoleQuestion(\n ports: CreationConsolePorts,\n request: CreationConsole_AnswerRequest,\n): Promise<CreationConsole_AnswerOutcome> {\n const parsed = parseCreationConsoleQuestionId(request.questionId);\n if (!parsed) {\n refuse(CreationConsoleRefusalKind.MALFORMED,\n `\"${request.questionId}\" is not a question id. Ids look like \"<kind>:<row>\", as \\`wildo creation questions\\` prints them; `\n + `the kinds are ${Object.values(CreationConsoleQuestionKind).join(', ')}.`);\n }\n const question = (await readCreationConsoleQuestions(ports, [parsed.kind]))\n .find((candidate) => candidate.questionId === request.questionId);\n if (!question) {\n refuse(CreationConsoleRefusalKind.NOT_WAITING,\n `Nothing waits under \"${request.questionId}\" now — it was answered, cancelled or finished meanwhile. Read the queue again.`);\n }\n admit(question, request);\n\n const answers = request.answers ?? [];\n const settle = (outcome: unknown): CreationConsole_AnswerOutcome => ({\n questionId: question.questionId,\n kind: question.kind,\n action: request.action,\n outcome,\n });\n\n try {\n switch (question.kind) {\n case CreationConsoleQuestionKind.CLARIFICATION: {\n const waiting = (await ports.deriveRows(WorkbenchCreationPlaneBehavior.WAITING_PLAYBOOK_RUNS) as unknown as readonly Workbench_WaitingPlaybookRun[])\n .find((row) => row.workbenchWaitingPlaybookRunId === parsed.rowId);\n if (!waiting) refuse(CreationConsoleRefusalKind.NOT_WAITING, `The run behind \"${request.questionId}\" stopped waiting meanwhile.`);\n return settle(await ports.resumePlaybookRun({\n runId: waiting.runId,\n round: Number(question.revision),\n action: CLARIFICATION_ACTION_BY_CONSOLE_ACTION[request.action],\n /* Each answer keeps its own author, so a round an agent and the person answered together records both (#1658). */\n ...(answers.length > 0\n ? { answers: answers.map((answer) => ({ ref: answer.ref, answer: answer.value, ...(answer.answeredByRef ? { answeredByRef: answer.answeredByRef } : {}) })) }\n : {}),\n /* Who answered reaches the committed DECISIONS.md, for every kind, not only the dossier (#1658). */\n ...(request.answeredByRef ? { answeredByRef: request.answeredByRef } : {}),\n }));\n }\n case CreationConsoleQuestionKind.PARKED_CODING_QUESTION: {\n const parked = (await ports.deriveRows(WorkbenchCreationPlaneBehavior.PARKED_CODING_QUESTIONS) as unknown as readonly Workbench_ParkedCodingQuestion[])\n .find((row) => row.workbenchParkedCodingQuestionId === parsed.rowId);\n if (!parked) refuse(CreationConsoleRefusalKind.NOT_WAITING, `The coding run behind \"${request.questionId}\" stopped waiting meanwhile.`);\n if (request.action === CreationConsoleAnswerAction.CANCEL) {\n const outcome = await ports.cancelCodingRun(parked.taskId);\n /* The row existed a moment ago: \"nothing to cancel\" means the run moved on, which is a refusal, never a success. */\n if (!outcome.cancelled) {\n refuse(CreationConsoleRefusalKind.NOT_WAITING, 'This coding run is no longer waiting: it was answered, cancelled or finished meanwhile.');\n }\n return settle(outcome);\n }\n return settle(await ports.respondToParkedQuestion(parked.taskId, answers[0]!.value, String(question.revision), answers[0]!.answeredByRef ?? request.answeredByRef));\n }\n case CreationConsoleQuestionKind.INTERVIEW: {\n const answeredByRef = answers[0]!.answeredByRef ?? request.answeredByRef;\n if (!answeredByRef) {\n refuse(CreationConsoleRefusalKind.MALFORMED,\n 'An interview answer records who gave it: send `answeredByRef` (`wildo` sends your git identity; an agent answering on its own sends its own ref).');\n }\n return settle(await ports.recordInterviewAnswer({\n playbookRef: String(question.playbookRef),\n questionRef: answers[0]!.ref,\n value: answers[0]!.value,\n answeredByRef,\n }));\n }\n case CreationConsoleQuestionKind.GOVERNANCE_FACT:\n /* `admit` refuses first — an item with no actions is never answered here. */\n return refuse(CreationConsoleRefusalKind.MALFORMED, `\"${question.questionId}\" cannot be answered from the console.`);\n }\n } finally {\n ports.invalidate();\n }\n}\n"]}
1
+ {"version":3,"file":"creation-console-answer.companion.js","sourceRoot":"","sources":["../../../../../../src/core/introspection/resources/creation-console-answer.companion.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,2BAA2B,EAC3B,2BAA2B,EAC3B,8BAA8B,EAC9B,8BAA8B,GAQ/B,MAAM,gCAAgC,CAAC;AAExC,OAAO,EAAE,+BAA+B,EAAE,6BAA6B,EAAqC,MAAM,yCAAyC,CAAC;AAC5J,OAAO,EAAE,qCAAqC,EAAE,MAAM,oDAAoD,CAAC;AAC3G,OAAO,EAAE,gCAAgC,EAA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gBAC3F,OAAO,MAAM,CAAC,MAAM,KAAK,CAAC,qBAAqB,CAAC;oBAC9C,WAAW,EAAE,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC;oBACzC,wGAAwG;oBACxG,GAAG,CAAC,QAAQ,CAAC,WAAW,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;oBAC/E,WAAW,EAAE,OAAO,CAAC,CAAC,CAAE,CAAC,GAAG;oBAC5B,KAAK,EAAE,OAAO,CAAC,CAAC,CAAE,CAAC,KAAK;oBACxB,aAAa;oBACb,GAAG,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;oBAC/C,GAAG,CAAC,OAAO,CAAC,CAAC,CAAE,CAAC,mBAAmB,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,mBAAmB,EAAE,OAAO,CAAC,CAAC,CAAE,CAAC,mBAAmB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;iBACnH,CAAC,CAAC,CAAC;YACN,CAAC;YACD,KAAK,2BAA2B,CAAC,eAAe;gBAC9C,6EAA6E;gBAC7E,OAAO,MAAM,CAAC,0BAA0B,CAAC,SAAS,EAAE,IAAI,QAAQ,CAAC,UAAU,wCAAwC,CAAC,CAAC;QACzH,CAAC;IACH,CAAC;YAAS,CAAC;QACT,KAAK,CAAC,UAAU,EAAE,CAAC;IACrB,CAAC;AACH,CAAC","sourcesContent":["import {\n CreationConsoleAnswerAction,\n CreationConsoleQuestionKind,\n WorkbenchCreationPlaneBehavior,\n parseCreationConsoleQuestionId,\n type CreationConsole_AnswerOutcome,\n type CreationConsole_AnswerRequest,\n type CreationConsole_Question,\n type Workbench_DossierEntry,\n type Workbench_GovernanceQuestion,\n type Workbench_ParkedCodingQuestion,\n type Workbench_WaitingPlaybookRun,\n} from '@wildo-ai/platform-core-shared';\n\nimport { buildCreationConsoleAssumptions, buildCreationConsoleQuestions, type InterviewQuestionDisposition } from './creation-console-projection.companion';\nimport { ApplicationCreatorInputAnswerStanding } from '@wildo-ai/saas-specifications/application-creation';\nimport { MetaWorkflow_ClarificationAction } from '@wildo-ai/saas-models/meta-workflows';\n\n/**\n * The CREATION CONSOLE's answer door — one entry for every question the companion asks, routed to the\n * SAME service the matching workbench operation calls:\n *\n * | kind | service | workbench operation it mirrors |\n * |---|---|---|\n * | clarification | `PlaybookRunCompanionService.resumePlaybookRun` | `workbenchPlaybooks.resume_run` |\n * | parked coding question | `CodingAgentDispatchCompanionService.respondToApplicationCodingTaskQuestion` / `cancelApplicationCodingTask` | `workbenchParkedCodingQuestions.answer` / `.cancel` |\n * | interview | `DossierCompanionService.recordAnswer` | `workbenchDossierEntries.answer` |\n *\n * The services are reached through PORTS so this module is a pure function of its inputs and can be\n * pinned without a container; the controller binds them.\n *\n * ## The item is resolved FRESH, and its revision must match\n *\n * The request names a question by the id the console read, and carries the REVISION it read (a\n * clarification's round, a parked run's suspension ref). The queue is re-derived here and the item\n * found by id; a revision that moved is refused as SUPERSEDED rather than applied — the hazard #1581\n * and #1584 closed on the workbench's doors, where an answer typed for one question landed on the\n * next one the run asked under the same id. The services check it again; this refusal is the one\n * that names the console's own terms.\n */\n\n/** Why an answer was refused before any service was reached — each maps to its own HTTP status. */\nexport enum CreationConsoleRefusalKind {\n /** The request cannot be applied as written — 400. */\n MALFORMED = 'malformed',\n /** Nothing waits under that id now: answered, cancelled or finished meanwhile — 409. */\n NOT_WAITING = 'not-waiting',\n /** The question waiting under that id is not the one that was read — 409. */\n SUPERSEDED = 'superseded',\n}\n\nexport class CreationConsoleRefusal extends Error {\n public constructor(public readonly refusal: CreationConsoleRefusalKind, message: string) {\n super(message);\n this.name = 'CreationConsoleRefusal';\n }\n}\n\nexport interface CreationConsolePorts {\n /** The creation plane's rows for one behavior, as the projection serves them. */\n readonly deriveRows: (behavior: WorkbenchCreationPlaneBehavior) => Promise<readonly Record<string, unknown>[]>;\n readonly resumePlaybookRun: (input: {\n readonly runId: string;\n readonly round: number;\n readonly action: MetaWorkflow_ClarificationAction;\n readonly answers?: readonly { readonly ref: string; readonly answer: string; readonly answeredByRef?: string }[];\n readonly answeredByRef?: string;\n }) => Promise<unknown>;\n readonly respondToParkedQuestion: (taskId: string, answer: string, suspensionRef: string, answeredByRef?: string) => Promise<unknown>;\n readonly cancelCodingRun: (taskId: string) => Promise<{ readonly cancelled: boolean }>;\n readonly recordInterviewAnswer: (input: {\n readonly playbookRef: string;\n /** The opened INSTANCE the question is asked for (#1609); absent for the step itself. */\n readonly instanceKey?: string;\n readonly questionRef: string;\n readonly value: string;\n readonly answeredByRef: string;\n /** ASSUMED when the person let a proposed answer stand (#2129). */\n readonly standing?: ApplicationCreatorInputAnswerStanding;\n readonly assumptionRationale?: string;\n }) => Promise<unknown>;\n /** Each interview question's depth and whether it may be proposed (#2129), for the queue to carry. */\n readonly readInterviewDispositions?: () => Promise<ReadonlyMap<string, InterviewQuestionDisposition>>;\n /** The boards move after an answer; the next read must not answer \"as of before\". */\n readonly invalidate: () => void;\n}\n\n/** The behavior each question kind is derived from — TOTAL, so a new kind is a compile error until placed. */\nconst SOURCE_BEHAVIOR_BY_KIND: Readonly<Record<CreationConsoleQuestionKind, WorkbenchCreationPlaneBehavior>> = {\n [CreationConsoleQuestionKind.CLARIFICATION]: WorkbenchCreationPlaneBehavior.WAITING_PLAYBOOK_RUNS,\n [CreationConsoleQuestionKind.PARKED_CODING_QUESTION]: WorkbenchCreationPlaneBehavior.PARKED_CODING_QUESTIONS,\n [CreationConsoleQuestionKind.INTERVIEW]: WorkbenchCreationPlaneBehavior.DOSSIER_ENTRIES,\n [CreationConsoleQuestionKind.GOVERNANCE_FACT]: WorkbenchCreationPlaneBehavior.GOVERNANCE_QUESTIONS,\n};\n\n/**\n * The question queue, derived from the rows of the kinds asked for (every kind by default). Deriving\n * only what an answer needs keeps the answer door from paying for boards it never reads.\n */\nexport async function readCreationConsoleQuestions(\n ports: Pick<CreationConsolePorts, 'deriveRows' | 'readInterviewDispositions'>,\n kinds: readonly CreationConsoleQuestionKind[] = Object.values(CreationConsoleQuestionKind),\n): Promise<CreationConsole_Question[]> {\n const rowsOf = async <Row>(kind: CreationConsoleQuestionKind): Promise<readonly Row[]> =>\n kinds.includes(kind) ? (await ports.deriveRows(SOURCE_BEHAVIOR_BY_KIND[kind])) as unknown as readonly Row[] : [];\n const [waiting, parked, dossier, governance] = await Promise.all([\n rowsOf<Workbench_WaitingPlaybookRun>(CreationConsoleQuestionKind.CLARIFICATION),\n rowsOf<Workbench_ParkedCodingQuestion>(CreationConsoleQuestionKind.PARKED_CODING_QUESTION),\n rowsOf<Workbench_DossierEntry>(CreationConsoleQuestionKind.INTERVIEW),\n rowsOf<Workbench_GovernanceQuestion>(CreationConsoleQuestionKind.GOVERNANCE_FACT),\n ]);\n const interviewDispositions = kinds.includes(CreationConsoleQuestionKind.INTERVIEW) ? await ports.readInterviewDispositions?.() : undefined;\n return buildCreationConsoleQuestions({ waiting, parked, dossier, governance, ...(interviewDispositions ? { interviewDispositions } : {}) });\n}\n\n/**\n * The interview answers that are ASSUMPTIONS (#2129), listed apart from the queue so nothing reads them as\n * waiting. The answer door finds an item here too, so answering one records the person's own answer.\n */\nexport async function readCreationConsoleAssumptions(ports: Pick<CreationConsolePorts, 'deriveRows' | 'readInterviewDispositions'>): Promise<CreationConsole_Question[]> {\n const dossier = (await ports.deriveRows(WorkbenchCreationPlaneBehavior.DOSSIER_ENTRIES)) as unknown as readonly Workbench_DossierEntry[];\n const interviewDispositions = await ports.readInterviewDispositions?.();\n return buildCreationConsoleAssumptions({ dossier, ...(interviewDispositions ? { interviewDispositions } : {}) });\n}\n\nfunction refuse(kind: CreationConsoleRefusalKind, message: string): never {\n throw new CreationConsoleRefusal(kind, message);\n}\n\n/** Check the request against the item as it stands now, before any service is reached. */\nfunction admit(question: CreationConsole_Question, request: CreationConsole_AnswerRequest): void {\n if (question.actions.length === 0) {\n refuse(CreationConsoleRefusalKind.MALFORMED, question.kind === CreationConsoleQuestionKind.GOVERNANCE_FACT\n ? `\"${question.questionId}\" is a governed-document fact. Facts are landed as a whole-document sitting that also names the `\n + 'governance scope and who decided, which the console does not carry — answer it in the workbench\\'s governance panel.'\n : question.routedToUserId\n ? `\"${question.questionId}\" was asked of the person who started its run, and only they may answer it. `\n + 'The console carries no signed-in person — answer it in the workbench, signed in as them.'\n : `\"${question.questionId}\" cannot be answered from the console.`);\n }\n if (!question.actions.includes(request.action)) {\n refuse(CreationConsoleRefusalKind.MALFORMED, `\"${question.questionId}\" admits ${question.actions.join(', ')} — not ${request.action}.`);\n }\n if (question.revision !== null) {\n if (!request.revision) {\n refuse(CreationConsoleRefusalKind.MALFORMED,\n `\"${question.questionId}\" carries a revision (${question.revision}); send the one you read, so an answer never lands on a later question.`);\n }\n if (request.revision !== question.revision) {\n refuse(CreationConsoleRefusalKind.SUPERSEDED,\n `\"${question.questionId}\" has moved on: it now waits on revision ${question.revision}, and this answer was written for ${request.revision}. `\n + 'Read the queue again and answer what it asks now.');\n }\n }\n const answers = request.answers ?? [];\n /*\n * A DECLINE may carry the answers the person DID give (#1658) — \"these I answered, decide the rest\" —\n * so they are checked like an answer's. A CANCEL withdraws the run and carries none.\n */\n if (request.action === CreationConsoleAnswerAction.CANCEL) {\n if (answers.length > 0) refuse(CreationConsoleRefusalKind.MALFORMED, '`cancel` carries no answers; send `answer` to answer, or `decline` with the answers you did give.');\n return;\n }\n if (request.action === CreationConsoleAnswerAction.ANSWER && answers.length === 0) {\n refuse(CreationConsoleRefusalKind.MALFORMED, '`answer` needs at least one `{ ref, value }`.');\n }\n const known = new Set(question.fields.map((field) => field.ref));\n const unknown = answers.filter((answer) => !known.has(answer.ref)).map((answer) => answer.ref);\n if (unknown.length > 0) {\n refuse(CreationConsoleRefusalKind.MALFORMED,\n `\"${question.questionId}\" asks ${[...known].map((ref) => `\"${ref}\"`).join(', ')} — not ${unknown.map((ref) => `\"${ref}\"`).join(', ')}.`);\n }\n if (new Set(answers.map((answer) => answer.ref)).size !== answers.length) {\n refuse(CreationConsoleRefusalKind.MALFORMED, 'Each question is answered once per request.');\n }\n /*\n * An ASSUMED answer (#2129) exists only in the dossier: a run's clarification has `decline` for \"decide it\n * yourself\", and a parked coding question is the agent's own. Elsewhere it is refused rather than dropped,\n * because dropping it would record a proposal as the person's decision.\n */\n for (const answer of answers) {\n if (answer.standing === undefined && answer.assumptionRationale === undefined) continue;\n if (question.kind !== CreationConsoleQuestionKind.INTERVIEW) {\n refuse(CreationConsoleRefusalKind.MALFORMED, `Only an interview answer can be recorded as an assumption; \"${question.questionId}\" is a ${question.kind}.`);\n }\n if (answer.standing !== undefined && !Object.values(ApplicationCreatorInputAnswerStanding).includes(answer.standing as ApplicationCreatorInputAnswerStanding)) {\n refuse(CreationConsoleRefusalKind.MALFORMED,\n `\"${answer.standing}\" is not a standing; send one of ${Object.values(ApplicationCreatorInputAnswerStanding).join(', ')}.`);\n }\n }\n}\n\nconst CLARIFICATION_ACTION_BY_CONSOLE_ACTION: Readonly<Record<CreationConsoleAnswerAction, MetaWorkflow_ClarificationAction>> = {\n [CreationConsoleAnswerAction.ANSWER]: MetaWorkflow_ClarificationAction.ACCEPT,\n [CreationConsoleAnswerAction.DECLINE]: MetaWorkflow_ClarificationAction.DECLINE,\n [CreationConsoleAnswerAction.CANCEL]: MetaWorkflow_ClarificationAction.CANCEL,\n};\n\n/**\n * Apply one answer. Refusals the services raise (a validation of the answer's content, a run that\n * moved between this read and theirs) propagate UNTOUCHED, for the caller to translate the way it\n * translates them on every other door.\n */\nexport async function answerCreationConsoleQuestion(\n ports: CreationConsolePorts,\n request: CreationConsole_AnswerRequest,\n): Promise<CreationConsole_AnswerOutcome> {\n const parsed = parseCreationConsoleQuestionId(request.questionId);\n if (!parsed) {\n refuse(CreationConsoleRefusalKind.MALFORMED,\n `\"${request.questionId}\" is not a question id. Ids look like \"<kind>:<row>\", as \\`wildo creation questions\\` prints them; `\n + `the kinds are ${Object.values(CreationConsoleQuestionKind).join(', ')}.`);\n }\n const question = (await readCreationConsoleQuestions(ports, [parsed.kind]))\n .find((candidate) => candidate.questionId === request.questionId)\n /* An assumption is not waiting, but it is answerable: revisiting it records the person's own answer (#2129). */\n ?? (parsed.kind === CreationConsoleQuestionKind.INTERVIEW\n ? (await readCreationConsoleAssumptions(ports)).find((candidate) => candidate.questionId === request.questionId)\n : undefined);\n if (!question) {\n refuse(CreationConsoleRefusalKind.NOT_WAITING,\n `Nothing waits under \"${request.questionId}\" now — it was answered, cancelled or finished meanwhile. Read the queue again.`);\n }\n admit(question, request);\n\n const answers = request.answers ?? [];\n const settle = (outcome: unknown): CreationConsole_AnswerOutcome => ({\n questionId: question.questionId,\n kind: question.kind,\n action: request.action,\n outcome,\n });\n\n try {\n switch (question.kind) {\n case CreationConsoleQuestionKind.CLARIFICATION: {\n const waiting = (await ports.deriveRows(WorkbenchCreationPlaneBehavior.WAITING_PLAYBOOK_RUNS) as unknown as readonly Workbench_WaitingPlaybookRun[])\n .find((row) => row.workbenchWaitingPlaybookRunId === parsed.rowId);\n if (!waiting) refuse(CreationConsoleRefusalKind.NOT_WAITING, `The run behind \"${request.questionId}\" stopped waiting meanwhile.`);\n return settle(await ports.resumePlaybookRun({\n runId: waiting.runId,\n round: Number(question.revision),\n action: CLARIFICATION_ACTION_BY_CONSOLE_ACTION[request.action],\n /* Each answer keeps its own author, so a round an agent and the person answered together records both (#1658). */\n ...(answers.length > 0\n ? { answers: answers.map((answer) => ({ ref: answer.ref, answer: answer.value, ...(answer.answeredByRef ? { answeredByRef: answer.answeredByRef } : {}) })) }\n : {}),\n /* Who answered reaches the committed DECISIONS.md, for every kind, not only the dossier (#1658). */\n ...(request.answeredByRef ? { answeredByRef: request.answeredByRef } : {}),\n }));\n }\n case CreationConsoleQuestionKind.PARKED_CODING_QUESTION: {\n const parked = (await ports.deriveRows(WorkbenchCreationPlaneBehavior.PARKED_CODING_QUESTIONS) as unknown as readonly Workbench_ParkedCodingQuestion[])\n .find((row) => row.workbenchParkedCodingQuestionId === parsed.rowId);\n if (!parked) refuse(CreationConsoleRefusalKind.NOT_WAITING, `The coding run behind \"${request.questionId}\" stopped waiting meanwhile.`);\n if (request.action === CreationConsoleAnswerAction.CANCEL) {\n const outcome = await ports.cancelCodingRun(parked.taskId);\n /* The row existed a moment ago: \"nothing to cancel\" means the run moved on, which is a refusal, never a success. */\n if (!outcome.cancelled) {\n refuse(CreationConsoleRefusalKind.NOT_WAITING, 'This coding run is no longer waiting: it was answered, cancelled or finished meanwhile.');\n }\n return settle(outcome);\n }\n return settle(await ports.respondToParkedQuestion(parked.taskId, answers[0]!.value, String(question.revision), answers[0]!.answeredByRef ?? request.answeredByRef));\n }\n case CreationConsoleQuestionKind.INTERVIEW: {\n const answeredByRef = answers[0]!.answeredByRef ?? request.answeredByRef;\n if (!answeredByRef) {\n refuse(CreationConsoleRefusalKind.MALFORMED,\n 'An interview answer records who gave it: send `answeredByRef` (`wildo` sends your git identity; an agent answering on its own sends its own ref).');\n }\n const standing = answers[0]!.standing as ApplicationCreatorInputAnswerStanding | undefined;\n return settle(await ports.recordInterviewAnswer({\n playbookRef: String(question.playbookRef),\n /* The instance the question is asked for: without it an instance's answer landed on the step itself. */\n ...(question.instanceKey !== null ? { instanceKey: question.instanceKey } : {}),\n questionRef: answers[0]!.ref,\n value: answers[0]!.value,\n answeredByRef,\n ...(standing !== undefined ? { standing } : {}),\n ...(answers[0]!.assumptionRationale !== undefined ? { assumptionRationale: answers[0]!.assumptionRationale } : {}),\n }));\n }\n case CreationConsoleQuestionKind.GOVERNANCE_FACT:\n /* `admit` refuses first — an item with no actions is never answered here. */\n return refuse(CreationConsoleRefusalKind.MALFORMED, `\"${question.questionId}\" cannot be answered from the console.`);\n }\n } finally {\n ports.invalidate();\n }\n}\n"]}
@@ -23,7 +23,28 @@ export interface CreationConsoleQuestionInputs {
23
23
  readonly parked: readonly Workbench_ParkedCodingQuestion[];
24
24
  readonly dossier: readonly Workbench_DossierEntry[];
25
25
  readonly governance: readonly Workbench_GovernanceQuestion[];
26
+ /**
27
+ * Each interview question's depth and whether it may be proposed (#2129), keyed by
28
+ * {@link interviewQuestionKey}. Absent, or missing a question: ESSENTIAL and not proposable — the reading
29
+ * that asks the person, which is never wrong, only longer.
30
+ */
31
+ readonly interviewDispositions?: ReadonlyMap<string, InterviewQuestionDisposition>;
26
32
  }
33
+ /** What a surface needs to know about one interview question to run a simple interview (#2129). */
34
+ export interface InterviewQuestionDisposition {
35
+ readonly askedInSimpleInterview: boolean;
36
+ readonly proposable: boolean;
37
+ readonly regulatedDomain: boolean;
38
+ }
39
+ /** The one key {@link CreationConsoleQuestionInputs.interviewDispositions} is addressed by. Refs never contain `#`. */
40
+ export declare function interviewQuestionKey(playbookRef: string, questionRef: string): string;
41
+ /**
42
+ * The interview answers that are ASSUMPTIONS (#2129), as console items carrying their `assumedAnswer`. Kept
43
+ * OUT of {@link buildCreationConsoleQuestions}: nothing waits on an assumption, so listing it there would make
44
+ * every reader of the queue — a count of what is blocked, an agent working the queue item by item — treat it
45
+ * as an open question and put it to the person again. It is listed apart, to be revisited when they choose.
46
+ */
47
+ export declare function buildCreationConsoleAssumptions(input: Pick<CreationConsoleQuestionInputs, 'dossier' | 'interviewDispositions'>): CreationConsole_Question[];
27
48
  /**
28
49
  * Everything waiting on the person, as ONE queue — in the order Home ranks it: what holds a live run
29
50
  * first (a clarification round, a parked coding worker), newest first; then the interview questions a
@@ -1 +1 @@
1
- {"version":3,"file":"creation-console-projection.companion.d.ts","sourceRoot":"","sources":["../../../../../../src/core/introspection/resources/creation-console-projection.companion.ts"],"names":[],"mappings":"AACA,OAAO,EAKL,8BAA8B,EAC9B,4BAA4B,EAE5B,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,0BAA0B,EAC/B,KAAK,sBAAsB,EAC3B,KAAK,4BAA4B,EACjC,KAAK,8BAA8B,EACnC,KAAK,4BAA4B,EAClC,MAAM,gCAAgC,CAAC;AAExC;;;;;;;GAOG;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,wCAAwC,EAAE,QAAQ,CAAC,MAAM,CAAC,8BAA8B,EAAE,4BAA4B,CAAC,CAiBnI,CAAC;AAOF,gGAAgG;AAChG,wBAAgB,oCAAoC,CAAC,YAAY,EAAE,MAAM,GAAG,8BAA8B,GAAG,IAAI,CAEhH;AAwBD,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,OAAO,EAAE,SAAS,4BAA4B,EAAE,CAAC;IAC1D,QAAQ,CAAC,MAAM,EAAE,SAAS,8BAA8B,EAAE,CAAC;IAC3D,QAAQ,CAAC,OAAO,EAAE,SAAS,sBAAsB,EAAE,CAAC;IACpD,QAAQ,CAAC,UAAU,EAAE,SAAS,4BAA4B,EAAE,CAAC;CAC9D;AAED;;;;;;;;;GASG;AACH,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,6BAA6B,GAAG,wBAAwB,EAAE,CA+F9G;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,SAAS,0BAA0B,EAAE,EAC5C,aAAa,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,GAC1F,wBAAwB,EAAE,CAqB5B"}
1
+ {"version":3,"file":"creation-console-projection.companion.d.ts","sourceRoot":"","sources":["../../../../../../src/core/introspection/resources/creation-console-projection.companion.ts"],"names":[],"mappings":"AACA,OAAO,EAKL,8BAA8B,EAE9B,4BAA4B,EAE5B,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,0BAA0B,EAC/B,KAAK,sBAAsB,EAC3B,KAAK,4BAA4B,EACjC,KAAK,8BAA8B,EACnC,KAAK,4BAA4B,EAClC,MAAM,gCAAgC,CAAC;AAExC;;;;;;;GAOG;AAEH;;;;;;;GAOG;AACH,eAAO,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C,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,GAC1F,wBAAwB,EAAE,CAqB5B"}
@@ -1,5 +1,5 @@
1
1
  import { HumanDecision_FieldKind } from '@wildo-ai/saas-models';
2
- import { CreationConsoleAnswerAction, CreationConsoleQuestionKind, WORKBENCH_PARKED_CODING_QUESTION_FIELD_REF, WorkbenchCreationHomeLineKind, WorkbenchCreationPlaneBehavior, WorkbenchShared_ResourceType, formatCreationConsoleQuestionId, } from '@wildo-ai/platform-core-shared';
2
+ import { CreationConsoleAnswerAction, CreationConsoleQuestionKind, WORKBENCH_PARKED_CODING_QUESTION_FIELD_REF, WorkbenchCreationHomeLineKind, WorkbenchCreationPlaneBehavior, WorkbenchDossierEntryStanding, WorkbenchShared_ResourceType, formatCreationConsoleQuestionId, } from '@wildo-ai/platform-core-shared';
3
3
  /**
4
4
  * The CREATION CONSOLE's view of the creation plane — pure functions over rows the projection already
5
5
  * derives, so the console and the workbench read one set of facts (see the contract's JSDoc in
@@ -63,18 +63,15 @@ function compareNewestFirst(left, right) {
63
63
  return -1;
64
64
  return right.localeCompare(left);
65
65
  }
66
- /**
67
- * Everything waiting on the person, as ONE queue — in the order Home ranks it: what holds a live run
68
- * first (a clarification round, a parked coding worker), newest first; then the interview questions a
69
- * step can run as soon as they are answered; then the facts drafted documents still need.
70
- *
71
- * The selection is the projection's, never re-derived: a dossier entry is queued when it is
72
- * `askedNow`, a governance question when it is `askedNow`, a waiting run when its checkpoint is
73
- * READABLE (an unreadable checkpoint is a condition an operator inspects, not a question anyone can
74
- * answer — the same cut Home makes).
75
- */
76
- export function buildCreationConsoleQuestions(input) {
77
- const blank = {
66
+ /** The reading of a question nothing describes: asked, not proposable, flagged — the reading that asks the person. */
67
+ const UNDESCRIBED_INTERVIEW_QUESTION = { askedInSimpleInterview: true, proposable: false, regulatedDomain: false };
68
+ /** The one key {@link CreationConsoleQuestionInputs.interviewDispositions} is addressed by. Refs never contain `#`. */
69
+ export function interviewQuestionKey(playbookRef, questionRef) {
70
+ return `${playbookRef}#${questionRef}`;
71
+ }
72
+ /** The fields every queue item starts from (fresh each time, so no item shares an array); each kind fills in what it carries. */
73
+ function blankQuestion() {
74
+ return {
78
75
  playbookRef: null,
79
76
  taskRef: null,
80
77
  instanceKey: null,
@@ -85,7 +82,59 @@ export function buildCreationConsoleQuestions(input) {
85
82
  resumable: null,
86
83
  affectsFamilies: [],
87
84
  routedToUserId: null,
85
+ askedInSimpleInterview: null,
86
+ proposable: null,
87
+ regulatedDomain: null,
88
+ assumedAnswer: null,
89
+ assumptionRationale: null,
88
90
  };
91
+ }
92
+ /** Interview items in the order their steps ask them: by playbook, then by position in its interview. */
93
+ function byInterviewOrder(left, right) {
94
+ return left.playbookRef.localeCompare(right.playbookRef) || left.position - right.position;
95
+ }
96
+ /** One dossier row as a console item — a question waiting on the person, or an assumption to revisit. */
97
+ function interviewItem(entry, dispositions) {
98
+ return {
99
+ ...blankQuestion(),
100
+ questionId: formatCreationConsoleQuestionId(CreationConsoleQuestionKind.INTERVIEW, entry.workbenchDossierEntryId),
101
+ kind: CreationConsoleQuestionKind.INTERVIEW,
102
+ askedAt: null,
103
+ playbookRef: entry.playbookRef,
104
+ instanceKey: entry.instanceKey,
105
+ fields: [{ ref: entry.questionRef, question: entry.question, why: null, kind: entry.kind, options: [...entry.options] }],
106
+ actions: [CreationConsoleAnswerAction.ANSWER],
107
+ affectsFamilies: [...entry.affectsFamilies],
108
+ ...(dispositions?.get(interviewQuestionKey(entry.playbookRef, entry.questionRef)) ?? UNDESCRIBED_INTERVIEW_QUESTION),
109
+ assumedAnswer: entry.standing === WorkbenchDossierEntryStanding.ASSUMED ? entry.value : null,
110
+ assumptionRationale: entry.standing === WorkbenchDossierEntryStanding.ASSUMED ? entry.assumptionRationale ?? null : null,
111
+ };
112
+ }
113
+ /**
114
+ * The interview answers that are ASSUMPTIONS (#2129), as console items carrying their `assumedAnswer`. Kept
115
+ * OUT of {@link buildCreationConsoleQuestions}: nothing waits on an assumption, so listing it there would make
116
+ * every reader of the queue — a count of what is blocked, an agent working the queue item by item — treat it
117
+ * as an open question and put it to the person again. It is listed apart, to be revisited when they choose.
118
+ */
119
+ export function buildCreationConsoleAssumptions(input) {
120
+ return input.dossier
121
+ .filter((entry) => entry.standing === WorkbenchDossierEntryStanding.ASSUMED)
122
+ .slice()
123
+ .sort(byInterviewOrder)
124
+ .map((entry) => interviewItem(entry, input.interviewDispositions));
125
+ }
126
+ /**
127
+ * Everything waiting on the person, as ONE queue — in the order Home ranks it: what holds a live run
128
+ * first (a clarification round, a parked coding worker), newest first; then the interview questions a
129
+ * step can run as soon as they are answered; then the facts drafted documents still need.
130
+ *
131
+ * The selection is the projection's, never re-derived: a dossier entry is queued when it is
132
+ * `askedNow`, a governance question when it is `askedNow`, a waiting run when its checkpoint is
133
+ * READABLE (an unreadable checkpoint is a condition an operator inspects, not a question anyone can
134
+ * answer — the same cut Home makes).
135
+ */
136
+ export function buildCreationConsoleQuestions(input) {
137
+ const blank = blankQuestion();
89
138
  const holdingARun = [];
90
139
  for (const waiting of input.waiting) {
91
140
  if (!waiting.readable || waiting.round === null)
@@ -134,18 +183,8 @@ export function buildCreationConsoleQuestions(input) {
134
183
  const interview = input.dossier
135
184
  .filter((entry) => entry.askedNow)
136
185
  .slice()
137
- .sort((left, right) => left.playbookRef.localeCompare(right.playbookRef) || left.position - right.position)
138
- .map((entry) => ({
139
- ...blank,
140
- questionId: formatCreationConsoleQuestionId(CreationConsoleQuestionKind.INTERVIEW, entry.workbenchDossierEntryId),
141
- kind: CreationConsoleQuestionKind.INTERVIEW,
142
- askedAt: null,
143
- playbookRef: entry.playbookRef,
144
- instanceKey: entry.instanceKey,
145
- fields: [{ ref: entry.questionRef, question: entry.question, why: null, kind: entry.kind, options: [...entry.options] }],
146
- actions: [CreationConsoleAnswerAction.ANSWER],
147
- affectsFamilies: [...entry.affectsFamilies],
148
- }));
186
+ .sort(byInterviewOrder)
187
+ .map((entry) => interviewItem(entry, input.interviewDispositions));
149
188
  const governance = input.governance
150
189
  .filter((question) => question.askedNow)
151
190
  .map((question) => ({
@@ -1 +1 @@
1
- {"version":3,"file":"creation-console-projection.companion.js","sourceRoot":"","sources":["../../../../../../src/core/introspection/resources/creation-console-projection.companion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EACL,2BAA2B,EAC3B,2BAA2B,EAC3B,0CAA0C,EAC1C,6BAA6B,EAC7B,8BAA8B,EAC9B,4BAA4B,EAC5B,+BAA+B,GAQhC,MAAM,gCAAgC,CAAC;AAExC;;;;;;;GAOG;AAEH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,wCAAwC,GAAmF;IACtI,CAAC,8BAA8B,CAAC,oBAAoB,CAAC,EAAE,4BAA4B,CAAC,SAAS;IAC7F,CAAC,8BAA8B,CAAC,gBAAgB,CAAC,EAAE,4BAA4B,CAAC,gBAAgB;IAChG,CAAC,8BAA8B,CAAC,iBAAiB,CAAC,EAAE,4BAA4B,CAAC,iBAAiB;IAClG,CAAC,8BAA8B,CAAC,cAAc,CAAC,EAAE,4BAA4B,CAAC,cAAc;IAC5F,CAAC,8BAA8B,CAAC,oBAAoB,CAAC,EAAE,4BAA4B,CAAC,oBAAoB;IACxG,CAAC,8BAA8B,CAAC,oBAAoB,CAAC,EAAE,4BAA4B,CAAC,oBAAoB;IACxG,CAAC,8BAA8B,CAAC,mBAAmB,CAAC,EAAE,4BAA4B,CAAC,mBAAmB;IACtG,CAAC,8BAA8B,CAAC,gBAAgB,CAAC,EAAE,4BAA4B,CAAC,gBAAgB;IAChG,CAAC,8BAA8B,CAAC,aAAa,CAAC,EAAE,4BAA4B,CAAC,aAAa;IAC1F,CAAC,8BAA8B,CAAC,qBAAqB,CAAC,EAAE,4BAA4B,CAAC,qBAAqB;IAC1G,CAAC,8BAA8B,CAAC,kBAAkB,CAAC,EAAE,4BAA4B,CAAC,kBAAkB;IACpG,CAAC,8BAA8B,CAAC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,MAAM;YACnB,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,kBAAkB,EAAE,IAAI,CAAC,kBAAkB;YAC3C,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;YACvC,MAAM,EAAE,aAAa,CAAC,IAAI,CAAC,kBAAkB,EAAE,IAAI,CAAC,gBAAgB,CAAC;YACrE,UAAU,EAAE,YAAY,CAAC,CAAC,CAAC,+BAA+B,CAAC,YAAY,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,IAAI;SACvG,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { HumanDecision_FieldKind } from '@wildo-ai/saas-models';\nimport {\n CreationConsoleAnswerAction,\n CreationConsoleQuestionKind,\n WORKBENCH_PARKED_CODING_QUESTION_FIELD_REF,\n WorkbenchCreationHomeLineKind,\n WorkbenchCreationPlaneBehavior,\n WorkbenchShared_ResourceType,\n formatCreationConsoleQuestionId,\n type CreationConsole_FeedLine,\n type CreationConsole_Question,\n type Workbench_CreationHomeLine,\n type Workbench_DossierEntry,\n type Workbench_GovernanceQuestion,\n type Workbench_ParkedCodingQuestion,\n type Workbench_WaitingPlaybookRun,\n} from '@wildo-ai/platform-core-shared';\n\n/**\n * The CREATION CONSOLE's view of the creation plane — pure functions over rows the projection already\n * derives, so the console and the workbench read one set of facts (see the contract's JSDoc in\n * `workbench-creation-console.custom.shared.schemas.ts` for why the console needs a view at all).\n *\n * Nothing here derives a fact of its own. It FOLDS: four row kinds into one question queue, and each\n * Home line together with the row it points at into one feed line.\n */\n\n/**\n * Which resource each creation-plane behavior serves — TOTAL over the behaviors, so a behavior added\n * tomorrow is a compile error here until it is placed. The feed needs it the other way round (a Home\n * line names its target by RESOURCE TYPE, and the projection derives by BEHAVIOR); the inverse is\n * computed below, never kept by hand. Held equal to the resource configurations' own\n * `introspectionBinding` by `__tests__/creation-console.test.ts`, which is what stops the two\n * spellings of one binding from drifting.\n */\nexport const CREATION_PLANE_RESOURCE_TYPE_BY_BEHAVIOR: Readonly<Record<WorkbenchCreationPlaneBehavior, WorkbenchShared_ResourceType>> = {\n [WorkbenchCreationPlaneBehavior.PLAYBOOK_ELIGIBILITY]: WorkbenchShared_ResourceType.PLAYBOOKS,\n [WorkbenchCreationPlaneBehavior.BUILD_PLAN_TASKS]: WorkbenchShared_ResourceType.BUILD_PLAN_TASKS,\n [WorkbenchCreationPlaneBehavior.RUN_WRITE_RECORDS]: WorkbenchShared_ResourceType.RUN_WRITE_RECORDS,\n [WorkbenchCreationPlaneBehavior.TRACE_SESSIONS]: WorkbenchShared_ResourceType.TRACE_SESSIONS,\n [WorkbenchCreationPlaneBehavior.GOVERNANCE_DOCUMENTS]: WorkbenchShared_ResourceType.GOVERNANCE_DOCUMENTS,\n [WorkbenchCreationPlaneBehavior.GOVERNANCE_QUESTIONS]: WorkbenchShared_ResourceType.GOVERNANCE_QUESTIONS,\n [WorkbenchCreationPlaneBehavior.BUILD_DISPATCH_PLAN]: WorkbenchShared_ResourceType.BUILD_DISPATCH_PLAN,\n [WorkbenchCreationPlaneBehavior.BUILD_DISPATCHES]: WorkbenchShared_ResourceType.BUILD_DISPATCHES,\n [WorkbenchCreationPlaneBehavior.PLAYBOOK_RUNS]: WorkbenchShared_ResourceType.PLAYBOOK_RUNS,\n [WorkbenchCreationPlaneBehavior.WAITING_PLAYBOOK_RUNS]: WorkbenchShared_ResourceType.WAITING_PLAYBOOK_RUNS,\n [WorkbenchCreationPlaneBehavior.CODING_LANE_STATUS]: WorkbenchShared_ResourceType.CODING_LANE_STATUS,\n [WorkbenchCreationPlaneBehavior.PARKED_CODING_QUESTIONS]: WorkbenchShared_ResourceType.PARKED_CODING_QUESTIONS,\n [WorkbenchCreationPlaneBehavior.DOSSIER_ENTRIES]: WorkbenchShared_ResourceType.DOSSIER_ENTRIES,\n [WorkbenchCreationPlaneBehavior.HOME_LINES]: WorkbenchShared_ResourceType.HOME_LINES,\n [WorkbenchCreationPlaneBehavior.CREATION_OUTCOMES]: WorkbenchShared_ResourceType.CREATION_OUTCOMES,\n [WorkbenchCreationPlaneBehavior.APPLICATION_SECRETS]: WorkbenchShared_ResourceType.APPLICATION_SECRETS,\n};\n\nconst BEHAVIOR_BY_RESOURCE_TYPE: ReadonlyMap<string, WorkbenchCreationPlaneBehavior> = new Map(\n (Object.entries(CREATION_PLANE_RESOURCE_TYPE_BY_BEHAVIOR) as [WorkbenchCreationPlaneBehavior, WorkbenchShared_ResourceType][])\n .map(([behavior, resourceType]) => [resourceType, behavior]),\n);\n\n/** The creation-plane behavior serving a resource type, or `null` for one outside the plane. */\nexport function creationPlaneBehaviorForResourceType(resourceType: string): WorkbenchCreationPlaneBehavior | null {\n return BEHAVIOR_BY_RESOURCE_TYPE.get(resourceType) ?? null;\n}\n\n/**\n * The Home line kinds that are about exactly ONE queued question, and which kind of question it is.\n * A governed document is about several facts, so its line names none — the queue lists each fact.\n */\nconst QUESTION_KIND_BY_LINE_KIND: Readonly<Partial<Record<WorkbenchCreationHomeLineKind, CreationConsoleQuestionKind>>> = {\n [WorkbenchCreationHomeLineKind.CLARIFICATION]: CreationConsoleQuestionKind.CLARIFICATION,\n [WorkbenchCreationHomeLineKind.PARKED_QUESTION]: CreationConsoleQuestionKind.PARKED_CODING_QUESTION,\n};\n\nfunction isoOrNull(value: unknown): string | null {\n if (value instanceof Date) return Number.isNaN(value.getTime()) ? null : value.toISOString();\n return typeof value === 'string' && value.length > 0 ? value : null;\n}\n\n/** Newest first; an item with no instant sorts after every item with one. */\nfunction compareNewestFirst(left: string | null, right: string | null): number {\n if (left === null && right === null) return 0;\n if (left === null) return 1;\n if (right === null) return -1;\n return right.localeCompare(left);\n}\n\nexport interface CreationConsoleQuestionInputs {\n readonly waiting: readonly Workbench_WaitingPlaybookRun[];\n readonly parked: readonly Workbench_ParkedCodingQuestion[];\n readonly dossier: readonly Workbench_DossierEntry[];\n readonly governance: readonly Workbench_GovernanceQuestion[];\n}\n\n/**\n * Everything waiting on the person, as ONE queue — in the order Home ranks it: what holds a live run\n * first (a clarification round, a parked coding worker), newest first; then the interview questions a\n * step can run as soon as they are answered; then the facts drafted documents still need.\n *\n * The selection is the projection's, never re-derived: a dossier entry is queued when it is\n * `askedNow`, a governance question when it is `askedNow`, a waiting run when its checkpoint is\n * READABLE (an unreadable checkpoint is a condition an operator inspects, not a question anyone can\n * answer — the same cut Home makes).\n */\nexport function buildCreationConsoleQuestions(input: CreationConsoleQuestionInputs): CreationConsole_Question[] {\n const blank = {\n playbookRef: null,\n taskRef: null,\n instanceKey: null,\n definitionRef: null,\n revision: null,\n producingFamily: null,\n dryRun: null,\n resumable: null,\n affectsFamilies: [] as string[],\n routedToUserId: null,\n };\n\n const holdingARun: CreationConsole_Question[] = [];\n for (const waiting of input.waiting) {\n if (!waiting.readable || waiting.round === null) continue;\n holdingARun.push({\n ...blank,\n questionId: formatCreationConsoleQuestionId(CreationConsoleQuestionKind.CLARIFICATION, waiting.workbenchWaitingPlaybookRunId),\n kind: CreationConsoleQuestionKind.CLARIFICATION,\n askedAt: isoOrNull(waiting.suspendedAt),\n playbookRef: waiting.playbookRef,\n revision: String(waiting.round),\n fields: waiting.requests.map((request) => ({\n ref: request.ref,\n question: request.question,\n why: request.why,\n kind: request.kind,\n options: [...request.options],\n })),\n /*\n * A question routed to its run's starter (#1751) is theirs alone, and the console carries no person:\n * listed, so nothing waiting is hidden, and answered in the workbench as them.\n */\n actions: waiting.routedToUserId\n ? []\n : [CreationConsoleAnswerAction.ANSWER, CreationConsoleAnswerAction.DECLINE, CreationConsoleAnswerAction.CANCEL],\n routedToUserId: waiting.routedToUserId,\n producingFamily: waiting.family,\n dryRun: waiting.dryRun,\n });\n }\n for (const parked of input.parked) {\n holdingARun.push({\n ...blank,\n questionId: formatCreationConsoleQuestionId(CreationConsoleQuestionKind.PARKED_CODING_QUESTION, parked.workbenchParkedCodingQuestionId),\n kind: CreationConsoleQuestionKind.PARKED_CODING_QUESTION,\n askedAt: isoOrNull(parked.parkedAt),\n taskRef: parked.taskRef,\n revision: parked.suspensionRef,\n /* The agent asks ONE free-text question; the field ref is the one the workbench's gate answers under. */\n fields: [{ ref: WORKBENCH_PARKED_CODING_QUESTION_FIELD_REF, question: parked.question, why: null, kind: HumanDecision_FieldKind.FREE_TEXT, options: [] }],\n actions: [CreationConsoleAnswerAction.ANSWER, CreationConsoleAnswerAction.CANCEL],\n resumable: parked.resumable,\n });\n }\n holdingARun.sort((left, right) => compareNewestFirst(left.askedAt, right.askedAt));\n\n const interview: CreationConsole_Question[] = input.dossier\n .filter((entry) => entry.askedNow)\n .slice()\n .sort((left, right) => left.playbookRef.localeCompare(right.playbookRef) || left.position - right.position)\n .map((entry) => ({\n ...blank,\n questionId: formatCreationConsoleQuestionId(CreationConsoleQuestionKind.INTERVIEW, entry.workbenchDossierEntryId),\n kind: CreationConsoleQuestionKind.INTERVIEW,\n askedAt: null,\n playbookRef: entry.playbookRef,\n instanceKey: entry.instanceKey,\n fields: [{ ref: entry.questionRef, question: entry.question, why: null, kind: entry.kind, options: [...entry.options] }],\n actions: [CreationConsoleAnswerAction.ANSWER],\n affectsFamilies: [...entry.affectsFamilies],\n }));\n\n const governance: CreationConsole_Question[] = input.governance\n .filter((question) => question.askedNow)\n .map((question) => ({\n ...blank,\n questionId: formatCreationConsoleQuestionId(CreationConsoleQuestionKind.GOVERNANCE_FACT, question.workbenchGovernanceQuestionId),\n kind: CreationConsoleQuestionKind.GOVERNANCE_FACT,\n askedAt: null,\n definitionRef: question.definitionRef,\n fields: [{\n ref: question.questionRef,\n question: question.creatorPrompt,\n why: question.decisionPurpose,\n kind: question.answerKind,\n options: question.semanticOptions.map((option) => option.optionRef),\n }],\n /* Listed, never answered here — see `CreationConsoleQuestionKind.GOVERNANCE_FACT`. */\n actions: [],\n }));\n\n return [...holdingARun, ...interview, ...governance];\n}\n\n/**\n * Home's lines as FEED lines: each carries the row it points at, so a console reads a completed run's\n * verdict or a dispatch's error in the same read, and the id of the one question it is about, so the\n * console can answer it without a lookup.\n *\n * `resolveTarget` is the projection's row for (resource type, row id), or `null` when the row has gone\n * since the line was derived — a line whose target moved on is still a true line about the past.\n */\nexport function buildCreationConsoleFeed(\n lines: readonly Workbench_CreationHomeLine[],\n resolveTarget: (resourceType: string, resourceId: string) => Record<string, unknown> | null,\n): CreationConsole_FeedLine[] {\n return lines.map((line) => {\n const questionKind = QUESTION_KIND_BY_LINE_KIND[line.kind];\n return {\n lineId: line.workbenchCreationHomeLineId,\n section: line.section,\n kind: line.kind,\n at: isoOrNull(line.at),\n playbookRef: line.playbookRef,\n taskRef: line.taskRef,\n subject: line.subject,\n failed: line.failed,\n acceptable: line.acceptable,\n needsAnswers: line.needsAnswers,\n stuckReason: line.stuckReason,\n targetResourceType: line.targetResourceType,\n targetResourceId: line.targetResourceId,\n target: resolveTarget(line.targetResourceType, line.targetResourceId),\n questionId: questionKind ? formatCreationConsoleQuestionId(questionKind, line.targetResourceId) : null,\n };\n });\n}\n"]}
1
+ {"version":3,"file":"creation-console-projection.companion.js","sourceRoot":"","sources":["../../../../../../src/core/introspection/resources/creation-console-projection.companion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EACL,2BAA2B,EAC3B,2BAA2B,EAC3B,0CAA0C,EAC1C,6BAA6B,EAC7B,8BAA8B,EAC9B,6BAA6B,EAC7B,4BAA4B,EAC5B,+BAA+B,GAQhC,MAAM,gCAAgC,CAAC;AAExC;;;;;;;GAOG;AAEH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,wCAAwC,GAAmF;IACtI,CAAC,8BAA8B,CAAC,oBAAoB,CAAC,EAAE,4BAA4B,CAAC,SAAS;IAC7F,CAAC,8BAA8B,CAAC,gBAAgB,CAAC,EAAE,4BAA4B,CAAC,gBAAgB;IAChG,CAAC,8BAA8B,CAAC,iBAAiB,C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,CAAC","sourcesContent":["import { HumanDecision_FieldKind } from '@wildo-ai/saas-models';\nimport {\n CreationConsoleAnswerAction,\n CreationConsoleQuestionKind,\n WORKBENCH_PARKED_CODING_QUESTION_FIELD_REF,\n WorkbenchCreationHomeLineKind,\n WorkbenchCreationPlaneBehavior,\n WorkbenchDossierEntryStanding,\n WorkbenchShared_ResourceType,\n formatCreationConsoleQuestionId,\n type CreationConsole_FeedLine,\n type CreationConsole_Question,\n type Workbench_CreationHomeLine,\n type Workbench_DossierEntry,\n type Workbench_GovernanceQuestion,\n type Workbench_ParkedCodingQuestion,\n type Workbench_WaitingPlaybookRun,\n} from '@wildo-ai/platform-core-shared';\n\n/**\n * The CREATION CONSOLE's view of the creation plane — pure functions over rows the projection already\n * derives, so the console and the workbench read one set of facts (see the contract's JSDoc in\n * `workbench-creation-console.custom.shared.schemas.ts` for why the console needs a view at all).\n *\n * Nothing here derives a fact of its own. It FOLDS: four row kinds into one question queue, and each\n * Home line together with the row it points at into one feed line.\n */\n\n/**\n * Which resource each creation-plane behavior serves — TOTAL over the behaviors, so a behavior added\n * tomorrow is a compile error here until it is placed. The feed needs it the other way round (a Home\n * line names its target by RESOURCE TYPE, and the projection derives by BEHAVIOR); the inverse is\n * computed below, never kept by hand. Held equal to the resource configurations' own\n * `introspectionBinding` by `__tests__/creation-console.test.ts`, which is what stops the two\n * spellings of one binding from drifting.\n */\nexport const CREATION_PLANE_RESOURCE_TYPE_BY_BEHAVIOR: Readonly<Record<WorkbenchCreationPlaneBehavior, WorkbenchShared_ResourceType>> = {\n [WorkbenchCreationPlaneBehavior.PLAYBOOK_ELIGIBILITY]: WorkbenchShared_ResourceType.PLAYBOOKS,\n [WorkbenchCreationPlaneBehavior.BUILD_PLAN_TASKS]: WorkbenchShared_ResourceType.BUILD_PLAN_TASKS,\n [WorkbenchCreationPlaneBehavior.RUN_WRITE_RECORDS]: WorkbenchShared_ResourceType.RUN_WRITE_RECORDS,\n [WorkbenchCreationPlaneBehavior.TRACE_SESSIONS]: WorkbenchShared_ResourceType.TRACE_SESSIONS,\n [WorkbenchCreationPlaneBehavior.GOVERNANCE_DOCUMENTS]: WorkbenchShared_ResourceType.GOVERNANCE_DOCUMENTS,\n [WorkbenchCreationPlaneBehavior.GOVERNANCE_QUESTIONS]: WorkbenchShared_ResourceType.GOVERNANCE_QUESTIONS,\n [WorkbenchCreationPlaneBehavior.BUILD_DISPATCH_PLAN]: WorkbenchShared_ResourceType.BUILD_DISPATCH_PLAN,\n [WorkbenchCreationPlaneBehavior.BUILD_DISPATCHES]: WorkbenchShared_ResourceType.BUILD_DISPATCHES,\n [WorkbenchCreationPlaneBehavior.PLAYBOOK_RUNS]: WorkbenchShared_ResourceType.PLAYBOOK_RUNS,\n [WorkbenchCreationPlaneBehavior.WAITING_PLAYBOOK_RUNS]: WorkbenchShared_ResourceType.WAITING_PLAYBOOK_RUNS,\n [WorkbenchCreationPlaneBehavior.CODING_LANE_STATUS]: WorkbenchShared_ResourceType.CODING_LANE_STATUS,\n [WorkbenchCreationPlaneBehavior.PARKED_CODING_QUESTIONS]: WorkbenchShared_ResourceType.PARKED_CODING_QUESTIONS,\n [WorkbenchCreationPlaneBehavior.DOSSIER_ENTRIES]: WorkbenchShared_ResourceType.DOSSIER_ENTRIES,\n [WorkbenchCreationPlaneBehavior.HOME_LINES]: WorkbenchShared_ResourceType.HOME_LINES,\n [WorkbenchCreationPlaneBehavior.CREATION_OUTCOMES]: WorkbenchShared_ResourceType.CREATION_OUTCOMES,\n [WorkbenchCreationPlaneBehavior.APPLICATION_SECRETS]: WorkbenchShared_ResourceType.APPLICATION_SECRETS,\n};\n\nconst BEHAVIOR_BY_RESOURCE_TYPE: ReadonlyMap<string, WorkbenchCreationPlaneBehavior> = new Map(\n (Object.entries(CREATION_PLANE_RESOURCE_TYPE_BY_BEHAVIOR) as [WorkbenchCreationPlaneBehavior, WorkbenchShared_ResourceType][])\n .map(([behavior, resourceType]) => [resourceType, behavior]),\n);\n\n/** The creation-plane behavior serving a resource type, or `null` for one outside the plane. */\nexport function creationPlaneBehaviorForResourceType(resourceType: string): WorkbenchCreationPlaneBehavior | null {\n return BEHAVIOR_BY_RESOURCE_TYPE.get(resourceType) ?? null;\n}\n\n/**\n * The Home line kinds that are about exactly ONE queued question, and which kind of question it is.\n * A governed document is about several facts, so its line names none — the queue lists each fact.\n */\nconst QUESTION_KIND_BY_LINE_KIND: Readonly<Partial<Record<WorkbenchCreationHomeLineKind, CreationConsoleQuestionKind>>> = {\n [WorkbenchCreationHomeLineKind.CLARIFICATION]: CreationConsoleQuestionKind.CLARIFICATION,\n [WorkbenchCreationHomeLineKind.PARKED_QUESTION]: CreationConsoleQuestionKind.PARKED_CODING_QUESTION,\n};\n\nfunction isoOrNull(value: unknown): string | null {\n if (value instanceof Date) return Number.isNaN(value.getTime()) ? null : value.toISOString();\n return typeof value === 'string' && value.length > 0 ? value : null;\n}\n\n/** Newest first; an item with no instant sorts after every item with one. */\nfunction compareNewestFirst(left: string | null, right: string | null): number {\n if (left === null && right === null) return 0;\n if (left === null) return 1;\n if (right === null) return -1;\n return right.localeCompare(left);\n}\n\nexport interface CreationConsoleQuestionInputs {\n readonly waiting: readonly Workbench_WaitingPlaybookRun[];\n readonly parked: readonly Workbench_ParkedCodingQuestion[];\n readonly dossier: readonly Workbench_DossierEntry[];\n readonly governance: readonly Workbench_GovernanceQuestion[];\n /**\n * Each interview question's depth and whether it may be proposed (#2129), keyed by\n * {@link interviewQuestionKey}. Absent, or missing a question: ESSENTIAL and not proposable — the reading\n * that asks the person, which is never wrong, only longer.\n */\n readonly interviewDispositions?: ReadonlyMap<string, InterviewQuestionDisposition>;\n}\n\n/** What a surface needs to know about one interview question to run a simple interview (#2129). */\nexport interface InterviewQuestionDisposition {\n readonly askedInSimpleInterview: boolean;\n readonly proposable: boolean;\n readonly regulatedDomain: boolean;\n}\n\n/** The reading of a question nothing describes: asked, not proposable, flagged — the reading that asks the person. */\nconst UNDESCRIBED_INTERVIEW_QUESTION: InterviewQuestionDisposition = { askedInSimpleInterview: true, proposable: false, regulatedDomain: false };\n\n/** The one key {@link CreationConsoleQuestionInputs.interviewDispositions} is addressed by. Refs never contain `#`. */\nexport function interviewQuestionKey(playbookRef: string, questionRef: string): string {\n return `${playbookRef}#${questionRef}`;\n}\n\n/** The fields every queue item starts from (fresh each time, so no item shares an array); each kind fills in what it carries. */\nfunction blankQuestion() {\n return {\n playbookRef: null,\n taskRef: null,\n instanceKey: null,\n definitionRef: null,\n revision: null,\n producingFamily: null,\n dryRun: null,\n resumable: null,\n affectsFamilies: [] as string[],\n routedToUserId: null,\n askedInSimpleInterview: null,\n proposable: null,\n regulatedDomain: null,\n assumedAnswer: null,\n assumptionRationale: null,\n };\n}\n\n/** Interview items in the order their steps ask them: by playbook, then by position in its interview. */\nfunction byInterviewOrder(left: Workbench_DossierEntry, right: Workbench_DossierEntry): number {\n return left.playbookRef.localeCompare(right.playbookRef) || left.position - right.position;\n}\n\n/** One dossier row as a console item — a question waiting on the person, or an assumption to revisit. */\nfunction interviewItem(entry: Workbench_DossierEntry, dispositions: ReadonlyMap<string, InterviewQuestionDisposition> | undefined): CreationConsole_Question {\n return {\n ...blankQuestion(),\n questionId: formatCreationConsoleQuestionId(CreationConsoleQuestionKind.INTERVIEW, entry.workbenchDossierEntryId),\n kind: CreationConsoleQuestionKind.INTERVIEW,\n askedAt: null,\n playbookRef: entry.playbookRef,\n instanceKey: entry.instanceKey,\n fields: [{ ref: entry.questionRef, question: entry.question, why: null, kind: entry.kind, options: [...entry.options] }],\n actions: [CreationConsoleAnswerAction.ANSWER],\n affectsFamilies: [...entry.affectsFamilies],\n ...(dispositions?.get(interviewQuestionKey(entry.playbookRef, entry.questionRef)) ?? UNDESCRIBED_INTERVIEW_QUESTION),\n assumedAnswer: entry.standing === WorkbenchDossierEntryStanding.ASSUMED ? entry.value : null,\n assumptionRationale: entry.standing === WorkbenchDossierEntryStanding.ASSUMED ? entry.assumptionRationale ?? null : null,\n };\n}\n\n/**\n * The interview answers that are ASSUMPTIONS (#2129), as console items carrying their `assumedAnswer`. Kept\n * OUT of {@link buildCreationConsoleQuestions}: nothing waits on an assumption, so listing it there would make\n * every reader of the queue — a count of what is blocked, an agent working the queue item by item — treat it\n * as an open question and put it to the person again. It is listed apart, to be revisited when they choose.\n */\nexport function buildCreationConsoleAssumptions(input: Pick<CreationConsoleQuestionInputs, 'dossier' | 'interviewDispositions'>): CreationConsole_Question[] {\n return input.dossier\n .filter((entry) => entry.standing === WorkbenchDossierEntryStanding.ASSUMED)\n .slice()\n .sort(byInterviewOrder)\n .map((entry) => interviewItem(entry, input.interviewDispositions));\n}\n\n/**\n * Everything waiting on the person, as ONE queue — in the order Home ranks it: what holds a live run\n * first (a clarification round, a parked coding worker), newest first; then the interview questions a\n * step can run as soon as they are answered; then the facts drafted documents still need.\n *\n * The selection is the projection's, never re-derived: a dossier entry is queued when it is\n * `askedNow`, a governance question when it is `askedNow`, a waiting run when its checkpoint is\n * READABLE (an unreadable checkpoint is a condition an operator inspects, not a question anyone can\n * answer — the same cut Home makes).\n */\nexport function buildCreationConsoleQuestions(input: CreationConsoleQuestionInputs): CreationConsole_Question[] {\n const blank = blankQuestion();\n\n const holdingARun: CreationConsole_Question[] = [];\n for (const waiting of input.waiting) {\n if (!waiting.readable || waiting.round === null) continue;\n holdingARun.push({\n ...blank,\n questionId: formatCreationConsoleQuestionId(CreationConsoleQuestionKind.CLARIFICATION, waiting.workbenchWaitingPlaybookRunId),\n kind: CreationConsoleQuestionKind.CLARIFICATION,\n askedAt: isoOrNull(waiting.suspendedAt),\n playbookRef: waiting.playbookRef,\n revision: String(waiting.round),\n fields: waiting.requests.map((request) => ({\n ref: request.ref,\n question: request.question,\n why: request.why,\n kind: request.kind,\n options: [...request.options],\n })),\n /*\n * A question routed to its run's starter (#1751) is theirs alone, and the console carries no person:\n * listed, so nothing waiting is hidden, and answered in the workbench as them.\n */\n actions: waiting.routedToUserId\n ? []\n : [CreationConsoleAnswerAction.ANSWER, CreationConsoleAnswerAction.DECLINE, CreationConsoleAnswerAction.CANCEL],\n routedToUserId: waiting.routedToUserId,\n producingFamily: waiting.family,\n dryRun: waiting.dryRun,\n });\n }\n for (const parked of input.parked) {\n holdingARun.push({\n ...blank,\n questionId: formatCreationConsoleQuestionId(CreationConsoleQuestionKind.PARKED_CODING_QUESTION, parked.workbenchParkedCodingQuestionId),\n kind: CreationConsoleQuestionKind.PARKED_CODING_QUESTION,\n askedAt: isoOrNull(parked.parkedAt),\n taskRef: parked.taskRef,\n revision: parked.suspensionRef,\n /* The agent asks ONE free-text question; the field ref is the one the workbench's gate answers under. */\n fields: [{ ref: WORKBENCH_PARKED_CODING_QUESTION_FIELD_REF, question: parked.question, why: null, kind: HumanDecision_FieldKind.FREE_TEXT, options: [] }],\n actions: [CreationConsoleAnswerAction.ANSWER, CreationConsoleAnswerAction.CANCEL],\n resumable: parked.resumable,\n });\n }\n holdingARun.sort((left, right) => compareNewestFirst(left.askedAt, right.askedAt));\n\n const interview: CreationConsole_Question[] = input.dossier\n .filter((entry) => entry.askedNow)\n .slice()\n .sort(byInterviewOrder)\n .map((entry) => interviewItem(entry, input.interviewDispositions));\n\n const governance: CreationConsole_Question[] = input.governance\n .filter((question) => question.askedNow)\n .map((question) => ({\n ...blank,\n questionId: formatCreationConsoleQuestionId(CreationConsoleQuestionKind.GOVERNANCE_FACT, question.workbenchGovernanceQuestionId),\n kind: CreationConsoleQuestionKind.GOVERNANCE_FACT,\n askedAt: null,\n definitionRef: question.definitionRef,\n fields: [{\n ref: question.questionRef,\n question: question.creatorPrompt,\n why: question.decisionPurpose,\n kind: question.answerKind,\n options: question.semanticOptions.map((option) => option.optionRef),\n }],\n /* Listed, never answered here — see `CreationConsoleQuestionKind.GOVERNANCE_FACT`. */\n actions: [],\n }));\n\n return [...holdingARun, ...interview, ...governance];\n}\n\n/**\n * Home's lines as FEED lines: each carries the row it points at, so a console reads a completed run's\n * verdict or a dispatch's error in the same read, and the id of the one question it is about, so the\n * console can answer it without a lookup.\n *\n * `resolveTarget` is the projection's row for (resource type, row id), or `null` when the row has gone\n * since the line was derived — a line whose target moved on is still a true line about the past.\n */\nexport function buildCreationConsoleFeed(\n lines: readonly Workbench_CreationHomeLine[],\n resolveTarget: (resourceType: string, resourceId: string) => Record<string, unknown> | null,\n): CreationConsole_FeedLine[] {\n return lines.map((line) => {\n const questionKind = QUESTION_KIND_BY_LINE_KIND[line.kind];\n return {\n lineId: line.workbenchCreationHomeLineId,\n section: line.section,\n kind: line.kind,\n at: isoOrNull(line.at),\n playbookRef: line.playbookRef,\n taskRef: line.taskRef,\n subject: line.subject,\n failed: line.failed,\n acceptable: line.acceptable,\n needsAnswers: line.needsAnswers,\n stuckReason: line.stuckReason,\n targetResourceType: line.targetResourceType,\n targetResourceId: line.targetResourceId,\n target: resolveTarget(line.targetResourceType, line.targetResourceId),\n questionId: questionKind ? formatCreationConsoleQuestionId(questionKind, line.targetResourceId) : null,\n };\n });\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"creation-home-projection.companion.d.ts","sourceRoot":"","sources":["../../../../../../src/core/introspection/resources/creation-home-projection.companion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,MAAM,oDAAoD,CAAC;AACpG,OAAO,EAGL,4BAA4B,EAG5B,wBAAwB,EAGxB,mCAAmC,EAEnC,KAAK,uBAAuB,EAC5B,KAAK,2BAA2B,EAChC,KAAK,uBAAuB,EAC5B,KAAK,0BAA0B,EAC/B,KAAK,yBAAyB,EAC9B,KAAK,4BAA4B,EACjC,KAAK,8BAA8B,EACnC,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAC1B,KAAK,4BAA4B,EAClC,MAAM,gCAAgC,CAAC;AAExC;;;;;;;;;;;;;;;;GAgBG;AAEH,qFAAqF;AACrF,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,0BAA0B,EAAE,6BAA6B,CAAC,CAAC;AAClG,mFAAmF;AACnF,MAAM,MAAM,kBAAkB,GAAG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,CAAC,KAAK,EAAE,SAAS;QAAE,QAAQ,CAAC,MAAM,EAAE,4BAA4B,CAAA;KAAE,EAAE,CAAC;IAC7E;;;OAGG;IACH,QAAQ,CAAC,mBAAmB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAClD;AAED;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,qBAAqB,GAAG,SAAS,kBAAkB,EAAE,CAwDjG;AAED,kFAAkF;AAClF,MAAM,MAAM,sBAAsB,GAAG,IAAI,CAAC,uBAAuB,EAAE,QAAQ,CAAC,CAAC"}
1
+ {"version":3,"file":"creation-home-projection.companion.d.ts","sourceRoot":"","sources":["../../../../../../src/core/introspection/resources/creation-home-projection.companion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,MAAM,oDAAoD,CAAC;AACpG,OAAO,EAGL,4BAA4B,EAG5B,wBAAwB,EAGxB,mCAAmC,EAEnC,KAAK,uBAAuB,EAC5B,KAAK,2BAA2B,EAChC,KAAK,uBAAuB,EAC5B,KAAK,0BAA0B,EAC/B,KAAK,yBAAyB,EAC9B,KAAK,4BAA4B,EACjC,KAAK,8BAA8B,EACnC,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAC1B,KAAK,4BAA4B,EAClC,MAAM,gCAAgC,CAAC;AAExC;;;;;;;;;;;;;;;;GAgBG;AAEH,qFAAqF;AACrF,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,0BAA0B,EAAE,6BAA6B,CAAC,CAAC;AAClG,mFAAmF;AACnF,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,yBAAyB,EAAE,4BAA4B,CAAC,CAAC;AAE/F,4EAA4E;AAC5E,eAAO,MAAM,8BAA8B,IAAI,CAAC;AA0BhD,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,IAAI,EAAE,SAAS,qBAAqB,EAAE,CAAC;IAChD,QAAQ,CAAC,UAAU,EAAE,SAAS,uBAAuB,EAA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,GAAG,SAAS,kBAAkB,EAAE,CAwDjG;AAED,kFAAkF;AAClF,MAAM,MAAM,sBAAsB,GAAG,IAAI,CAAC,uBAAuB,EAAE,QAAQ,CAAC,CAAC"}
@@ -168,6 +168,8 @@ export const OUTCOME_BY_FAMILY = {
168
168
  [ApplicationSpecificationFamily.BUSINESS_MODEL]: WorkbenchCreationOutcome.KNOW_WHAT_WE_BUILD,
169
169
  [ApplicationSpecificationFamily.ROADMAP]: WorkbenchCreationOutcome.KNOW_WHAT_WE_BUILD,
170
170
  [ApplicationSpecificationFamily.BRAND_BRIEF]: WorkbenchCreationOutcome.KNOW_WHAT_WE_BUILD,
171
+ /* KNOW_WHAT_WE_BUILD with the brand it names: the name is part of what the product IS. */
172
+ [ApplicationSpecificationFamily.BRAND_NAME_SCREENING]: WorkbenchCreationOutcome.KNOW_WHAT_WE_BUILD,
171
173
  [ApplicationSpecificationFamily.COMPLIANCE_PROGRAM]: WorkbenchCreationOutcome.KNOW_THE_RULES,
172
174
  [ApplicationSpecificationFamily.COMPLIANCE_DOCUMENT_CANDIDATE]: WorkbenchCreationOutcome.KNOW_THE_RULES,
173
175
  [ApplicationSpecificationFamily.COMPLIANCE_DOCUMENT_CANDIDATE_SET]: WorkbenchCreationOutcome.KNOW_THE_RULES,