@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
@@ -14,7 +14,7 @@ var PlaybookRunCompanionService_1;
14
14
  import { withApplicationDeclaredAnswers } from './declared-interview-answers.companion.js';
15
15
  import { declaredLandingScopeOf, generateChoreographyStepValue } from './choreography-step-generation.companion.js';
16
16
  import { composeExternalAuthenticationBrief } from './external-authentication-brief.companion.utils.js';
17
- import { isRegistryProviderInstalled, listRegistryProviderModules, renderProviderRegistryBrief } from './provider-registry-brief.companion.utils.js';
17
+ import { collectKnownProviderRefs, engineProviderOffers, isRegistryProviderInstalled, listRegistryProviderModules, renderProviderRegistryBrief } from './provider-registry-brief.companion.utils.js';
18
18
  import { z } from 'zod';
19
19
  import { ResearchAgentDispatchCompanionService } from '../../claude-cli/services/research-agent-dispatch.companion.service.js';
20
20
  import { diffResearchEvidence, resolveResearchEvidenceDirectory, snapshotResearchEvidence } from '../../claude-cli/services/research-evidence-store.companion.js';
@@ -35,7 +35,7 @@ import { companionRestartDrain } from '../../core/runtime/restart-drain.companio
35
35
  import { gitReadBroker } from '../../core/utils/git-read-broker.companion.js';
36
36
  import { getFrameworkKnowledgePlaybook, listFrameworkKnowledgePlaybooks, listFrameworkKnowledgeSkillSummaries, readCompiledResearchInformedContent, readFrameworkKnowledgeSkillBody } from '@wildo-ai/framework-knowledge';
37
37
  import { MetaWorkflow_EvaluationTreatmentDefinitionSchema, MetaWorkflow_EvaluationVerdict, MetaWorkflow_Executor, MetaWorkflow_ClarificationAction, } from '@wildo-ai/saas-models/meta-workflows';
38
- import { APPLICATION_SPECIFICATION_SEMANTIC_SCHEMA_BINDINGS, composeElicitationSection, dispatchOutcomeStepRef, BUILD_DECOMPOSE_INPUT_FAMILIES, STANDARD_APPLICATION_SPECIFICATION_SEMANTIC_AUTHORITY, evaluatePlaybookCatalogEligibility, buildApplicationCoherenceReport, collectHeldDraftUndeclaredFactCitations, composeAssuranceDocumentBlueprintBrief, composeAssuranceDocumentFactObligationsBrief, renderAssuranceDocumentClaimGuardsForJudge, composeAssuranceEvidenceBrief, composeAuthoredDocumentFactsBrief, composeAssuranceProgramAuthorityBrief, composeApplicationRoleGraphBrief, deriveOneFamilyFreshness, resolveStepOutputSchema, runPlaybookChoreography, countCheckpointedRounds, describeStaleOutput, describePlaybookRerun, measureChangedAspects, PlaybookLaneBoundaryDecision, collectPlaybookLaneBoundaries, isJudgeVerdictStepRef, buildPlaybookReviewGuide, evaluatePlaybookEligibility, applicationLineRefusalOf, getFamilyPackageRelativePath, resolvePlaybookOutputLandingTarget, getLandableArtifactFamilies, isPlaybookGenerationSuspension, renderApplicationCoherenceReport, renderDeclaredInputFamily, composeDeclaredInputWithheldAspects, composeMarketFitScoresSection, composeRiskSignalsSection, widenDeclaredInputAspects, ARTIFACT_PRESENT_WITHOUT_VALUE, collectConvenedExpertRoles, committedCharterRoleRefs, partitionUnstaffedExpertRoles, rederivableExpertRoleRefs, renderPlaybookReviewGuide, runPlaybookGeneration, readPlaybookOutputLandingBaselines, PlaybookOutputLandingConflictError, PlaybookOutputLandingHeldError, SpecificationWriteRefusedError, writeSpecificationFileAtomicallySync, DEFAULT_MAXIMUM_CLARIFICATION_ROUNDS, accumulateClarificationRequests, validateClarificationAnswers, composeClarificationAnswersSection, runPlaybookJudge, runPlaybookLoop, PlaybookGenerationPurpose, composeBillingCommercialModelBrief, composeOperatingJurisdictionCoverageBrief, composeOperatingJurisdictionsSection, composeCreatorStatedFactsSection, projectPlaybookElicitationAsDecision, answersNoLongerOffered, materializeElicitationOptions, readAnswersForPlaybookQuestions, readNonAnswersForPlaybookQuestions, resolveElicitationAnswers, resolveElicitationNonAnswers, buildCreatorInputLatestReadAnswerByPlaybook, resolveApplicationLineScope, collectFamiliesDeactivatedByDecisions, isFamilyNotApplicable, describeApplicationActiveSet, narrowRefinementRound, refinementDependencyMaps, LANDED_SPECIFICATION_CONSTANT_PREFIX, findReadersDatedByWaitingInterviews, selectInterviewsWaitingOnThePerson, readInterviewDepthFromState, PlaybookRerunKind, } from '@wildo-ai/application-creation-runtime';
38
+ import { APPLICATION_SPECIFICATION_SEMANTIC_SCHEMA_BINDINGS, composeElicitationSection, dispatchOutcomeStepRef, BUILD_DECOMPOSE_INPUT_FAMILIES, STANDARD_APPLICATION_SPECIFICATION_SEMANTIC_AUTHORITY, evaluatePlaybookCatalogEligibility, buildApplicationCoherenceReport, collectHeldDraftUndeclaredFactCitations, composeAssuranceDocumentBlueprintBrief, composeAssuranceDocumentFactObligationsBrief, renderAssuranceDocumentClaimGuardsForJudge, composeAssuranceEvidenceBrief, composeAuthoredDocumentFactsBrief, composeAssuranceProgramAuthorityBrief, composeApplicationRoleGraphBrief, deriveOneFamilyFreshness, resolveStepOutputSchema, runPlaybookChoreography, countCheckpointedRounds, describeStaleOutput, describePlaybookRerun, measureChangedAspects, PlaybookLaneBoundaryDecision, collectPlaybookLaneBoundaries, isJudgeVerdictStepRef, buildPlaybookReviewGuide, evaluatePlaybookEligibility, applicationLineRefusalOf, getFamilyPackageRelativePath, resolvePlaybookOutputLandingTarget, resolveDeclaredSetMembers, getLandableArtifactFamilies, isPlaybookGenerationSuspension, renderApplicationCoherenceReport, renderDeclaredInputFamily, composeDeclaredInputWithheldAspects, composeMarketFitScoresSection, composeRiskSignalsSection, widenDeclaredInputAspects, ARTIFACT_PRESENT_WITHOUT_VALUE, collectConvenedExpertRoles, committedCharterRoleRefs, partitionUnstaffedExpertRoles, rederivableExpertRoleRefs, renderPlaybookReviewGuide, runPlaybookGeneration, readPlaybookOutputLandingBaselines, PlaybookOutputLandingConflictError, PlaybookOutputLandingHeldError, SpecificationWriteRefusedError, writeSpecificationFileAtomicallySync, DEFAULT_MAXIMUM_CLARIFICATION_ROUNDS, accumulateClarificationRequests, validateClarificationAnswers, composeClarificationAnswersSection, runPlaybookJudge, runPlaybookLoop, PlaybookGenerationPurpose, composeBillingCommercialModelBrief, composeOperatingJurisdictionCoverageBrief, composeOperatingJurisdictionsSection, composeCreatorStatedFactsSection, projectPlaybookElicitationAsDecision, answersNoLongerOffered, materializeElicitationOptions, readAnswersForPlaybookQuestions, readNonAnswersForPlaybookQuestions, resolveElicitationAnswers, resolveElicitationNonAnswers, buildCreatorInputLatestReadAnswerByPlaybook, resolveApplicationLineScope, collectFamiliesDeactivatedByDecisions, isFamilyNotApplicable, describeApplicationActiveSet, narrowRefinementRound, refinementDependencyMaps, LANDED_SPECIFICATION_CONSTANT_PREFIX, findReadersDatedByWaitingInterviews, selectInterviewsWaitingOnThePerson, readInterviewDepthFromState, PlaybookRerunKind, isBuildUnfinished, playbookRunsBuildWave, } from '@wildo-ai/application-creation-runtime';
39
39
  // The provider REGISTRY, not the engine map: importing the package root runs its bootstrap, which
40
40
  // registers the engine specifications, and an application's own registered provider specifications
41
41
  // join the same registry — so one accessor covers both authorities.
@@ -48,7 +48,7 @@ import { SAAS_SERVICE_TYPES } from '@wildo-ai/saas-backend-lib';
48
48
  import { getCompanionServedLanguages } from '../../core/config/primary-language.companion.utils.js';
49
49
  import { partitionCapabilitiesByContractedService, secondaryLineDefinitionOfEntry, ApplicationSpecificationFamily, JourneyArtifactValidationState, MetaWorkflowPlaybookSchema, playbookInstanceId, } from '@wildo-ai/saas-specifications/application-creation';
50
50
  import { describeStructuredValidationIssue, readCodingModelDestinations, readStructuredGenerationFailure, } from '@wildo-ai/external-connectors-models';
51
- import { loadSaasConfig, readBuildParallelism, resolveProviderComplianceProfiles } from '@wildo-ai/platform-config-lib';
51
+ import { discoverSaasProviderCompanionContributions, loadSaasConfig, readBuildParallelism, resolveProviderComplianceProfiles } from '@wildo-ai/platform-config-lib';
52
52
  import { StructuredDeliberationCompanionService } from '../../deliberations/services/structured-deliberation.companion.service.js';
53
53
  import { PlacementPlanSchema, collectRevertedPlacementRevisions, deriveDomainPlanSystemOfRecordPartitionFields, } from '@wildo-ai/saas-specifications/application-creation';
54
54
  import { loadEffectiveSystemOfRecordFacets, rereadDeclaredSystemOfRecordInstances, systemOfRecordFacetPartitionsByVendor } from './system-of-record-facet-library.companion.utils.js';
@@ -1906,6 +1906,12 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
1906
1906
  this.dossier = dossier;
1907
1907
  this.contentSafety = contentSafety;
1908
1908
  this.logDebug = this.logger.debugByType('PlaybookRunCompanionService');
1909
+ /*
1910
+ * A deliberation refusing stale seats reads the charters' drift without this service's state, so it asks whether the
1911
+ * build is unfinished through this probe (#4022): the same predicate on the same build-plan progress the board's
1912
+ * `buildPlanExecution` carries, so the board and the refusal agree on which inputs age a charter.
1913
+ */
1914
+ this.expertPersonas.registerBuildUnfinishedProbe(async () => isBuildUnfinished({ buildPlanExecution: await this.buildDispatch.resolveBuildExecutionProgress() }));
1909
1915
  }
1910
1916
  /**
1911
1917
  * Everything an interview proposal reads and calls (#2129), bound in ONE place so the console, the workbench,
@@ -2325,6 +2331,17 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
2325
2331
  },
2326
2332
  },
2327
2333
  ...(input.session ? { trace: this.buildTrace(input.session, 'playbook-choreography') } : {}),
2334
+ }).finally(async () => {
2335
+ /*
2336
+ * A composite that runs the build wave does not settle while the staffing repair its dispatch step started is still
2337
+ * running (#4022), however the choreography ended (a throw included): the repair runs beside the wave, and the
2338
+ * lane's write scope (which admits the staffing step) is what keeps another lane's staffing from deriving the same
2339
+ * charters. Ended on its iteration ceiling, a stop or its closing move, the lane would otherwise release that claim
2340
+ * with the repair still writing.
2341
+ */
2342
+ if (this.staleExpertChartersRepairInFlight !== undefined && playbookRunsBuildWave(input.playbook.ref, new Map(playbooks.map((playbook) => [playbook.ref, playbook])))) {
2343
+ await this.staleExpertChartersRepairInFlight;
2344
+ }
2328
2345
  });
2329
2346
  /*
2330
2347
  * The run reached its OWN conclusion, however it concluded — so the checkpoint has done its job
@@ -3054,6 +3071,18 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
3054
3071
  'earlier objective returns the earlier answer, so make each one different and specific.',
3055
3072
  `You may select up to ${request.maximumLanes} children to run in parallel — do so when they can`,
3056
3073
  'be asked genuinely different questions, not to pad the set.',
3074
+ /*
3075
+ * A refill beside running children (#3848): the slots offered are only the free ones, and what a running child
3076
+ * writes or will land is already off the list. Said so the selector can leave a slot free for what a running
3077
+ * child will unblock instead of filling it because it is there.
3078
+ */
3079
+ ...((request.running ?? []).length === 0 ? [] : [
3080
+ '',
3081
+ '# Already running',
3082
+ `These children are running now: ${request.running.join(', ')}. They are not on offer, and neither is anything that`,
3083
+ 'would write what they write or read what they will land. Choose only what is worth starting beside them; leaving a',
3084
+ 'slot free for what they will unblock is a valid answer.',
3085
+ ]),
3057
3086
  ...(returnedForSelection.length === 0 ? [] : [
3058
3087
  '',
3059
3088
  '# What has been returned so far',
@@ -4067,7 +4096,10 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
4067
4096
  * its last commit, through the same memoised register and git reads as above. Never throws: what it cannot date it
4068
4097
  * does not report.
4069
4098
  */
4070
- const expertCharterDrift = await this.expertPersonas.assessCharterDrift(artifactsByFamily.get(ApplicationSpecificationFamily.EXPERT_PERSONAS));
4099
+ // While the build is unfinished, the inputs the build writes do not age a charter (#4022): read off this state's plan.
4100
+ const expertCharterDrift = await this.expertPersonas.assessCharterDrift(artifactsByFamily.get(ApplicationSpecificationFamily.EXPERT_PERSONAS), {
4101
+ buildUnfinished: isBuildUnfinished({ buildPlanExecution }),
4102
+ });
4071
4103
  /*
4072
4104
  * The creator's answers as an IMPLICIT INPUT of the playbooks that READ them (#1454, Step 8): per
4073
4105
  * playbook, the latest `answeredAt` among the answers it reads. Per answer rather than per file —
@@ -4480,6 +4512,8 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
4480
4512
  * relaunch over the same tree resumes it). Before this, its own selection call settled the loop `failed`.
4481
4513
  */
4482
4514
  isEnvironmentalFailure: isEnvironmentalPlaybookFailure,
4515
+ // A playbook the running build wave alone holds back asks it to yield (#3884), instead of waiting for its cap.
4516
+ requestBuildWaveYield: (because) => this.buildDispatch.requestBuildWaveYield(because),
4483
4517
  awaitEnvironmentRecovery: (reason) => awaitModelProviderRecovery(reason, {
4484
4518
  log: (message, context) => this.logDebug(message, context),
4485
4519
  }),
@@ -5387,16 +5421,20 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
5387
5421
  /**
5388
5422
  * Derive again the expert charters a build panel refused as stale, by running the staffing step itself (#3204).
5389
5423
  *
5390
- * A build task can change an input a charter reads (the design-system task changes the design system the art director
5391
- * and the design-system guardian read), and the next generation step that seats them is refused (#3244). The build
5392
- * holds that step and goes on; this runs `top_down.expert-personas` once the wave has drained, as a child of the same
5393
- * lane, so its landing is a run of its own, recorded and committed like any other (which is why the refusal itself does
5394
- * not derive the charter inline). Then the held steps are offered again. On reference run 42218788356 the refusal ended
5424
+ * An input a charter reads can move during the build (since #4022 the brand or the vision: the build's own design-system
5425
+ * and accepted-mark writes no longer count while it is unfinished), and the next generation step that seats that expert
5426
+ * is refused (#3244). The build holds that step and goes on; this runs `top_down.expert-personas` as a child of the same
5427
+ * lane, started the moment the step is held, beside the wave ({@link startStaleExpertChartersRepair}), so its landing
5428
+ * is a run of its own, recorded and committed like any other (which is why the refusal itself does not derive the
5429
+ * charter inline). Then the held steps it read are offered again. On reference run 42218788356 the refusal ended
5395
5430
  * the build lane at 32 of 98 tasks, and the staffing step it named only ran 20 minutes later, in another lane.
5396
5431
  *
5397
5432
  * Nothing runs when nothing is held, or when every held seat was edited by a person: such a charter is never derived
5398
5433
  * again, and its remedy is the hand edit (the step stays held until that commit). A staffing run that fails is reported
5399
5434
  * and keeps the hold: the next round meets the same refusal and tries again.
5435
+ *
5436
+ * It releases only the holds it read when it started (#4022): it runs beside the build now
5437
+ * ({@link startStaleExpertChartersRepair}), and a step held while it ran may wait on a charter it did not derive.
5400
5438
  */
5401
5439
  async repairStaleExpertCharters(input) {
5402
5440
  const held = this.buildDispatch.readStaleExpertChartersHold();
@@ -5425,7 +5463,7 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
5425
5463
  ...(input.requestedByUserId ? { requestedByUserId: input.requestedByUserId } : {}),
5426
5464
  ...(input.session ? { session: input.session } : {}),
5427
5465
  });
5428
- this.buildDispatch.releaseStaleExpertChartersHold(`${EXPERT_STAFFING_PLAYBOOK_REF} derived ${derivable.join(', ')} again`);
5466
+ this.buildDispatch.releaseStaleExpertChartersHold(`${EXPERT_STAFFING_PLAYBOOK_REF} derived ${derivable.join(', ')} again`, held);
5429
5467
  return { heldTaskRefs, ran: true, detail: `${EXPERT_STAFFING_PLAYBOOK_REF} derived ${derivable.join(', ')} again; the held steps run in the next wave.` };
5430
5468
  }
5431
5469
  catch (error) {
@@ -5433,6 +5471,86 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
5433
5471
  return { heldTaskRefs, ran: false, detail: `${EXPERT_STAFFING_PLAYBOOK_REF} failed: ${describeCaughtError(error)}` };
5434
5472
  }
5435
5473
  }
5474
+ /**
5475
+ * The end of the queue of staffing runs in this process (#4022): each starts once the one before it settled. Both fields
5476
+ * start absent rather than initialised, so a service built without its constructor (the tests' `Object.create`) queues
5477
+ * the same way.
5478
+ */
5479
+ expertStaffingTail;
5480
+ /** Staffing runs queued or running, so a run can tell it waited for another. */
5481
+ expertStaffingQueued;
5482
+ /**
5483
+ * Run one staffing (`top_down.expert-personas`) after any other in this process has settled (#4022).
5484
+ *
5485
+ * The build-dispatch step now starts its staffing repair beside the wave, so the lane's selector, the board, a person or
5486
+ * another lane can start a staffing run while it runs. Two at once would derive and accept the same charters side by
5487
+ * side: the accept serializes its writes (`acceptMutex`), but both derivations spend a three-pass model protocol and
5488
+ * the later accept overwrites the earlier from the same stale reading. In turn, the one that waited re-reads the
5489
+ * application (`waitedForAnother`), finds the charters the first derived current, and derives nothing. Every door that
5490
+ * runs the step (a direct run, a detached submission, a resume) reaches this through `executePlaybookRun`.
5491
+ */
5492
+ runExpertStaffingInTurn(work) {
5493
+ const waitedForAnother = (this.expertStaffingQueued ?? 0) > 0;
5494
+ this.expertStaffingQueued = (this.expertStaffingQueued ?? 0) + 1;
5495
+ const run = (this.expertStaffingTail ?? Promise.resolve()).then(() => work(waitedForAnother));
5496
+ this.expertStaffingTail = run.then(() => undefined, () => undefined).finally(() => { this.expertStaffingQueued = (this.expertStaffingQueued ?? 1) - 1; });
5497
+ return run;
5498
+ }
5499
+ /** The staffing repair running beside the build (#4022), if one is: there is at most one at a time. */
5500
+ staleExpertChartersRepairInFlight;
5501
+ /**
5502
+ * Start {@link repairStaleExpertCharters} without waiting for it, unless one is already running, and return the run
5503
+ * in flight (`undefined` when nothing is held, so nothing started).
5504
+ *
5505
+ * Why it no longer waits for the wave (#4022): on reference run 44052185141 the logo step was held at 11:15, the staffing
5506
+ * run started only when that wave drained at 12:27, and the next wave started at 12:36, so ten ready tasks waited eight
5507
+ * minutes on a run only the logo step needed (and again from 13:03 to 13:12). Started the moment a step is held, it runs
5508
+ * beside the coding runs the wave keeps starting, and when it lands it releases the held step for the next slot. A
5509
+ * staffing landing beside live coding runs is the case the in-flight landing window exists for (#3221), as for any
5510
+ * other lane's landing during the build. The build-dispatch step waits for it only when the wave could start nothing
5511
+ * else, since then the held steps are all that is left (and the lane would otherwise spend rounds on empty waves).
5512
+ */
5513
+ startStaleExpertChartersRepair(input) {
5514
+ if (this.staleExpertChartersRepairInFlight !== undefined)
5515
+ return this.staleExpertChartersRepairInFlight;
5516
+ if (this.buildDispatch.readStaleExpertChartersHold().length === 0)
5517
+ return undefined;
5518
+ const repair = this.repairStaleExpertCharters(input)
5519
+ .catch((error) => {
5520
+ this.logger.warn(`The staffing repair for stale expert charters failed; the held steps stay held: ${describeCaughtError(error)}`);
5521
+ return undefined;
5522
+ })
5523
+ .finally(() => {
5524
+ if (this.staleExpertChartersRepairInFlight === repair)
5525
+ this.staleExpertChartersRepairInFlight = undefined;
5526
+ });
5527
+ this.staleExpertChartersRepairInFlight = repair;
5528
+ return repair;
5529
+ }
5530
+ /**
5531
+ * What the build-dispatch step reports of the staffing repair once its wave has drained (#4022), and whether it waits.
5532
+ *
5533
+ * It waits only when the wave started nothing but steps refused on stale charters (or nothing at all): then the held
5534
+ * steps are all the build has left to run now, and returning would hand the lane an empty wave per round until the
5535
+ * staffing run lands (a held step is passed over, so the wave would find nothing either). Otherwise the staffing run
5536
+ * keeps running beside the next wave, and its landing releases the held steps there.
5537
+ */
5538
+ async settleStaleExpertChartersRepairAfterWave(input, wave) {
5539
+ // A hold the wave set after its listener was gone (a step settling as the wave ended) starts here.
5540
+ const repair = this.startStaleExpertChartersRepair(input);
5541
+ if (repair === undefined)
5542
+ return undefined;
5543
+ const held = new Set(this.buildDispatch.readStaleExpertChartersHold().map((entry) => entry.taskRef));
5544
+ const startedOtherWork = wave.dispatched.some((entry) => !held.has(entry.plan.taskRef));
5545
+ if (!startedOtherWork)
5546
+ return repair;
5547
+ return {
5548
+ heldTaskRefs: [...held],
5549
+ ran: false,
5550
+ inFlight: true,
5551
+ detail: `${EXPERT_STAFFING_PLAYBOOK_REF} is deriving the stale charters again beside the build; the held steps run once it lands.`,
5552
+ };
5553
+ }
5436
5554
  /**
5437
5555
  * The single-flight subject this run holds, if any: its composite INSTANCE's (#1610), exactly when the
5438
5556
  * playbook DECLARES a choreography and the run is not nested inside another composite — see
@@ -5871,9 +5989,20 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
5871
5989
  */
5872
5990
  if (input.dryRun !== true && saasRoot !== undefined
5873
5991
  && (readBuildParallelism(saasRoot) > 1 || this.buildDispatch.readCodingAgentUsageLimitHold() !== undefined)) {
5874
- const wave = await this.buildDispatch.dispatchBuildWave(input.session);
5875
- // A panel refused stale expert charters (#3204): derive them again now, so the next wave runs the held steps.
5876
- const staffingRepair = await this.repairStaleExpertCharters(input);
5992
+ /*
5993
+ * A panel refused stale expert charters (#3204): the staffing run that derives them again starts the moment a step is
5994
+ * held, beside the wave (#4022), and a hold carried from an earlier wave starts it now. Only the held steps wait on it.
5995
+ */
5996
+ const unsubscribeFromHolds = this.buildDispatch.onStaleExpertChartersHeld(() => { void this.startStaleExpertChartersRepair(input); });
5997
+ void this.startStaleExpertChartersRepair(input);
5998
+ let wave;
5999
+ try {
6000
+ wave = await this.buildDispatch.dispatchBuildWave(input.session);
6001
+ }
6002
+ finally {
6003
+ unsubscribeFromHolds();
6004
+ }
6005
+ const staffingRepair = await this.settleStaleExpertChartersRepairAfterWave(input, wave);
5877
6006
  // The coding agent's account hit its usage limit: the build resumes on its own at the reset (#2388) — unless a
5878
6007
  // person's stop holds it (#3206), read at the wave's END so a stop asked while it drained counts too. The resume
5879
6008
  // relaunches what the limit stopped: this run's tree when it was a child of a composite, else a wave (#2463).
@@ -5893,6 +6022,11 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
5893
6022
  const dispatch = input.dryRun === true
5894
6023
  ? { plan: await this.buildDispatch.describeNextBuildTask() }
5895
6024
  : await this.buildDispatch.dispatchNextBuildTask(input.session);
6025
+ /*
6026
+ * A held step's staffing run starts now (#4022), beside the coding run this dispatch admitted, and is awaited after it:
6027
+ * a build parallelism of 1 runs one thing per round, so the round waits, but no longer for the two in turn.
6028
+ */
6029
+ const staffingRepairStarted = input.dryRun === true ? undefined : this.startStaleExpertChartersRepair(input);
5896
6030
  /*
5897
6031
  * WAIT for the work, then report what it did.
5898
6032
  *
@@ -5916,7 +6050,7 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
5916
6050
  ? await this.buildDispatch.awaitCodingRunOutcome(dispatch.admission.taskId, input.session)
5917
6051
  : null;
5918
6052
  // The step's panel refused stale expert charters (#3204): repaired here at a build parallelism of 1 too.
5919
- const staffingRepair = input.dryRun === true ? undefined : await this.repairStaleExpertCharters(input);
6053
+ const staffingRepair = await staffingRepairStarted;
5920
6054
  // The single dispatch met the coding agent's usage limit: the build resumes on its own at the reset (#2388).
5921
6055
  const heldAfterRun = this.buildDispatch.readCodingAgentUsageLimitHold();
5922
6056
  // Not when a person stopped the build while the task ran (#3206 review R1): a stop holds it until they start it.
@@ -6103,8 +6237,12 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
6103
6237
  * when it staffed none of the roles it attempted, and at the first role an environmental fault reaches (#3204).
6104
6238
  */
6105
6239
  if (input.playbookRef === EXPERT_PERSONAS_PLAYBOOK_REF) {
6106
- return this.staffExpertPanels({
6107
- artifactState,
6240
+ /*
6241
+ * One staffing at a time in this process (#4022); one that waited reads the state the one before it left. A dry run
6242
+ * writes nothing, so it does not queue behind a derivation.
6243
+ */
6244
+ const staff = async (waitedForAnother) => this.staffExpertPanels({
6245
+ artifactState: waitedForAnother ? await this.readArtifactState() : artifactState,
6108
6246
  ...(input.dryRun === true ? { dryRun: true } : {}),
6109
6247
  run: {
6110
6248
  runId,
@@ -6113,6 +6251,7 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
6113
6251
  ...(input.session ? { traceSessionId: input.session.sessionId } : {}),
6114
6252
  },
6115
6253
  });
6254
+ return input.dryRun === true ? staff(false) : this.runExpertStaffingInTurn(staff);
6116
6255
  }
6117
6256
  /*
6118
6257
  * What every DETERMINISTIC executor branch below lands under (#3237): the run's identity, for the write record
@@ -6378,6 +6517,8 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
6378
6517
  * that cannot be read is left absent, and the normalizer records the split unconfirmed rather than guessing.
6379
6518
  */
6380
6519
  const systemOfRecordPartitionFields = await this.readSystemOfRecordPartitionFieldsFor(outputs);
6520
+ // #3995: what providers exist, so an integration plan binding nothing (or forking something) goes back to the model.
6521
+ const knownProviderRefs = await this.readKnownProviderRefsFor(outputs);
6381
6522
  /*
6382
6523
  * The landing IN FLIGHT (#3221): opened by the landing itself, just before its first write, with the paths it is
6383
6524
  * about to write, and told each later path before its write (#3237 review F1); released once the write record below
@@ -6398,6 +6539,12 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
6398
6539
  playbookRef: input.playbookRef,
6399
6540
  // The INSTANCE (#1609): refused before generation, and at landing, unless every output is a keyed set.
6400
6541
  ...(input.instanceKey ? { instanceKey: input.instanceKey } : {}),
6542
+ // The members of each keyed set this playbook declares (#3896): it may land only those, which is what lets two
6543
+ // producers of one set run together.
6544
+ declaredSetMembers: new Map((playbook.outputs ?? []).flatMap((output) => {
6545
+ const members = resolveDeclaredSetMembers(playbook, output.family);
6546
+ return members === undefined ? [] : [[output.family, members]];
6547
+ })),
6401
6548
  outputs,
6402
6549
  specificationsPackageRoot,
6403
6550
  /*
@@ -6413,6 +6560,7 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
6413
6560
  ...(enabledEngineCapabilities === undefined ? {} : { enabledEngineCapabilities }),
6414
6561
  ...(operatingJurisdictionSlugs === undefined ? {} : { operatingJurisdictionSlugs }),
6415
6562
  ...(systemOfRecordPartitionFields === undefined ? {} : { systemOfRecordPartitionFields }),
6563
+ ...(knownProviderRefs === undefined ? {} : { knownProviderRefs }),
6416
6564
  ...(landedBuildTasks === undefined ? {} : { landedBuildTasks }),
6417
6565
  // NEUTRAL BY CONTRACT (issue #65): every landed specification constant carries the fixed
6418
6566
  // `application` prefix (`applicationVisionSnapshot`, `applicationBuildPlan`, …), never an
@@ -6820,6 +6968,19 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
6820
6968
  dropped: record.droppedUnresolvableItems.map((item) => `${item.aspectKey} ${item.itemRef} (${item.scope}): ${item.field} → ${item.missingRefs.join(', ')}`),
6821
6969
  });
6822
6970
  }
6971
+ /*
6972
+ * Elements the generation's LAST attempt removed rather than refuse the output (#3995 review follow-up): a recorded need
6973
+ * naming a provider that exists, or a binding to a provider nothing provides. Said here for the same reason as the
6974
+ * dropped items above: an unattended run's response reaches no person.
6975
+ */
6976
+ for (const attempt of result.generation) {
6977
+ if (attempt.lastAttemptRemovals === undefined)
6978
+ continue;
6979
+ this.logger.warn(`Playbook "${input.playbookRef}" landed "${attempt.family}" after its last attempt removed ${attempt.lastAttemptRemovals.length} element(s) it could not correct`, {
6980
+ family: attempt.family,
6981
+ removed: attempt.lastAttemptRemovals,
6982
+ });
6983
+ }
6823
6984
  // On the run's write record too, so the commit that accepts it names what is missing (best-effort, like the record).
6824
6985
  if (revertHandle !== undefined && droppedItems.length > 0) {
6825
6986
  await this.writeRegister.markDroppedItems(revertHandle, droppedItems).catch((error) => {
@@ -7613,6 +7774,45 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
7613
7774
  schedulesAssuranceReview,
7614
7775
  });
7615
7776
  }
7777
+ /**
7778
+ * The provider refs that exist for this application (#3995), for a generation producing the integration plan; `undefined`
7779
+ * for any other generation, and when the registry cannot be read (an unknown provider is then not a wrong one). The
7780
+ * installed `providers/<ref>/` are read from disk now; the declared scopes come from the configuration the companion
7781
+ * holds, which a provider the integration plan itself declares has not reached yet, and does not need to.
7782
+ */
7783
+ async readKnownProviderRefsFor(outputs) {
7784
+ if (!outputs.some((output) => output.family === ApplicationSpecificationFamily.INTEGRATION_PLAN))
7785
+ return undefined;
7786
+ const listing = await listRegistryProviderModules({
7787
+ frameworkRoot: this.companionContext.resolvedHomes.framework.repositoryRoot ?? null,
7788
+ moduleRegistries: this.companionContext.saasConfig?.moduleRegistries,
7789
+ });
7790
+ const saasConfig = this.companionContext.saasConfig;
7791
+ // Discovery brings what the application authored or installed beside the engine's specifications; unreadable, no check.
7792
+ let discoveredContributions;
7793
+ try {
7794
+ const discovery = saasConfig === undefined ? undefined : await discoverSaasProviderCompanionContributions({ saasRoot: this.companionContext.saasRoot, saasConfig });
7795
+ /*
7796
+ * A walk that could not read an owner is partial: a provider that owner authored would be refused against it (#3995
7797
+ * review R2), so partial is unknown and unknown skips the check. Since #3995 item 5 every scope is checked
7798
+ * (`PROVIDER_BINDING_SCOPES_CHECKED_FOR_EXISTENCE`), so an unreadable FRONTEND service counts too: it used to be
7799
+ * exempt only because frontend-scope bindings were not checked.
7800
+ */
7801
+ const ownerUnreadable = (discovery?.unreadableOwners.length ?? 0) > 0;
7802
+ discoveredContributions = discovery === undefined || ownerUnreadable ? undefined : discovery.contributions;
7803
+ }
7804
+ catch (error) {
7805
+ this.logDebug('Provider discovery unreadable; the integration plan\'s provider check is skipped', { error: describeCaughtError(error) });
7806
+ discoveredContributions = undefined;
7807
+ }
7808
+ return collectKnownProviderRefs({
7809
+ listing,
7810
+ applicationRoot: this.companionContext.saasRoot,
7811
+ specifications: listRegisteredProviderSpecifications(),
7812
+ discoveredContributions,
7813
+ saasConfig,
7814
+ });
7815
+ }
7616
7816
  /**
7617
7817
  * The system-of-record facets' partition fields by kind (#3045), for a generation producing the domain plan, read from the
7618
7818
  * application's EFFECTIVE facets, as the backend resolves them at startup (`loadEffectiveSystemOfRecordFacets`, #3053);
@@ -8223,7 +8423,9 @@ let PlaybookRunCompanionService = class PlaybookRunCompanionService {
8223
8423
  frameworkRoot: this.companionContext.resolvedHomes.framework.repositoryRoot ?? null,
8224
8424
  moduleRegistries: this.companionContext.saasConfig?.moduleRegistries,
8225
8425
  });
8226
- return renderProviderRegistryBrief(listing, (providerRef) => isRegistryProviderInstalled(saasRoot, providerRef));
8426
+ // The engine's own providers beside the registry's (#3992): a planner sees everything the framework has before it
8427
+ // concludes a need is unprovided.
8428
+ return renderProviderRegistryBrief(listing, (providerRef) => isRegistryProviderInstalled(saasRoot, providerRef), engineProviderOffers(listRegisteredProviderSpecifications()));
8227
8429
  }
8228
8430
  async composeWorkspaceTruthSection(playbook) {
8229
8431
  if (!playbookDeclaresContextSource(playbook, MetaWorkflow_ContextSource.WORKSPACE_TRUTH))