@wildo-ai/dev-companion 1.1.14 → 1.1.16

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 (191) hide show
  1. package/dist/esm/.tsbuildinfo +1 -1
  2. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.d.ts +233 -6
  3. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.d.ts.map +1 -1
  4. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.js +316 -13
  5. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.js.map +1 -1
  6. package/dist/esm/claude-cli/models/concurrent-coding-runs.models.d.ts +48 -2
  7. package/dist/esm/claude-cli/models/concurrent-coding-runs.models.d.ts.map +1 -1
  8. package/dist/esm/claude-cli/models/concurrent-coding-runs.models.js +41 -3
  9. package/dist/esm/claude-cli/models/concurrent-coding-runs.models.js.map +1 -1
  10. package/dist/esm/claude-cli/models/isolated-recheck-interference.models.d.ts +68 -0
  11. package/dist/esm/claude-cli/models/isolated-recheck-interference.models.d.ts.map +1 -0
  12. package/dist/esm/claude-cli/models/isolated-recheck-interference.models.js +198 -0
  13. package/dist/esm/claude-cli/models/isolated-recheck-interference.models.js.map +1 -0
  14. package/dist/esm/claude-cli/models/shared-tree-reconciliation.models.d.ts +6 -0
  15. package/dist/esm/claude-cli/models/shared-tree-reconciliation.models.d.ts.map +1 -1
  16. package/dist/esm/claude-cli/models/shared-tree-reconciliation.models.js.map +1 -1
  17. package/dist/esm/claude-cli/models/verification-tool-availability.models.d.ts +19 -5
  18. package/dist/esm/claude-cli/models/verification-tool-availability.models.d.ts.map +1 -1
  19. package/dist/esm/claude-cli/models/verification-tool-availability.models.js +17 -5
  20. package/dist/esm/claude-cli/models/verification-tool-availability.models.js.map +1 -1
  21. package/dist/esm/claude-cli/models/workspace-path-claims.models.d.ts +138 -0
  22. package/dist/esm/claude-cli/models/workspace-path-claims.models.d.ts.map +1 -0
  23. package/dist/esm/claude-cli/models/workspace-path-claims.models.js +204 -0
  24. package/dist/esm/claude-cli/models/workspace-path-claims.models.js.map +1 -0
  25. package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.d.ts +36 -1
  26. package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.d.ts.map +1 -1
  27. package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.js +71 -16
  28. package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.js.map +1 -1
  29. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.d.ts +234 -9
  30. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.d.ts.map +1 -1
  31. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.js +1073 -182
  32. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.js.map +1 -1
  33. package/dist/esm/claude-cli/services/research-evidence-store.companion.d.ts +14 -0
  34. package/dist/esm/claude-cli/services/research-evidence-store.companion.d.ts.map +1 -1
  35. package/dist/esm/claude-cli/services/research-evidence-store.companion.js +35 -0
  36. package/dist/esm/claude-cli/services/research-evidence-store.companion.js.map +1 -1
  37. package/dist/esm/claude-cli/services/unrecorded-provider-directories.companion.d.ts +36 -0
  38. package/dist/esm/claude-cli/services/unrecorded-provider-directories.companion.d.ts.map +1 -0
  39. package/dist/esm/claude-cli/services/unrecorded-provider-directories.companion.js +134 -0
  40. package/dist/esm/claude-cli/services/unrecorded-provider-directories.companion.js.map +1 -0
  41. package/dist/esm/companion-api/controllers/companion.controller.d.ts.map +1 -1
  42. package/dist/esm/companion-api/controllers/companion.controller.js +7 -1
  43. package/dist/esm/companion-api/controllers/companion.controller.js.map +1 -1
  44. package/dist/esm/core/introspection/resources/creation-home-projection.companion.js +1 -1
  45. package/dist/esm/core/introspection/resources/creation-home-projection.companion.js.map +1 -1
  46. package/dist/esm/core/introspection/services/translation-placement.companion.service.d.ts +3 -2
  47. package/dist/esm/core/introspection/services/translation-placement.companion.service.d.ts.map +1 -1
  48. package/dist/esm/core/introspection/services/translation-placement.companion.service.js.map +1 -1
  49. package/dist/esm/core/introspection/subprocess/app-shell-placement-content.behavior.d.ts +13 -0
  50. package/dist/esm/core/introspection/subprocess/app-shell-placement-content.behavior.d.ts.map +1 -1
  51. package/dist/esm/core/introspection/subprocess/app-shell-placement-content.behavior.js +98 -16
  52. package/dist/esm/core/introspection/subprocess/app-shell-placement-content.behavior.js.map +1 -1
  53. package/dist/esm/core/introspection/subprocess/companion-introspection-behavior-handlers.d.ts.map +1 -1
  54. package/dist/esm/core/introspection/subprocess/companion-introspection-behavior-handlers.js +24 -14
  55. package/dist/esm/core/introspection/subprocess/companion-introspection-behavior-handlers.js.map +1 -1
  56. package/dist/esm/core/introspection/workspace-element-index.companion.d.ts +42 -0
  57. package/dist/esm/core/introspection/workspace-element-index.companion.d.ts.map +1 -1
  58. package/dist/esm/core/introspection/workspace-element-index.companion.js +42 -0
  59. package/dist/esm/core/introspection/workspace-element-index.companion.js.map +1 -1
  60. package/dist/esm/core/runtime/dev-compile-quiet.companion.d.ts +53 -0
  61. package/dist/esm/core/runtime/dev-compile-quiet.companion.d.ts.map +1 -1
  62. package/dist/esm/core/runtime/dev-compile-quiet.companion.js +119 -2
  63. package/dist/esm/core/runtime/dev-compile-quiet.companion.js.map +1 -1
  64. package/dist/esm/core/runtime/services/start-companion-application.service.d.ts.map +1 -1
  65. package/dist/esm/core/runtime/services/start-companion-application.service.js +13 -1
  66. package/dist/esm/core/runtime/services/start-companion-application.service.js.map +1 -1
  67. package/dist/esm/core/runtime/utils/companion-platform-config.companion.d.ts +2 -2
  68. package/dist/esm/core/runtime/utils/companion-platform-config.companion.d.ts.map +1 -1
  69. package/dist/esm/core/runtime/utils/companion-platform-config.companion.js +6 -6
  70. package/dist/esm/core/runtime/utils/companion-platform-config.companion.js.map +1 -1
  71. package/dist/esm/email/services/email-template.companion.service.d.ts +5 -0
  72. package/dist/esm/email/services/email-template.companion.service.d.ts.map +1 -1
  73. package/dist/esm/email/services/email-template.companion.service.js +44 -11
  74. package/dist/esm/email/services/email-template.companion.service.js.map +1 -1
  75. package/dist/esm/email/utils/email-template-fs-discovery.utils.d.ts +26 -2
  76. package/dist/esm/email/utils/email-template-fs-discovery.utils.d.ts.map +1 -1
  77. package/dist/esm/email/utils/email-template-fs-discovery.utils.js +41 -2
  78. package/dist/esm/email/utils/email-template-fs-discovery.utils.js.map +1 -1
  79. package/dist/esm/email/utils/email-template-scanner-calls.companion.utils.d.ts +19 -0
  80. package/dist/esm/email/utils/email-template-scanner-calls.companion.utils.d.ts.map +1 -0
  81. package/dist/esm/email/utils/email-template-scanner-calls.companion.utils.js +171 -0
  82. package/dist/esm/email/utils/email-template-scanner-calls.companion.utils.js.map +1 -0
  83. package/dist/esm/email/utils/module-email-root.companion.utils.d.ts +75 -0
  84. package/dist/esm/email/utils/module-email-root.companion.utils.d.ts.map +1 -0
  85. package/dist/esm/email/utils/module-email-root.companion.utils.js +162 -0
  86. package/dist/esm/email/utils/module-email-root.companion.utils.js.map +1 -0
  87. package/dist/esm/expert-personas/services/expert-persona.companion.service.d.ts +21 -1
  88. package/dist/esm/expert-personas/services/expert-persona.companion.service.d.ts.map +1 -1
  89. package/dist/esm/expert-personas/services/expert-persona.companion.service.js +35 -3
  90. package/dist/esm/expert-personas/services/expert-persona.companion.service.js.map +1 -1
  91. package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS.en.d.ts +62 -0
  92. package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS.en.d.ts.map +1 -0
  93. package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS.en.js +62 -0
  94. package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS.en.js.map +1 -0
  95. package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS.fr.d.ts +62 -0
  96. package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS.fr.d.ts.map +1 -0
  97. package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS.fr.js +62 -0
  98. package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS.fr.js.map +1 -0
  99. package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.en.d.ts +1 -0
  100. package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.en.d.ts.map +1 -1
  101. package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.en.js +1 -0
  102. package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.en.js.map +1 -1
  103. package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.fr.d.ts +1 -0
  104. package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.fr.d.ts.map +1 -1
  105. package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.fr.js +1 -0
  106. package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.fr.js.map +1 -1
  107. package/dist/esm/i18n/resources/workbenchAspects.en.d.ts.map +1 -1
  108. package/dist/esm/i18n/resources/workbenchAspects.en.js +4 -0
  109. package/dist/esm/i18n/resources/workbenchAspects.en.js.map +1 -1
  110. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.d.ts +35 -0
  111. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.d.ts.map +1 -1
  112. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.js +12 -0
  113. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.js.map +1 -1
  114. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.fr.d.ts +536 -531
  115. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.fr.d.ts.map +1 -1
  116. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.fr.js +536 -531
  117. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.fr.js.map +1 -1
  118. package/dist/esm/i18n/system_enums/workbench-build.en.d.ts +3 -3
  119. package/dist/esm/i18n/system_enums/workbench-build.en.js +3 -3
  120. package/dist/esm/i18n/system_enums/workbench-build.en.js.map +1 -1
  121. package/dist/esm/i18n-labelling/services/email-template-labelling-units.companion.service.d.ts.map +1 -1
  122. package/dist/esm/i18n-labelling/services/email-template-labelling-units.companion.service.js +7 -3
  123. package/dist/esm/i18n-labelling/services/email-template-labelling-units.companion.service.js.map +1 -1
  124. package/dist/esm/meta-workflows/models/carried-verification-failure.models.d.ts +23 -0
  125. package/dist/esm/meta-workflows/models/carried-verification-failure.models.d.ts.map +1 -1
  126. package/dist/esm/meta-workflows/models/carried-verification-failure.models.js +14 -0
  127. package/dist/esm/meta-workflows/models/carried-verification-failure.models.js.map +1 -1
  128. package/dist/esm/meta-workflows/models/creation-journey-timeline.models.d.ts +21 -1
  129. package/dist/esm/meta-workflows/models/creation-journey-timeline.models.d.ts.map +1 -1
  130. package/dist/esm/meta-workflows/models/creation-journey-timeline.models.js +117 -3
  131. package/dist/esm/meta-workflows/models/creation-journey-timeline.models.js.map +1 -1
  132. package/dist/esm/meta-workflows/services/application-assembly-checks.companion.utils.d.ts +5 -0
  133. package/dist/esm/meta-workflows/services/application-assembly-checks.companion.utils.d.ts.map +1 -1
  134. package/dist/esm/meta-workflows/services/application-assembly-checks.companion.utils.js +22 -1
  135. package/dist/esm/meta-workflows/services/application-assembly-checks.companion.utils.js.map +1 -1
  136. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts +98 -24
  137. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts.map +1 -1
  138. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.js +439 -93
  139. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.js.map +1 -1
  140. package/dist/esm/meta-workflows/services/application-build-follow-up-derivation.companion.d.ts +21 -8
  141. package/dist/esm/meta-workflows/services/application-build-follow-up-derivation.companion.d.ts.map +1 -1
  142. package/dist/esm/meta-workflows/services/application-build-follow-up-derivation.companion.js +74 -12
  143. package/dist/esm/meta-workflows/services/application-build-follow-up-derivation.companion.js.map +1 -1
  144. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.d.ts +47 -1
  145. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.d.ts.map +1 -1
  146. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.js +98 -9
  147. package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.js.map +1 -1
  148. package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.d.ts +39 -3
  149. package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.d.ts.map +1 -1
  150. package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.js +224 -48
  151. package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.js.map +1 -1
  152. package/dist/esm/meta-workflows/services/application-build-website-context.companion.service.d.ts +45 -0
  153. package/dist/esm/meta-workflows/services/application-build-website-context.companion.service.d.ts.map +1 -1
  154. package/dist/esm/meta-workflows/services/application-build-website-context.companion.service.js +74 -0
  155. package/dist/esm/meta-workflows/services/application-build-website-context.companion.service.js.map +1 -1
  156. package/dist/esm/meta-workflows/services/build-task-brief-application-facts.companion.d.ts +12 -0
  157. package/dist/esm/meta-workflows/services/build-task-brief-application-facts.companion.d.ts.map +1 -1
  158. package/dist/esm/meta-workflows/services/build-task-brief-application-facts.companion.js +30 -1
  159. package/dist/esm/meta-workflows/services/build-task-brief-application-facts.companion.js.map +1 -1
  160. package/dist/esm/meta-workflows/services/creation-run-report.companion.service.d.ts.map +1 -1
  161. package/dist/esm/meta-workflows/services/creation-run-report.companion.service.js +21 -2
  162. package/dist/esm/meta-workflows/services/creation-run-report.companion.service.js.map +1 -1
  163. package/dist/esm/meta-workflows/services/playbook-run.companion.service.d.ts +71 -5
  164. package/dist/esm/meta-workflows/services/playbook-run.companion.service.d.ts.map +1 -1
  165. package/dist/esm/meta-workflows/services/playbook-run.companion.service.js +219 -17
  166. package/dist/esm/meta-workflows/services/playbook-run.companion.service.js.map +1 -1
  167. package/dist/esm/meta-workflows/services/provider-registry-brief.companion.utils.d.ts +55 -1
  168. package/dist/esm/meta-workflows/services/provider-registry-brief.companion.utils.d.ts.map +1 -1
  169. package/dist/esm/meta-workflows/services/provider-registry-brief.companion.utils.js +157 -10
  170. package/dist/esm/meta-workflows/services/provider-registry-brief.companion.utils.js.map +1 -1
  171. package/dist/esm/meta-workflows/services/website-demo-facts.models.d.ts +19 -1
  172. package/dist/esm/meta-workflows/services/website-demo-facts.models.d.ts.map +1 -1
  173. package/dist/esm/meta-workflows/services/website-demo-facts.models.js +7 -5
  174. package/dist/esm/meta-workflows/services/website-demo-facts.models.js.map +1 -1
  175. package/dist/esm/module-layout/module-layout-convention.companion.d.ts +158 -0
  176. package/dist/esm/module-layout/module-layout-convention.companion.d.ts.map +1 -0
  177. package/dist/esm/module-layout/module-layout-convention.companion.js +272 -0
  178. package/dist/esm/module-layout/module-layout-convention.companion.js.map +1 -0
  179. package/dist/esm/module-layout/module-layout-inspection.companion.d.ts +42 -0
  180. package/dist/esm/module-layout/module-layout-inspection.companion.d.ts.map +1 -0
  181. package/dist/esm/module-layout/module-layout-inspection.companion.js +290 -0
  182. package/dist/esm/module-layout/module-layout-inspection.companion.js.map +1 -0
  183. package/dist/esm/module-layout/module-source-files.companion.d.ts +3 -0
  184. package/dist/esm/module-layout/module-source-files.companion.d.ts.map +1 -0
  185. package/dist/esm/module-layout/module-source-files.companion.js +45 -0
  186. package/dist/esm/module-layout/module-source-files.companion.js.map +1 -0
  187. package/dist/esm/technical-doc/services/technical-documentation-pilot.companion.service.d.ts +2 -0
  188. package/dist/esm/technical-doc/services/technical-documentation-pilot.companion.service.d.ts.map +1 -1
  189. package/dist/esm/technical-doc/services/technical-documentation-pilot.companion.service.js +3 -1
  190. package/dist/esm/technical-doc/services/technical-documentation-pilot.companion.service.js.map +1 -1
  191. package/package.json +17 -17
@@ -1 +1 @@
1
- {"version":3,"file":"creation-journey-timeline.models.js","sourceRoot":"","sources":["../../../../src/meta-workflows/models/creation-journey-timeline.models.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EACL,6BAA6B,EAC7B,gCAAgC,EAChC,4BAA4B,EAC5B,yCAAyC,EACzC,oBAAoB,GAMrB,MAAM,gCAAgC,CAAC;AA2DxC,kFAAkF;AAClF,SAAS,SAAS,CAAC,KAAyB;IAC1C,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC1C,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC7B,OAAO,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;AAC9C,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,mBAAmB,CAAC,OAAoC,EAAE,KAAa;IACrF,MAAM,aAAa,GAAG,SAAS,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAC9D,MAAM,UAAU,GAAG,SAAS,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IACjD,MAAM,UAAU,GAAG,aAAa,IAAI,UAAU,CAAC;IAC/C,IAAI,UAAU,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC/C,MAAM,YAAY,GAAG,aAAa,KAAK,SAAS,CAAC,CAAC,CAAC,6BAA6B,CAAC,WAAW,CAAC,CAAC,CAAC,6BAA6B,CAAC,SAAS,CAAC;IACvI,MAAM,SAAS,GAAG,SAAS,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAC/C,MAAM,QAAQ,GAAG,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAC/F,MAAM,eAAe,GAAG,QAAQ,KAAK,SAAS,CAA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CAAC,GAAG,IAAI,CAAC,oBAAoB,CAAC,EAAE,CAAC,CAAC;QAC5K,wBAAwB;QACxB,qBAAqB,EAAE,CAAC,GAAG,KAAK,CAAC,qBAAqB,CAAC;QACvD,UAAU,EAAE,CAAC,GAAG,KAAK,CAAC,UAAU,CAAC;KAClC,CAAC;AACJ,CAAC","sourcesContent":["import { FlowsActors_Status } from '@wildo-ai/saas-models';\nimport {\n BuildDispatchWaitMeasuredFrom,\n CREATION_JOURNEY_PHASE_LANE_REFS,\n CREATION_JOURNEY_PHASE_ORDER,\n CREATION_JOURNEY_SLOWEST_BUILD_TASK_COUNT,\n CreationJourneyPhase,\n type CreationJourney_BuildAttemptTiming,\n type CreationJourney_BuildPlanTask,\n type CreationJourney_PhaseSpan,\n type CreationJourney_SlowBuildTask,\n type CreationJourney_Timeline,\n} from '@wildo-ai/platform-core-shared';\n\n/**\n * The creation journey's timeline, derived from rows (#3206, epic #3204): per-phase spans, the wall clock, and the\n * build tasks that took longest, each split into its dispatch wait and its run time.\n *\n * Pure: the companion's run-report service reads the rows and the catalog, and this function decides nothing a row\n * does not say. Nothing is stored: the playbook runs' executions and each build attempt's row ARE the record, and a\n * restart loses no figure, because every instant used here is on a row (the attempt's preparation start since #3206).\n */\n\n/** One playbook run as the timeline reads it: its execution row's instants and status. */\nexport interface CreationJourneyPlaybookRun {\n readonly runId: string;\n readonly playbookRef: string;\n readonly startedAt: string;\n readonly finishedAt?: string;\n readonly status: FlowsActors_Status;\n /** When it stopped to ask a person, for a run waiting on one. */\n readonly suspendedAt?: string;\n}\n\n/**\n * One build-task attempt's instants, as its execution and task rows record them.\n *\n * - `selectedAt` — the execution row's creation: the task was chosen and its brief composed.\n * - `preparationStartedAt` — the door that dispatched it began preparing it: a wave's slot, or a single-task door's\n * read of the plan (stamped on the task's input since #3206; absent only on an older row).\n * - `admittedAt` — the task row's start instant: the coding lane admitted the run, or a generation step began.\n * Absent for a run that never started (a refusal at admission).\n * - `settledAt` — the execution's finish instant; absent while it waits or runs.\n */\nexport interface CreationJourneyBuildAttempt {\n readonly taskRef: string;\n readonly selectedAt: string;\n readonly preparationStartedAt?: string;\n readonly admittedAt?: string;\n readonly settledAt?: string;\n /** When it parked on a question to a person, for an attempt that is waiting on one now. */\n readonly waitingOnPersonSince?: string;\n /**\n * The startup sweep of a later companion process settled it: `settledAt` is that restart, not when the run stopped,\n * which no row records. Its time is still counted, and marked.\n */\n readonly endedByCompanionRestart: boolean;\n readonly generationStep: boolean;\n}\n\n/** One attempt's time, split. */\nexport interface BuildAttemptTiming {\n readonly startedAtMs: number;\n readonly endedAtMs: number;\n readonly dispatchWaitMs: number;\n readonly runMs: number;\n readonly measuredFrom: BuildDispatchWaitMeasuredFrom;\n readonly inFlight: boolean;\n readonly waitingOnPerson: boolean;\n}\n\n/** Milliseconds of an ISO instant, or `undefined` for one that does not parse. */\nfunction instantMs(value: string | undefined): number | undefined {\n if (value === undefined) return undefined;\n const ms = Date.parse(value);\n return Number.isFinite(ms) ? ms : undefined;\n}\n\n/**\n * Split one attempt's time into the wait for its dispatch and its run.\n *\n * The wait runs from the slot's preparation start (else the row's opening, a floor) to admission; the run from\n * admission to settling. An attempt that was never admitted spent all its time waiting: it is a selection that never\n * became a run, and that time is exactly the gap #3206 could not see. An attempt parked on a question ends where it\n * parked: the time since is a person's, as a playbook run waiting on one is. Instants that disagree (an admission\n * recorded before its own preparation) are clamped rather than producing a negative duration. `undefined` when the\n * attempt carries no readable start.\n */\nexport function measureBuildAttempt(attempt: CreationJourneyBuildAttempt, nowMs: number): BuildAttemptTiming | undefined {\n const preparationMs = instantMs(attempt.preparationStartedAt);\n const selectedMs = instantMs(attempt.selectedAt);\n const waitFromMs = preparationMs ?? selectedMs;\n if (waitFromMs === undefined) return undefined;\n const measuredFrom = preparationMs !== undefined ? BuildDispatchWaitMeasuredFrom.PREPARATION : BuildDispatchWaitMeasuredFrom.SELECTION;\n const settledMs = instantMs(attempt.settledAt);\n const parkedMs = settledMs === undefined ? instantMs(attempt.waitingOnPersonSince) : undefined;\n const waitingOnPerson = parkedMs !== undefined;\n const inFlight = settledMs === undefined && !waitingOnPerson;\n const endedAtMs = Math.max(waitFromMs, settledMs ?? parkedMs ?? nowMs);\n const admittedMs = instantMs(attempt.admittedAt);\n if (admittedMs === undefined) {\n return { startedAtMs: waitFromMs, endedAtMs, dispatchWaitMs: endedAtMs - waitFromMs, runMs: 0, measuredFrom, inFlight, waitingOnPerson };\n }\n const admittedClampedMs = Math.min(Math.max(admittedMs, waitFromMs), endedAtMs);\n return {\n startedAtMs: waitFromMs,\n endedAtMs,\n dispatchWaitMs: admittedClampedMs - waitFromMs,\n runMs: endedAtMs - admittedClampedMs,\n measuredFrom,\n inFlight,\n waitingOnPerson,\n };\n}\n\n/**\n * Which phase each playbook ref is the work of: every ref a lane's choreography admits, transitively, and the lane\n * itself. A ref two lanes admit is placed in NEITHER and reported: its row names no lane (a nested run records only\n * its tree's root, the umbrella), so placing it would be a guess. One since 2026-11-06: `top_down.expert-personas`, which\n * the conception lane staffs with and the build lane re-runs when a panel's charters go stale (#3204).\n */\nexport function classifyPlaybookRefsByJourneyPhase(admitsOf: (ref: string) => readonly string[]): {\n readonly phaseOf: ReadonlyMap<string, CreationJourneyPhase>;\n readonly ambiguousPlaybookRefs: readonly string[];\n} {\n const lanesOf = new Map<string, CreationJourneyPhase[]>();\n for (const phase of CREATION_JOURNEY_PHASE_ORDER) {\n const seen = new Set<string>();\n const pending = [CREATION_JOURNEY_PHASE_LANE_REFS[phase]];\n while (pending.length > 0) {\n const ref = pending.pop()!;\n if (seen.has(ref)) continue;\n seen.add(ref);\n pending.push(...admitsOf(ref));\n }\n for (const ref of seen) lanesOf.set(ref, [...(lanesOf.get(ref) ?? []), phase]);\n }\n const phaseOf = new Map<string, CreationJourneyPhase>();\n const ambiguousPlaybookRefs: string[] = [];\n for (const [ref, phases] of lanesOf) {\n if (phases.length === 1) phaseOf.set(ref, phases[0]!);\n else ambiguousPlaybookRefs.push(ref);\n }\n return { phaseOf, ambiguousPlaybookRefs: ambiguousPlaybookRefs.sort() };\n}\n\n/** A span being accumulated. */\ninterface SpanAccumulator {\n startMs?: number;\n endMs?: number;\n inFlight: boolean;\n waitingOnPerson: boolean;\n playbookRuns: number;\n buildAttempts: number;\n}\n\nfunction widen(span: SpanAccumulator, startMs: number, endMs: number): void {\n span.startMs = span.startMs === undefined ? startMs : Math.min(span.startMs, startMs);\n span.endMs = span.endMs === undefined ? endMs : Math.max(span.endMs, endMs);\n}\n\n/** Whether a row still has work under way: PENDING (selected, not started) or PROCESSING. */\nfunction isUnderWay(status: FlowsActors_Status): boolean {\n return status === FlowsActors_Status.PENDING || status === FlowsActors_Status.PROCESSING;\n}\n\n/**\n * The window of one playbook run: its row's creation to its finish. One still under way ends at the read's instant;\n * one waiting on a person ends where it began waiting (time spent waiting for an answer is the person's, and the\n * phase is marked as waiting rather than stretched to now).\n */\nfunction playbookRunWindow(run: CreationJourneyPlaybookRun, nowMs: number): { startMs: number; endMs: number; inFlight: boolean; waitingOnPerson: boolean } | undefined {\n const startMs = instantMs(run.startedAt);\n if (startMs === undefined) return undefined;\n if (isUnderWay(run.status)) return { startMs, endMs: Math.max(startMs, nowMs), inFlight: true, waitingOnPerson: false };\n if (run.status === FlowsActors_Status.AWAITING_APPROVAL) {\n return { startMs, endMs: Math.max(startMs, instantMs(run.suspendedAt) ?? startMs), inFlight: false, waitingOnPerson: true };\n }\n return { startMs, endMs: Math.max(startMs, instantMs(run.finishedAt) ?? startMs), inFlight: false, waitingOnPerson: false };\n}\n\n/**\n * Derive the timeline: each phase's first start to its last settle, the wall clock over everything, and the\n * {@link CREATION_JOURNEY_SLOWEST_BUILD_TASK_COUNT} build tasks with the most wait plus run time.\n *\n * The BUILD phase's span covers its lane's playbook runs AND every build-task attempt, whoever started it: a single-task\n * dispatch (`wildo build run --single`, the workbench, a named run) starts no build-lane playbook, and its runs are\n * still the build. The wall clock covers every playbook run (a phase's or not) and every attempt.\n *\n * A run a companion restart ended is measured to that restart, because no row records when it really stopped: a build\n * attempt says so on its task line, and a playbook run cannot, so a phase that a restart interrupted may run long.\n */\nexport function deriveCreationJourneyTimeline(input: {\n readonly now: Date;\n readonly playbookRuns: readonly CreationJourneyPlaybookRun[];\n readonly buildAttempts: readonly CreationJourneyBuildAttempt[];\n readonly phaseOf: ReadonlyMap<string, CreationJourneyPhase>;\n readonly ambiguousPlaybookRefs: readonly string[];\n /** The accepted build plan's graph, carried through for a budget reader; NULL when there is none or it is unreadable. */\n readonly buildPlanGraph: readonly CreationJourney_BuildPlanTask[] | null;\n readonly notChecked: readonly string[];\n}): CreationJourney_Timeline {\n const nowMs = input.now.getTime();\n const spans = new Map<CreationJourneyPhase, SpanAccumulator>(\n CREATION_JOURNEY_PHASE_ORDER.map((phase) => [phase, { inFlight: false, waitingOnPerson: false, playbookRuns: 0, buildAttempts: 0 }]),\n );\n const wall: SpanAccumulator = { inFlight: false, waitingOnPerson: false, playbookRuns: 0, buildAttempts: 0 };\n let outsidePhasePlaybookRuns = 0;\n\n for (const run of input.playbookRuns) {\n const window = playbookRunWindow(run, nowMs);\n if (window === undefined) continue;\n widen(wall, window.startMs, window.endMs);\n wall.inFlight ||= window.inFlight;\n const phase = input.phaseOf.get(run.playbookRef);\n if (phase === undefined) {\n outsidePhasePlaybookRuns += 1;\n continue;\n }\n const span = spans.get(phase)!;\n widen(span, window.startMs, window.endMs);\n span.inFlight ||= window.inFlight;\n span.waitingOnPerson ||= window.waitingOnPerson;\n span.playbookRuns += 1;\n }\n\n const byTask = new Map<string, {\n attempts: number; dispatchWaitMs: number; runMs: number; fromSelection: boolean; inFlight: boolean; waitingOnPerson: boolean;\n endedByCompanionRestart: boolean; generationStep: boolean;\n }>();\n const build = spans.get(CreationJourneyPhase.BUILD)!;\n const attemptTimings: { readonly startedAtMs: number; readonly entry: CreationJourney_BuildAttemptTiming }[] = [];\n for (const attempt of input.buildAttempts) {\n const timing = measureBuildAttempt(attempt, nowMs);\n if (timing === undefined) continue;\n /*\n * The same split as the task totals below, per attempt (#3204's budget): a p95 is a statement about attempts, and a\n * task's sum over several attempts would hide a fast retry behind a slow first run. The admission instant is the\n * clamped one the split used, so `startedAt + dispatchWaitMs` is always `admittedAt`.\n */\n const admittedAtMs = instantMs(attempt.admittedAt) === undefined ? undefined : timing.startedAtMs + timing.dispatchWaitMs;\n attemptTimings.push({\n startedAtMs: timing.startedAtMs,\n entry: {\n taskRef: attempt.taskRef,\n startedAt: new Date(timing.startedAtMs).toISOString(),\n ...(admittedAtMs !== undefined ? { admittedAt: new Date(admittedAtMs).toISOString() } : {}),\n endedAt: new Date(timing.endedAtMs).toISOString(),\n dispatchWaitMs: timing.dispatchWaitMs,\n runMs: timing.runMs,\n dispatchWaitMeasuredFrom: timing.measuredFrom,\n inFlight: timing.inFlight,\n waitingOnPerson: timing.waitingOnPerson,\n endedByCompanionRestart: attempt.endedByCompanionRestart,\n generationStep: attempt.generationStep,\n },\n });\n widen(build, timing.startedAtMs, timing.endedAtMs);\n widen(wall, timing.startedAtMs, timing.endedAtMs);\n build.inFlight ||= timing.inFlight;\n build.waitingOnPerson ||= timing.waitingOnPerson;\n wall.inFlight ||= timing.inFlight;\n build.buildAttempts += 1;\n const task = byTask.get(attempt.taskRef) ?? {\n attempts: 0, dispatchWaitMs: 0, runMs: 0, fromSelection: false, inFlight: false, waitingOnPerson: false, endedByCompanionRestart: false, generationStep: false,\n };\n task.attempts += 1;\n task.dispatchWaitMs += timing.dispatchWaitMs;\n task.runMs += timing.runMs;\n task.fromSelection ||= timing.measuredFrom === BuildDispatchWaitMeasuredFrom.SELECTION;\n task.inFlight ||= timing.inFlight;\n task.waitingOnPerson ||= timing.waitingOnPerson;\n task.endedByCompanionRestart ||= attempt.endedByCompanionRestart;\n task.generationStep ||= attempt.generationStep;\n byTask.set(attempt.taskRef, task);\n }\n\n const phases: CreationJourney_PhaseSpan[] = CREATION_JOURNEY_PHASE_ORDER.map((phase) => {\n const span = spans.get(phase)!;\n const ran = span.startMs !== undefined && span.endMs !== undefined;\n return {\n phase,\n laneRef: CREATION_JOURNEY_PHASE_LANE_REFS[phase],\n ...(ran ? { startedAt: new Date(span.startMs!).toISOString(), endedAt: new Date(span.endMs!).toISOString(), durationMs: span.endMs! - span.startMs! } : {}),\n inFlight: span.inFlight,\n waitingOnPerson: span.waitingOnPerson,\n playbookRuns: span.playbookRuns,\n buildAttempts: span.buildAttempts,\n };\n });\n\n const slowestBuildTasks: CreationJourney_SlowBuildTask[] = [...byTask]\n .map(([taskRef, task]) => ({\n taskRef,\n attempts: task.attempts,\n dispatchWaitMs: task.dispatchWaitMs,\n runMs: task.runMs,\n totalMs: task.dispatchWaitMs + task.runMs,\n dispatchWaitMeasuredFrom: task.fromSelection ? BuildDispatchWaitMeasuredFrom.SELECTION : BuildDispatchWaitMeasuredFrom.PREPARATION,\n inFlight: task.inFlight,\n waitingOnPerson: task.waitingOnPerson,\n endedByCompanionRestart: task.endedByCompanionRestart,\n generationStep: task.generationStep,\n }))\n .sort((left, right) => right.totalMs - left.totalMs || left.taskRef.localeCompare(right.taskRef))\n .slice(0, CREATION_JOURNEY_SLOWEST_BUILD_TASK_COUNT);\n\n return {\n generatedAt: input.now.toISOString(),\n wallClock: wall.startMs === undefined || wall.endMs === undefined ? null : {\n startedAt: new Date(wall.startMs).toISOString(),\n endedAt: new Date(wall.endMs).toISOString(),\n durationMs: wall.endMs - wall.startMs,\n inFlight: wall.inFlight,\n },\n phases,\n slowestBuildTasks,\n attemptedBuildTasks: byTask.size,\n buildAttemptTimings: attemptTimings\n .sort((left, right) => left.startedAtMs - right.startedAtMs || left.entry.taskRef.localeCompare(right.entry.taskRef))\n .map(({ entry }) => entry),\n buildPlanGraph: input.buildPlanGraph === null ? null : input.buildPlanGraph.map((task) => ({ taskRef: task.taskRef, prerequisiteTaskRefs: [...task.prerequisiteTaskRefs] })),\n outsidePhasePlaybookRuns,\n ambiguousPlaybookRefs: [...input.ambiguousPlaybookRefs],\n notChecked: [...input.notChecked],\n };\n}\n"]}
1
+ {"version":3,"file":"creation-journey-timeline.models.js","sourceRoot":"","sources":["../../../../src/meta-workflows/models/creation-journey-timeline.models.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAsB,MAAM,wCAAwC,CAAC;AACtG,OAAO,EACL,6BAA6B,EAC7B,gCAAgC,EAChC,4BAA4B,EAC5B,yCAAyC,EACzC,oBAAoB,GAQrB,MAAM,gCAAgC,CAAC;AA+BxC;;;;GAIG;AACH,SAAS,eAAe,CAAC,KAA0C;IACjE,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,WAAW,KAAK,wBAAwB,CAAC,QAAQ,IAAI,CAAC,KAAK,CAAC,UAAU,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC;AAChJ,CAAC;AAED,+HAA+H;AAC/H,SAAS,qBAAqB,CAAC,KAA0C;IACvE,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,WAAW,KAAK,wBAAwB,CAAC,YAAY,CAAC;AAC5F,CAAC;AAuCD,kFAAkF;AAClF,SAAS,SAAS,CAAC,KAAyB;IAC1C,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC1C,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC7B,OAAO,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;AAC9C,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,mBAAmB,CAAC,OAAoC,EAAE,KAAa;IACrF,MAAM,aAAa,GAAG,SAAS,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAC9D,MAAM,UAAU,GAAG,SAAS,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IACjD,MAAM,UAAU,GAAG,aAAa,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I,CAAC,CAAC,CAAC;YACzE,SAAS,EAAE,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,WAAW,EAAE;YAC/C,OAAO,EAAE,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,WAAW,EAAE;YAC3C,UAAU,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,OAAO;YACrC,QAAQ,EAAE,IAAI,CAAC,QAAQ;SACxB;QACD,MAAM;QACN,iBAAiB;QACjB,mBAAmB,EAAE,MAAM,CAAC,IAAI;QAChC,mBAAmB,EAAE,cAAc;aAChC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,WAAW,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;aACpH,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC;QAC5B,cAAc,EAAE,KAAK,CAAC,cAAc,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,oBAAoB,EAAE,CAAC,GAAG,IAAI,CAAC,oBAAoB,CAAC,EAAE,CAAC,CAAC;QAC5K,wBAAwB;QACxB,qBAAqB,EAAE,CAAC,GAAG,KAAK,CAAC,qBAAqB,CAAC;QACvD,UAAU,EAAE,CAAC,GAAG,KAAK,CAAC,UAAU,CAAC;KAClC,CAAC;AACJ,CAAC","sourcesContent":["import { FlowsActors_Status } from '@wildo-ai/saas-models';\nimport { PlaybookSpendMeasurement, type PlaybookSpend } from '@wildo-ai/application-creation-runtime';\nimport {\n BuildDispatchWaitMeasuredFrom,\n CREATION_JOURNEY_PHASE_LANE_REFS,\n CREATION_JOURNEY_PHASE_ORDER,\n CREATION_JOURNEY_SLOWEST_BUILD_TASK_COUNT,\n CreationJourneyPhase,\n type CreationJourney_BuildAttemptTiming,\n type CreationJourney_BuildPlanTask,\n type CreationJourney_PhaseFirstPass,\n type CreationJourney_PhaseRefreshes,\n type CreationJourney_PhaseSpan,\n type CreationJourney_SlowBuildTask,\n type CreationJourney_Timeline,\n} from '@wildo-ai/platform-core-shared';\n\n/**\n * The creation journey's timeline, derived from rows (#3206, epic #3204): per-phase spans, the wall clock, and the\n * build tasks that took longest, each split into its dispatch wait and its run time.\n *\n * Pure: the companion's run-report service reads the rows and the catalog, and this function decides nothing a row\n * does not say. Nothing is stored: the playbook runs' executions and each build attempt's row ARE the record, and a\n * restart loses no figure, because every instant used here is on a row (the attempt's preparation start since #3206).\n */\n\n/** One playbook run as the timeline reads it: its execution row's instants and status. */\nexport interface CreationJourneyPlaybookRun {\n readonly runId: string;\n readonly playbookRef: string;\n readonly startedAt: string;\n readonly finishedAt?: string;\n readonly status: FlowsActors_Status;\n /** When it stopped to ask a person, for a run waiting on one. */\n readonly suspendedAt?: string;\n /** The instance of a keyed playbook (`refs.instanceKey`): two instances are two deliveries, never a refresh of each other. */\n readonly instanceKey?: string;\n /** The root of the tree it ran in (`refs.rootRunId`), for a nested run: its spend is inside that root's whenever a meter observed the root. */\n readonly rootRunId?: string;\n /**\n * Its recorded spend (#4016), when its row carries a measurement: how much of it is known, the calls a meter saw, and\n * the cost they reported. An absent `cost` is \"no call reported a cost\", never \"cost nothing\" ({@link PlaybookSpend}).\n */\n readonly spend?: Pick<PlaybookSpend, 'measurement' | 'modelCalls' | 'cost'>;\n}\n\n/**\n * Whether a run's recorded spend is its WHOLE cost (#4016): measured in full, and either no call was made or the calls\n * reported a cost. Anything else (no record, a PARTIAL or unobserved measurement, calls that reported tokens and no price)\n * leaves the sum a floor.\n */\nfunction spendIsComplete(spend: CreationJourneyPlaybookRun['spend']): boolean {\n return spend !== undefined && spend.measurement === PlaybookSpendMeasurement.MEASURED && (spend.modelCalls === 0 || spend.cost !== undefined);\n}\n\n/** Whether a root's recorded spend holds what its nested runs spent: a meter observed it, so their calls are counted there. */\nfunction spendCoversNestedRuns(spend: CreationJourneyPlaybookRun['spend']): boolean {\n return spend !== undefined && spend.measurement !== PlaybookSpendMeasurement.NOT_OBSERVED;\n}\n\n/**\n * One build-task attempt's instants, as its execution and task rows record them.\n *\n * - `selectedAt` — the execution row's creation: the task was chosen and its brief composed.\n * - `preparationStartedAt` — the door that dispatched it began preparing it: a wave's slot, or a single-task door's\n * read of the plan (stamped on the task's input since #3206; absent only on an older row).\n * - `admittedAt` — the task row's start instant: the coding lane admitted the run, or a generation step began.\n * Absent for a run that never started (a refusal at admission).\n * - `settledAt` — the execution's finish instant; absent while it waits or runs.\n */\nexport interface CreationJourneyBuildAttempt {\n readonly taskRef: string;\n readonly selectedAt: string;\n readonly preparationStartedAt?: string;\n readonly admittedAt?: string;\n readonly settledAt?: string;\n /** When it parked on a question to a person, for an attempt that is waiting on one now. */\n readonly waitingOnPersonSince?: string;\n /**\n * The startup sweep of a later companion process settled it: `settledAt` is that restart, not when the run stopped,\n * which no row records. Its time is still counted, and marked.\n */\n readonly endedByCompanionRestart: boolean;\n readonly generationStep: boolean;\n}\n\n/** One attempt's time, split. */\nexport interface BuildAttemptTiming {\n readonly startedAtMs: number;\n readonly endedAtMs: number;\n readonly dispatchWaitMs: number;\n readonly runMs: number;\n readonly measuredFrom: BuildDispatchWaitMeasuredFrom;\n readonly inFlight: boolean;\n readonly waitingOnPerson: boolean;\n}\n\n/** Milliseconds of an ISO instant, or `undefined` for one that does not parse. */\nfunction instantMs(value: string | undefined): number | undefined {\n if (value === undefined) return undefined;\n const ms = Date.parse(value);\n return Number.isFinite(ms) ? ms : undefined;\n}\n\n/**\n * Split one attempt's time into the wait for its dispatch and its run.\n *\n * The wait runs from the slot's preparation start (else the row's opening, a floor) to admission; the run from\n * admission to settling. An attempt that was never admitted spent all its time waiting: it is a selection that never\n * became a run, and that time is exactly the gap #3206 could not see. An attempt parked on a question ends where it\n * parked: the time since is a person's, as a playbook run waiting on one is. Instants that disagree (an admission\n * recorded before its own preparation) are clamped rather than producing a negative duration. `undefined` when the\n * attempt carries no readable start.\n */\nexport function measureBuildAttempt(attempt: CreationJourneyBuildAttempt, nowMs: number): BuildAttemptTiming | undefined {\n const preparationMs = instantMs(attempt.preparationStartedAt);\n const selectedMs = instantMs(attempt.selectedAt);\n const waitFromMs = preparationMs ?? selectedMs;\n if (waitFromMs === undefined) return undefined;\n const measuredFrom = preparationMs !== undefined ? BuildDispatchWaitMeasuredFrom.PREPARATION : BuildDispatchWaitMeasuredFrom.SELECTION;\n const settledMs = instantMs(attempt.settledAt);\n const parkedMs = settledMs === undefined ? instantMs(attempt.waitingOnPersonSince) : undefined;\n const waitingOnPerson = parkedMs !== undefined;\n const inFlight = settledMs === undefined && !waitingOnPerson;\n const endedAtMs = Math.max(waitFromMs, settledMs ?? parkedMs ?? nowMs);\n const admittedMs = instantMs(attempt.admittedAt);\n if (admittedMs === undefined) {\n return { startedAtMs: waitFromMs, endedAtMs, dispatchWaitMs: endedAtMs - waitFromMs, runMs: 0, measuredFrom, inFlight, waitingOnPerson };\n }\n const admittedClampedMs = Math.min(Math.max(admittedMs, waitFromMs), endedAtMs);\n return {\n startedAtMs: waitFromMs,\n endedAtMs,\n dispatchWaitMs: admittedClampedMs - waitFromMs,\n runMs: endedAtMs - admittedClampedMs,\n measuredFrom,\n inFlight,\n waitingOnPerson,\n };\n}\n\n/**\n * Which phase each playbook ref is the work of: every ref a lane's choreography admits, transitively, and the lane\n * itself. A ref two lanes admit is placed in NEITHER and reported: its row names no lane (a nested run records only\n * its tree's root, the umbrella), so placing it would be a guess. One since 2026-11-06: `top_down.expert-personas`, which\n * the conception lane staffs with and the build lane re-runs when a panel's charters go stale (#3204).\n */\nexport function classifyPlaybookRefsByJourneyPhase(admitsOf: (ref: string) => readonly string[]): {\n readonly phaseOf: ReadonlyMap<string, CreationJourneyPhase>;\n readonly ambiguousPlaybookRefs: readonly string[];\n} {\n const lanesOf = new Map<string, CreationJourneyPhase[]>();\n for (const phase of CREATION_JOURNEY_PHASE_ORDER) {\n const seen = new Set<string>();\n const pending = [CREATION_JOURNEY_PHASE_LANE_REFS[phase]];\n while (pending.length > 0) {\n const ref = pending.pop()!;\n if (seen.has(ref)) continue;\n seen.add(ref);\n pending.push(...admitsOf(ref));\n }\n for (const ref of seen) lanesOf.set(ref, [...(lanesOf.get(ref) ?? []), phase]);\n }\n const phaseOf = new Map<string, CreationJourneyPhase>();\n const ambiguousPlaybookRefs: string[] = [];\n for (const [ref, phases] of lanesOf) {\n if (phases.length === 1) phaseOf.set(ref, phases[0]!);\n else ambiguousPlaybookRefs.push(ref);\n }\n return { phaseOf, ambiguousPlaybookRefs: ambiguousPlaybookRefs.sort() };\n}\n\n/** A span being accumulated. */\ninterface SpanAccumulator {\n startMs?: number;\n endMs?: number;\n inFlight: boolean;\n waitingOnPerson: boolean;\n playbookRuns: number;\n researchTurns: number;\n buildAttempts: number;\n}\n\nfunction widen(span: SpanAccumulator, startMs: number, endMs: number): void {\n span.startMs = span.startMs === undefined ? startMs : Math.min(span.startMs, startMs);\n span.endMs = span.endMs === undefined ? endMs : Math.max(span.endMs, endMs);\n}\n\n/** Whether a row still has work under way: PENDING (selected, not started) or PROCESSING. */\nfunction isUnderWay(status: FlowsActors_Status): boolean {\n return status === FlowsActors_Status.PENDING || status === FlowsActors_Status.PROCESSING;\n}\n\n/**\n * The window of one playbook run: its row's creation to its finish. One still under way ends at the read's instant;\n * one waiting on a person ends where it began waiting (time spent waiting for an answer is the person's, and the\n * phase is marked as waiting rather than stretched to now).\n */\nfunction playbookRunWindow(run: CreationJourneyPlaybookRun, nowMs: number): { startMs: number; endMs: number; inFlight: boolean; waitingOnPerson: boolean } | undefined {\n const startMs = instantMs(run.startedAt);\n if (startMs === undefined) return undefined;\n if (isUnderWay(run.status)) return { startMs, endMs: Math.max(startMs, nowMs), inFlight: true, waitingOnPerson: false };\n if (run.status === FlowsActors_Status.AWAITING_APPROVAL) {\n return { startMs, endMs: Math.max(startMs, instantMs(run.suspendedAt) ?? startMs), inFlight: false, waitingOnPerson: true };\n }\n return { startMs, endMs: Math.max(startMs, instantMs(run.finishedAt) ?? startMs), inFlight: false, waitingOnPerson: false };\n}\n\n/** A phase's playbook run as the first-pass split reads it: the row and its measured window. */\ninterface PhaseRunEntry {\n readonly run: CreationJourneyPlaybookRun;\n readonly window: { readonly startMs: number; readonly endMs: number; readonly inFlight: boolean; readonly waitingOnPerson: boolean };\n}\n\n/** What a playbook delivers as, for the first-pass split: its ref and, for a keyed one, its instance. */\nfunction deliveryKey(run: CreationJourneyPlaybookRun): string {\n return run.instanceKey === undefined ? run.playbookRef : `${run.playbookRef}\\u0000${run.instanceKey}`;\n}\n\n/**\n * Split one pre-build phase's runs into its FIRST COMPLETE PASS and its REFRESHES (#4016,\n * {@link CreationJourney_PhaseFirstPass} says why this definition and not the lane's first settle).\n *\n * A run is in the first pass when its playbook (and instance) had not completed a run yet when it started: every attempt\n * up to and including the first completed one, and any started before that one settled. Every later run is a refresh.\n * Research turns write no row (#3896): one that began before the pass ended is first-pass work, one after is counted with\n * the refreshes it ran inside.\n *\n * A refresh's run-minutes and spend are counted once per tree: a run nested in a refresh of this phase (its `rootRunId`\n * names one) is inside that root's window, and inside its spend when a meter observed the root. The row names its ROOT, not\n * its parent, so two refreshes the creation umbrella nests (a lane and its child, both rooted at the umbrella) are each\n * counted: an overcount, accepted because the umbrella runs the first passes and the refreshes measured so far ran as\n * roots of the unattended loop (reference run 44052185141).\n */\nfunction splitFirstPassFromRefreshes(\n entries: readonly PhaseRunEntry[],\n researchTurns: readonly { readonly startMs: number; readonly endMs: number }[],\n): { readonly firstPass: CreationJourney_PhaseFirstPass; readonly refreshes: CreationJourney_PhaseRefreshes } | undefined {\n if (entries.length === 0) return undefined;\n const firstDeliveredAtMs = new Map<string, number>();\n for (const { run, window } of entries) {\n if (run.status !== FlowsActors_Status.COMPLETED) continue;\n const key = deliveryKey(run);\n firstDeliveredAtMs.set(key, Math.min(firstDeliveredAtMs.get(key) ?? Number.POSITIVE_INFINITY, window.endMs));\n }\n const firstPassEntries: PhaseRunEntry[] = [];\n const refreshEntries: PhaseRunEntry[] = [];\n for (const entry of entries) {\n const deliveredAtMs = firstDeliveredAtMs.get(deliveryKey(entry.run));\n (deliveredAtMs === undefined || entry.window.startMs <= deliveredAtMs ? firstPassEntries : refreshEntries).push(entry);\n }\n // Never empty: the earliest run of the phase cannot start after its own playbook's first completion.\n let startMs = Math.min(...firstPassEntries.map((entry) => entry.window.startMs));\n let endMs = Math.max(...firstPassEntries.map((entry) => entry.window.endMs));\n let refreshResearchTurns = 0;\n const passEndMs = endMs;\n for (const turn of researchTurns) {\n if (turn.startMs > passEndMs) {\n refreshResearchTurns += 1;\n continue;\n }\n startMs = Math.min(startMs, turn.startMs);\n endMs = Math.max(endMs, turn.endMs);\n }\n\n const refreshById = new Map(refreshEntries.map((entry) => [entry.run.runId, entry.run]));\n const cost: Record<string, number> = {};\n let runMs = 0;\n let runsWithIncompleteSpend = 0;\n for (const { run, window } of refreshEntries) {\n const root = run.rootRunId !== undefined && run.rootRunId !== run.runId ? refreshById.get(run.rootRunId) : undefined;\n if (root === undefined) runMs += window.endMs - window.startMs;\n // Inside a refresh root whose meter observed it: its calls are in the root's figure, complete or not.\n if (root !== undefined && spendCoversNestedRuns(root.spend)) continue;\n if (!spendIsComplete(run.spend)) runsWithIncompleteSpend += 1;\n for (const [currency, amount] of Object.entries(run.spend?.cost ?? {})) cost[currency] = (cost[currency] ?? 0) + amount;\n }\n return {\n firstPass: {\n startedAt: new Date(startMs).toISOString(),\n endedAt: new Date(endMs).toISOString(),\n durationMs: endMs - startMs,\n inFlight: firstPassEntries.some((entry) => entry.window.inFlight),\n waitingOnPerson: firstPassEntries.some((entry) => entry.window.waitingOnPerson),\n playbookRuns: firstPassEntries.length,\n },\n refreshes: { playbookRuns: refreshEntries.length, runMs, researchTurns: refreshResearchTurns, cost, runsWithIncompleteSpend },\n };\n}\n\n/**\n * Derive the timeline: each phase's first start to its last settle, a pre-build phase's first complete pass apart from\n * its refreshes (#4016), the wall clock over everything, and the\n * {@link CREATION_JOURNEY_SLOWEST_BUILD_TASK_COUNT} build tasks with the most wait plus run time.\n *\n * The BUILD phase's span covers its lane's playbook runs AND every build-task attempt, whoever started it: a single-task\n * dispatch (`wildo build run --single`, the workbench, a named run) starts no build-lane playbook, and its runs are\n * still the build. The wall clock covers every playbook run (a phase's or not) and every attempt.\n *\n * A run a companion restart ended is measured to that restart, because no row records when it really stopped: a build\n * attempt says so on its task line, and a playbook run cannot, so a phase that a restart interrupted may run long.\n */\nexport function deriveCreationJourneyTimeline(input: {\n readonly now: Date;\n readonly playbookRuns: readonly CreationJourneyPlaybookRun[];\n /**\n * Completed research turns (#3896), from their evidence records: a research child writes no playbook-run row, so a phase\n * whose first work is research would otherwise start at its first OTHER run. Absent means none were read.\n */\n readonly researchTurns?: readonly { readonly playbookRef: string; readonly startedAt: string; readonly elapsedMs: number }[];\n readonly buildAttempts: readonly CreationJourneyBuildAttempt[];\n readonly phaseOf: ReadonlyMap<string, CreationJourneyPhase>;\n readonly ambiguousPlaybookRefs: readonly string[];\n /** The accepted build plan's graph, carried through for a budget reader; NULL when there is none or it is unreadable. */\n readonly buildPlanGraph: readonly CreationJourney_BuildPlanTask[] | null;\n readonly notChecked: readonly string[];\n}): CreationJourney_Timeline {\n const nowMs = input.now.getTime();\n const spans = new Map<CreationJourneyPhase, SpanAccumulator>(\n CREATION_JOURNEY_PHASE_ORDER.map((phase) => [phase, { inFlight: false, waitingOnPerson: false, playbookRuns: 0, researchTurns: 0, buildAttempts: 0 }]),\n );\n const wall: SpanAccumulator = { inFlight: false, waitingOnPerson: false, playbookRuns: 0, researchTurns: 0, buildAttempts: 0 };\n let outsidePhasePlaybookRuns = 0;\n // Per phase, its runs and research turns as measured, for the first-pass split (#4016).\n const phaseRuns = new Map<CreationJourneyPhase, PhaseRunEntry[]>(CREATION_JOURNEY_PHASE_ORDER.map((phase) => [phase, []]));\n const phaseResearchTurns = new Map<CreationJourneyPhase, { startMs: number; endMs: number }[]>(CREATION_JOURNEY_PHASE_ORDER.map((phase) => [phase, []]));\n\n for (const run of input.playbookRuns) {\n const window = playbookRunWindow(run, nowMs);\n if (window === undefined) continue;\n widen(wall, window.startMs, window.endMs);\n wall.inFlight ||= window.inFlight;\n const phase = input.phaseOf.get(run.playbookRef);\n if (phase === undefined) {\n outsidePhasePlaybookRuns += 1;\n continue;\n }\n const span = spans.get(phase)!;\n widen(span, window.startMs, window.endMs);\n span.inFlight ||= window.inFlight;\n span.waitingOnPerson ||= window.waitingOnPerson;\n span.playbookRuns += 1;\n phaseRuns.get(phase)!.push({ run, window });\n }\n\n // A research turn widens its phase like a playbook run does, and the wall clock with it (#3896). Never in flight: only\n // a completed turn writes its record.\n for (const turn of input.researchTurns ?? []) {\n const startMs = instantMs(turn.startedAt);\n if (startMs === undefined) continue;\n const endMs = startMs + Math.max(0, turn.elapsedMs);\n widen(wall, startMs, endMs);\n const phase = input.phaseOf.get(turn.playbookRef);\n if (phase === undefined) continue;\n const span = spans.get(phase)!;\n widen(span, startMs, endMs);\n span.researchTurns += 1;\n phaseResearchTurns.get(phase)!.push({ startMs, endMs });\n }\n\n const byTask = new Map<string, {\n attempts: number; dispatchWaitMs: number; runMs: number; fromSelection: boolean; inFlight: boolean; waitingOnPerson: boolean;\n endedByCompanionRestart: boolean; generationStep: boolean;\n }>();\n const build = spans.get(CreationJourneyPhase.BUILD)!;\n const attemptTimings: { readonly startedAtMs: number; readonly entry: CreationJourney_BuildAttemptTiming }[] = [];\n for (const attempt of input.buildAttempts) {\n const timing = measureBuildAttempt(attempt, nowMs);\n if (timing === undefined) continue;\n /*\n * The same split as the task totals below, per attempt (#3204's budget): a p95 is a statement about attempts, and a\n * task's sum over several attempts would hide a fast retry behind a slow first run. The admission instant is the\n * clamped one the split used, so `startedAt + dispatchWaitMs` is always `admittedAt`.\n */\n const admittedAtMs = instantMs(attempt.admittedAt) === undefined ? undefined : timing.startedAtMs + timing.dispatchWaitMs;\n attemptTimings.push({\n startedAtMs: timing.startedAtMs,\n entry: {\n taskRef: attempt.taskRef,\n startedAt: new Date(timing.startedAtMs).toISOString(),\n ...(admittedAtMs !== undefined ? { admittedAt: new Date(admittedAtMs).toISOString() } : {}),\n endedAt: new Date(timing.endedAtMs).toISOString(),\n dispatchWaitMs: timing.dispatchWaitMs,\n runMs: timing.runMs,\n dispatchWaitMeasuredFrom: timing.measuredFrom,\n inFlight: timing.inFlight,\n waitingOnPerson: timing.waitingOnPerson,\n endedByCompanionRestart: attempt.endedByCompanionRestart,\n generationStep: attempt.generationStep,\n },\n });\n widen(build, timing.startedAtMs, timing.endedAtMs);\n widen(wall, timing.startedAtMs, timing.endedAtMs);\n build.inFlight ||= timing.inFlight;\n build.waitingOnPerson ||= timing.waitingOnPerson;\n wall.inFlight ||= timing.inFlight;\n build.buildAttempts += 1;\n const task = byTask.get(attempt.taskRef) ?? {\n attempts: 0, dispatchWaitMs: 0, runMs: 0, fromSelection: false, inFlight: false, waitingOnPerson: false, endedByCompanionRestart: false, generationStep: false,\n };\n task.attempts += 1;\n task.dispatchWaitMs += timing.dispatchWaitMs;\n task.runMs += timing.runMs;\n task.fromSelection ||= timing.measuredFrom === BuildDispatchWaitMeasuredFrom.SELECTION;\n task.inFlight ||= timing.inFlight;\n task.waitingOnPerson ||= timing.waitingOnPerson;\n task.endedByCompanionRestart ||= attempt.endedByCompanionRestart;\n task.generationStep ||= attempt.generationStep;\n byTask.set(attempt.taskRef, task);\n }\n\n const phases: CreationJourney_PhaseSpan[] = CREATION_JOURNEY_PHASE_ORDER.map((phase) => {\n const span = spans.get(phase)!;\n const ran = span.startMs !== undefined && span.endMs !== undefined;\n // Not for the build: its dispatch step runs wave after wave by design, so a second run of it is no refresh.\n const split = phase === CreationJourneyPhase.BUILD ? undefined : splitFirstPassFromRefreshes(phaseRuns.get(phase)!, phaseResearchTurns.get(phase)!);\n return {\n phase,\n laneRef: CREATION_JOURNEY_PHASE_LANE_REFS[phase],\n ...(ran ? { startedAt: new Date(span.startMs!).toISOString(), endedAt: new Date(span.endMs!).toISOString(), durationMs: span.endMs! - span.startMs! } : {}),\n inFlight: span.inFlight,\n waitingOnPerson: span.waitingOnPerson,\n playbookRuns: span.playbookRuns,\n researchTurns: span.researchTurns,\n buildAttempts: span.buildAttempts,\n ...(split !== undefined ? { firstPass: split.firstPass, refreshes: split.refreshes } : {}),\n };\n });\n\n const slowestBuildTasks: CreationJourney_SlowBuildTask[] = [...byTask]\n .map(([taskRef, task]) => ({\n taskRef,\n attempts: task.attempts,\n dispatchWaitMs: task.dispatchWaitMs,\n runMs: task.runMs,\n totalMs: task.dispatchWaitMs + task.runMs,\n dispatchWaitMeasuredFrom: task.fromSelection ? BuildDispatchWaitMeasuredFrom.SELECTION : BuildDispatchWaitMeasuredFrom.PREPARATION,\n inFlight: task.inFlight,\n waitingOnPerson: task.waitingOnPerson,\n endedByCompanionRestart: task.endedByCompanionRestart,\n generationStep: task.generationStep,\n }))\n .sort((left, right) => right.totalMs - left.totalMs || left.taskRef.localeCompare(right.taskRef))\n .slice(0, CREATION_JOURNEY_SLOWEST_BUILD_TASK_COUNT);\n\n return {\n generatedAt: input.now.toISOString(),\n wallClock: wall.startMs === undefined || wall.endMs === undefined ? null : {\n startedAt: new Date(wall.startMs).toISOString(),\n endedAt: new Date(wall.endMs).toISOString(),\n durationMs: wall.endMs - wall.startMs,\n inFlight: wall.inFlight,\n },\n phases,\n slowestBuildTasks,\n attemptedBuildTasks: byTask.size,\n buildAttemptTimings: attemptTimings\n .sort((left, right) => left.startedAtMs - right.startedAtMs || left.entry.taskRef.localeCompare(right.entry.taskRef))\n .map(({ entry }) => entry),\n buildPlanGraph: input.buildPlanGraph === null ? null : input.buildPlanGraph.map((task) => ({ taskRef: task.taskRef, prerequisiteTaskRefs: [...task.prerequisiteTaskRefs] })),\n outsidePhasePlaybookRuns,\n ambiguousPlaybookRefs: [...input.ambiguousPlaybookRefs],\n notChecked: [...input.notChecked],\n };\n}\n"]}
@@ -8,6 +8,11 @@
8
8
  * one with no `package.json` (a Rust worker) answers "nothing to typecheck" in the executor, which is the honest
9
9
  * answer and keeps a manifest test out of this listing. A family directory that cannot be read contributes
10
10
  * nothing — it does not exist in an application that never added one, which is the ordinary case.
11
+ *
12
+ * And every installed provider module's facet packages, `providers/<ref>/backend|frontend` (#4018): a provider task owes
13
+ * its own facets' typecheck, and the end of the build asks it of every facet, so a provider installed by a run that
14
+ * owed no such check (a worker or minion task binding its own provider) is still compiled before the build is called
15
+ * assembled. A facet directory the module does not ship answers "nothing to typecheck".
11
16
  */
12
17
  export declare function resolveApplicationAssemblyCheckRefs(saasRoot: string | undefined): string[];
13
18
  //# sourceMappingURL=application-assembly-checks.companion.utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"application-assembly-checks.companion.utils.d.ts","sourceRoot":"","sources":["../../../../src/meta-workflows/services/application-assembly-checks.companion.utils.ts"],"names":[],"mappings":"AAQA;;;;;;;;;;GAUG;AACH,wBAAgB,mCAAmC,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,EAAE,CAa1F"}
1
+ {"version":3,"file":"application-assembly-checks.companion.utils.d.ts","sourceRoot":"","sources":["../../../../src/meta-workflows/services/application-assembly-checks.companion.utils.ts"],"names":[],"mappings":"AAYA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,mCAAmC,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,EAAE,CAkB1F"}
@@ -1,8 +1,11 @@
1
1
  import { readdirSync } from 'node:fs';
2
2
  import { join } from 'node:path';
3
+ import { ProviderModuleFacet } from '@wildo-ai/platform-config-lib';
3
4
  import { deriveApplicationAssemblyCheckRefs } from './application-build-task-coding-policy.companion.service.js';
4
5
  /** The two package families whose directories a composition scenario names (#1490): one package per child directory. */
5
6
  const PARAMETRIC_PACKAGE_FAMILIES = ['workers', 'minions'];
7
+ /** Where `wildo registry add` installs a provider module: one directory per ref, one package per facet (#4018). */
8
+ const PROVIDER_MODULES_DIRECTORY = 'providers';
6
9
  /**
7
10
  * The checks that answer "does this application assemble?" for the application at `saasRoot` (#2222) — one answer
8
11
  * for the two places that ask it: the `bottom_up.assemble-verify` playbook, and the build dispatch when its plan
@@ -13,6 +16,11 @@ const PARAMETRIC_PACKAGE_FAMILIES = ['workers', 'minions'];
13
16
  * one with no `package.json` (a Rust worker) answers "nothing to typecheck" in the executor, which is the honest
14
17
  * answer and keeps a manifest test out of this listing. A family directory that cannot be read contributes
15
18
  * nothing — it does not exist in an application that never added one, which is the ordinary case.
19
+ *
20
+ * And every installed provider module's facet packages, `providers/<ref>/backend|frontend` (#4018): a provider task owes
21
+ * its own facets' typecheck, and the end of the build asks it of every facet, so a provider installed by a run that
22
+ * owed no such check (a worker or minion task binding its own provider) is still compiled before the build is called
23
+ * assembled. A facet directory the module does not ship answers "nothing to typecheck".
16
24
  */
17
25
  export function resolveApplicationAssemblyCheckRefs(saasRoot) {
18
26
  // No application root to list: the fixed packages are still asked about; no worker or minion can be named.
@@ -28,6 +36,19 @@ export function resolveApplicationAssemblyCheckRefs(saasRoot) {
28
36
  return [];
29
37
  }
30
38
  });
31
- return deriveApplicationAssemblyCheckRefs(packageDirectories);
39
+ const facets = Object.values(ProviderModuleFacet);
40
+ const providerFacetDirectories = listChildDirectories(join(saasRoot, PROVIDER_MODULES_DIRECTORY)).flatMap((ref) => listChildDirectories(join(saasRoot, PROVIDER_MODULES_DIRECTORY, ref))
41
+ .filter((facet) => facets.includes(facet))
42
+ .map((facet) => `${PROVIDER_MODULES_DIRECTORY}/${ref}/${facet}`));
43
+ return deriveApplicationAssemblyCheckRefs([...packageDirectories, ...providerFacetDirectories]);
44
+ }
45
+ /** The names of a directory's child directories, or none when it cannot be read. */
46
+ function listChildDirectories(directory) {
47
+ try {
48
+ return readdirSync(directory, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => entry.name);
49
+ }
50
+ catch {
51
+ return [];
52
+ }
32
53
  }
33
54
  //# sourceMappingURL=application-assembly-checks.companion.utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"application-assembly-checks.companion.utils.js","sourceRoot":"","sources":["../../../../src/meta-workflows/services/application-assembly-checks.companion.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,kCAAkC,EAAE,MAAM,0DAA0D,CAAC;AAE9G,wHAAwH;AACxH,MAAM,2BAA2B,GAAG,CAAC,SAAS,EAAE,SAAS,CAAU,CAAC;AAEpE;;;;;;;;;;GAUG;AACH,MAAM,UAAU,mCAAmC,CAAC,QAA4B;IAC9E,2GAA2G;IAC3G,IAAI,QAAQ,KAAK,SAAS;QAAE,OAAO,kCAAkC,CAAC,EAAE,CAAC,CAAC;IAC1E,MAAM,kBAAkB,GAAG,2BAA2B,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;QACxE,IAAI,CAAC;YACH,OAAO,WAAW,CAAC,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC;iBAChE,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC;iBACtC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,GAAG,MAAM,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;QAC/C,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,EAAE,CAAC;QACZ,CAAC;IACH,CAAC,CAAC,CAAC;IACH,OAAO,kCAAkC,CAAC,kBAAkB,CAAC,CAAC;AAChE,CAAC","sourcesContent":["import { readdirSync } from 'node:fs';\nimport { join } from 'node:path';\n\nimport { deriveApplicationAssemblyCheckRefs } from './application-build-task-coding-policy.companion.service';\n\n/** The two package families whose directories a composition scenario names (#1490): one package per child directory. */\nconst PARAMETRIC_PACKAGE_FAMILIES = ['workers', 'minions'] as const;\n\n/**\n * The checks that answer \"does this application assemble?\" for the application at `saasRoot` (#2222) — one answer\n * for the two places that ask it: the `bottom_up.assemble-verify` playbook, and the build dispatch when its plan\n * runs out of tasks.\n *\n * The fixed packages come from the coverage table ({@link deriveApplicationAssemblyCheckRefs}); the workers and\n * minions are LISTED, because their directories are chosen at composition time. Every child directory is named:\n * one with no `package.json` (a Rust worker) answers \"nothing to typecheck\" in the executor, which is the honest\n * answer and keeps a manifest test out of this listing. A family directory that cannot be read contributes\n * nothing — it does not exist in an application that never added one, which is the ordinary case.\n */\nexport function resolveApplicationAssemblyCheckRefs(saasRoot: string | undefined): string[] {\n // No application root to list: the fixed packages are still asked about; no worker or minion can be named.\n if (saasRoot === undefined) return deriveApplicationAssemblyCheckRefs([]);\n const packageDirectories = PARAMETRIC_PACKAGE_FAMILIES.flatMap((family) => {\n try {\n return readdirSync(join(saasRoot, family), { withFileTypes: true })\n .filter((entry) => entry.isDirectory())\n .map((entry) => `${family}/${entry.name}`);\n } catch {\n return [];\n }\n });\n return deriveApplicationAssemblyCheckRefs(packageDirectories);\n}\n"]}
1
+ {"version":3,"file":"application-assembly-checks.companion.utils.js","sourceRoot":"","sources":["../../../../src/meta-workflows/services/application-assembly-checks.companion.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAEpE,OAAO,EAAE,kCAAkC,EAAE,MAAM,0DAA0D,CAAC;AAE9G,wHAAwH;AACxH,MAAM,2BAA2B,GAAG,CAAC,SAAS,EAAE,SAAS,CAAU,CAAC;AAEpE,mHAAmH;AACnH,MAAM,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;AAED,oFAAoF;AACpF,SAAS,oBAAoB,CAAC,SAAiB;IAC7C,IAAI,CAAC;QACH,OAAO,WAAW,CAAC,SAAS,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC3H,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC","sourcesContent":["import { readdirSync } from 'node:fs';\nimport { join } from 'node:path';\nimport { ProviderModuleFacet } from '@wildo-ai/platform-config-lib';\n\nimport { deriveApplicationAssemblyCheckRefs } from './application-build-task-coding-policy.companion.service';\n\n/** The two package families whose directories a composition scenario names (#1490): one package per child directory. */\nconst PARAMETRIC_PACKAGE_FAMILIES = ['workers', 'minions'] as const;\n\n/** Where `wildo registry add` installs a provider module: one directory per ref, one package per facet (#4018). */\nconst PROVIDER_MODULES_DIRECTORY = 'providers';\n\n/**\n * The checks that answer \"does this application assemble?\" for the application at `saasRoot` (#2222) — one answer\n * for the two places that ask it: the `bottom_up.assemble-verify` playbook, and the build dispatch when its plan\n * runs out of tasks.\n *\n * The fixed packages come from the coverage table ({@link deriveApplicationAssemblyCheckRefs}); the workers and\n * minions are LISTED, because their directories are chosen at composition time. Every child directory is named:\n * one with no `package.json` (a Rust worker) answers \"nothing to typecheck\" in the executor, which is the honest\n * answer and keeps a manifest test out of this listing. A family directory that cannot be read contributes\n * nothing — it does not exist in an application that never added one, which is the ordinary case.\n *\n * And every installed provider module's facet packages, `providers/<ref>/backend|frontend` (#4018): a provider task owes\n * its own facets' typecheck, and the end of the build asks it of every facet, so a provider installed by a run that\n * owed no such check (a worker or minion task binding its own provider) is still compiled before the build is called\n * assembled. A facet directory the module does not ship answers \"nothing to typecheck\".\n */\nexport function resolveApplicationAssemblyCheckRefs(saasRoot: string | undefined): string[] {\n // No application root to list: the fixed packages are still asked about; no worker or minion can be named.\n if (saasRoot === undefined) return deriveApplicationAssemblyCheckRefs([]);\n const packageDirectories = PARAMETRIC_PACKAGE_FAMILIES.flatMap((family) => {\n try {\n return readdirSync(join(saasRoot, family), { withFileTypes: true })\n .filter((entry) => entry.isDirectory())\n .map((entry) => `${family}/${entry.name}`);\n } catch {\n return [];\n }\n });\n const facets: readonly string[] = Object.values(ProviderModuleFacet);\n const providerFacetDirectories = listChildDirectories(join(saasRoot, PROVIDER_MODULES_DIRECTORY)).flatMap((ref) =>\n listChildDirectories(join(saasRoot, PROVIDER_MODULES_DIRECTORY, ref))\n .filter((facet) => facets.includes(facet))\n .map((facet) => `${PROVIDER_MODULES_DIRECTORY}/${ref}/${facet}`));\n return deriveApplicationAssemblyCheckRefs([...packageDirectories, ...providerFacetDirectories]);\n}\n\n/** The names of a directory's child directories, or none when it cannot be read. */\nfunction listChildDirectories(directory: string): string[] {\n try {\n return readdirSync(directory, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => entry.name);\n } catch {\n return [];\n }\n}\n"]}
@@ -10,7 +10,7 @@ import type { CompanionContext } from '../../core/context/companion-context';
10
10
  import { CompanionIntrospectionService } from '../../core/introspection/services/companion-introspection.companion.service';
11
11
  import { CodingRunConcurrency } from '../../claude-cli/models/concurrent-coding-runs.models';
12
12
  import { CodingAgentDispatchCompanionService, type ApplicationCodingTaskSettledOutcome } from '../../claude-cli/services/coding-agent-dispatch.companion.service';
13
- import { type ApplicationCodingTaskRunAdmission, type ApplicationCodingUnmetRequirement, type ApplicationCodingMetRequirement } from '../../claude-cli/models/coding-agent-dispatch.models';
13
+ import { type ApplicationCodingTaskRunAdmission, type ApplicationCodingUnmetRequirement, type ApplicationCodingMetRequirement, type ApplicationVerificationFinding } from '../../claude-cli/models/coding-agent-dispatch.models';
14
14
  import { GitChangeSetCompanionService } from '../../claude-cli/services/git-change-set.companion.service';
15
15
  import { type ApplicationBuildPreparation } from './application-build-dispatch-preparation.companion';
16
16
  import type { CompanionTraceabilityService } from '../../core/traceability/companion-traceability.service';
@@ -22,7 +22,7 @@ import type { CodingRunWriteRegisterCompanionService } from '../../claude-cli/se
22
22
  import type { CompanionExecutionSessionContext } from '../../core/traceability/companion-traceability.models';
23
23
  import { CompanionExecutionsCompanionService } from '../../executions/services/companion-executions.companion.service';
24
24
  import { type ApplicationBootFailure, type UnavailableApplicationRuntime } from '../../core/runtime/application-runtime-liveness.companion';
25
- import type { CarriedVerificationDiagnosis } from '../models/carried-verification-failure.models';
25
+ import { type CarriedVerificationDiagnosis } from '../models/carried-verification-failure.models';
26
26
  import type { GenerationStepProgress } from '../models/generation-step-progress.models';
27
27
  import { type BuildTaskInterference, type BuildTaskLandedOverride, type BuildTaskRearm } from '../models/build-task-rearm.models';
28
28
  import { ApplicationBuildGenerationStepCompanionService, type ApplicationBuildGenerationStepRunResult, GenerationStepFailureOwner } from './application-build-generation-step.companion.service';
@@ -355,8 +355,16 @@ export interface ApplicationBuildTaskAttempt {
355
355
  * TRUE when they all passed. Absent when no such re-check was made.
356
356
  */
357
357
  readonly isolatedRecheckPassed?: boolean;
358
- /** Checks that were already red when this run started, each with its diagnosis (#1529). */
358
+ /**
359
+ * Checks this run failed and was not charged with, each with its diagnosis (#1529): already red when it started, or red
360
+ * only for findings about the application another writer caused (#3881, `carriedBecause`).
361
+ */
359
362
  readonly carriedFailures?: readonly CarriedVerificationDiagnosis[];
363
+ /**
364
+ * Findings about the application another writer caused that this run met (#3881), its charged checks' included: what
365
+ * `deriveRepairsOwed` owes a repair for when the run's check was charged for a finding of its own as well.
366
+ */
367
+ readonly applicationFindings?: readonly ApplicationVerificationFinding[];
360
368
  /** Checks this run ran GREEN — what tells a repair that a carried red has since been cleared. */
361
369
  readonly passedCheckRefs?: readonly string[];
362
370
  /**
@@ -771,13 +779,23 @@ export interface ApplicationBuildDispatchPlan {
771
779
  /** Whether two write sets may touch one file: an equal path, or a path under the other's directory. */
772
780
  export declare function productWritePathsMeet(left: readonly string[], right: readonly string[]): boolean;
773
781
  /**
774
- * Dispatches one wave call may make per slot before it returns and lets the next call continue (the playbook loop takes a
775
- * turn between waves). A wave returns only once its live runs have drained, so each wave costs the tail of its slowest run:
776
- * raised from 4 to 8 with #3204, once nothing but the isolated re-checks and the single-flight repairs waited on a drain
777
- * any more (progress reads the working tree; commits are checkpoints). Not unbounded: a drain is also the quiet moment the
778
- * runtime supervisor restarts the companion in, and a restart held past its ceiling kills the live runs.
782
+ * Dispatches one wave call may make per slot before it returns: the outer bound, no longer the loop's only turn (#3884). A
783
+ * wave returns only once its live runs have drained, so each drain costs the tail of its slowest run: on reference run
784
+ * 43691253927 every drain at the former 8 per slot held about 20 minutes with 0 to 5 sessions running. The loop now asks for
785
+ * a yield when a playbook the wave holds back needs the turn (`YIELD_REQUESTED`, honoured from
786
+ * {@link WAVE_DISPATCHES_BEFORE_A_YIELD_PER_DEGREE}), and a held restart stops the filling on its own (`RESTART_PENDING`).
787
+ *
788
+ * Not higher (review M2), for two costs that grow with a wave: a run that failed its checks beside its siblings may wait
789
+ * until the wave's END to be re-checked alone (`AWAITING_ISOLATED_RECHECK`), its dependents with it, when a live run keeps
790
+ * writing what its checks read (#3998 re-checks it earlier otherwise); and every dispatch entry of
791
+ * the wave's result carries the plan's ready and landed lists. Raised from 4 to 8 with #3204, and to 16 with #3884.
792
+ */
793
+ export declare const WAVE_DISPATCHES_PER_DEGREE = 16;
794
+ /**
795
+ * The dispatches per slot a wave starts before it honours a yield the loop asked for (#3884 review H2): the former cap, so a
796
+ * playbook the loop holds back but never chooses can shorten a wave to what it was before #3884, and no further.
779
797
  */
780
- export declare const WAVE_DISPATCHES_PER_DEGREE = 8;
798
+ export declare const WAVE_DISPATCHES_BEFORE_A_YIELD_PER_DEGREE = 8;
781
799
  /** Why a wave stopped taking new tasks — it always still drains the runs already live. */
782
800
  export declare enum ApplicationBuildWaveStop {
783
801
  /** No task is ready and no run is live: the plan is done, blocked, or every ready task is stuck. */
@@ -790,6 +808,12 @@ export declare enum ApplicationBuildWaveStop {
790
808
  * termination rests on that pass-over; without it a step whose landing stays unmet would be selected again forever.
791
809
  */
792
810
  GENERATION_STEP_REPEATED = "generation-step-repeated",
811
+ /**
812
+ * The playbook loop asked the wave to yield (#3884): a playbook it holds back writes what the wave's lane writes, so the
813
+ * wave starts nothing more and drains, and that playbook runs at the wave's end. The yield the dispatch cap used to force
814
+ * every 8 dispatches per slot, whether or not anything was waiting.
815
+ */
816
+ YIELD_REQUESTED = "yield-requested",
793
817
  /** An admission was refused; the refusal is on the dispatch entry. */
794
818
  DISPATCH_REFUSED = "dispatch-refused",
795
819
  /**
@@ -1338,6 +1362,12 @@ export declare class ApplicationBuildDispatchCompanionService {
1338
1362
  private lastBuildPreparation;
1339
1363
  /** When `wildo build stop` asked the running wave to stop (#3206); cleared when the wave ends. */
1340
1364
  private buildWaveStopRequestedAt;
1365
+ /**
1366
+ * Why the playbook loop asked the running wave to YIELD (#3884), cleared when the wave ends: a playbook it holds back
1367
+ * because the wave's lane writes what it writes. Unlike a person's stop it holds nothing afterwards; the next wave fills
1368
+ * as usual once the held playbook has had its turn.
1369
+ */
1370
+ private buildWaveYieldRequestedBecause;
1341
1371
  /**
1342
1372
  * The build HOLD a person's `wildo build stop` sets (#3206), kept after the wave it ended: while it is set no build
1343
1373
  * wave or task starts unless a person's door released it first ({@link releaseBuildStopHold}) — not the choreography
@@ -1687,10 +1717,31 @@ export declare class ApplicationBuildDispatchCompanionService {
1687
1717
  readonly waveStartedAt?: string;
1688
1718
  readonly requestedAt?: string;
1689
1719
  };
1720
+ /**
1721
+ * Ask the build wave to yield (#3884): once it has dispatched {@link WAVE_DISPATCHES_BEFORE_A_YIELD_PER_DEGREE} per slot,
1722
+ * it starts nothing more, drains and returns, so a playbook the loop holds back because of it can run. Idempotent. A
1723
+ * request made before the wave starts applies to it; every request is cleared when a wave ends.
1724
+ */
1725
+ requestBuildWaveYield(because: string): void;
1690
1726
  /** The generation steps held because their panel refused stale expert charters (#3204); empty when none is. */
1691
1727
  readStaleExpertChartersHold(): readonly StaleExpertChartersHeld[];
1692
- /** The staffing step derived the charters again (#3204): every held step is offered again. */
1693
- releaseStaleExpertChartersHold(why: string): void;
1728
+ /**
1729
+ * The staffing step derived the charters again (#3204): the held steps are offered again. With `repaired`, only the holds
1730
+ * that staffing run read when it started (#4022): it runs beside the build now, so a step held while it ran was refused
1731
+ * on charters it may not have derived. That step stays held until a staffing run that read its hold releases it, or
1732
+ * until the charters are committed after its refusal ({@link staleExpertChartersCommittedSince}, read by the selector);
1733
+ * released that way early, it is refused again if still stale, and the new hold starts another staffing run. Without
1734
+ * `repaired`, every hold.
1735
+ */
1736
+ releaseStaleExpertChartersHold(why: string, repaired?: readonly StaleExpertChartersHeld[]): void;
1737
+ /**
1738
+ * Called each time a generation step is held on stale expert charters (#4022), so the build-dispatch step can start the
1739
+ * staffing run the moment the hold is set, beside the wave, instead of after the wave has drained. Returns the
1740
+ * unsubscribe. A listener that throws is logged and never fails the hold.
1741
+ */
1742
+ onStaleExpertChartersHeld(listener: () => void): () => void;
1743
+ /** Created by the first subscription, so a service built without its constructor (a test) holds the same way. */
1744
+ private staleExpertChartersHoldListeners;
1694
1745
  private holdForStaleExpertCharters;
1695
1746
  /**
1696
1747
  * Whether a held step's charters were committed since its refusal (#3204), which releases it: the staffing step landed
@@ -1878,12 +1929,22 @@ export declare class ApplicationBuildDispatchCompanionService {
1878
1929
  */
1879
1930
  private classifyRanGenerationStep;
1880
1931
  /**
1881
- * Whether nothing a generation step reads has moved since `since` (#3233, #3709): no commit since then, and no dirty path
1882
- * in the working tree, touched what the step READS (`resolveGenerationStepReadRoots`) outside what it writes itself. A
1883
- * step that names no read roots (an unknown step ref) reads every path outside its write scope, the rule before #3709.
1884
- * Until #3709 every step read that way, so any sibling's checkpoint released a held step: on reference run 42886943490
1885
- * a documentation publication failing on the engine's examples could run again after each frontend view landed.
1886
- * `false` when git cannot be read, so a step is never held on an unknown.
1932
+ * Whether nothing a generation step reads has moved since its latest run STARTED (#3233, #3709): no commit since then,
1933
+ * and no uncommitted path edited since then, touched what the step READS (`resolveGenerationStepReadRoots`) outside what
1934
+ * it writes itself. A step that names no read roots (an unknown step ref) reads every path outside its write scope, the
1935
+ * rule before #3709. Until #3709 every step read that way, so any sibling's checkpoint released a held step: on
1936
+ * reference run 42886943490 a documentation publication failing on the engine's examples could run again after each
1937
+ * frontend view landed. From the run's START, not its end: an input changed while the run was running may not have
1938
+ * been read by it.
1939
+ *
1940
+ * An uncommitted path is dated, because being dirty says nothing about WHEN it changed (`readLandingSourceState` leaves
1941
+ * that to its caller): by its modification time, or, when it is gone (a deletion, a rename's origin), by its nearest
1942
+ * existing directory's, which a removal updates. Until #3933 any dirty input released the step, and a live application
1943
+ * nearly always has one: on client creation run 44257782469 the documentation publication failed 117 times in a row on
1944
+ * one missing role specification and was never held. What released it was not observed, so a release now logs the path
1945
+ * that caused it.
1946
+ *
1947
+ * `false` when git, or the application root, cannot be read, so a step is never held on an unknown.
1887
1948
  */
1888
1949
  private generationStepInputsUnmovedSince;
1889
1950
  /**
@@ -2484,19 +2545,32 @@ export declare class ApplicationBuildDispatchCompanionService {
2484
2545
  * after its page, so website tasks ran beside the module tasks serving their requirements, read IN_PROGRESS, and wrote
2485
2546
  * "coming soon" for features that shipped an hour later, with nothing ever rewriting them. So each website task gains
2486
2547
  * a prerequisite on every task delivering a requirement it cites (website and documentation tasks excluded), follow-ups
2487
- * included, as they are appended before this step.
2548
+ * included, as they are appended before this step. Which edges are admissible is {@link deriveWebsiteClaimPrerequisites}'s
2549
+ * (one edge at a time, refused only when it would close a cycle); this host adds the guard and the logging.
2488
2550
  *
2489
2551
  * A page waits on everything its sections cite, since its title and description summarize them, so one feature task
2490
2552
  * that stays stuck holds back the whole page and its sections (re-review R4). That is the plan-stuck path, by design.
2491
- *
2492
- * A delivering task that itself waits on a website task would close a cycle with the added edges. Each website task's
2493
- * edges are kept or dropped TOGETHER, re-checked against the schema and the semantic floors (PREREQUISITE_CYCLE among
2494
- * them), so one cycle costs only the tasks it involves (re-review R2), and each is named in a warning: an ordering
2495
- * preference is never the reason the plan cannot be read.
2496
2553
  */
2497
2554
  private withHostDerivedWebsiteClaimPrerequisites;
2498
2555
  private websiteClaimPrerequisitesMemo;
2499
- private deriveWebsiteClaimPrerequisites;
2556
+ /** The hard-floor findings of the host's plan already logged: each is named once per process, never once per read, as the refused-website-task warning was (17,402 lines on reference run 44052185141). */
2557
+ private readonly loggedHostPlanFloorFindings;
2558
+ /**
2559
+ * The claim edges, held to the plan's hard floors RELATIVE TO THE PLAN THEY ARE ADDED TO.
2560
+ *
2561
+ * The host's plan may already carry a hard-floor finding this step did not cause: a follow-up of a RELATIONSHIP task
2562
+ * keeps that target and declares no product (a follow-up never declares one: it lands on its run, see
2563
+ * `resolveLandedTaskRefs`), which `RELATIONSHIP_TARGET_DISAGREES_WITH_PRODUCTS` reports. The floors are the AUTHORED
2564
+ * plan's contract (`readAuthoredBuildPlan` holds the plan to them); that one guards the domain-coverage count, which
2565
+ * reads authored targets only. Until this guard compared against the plan it extends, the first such follow-up made every
2566
+ * website task's edges look invalid on every read (reference runs 44052185141 and 44255624884, 77 and 76 website tasks per
2567
+ * pass), so pages were built before the features they describe. Such a finding is named once, never held against an edge.
2568
+ *
2569
+ * Only a finding the edges INTRODUCE refuses them, and then all of them: the edge-by-edge derivation can introduce none
2570
+ * today (it adds no edge that closes a cycle, the only floor a website task's prerequisites reach), so this is the guard
2571
+ * for a floor added tomorrow, which costs the claim ordering and never the plan's readability.
2572
+ */
2573
+ private deriveGuardedWebsiteClaimPrerequisites;
2500
2574
  /**
2501
2575
  * The build plan as the DISPATCH HOST reads it: the authored graph, plus the `database-migrations`
2502
2576
  * generation step whenever the application owes one and the plan does not author it (#1027).