@wildo-ai/wildo-cli 1.1.13 → 1.1.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (473) hide show
  1. package/dist/src/commands/build/approve.command.d.ts +4 -0
  2. package/dist/src/commands/build/approve.command.d.ts.map +1 -1
  3. package/dist/src/commands/build/approve.command.js +14 -3
  4. package/dist/src/commands/build/approve.command.js.map +1 -1
  5. package/dist/src/commands/build/close.command.d.ts +4 -0
  6. package/dist/src/commands/build/close.command.d.ts.map +1 -1
  7. package/dist/src/commands/build/close.command.js +17 -3
  8. package/dist/src/commands/build/close.command.js.map +1 -1
  9. package/dist/src/commands/config/sync.command.d.ts.map +1 -1
  10. package/dist/src/commands/config/sync.command.js +21 -1
  11. package/dist/src/commands/config/sync.command.js.map +1 -1
  12. package/dist/src/commands/creation/feed.command.d.ts.map +1 -1
  13. package/dist/src/commands/creation/feed.command.js +6 -3
  14. package/dist/src/commands/creation/feed.command.js.map +1 -1
  15. package/dist/src/commands/fwk/publish-all.command.d.ts +13 -0
  16. package/dist/src/commands/fwk/publish-all.command.d.ts.map +1 -1
  17. package/dist/src/commands/fwk/publish-all.command.js +57 -3
  18. package/dist/src/commands/fwk/publish-all.command.js.map +1 -1
  19. package/dist/src/commands/fwk/publish-docker.command.d.ts.map +1 -1
  20. package/dist/src/commands/fwk/publish-docker.command.js +16 -1
  21. package/dist/src/commands/fwk/publish-docker.command.js.map +1 -1
  22. package/dist/src/commands/fwk/registry-host.command.d.ts +19 -1
  23. package/dist/src/commands/fwk/registry-host.command.d.ts.map +1 -1
  24. package/dist/src/commands/fwk/registry-host.command.js +78 -3
  25. package/dist/src/commands/fwk/registry-host.command.js.map +1 -1
  26. package/dist/src/commands/init.command.d.ts +14 -0
  27. package/dist/src/commands/init.command.d.ts.map +1 -1
  28. package/dist/src/commands/init.command.js +29 -3
  29. package/dist/src/commands/init.command.js.map +1 -1
  30. package/dist/src/commands/registry/repair-lockfile.command.d.ts.map +1 -1
  31. package/dist/src/commands/registry/repair-lockfile.command.js +1 -0
  32. package/dist/src/commands/registry/repair-lockfile.command.js.map +1 -1
  33. package/dist/src/commands/registry/update.command.d.ts.map +1 -1
  34. package/dist/src/commands/registry/update.command.js +1 -0
  35. package/dist/src/commands/registry/update.command.js.map +1 -1
  36. package/dist/src/commands/seal/verify.command.d.ts +18 -0
  37. package/dist/src/commands/seal/verify.command.d.ts.map +1 -1
  38. package/dist/src/commands/seal/verify.command.js +62 -1
  39. package/dist/src/commands/seal/verify.command.js.map +1 -1
  40. package/dist/src/services/application/provider-runtime-sync.service.d.ts.map +1 -1
  41. package/dist/src/services/application/provider-runtime-sync.service.js +26 -1
  42. package/dist/src/services/application/provider-runtime-sync.service.js.map +1 -1
  43. package/dist/src/services/application/saas-skeleton.service.d.ts.map +1 -1
  44. package/dist/src/services/application/saas-skeleton.service.js +24 -2
  45. package/dist/src/services/application/saas-skeleton.service.js.map +1 -1
  46. package/dist/src/services/companion/build-console.service.d.ts +39 -2
  47. package/dist/src/services/companion/build-console.service.d.ts.map +1 -1
  48. package/dist/src/services/companion/build-console.service.js +54 -4
  49. package/dist/src/services/companion/build-console.service.js.map +1 -1
  50. package/dist/src/services/companion/creation-console.service.d.ts +6 -1
  51. package/dist/src/services/companion/creation-console.service.d.ts.map +1 -1
  52. package/dist/src/services/companion/creation-console.service.js +14 -2
  53. package/dist/src/services/companion/creation-console.service.js.map +1 -1
  54. package/dist/src/services/companion/creation-drive.service.d.ts.map +1 -1
  55. package/dist/src/services/companion/creation-drive.service.js +5 -2
  56. package/dist/src/services/companion/creation-drive.service.js.map +1 -1
  57. package/dist/src/services/credentials/composed-provider-catalogue.d.ts.map +1 -1
  58. package/dist/src/services/credentials/composed-provider-catalogue.js +14 -2
  59. package/dist/src/services/credentials/composed-provider-catalogue.js.map +1 -1
  60. package/dist/src/services/credentials/secret-requirements.service.d.ts +2 -1
  61. package/dist/src/services/credentials/secret-requirements.service.d.ts.map +1 -1
  62. package/dist/src/services/credentials/secret-requirements.service.js +17 -1
  63. package/dist/src/services/credentials/secret-requirements.service.js.map +1 -1
  64. package/dist/src/services/deployment/application-runtime-environment.d.ts.map +1 -1
  65. package/dist/src/services/deployment/application-runtime-environment.js +3 -13
  66. package/dist/src/services/deployment/application-runtime-environment.js.map +1 -1
  67. package/dist/src/services/deployment/docker/docker-compose-generator.service.d.ts.map +1 -1
  68. package/dist/src/services/deployment/docker/docker-compose-generator.service.js +8 -2
  69. package/dist/src/services/deployment/docker/docker-compose-generator.service.js.map +1 -1
  70. package/dist/src/services/deployment/host-toolchain-readiness.service.d.ts +1 -1
  71. package/dist/src/services/deployment/host-toolchain-readiness.service.js +1 -1
  72. package/dist/src/services/deployment/host-toolchain-readiness.service.js.map +1 -1
  73. package/dist/src/services/deployment/k8s/k8s-manifest-generator.service.d.ts.map +1 -1
  74. package/dist/src/services/deployment/k8s/k8s-manifest-generator.service.js +3 -1
  75. package/dist/src/services/deployment/k8s/k8s-manifest-generator.service.js.map +1 -1
  76. package/dist/src/services/deployment/local-precondition-checks.service.d.ts.map +1 -1
  77. package/dist/src/services/deployment/local-precondition-checks.service.js +4 -2
  78. package/dist/src/services/deployment/local-precondition-checks.service.js.map +1 -1
  79. package/dist/src/services/environment/env-configuration-generator.service.d.ts.map +1 -1
  80. package/dist/src/services/environment/env-configuration-generator.service.js +8 -3
  81. package/dist/src/services/environment/env-configuration-generator.service.js.map +1 -1
  82. package/dist/src/services/environment/environment-service-profile.utils.d.ts +8 -1
  83. package/dist/src/services/environment/environment-service-profile.utils.d.ts.map +1 -1
  84. package/dist/src/services/environment/environment-service-profile.utils.js +14 -1
  85. package/dist/src/services/environment/environment-service-profile.utils.js.map +1 -1
  86. package/dist/src/services/framework/framework-docker-publish.service.d.ts +89 -0
  87. package/dist/src/services/framework/framework-docker-publish.service.d.ts.map +1 -1
  88. package/dist/src/services/framework/framework-docker-publish.service.js +180 -18
  89. package/dist/src/services/framework/framework-docker-publish.service.js.map +1 -1
  90. package/dist/src/services/framework/github-actions-annotation.d.ts +19 -0
  91. package/dist/src/services/framework/github-actions-annotation.d.ts.map +1 -0
  92. package/dist/src/services/framework/github-actions-annotation.js +25 -0
  93. package/dist/src/services/framework/github-actions-annotation.js.map +1 -0
  94. package/dist/src/services/framework/registry-host/registry-host-upgrade.d.ts +43 -0
  95. package/dist/src/services/framework/registry-host/registry-host-upgrade.d.ts.map +1 -0
  96. package/dist/src/services/framework/registry-host/registry-host-upgrade.js +117 -0
  97. package/dist/src/services/framework/registry-host/registry-host-upgrade.js.map +1 -0
  98. package/dist/src/services/framework/registry-host/registry-host.service.d.ts +1 -1
  99. package/dist/src/services/framework/registry-host/registry-host.service.d.ts.map +1 -1
  100. package/dist/src/services/framework/registry-host/registry-host.service.js +2 -0
  101. package/dist/src/services/framework/registry-host/registry-host.service.js.map +1 -1
  102. package/dist/src/services/registry/installed-file-state.utils.d.ts +8 -0
  103. package/dist/src/services/registry/installed-file-state.utils.d.ts.map +1 -1
  104. package/dist/src/services/registry/installed-file-state.utils.js +9 -1
  105. package/dist/src/services/registry/installed-file-state.utils.js.map +1 -1
  106. package/dist/src/services/registry/module-install.service.d.ts.map +1 -1
  107. package/dist/src/services/registry/module-install.service.js +1 -0
  108. package/dist/src/services/registry/module-install.service.js.map +1 -1
  109. package/dist/src/services/registry/provider-module-scaffold.service.d.ts.map +1 -1
  110. package/dist/src/services/registry/provider-module-scaffold.service.js +4 -0
  111. package/dist/src/services/registry/provider-module-scaffold.service.js.map +1 -1
  112. package/dist/tsconfig.build.tsbuildinfo +1 -1
  113. package/framework-root-package.json +3 -3
  114. package/package.json +22 -22
  115. package/scripts/app-dependency-alignment/propagated-engine-overrides.json +1 -1
  116. package/templates/infra/docker-compose/docker-compose.wildo-platform.yml.hbs +17 -2
  117. package/templates/infra/registry-host/docker-compose.yml +9 -2
  118. package/templates/infra/registry-host/upgrade-image.sh +108 -0
  119. package/templates/saas/i18n/email/resources/dataSubjectRequests/create.users-custom_ready/labels.fr.ts +22 -0
  120. package/templates/saas/i18n/email/resources/dataSubjectRequests/create.users-custom_received/labels.fr.ts +23 -0
  121. package/templates/saas/i18n/email/resources/dataSubjectRequests/update.users-custom_extended/labels.fr.ts +23 -0
  122. package/templates/saas/i18n/email/resources/organizationSsoConfig/repairUnreadableConfiguration.organization-users/labels.fr.ts +23 -0
  123. package/templates/saas/i18n/engine/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.en.ts +28 -0
  124. package/templates/saas/i18n/engine/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.fr.ts +28 -0
  125. package/templates/saas/i18n/engine/components/LOW_LEVEL_AI_APPROVAL.en.ts +2 -1
  126. package/templates/saas/i18n/engine/components/LOW_LEVEL_AI_APPROVAL.fr.ts +2 -1
  127. package/templates/saas/i18n/engine/components/LOW_LEVEL_AI_CONVERSATION_THREAD.en.ts +6 -1
  128. package/templates/saas/i18n/engine/components/LOW_LEVEL_AI_CONVERSATION_THREAD.fr.ts +6 -1
  129. package/templates/saas/i18n/engine/components/LOW_LEVEL_APPROVAL_SEAL.en.ts +40 -0
  130. package/templates/saas/i18n/engine/components/LOW_LEVEL_APPROVAL_SEAL.fr.ts +40 -0
  131. package/templates/saas/i18n/engine/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.en.ts +2 -1
  132. package/templates/saas/i18n/engine/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.fr.ts +2 -1
  133. package/templates/saas/i18n/engine/components/LOW_LEVEL_FORM_FIELD_STRING.en.ts +2 -1
  134. package/templates/saas/i18n/engine/components/LOW_LEVEL_FORM_FIELD_STRING.fr.ts +2 -1
  135. package/templates/saas/i18n/engine/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.en.ts +2 -1
  136. package/templates/saas/i18n/engine/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.fr.ts +2 -1
  137. package/templates/saas/i18n/engine/components/PUBLIC_LAYOUTS_TERMS.en.ts +3 -1
  138. package/templates/saas/i18n/engine/components/PUBLIC_LAYOUTS_TERMS.fr.ts +3 -1
  139. package/templates/saas/i18n/engine/components/PUBLIC_LAYOUTS_USER_AUTH.en.ts +2 -1
  140. package/templates/saas/i18n/engine/components/PUBLIC_LAYOUTS_USER_AUTH.fr.ts +2 -1
  141. package/templates/saas/i18n/engine/components/RESOURCES_LAYOUTS_FILTERS.en.ts +3 -1
  142. package/templates/saas/i18n/engine/components/RESOURCES_LAYOUTS_FILTERS.fr.ts +4 -2
  143. package/templates/saas/i18n/engine/components/RESOURCES_LAYOUTS_LIST.en.ts +18 -1
  144. package/templates/saas/i18n/engine/components/RESOURCES_LAYOUTS_LIST.fr.ts +18 -1
  145. package/templates/saas/i18n/engine/resources/actorSystemExecutions.en.ts +10 -82
  146. package/templates/saas/i18n/engine/resources/actorSystemExecutions.fr.ts +0 -72
  147. package/templates/saas/i18n/engine/resources/actorTasks.en.ts +0 -33
  148. package/templates/saas/i18n/engine/resources/actorTasks.fr.ts +0 -33
  149. package/templates/saas/i18n/engine/resources/agentBehaviorReports.en.ts +0 -108
  150. package/templates/saas/i18n/engine/resources/agentBehaviorReports.fr.ts +0 -108
  151. package/templates/saas/i18n/engine/resources/agentOperationRecords.en.ts +8 -24
  152. package/templates/saas/i18n/engine/resources/agentOperationRecords.fr.ts +10 -26
  153. package/templates/saas/i18n/engine/resources/agentWorkCaptureSettings.en.ts +0 -12
  154. package/templates/saas/i18n/engine/resources/agentWorkCaptureSettings.fr.ts +0 -12
  155. package/templates/saas/i18n/engine/resources/anonymous_users.en.ts +8 -74
  156. package/templates/saas/i18n/engine/resources/anonymous_users.fr.ts +0 -66
  157. package/templates/saas/i18n/engine/resources/applicationA2aPushDeliveryLog.en.ts +3 -21
  158. package/templates/saas/i18n/engine/resources/applicationA2aPushDeliveryLog.fr.ts +0 -18
  159. package/templates/saas/i18n/engine/resources/applicationA2aTokenBudgetState.en.ts +3 -33
  160. package/templates/saas/i18n/engine/resources/applicationA2aTokenBudgetState.fr.ts +0 -30
  161. package/templates/saas/i18n/engine/resources/applicationAccessGrants.en.ts +13 -55
  162. package/templates/saas/i18n/engine/resources/applicationAccessGrants.fr.ts +0 -42
  163. package/templates/saas/i18n/engine/resources/applicationAgentPolicies.en.ts +8 -24
  164. package/templates/saas/i18n/engine/resources/applicationAgentPolicies.fr.ts +8 -24
  165. package/templates/saas/i18n/engine/resources/applicationAgentWorkDecisionContents.en.ts +0 -27
  166. package/templates/saas/i18n/engine/resources/applicationAgentWorkDecisionContents.fr.ts +0 -27
  167. package/templates/saas/i18n/engine/resources/applicationAgentWorkDecisions.en.ts +13 -43
  168. package/templates/saas/i18n/engine/resources/applicationAgentWorkDecisions.fr.ts +0 -30
  169. package/templates/saas/i18n/engine/resources/applicationApiKeys.en.ts +2 -70
  170. package/templates/saas/i18n/engine/resources/applicationApiKeys.fr.ts +2 -70
  171. package/templates/saas/i18n/engine/resources/applicationAuditLogs.en.ts +41 -94
  172. package/templates/saas/i18n/engine/resources/applicationAuditLogs.fr.ts +41 -94
  173. package/templates/saas/i18n/engine/resources/applicationDataKeys.en.ts +2 -22
  174. package/templates/saas/i18n/engine/resources/applicationDataKeys.fr.ts +2 -22
  175. package/templates/saas/i18n/engine/resources/applicationFeatures.en.ts +0 -24
  176. package/templates/saas/i18n/engine/resources/applicationFeatures.fr.ts +0 -24
  177. package/templates/saas/i18n/engine/resources/applicationFlowActorExecutions.en.ts +25 -160
  178. package/templates/saas/i18n/engine/resources/applicationFlowActorExecutions.fr.ts +25 -160
  179. package/templates/saas/i18n/engine/resources/applicationFlowActorTasks.en.ts +6 -28
  180. package/templates/saas/i18n/engine/resources/applicationFlowActorTasks.fr.ts +8 -30
  181. package/templates/saas/i18n/engine/resources/applicationInboundDeliveries.en.ts +92 -23
  182. package/templates/saas/i18n/engine/resources/applicationInboundDeliveries.fr.ts +95 -26
  183. package/templates/saas/i18n/engine/resources/applicationM2mWebhookDeliveryLog.en.ts +1 -25
  184. package/templates/saas/i18n/engine/resources/applicationM2mWebhookDeliveryLog.fr.ts +4 -28
  185. package/templates/saas/i18n/engine/resources/applicationMetadata.en.ts +0 -18
  186. package/templates/saas/i18n/engine/resources/applicationMetadata.fr.ts +0 -18
  187. package/templates/saas/i18n/engine/resources/applicationOAuthClients.en.ts +2 -58
  188. package/templates/saas/i18n/engine/resources/applicationOAuthClients.fr.ts +2 -58
  189. package/templates/saas/i18n/engine/resources/applicationProviderCredentials.en.ts +168 -0
  190. package/templates/saas/i18n/engine/resources/applicationProviderCredentials.fr.ts +168 -0
  191. package/templates/saas/i18n/engine/resources/applicationScimProvisioningConfig.en.ts +0 -30
  192. package/templates/saas/i18n/engine/resources/applicationScimProvisioningConfig.fr.ts +0 -30
  193. package/templates/saas/i18n/engine/resources/applicationSiemDeliveryDlq.en.ts +3 -42
  194. package/templates/saas/i18n/engine/resources/applicationSiemDeliveryDlq.fr.ts +5 -44
  195. package/templates/saas/i18n/engine/resources/applicationSiemDeliveryOutbox.en.ts +3 -30
  196. package/templates/saas/i18n/engine/resources/applicationSiemDeliveryOutbox.fr.ts +0 -27
  197. package/templates/saas/i18n/engine/resources/applicationSiemExportConfig.en.ts +0 -24
  198. package/templates/saas/i18n/engine/resources/applicationSiemExportConfig.fr.ts +0 -24
  199. package/templates/saas/i18n/engine/resources/applicationSsoConfig.en.ts +113 -61
  200. package/templates/saas/i18n/engine/resources/applicationSsoConfig.fr.ts +113 -61
  201. package/templates/saas/i18n/engine/resources/applicationSsoConnections.en.ts +0 -138
  202. package/templates/saas/i18n/engine/resources/applicationSsoConnections.fr.ts +0 -138
  203. package/templates/saas/i18n/engine/resources/applicationVersions.en.ts +3 -27
  204. package/templates/saas/i18n/engine/resources/applicationVersions.fr.ts +0 -24
  205. package/templates/saas/i18n/engine/resources/applicationWebhookConfig.en.ts +5 -54
  206. package/templates/saas/i18n/engine/resources/applicationWebhookConfig.fr.ts +5 -54
  207. package/templates/saas/i18n/engine/resources/applications.en.ts +39 -2177
  208. package/templates/saas/i18n/engine/resources/applications.fr.ts +39 -2177
  209. package/templates/saas/i18n/engine/resources/approvalSeals.en.ts +38 -31
  210. package/templates/saas/i18n/engine/resources/approvalSeals.fr.ts +38 -31
  211. package/templates/saas/i18n/engine/resources/auditLogs.en.ts +78 -111
  212. package/templates/saas/i18n/engine/resources/auditLogs.fr.ts +78 -111
  213. package/templates/saas/i18n/engine/resources/billingEffectOutbox.en.ts +2 -4
  214. package/templates/saas/i18n/engine/resources/billingEffectOutbox.fr.ts +2 -4
  215. package/templates/saas/i18n/engine/resources/billingSubscriptionMutationIntents.en.ts +8 -6
  216. package/templates/saas/i18n/engine/resources/billingSubscriptionMutationIntents.fr.ts +8 -6
  217. package/templates/saas/i18n/engine/resources/chatConversations.en.ts +0 -18
  218. package/templates/saas/i18n/engine/resources/chatConversations.fr.ts +0 -18
  219. package/templates/saas/i18n/engine/resources/chatIdentityLinks.en.ts +0 -44
  220. package/templates/saas/i18n/engine/resources/chatIdentityLinks.fr.ts +0 -44
  221. package/templates/saas/i18n/engine/resources/consumableTokens.en.ts +4 -43
  222. package/templates/saas/i18n/engine/resources/consumableTokens.fr.ts +4 -43
  223. package/templates/saas/i18n/engine/resources/conversationMessages.en.ts +16 -27
  224. package/templates/saas/i18n/engine/resources/conversationMessages.fr.ts +16 -27
  225. package/templates/saas/i18n/engine/resources/conversationReplyTokens.en.ts +0 -27
  226. package/templates/saas/i18n/engine/resources/conversationReplyTokens.fr.ts +0 -27
  227. package/templates/saas/i18n/engine/resources/conversationThreads.en.ts +0 -27
  228. package/templates/saas/i18n/engine/resources/conversationThreads.fr.ts +0 -27
  229. package/templates/saas/i18n/engine/resources/dataSeedRuns.en.ts +22 -17
  230. package/templates/saas/i18n/engine/resources/dataSeedRuns.fr.ts +22 -17
  231. package/templates/saas/i18n/engine/resources/dataSubjectRequests.en.ts +410 -0
  232. package/templates/saas/i18n/engine/resources/dataSubjectRequests.fr.ts +410 -0
  233. package/templates/saas/i18n/engine/resources/etlPipelineStates.en.ts +128 -146
  234. package/templates/saas/i18n/engine/resources/etlPipelineStates.fr.ts +0 -18
  235. package/templates/saas/i18n/engine/resources/evaluationDatasetExports.en.ts +13 -43
  236. package/templates/saas/i18n/engine/resources/evaluationDatasetExports.fr.ts +0 -30
  237. package/templates/saas/i18n/engine/resources/evaluationExportAuthorizations.en.ts +0 -12
  238. package/templates/saas/i18n/engine/resources/evaluationExportAuthorizations.fr.ts +0 -12
  239. package/templates/saas/i18n/engine/resources/externalDataErasureSuppressions.en.ts +0 -21
  240. package/templates/saas/i18n/engine/resources/externalDataErasureSuppressions.fr.ts +0 -21
  241. package/templates/saas/i18n/engine/resources/externalDataOutboundChanges.en.ts +24 -45
  242. package/templates/saas/i18n/engine/resources/externalDataOutboundChanges.fr.ts +0 -21
  243. package/templates/saas/i18n/engine/resources/externalDataPendingReferences.en.ts +0 -24
  244. package/templates/saas/i18n/engine/resources/externalDataPendingReferences.fr.ts +0 -24
  245. package/templates/saas/i18n/engine/resources/externalDataPipelineMembershipKeys.en.ts +0 -21
  246. package/templates/saas/i18n/engine/resources/externalDataPipelineMembershipKeys.fr.ts +0 -21
  247. package/templates/saas/i18n/engine/resources/externalDataPipelineMemberships.en.ts +8 -14
  248. package/templates/saas/i18n/engine/resources/externalDataPipelineMemberships.fr.ts +0 -6
  249. package/templates/saas/i18n/engine/resources/externalDataPipelineRequestedKeys.en.ts +0 -24
  250. package/templates/saas/i18n/engine/resources/externalDataPipelineRequestedKeys.fr.ts +0 -24
  251. package/templates/saas/i18n/engine/resources/externalDataPipelineRunRecords.en.ts +150 -174
  252. package/templates/saas/i18n/engine/resources/externalDataPipelineRunRecords.fr.ts +0 -24
  253. package/templates/saas/i18n/engine/resources/externalDataRemoteVersions.en.ts +12 -33
  254. package/templates/saas/i18n/engine/resources/externalDataRemoteVersions.fr.ts +0 -21
  255. package/templates/saas/i18n/engine/resources/externalEffectReservations.en.ts +147 -0
  256. package/templates/saas/i18n/engine/resources/externalEffectReservations.fr.ts +147 -0
  257. package/templates/saas/i18n/engine/resources/files.en.ts +0 -39
  258. package/templates/saas/i18n/engine/resources/files.fr.ts +0 -39
  259. package/templates/saas/i18n/engine/resources/humanDecisionNoticeStays.en.ts +0 -18
  260. package/templates/saas/i18n/engine/resources/humanDecisionNoticeStays.fr.ts +0 -18
  261. package/templates/saas/i18n/engine/resources/idempotentRequestOutcomes.en.ts +115 -0
  262. package/templates/saas/i18n/engine/resources/idempotentRequestOutcomes.fr.ts +115 -0
  263. package/templates/saas/i18n/engine/resources/inboundAddressTombstones.en.ts +0 -27
  264. package/templates/saas/i18n/engine/resources/inboundAddressTombstones.fr.ts +0 -27
  265. package/templates/saas/i18n/engine/resources/inboundContacts.en.ts +3 -30
  266. package/templates/saas/i18n/engine/resources/inboundContacts.fr.ts +0 -27
  267. package/templates/saas/i18n/engine/resources/inboundEmails.en.ts +0 -27
  268. package/templates/saas/i18n/engine/resources/inboundEmails.fr.ts +0 -27
  269. package/templates/saas/i18n/engine/resources/jobExecutions.en.ts +11 -25
  270. package/templates/saas/i18n/engine/resources/jobExecutions.fr.ts +11 -25
  271. package/templates/saas/i18n/engine/resources/jobPayloadStorage.en.ts +3 -30
  272. package/templates/saas/i18n/engine/resources/jobPayloadStorage.fr.ts +0 -27
  273. package/templates/saas/i18n/engine/resources/legalHolds.en.ts +0 -88
  274. package/templates/saas/i18n/engine/resources/legalHolds.fr.ts +0 -88
  275. package/templates/saas/i18n/engine/resources/modelCallAttributions.en.ts +16 -40
  276. package/templates/saas/i18n/engine/resources/modelCallAttributions.fr.ts +0 -24
  277. package/templates/saas/i18n/engine/resources/modelCostPeriodAggregates.en.ts +13 -37
  278. package/templates/saas/i18n/engine/resources/modelCostPeriodAggregates.fr.ts +0 -24
  279. package/templates/saas/i18n/engine/resources/oauthConsentGrants.en.ts +10 -40
  280. package/templates/saas/i18n/engine/resources/oauthConsentGrants.fr.ts +0 -30
  281. package/templates/saas/i18n/engine/resources/operationApprovalRequests.en.ts +120 -60
  282. package/templates/saas/i18n/engine/resources/operationApprovalRequests.fr.ts +120 -60
  283. package/templates/saas/i18n/engine/resources/organizationA2aPushDeliveryLog.en.ts +3 -21
  284. package/templates/saas/i18n/engine/resources/organizationA2aPushDeliveryLog.fr.ts +0 -18
  285. package/templates/saas/i18n/engine/resources/organizationA2aTokenBudgetState.en.ts +3 -33
  286. package/templates/saas/i18n/engine/resources/organizationA2aTokenBudgetState.fr.ts +0 -30
  287. package/templates/saas/i18n/engine/resources/organizationAgentPolicies.en.ts +0 -27
  288. package/templates/saas/i18n/engine/resources/organizationAgentPolicies.fr.ts +0 -27
  289. package/templates/saas/i18n/engine/resources/organizationAgentWorkDecisionContents.en.ts +0 -27
  290. package/templates/saas/i18n/engine/resources/organizationAgentWorkDecisionContents.fr.ts +0 -27
  291. package/templates/saas/i18n/engine/resources/organizationAgentWorkDecisions.en.ts +13 -43
  292. package/templates/saas/i18n/engine/resources/organizationAgentWorkDecisions.fr.ts +0 -30
  293. package/templates/saas/i18n/engine/resources/organizationApiKeys.en.ts +2 -79
  294. package/templates/saas/i18n/engine/resources/organizationApiKeys.fr.ts +2 -79
  295. package/templates/saas/i18n/engine/resources/organizationBillingAccounts.en.ts +0 -549
  296. package/templates/saas/i18n/engine/resources/organizationBillingAccounts.fr.ts +0 -549
  297. package/templates/saas/i18n/engine/resources/organizationChatSettings.en.ts +0 -27
  298. package/templates/saas/i18n/engine/resources/organizationChatSettings.fr.ts +0 -27
  299. package/templates/saas/i18n/engine/resources/organizationCreditPools.en.ts +13 -18
  300. package/templates/saas/i18n/engine/resources/organizationCreditPools.fr.ts +13 -18
  301. package/templates/saas/i18n/engine/resources/organizationCustomDomains.en.ts +195 -0
  302. package/templates/saas/i18n/engine/resources/organizationCustomDomains.fr.ts +195 -0
  303. package/templates/saas/i18n/engine/resources/organizationDashboardLayouts.en.ts +153 -0
  304. package/templates/saas/i18n/engine/resources/organizationDashboardLayouts.fr.ts +153 -0
  305. package/templates/saas/i18n/engine/resources/organizationEmailDomains.en.ts +0 -39
  306. package/templates/saas/i18n/engine/resources/organizationEmailDomains.fr.ts +0 -39
  307. package/templates/saas/i18n/engine/resources/organizationFeatures.en.ts +0 -34
  308. package/templates/saas/i18n/engine/resources/organizationFeatures.fr.ts +0 -34
  309. package/templates/saas/i18n/engine/resources/organizationFlowActorExecutions.en.ts +25 -160
  310. package/templates/saas/i18n/engine/resources/organizationFlowActorExecutions.fr.ts +25 -160
  311. package/templates/saas/i18n/engine/resources/organizationFlowActorTasks.en.ts +6 -28
  312. package/templates/saas/i18n/engine/resources/organizationFlowActorTasks.fr.ts +8 -30
  313. package/templates/saas/i18n/engine/resources/organizationGuidanceState.en.ts +3 -18
  314. package/templates/saas/i18n/engine/resources/organizationGuidanceState.fr.ts +0 -15
  315. package/templates/saas/i18n/engine/resources/organizationInboundDeliveries.en.ts +95 -26
  316. package/templates/saas/i18n/engine/resources/organizationInboundDeliveries.fr.ts +95 -26
  317. package/templates/saas/i18n/engine/resources/organizationInvoiceRefs.en.ts +14 -45
  318. package/templates/saas/i18n/engine/resources/organizationInvoiceRefs.fr.ts +14 -45
  319. package/templates/saas/i18n/engine/resources/organizationLifecycleState.en.ts +1 -17
  320. package/templates/saas/i18n/engine/resources/organizationLifecycleState.fr.ts +1 -17
  321. package/templates/saas/i18n/engine/resources/organizationM2mWebhookDeliveryLog.en.ts +2 -26
  322. package/templates/saas/i18n/engine/resources/organizationM2mWebhookDeliveryLog.fr.ts +4 -28
  323. package/templates/saas/i18n/engine/resources/organizationMembers.en.ts +2 -95
  324. package/templates/saas/i18n/engine/resources/organizationMembers.fr.ts +2 -95
  325. package/templates/saas/i18n/engine/resources/organizationModelUsageCeilingState.en.ts +0 -27
  326. package/templates/saas/i18n/engine/resources/organizationModelUsageCeilingState.fr.ts +0 -27
  327. package/templates/saas/i18n/engine/resources/organizationNotificationBadges.en.ts +3 -36
  328. package/templates/saas/i18n/engine/resources/organizationNotificationBadges.fr.ts +0 -33
  329. package/templates/saas/i18n/engine/resources/organizationNotifications.en.ts +0 -12
  330. package/templates/saas/i18n/engine/resources/organizationNotifications.fr.ts +0 -12
  331. package/templates/saas/i18n/engine/resources/organizationOAuthClients.en.ts +2 -67
  332. package/templates/saas/i18n/engine/resources/organizationOAuthClients.fr.ts +2 -67
  333. package/templates/saas/i18n/engine/resources/organizationOnboardingOperations.en.ts +0 -9
  334. package/templates/saas/i18n/engine/resources/organizationOnboardingOperations.fr.ts +0 -9
  335. package/templates/saas/i18n/engine/resources/organizationPersonTokenCeilingState.en.ts +0 -27
  336. package/templates/saas/i18n/engine/resources/organizationPersonTokenCeilingState.fr.ts +0 -27
  337. package/templates/saas/i18n/engine/resources/organizationPreferences.en.ts +0 -37
  338. package/templates/saas/i18n/engine/resources/organizationPreferences.fr.ts +0 -37
  339. package/templates/saas/i18n/engine/resources/organizationProfiles.en.ts +0 -37
  340. package/templates/saas/i18n/engine/resources/organizationProfiles.fr.ts +0 -37
  341. package/templates/saas/i18n/engine/resources/organizationProgressionState.en.ts +1 -17
  342. package/templates/saas/i18n/engine/resources/organizationProgressionState.fr.ts +1 -17
  343. package/templates/saas/i18n/engine/resources/organizationProviderCredentials.en.ts +0 -58
  344. package/templates/saas/i18n/engine/resources/organizationProviderCredentials.fr.ts +0 -58
  345. package/templates/saas/i18n/engine/resources/organizationRelationships.en.ts +0 -128
  346. package/templates/saas/i18n/engine/resources/organizationRelationships.fr.ts +0 -128
  347. package/templates/saas/i18n/engine/resources/organizationRepresentations.en.ts +0 -83
  348. package/templates/saas/i18n/engine/resources/organizationRepresentations.fr.ts +0 -83
  349. package/templates/saas/i18n/engine/resources/organizationScimProvisioningConfig.en.ts +0 -43
  350. package/templates/saas/i18n/engine/resources/organizationScimProvisioningConfig.fr.ts +0 -43
  351. package/templates/saas/i18n/engine/resources/organizationScimTokens.en.ts +5 -76
  352. package/templates/saas/i18n/engine/resources/organizationScimTokens.fr.ts +5 -76
  353. package/templates/saas/i18n/engine/resources/organizationSiemDeliveryDlq.en.ts +4 -43
  354. package/templates/saas/i18n/engine/resources/organizationSiemDeliveryDlq.fr.ts +6 -45
  355. package/templates/saas/i18n/engine/resources/organizationSiemDeliveryOutbox.en.ts +3 -30
  356. package/templates/saas/i18n/engine/resources/organizationSiemDeliveryOutbox.fr.ts +0 -27
  357. package/templates/saas/i18n/engine/resources/organizationSiemExportConfig.en.ts +0 -37
  358. package/templates/saas/i18n/engine/resources/organizationSiemExportConfig.fr.ts +0 -37
  359. package/templates/saas/i18n/engine/resources/organizationSsoConfig.en.ts +113 -74
  360. package/templates/saas/i18n/engine/resources/organizationSsoConfig.fr.ts +113 -74
  361. package/templates/saas/i18n/engine/resources/organizationSsoConnections.en.ts +0 -148
  362. package/templates/saas/i18n/engine/resources/organizationSsoConnections.fr.ts +0 -148
  363. package/templates/saas/i18n/engine/resources/organizationSubscriptions.en.ts +40 -78
  364. package/templates/saas/i18n/engine/resources/organizationSubscriptions.fr.ts +42 -80
  365. package/templates/saas/i18n/engine/resources/organizationUnitMembers.en.ts +2 -50
  366. package/templates/saas/i18n/engine/resources/organizationUnitMembers.fr.ts +2 -50
  367. package/templates/saas/i18n/engine/resources/organizationUnits.en.ts +0 -49
  368. package/templates/saas/i18n/engine/resources/organizationUnits.fr.ts +0 -49
  369. package/templates/saas/i18n/engine/resources/organizationUsageRecords.en.ts +13 -37
  370. package/templates/saas/i18n/engine/resources/organizationUsageRecords.fr.ts +13 -37
  371. package/templates/saas/i18n/engine/resources/organizationWebhookConfig.en.ts +5 -67
  372. package/templates/saas/i18n/engine/resources/organizationWebhookConfig.fr.ts +5 -67
  373. package/templates/saas/i18n/engine/resources/organizations.en.ts +34 -637
  374. package/templates/saas/i18n/engine/resources/organizations.fr.ts +32 -635
  375. package/templates/saas/i18n/engine/resources/platformAccessGrants.en.ts +0 -91
  376. package/templates/saas/i18n/engine/resources/platformAccessGrants.fr.ts +0 -91
  377. package/templates/saas/i18n/engine/resources/postCommitEffectOutbox.en.ts +0 -24
  378. package/templates/saas/i18n/engine/resources/postCommitEffectOutbox.fr.ts +0 -24
  379. package/templates/saas/i18n/engine/resources/prices.en.ts +47 -108
  380. package/templates/saas/i18n/engine/resources/prices.fr.ts +48 -109
  381. package/templates/saas/i18n/engine/resources/products.en.ts +24 -68
  382. package/templates/saas/i18n/engine/resources/products.fr.ts +24 -68
  383. package/templates/saas/i18n/engine/resources/professionalQualifications.en.ts +0 -87
  384. package/templates/saas/i18n/engine/resources/professionalQualifications.fr.ts +0 -87
  385. package/templates/saas/i18n/engine/resources/promotions.en.ts +4 -56
  386. package/templates/saas/i18n/engine/resources/promotions.fr.ts +6 -58
  387. package/templates/saas/i18n/engine/resources/providerCallRecords.en.ts +77 -101
  388. package/templates/saas/i18n/engine/resources/providerCallRecords.fr.ts +0 -24
  389. package/templates/saas/i18n/engine/resources/publishedVerificationKeys.en.ts +2 -25
  390. package/templates/saas/i18n/engine/resources/publishedVerificationKeys.fr.ts +2 -25
  391. package/templates/saas/i18n/engine/resources/referrals.en.ts +21 -18
  392. package/templates/saas/i18n/engine/resources/referrals.fr.ts +21 -18
  393. package/templates/saas/i18n/engine/resources/relationshipCapabilityGrants.en.ts +0 -80
  394. package/templates/saas/i18n/engine/resources/relationshipCapabilityGrants.fr.ts +0 -80
  395. package/templates/saas/i18n/engine/resources/relationshipInvitations.en.ts +0 -89
  396. package/templates/saas/i18n/engine/resources/relationshipInvitations.fr.ts +0 -89
  397. package/templates/saas/i18n/engine/resources/relationshipMailboxes.en.ts +0 -27
  398. package/templates/saas/i18n/engine/resources/relationshipMailboxes.fr.ts +0 -27
  399. package/templates/saas/i18n/engine/resources/representativeAssignments.en.ts +108 -112
  400. package/templates/saas/i18n/engine/resources/representativeAssignments.fr.ts +108 -112
  401. package/templates/saas/i18n/engine/resources/retentionEnforcementRecords.en.ts +8 -21
  402. package/templates/saas/i18n/engine/resources/retentionEnforcementRecords.fr.ts +8 -21
  403. package/templates/saas/i18n/engine/resources/signatureRequestSigners.en.ts +141 -0
  404. package/templates/saas/i18n/engine/resources/signatureRequestSigners.fr.ts +141 -0
  405. package/templates/saas/i18n/engine/resources/signatureRequests.en.ts +205 -0
  406. package/templates/saas/i18n/engine/resources/signatureRequests.fr.ts +205 -0
  407. package/templates/saas/i18n/engine/resources/smsNumberAssignments.en.ts +101 -0
  408. package/templates/saas/i18n/engine/resources/smsNumberAssignments.fr.ts +101 -0
  409. package/templates/saas/i18n/engine/resources/smsOptOuts.en.ts +166 -0
  410. package/templates/saas/i18n/engine/resources/smsOptOuts.fr.ts +166 -0
  411. package/templates/saas/i18n/engine/resources/smsProviderEvents.en.ts +195 -0
  412. package/templates/saas/i18n/engine/resources/smsProviderEvents.fr.ts +195 -0
  413. package/templates/saas/i18n/engine/resources/ssoDomainReservations.en.ts +0 -27
  414. package/templates/saas/i18n/engine/resources/ssoDomainReservations.fr.ts +0 -27
  415. package/templates/saas/i18n/engine/resources/systemOfRecordPartitionAssignments.en.ts +3 -39
  416. package/templates/saas/i18n/engine/resources/systemOfRecordPartitionAssignments.fr.ts +0 -36
  417. package/templates/saas/i18n/engine/resources/systemOfRecordWriteAdmissions.en.ts +0 -3
  418. package/templates/saas/i18n/engine/resources/systemOfRecordWriteAdmissions.fr.ts +0 -3
  419. package/templates/saas/i18n/engine/resources/transactionalCommitReceipts.en.ts +0 -6
  420. package/templates/saas/i18n/engine/resources/transactionalCommitReceipts.fr.ts +0 -6
  421. package/templates/saas/i18n/engine/resources/userA2aPushDeliveryLog.en.ts +3 -21
  422. package/templates/saas/i18n/engine/resources/userA2aPushDeliveryLog.fr.ts +0 -18
  423. package/templates/saas/i18n/engine/resources/userA2aTokenBudgetState.en.ts +3 -33
  424. package/templates/saas/i18n/engine/resources/userA2aTokenBudgetState.fr.ts +0 -30
  425. package/templates/saas/i18n/engine/resources/userAgentWorkDecisionContents.en.ts +0 -27
  426. package/templates/saas/i18n/engine/resources/userAgentWorkDecisionContents.fr.ts +0 -27
  427. package/templates/saas/i18n/engine/resources/userAgentWorkDecisions.en.ts +13 -43
  428. package/templates/saas/i18n/engine/resources/userAgentWorkDecisions.fr.ts +0 -30
  429. package/templates/saas/i18n/engine/resources/userCredentials.en.ts +3 -87
  430. package/templates/saas/i18n/engine/resources/userCredentials.fr.ts +0 -84
  431. package/templates/saas/i18n/engine/resources/userFeatures.en.ts +0 -12
  432. package/templates/saas/i18n/engine/resources/userFeatures.fr.ts +0 -12
  433. package/templates/saas/i18n/engine/resources/userFlowActorExecutions.en.ts +25 -160
  434. package/templates/saas/i18n/engine/resources/userFlowActorExecutions.fr.ts +25 -160
  435. package/templates/saas/i18n/engine/resources/userFlowActorTasks.en.ts +6 -28
  436. package/templates/saas/i18n/engine/resources/userFlowActorTasks.fr.ts +8 -30
  437. package/templates/saas/i18n/engine/resources/userGovernedDocumentAcceptances.en.ts +13 -18
  438. package/templates/saas/i18n/engine/resources/userGovernedDocumentAcceptances.fr.ts +13 -18
  439. package/templates/saas/i18n/engine/resources/userGuidanceState.en.ts +3 -18
  440. package/templates/saas/i18n/engine/resources/userGuidanceState.fr.ts +0 -15
  441. package/templates/saas/i18n/engine/resources/userIdentityLinks.en.ts +13 -40
  442. package/templates/saas/i18n/engine/resources/userIdentityLinks.fr.ts +0 -27
  443. package/templates/saas/i18n/engine/resources/userLifecycleState.en.ts +0 -15
  444. package/templates/saas/i18n/engine/resources/userLifecycleState.fr.ts +0 -15
  445. package/templates/saas/i18n/engine/resources/userNotificationBadges.en.ts +3 -36
  446. package/templates/saas/i18n/engine/resources/userNotificationBadges.fr.ts +0 -33
  447. package/templates/saas/i18n/engine/resources/userPreferences.en.ts +8 -60
  448. package/templates/saas/i18n/engine/resources/userPreferences.fr.ts +8 -60
  449. package/templates/saas/i18n/engine/resources/userProfiles.en.ts +5 -56
  450. package/templates/saas/i18n/engine/resources/userProfiles.fr.ts +0 -51
  451. package/templates/saas/i18n/engine/resources/userProgressionState.en.ts +1 -17
  452. package/templates/saas/i18n/engine/resources/userProgressionState.fr.ts +1 -17
  453. package/templates/saas/i18n/engine/resources/userProviderCredentials.en.ts +0 -52
  454. package/templates/saas/i18n/engine/resources/userProviderCredentials.fr.ts +0 -52
  455. package/templates/saas/i18n/engine/resources/userSelfPreferences.en.ts +8 -56
  456. package/templates/saas/i18n/engine/resources/userSelfPreferences.fr.ts +8 -56
  457. package/templates/saas/i18n/engine/resources/userSelfProfiles.en.ts +5 -61
  458. package/templates/saas/i18n/engine/resources/userSelfProfiles.fr.ts +0 -56
  459. package/templates/saas/i18n/engine/resources/user_self.en.ts +37 -214
  460. package/templates/saas/i18n/engine/resources/user_self.fr.ts +37 -214
  461. package/templates/saas/i18n/engine/resources/users.en.ts +53 -180
  462. package/templates/saas/i18n/engine/resources/users.fr.ts +53 -180
  463. package/templates/saas/scenarios/add-technical-doc/files/technical-doc/Dockerfile +4 -1
  464. package/templates/saas/scenarios/add-technical-doc/files/technical-doc/src/plugins/api-reference-pages.ts +9 -1
  465. package/templates/saas/scenarios/add-website/files/website/Dockerfile +4 -1
  466. package/templates/saas/scenarios/add-website/files/website/astro.config.ts.hbs +4 -0
  467. package/templates/saas/scenarios/add-website/files/website/package.json.hbs +1 -1
  468. package/templates/saas/scenarios/add-worker-node/files/workers/__workerDir__/Dockerfile.hbs +3 -1
  469. package/templates/saas/skeleton/backend-api/Dockerfile +5 -2
  470. package/templates/saas/skeleton/frontend/Dockerfile +4 -1
  471. package/templates/saas/skeleton/frontend/vite-engine-dependency-prebundle.ts +10 -1
  472. package/templates/saas/skeleton/frontend/vite.config.ts.hbs +14 -3
  473. package/wildo-framework.info.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"creation-drive.service.js","sourceRoot":"","sources":["../../../../src/services/companion/creation-drive.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,OAAO,EACL,8BAA8B,EAC9B,6BAA6B,EAC7B,4BAA4B,GAK7B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,mCAAmC,EAAoC,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AA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wB,IAAI,CAAC,CAAC;YAC9B,IAAI,wBAAwB,IAAI,gDAAgD,EAAE,CAAC;gBACjF,OAAO,MAAM,CAAC,qBAAqB,CAAC,uBAAuB,EAAE,MAAM,CAAC,YAAY,EAAE,OAAO,IAAI,kCAAkC,CAAC,CAAC;YACnI,CAAC;YACD,QAAQ,GAAG,EAAE,GAAG,QAAQ,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;QAChD,CAAC;aAAM,CAAC;YACN,wBAAwB,GAAG,CAAC,CAAC;QAC/B,CAAC;IACH,CAAC;AACH,CAAC","sourcesContent":["/**\n * # `wildo creation drive --until stuck` — the unattended creation driver (#2233)\n *\n * A full creation still needed a person, or a hand-written script, to move it from one round to the next: in run 004\n * (`app-creation-test-004`) the driving session ran the umbrella or a build wave, accepted what landed, restarted the\n * companion when it fell over, and stopped on the first real blocker. That loop is the shape of \"run a creation\", and\n * it lived outside the framework. `wildo creation loop` covered one piece of it (a model chooses each round) and none of\n * the rest: it stopped at 20 rounds, never accepted, died with the companion and stopped only when the model did.\n *\n * ## The shape\n *\n * Each step reads the companion's durable state (the creation FEED: what Home shows, holds included; and the drive\n * STATUS: what still runs), decides ONE of three things with {@link decideCreationDriveStep}, and does it:\n *\n * - **run** a bounded `wildo creation loop` (up to its 20-round ceiling): the companion gates, a model chooses, the\n * chosen lanes run, the build lane among them;\n * - **wait**: something still runs (a loop, a wave, a lane the usage-limit resume relaunched), the coding agent's usage\n * limit holds until its stated reset, the connectivity hold waits on the network, or the companion is down;\n * - **stop**, naming the rule that fired and what it waits for.\n *\n * The loop's model choosing to stop is not the goal reached: the drive then asks where the application stands against its\n * own requirements (`GET /creation/requirements/standing`, #3701), and calls the goal reached only when no requirement\n * carries an open item.\n *\n * After every loop, it accepts what the autonomy posture says the SYSTEM accepts (`POST /creation/drive/accept`, never\n * inside a live coding run), and stops when the posture leaves acceptance to a person: a marked critical gate, armed.\n *\n * ## Why in the CLI and not in the companion\n *\n * A companion restart ends every request it holds and every in-process timer. The driver lives in another process, so a\n * restart is a WAIT: it polls until the companion answers again and reads the same durable rows (the loop's state is\n * the working tree; the run records survive). The restart itself is on the intervention ledger when the companion\n * booted with runs in flight (#2231), and the driver also counts the restarts it saw, from the companion's start time.\n *\n * ## Holds it respects\n *\n * - a person's `wildo build stop` (#3206) is a STOP: a stopped build is never resumed unattended;\n * - the coding agent's usage limit (#2388) is a WAIT until it lifts; the companion's own resume relaunches what it\n * paused (#2463), and the driver waits for that run to drain before choosing again;\n * - the connectivity hold (#3236, #3262) is a WAIT until the agent's API answers.\n *\n * Ceilings are the person's, like `loop`'s iteration ceiling: a wall clock and a spend in US dollars, both required.\n * The spend is the run report's measured total since the drive began (#2231, #2232), a floor wherever a run reported no\n * cost.\n */\nimport {\n CreationDriveAcceptDisposition,\n WorkbenchCreationHomeLineKind,\n WorkbenchCreationHomeSection,\n type CreationConsole_Feed,\n type CreationDrive_AcceptOutcome,\n type CreationDrive_RequirementsStanding,\n type CreationDrive_Status,\n} from '@wildo-ai/platform-core-shared';\nimport { describeModelProviderAccountRefusal, type ModelProviderAccountRefusal, describeCaughtError } from '@wildo-ai/saas-models';\n\nimport type { ConsoleLoopResult } from './creation-console.service';\n\n/** The only drive mode: run until a stop rule fires. Named so `--until` is a closed vocabulary. */\nexport enum CreationDriveUntil {\n STUCK = 'stuck',\n}\n\n/** Why the driver stopped. Every exit is one of these, and the report names it with what it waits for. */\nexport enum CreationDriveStopRule {\n /**\n * The loop's selector chose to stop with nothing running and nothing asked, AND the application's requirements carry no\n * open item (#3701): the goal is reached by measurement, never by the model's judgement alone.\n */\n GOAL_REACHED = 'goal-reached',\n /**\n * The loop's selector chose to stop, and the application's own requirements still carry open items (#3701): a reported\n * gap, a configuration that does not meet one, one nothing addresses or with no build work landed. The model judged the\n * creation done and the measurement says it is not, so the drive stops and names them: each is closed by the task named\n * beside it, or by a person who starts refinement or decides the requirement is out of scope.\n */\n REQUIREMENTS_OPEN = 'requirements-open',\n /**\n * The loop's selector chose to stop, and where the application stands against its requirements could not be read\n * (#3701): whether the goal is reached is unknown, so the drive says that rather than claim it.\n */\n GOAL_UNMEASURED = 'goal-unmeasured',\n /** Nothing is eligible to run, nothing runs, nothing is asked. */\n NOTHING_LEFT = 'nothing-left',\n /**\n * A question only the creator can answer: a playbook's clarification, a coding run parked on a question, or an interview\n * whose answer would date work the next round could run (#3361).\n */\n WAITING_ON_CREATOR = 'waiting-on-creator',\n /** The build plan can run nothing until the creator unblocks it (a task that cannot land, retired after its attempts). */\n PLAN_BLOCKED = 'plan-blocked',\n /** A person's `wildo build stop` holds the build; only a person starts it again. */\n BUILD_STOPPED_BY_PERSON = 'build-stopped-by-person',\n /** The build lane holds dispatch because a backend does not run the current tree (#3215). */\n BUILD_HELD = 'build-held',\n /** Every lane of a loop round failed: choosing again over the same state would spend without progressing. */\n LANES_FAILED = 'lanes-failed',\n /** The companion refused to run the loop (a preflight failure, a refusal whose remedy is a decision). */\n LOOP_REFUSED = 'loop-refused',\n /** The autonomy posture leaves acceptance to a person: a marked critical gate is armed. */\n ACCEPTANCE_HELD_FOR_PERSON = 'acceptance-held-for-person',\n /** The creation preflight found what would stop the run, before the first round. */\n PREFLIGHT_FAILED = 'preflight-failed',\n /** The person's wall-clock ceiling. */\n WALL_CLOCK_CEILING = 'wall-clock-ceiling',\n /** The person's spend ceiling. */\n SPEND_CEILING = 'spend-ceiling',\n /** The environment stopped the loop on consecutive rounds, past the loop's own recovery wait (#3235). */\n ENVIRONMENT_INTERRUPTED = 'environment-interrupted',\n /** The companion did not answer for {@link CREATION_DRIVE_COMPANION_DOWN_LIMIT_MS}. */\n COMPANION_UNREACHABLE = 'companion-unreachable',\n /**\n * The coding agent's API has not answered along its route for {@link CREATION_DRIVE_NETWORK_WAIT_LIMIT_MS}: nothing\n * can be built, and the wait has outlived what a network blip is. The person checks the network, or ends the hold.\n */\n NETWORK_LOST = 'network-lost',\n /**\n * A model provider's ACCOUNT refused the companion's or the coding agent's call (#3204): no credits left, a spend or\n * usage limit, billing. The ENVIRONMENT's condition, never the application's: nothing the creation did caused it, and\n * nothing it can do lifts it. A person adds credits or raises the limit in that provider's console, then runs the drive\n * again. Stopped on at once, never after consecutive loops: a loop run again is refused identically.\n */\n PROVIDER_ACCOUNT_REFUSED = 'provider-account-refused',\n /**\n * A verification check cannot be asked for a host cause (#3423, #3432): `wildo` is not on the companion's PATH, or the\n * installed one lacks the verb a check asks, or one check failed the same way on two tasks. Every build task's check\n * would fail the same way, so the companion admits no coding turn. The host's condition: a person repairs it (the next\n * admission asks first), then runs the drive again.\n */\n VERIFICATION_TOOL_UNAVAILABLE = 'verification-tool-unavailable',\n}\n\n/** What the driver waits for when it waits. */\nexport enum CreationDriveWaitReason {\n /** A loop or a detached run (a wave, a lane, a usage-limit resume) still runs in the companion. */\n RUNS_IN_FLIGHT = 'runs-in-flight',\n /** The coding agent's account usage limit holds the build until its stated reset (#2388). */\n CODING_AGENT_USAGE_LIMIT = 'coding-agent-usage-limit',\n /** A coding run lost the network; no coding turn starts until the agent's API answers (#3236, #3262). */\n CODING_AGENT_CONNECTIVITY = 'coding-agent-connectivity',\n /** The companion does not answer (a restart, a crash). */\n COMPANION_DOWN = 'companion-down',\n}\n\n/** How long one wait lasts before the driver reads the state again. */\nexport const CREATION_DRIVE_POLL_INTERVAL_MS = 30_000;\n/** How long the companion may stay unreachable before the drive stops. A restart takes seconds to a few minutes. */\nexport const CREATION_DRIVE_COMPANION_DOWN_LIMIT_MS = 15 * 60 * 1000;\n/**\n * How long the drive waits on the coding agent's network before it stops {@link CreationDriveStopRule.NETWORK_LOST}: three\n * times the coding admission's own twenty-minute bound, so an outage of an hour (app-creation-test-007 measured 35 min)\n * is waited through, and a five-hour one is the person's to see.\n */\nexport const CREATION_DRIVE_NETWORK_WAIT_LIMIT_MS = 60 * 60 * 1000;\n/** The loop's own ceiling per request (`POST /playbooks/loop` caps it at 20). */\nexport const CREATION_DRIVE_ROUNDS_PER_LOOP = 20;\n/** Consecutive loops the environment interrupted before the drive stops (each already waited up to 10 minutes, #3235). */\nexport const CREATION_DRIVE_MAXIMUM_CONSECUTIVE_INTERRUPTIONS = 3;\n/** The ASKED kinds that stop a run until the creator acts. A governance document's fact does not: it blocks no run. */\nconst ASKED_KINDS_THAT_STOP: ReadonlyMap<WorkbenchCreationHomeLineKind, CreationDriveStopRule> = new Map([\n [WorkbenchCreationHomeLineKind.CLARIFICATION, CreationDriveStopRule.WAITING_ON_CREATOR],\n [WorkbenchCreationHomeLineKind.PARKED_QUESTION, CreationDriveStopRule.WAITING_ON_CREATOR],\n /*\n * An interview whose answer would date work the next round could run (#3361). The round withholds that work, so the\n * drive stops and names the interview, as for a clarification, rather than run on without it.\n */\n [WorkbenchCreationHomeLineKind.INTERVIEW_DATES_NEXT_WORK, CreationDriveStopRule.WAITING_ON_CREATOR],\n [WorkbenchCreationHomeLineKind.SPECIFICATION_FAULT_HOLDS_THE_PLAN, CreationDriveStopRule.PLAN_BLOCKED],\n [WorkbenchCreationHomeLineKind.UNBLOCK_THE_PLAN, CreationDriveStopRule.PLAN_BLOCKED],\n]);\n\n/** What the driver knows when it decides its next step. */\nexport interface CreationDriveObservation {\n readonly feed: CreationConsole_Feed;\n readonly status: CreationDrive_Status;\n readonly elapsedMs: number;\n readonly maximumMs: number;\n /** Measured spend since the drive began, USD; undefined when the report could not be read. */\n readonly spentUsd: number | undefined;\n readonly maximumUsd: number;\n /** How the last loop ended, and whether the driver waited on anything since (which makes running again worth it). */\n readonly lastLoop?: { readonly stoppedBecause: string; readonly stopRationale?: string; readonly waitedSince: boolean };\n /**\n * Where the application stands against its own requirements (#3701), read once the last loop chose to stop: the\n * `standing`, or why it could not be read. Absent when it was not asked.\n */\n readonly requirements?: { readonly standing: CreationDrive_RequirementsStanding } | { readonly unreadBecause: string };\n /** Since when the drive has waited on the coding agent's network without a break (ms on the drive's clock). */\n readonly networkWaitSinceMs?: number;\n readonly nowMs?: number;\n}\n\nexport type CreationDriveDecision =\n | { readonly action: CreationDriveAction.RUN_LOOP }\n | { readonly action: CreationDriveAction.WAIT; readonly reason: CreationDriveWaitReason; readonly detail: string }\n | { readonly action: CreationDriveAction.STOP; readonly rule: CreationDriveStopRule; readonly waitingFor: string; readonly providerAccountRefusal?: ModelProviderAccountRefusal };\n\nexport enum CreationDriveAction {\n RUN_LOOP = 'run-loop',\n WAIT = 'wait',\n STOP = 'stop',\n}\n\n/**\n * The next step, from what the companion's durable rows say now. Order is the rule:\n * a person's stop first (it is theirs); the person's ceilings; anything still running (never start a loop over a\n * running one); what waits on the creator; a backend that does not boot; the holds only a person lifts (a refused\n * provider account, a build check's command missing from PATH); the holds that lift on their own; then the last loop's\n * own verdict when nothing happened since; else run.\n */\nexport function decideCreationDriveStep(observation: CreationDriveObservation): CreationDriveDecision {\n const { feed, status } = observation;\n // Read live from the status first: the feed may be an earlier snapshot, and a stop asked a moment ago holds now.\n const stoppedSince = status.buildStoppedSince ?? feed.buildPreparation?.heldByStopSince ?? null;\n if (stoppedSince !== null) {\n return stop(CreationDriveStopRule.BUILD_STOPPED_BY_PERSON, `a person stopped the build at ${stoppedSince}; start it again with: wildo build run`);\n }\n if (observation.elapsedMs >= observation.maximumMs) {\n return stop(CreationDriveStopRule.WALL_CLOCK_CEILING, `the drive's wall-clock ceiling (${formatHours(observation.maximumMs)}); run it again to continue`);\n }\n if (observation.spentUsd !== undefined && observation.spentUsd >= observation.maximumUsd) {\n return stop(CreationDriveStopRule.SPEND_CEILING, `the drive's spend ceiling (USD ${observation.maximumUsd}; measured USD ${observation.spentUsd.toFixed(2)})`);\n }\n if (status.loopsInFlight > 0 || status.detachedRunsInFlight > 0 || (status.executionsInFlight ?? 0) > 0) {\n return wait(CreationDriveWaitReason.RUNS_IN_FLIGHT, `${status.loopsInFlight} loop(s), ${status.detachedRunsInFlight} detached run(s) and ${status.executionsInFlight ?? 0} playbook execution(s) still running`);\n }\n for (const line of feed.lines) {\n if (line.section !== WorkbenchCreationHomeSection.ASKED) continue;\n const rule = ASKED_KINDS_THAT_STOP.get(line.kind);\n if (rule !== undefined) return stop(rule, describeAskedLine(line.kind, line.taskRef ?? line.playbookRef ?? line.subject ?? line.targetResourceId, line.subject));\n }\n const bootFailures = feed.buildHold?.bootFailures ?? [];\n /*\n * Not while the build lane still owes the repair of a start the application's own code refused (#3204): the lane runs\n * it, bounded per round, and only once it is spent does the hold need a person. Reference run 42696531261 stopped here\n * on two refusals a build task's code caused, with nothing having tried to repair them.\n */\n if (bootFailures.length > 0 && feed.buildHold?.startupRepairOwed !== true) {\n return stop(CreationDriveStopRule.BUILD_HELD, bootFailures.map((failure) => `${failure.serviceIdentifier} does not start: ${failure.remedy}`).join('; '));\n }\n /*\n * The coding agent's provider ACCOUNT refused its turn (#3204). The companion holds the build and re-asks the account\n * every thirty minutes, so a person who adds credits loses nothing; but nothing ever lifts it on its own, so an\n * unattended drive stops here rather than wait for a \"resume\" that only re-asks. Read from the live status first (a\n * pending resume beside it is that re-ask, never a reset), else from the feed's own line.\n */\n const accountRefusal = status.codingAgentAccountRefusal;\n const refusedLine = feed.lines.find((line) => line.kind === WorkbenchCreationHomeLineKind.CODING_AGENT_ACCOUNT_REFUSED);\n if (accountRefusal !== undefined || refusedLine !== undefined) {\n const sentence = accountRefusal !== undefined ? describeModelProviderAccountRefusal(accountRefusal) : refusedLine?.subject ?? 'the coding agent\\'s provider account refused to work';\n return {\n action: CreationDriveAction.STOP,\n rule: CreationDriveStopRule.PROVIDER_ACCOUNT_REFUSED,\n waitingFor: `the coding agent's provider account: ${sentence} The build re-asks it every 30 minutes; run the drive again once it is fixed.`,\n ...(accountRefusal !== undefined ? { providerAccountRefusal: accountRefusal } : {}),\n };\n }\n /*\n * A build check cannot be asked for a host cause (#3423, #3432): a command not on PATH, one lacking the verb, the same\n * failure on two tasks. Nothing the drive does lifts it, so it stops; the line's subject is the cause and its remedy.\n */\n const toolUnavailable = feed.lines.find((line) => line.kind === WorkbenchCreationHomeLineKind.VERIFICATION_TOOL_UNAVAILABLE);\n if (toolUnavailable !== undefined) {\n return stop(CreationDriveStopRule.VERIFICATION_TOOL_UNAVAILABLE,\n `the build's checks, which cannot run (met by build task ${toolUnavailable.taskRef ?? toolUnavailable.targetResourceId}), so no coding turn starts: `\n + `${toolUnavailable.subject ?? 'a command the checks run is unavailable.'} Then run the drive again.`);\n }\n const usageLimit = feed.lines.find((line) => line.kind === WorkbenchCreationHomeLineKind.CODING_AGENT_USAGE_LIMITED);\n if (usageLimit !== undefined || status.pendingBuildResume !== undefined) {\n const resumesAt = status.pendingBuildResume?.resumesAt ?? usageLimit?.subject ?? 'its reset';\n return wait(CreationDriveWaitReason.CODING_AGENT_USAGE_LIMIT, `the coding agent's usage limit; the build resumes on its own at ${resumesAt}`);\n }\n /*\n * Waited on only when the hold has a ROUTE: its background probe ends it when the network returns. A hold with no route\n * (an agent with no known API host, a proxy it cannot use) is ended only by the next coding admission, so waiting on it\n * would wait forever; the loop runs, and its build's next turn is the check (review of 6fe527ed3).\n */\n const connectivity = feed.lines.find((line) => line.kind === WorkbenchCreationHomeLineKind.CODING_AGENT_CONNECTIVITY_LOST && line.subject !== null);\n if (connectivity !== undefined) {\n if (observation.networkWaitSinceMs !== undefined && observation.nowMs !== undefined && observation.nowMs - observation.networkWaitSinceMs >= CREATION_DRIVE_NETWORK_WAIT_LIMIT_MS) {\n return stop(CreationDriveStopRule.NETWORK_LOST, `the coding agent's API (${connectivity.subject}) has not answered for ${formatHours(CREATION_DRIVE_NETWORK_WAIT_LIMIT_MS)}; once the network is back: wildo build rearm ${connectivity.taskRef ?? '<task>'} --reason environment`);\n }\n return wait(CreationDriveWaitReason.CODING_AGENT_CONNECTIVITY, `the coding agent's network; waiting for ${connectivity.subject} to answer`);\n }\n const last = observation.lastLoop;\n if (last !== undefined && !last.waitedSince) {\n // The loop chose to stop, or found nothing eligible, and nothing ran or lifted since: asking again is the same answer.\n if (last.stoppedBecause === LOOP_CHOSE_TO_STOP) return judgeChosenStop(last.stopRationale ?? 'the loop chose to stop', observation.requirements);\n if (last.stoppedBecause === LOOP_NOTHING_ELIGIBLE) return stop(CreationDriveStopRule.NOTHING_LEFT, 'nothing is eligible to run');\n }\n return { action: CreationDriveAction.RUN_LOOP };\n}\n\n// semantic-literal-boundary: `PlaybookLoopStopReason` values as the companion's loop document carries them; the CLI reads them as wire values.\nconst LOOP_CHOSE_TO_STOP = 'CHOSE_TO_STOP';\nconst LOOP_NOTHING_ELIGIBLE = 'NOTHING_ELIGIBLE';\nconst LOOP_ALL_LANES_FAILED = 'ALL_LANES_FAILED';\nconst LOOP_INTERRUPTED_BY_ENVIRONMENT = 'INTERRUPTED_BY_ENVIRONMENT';\n\n/** How many open items a stop names in words; the rest are counted. */\nconst OPEN_ITEMS_NAMED = 5;\n\n/**\n * The loop chose to stop: whether the goal is reached is the REQUIREMENTS' answer, not the model's (#3701). Goal reached\n * only when the standing was read and carries no open item; open items stop the drive on a rule that names them;\n * an unread standing is said to be unread. Run 42886943490 stopped \"goal-reached\" with 16 of 24 requirements partly met.\n */\nfunction judgeChosenStop(rationale: string, requirements: CreationDriveObservation['requirements']): CreationDriveDecision {\n const standing = requirements !== undefined && 'standing' in requirements ? requirements.standing : undefined;\n if (standing === undefined) {\n const why = requirements !== undefined && 'unreadBecause' in requirements ? requirements.unreadBecause : 'it was not read';\n return stop(CreationDriveStopRule.GOAL_UNMEASURED, `${rationale} — but where the application stands against its requirements could not be read (${why}): wildo creation drive again, or wildo context journey`);\n }\n if (standing.openItems.length === 0) {\n return stop(CreationDriveStopRule.GOAL_REACHED, `${rationale} Every one of the ${standing.requirementCount} requirement(s) is met by what the reading measures (stage ${standing.stage}).`);\n }\n const requirementsWithItems = new Set(standing.openItems.map((item) => item.requirementRef)).size;\n const named = standing.openItems.slice(0, OPEN_ITEMS_NAMED)\n .map((item) => `${item.requirementRef}: ${item.detail}${item.closedByTaskRef === null ? '' : ` (closed by ${item.closedByTaskRef})`}`);\n const rest = standing.openItems.length - named.length;\n return stop(CreationDriveStopRule.REQUIREMENTS_OPEN,\n `the loop chose to stop (${rationale}) while ${requirementsWithItems} of ${standing.requirementCount} requirement(s) carry ${standing.openItems.length} open item(s): `\n + `${named.join('; ')}${rest > 0 ? `; and ${rest} more` : ''}. Start refinement on them, or decide they are out of scope: wildo creation feed`);\n}\n\nfunction stop(rule: CreationDriveStopRule, waitingFor: string): CreationDriveDecision {\n return { action: CreationDriveAction.STOP, rule, waitingFor };\n}\n\nfunction wait(reason: CreationDriveWaitReason, detail: string): CreationDriveDecision {\n return { action: CreationDriveAction.WAIT, reason, detail };\n}\n\nfunction formatHours(ms: number): string {\n return `${Math.round((ms / 3_600_000) * 10) / 10} h`;\n}\n\nfunction describeAskedLine(kind: WorkbenchCreationHomeLineKind, subject: string, lineSubject?: string | null): string {\n switch (kind) {\n case WorkbenchCreationHomeLineKind.CLARIFICATION: return `playbook ${subject} asks a question only you can answer: wildo creation questions`;\n case WorkbenchCreationHomeLineKind.PARKED_QUESTION: return `the coding run for ${subject} is parked on a question: wildo creation questions`;\n // #3361: the line's own subject names the steps held until the interview is answered.\n case WorkbenchCreationHomeLineKind.INTERVIEW_DATES_NEXT_WORK:\n return `playbook ${subject}'s interview: ${lineSubject ?? 'the next steps'} read its answer, so they wait for it rather than be derived twice: wildo creation questions`;\n case WorkbenchCreationHomeLineKind.SPECIFICATION_FAULT_HOLDS_THE_PLAN: return `specifications module ${subject} does not evaluate, so the plan has nothing to run and is not finished: wildo creation feed`;\n default: return `the build plan cannot run ${subject} until you act: wildo build dispatches`;\n }\n}\n\n/** What the drive talks to: the companion's routes, the clock, and where its progress goes. A port, so it is testable. */\nexport interface CreationDrivePort {\n readonly readFeed: () => Promise<CreationConsole_Feed>;\n readonly readStatus: () => Promise<CreationDrive_Status>;\n /** Where the application stands against its requirements, derived live (#3701). Asked only once a loop chose to stop. */\n readonly readRequirementsStanding: () => Promise<CreationDrive_RequirementsStanding>;\n /** The run report's measured total, USD; undefined when it reports none or cannot be read. */\n readonly readSpentUsd: () => Promise<number | undefined>;\n readonly runLoop: (request: { readonly goal: string; readonly maximumIterations: number; readonly fanOut?: number; readonly skipPreflight?: boolean }) => Promise<ConsoleLoopResult & {\n readonly interruption?: { readonly failure: string; readonly providerAccountRefusal?: ModelProviderAccountRefusal };\n }>;\n readonly accept: () => Promise<CreationDrive_AcceptOutcome>;\n /** Did this error mean the companion is not answering (as opposed to answering no)? */\n readonly isCompanionUnreachable: (error: unknown) => boolean;\n /** Did the CLIENT stop waiting while the companion goes on (the loop continues there), or a read is not ready yet? */\n readonly isClientTimeout: (error: unknown) => boolean;\n /** The companion answered \"not now\" (503: a derivation still in progress, as after a restart). A wait, never an error. */\n readonly isNotReadyYet: (error: unknown) => boolean;\n /** The companion refused because a loop or composite already runs (409). */\n readonly isAlreadyRunning: (error: unknown) => boolean;\n /** The provider account's refusal (#3204) the companion ANSWERED with (a model call outside the loop's own steps), or `undefined`. */\n readonly readProviderAccountRefusal: (error: unknown) => ModelProviderAccountRefusal | undefined;\n readonly now: () => number;\n readonly sleep: (ms: number) => Promise<void>;\n readonly progress: (line: string) => void;\n}\n\nexport interface CreationDriveResult {\n readonly stoppedBy: CreationDriveStopRule;\n readonly waitingFor: string;\n readonly loops: number;\n readonly rounds: number;\n readonly accepted: number;\n /** Companion restarts the drive saw: a changed start time, or an outage it waited through. */\n readonly companionRestarts: number;\n readonly elapsedMs: number;\n readonly spentUsd: number | undefined;\n /**\n * False when the spend ceiling could not be applied: the run report could not be read, or reported no USD figure.\n * The ceiling is then not enforced, and the result says so rather than implying it held.\n */\n readonly spendMeasured: boolean;\n /** Present exactly when the drive stopped {@link CreationDriveStopRule.PROVIDER_ACCOUNT_REFUSED}: which account, why, and its own words. */\n readonly providerAccountRefusal?: ModelProviderAccountRefusal;\n}\n\n/**\n * Drive the creation until a stop rule fires (#2233). The preflight is the command's, run before this; everything here\n * talks to the companion through `port`.\n */\nexport async function runCreationDrive(port: CreationDrivePort, options: {\n readonly goal: string;\n readonly maximumMs: number;\n readonly maximumUsd: number;\n readonly fanOut?: number;\n readonly skipPreflight?: boolean;\n}): Promise<CreationDriveResult> {\n const startedAt = port.now();\n let loops = 0;\n let rounds = 0;\n let accepted = 0;\n let companionRestarts = 0;\n let consecutiveInterruptions = 0;\n let companionStartedAt: string | undefined;\n let unreachableSince: number | undefined;\n let spentAtStart: number | undefined;\n let spentUsd: number | undefined;\n let lastLoop: CreationDriveObservation['lastLoop'];\n let networkWaitSinceMs: number | undefined;\n /** The standing read for the last loop's chosen stop (#3701); cleared when a loop runs, so a stale one never judges. */\n let requirements: CreationDriveObservation['requirements'];\n const finish = (rule: CreationDriveStopRule, waitingFor: string, providerAccountRefusal?: ModelProviderAccountRefusal): CreationDriveResult => {\n port.progress(`Stopped: ${rule} — ${waitingFor}`);\n return {\n stoppedBy: rule, waitingFor, loops, rounds, accepted, companionRestarts, elapsedMs: port.now() - startedAt, spentUsd, spendMeasured: spentUsd !== undefined,\n ...(providerAccountRefusal !== undefined ? { providerAccountRefusal } : {}),\n };\n };\n /** The account refusal's stop (#3204): the provider, what is wrong, where to fix it, in its own words. */\n const refusedByProviderAccount = (refusal: ModelProviderAccountRefusal): CreationDriveResult =>\n finish(CreationDriveStopRule.PROVIDER_ACCOUNT_REFUSED, `${describeModelProviderAccountRefusal(refusal)} Then run the drive again.`, refusal);\n const ACCEPTANCE_IS_YOURS = 'the autonomy posture leaves acceptance to you: wildo creation writes, then wildo creation accept <run>';\n /**\n * The posture's accept. `true` when the posture leaves acceptance to a person (a marked critical gate, armed). A live\n * coding run defers it to the next baseline; a failed or timed-out accept is reported and left to the next loop's, never\n * the drive's end (review of 6fe527ed3): the pending runs stay pending, which is what they were.\n */\n const acceptPending = async (): Promise<boolean> => {\n let outcome: CreationDrive_AcceptOutcome;\n try {\n outcome = await port.accept();\n } catch (error) {\n port.progress(`Could not accept the pending playbook runs now (${describeCaughtError(error)}); the next loop asks again`);\n return false;\n }\n if (outcome.disposition === CreationDriveAcceptDisposition.HELD_FOR_PERSON) return true;\n if (outcome.disposition === CreationDriveAcceptDisposition.ACCEPTED) {\n accepted += outcome.accepted ?? 0;\n if ((outcome.accepted ?? 0) > 0) port.progress(`Accepted ${outcome.accepted} playbook run(s) under the autonomy posture`);\n }\n return false;\n };\n /** Wait one poll interval, marking that the drive waited since its last loop. */\n const pause = async (): Promise<void> => {\n if (lastLoop) lastLoop = { ...lastLoop, waitedSince: true };\n await port.sleep(CREATION_DRIVE_POLL_INTERVAL_MS);\n };\n\n for (;;) {\n let feed: CreationConsole_Feed;\n let status: CreationDrive_Status;\n try {\n [feed, status] = await Promise.all([port.readFeed(), port.readStatus()]);\n } catch (error) {\n /*\n * A companion that does not answer, answers \"not yet\" (503: after a restart its first feed derivation is still\n * running), or answers late is a WAIT, bounded; anything else is a defect worth surfacing (review of 6fe527ed3).\n */\n if (!port.isCompanionUnreachable(error) && !port.isNotReadyYet(error) && !port.isClientTimeout(error)) throw error;\n unreachableSince ??= port.now();\n if (port.now() - unreachableSince >= CREATION_DRIVE_COMPANION_DOWN_LIMIT_MS) {\n return finish(CreationDriveStopRule.COMPANION_UNREACHABLE, `the companion has not answered since ${new Date(unreachableSince).toISOString()}: wildo local dev`);\n }\n port.progress(`Waiting: ${CreationDriveWaitReason.COMPANION_DOWN} — the companion does not answer yet; asking again`);\n await pause();\n continue;\n }\n if (unreachableSince !== undefined) {\n unreachableSince = undefined;\n // A restart only when the companion's start time moved: a slow answer or a cold derivation is no restart.\n if (companionStartedAt !== undefined && status.companionStartedAt !== companionStartedAt) {\n companionRestarts += 1;\n port.progress(`The companion restarted (now since ${status.companionStartedAt}); re-reading its state`);\n }\n } else if (companionStartedAt !== undefined && status.companionStartedAt !== companionStartedAt) {\n companionRestarts += 1;\n port.progress(`The companion restarted (now since ${status.companionStartedAt}); re-reading its state`);\n }\n companionStartedAt = status.companionStartedAt;\n /*\n * The goal is the requirements' to call (#3701): once the last loop chose to stop with nothing since, read where the\n * application stands, once for that loop. It derives the reading, so it is never read on a poll.\n */\n if (requirements === undefined && lastLoop?.stoppedBecause === LOOP_CHOSE_TO_STOP && !lastLoop.waitedSince) {\n try {\n requirements = { standing: await port.readRequirementsStanding() };\n } catch (error) {\n requirements = { unreadBecause: describeCaughtError(error) };\n }\n }\n const decide = () => decideCreationDriveStep({\n feed, status, elapsedMs: port.now() - startedAt, maximumMs: options.maximumMs, spentUsd, maximumUsd: options.maximumUsd,\n nowMs: port.now(), ...(networkWaitSinceMs === undefined ? {} : { networkWaitSinceMs }), ...(lastLoop ? { lastLoop } : {}),\n ...(requirements === undefined ? {} : { requirements }),\n });\n let decision = decide();\n /*\n * The spend is read from the run report, which derives from every row and the git history: read before a loop would\n * start (where the ceiling decides) and at the first step (the baseline), never on every poll of a long wait. The\n * ceilings are checked BETWEEN loops: a loop in flight is not cut, so one loop may overshoot them. A spend the report\n * cannot state (unreadable, or no USD figure) leaves the ceiling unenforced, and the result says so (`spendMeasured`).\n */\n if (spentAtStart === undefined || decision.action === CreationDriveAction.RUN_LOOP) {\n const total = await port.readSpentUsd().catch(() => undefined);\n spentAtStart ??= total;\n spentUsd = total === undefined || spentAtStart === undefined ? spentUsd : total - spentAtStart;\n decision = decide();\n }\n if (decision.action === CreationDriveAction.STOP) {\n /*\n * Whatever the system may accept is accepted before the drive stops, so a stop never leaves its work uncommitted.\n * The rule that fired stays the stop's; a posture that leaves acceptance to the person adds to what it waits for.\n */\n if (status.loopsInFlight === 0 && status.detachedRunsInFlight === 0 && (status.executionsInFlight ?? 0) === 0 && await acceptPending()) {\n return finish(decision.rule, `${decision.waitingFor}; and ${ACCEPTANCE_IS_YOURS}`, decision.providerAccountRefusal);\n }\n return finish(decision.rule, decision.waitingFor, decision.providerAccountRefusal);\n }\n if (decision.action === CreationDriveAction.WAIT) {\n networkWaitSinceMs = decision.reason === CreationDriveWaitReason.CODING_AGENT_CONNECTIVITY ? (networkWaitSinceMs ?? port.now()) : undefined;\n port.progress(`Waiting: ${decision.reason} — ${decision.detail}`);\n await pause();\n continue;\n }\n networkWaitSinceMs = undefined;\n\n loops += 1;\n requirements = undefined;\n port.progress(`Loop ${loops}: up to ${CREATION_DRIVE_ROUNDS_PER_LOOP} rounds toward the goal`);\n let result: Awaited<ReturnType<CreationDrivePort['runLoop']>>;\n try {\n result = await port.runLoop({\n goal: options.goal,\n maximumIterations: CREATION_DRIVE_ROUNDS_PER_LOOP,\n ...(options.fanOut !== undefined ? { fanOut: options.fanOut } : {}),\n ...(options.skipPreflight === true ? { skipPreflight: true } : {}),\n });\n } catch (error) {\n // The companion went away under the loop, the client stopped waiting while it goes on, or another loop holds the\n // subject: the next read decides (a restart is a wait, a running loop is a wait). Anything else is its refusal.\n if (port.isCompanionUnreachable(error) || port.isClientTimeout(error) || port.isAlreadyRunning(error) || port.isNotReadyYet(error)) {\n lastLoop = undefined;\n // Never straight back: a loop another process holds answers 409 at once, and asking again at once would spin.\n await port.sleep(CREATION_DRIVE_POLL_INTERVAL_MS);\n continue;\n }\n // A provider account's refusal answered as an error (a model call outside the loop's steps, #3204): the environment's, not a refusal of the loop.\n const accountRefusal = port.readProviderAccountRefusal(error);\n if (accountRefusal !== undefined) return refusedByProviderAccount(accountRefusal);\n return finish(CreationDriveStopRule.LOOP_REFUSED, describeCaughtError(error));\n }\n rounds += result.steps.length;\n lastLoop = { stoppedBecause: result.stoppedBecause, waitedSince: false, ...(result.steps.at(-1)?.stopRationale ? { stopRationale: result.steps.at(-1)!.stopRationale! } : {}) };\n port.progress(`Loop ${loops} ran ${result.steps.length} round(s) and stopped: ${result.stoppedBecause}`);\n // A provider account's refusal (#3204) keeps its own rule even where the posture leaves acceptance to a person: it is stopped on at once, since the next loop is refused identically.\n if (result.stoppedBecause === LOOP_INTERRUPTED_BY_ENVIRONMENT && result.interruption?.providerAccountRefusal !== undefined) {\n if (await acceptPending()) return finish(CreationDriveStopRule.PROVIDER_ACCOUNT_REFUSED, `${describeModelProviderAccountRefusal(result.interruption.providerAccountRefusal)} Then run the drive again; and ${ACCEPTANCE_IS_YOURS}`, result.interruption.providerAccountRefusal);\n return refusedByProviderAccount(result.interruption.providerAccountRefusal);\n }\n if (await acceptPending()) return finish(CreationDriveStopRule.ACCEPTANCE_HELD_FOR_PERSON, ACCEPTANCE_IS_YOURS);\n if (result.stoppedBecause === LOOP_ALL_LANES_FAILED) {\n const failures = result.steps.at(-1)?.lanes.filter((lane) => lane.failure).map((lane) => `${lane.playbookRef}: ${lane.failure}`) ?? [];\n return finish(CreationDriveStopRule.LANES_FAILED, failures.join('; ') || 'every lane of the last round failed');\n }\n if (result.stoppedBecause === LOOP_INTERRUPTED_BY_ENVIRONMENT) {\n consecutiveInterruptions += 1;\n if (consecutiveInterruptions >= CREATION_DRIVE_MAXIMUM_CONSECUTIVE_INTERRUPTIONS) {\n return finish(CreationDriveStopRule.ENVIRONMENT_INTERRUPTED, result.interruption?.failure ?? 'the environment stopped the loop');\n }\n lastLoop = { ...lastLoop, waitedSince: true };\n } else {\n consecutiveInterruptions = 0;\n }\n }\n}\n"]}
1
+ {"version":3,"file":"creation-drive.service.js","sourceRoot":"","sources":["../../../../src/services/companion/creation-drive.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,OAAO,EACL,8BAA8B,EAC9B,6BAA6B,EAC7B,4BAA4B,GAK7B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,mCAAmC,EAAoC,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAInI,mGAAmG;AACnG,MAAM,CAAN,IAAY,kBAEX;AAFD,WAAY,kBAAkB;IAC5B,qCAAe,CAAA;AACjB,CAAC,EAFW,kBAAkB,KAAlB,kBAAkB,QAE7B;AAED,0GAA0G;AAC1G,MAAM,CAAN,IAAY,qBAkEX;AAlED,WAAY,qBAAqB;IAC/B;;;OAGG;IACH,sDAA6B,CAAA;IAC7B;;;;;OAKG;IACH,gEAAuC,CAAA;IACvC;;;OAGG;IACH,4DAAmC,CAAA;IACnC,kEAAkE;IAClE,sDAA6B,CAAA;IAC7B;;;OAGG;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;YAC9B,IAAI,wBAAwB,IAAI,gDAAgD,EAAE,CAAC;gBACjF,OAAO,MAAM,CAAC,qBAAqB,CAAC,uBAAuB,EAAE,MAAM,CAAC,YAAY,EAAE,OAAO,IAAI,kCAAkC,CAAC,CAAC;YACnI,CAAC;YACD,QAAQ,GAAG,EAAE,GAAG,QAAQ,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;QAChD,CAAC;aAAM,CAAC;YACN,wBAAwB,GAAG,CAAC,CAAC;QAC/B,CAAC;IACH,CAAC;AACH,CAAC","sourcesContent":["/**\n * # `wildo creation drive --until stuck` — the unattended creation driver (#2233)\n *\n * A full creation still needed a person, or a hand-written script, to move it from one round to the next: in run 004\n * (`app-creation-test-004`) the driving session ran the umbrella or a build wave, accepted what landed, restarted the\n * companion when it fell over, and stopped on the first real blocker. That loop is the shape of \"run a creation\", and\n * it lived outside the framework. `wildo creation loop` covered one piece of it (a model chooses each round) and none of\n * the rest: it stopped at 20 rounds, never accepted, died with the companion and stopped only when the model did.\n *\n * ## The shape\n *\n * Each step reads the companion's durable state (the creation FEED: what Home shows, holds included; and the drive\n * STATUS: what still runs), decides ONE of three things with {@link decideCreationDriveStep}, and does it:\n *\n * - **run** a bounded `wildo creation loop` (up to its 20-round ceiling): the companion gates, a model chooses, the\n * chosen lanes run, the build lane among them;\n * - **wait**: something still runs (a loop, a wave, a lane the usage-limit resume relaunched), the coding agent's usage\n * limit holds until its stated reset, the connectivity hold waits on the network, or the companion is down;\n * - **stop**, naming the rule that fired and what it waits for.\n *\n * The loop's model choosing to stop is not the goal reached: the drive then asks where the application stands against its\n * own requirements (`GET /creation/requirements/standing`, #3701), and calls the goal reached only when no requirement\n * carries an open item.\n *\n * After every loop, it accepts what the autonomy posture says the SYSTEM accepts (`POST /creation/drive/accept`, never\n * inside a live coding run), and stops when the posture leaves acceptance to a person: a marked critical gate, armed.\n *\n * ## Why in the CLI and not in the companion\n *\n * A companion restart ends every request it holds and every in-process timer. The driver lives in another process, so a\n * restart is a WAIT: it polls until the companion answers again and reads the same durable rows (the loop's state is\n * the working tree; the run records survive). The restart itself is on the intervention ledger when the companion\n * booted with runs in flight (#2231), and the driver also counts the restarts it saw, from the companion's start time.\n *\n * ## Holds it respects\n *\n * - a person's `wildo build stop` (#3206) is a STOP: a stopped build is never resumed unattended;\n * - the coding agent's usage limit (#2388) is a WAIT until it lifts; the companion's own resume relaunches what it\n * paused (#2463), and the driver waits for that run to drain before choosing again;\n * - the connectivity hold (#3236, #3262) is a WAIT until the agent's API answers.\n *\n * Ceilings are the person's, like `loop`'s iteration ceiling: a wall clock and a spend in US dollars, both required.\n * The spend is the run report's measured total since the drive began (#2231, #2232), a floor wherever a run reported no\n * cost.\n */\nimport {\n CreationDriveAcceptDisposition,\n WorkbenchCreationHomeLineKind,\n WorkbenchCreationHomeSection,\n type CreationConsole_Feed,\n type CreationDrive_AcceptOutcome,\n type CreationDrive_RequirementsStanding,\n type CreationDrive_Status,\n} from '@wildo-ai/platform-core-shared';\nimport { describeModelProviderAccountRefusal, type ModelProviderAccountRefusal, describeCaughtError } from '@wildo-ai/saas-models';\n\nimport type { ConsoleLoopResult } from './creation-console.service';\n\n/** The only drive mode: run until a stop rule fires. Named so `--until` is a closed vocabulary. */\nexport enum CreationDriveUntil {\n STUCK = 'stuck',\n}\n\n/** Why the driver stopped. Every exit is one of these, and the report names it with what it waits for. */\nexport enum CreationDriveStopRule {\n /**\n * The loop's selector chose to stop with nothing running and nothing asked, AND the application's requirements carry no\n * open item (#3701): the goal is reached by measurement, never by the model's judgement alone.\n */\n GOAL_REACHED = 'goal-reached',\n /**\n * The loop's selector chose to stop, and the application's own requirements still carry open items (#3701): a reported\n * gap, a configuration that does not meet one, one nothing addresses or with no build work landed. The model judged the\n * creation done and the measurement says it is not, so the drive stops and names them: each is closed by the task named\n * beside it, or by a person who starts refinement or decides the requirement is out of scope.\n */\n REQUIREMENTS_OPEN = 'requirements-open',\n /**\n * The loop's selector chose to stop, and where the application stands against its requirements could not be read\n * (#3701): whether the goal is reached is unknown, so the drive says that rather than claim it.\n */\n GOAL_UNMEASURED = 'goal-unmeasured',\n /** Nothing is eligible to run, nothing runs, nothing is asked. */\n NOTHING_LEFT = 'nothing-left',\n /**\n * A question only the creator can answer: a playbook's clarification, a coding run parked on a question, or an interview\n * whose answer would date work the next round could run (#3361).\n */\n WAITING_ON_CREATOR = 'waiting-on-creator',\n /** The build plan can run nothing until the creator unblocks it (a task that cannot land, retired after its attempts). */\n PLAN_BLOCKED = 'plan-blocked',\n /** A person's `wildo build stop` holds the build; only a person starts it again. */\n BUILD_STOPPED_BY_PERSON = 'build-stopped-by-person',\n /** The build lane holds dispatch because a backend does not run the current tree (#3215). */\n BUILD_HELD = 'build-held',\n /** Every lane of a loop round failed: choosing again over the same state would spend without progressing. */\n LANES_FAILED = 'lanes-failed',\n /** The companion refused to run the loop (a preflight failure, a refusal whose remedy is a decision). */\n LOOP_REFUSED = 'loop-refused',\n /** The autonomy posture leaves acceptance to a person: a marked critical gate is armed. */\n ACCEPTANCE_HELD_FOR_PERSON = 'acceptance-held-for-person',\n /** The creation preflight found what would stop the run, before the first round. */\n PREFLIGHT_FAILED = 'preflight-failed',\n /** The person's wall-clock ceiling. */\n WALL_CLOCK_CEILING = 'wall-clock-ceiling',\n /** The person's spend ceiling. */\n SPEND_CEILING = 'spend-ceiling',\n /** The environment stopped the loop on consecutive rounds, past the loop's own recovery wait (#3235). */\n ENVIRONMENT_INTERRUPTED = 'environment-interrupted',\n /** The companion did not answer for {@link CREATION_DRIVE_COMPANION_DOWN_LIMIT_MS}. */\n COMPANION_UNREACHABLE = 'companion-unreachable',\n /**\n * The coding agent's API has not answered along its route for {@link CREATION_DRIVE_NETWORK_WAIT_LIMIT_MS}: nothing\n * can be built, and the wait has outlived what a network blip is. The person checks the network, or ends the hold.\n */\n NETWORK_LOST = 'network-lost',\n /**\n * A model provider's ACCOUNT refused the companion's or the coding agent's call (#3204): no credits left, a spend or\n * usage limit, billing. The ENVIRONMENT's condition, never the application's: nothing the creation did caused it, and\n * nothing it can do lifts it. A person adds credits or raises the limit in that provider's console, then runs the drive\n * again. Stopped on at once, never after consecutive loops: a loop run again is refused identically.\n */\n PROVIDER_ACCOUNT_REFUSED = 'provider-account-refused',\n /**\n * A verification check cannot be asked for a host cause (#3423, #3432): `wildo` is not on the companion's PATH, or the\n * installed one lacks the verb a check asks, or one check failed the same way on two tasks. Every build task's check\n * would fail the same way, so the companion admits no coding turn. The host's condition: a person repairs it (the next\n * admission asks first), then runs the drive again.\n */\n VERIFICATION_TOOL_UNAVAILABLE = 'verification-tool-unavailable',\n}\n\n/** What the driver waits for when it waits. */\nexport enum CreationDriveWaitReason {\n /** A loop or a detached run (a wave, a lane, a usage-limit resume) still runs in the companion. */\n RUNS_IN_FLIGHT = 'runs-in-flight',\n /** The coding agent's account usage limit holds the build until its stated reset (#2388). */\n CODING_AGENT_USAGE_LIMIT = 'coding-agent-usage-limit',\n /** A coding run lost the network; no coding turn starts until the agent's API answers (#3236, #3262). */\n CODING_AGENT_CONNECTIVITY = 'coding-agent-connectivity',\n /** The companion does not answer (a restart, a crash). */\n COMPANION_DOWN = 'companion-down',\n}\n\n/** How long one wait lasts before the driver reads the state again. */\nexport const CREATION_DRIVE_POLL_INTERVAL_MS = 30_000;\n/** How long the companion may stay unreachable before the drive stops. A restart takes seconds to a few minutes. */\nexport const CREATION_DRIVE_COMPANION_DOWN_LIMIT_MS = 15 * 60 * 1000;\n/**\n * How long the drive waits on the coding agent's network before it stops {@link CreationDriveStopRule.NETWORK_LOST}: three\n * times the coding admission's own twenty-minute bound, so an outage of an hour (app-creation-test-007 measured 35 min)\n * is waited through, and a five-hour one is the person's to see.\n */\nexport const CREATION_DRIVE_NETWORK_WAIT_LIMIT_MS = 60 * 60 * 1000;\n/** The loop's own ceiling per request (`POST /playbooks/loop` caps it at 20). */\nexport const CREATION_DRIVE_ROUNDS_PER_LOOP = 20;\n/** Consecutive loops the environment interrupted before the drive stops (each already waited up to 10 minutes, #3235). */\nexport const CREATION_DRIVE_MAXIMUM_CONSECUTIVE_INTERRUPTIONS = 3;\n/** The ASKED kinds that stop a run until the creator acts. A governance document's fact does not: it blocks no run. */\nconst ASKED_KINDS_THAT_STOP: ReadonlyMap<WorkbenchCreationHomeLineKind, CreationDriveStopRule> = new Map([\n [WorkbenchCreationHomeLineKind.CLARIFICATION, CreationDriveStopRule.WAITING_ON_CREATOR],\n [WorkbenchCreationHomeLineKind.PARKED_QUESTION, CreationDriveStopRule.WAITING_ON_CREATOR],\n /*\n * An interview whose answer would date work the next round could run (#3361). The round withholds that work, so the\n * drive stops and names the interview, as for a clarification, rather than run on without it.\n */\n [WorkbenchCreationHomeLineKind.INTERVIEW_DATES_NEXT_WORK, CreationDriveStopRule.WAITING_ON_CREATOR],\n [WorkbenchCreationHomeLineKind.SPECIFICATION_FAULT_HOLDS_THE_PLAN, CreationDriveStopRule.PLAN_BLOCKED],\n [WorkbenchCreationHomeLineKind.UNBLOCK_THE_PLAN, CreationDriveStopRule.PLAN_BLOCKED],\n]);\n\n/** What the driver knows when it decides its next step. */\nexport interface CreationDriveObservation {\n readonly feed: CreationConsole_Feed;\n readonly status: CreationDrive_Status;\n readonly elapsedMs: number;\n readonly maximumMs: number;\n /** Measured spend since the drive began, USD; undefined when the report could not be read. */\n readonly spentUsd: number | undefined;\n readonly maximumUsd: number;\n /** How the last loop ended, and whether the driver waited on anything since (which makes running again worth it). */\n readonly lastLoop?: { readonly stoppedBecause: string; readonly stopRationale?: string; readonly waitedSince: boolean };\n /**\n * Where the application stands against its own requirements (#3701), read once the last loop chose to stop: the\n * `standing`, or why it could not be read. Absent when it was not asked.\n */\n readonly requirements?: { readonly standing: CreationDrive_RequirementsStanding } | { readonly unreadBecause: string };\n /** Since when the drive has waited on the coding agent's network without a break (ms on the drive's clock). */\n readonly networkWaitSinceMs?: number;\n readonly nowMs?: number;\n}\n\nexport type CreationDriveDecision =\n | { readonly action: CreationDriveAction.RUN_LOOP }\n | { readonly action: CreationDriveAction.WAIT; readonly reason: CreationDriveWaitReason; readonly detail: string }\n | { readonly action: CreationDriveAction.STOP; readonly rule: CreationDriveStopRule; readonly waitingFor: string; readonly providerAccountRefusal?: ModelProviderAccountRefusal };\n\nexport enum CreationDriveAction {\n RUN_LOOP = 'run-loop',\n WAIT = 'wait',\n STOP = 'stop',\n}\n\n/**\n * The next step, from what the companion's durable rows say now. Order is the rule:\n * a person's stop first (it is theirs); the person's ceilings; anything still running (never start a loop over a\n * running one); what waits on the creator; a backend that does not boot; the holds only a person lifts (a refused\n * provider account, a build check's command missing from PATH); the holds that lift on their own; then the last loop's\n * own verdict when nothing happened since; else run.\n */\nexport function decideCreationDriveStep(observation: CreationDriveObservation): CreationDriveDecision {\n const { feed, status } = observation;\n // Read live from the status first: the feed may be an earlier snapshot, and a stop asked a moment ago holds now.\n const stoppedSince = status.buildStoppedSince ?? feed.buildPreparation?.heldByStopSince ?? null;\n if (stoppedSince !== null) {\n return stop(CreationDriveStopRule.BUILD_STOPPED_BY_PERSON, `a person stopped the build at ${stoppedSince}; start it again with: wildo build run`);\n }\n if (observation.elapsedMs >= observation.maximumMs) {\n return stop(CreationDriveStopRule.WALL_CLOCK_CEILING, `the drive's wall-clock ceiling (${formatHours(observation.maximumMs)}); run it again to continue`);\n }\n if (observation.spentUsd !== undefined && observation.spentUsd >= observation.maximumUsd) {\n return stop(CreationDriveStopRule.SPEND_CEILING, `the drive's spend ceiling (USD ${observation.maximumUsd}; measured USD ${observation.spentUsd.toFixed(2)})`);\n }\n if (status.loopsInFlight > 0 || status.detachedRunsInFlight > 0 || (status.executionsInFlight ?? 0) > 0) {\n return wait(CreationDriveWaitReason.RUNS_IN_FLIGHT, `${status.loopsInFlight} loop(s), ${status.detachedRunsInFlight} detached run(s) and ${status.executionsInFlight ?? 0} playbook execution(s) still running`);\n }\n for (const line of feed.lines) {\n if (line.section !== WorkbenchCreationHomeSection.ASKED) continue;\n const rule = ASKED_KINDS_THAT_STOP.get(line.kind);\n if (rule !== undefined) return stop(rule, describeAskedLine(line.kind, line.taskRef ?? line.playbookRef ?? line.subject ?? line.targetResourceId, line.subject));\n }\n const bootFailures = feed.buildHold?.bootFailures ?? [];\n /*\n * Not while the build lane still owes the repair of a start the application's own code refused (#3204): the lane runs\n * it, bounded per round, and only once it is spent does the hold need a person. Reference run 42696531261 stopped here\n * on two refusals a build task's code caused, with nothing having tried to repair them.\n */\n if (bootFailures.length > 0 && feed.buildHold?.startupRepairOwed !== true) {\n return stop(CreationDriveStopRule.BUILD_HELD, bootFailures.map((failure) => `${failure.serviceIdentifier} does not start: ${failure.remedy}`).join('; '));\n }\n /*\n * The coding agent's provider ACCOUNT refused its turn (#3204). The companion holds the build and re-asks the account\n * every thirty minutes, so a person who adds credits loses nothing; but nothing ever lifts it on its own, so an\n * unattended drive stops here rather than wait for a \"resume\" that only re-asks. Read from the live status first (a\n * pending resume beside it is that re-ask, never a reset), else from the feed's own line.\n */\n const accountRefusal = status.codingAgentAccountRefusal;\n const refusedLine = feed.lines.find((line) => line.kind === WorkbenchCreationHomeLineKind.CODING_AGENT_ACCOUNT_REFUSED);\n if (accountRefusal !== undefined || refusedLine !== undefined) {\n const sentence = accountRefusal !== undefined ? describeModelProviderAccountRefusal(accountRefusal) : refusedLine?.subject ?? 'the coding agent\\'s provider account refused to work';\n return {\n action: CreationDriveAction.STOP,\n rule: CreationDriveStopRule.PROVIDER_ACCOUNT_REFUSED,\n waitingFor: `the coding agent's provider account: ${sentence} The build re-asks it every 30 minutes; run the drive again once it is fixed.`,\n ...(accountRefusal !== undefined ? { providerAccountRefusal: accountRefusal } : {}),\n };\n }\n /*\n * A build check cannot be asked for a host cause (#3423, #3432): a command not on PATH, one lacking the verb, the same\n * failure on two tasks. Nothing the drive does lifts it, so it stops; the line's subject is the cause and its remedy.\n */\n const toolUnavailable = feed.lines.find((line) => line.kind === WorkbenchCreationHomeLineKind.VERIFICATION_TOOL_UNAVAILABLE);\n if (toolUnavailable !== undefined) {\n return stop(CreationDriveStopRule.VERIFICATION_TOOL_UNAVAILABLE,\n `the build's checks, which cannot run (met by build task ${toolUnavailable.taskRef ?? toolUnavailable.targetResourceId}), so no coding turn starts: `\n + `${toolUnavailable.subject ?? 'a command the checks run is unavailable.'} Then run the drive again.`);\n }\n const usageLimit = feed.lines.find((line) => line.kind === WorkbenchCreationHomeLineKind.CODING_AGENT_USAGE_LIMITED);\n if (usageLimit !== undefined || status.pendingBuildResume !== undefined) {\n const resumesAt = status.pendingBuildResume?.resumesAt ?? usageLimit?.subject ?? 'its reset';\n return wait(CreationDriveWaitReason.CODING_AGENT_USAGE_LIMIT, `the coding agent's usage limit; the build resumes on its own at ${resumesAt}`);\n }\n /*\n * Waited on only when the hold has a ROUTE: its background probe ends it when the network returns. A hold with no route\n * (an agent with no known API host, a proxy it cannot use) is ended only by the next coding admission, so waiting on it\n * would wait forever; the loop runs, and its build's next turn is the check (review of 6fe527ed3).\n */\n const connectivity = feed.lines.find((line) => line.kind === WorkbenchCreationHomeLineKind.CODING_AGENT_CONNECTIVITY_LOST && line.subject !== null);\n if (connectivity !== undefined) {\n if (observation.networkWaitSinceMs !== undefined && observation.nowMs !== undefined && observation.nowMs - observation.networkWaitSinceMs >= CREATION_DRIVE_NETWORK_WAIT_LIMIT_MS) {\n return stop(CreationDriveStopRule.NETWORK_LOST, `the coding agent's API (${connectivity.subject}) has not answered for ${formatHours(CREATION_DRIVE_NETWORK_WAIT_LIMIT_MS)}; once the network is back: wildo build rearm ${connectivity.taskRef ?? '<task>'} --reason environment`);\n }\n return wait(CreationDriveWaitReason.CODING_AGENT_CONNECTIVITY, `the coding agent's network; waiting for ${connectivity.subject} to answer`);\n }\n const last = observation.lastLoop;\n if (last !== undefined && !last.waitedSince) {\n // The loop chose to stop, or found nothing eligible, and nothing ran or lifted since: asking again is the same answer.\n if (last.stoppedBecause === LOOP_CHOSE_TO_STOP) return judgeChosenStop(last.stopRationale ?? 'the loop chose to stop', observation.requirements);\n if (last.stoppedBecause === LOOP_NOTHING_ELIGIBLE) return stop(CreationDriveStopRule.NOTHING_LEFT, 'nothing is eligible to run');\n }\n return { action: CreationDriveAction.RUN_LOOP };\n}\n\n// semantic-literal-boundary: `PlaybookLoopStopReason` values as the companion's loop document carries them; the CLI reads them as wire values.\nconst LOOP_CHOSE_TO_STOP = 'CHOSE_TO_STOP';\nconst LOOP_NOTHING_ELIGIBLE = 'NOTHING_ELIGIBLE';\nconst LOOP_ALL_LANES_FAILED = 'ALL_LANES_FAILED';\nconst LOOP_INTERRUPTED_BY_ENVIRONMENT = 'INTERRUPTED_BY_ENVIRONMENT';\n\n/** How many open items a stop names in words; the rest are counted. */\nconst OPEN_ITEMS_NAMED = 5;\n\n/**\n * The loop chose to stop: whether the goal is reached is the REQUIREMENTS' answer, not the model's (#3701). Goal reached\n * only when the standing was read and carries no open item; open items stop the drive on a rule that names them;\n * an unread standing is said to be unread. Run 42886943490 stopped \"goal-reached\" with 16 of 24 requirements partly met.\n */\nfunction judgeChosenStop(rationale: string, requirements: CreationDriveObservation['requirements']): CreationDriveDecision {\n const standing = requirements !== undefined && 'standing' in requirements ? requirements.standing : undefined;\n if (standing === undefined) {\n const why = requirements !== undefined && 'unreadBecause' in requirements ? requirements.unreadBecause : 'it was not read';\n return stop(CreationDriveStopRule.GOAL_UNMEASURED, `${rationale} — but where the application stands against its requirements could not be read (${why}): wildo creation drive again, or wildo context journey`);\n }\n if (standing.openItems.length === 0) {\n return stop(CreationDriveStopRule.GOAL_REACHED, `${rationale} Every one of the ${standing.requirementCount} requirement(s) is met by what the reading measures (stage ${standing.stage}).`);\n }\n const requirementsWithItems = new Set(standing.openItems.map((item) => item.requirementRef)).size;\n const named = standing.openItems.slice(0, OPEN_ITEMS_NAMED)\n .map((item) => `${item.requirementRef}: ${item.detail}${item.closedByTaskRef === null ? '' : ` (closed by ${item.closedByTaskRef})`}`);\n const rest = standing.openItems.length - named.length;\n return stop(CreationDriveStopRule.REQUIREMENTS_OPEN,\n `the loop chose to stop (${rationale}) while ${requirementsWithItems} of ${standing.requirementCount} requirement(s) carry ${standing.openItems.length} open item(s): `\n + `${named.join('; ')}${rest > 0 ? `; and ${rest} more` : ''}. Start refinement on them, or decide they are out of scope: wildo creation feed`);\n}\n\nfunction stop(rule: CreationDriveStopRule, waitingFor: string): CreationDriveDecision {\n return { action: CreationDriveAction.STOP, rule, waitingFor };\n}\n\nfunction wait(reason: CreationDriveWaitReason, detail: string): CreationDriveDecision {\n return { action: CreationDriveAction.WAIT, reason, detail };\n}\n\nfunction formatHours(ms: number): string {\n return `${Math.round((ms / 3_600_000) * 10) / 10} h`;\n}\n\nfunction describeAskedLine(kind: WorkbenchCreationHomeLineKind, subject: string, lineSubject?: string | null): string {\n switch (kind) {\n case WorkbenchCreationHomeLineKind.CLARIFICATION: return `playbook ${subject} asks a question only you can answer: wildo creation questions`;\n case WorkbenchCreationHomeLineKind.PARKED_QUESTION: return `the coding run for ${subject} is parked on a question: wildo creation questions`;\n // #3361: the line's own subject names the steps held until the interview is answered.\n case WorkbenchCreationHomeLineKind.INTERVIEW_DATES_NEXT_WORK:\n return `playbook ${subject}'s interview: ${lineSubject ?? 'the next steps'} read its answer, so they wait for it rather than be derived twice: wildo creation questions`;\n case WorkbenchCreationHomeLineKind.SPECIFICATION_FAULT_HOLDS_THE_PLAN: return `specifications module ${subject} does not evaluate, so the plan has nothing to run and is not finished: wildo creation feed`;\n default: return `the build plan cannot run ${subject} until you act: wildo build dispatches`;\n }\n}\n\n/** What the drive talks to: the companion's routes, the clock, and where its progress goes. A port, so it is testable. */\nexport interface CreationDrivePort {\n readonly readFeed: () => Promise<CreationConsole_Feed>;\n readonly readStatus: () => Promise<CreationDrive_Status>;\n /** Where the application stands against its requirements, derived live (#3701). Asked only once a loop chose to stop. */\n readonly readRequirementsStanding: () => Promise<CreationDrive_RequirementsStanding>;\n /** The run report's measured total, USD; undefined when it reports none or cannot be read. */\n readonly readSpentUsd: () => Promise<number | undefined>;\n readonly runLoop: (request: { readonly goal: string; readonly maximumIterations: number; readonly fanOut?: number; readonly skipPreflight?: boolean }) => Promise<ConsoleLoopResult & {\n readonly interruption?: { readonly failure: string; readonly providerAccountRefusal?: ModelProviderAccountRefusal };\n }>;\n readonly accept: () => Promise<CreationDrive_AcceptOutcome>;\n /** Did this error mean the companion is not answering (as opposed to answering no)? */\n readonly isCompanionUnreachable: (error: unknown) => boolean;\n /** Did the CLIENT stop waiting while the companion goes on (the loop continues there), or a read is not ready yet? */\n readonly isClientTimeout: (error: unknown) => boolean;\n /** The companion answered \"not now\" (503: a derivation still in progress, as after a restart). A wait, never an error. */\n readonly isNotReadyYet: (error: unknown) => boolean;\n /** The companion refused because a loop or composite already runs (409). */\n readonly isAlreadyRunning: (error: unknown) => boolean;\n /** The provider account's refusal (#3204) the companion ANSWERED with (a model call outside the loop's own steps), or `undefined`. */\n readonly readProviderAccountRefusal: (error: unknown) => ModelProviderAccountRefusal | undefined;\n readonly now: () => number;\n readonly sleep: (ms: number) => Promise<void>;\n readonly progress: (line: string) => void;\n}\n\nexport interface CreationDriveResult {\n readonly stoppedBy: CreationDriveStopRule;\n readonly waitingFor: string;\n readonly loops: number;\n readonly rounds: number;\n readonly accepted: number;\n /** Companion restarts the drive saw: a changed start time, or an outage it waited through. */\n readonly companionRestarts: number;\n readonly elapsedMs: number;\n readonly spentUsd: number | undefined;\n /**\n * False when the spend ceiling could not be applied: the run report could not be read, or reported no USD figure.\n * The ceiling is then not enforced, and the result says so rather than implying it held.\n */\n readonly spendMeasured: boolean;\n /** Present exactly when the drive stopped {@link CreationDriveStopRule.PROVIDER_ACCOUNT_REFUSED}: which account, why, and its own words. */\n readonly providerAccountRefusal?: ModelProviderAccountRefusal;\n}\n\n/**\n * Drive the creation until a stop rule fires (#2233). The preflight is the command's, run before this; everything here\n * talks to the companion through `port`.\n */\nexport async function runCreationDrive(port: CreationDrivePort, options: {\n readonly goal: string;\n readonly maximumMs: number;\n readonly maximumUsd: number;\n readonly fanOut?: number;\n readonly skipPreflight?: boolean;\n}): Promise<CreationDriveResult> {\n const startedAt = port.now();\n let loops = 0;\n let rounds = 0;\n let accepted = 0;\n let companionRestarts = 0;\n let consecutiveInterruptions = 0;\n let companionStartedAt: string | undefined;\n let unreachableSince: number | undefined;\n let spentAtStart: number | undefined;\n let spentUsd: number | undefined;\n let lastLoop: CreationDriveObservation['lastLoop'];\n let networkWaitSinceMs: number | undefined;\n /** The standing read for the last loop's chosen stop (#3701); cleared when a loop runs, so a stale one never judges. */\n let requirements: CreationDriveObservation['requirements'];\n const finish = (rule: CreationDriveStopRule, waitingFor: string, providerAccountRefusal?: ModelProviderAccountRefusal): CreationDriveResult => {\n port.progress(`Stopped: ${rule} — ${waitingFor}`);\n return {\n stoppedBy: rule, waitingFor, loops, rounds, accepted, companionRestarts, elapsedMs: port.now() - startedAt, spentUsd, spendMeasured: spentUsd !== undefined,\n ...(providerAccountRefusal !== undefined ? { providerAccountRefusal } : {}),\n };\n };\n /** The account refusal's stop (#3204): the provider, what is wrong, where to fix it, in its own words. */\n const refusedByProviderAccount = (refusal: ModelProviderAccountRefusal): CreationDriveResult =>\n finish(CreationDriveStopRule.PROVIDER_ACCOUNT_REFUSED, `${describeModelProviderAccountRefusal(refusal)} Then run the drive again.`, refusal);\n const ACCEPTANCE_IS_YOURS = 'the autonomy posture leaves acceptance to you: wildo creation writes, then wildo creation accept <run>';\n /**\n * The posture's accept. `true` when the posture leaves acceptance to a person (a marked critical gate, armed). A live\n * coding run defers it to the next baseline; a failed or timed-out accept is reported and left to the next loop's, never\n * the drive's end (review of 6fe527ed3): the pending runs stay pending, which is what they were.\n */\n const acceptPending = async (): Promise<boolean> => {\n let outcome: CreationDrive_AcceptOutcome;\n try {\n outcome = await port.accept();\n } catch (error) {\n port.progress(`Could not accept the pending playbook runs now (${describeCaughtError(error)}); the next loop asks again`);\n return false;\n }\n if (outcome.disposition === CreationDriveAcceptDisposition.HELD_FOR_PERSON) return true;\n if (outcome.disposition === CreationDriveAcceptDisposition.ACCEPTED) {\n accepted += outcome.accepted ?? 0;\n if ((outcome.accepted ?? 0) > 0) port.progress(`Accepted ${outcome.accepted} playbook run(s) under the autonomy posture`);\n }\n return false;\n };\n /** Wait one poll interval, marking that the drive waited since its last loop. */\n const pause = async (): Promise<void> => {\n if (lastLoop) lastLoop = { ...lastLoop, waitedSince: true };\n await port.sleep(CREATION_DRIVE_POLL_INTERVAL_MS);\n };\n\n for (;;) {\n let feed: CreationConsole_Feed;\n let status: CreationDrive_Status;\n try {\n [feed, status] = await Promise.all([port.readFeed(), port.readStatus()]);\n } catch (error) {\n /*\n * A companion that does not answer, answers \"not yet\" (503: after a restart its first feed derivation is still\n * running), or answers late is a WAIT, bounded; anything else is a defect worth surfacing (review of 6fe527ed3).\n */\n if (!port.isCompanionUnreachable(error) && !port.isNotReadyYet(error) && !port.isClientTimeout(error)) throw error;\n unreachableSince ??= port.now();\n if (port.now() - unreachableSince >= CREATION_DRIVE_COMPANION_DOWN_LIMIT_MS) {\n return finish(CreationDriveStopRule.COMPANION_UNREACHABLE, `the companion has not answered since ${new Date(unreachableSince).toISOString()}: wildo local dev`);\n }\n port.progress(`Waiting: ${CreationDriveWaitReason.COMPANION_DOWN} — the companion does not answer yet; asking again`);\n await pause();\n continue;\n }\n if (unreachableSince !== undefined) {\n unreachableSince = undefined;\n // A restart only when the companion's start time moved: a slow answer or a cold derivation is no restart.\n if (companionStartedAt !== undefined && status.companionStartedAt !== companionStartedAt) {\n companionRestarts += 1;\n port.progress(`The companion restarted (now since ${status.companionStartedAt}); re-reading its state`);\n }\n } else if (companionStartedAt !== undefined && status.companionStartedAt !== companionStartedAt) {\n companionRestarts += 1;\n port.progress(`The companion restarted (now since ${status.companionStartedAt}); re-reading its state`);\n }\n companionStartedAt = status.companionStartedAt;\n /*\n * The goal is the requirements' to call (#3701): once the last loop chose to stop with nothing since, read where the\n * application stands, once for that loop. It derives the reading, so it is never read on a poll.\n */\n if (requirements === undefined && lastLoop?.stoppedBecause === LOOP_CHOSE_TO_STOP && !lastLoop.waitedSince) {\n try {\n requirements = { standing: await port.readRequirementsStanding() };\n } catch (error) {\n requirements = { unreadBecause: describeCaughtError(error) };\n }\n }\n const decide = () => decideCreationDriveStep({\n feed, status, elapsedMs: port.now() - startedAt, maximumMs: options.maximumMs, spentUsd, maximumUsd: options.maximumUsd,\n nowMs: port.now(), ...(networkWaitSinceMs === undefined ? {} : { networkWaitSinceMs }), ...(lastLoop ? { lastLoop } : {}),\n ...(requirements === undefined ? {} : { requirements }),\n });\n let decision = decide();\n /*\n * The spend is read from the run report, which derives from every row and the git history: read before a loop would\n * start (where the ceiling decides) and at the first step (the baseline), never on every poll of a long wait. The\n * ceilings are checked BETWEEN loops: a loop in flight is not cut, so one loop may overshoot them. A spend the report\n * cannot state (unreadable, or no USD figure) leaves the ceiling unenforced, and the result says so (`spendMeasured`).\n */\n if (spentAtStart === undefined || decision.action === CreationDriveAction.RUN_LOOP) {\n const total = await port.readSpentUsd().catch(() => undefined);\n spentAtStart ??= total;\n spentUsd = total === undefined || spentAtStart === undefined ? spentUsd : total - spentAtStart;\n decision = decide();\n }\n if (decision.action === CreationDriveAction.STOP) {\n /*\n * Whatever the system may accept is accepted before the drive stops, so a stop never leaves its work uncommitted.\n * The rule that fired stays the stop's; a posture that leaves acceptance to the person adds to what it waits for.\n */\n if (status.loopsInFlight === 0 && status.detachedRunsInFlight === 0 && (status.executionsInFlight ?? 0) === 0 && await acceptPending()) {\n return finish(decision.rule, `${decision.waitingFor}; and ${ACCEPTANCE_IS_YOURS}`, decision.providerAccountRefusal);\n }\n return finish(decision.rule, decision.waitingFor, decision.providerAccountRefusal);\n }\n if (decision.action === CreationDriveAction.WAIT) {\n networkWaitSinceMs = decision.reason === CreationDriveWaitReason.CODING_AGENT_CONNECTIVITY ? (networkWaitSinceMs ?? port.now()) : undefined;\n port.progress(`Waiting: ${decision.reason} — ${decision.detail}`);\n await pause();\n continue;\n }\n networkWaitSinceMs = undefined;\n\n loops += 1;\n requirements = undefined;\n port.progress(`Loop ${loops}: up to ${CREATION_DRIVE_ROUNDS_PER_LOOP} rounds toward the goal`);\n let result: Awaited<ReturnType<CreationDrivePort['runLoop']>>;\n try {\n result = await port.runLoop({\n goal: options.goal,\n maximumIterations: CREATION_DRIVE_ROUNDS_PER_LOOP,\n ...(options.fanOut !== undefined ? { fanOut: options.fanOut } : {}),\n ...(options.skipPreflight === true ? { skipPreflight: true } : {}),\n });\n } catch (error) {\n // The companion went away under the loop, the client stopped waiting while it goes on, or another loop holds the\n // subject: the next read decides (a restart is a wait, a running loop is a wait). Anything else is its refusal.\n if (port.isCompanionUnreachable(error) || port.isClientTimeout(error) || port.isAlreadyRunning(error) || port.isNotReadyYet(error)) {\n lastLoop = undefined;\n // Never straight back: a loop another process holds answers 409 at once, and asking again at once would spin.\n await port.sleep(CREATION_DRIVE_POLL_INTERVAL_MS);\n continue;\n }\n // A provider account's refusal answered as an error (a model call outside the loop's steps, #3204): the environment's, not a refusal of the loop.\n const accountRefusal = port.readProviderAccountRefusal(error);\n if (accountRefusal !== undefined) return refusedByProviderAccount(accountRefusal);\n return finish(CreationDriveStopRule.LOOP_REFUSED, describeCaughtError(error));\n }\n // A wait while lanes ran is not a round of work (#3848): it started nothing.\n rounds += result.steps.filter((step) => step.waitRationale === undefined).length;\n lastLoop = { stoppedBecause: result.stoppedBecause, waitedSince: false, ...(result.steps.at(-1)?.stopRationale ? { stopRationale: result.steps.at(-1)!.stopRationale! } : {}) };\n port.progress(`Loop ${loops} ran ${result.steps.length} round(s) and stopped: ${result.stoppedBecause}`);\n // A provider account's refusal (#3204) keeps its own rule even where the posture leaves acceptance to a person: it is stopped on at once, since the next loop is refused identically.\n if (result.stoppedBecause === LOOP_INTERRUPTED_BY_ENVIRONMENT && result.interruption?.providerAccountRefusal !== undefined) {\n if (await acceptPending()) return finish(CreationDriveStopRule.PROVIDER_ACCOUNT_REFUSED, `${describeModelProviderAccountRefusal(result.interruption.providerAccountRefusal)} Then run the drive again; and ${ACCEPTANCE_IS_YOURS}`, result.interruption.providerAccountRefusal);\n return refusedByProviderAccount(result.interruption.providerAccountRefusal);\n }\n if (await acceptPending()) return finish(CreationDriveStopRule.ACCEPTANCE_HELD_FOR_PERSON, ACCEPTANCE_IS_YOURS);\n if (result.stoppedBecause === LOOP_ALL_LANES_FAILED) {\n // The step that stopped it, named by the loop (#3848): steps settle out of order, so the last one may be another.\n const failedStep = result.stoppedAtIteration !== undefined ? result.steps.find((step) => step.iteration === result.stoppedAtIteration) : result.steps.at(-1);\n const failures = failedStep?.lanes.filter((lane) => lane.failure).map((lane) => `${lane.playbookRef}: ${lane.failure}`) ?? [];\n return finish(CreationDriveStopRule.LANES_FAILED, failures.join('; ') || 'every lane of the last round failed');\n }\n if (result.stoppedBecause === LOOP_INTERRUPTED_BY_ENVIRONMENT) {\n consecutiveInterruptions += 1;\n if (consecutiveInterruptions >= CREATION_DRIVE_MAXIMUM_CONSECUTIVE_INTERRUPTIONS) {\n return finish(CreationDriveStopRule.ENVIRONMENT_INTERRUPTED, result.interruption?.failure ?? 'the environment stopped the loop');\n }\n lastLoop = { ...lastLoop, waitedSince: true };\n } else {\n consecutiveInterruptions = 0;\n }\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"composed-provider-catalogue.d.ts","sourceRoot":"","sources":["../../../../src/services/credentials/composed-provider-catalogue.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AAEH,OAAO,EAEL,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC3B,MAAM,+CAA+C,CAAC;AAEvD,OAAO,EAGL,KAAK,8BAA8B,EACnC,KAAK,eAAe,EACrB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,uBAAuB,CAAC;AAE3E;;;;;;;;;;GAUG;AACH,MAAM,MAAM,yBAAyB,GAAG,WAAW,CAAC,6BAA6B,CAAC,UAAU,CAAC,CAAC,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C,WAAW,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC;IACrD,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,UAAU,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,OAAO,MAAM,CAAC,QAAQ,CAAC,CAAC;CAC7E"}
1
+ {"version":3,"file":"composed-provider-catalogue.d.ts","sourceRoot":"","sources":["../../../../src/services/credentials/composed-provider-catalogue.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AAEH,OAAO,EAEL,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC3B,MAAM,+CAA+C,CAAC;AAEvD,OAAO,EAGL,KAAK,8BAA8B,EACnC,KAAK,eAAe,EACrB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,uBAAuB,CAAC;AAE3E;;;;;;;;;;GAUG;AACH,MAAM,MAAM,yBAAyB,GAAG,WAAW,CAAC,6BAA6B,CAAC,UAAU,CAAC,CAAC,CAAC;AAE/F,+FAA+F;AAC/F,MAAM,WAAW,uBAAuB;IACtC,kEAAkE;IAClE,IAAI,EAAE,MAAM,CAAC;IACb,uDAAuD;IACvD,UAAU,EAAE,MAAM,CAAC;IACnB,4DAA4D;IAC5D,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;;OAMG;IACH,eAAe,CAAC,EAAE,IAAI,CAAC;CACxB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,6BAA6B;IAC5C,WAAW,EAAE,MAAM,CAAC;IACpB,6FAA6F;IAC7F,KAAK,EAAE,MAAM,CAAC;IACd,qEAAqE;IACrE,QAAQ,CAAC,EAAE,yBAAyB,CAAC;IACrC,oBAAoB,EAAE,SAAS,MAAM,EAAE,CAAC;IACxC;;;;;OAKG;IACH,OAAO,EAAE,SAAS,uBAAuB,EAAE,CA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BAAoB,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,GAAG,MAAM,CAAC,CAUjE;AAED;;;;;;;;GAQG;AACH,qBAAa,aAAc,YAAW,WAAW,CAAC,MAAM,CAAC;IAC3C,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,MAAM,WAAW,CAAC,MAAM,CAAC;IAE/D,IAAI,IAAI,IAAI,MAAM,CAAgC;IAClD,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IACzB,OAAO,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,WAAW,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI;IAM7G,IAAI,IAAI,UAAU,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;IAC/C,MAAM,IAAI,UAAU,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC;IACnD,OAAO,IAAI,UAAU,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC;IACrD,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,UAAU,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,OAAO,MAAM,CAAC,QAAQ,CAAC,CAAC;CAC7E"}
@@ -111,10 +111,23 @@ export function registerDiscoveredProviderContributions(contributions) {
111
111
  }
112
112
  continue;
113
113
  }
114
+ // One provider is discovered once per FACET (#2272): PostHog's backend module, then its browser module once per
115
+ // frontend service that declares it. A browser facet owns no server secret (`secretsContractShape: []` by
116
+ // construction), so it may never REPLACE a backend facet's entry: the last-registered facet used to win, which left
117
+ // a provider with a browser facet holding no secret slot at all. Every one of its keys was then dropped from every
118
+ // runtime's environment as "belonging to no provider", and its browser-public key was screened as a secret.
119
+ const registered = discoveredContributions.get(contribution.ref);
120
+ if (registered !== undefined && isFrontendOnlyContribution(contribution) && !isFrontendOnlyContribution(registered))
121
+ continue;
114
122
  discoveredContributions.set(contribution.ref, contribution);
115
123
  }
116
124
  catalogueGeneration += 1;
117
125
  }
126
+ /** Whether every runtime target of a contribution is a frontend service: a browser facet, which declares no secret. */
127
+ function isFrontendOnlyContribution(contribution) {
128
+ const targets = contribution.runtimeTargets ?? [];
129
+ return targets.length > 0 && targets.every((target) => target.kind === 'frontendService');
130
+ }
118
131
  /**
119
132
  * Fields discovery itself writes onto a contribution, so they cannot tell the engine's record from an override: the
120
133
  * runtime targets an application's own `providers.scopes` imply (`resolveScopeImpliedRuntimeTargets` replaces the
@@ -146,8 +159,7 @@ function canonicalContractOf(contribution) {
146
159
  * layer's, and the CLI does not load the frontend provider registries.
147
160
  */
148
161
  export function isEngineOwnContribution(contribution) {
149
- const targets = contribution.runtimeTargets ?? [];
150
- if (targets.length > 0 && targets.every((target) => target.kind === 'frontendService')) {
162
+ if (isFrontendOnlyContribution(contribution)) {
151
163
  return (contribution.secretsContractShape ?? []).length === 0 && contribution.otlpAuth === undefined;
152
164
  }
153
165
  engineOwnBackendContributionsByRef ??= new Map(engineBackendProviderContributions.map((own) => [own.ref, canonicalContractOf(own)]));
@@ -1 +1 @@
1
- {"version":3,"file":"composed-provider-catalogue.js","sourceRoot":"","sources":["../../../../src/services/credentials/composed-provider-catalogue.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AAEH,OAAO,EACL,6BAA6B,GAG9B,MAAM,+CAA+C,CAAC;AACvD,OAAO,EAAE,kCAAkC,EAAE,MAAM,iDAAiD,CAAC;AACrG,OAAO,EACL,yCAAyC,GAI1C,MAAM,+BAA+B,CAAC;AAqEvC,8EAA8E;AAC9E,oBAAoB;AACpB,8EAA8E;AAE9E,yDAAyD;AACzD,MAAM,uBAAuB,GAAG,IAAI,GAAG,EAAyC,CAAC;AAkBjF,iIAAiI;AACjI,MAAM,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;IACzF,+FAA+F;IAC/F,4EAA4E;IAC5E,IAAI,KAA8C,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IACjF,MAAM,KAAgD,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IACvF,OAAO,KAAiD,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;IAC1F,CAAC,MAAM,CAAC,QAAQ,CAAC,KAA8D,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;CAC3H","sourcesContent":["/**\n * The COMPOSED provider catalogue — the one place the CLI's secrets layer asks\n * \"which providers exist, and which environment variables carry their credentials?\".\n *\n * ## Why this module exists (issue #329, audit finding PL-3)\n *\n * Every secrets and environment path used to answer that question from\n * `EngineBackendProviderRegistry`, a map that by construction can only ever hold the engine's\n * own modules. While every provider was engine-shipped that was invisible. It stopped being\n * true with `providers/slack` (#341), the first provider shipped as its own package, and it\n * becomes routine once the loading slice (#330) lets an application compose one.\n *\n * The consequence was not a missing feature but a SILENT SECURITY REGRESSION, in two places at\n * once:\n *\n * - a package-shipped provider's key is attributable to no provider, so it is not classified\n * sensitive — it can land in a Kubernetes `ConfigMap` instead of a `Secret`;\n * - the per-runtime confinement filter allow-listed by the same registry and KEPT any key it\n * could not attribute, \"because it is configuration rather than a provider secret\" — so the\n * key was copied into every worker and minion environment, which is exactly what LLM-driven\n * minion code can read.\n *\n * Neither logged, warned or refused. That is why the plan orders this slice BEFORE the loader.\n *\n * ## The two sources, one shape\n *\n * | tier | source | carries |\n * |---|---|---|\n * | engine | `EngineBackendProviderRegistry.modules` | metadata, capabilities, `secretsContract`, and the full `protocols[]` runtime contracts |\n * | package / application | {@link ProviderCompanionContribution} | the same, MINUS the runtime contracts (a contribution is values-free DATA, so the CLI can read a provider whose backend module it cannot import) |\n *\n * **For CLASSIFICATION and CONFINEMENT, a contribution-sourced entry loses nothing, and that is\n * measured rather than assumed.** Across all 22 engine providers, every `secretRef` named by any\n * protocol's `runtimeContract` is already an `envVarName` declared in that same provider's\n * `secretsContract` — zero exceptions, 25 occurrences. So `secretsContractShape` is a COMPLETE\n * attribution source for those two questions: a package provider that ships only a `./companion`\n * export is classified and confined exactly as well as an engine one.\n *\n * **The converse does NOT hold, and one consumer depends on it.** The contract half is a strict\n * SUPERSET of what the bindings name — 13 engine contract keys are named by no binding at all\n * (every `IMMUDB_*`, `POSTHOG_PROJECT_API_KEY`, `BETTERSTACK_SOURCE_TOKEN`,\n * `ODOO_BASE_URL`/`_DB`/`_LOGIN`) — so anything that enumerates BINDINGS rather than the contract\n * sees less than the whole provider. `wildo config sync` builds the CI\n * `WILDO_SECRET_PROVIDER_ENV_*` block that way, so a contribution-sourced provider (zero bindings)\n * contributes zero CI secret keys. That gap is pre-existing for those 13 engine keys and is\n * tracked as issue #361; do not read the paragraph above as saying `protocolBindings: []` is\n * harmless everywhere. It is harmless for the two questions this module answers.\n *\n * ## Why registration is a door rather than a constructor argument\n *\n * Discovery of an application's provider packages necessarily runs AFTER this module is\n * imported — `credentials.schemas.ts` evaluates its sensitive-key set at module load, on the\n * first import of the CLI's credential layer. So composition cannot be an argument threaded\n * from a caller; it is a registration the discovery walk performs once it knows the\n * application, and every derived view recomputes from it. See {@link catalogueGeneration}.\n *\n * The engine tier is never registered and never removed: it is the floor.\n */\n\nimport {\n EngineBackendProviderRegistry,\n type BackendProtocolBinding,\n type BackendProviderModule,\n} from '@wildo-ai/external-connectors-private/backend';\nimport { engineBackendProviderContributions } from '@wildo-ai/external-connectors-private/companion';\nimport {\n resolveValidatedSaasProviderContributions,\n type DiscoveredProviderCompanionContribution,\n type ValidatedSaasProviderDiscovery,\n type WildoSaasConfig,\n} from '@wildo-ai/platform-config-lib';\nimport type { ProviderCompanionContribution } from '@wildo-ai/saas-models';\n\n/**\n * The identity half a catalogue entry carries: package, tier, vendor, origin.\n *\n * Taken from the CONTRIBUTION's inferred type rather than from `ProviderIdentity`, because the\n * two disagree on `origin`: the hand-written `ProviderIdentity` narrows it to the three-member\n * union (`catalogue` present iff `GENERATED`), while the contribution schema types the field\n * straight off `z.infer`, where it is the flat object the union's members all satisfy. This is\n * therefore the widest common shape — an engine module's `ProviderMetadata` assigns to it, and a\n * contribution's does too, with no cast on either side. Narrowing the wire record is territory A's\n * decision, not this slice's.\n */\nexport type ProviderCatalogueIdentity = NonNullable<ProviderCompanionContribution['identity']>;\n\n/** One secret a provider declares, values-free. Mirrors `ProviderSecretContractShapeEntry`. */\nexport interface ProviderCatalogueSecret {\n /** The provider-owned stable slug (the `secretsContract` key). */\n slug: string;\n /** The environment variable that carries the value. */\n envVarName: string;\n /** The provider refuses to boot without it once enabled. */\n required: boolean;\n description?: string;\n /**\n * The slot's value is NOT confidential, by the provider's own declaration (#1705): it holds a vendor\n * key made for browsers (`holdsBrowserPublicValue`) or a deployment host (`holdsDeploymentHost`).\n * An engine module says so on its contract, and a contribution carries both marks in its values-free\n * shape since #2579 (`describeProviderSecretsContractShape`), so sync and the backend's screen read a\n * package slot the same way.\n */\n notConfidential?: true;\n}\n\n/**\n * One provider as the CLI's secrets layer sees it, whatever tier shipped it.\n *\n * Deliberately NOT `BackendProviderModule`: that type is only constructible by importing a\n * provider's backend module, which is precisely what a package-shipped provider makes\n * impossible for tooling. This is the intersection the secrets layer actually needs.\n */\nexport interface ProviderSecretsCatalogueEntry {\n providerRef: string;\n /** Operator-facing label. Falls back to the ref — a contribution carries no display name. */\n label: string;\n /** Package / tier / vendor / origin, when the source declares it. */\n identity?: ProviderCatalogueIdentity;\n providerCapabilities: readonly string[];\n /**\n * Sorted by slug. Uniqueness on both slug and env-var name is enforced by\n * `ProviderCompanionContributionSchema` at the WIRE boundary — which this door is not — so the\n * ordering is re-established here rather than assumed, and uniqueness is a caller obligation\n * that {@link registerDiscoveredProviderContributions} deliberately does not re-parse.\n */\n secrets: readonly ProviderCatalogueSecret[];\n /**\n * The provider's protocol bindings — EMPTY for a contribution-sourced entry, because a\n * runtime contract is code and a contribution is data. Consumers that need bindings must\n * tolerate the empty case rather than treating it as an unknown provider.\n */\n protocolBindings: readonly BackendProtocolBinding[];\n /**\n * The OTLP auth hint: from a loadable module's `otlpAuth`, or from a contribution's, which carries the\n * same values-free declaration since #2579. Absent for a provider whose endpoint needs no auth.\n */\n otlpAuth?: BackendProviderModule['otlpAuth'];\n}\n\n// ---------------------------------------------------------------------------\n// Composition state\n// ---------------------------------------------------------------------------\n\n/** Registered non-engine contributions, keyed by ref. */\nconst discoveredContributions = new Map<string, ProviderCompanionContribution>();\n\n/**\n * A contribution that names a ref the ENGINE tier already owns and does not come from the engine (#3243).\n *\n * The contribution is ignored either way (the engine tier is the floor). What this records is the case worth telling\n * someone about: a package or an application module that claims an engine provider's ref, so whatever it declares\n * (secret slots, capabilities) is silently not what the CLI uses.\n */\nexport interface ContributionShadowingEngineProvider {\n /** The engine provider's ref the contribution claims. */\n readonly providerRef: string;\n /** The package the contribution says it comes from, when its identity names one. */\n readonly declaredPackageName?: string;\n /** The package root discovery read it from, when the caller was discovery (it carries the owner). */\n readonly ownerPackageRoot?: string;\n}\n\n/** The ignored, NON-engine contributions this process registered, by ref. Read by `wildo local doctor` and the dev preflight. */\nconst contributionsShadowingEngineProviders = new Map<string, ContributionShadowingEngineProvider>();\n\n/**\n * Bumped by every registration and reset. Derived views memoise against it, so a view computed\n * before discovery cannot survive discovery — the stale-singleton failure this slice removes.\n */\nlet catalogueGeneration = 0;\n\n/**\n * Register provider contributions discovered outside the engine registry.\n *\n * This is the door the package-provider discovery walk (#330) calls once it has resolved an\n * application's declared provider packages and read their `./companion` exports. Idempotent by\n * ref: registering the same ref twice replaces the entry rather than duplicating it, so a\n * re-run of discovery is safe.\n *\n * A ref that the ENGINE already ships is ignored, deliberately: the engine tier is the floor, and a package silently\n * shadowing an engine provider's secret contract is exactly the substitution this layer must not perform.\n *\n * ## Ignored, and said only when someone shadows (#3243)\n *\n * This used to print one `[provider-catalogue] … is ignored` line per collision on stderr, in EVERY process. Every\n * application collides on every engine provider, because discovery admits the engine's own provider barrel\n * (`@wildo-ai/external-connectors-private/companion`, #358) and every frontend re-exports the engine's frontend\n * contributions: so each `wildo` verb in app-creation-test-007 began with 19 such lines, for anthropic … twilio,\n * none of which anybody had overridden. Agents had to `grep -v` every call.\n *\n * A collision is silent only when the contribution IS the engine's own, judged by COMPARISON\n * ({@link isEngineOwnContribution}), never by what the contribution says about itself: an override built by spreading\n * the engine's contribution and changing its secrets contract still declares origin ENGINE and tier MAIN, and is\n * exactly the case worth reporting. Every other collision is recorded, never printed here: `wildo local doctor` and\n * the `wildo local dev` preflight report it once (`checkProviderContributionsShadowingEngine`), naming the provider\n * and where the contribution came from. Printing it here put it on every verb, which is how the real case became\n * noise nobody read.\n */\nexport function registerDiscoveredProviderContributions(\n contributions: readonly ProviderCompanionContribution[],\n): void {\n for (const contribution of contributions) {\n if (EngineBackendProviderRegistry.getProviderByRef(contribution.ref as never)) {\n if (!isEngineOwnContribution(contribution)) {\n const ownerPackageRoot = (contribution as Partial<DiscoveredProviderCompanionContribution>).owner?.packageRoot;\n contributionsShadowingEngineProviders.set(contribution.ref, {\n providerRef: contribution.ref,\n ...(contribution.identity?.packageName === undefined ? {} : { declaredPackageName: contribution.identity.packageName }),\n ...(ownerPackageRoot === undefined ? {} : { ownerPackageRoot }),\n });\n }\n continue;\n }\n discoveredContributions.set(contribution.ref, contribution);\n }\n catalogueGeneration += 1;\n}\n\n/**\n * Fields discovery itself writes onto a contribution, so they cannot tell the engine's record from an override: the\n * runtime targets an application's own `providers.scopes` imply (`resolveScopeImpliedRuntimeTargets` replaces the\n * engine barrel's defaults), and the owner discovery read it from.\n */\nconst DISCOVERY_OWNED_CONTRIBUTION_FIELDS: ReadonlySet<string> = new Set(['runtimeTargets', 'owner']);\n\n/** A value as canonical JSON: object keys sorted, so two equal records compare equal whatever order built them. */\nfunction canonicalJson(value: unknown): string {\n return JSON.stringify(value, (_key, item: unknown) => (\n item !== null && typeof item === 'object' && !Array.isArray(item)\n ? Object.fromEntries(Object.entries(item as Record<string, unknown>).sort(([left], [right]) => left.localeCompare(right)))\n : item\n ));\n}\n\n/** The engine backend barrel's own contributions, by ref: the records discovery reads off `./companion`. */\nlet engineOwnBackendContributionsByRef: ReadonlyMap<string, string> | undefined;\n\nfunction canonicalContractOf(contribution: ProviderCompanionContribution): string {\n return canonicalJson(Object.fromEntries(Object.entries(contribution).filter(([field]) => !DISCOVERY_OWNED_CONTRIBUTION_FIELDS.has(field))));\n}\n\n/**\n * Whether a contribution colliding with an engine provider's ref is the engine's OWN record, so ignoring it loses\n * nothing (#3243). Decided by comparison, never by the contribution's declared origin, which an override keeps.\n *\n * - **A backend facet** (any runtime target outside a frontend service) must equal the engine barrel's contribution\n * for that ref (`engineBackendProviderContributions`) on every field it carries (identity, capabilities, protocols,\n * the secrets-contract shape and its protocol slots, the compliance profile), the fields discovery writes excepted.\n * - **A frontend facet** (every target a frontend service): the engine's frontend contributions declare no secret slot\n * and no OTLP auth (a browser-safe provider owns no server secret), and those are the only fields this catalogue\n * would take from it. So it is the engine's own when it declares neither; one that does declares a secrets contract\n * the catalogue ignores, which is a shadow. Its browser fields are the frontend runtime's to compose, not this\n * layer's, and the CLI does not load the frontend provider registries.\n */\nexport function isEngineOwnContribution(contribution: ProviderCompanionContribution): boolean {\n const targets = contribution.runtimeTargets ?? [];\n if (targets.length > 0 && targets.every((target) => target.kind === 'frontendService')) {\n return (contribution.secretsContractShape ?? []).length === 0 && contribution.otlpAuth === undefined;\n }\n engineOwnBackendContributionsByRef ??= new Map(engineBackendProviderContributions.map((own) => [own.ref, canonicalContractOf(own)]));\n return engineOwnBackendContributionsByRef.get(contribution.ref) === canonicalContractOf(contribution);\n}\n\n/**\n * The non-engine contributions this process registered that claim an engine provider's ref, sorted by ref (#3243).\n *\n * Empty until discovery ran ({@link resolveAndRegisterSaasProviderContributions}); the reporting check runs discovery\n * first for that reason.\n */\nexport function listContributionsShadowingEngineProviders(): ContributionShadowingEngineProvider[] {\n return [...contributionsShadowingEngineProviders.values()].sort((left, right) => left.providerRef.localeCompare(right.providerRef));\n}\n\n/**\n * Discover an application's provider contributions AND register them, as one step.\n *\n * ## Why the pairing, and why here (2026-09-09)\n *\n * `resolveValidatedSaasProviderContributions` already pairs the WALK with the VALIDATION, for the\n * reason its own JSDoc gives: three correct call sites with nothing making a fourth correct is the\n * shape `.claude/rules/invariant-call-site-enumeration.md` is about. This is the same defect one\n * step further along — every CLI caller resolved contributions and none of them registered the\n * result, so {@link getComposedProviderSecretsCatalogue} was ENGINE-TIER ONLY in every CLI process\n * that had, moments earlier, read the full catalogue off disk.\n *\n * What that cost is not abstract. {@link filterProviderEnvToScope} attributes a `providerEnv` key\n * by asking this catalogue which provider declares it, and drops what it cannot attribute. So an\n * application that declares `asana` in `providers.scopes.backend`, and authors the\n * `ASANA_CLIENT_ID` / `ASANA_CLIENT_SECRET` its generated secrets contract names, had both keys\n * dropped from the backend runtime's env — with a warning saying they \"belong to no provider the\n * CLI can see\", naming `asana` in the very list of providers the runtime was scoped to. Measured\n * 2026-09-09 on Wonder Todos: the drop reached every one of the catalogue-tier providers, which is\n * the entire OAuth2 connect lane, because a provider registration cannot reach the process that\n * performs the authorization-code exchange.\n *\n * It read as an authoring mistake and was a wiring gap. The engine tier worked throughout, which is\n * exactly why it survived: every provider the framework ships is registered by the floor, so the\n * only population that could reveal this is the one nobody had authored a secret for yet.\n *\n * Registration is idempotent per ref and additive, so calling this more than once in a process is\n * safe; the engine tier always wins a collision (see {@link registerDiscoveredProviderContributions}).\n */\nexport async function resolveAndRegisterSaasProviderContributions(input: {\n saasRoot: string;\n // `systemsOfRecord` decides which facet modules discovery records and whether the facet library is missing (#2013):\n // named so a caller narrowing the config keeps it in view.\n saasConfig: Pick<\n WildoSaasConfig,\n 'modules' | 'services' | 'libraries' | 'minions' | 'providers' | 'workers' | 'systemsOfRecord'\n >;\n}): Promise<ValidatedSaasProviderDiscovery> {\n const discovery = await resolveValidatedSaasProviderContributions(input);\n // Only CONTRIBUTIONS are registered: an augmentation (#1672) owns no secret, so it has no place in the\n // secrets catalogue. It rides the returned discovery to the artifact and the lock instead.\n registerDiscoveredProviderContributions(discovery.contributions);\n return discovery;\n}\n\n/**\n * Drop every registered contribution. The engine tier is untouched — it is not registered.\n *\n * Used when discovery re-runs for a different application, and by tests. A CLI process that\n * handles one application never needs it.\n */\nexport function resetDiscoveredProviderContributions(): void {\n discoveredContributions.clear();\n contributionsShadowingEngineProviders.clear();\n catalogueGeneration += 1;\n}\n\n// ---------------------------------------------------------------------------\n// The composed view\n// ---------------------------------------------------------------------------\n\nfunction entryFromEngineModule(module: BackendProviderModule): ProviderSecretsCatalogueEntry {\n const secretsContract = module.secretsContract as Record<\n string,\n { envVarName: string; required?: boolean; description?: string; holdsBrowserPublicValue?: true; holdsDeploymentHost?: true }\n >;\n return {\n providerRef: module.metadata.ref,\n label: module.metadata.displayName ?? module.metadata.ref,\n identity: {\n packageName: module.metadata.packageName,\n tier: module.metadata.tier,\n vendor: module.metadata.vendor,\n origin: module.metadata.origin,\n },\n providerCapabilities: [...module.providerCapabilities],\n secrets: Object.entries(secretsContract ?? {})\n .map(([slug, entry]) => ({\n slug,\n envVarName: entry.envVarName,\n required: Boolean(entry.required),\n description: entry.description,\n ...(entry.holdsBrowserPublicValue === true || entry.holdsDeploymentHost === true ? { notConfidential: true as const } : {}),\n }))\n .sort((left, right) => left.slug.localeCompare(right.slug)),\n protocolBindings: module.protocols,\n otlpAuth: module.otlpAuth,\n };\n}\n\nfunction entryFromContribution(\n contribution: ProviderCompanionContribution,\n): ProviderSecretsCatalogueEntry {\n return {\n providerRef: contribution.ref,\n // A contribution carries `identity` but no display name — the metadata field is\n // frontend-facing copy and stays out of the values-free wire record. The ref is the honest\n // fallback, and it is what an unnamed engine provider gets too.\n label: contribution.ref,\n identity: contribution.identity,\n providerCapabilities: contribution.providerCapabilities ?? [],\n secrets: (contribution.secretsContractShape ?? [])\n .map((entry) => ({\n slug: entry.slug,\n envVarName: entry.envVarName,\n required: entry.required,\n description: entry.description,\n // A package slot's not-confidential mark rides the contribution since #2579, as an engine module's does.\n ...(entry.holdsBrowserPublicValue === true || entry.holdsDeploymentHost === true ? { notConfidential: true as const } : {}),\n }))\n // Re-sorted rather than trusted: the schema orders these, but this door accepts a\n // contribution object, not a parsed wire record, so the ordering is only guaranteed where it\n // is performed. The engine branch sorts for the same reason.\n .sort((left, right) => left.slug.localeCompare(right.slug)),\n protocolBindings: [],\n // A package-shipped telemetry provider's header (#2579): without it, its telemetry exported with no credential.\n ...(contribution.otlpAuth === undefined ? {} : { otlpAuth: contribution.otlpAuth }),\n };\n}\n\nlet cachedCatalogue: ReadonlyMap<string, ProviderSecretsCatalogueEntry> | undefined;\nlet cachedCatalogueGeneration = -1;\n\n/**\n * Every provider the CLI can currently see: the engine tier, plus whatever discovery has\n * registered. Insertion order is engine-first, then registration order, so callers that sort\n * (the setup catalogue) and callers that do not (classification) both stay deterministic.\n */\nexport function getComposedProviderSecretsCatalogue(): ReadonlyMap<string, ProviderSecretsCatalogueEntry> {\n if (cachedCatalogue && cachedCatalogueGeneration === catalogueGeneration) return cachedCatalogue;\n\n const catalogue = new Map<string, ProviderSecretsCatalogueEntry>();\n for (const module of EngineBackendProviderRegistry.modules.values()) {\n catalogue.set(module.metadata.ref, entryFromEngineModule(module));\n }\n for (const contribution of discoveredContributions.values()) {\n if (catalogue.has(contribution.ref)) continue;\n catalogue.set(contribution.ref, entryFromContribution(contribution));\n }\n\n cachedCatalogue = catalogue;\n cachedCatalogueGeneration = catalogueGeneration;\n return catalogue;\n}\n\n/** One provider by ref, or `undefined` when nothing in the composed catalogue claims it. */\nexport function getComposedProviderEntry(providerRef: string): ProviderSecretsCatalogueEntry | undefined {\n return getComposedProviderSecretsCatalogue().get(providerRef);\n}\n\n/**\n * Memoise a value derived from the composed catalogue, invalidated by registration.\n *\n * The point is not speed. It is that a derived view CANNOT be a module-load snapshot: the\n * previous `PROVIDER_SENSITIVE_ENV_KEYS` was computed the moment its module was imported, which\n * is always before discovery could have run, so a composed catalogue would have been silently\n * ignored by the very classification it exists to feed.\n */\nexport function memoiseOverCatalogue<T>(compute: () => T): () => T {\n let cached: T | undefined;\n let cachedGeneration = -1;\n return () => {\n if (cachedGeneration !== catalogueGeneration) {\n cached = compute();\n cachedGeneration = catalogueGeneration;\n }\n return cached as T;\n };\n}\n\n/**\n * A `ReadonlySet<string>` whose contents are recomputed from the composed catalogue on every\n * read, rather than frozen when the module was imported.\n *\n * Exists so `PROVIDER_SENSITIVE_ENV_KEYS` and `SENSITIVE_ENV_KEYS` can keep their exported\n * NAMES and their `.has()` shape while becoming composition-aware — their consumers\n * (`k8s-secrets-generator.service.ts`, `sync.command.ts`) live outside this slice's territory\n * and must not need an edit to stay correct.\n */\nexport class LiveEnvKeySet implements ReadonlySet<string> {\n constructor(private readonly resolve: () => ReadonlySet<string>) {}\n\n get size(): number { return this.resolve().size; }\n has(key: string): boolean { return this.resolve().has(key); }\n forEach(callback: (value: string, value2: string, set: ReadonlySet<string>) => void, thisArg?: unknown): void {\n for (const key of this.resolve()) callback.call(thisArg, key, key, this);\n }\n // Return types are read OFF `ReadonlySet` rather than spelled as `IterableIterator`: the\n // standard library renamed these to `SetIterator` (which also carries `[Symbol.dispose]`) in a\n // recent lib, so a spelled-out type breaks on one lib version or the other.\n keys(): ReturnType<ReadonlySet<string>['keys']> { return this.resolve().keys(); }\n values(): ReturnType<ReadonlySet<string>['values']> { return this.resolve().values(); }\n entries(): ReturnType<ReadonlySet<string>['entries']> { return this.resolve().entries(); }\n [Symbol.iterator](): ReturnType<ReadonlySet<string>[typeof Symbol.iterator]> { return this.resolve()[Symbol.iterator](); }\n}\n"]}
1
+ {"version":3,"file":"composed-provider-catalogue.js","sourceRoot":"","sources":["../../../../src/services/credentials/composed-provider-catalogue.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;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and which environment variables carry their credentials?\".\n *\n * ## Why this module exists (issue #329, audit finding PL-3)\n *\n * Every secrets and environment path used to answer that question from\n * `EngineBackendProviderRegistry`, a map that by construction can only ever hold the engine's\n * own modules. While every provider was engine-shipped that was invisible. It stopped being\n * true with `providers/slack` (#341), the first provider shipped as its own package, and it\n * becomes routine once the loading slice (#330) lets an application compose one.\n *\n * The consequence was not a missing feature but a SILENT SECURITY REGRESSION, in two places at\n * once:\n *\n * - a package-shipped provider's key is attributable to no provider, so it is not classified\n * sensitive — it can land in a Kubernetes `ConfigMap` instead of a `Secret`;\n * - the per-runtime confinement filter allow-listed by the same registry and KEPT any key it\n * could not attribute, \"because it is configuration rather than a provider secret\" — so the\n * key was copied into every worker and minion environment, which is exactly what LLM-driven\n * minion code can read.\n *\n * Neither logged, warned or refused. That is why the plan orders this slice BEFORE the loader.\n *\n * ## The two sources, one shape\n *\n * | tier | source | carries |\n * |---|---|---|\n * | engine | `EngineBackendProviderRegistry.modules` | metadata, capabilities, `secretsContract`, and the full `protocols[]` runtime contracts |\n * | package / application | {@link ProviderCompanionContribution} | the same, MINUS the runtime contracts (a contribution is values-free DATA, so the CLI can read a provider whose backend module it cannot import) |\n *\n * **For CLASSIFICATION and CONFINEMENT, a contribution-sourced entry loses nothing, and that is\n * measured rather than assumed.** Across all 22 engine providers, every `secretRef` named by any\n * protocol's `runtimeContract` is already an `envVarName` declared in that same provider's\n * `secretsContract` — zero exceptions, 25 occurrences. So `secretsContractShape` is a COMPLETE\n * attribution source for those two questions: a package provider that ships only a `./companion`\n * export is classified and confined exactly as well as an engine one.\n *\n * **The converse does NOT hold, and one consumer depends on it.** The contract half is a strict\n * SUPERSET of what the bindings name — 13 engine contract keys are named by no binding at all\n * (every `IMMUDB_*`, `POSTHOG_PROJECT_API_KEY`, `BETTERSTACK_SOURCE_TOKEN`,\n * `ODOO_BASE_URL`/`_DB`/`_LOGIN`) — so anything that enumerates BINDINGS rather than the contract\n * sees less than the whole provider. `wildo config sync` builds the CI\n * `WILDO_SECRET_PROVIDER_ENV_*` block that way, so a contribution-sourced provider (zero bindings)\n * contributes zero CI secret keys. That gap is pre-existing for those 13 engine keys and is\n * tracked as issue #361; do not read the paragraph above as saying `protocolBindings: []` is\n * harmless everywhere. It is harmless for the two questions this module answers.\n *\n * ## Why registration is a door rather than a constructor argument\n *\n * Discovery of an application's provider packages necessarily runs AFTER this module is\n * imported — `credentials.schemas.ts` evaluates its sensitive-key set at module load, on the\n * first import of the CLI's credential layer. So composition cannot be an argument threaded\n * from a caller; it is a registration the discovery walk performs once it knows the\n * application, and every derived view recomputes from it. See {@link catalogueGeneration}.\n *\n * The engine tier is never registered and never removed: it is the floor.\n */\n\nimport {\n EngineBackendProviderRegistry,\n type BackendProtocolBinding,\n type BackendProviderModule,\n} from '@wildo-ai/external-connectors-private/backend';\nimport { engineBackendProviderContributions } from '@wildo-ai/external-connectors-private/companion';\nimport {\n resolveValidatedSaasProviderContributions,\n type DiscoveredProviderCompanionContribution,\n type ValidatedSaasProviderDiscovery,\n type WildoSaasConfig,\n} from '@wildo-ai/platform-config-lib';\nimport type { ProviderCompanionContribution } from '@wildo-ai/saas-models';\n\n/**\n * The identity half a catalogue entry carries: package, tier, vendor, origin.\n *\n * Taken from the CONTRIBUTION's inferred type rather than from `ProviderIdentity`, because the\n * two disagree on `origin`: the hand-written `ProviderIdentity` narrows it to the three-member\n * union (`catalogue` present iff `GENERATED`), while the contribution schema types the field\n * straight off `z.infer`, where it is the flat object the union's members all satisfy. This is\n * therefore the widest common shape — an engine module's `ProviderMetadata` assigns to it, and a\n * contribution's does too, with no cast on either side. Narrowing the wire record is territory A's\n * decision, not this slice's.\n */\nexport type ProviderCatalogueIdentity = NonNullable<ProviderCompanionContribution['identity']>;\n\n/** One secret a provider declares, values-free. Mirrors `ProviderSecretContractShapeEntry`. */\nexport interface ProviderCatalogueSecret {\n /** The provider-owned stable slug (the `secretsContract` key). */\n slug: string;\n /** The environment variable that carries the value. */\n envVarName: string;\n /** The provider refuses to boot without it once enabled. */\n required: boolean;\n description?: string;\n /**\n * The slot's value is NOT confidential, by the provider's own declaration (#1705): it holds a vendor\n * key made for browsers (`holdsBrowserPublicValue`) or a deployment host (`holdsDeploymentHost`).\n * An engine module says so on its contract, and a contribution carries both marks in its values-free\n * shape since #2579 (`describeProviderSecretsContractShape`), so sync and the backend's screen read a\n * package slot the same way.\n */\n notConfidential?: true;\n}\n\n/**\n * One provider as the CLI's secrets layer sees it, whatever tier shipped it.\n *\n * Deliberately NOT `BackendProviderModule`: that type is only constructible by importing a\n * provider's backend module, which is precisely what a package-shipped provider makes\n * impossible for tooling. This is the intersection the secrets layer actually needs.\n */\nexport interface ProviderSecretsCatalogueEntry {\n providerRef: string;\n /** Operator-facing label. Falls back to the ref — a contribution carries no display name. */\n label: string;\n /** Package / tier / vendor / origin, when the source declares it. */\n identity?: ProviderCatalogueIdentity;\n providerCapabilities: readonly string[];\n /**\n * Sorted by slug. Uniqueness on both slug and env-var name is enforced by\n * `ProviderCompanionContributionSchema` at the WIRE boundary — which this door is not — so the\n * ordering is re-established here rather than assumed, and uniqueness is a caller obligation\n * that {@link registerDiscoveredProviderContributions} deliberately does not re-parse.\n */\n secrets: readonly ProviderCatalogueSecret[];\n /**\n * The provider's protocol bindings — EMPTY for a contribution-sourced entry, because a\n * runtime contract is code and a contribution is data. Consumers that need bindings must\n * tolerate the empty case rather than treating it as an unknown provider.\n */\n protocolBindings: readonly BackendProtocolBinding[];\n /**\n * The OTLP auth hint: from a loadable module's `otlpAuth`, or from a contribution's, which carries the\n * same values-free declaration since #2579. Absent for a provider whose endpoint needs no auth.\n */\n otlpAuth?: BackendProviderModule['otlpAuth'];\n}\n\n// ---------------------------------------------------------------------------\n// Composition state\n// ---------------------------------------------------------------------------\n\n/** Registered non-engine contributions, keyed by ref. */\nconst discoveredContributions = new Map<string, ProviderCompanionContribution>();\n\n/**\n * A contribution that names a ref the ENGINE tier already owns and does not come from the engine (#3243).\n *\n * The contribution is ignored either way (the engine tier is the floor). What this records is the case worth telling\n * someone about: a package or an application module that claims an engine provider's ref, so whatever it declares\n * (secret slots, capabilities) is silently not what the CLI uses.\n */\nexport interface ContributionShadowingEngineProvider {\n /** The engine provider's ref the contribution claims. */\n readonly providerRef: string;\n /** The package the contribution says it comes from, when its identity names one. */\n readonly declaredPackageName?: string;\n /** The package root discovery read it from, when the caller was discovery (it carries the owner). */\n readonly ownerPackageRoot?: string;\n}\n\n/** The ignored, NON-engine contributions this process registered, by ref. Read by `wildo local doctor` and the dev preflight. */\nconst contributionsShadowingEngineProviders = new Map<string, ContributionShadowingEngineProvider>();\n\n/**\n * Bumped by every registration and reset. Derived views memoise against it, so a view computed\n * before discovery cannot survive discovery — the stale-singleton failure this slice removes.\n */\nlet catalogueGeneration = 0;\n\n/**\n * Register provider contributions discovered outside the engine registry.\n *\n * This is the door the package-provider discovery walk (#330) calls once it has resolved an\n * application's declared provider packages and read their `./companion` exports. Idempotent by\n * ref: registering the same ref twice replaces the entry rather than duplicating it, so a\n * re-run of discovery is safe.\n *\n * A ref that the ENGINE already ships is ignored, deliberately: the engine tier is the floor, and a package silently\n * shadowing an engine provider's secret contract is exactly the substitution this layer must not perform.\n *\n * ## Ignored, and said only when someone shadows (#3243)\n *\n * This used to print one `[provider-catalogue] … is ignored` line per collision on stderr, in EVERY process. Every\n * application collides on every engine provider, because discovery admits the engine's own provider barrel\n * (`@wildo-ai/external-connectors-private/companion`, #358) and every frontend re-exports the engine's frontend\n * contributions: so each `wildo` verb in app-creation-test-007 began with 19 such lines, for anthropic … twilio,\n * none of which anybody had overridden. Agents had to `grep -v` every call.\n *\n * A collision is silent only when the contribution IS the engine's own, judged by COMPARISON\n * ({@link isEngineOwnContribution}), never by what the contribution says about itself: an override built by spreading\n * the engine's contribution and changing its secrets contract still declares origin ENGINE and tier MAIN, and is\n * exactly the case worth reporting. Every other collision is recorded, never printed here: `wildo local doctor` and\n * the `wildo local dev` preflight report it once (`checkProviderContributionsShadowingEngine`), naming the provider\n * and where the contribution came from. Printing it here put it on every verb, which is how the real case became\n * noise nobody read.\n */\nexport function registerDiscoveredProviderContributions(\n contributions: readonly ProviderCompanionContribution[],\n): void {\n for (const contribution of contributions) {\n if (EngineBackendProviderRegistry.getProviderByRef(contribution.ref as never)) {\n if (!isEngineOwnContribution(contribution)) {\n const ownerPackageRoot = (contribution as Partial<DiscoveredProviderCompanionContribution>).owner?.packageRoot;\n contributionsShadowingEngineProviders.set(contribution.ref, {\n providerRef: contribution.ref,\n ...(contribution.identity?.packageName === undefined ? {} : { declaredPackageName: contribution.identity.packageName }),\n ...(ownerPackageRoot === undefined ? {} : { ownerPackageRoot }),\n });\n }\n continue;\n }\n // One provider is discovered once per FACET (#2272): PostHog's backend module, then its browser module once per\n // frontend service that declares it. A browser facet owns no server secret (`secretsContractShape: []` by\n // construction), so it may never REPLACE a backend facet's entry: the last-registered facet used to win, which left\n // a provider with a browser facet holding no secret slot at all. Every one of its keys was then dropped from every\n // runtime's environment as \"belonging to no provider\", and its browser-public key was screened as a secret.\n const registered = discoveredContributions.get(contribution.ref);\n if (registered !== undefined && isFrontendOnlyContribution(contribution) && !isFrontendOnlyContribution(registered)) continue;\n discoveredContributions.set(contribution.ref, contribution);\n }\n catalogueGeneration += 1;\n}\n\n/** Whether every runtime target of a contribution is a frontend service: a browser facet, which declares no secret. */\nfunction isFrontendOnlyContribution(contribution: ProviderCompanionContribution): boolean {\n const targets = contribution.runtimeTargets ?? [];\n return targets.length > 0 && targets.every((target) => target.kind === 'frontendService');\n}\n\n/**\n * Fields discovery itself writes onto a contribution, so they cannot tell the engine's record from an override: the\n * runtime targets an application's own `providers.scopes` imply (`resolveScopeImpliedRuntimeTargets` replaces the\n * engine barrel's defaults), and the owner discovery read it from.\n */\nconst DISCOVERY_OWNED_CONTRIBUTION_FIELDS: ReadonlySet<string> = new Set(['runtimeTargets', 'owner']);\n\n/** A value as canonical JSON: object keys sorted, so two equal records compare equal whatever order built them. */\nfunction canonicalJson(value: unknown): string {\n return JSON.stringify(value, (_key, item: unknown) => (\n item !== null && typeof item === 'object' && !Array.isArray(item)\n ? Object.fromEntries(Object.entries(item as Record<string, unknown>).sort(([left], [right]) => left.localeCompare(right)))\n : item\n ));\n}\n\n/** The engine backend barrel's own contributions, by ref: the records discovery reads off `./companion`. */\nlet engineOwnBackendContributionsByRef: ReadonlyMap<string, string> | undefined;\n\nfunction canonicalContractOf(contribution: ProviderCompanionContribution): string {\n return canonicalJson(Object.fromEntries(Object.entries(contribution).filter(([field]) => !DISCOVERY_OWNED_CONTRIBUTION_FIELDS.has(field))));\n}\n\n/**\n * Whether a contribution colliding with an engine provider's ref is the engine's OWN record, so ignoring it loses\n * nothing (#3243). Decided by comparison, never by the contribution's declared origin, which an override keeps.\n *\n * - **A backend facet** (any runtime target outside a frontend service) must equal the engine barrel's contribution\n * for that ref (`engineBackendProviderContributions`) on every field it carries (identity, capabilities, protocols,\n * the secrets-contract shape and its protocol slots, the compliance profile), the fields discovery writes excepted.\n * - **A frontend facet** (every target a frontend service): the engine's frontend contributions declare no secret slot\n * and no OTLP auth (a browser-safe provider owns no server secret), and those are the only fields this catalogue\n * would take from it. So it is the engine's own when it declares neither; one that does declares a secrets contract\n * the catalogue ignores, which is a shadow. Its browser fields are the frontend runtime's to compose, not this\n * layer's, and the CLI does not load the frontend provider registries.\n */\nexport function isEngineOwnContribution(contribution: ProviderCompanionContribution): boolean {\n if (isFrontendOnlyContribution(contribution)) {\n return (contribution.secretsContractShape ?? []).length === 0 && contribution.otlpAuth === undefined;\n }\n engineOwnBackendContributionsByRef ??= new Map(engineBackendProviderContributions.map((own) => [own.ref, canonicalContractOf(own)]));\n return engineOwnBackendContributionsByRef.get(contribution.ref) === canonicalContractOf(contribution);\n}\n\n/**\n * The non-engine contributions this process registered that claim an engine provider's ref, sorted by ref (#3243).\n *\n * Empty until discovery ran ({@link resolveAndRegisterSaasProviderContributions}); the reporting check runs discovery\n * first for that reason.\n */\nexport function listContributionsShadowingEngineProviders(): ContributionShadowingEngineProvider[] {\n return [...contributionsShadowingEngineProviders.values()].sort((left, right) => left.providerRef.localeCompare(right.providerRef));\n}\n\n/**\n * Discover an application's provider contributions AND register them, as one step.\n *\n * ## Why the pairing, and why here (2026-09-09)\n *\n * `resolveValidatedSaasProviderContributions` already pairs the WALK with the VALIDATION, for the\n * reason its own JSDoc gives: three correct call sites with nothing making a fourth correct is the\n * shape `.claude/rules/invariant-call-site-enumeration.md` is about. This is the same defect one\n * step further along — every CLI caller resolved contributions and none of them registered the\n * result, so {@link getComposedProviderSecretsCatalogue} was ENGINE-TIER ONLY in every CLI process\n * that had, moments earlier, read the full catalogue off disk.\n *\n * What that cost is not abstract. {@link filterProviderEnvToScope} attributes a `providerEnv` key\n * by asking this catalogue which provider declares it, and drops what it cannot attribute. So an\n * application that declares `asana` in `providers.scopes.backend`, and authors the\n * `ASANA_CLIENT_ID` / `ASANA_CLIENT_SECRET` its generated secrets contract names, had both keys\n * dropped from the backend runtime's env — with a warning saying they \"belong to no provider the\n * CLI can see\", naming `asana` in the very list of providers the runtime was scoped to. Measured\n * 2026-09-09 on Wonder Todos: the drop reached every one of the catalogue-tier providers, which is\n * the entire OAuth2 connect lane, because a provider registration cannot reach the process that\n * performs the authorization-code exchange.\n *\n * It read as an authoring mistake and was a wiring gap. The engine tier worked throughout, which is\n * exactly why it survived: every provider the framework ships is registered by the floor, so the\n * only population that could reveal this is the one nobody had authored a secret for yet.\n *\n * Registration is idempotent per ref and additive, so calling this more than once in a process is\n * safe; the engine tier always wins a collision (see {@link registerDiscoveredProviderContributions}).\n */\nexport async function resolveAndRegisterSaasProviderContributions(input: {\n saasRoot: string;\n // `systemsOfRecord` decides which facet modules discovery records and whether the facet library is missing (#2013):\n // named so a caller narrowing the config keeps it in view.\n saasConfig: Pick<\n WildoSaasConfig,\n 'modules' | 'services' | 'libraries' | 'minions' | 'providers' | 'workers' | 'systemsOfRecord'\n >;\n}): Promise<ValidatedSaasProviderDiscovery> {\n const discovery = await resolveValidatedSaasProviderContributions(input);\n // Only CONTRIBUTIONS are registered: an augmentation (#1672) owns no secret, so it has no place in the\n // secrets catalogue. It rides the returned discovery to the artifact and the lock instead.\n registerDiscoveredProviderContributions(discovery.contributions);\n return discovery;\n}\n\n/**\n * Drop every registered contribution. The engine tier is untouched — it is not registered.\n *\n * Used when discovery re-runs for a different application, and by tests. A CLI process that\n * handles one application never needs it.\n */\nexport function resetDiscoveredProviderContributions(): void {\n discoveredContributions.clear();\n contributionsShadowingEngineProviders.clear();\n catalogueGeneration += 1;\n}\n\n// ---------------------------------------------------------------------------\n// The composed view\n// ---------------------------------------------------------------------------\n\nfunction entryFromEngineModule(module: BackendProviderModule): ProviderSecretsCatalogueEntry {\n const secretsContract = module.secretsContract as Record<\n string,\n { envVarName: string; required?: boolean; description?: string; holdsBrowserPublicValue?: true; holdsDeploymentHost?: true }\n >;\n return {\n providerRef: module.metadata.ref,\n label: module.metadata.displayName ?? module.metadata.ref,\n identity: {\n packageName: module.metadata.packageName,\n tier: module.metadata.tier,\n vendor: module.metadata.vendor,\n origin: module.metadata.origin,\n },\n providerCapabilities: [...module.providerCapabilities],\n secrets: Object.entries(secretsContract ?? {})\n .map(([slug, entry]) => ({\n slug,\n envVarName: entry.envVarName,\n required: Boolean(entry.required),\n description: entry.description,\n ...(entry.holdsBrowserPublicValue === true || entry.holdsDeploymentHost === true ? { notConfidential: true as const } : {}),\n }))\n .sort((left, right) => left.slug.localeCompare(right.slug)),\n protocolBindings: module.protocols,\n otlpAuth: module.otlpAuth,\n };\n}\n\nfunction entryFromContribution(\n contribution: ProviderCompanionContribution,\n): ProviderSecretsCatalogueEntry {\n return {\n providerRef: contribution.ref,\n // A contribution carries `identity` but no display name — the metadata field is\n // frontend-facing copy and stays out of the values-free wire record. The ref is the honest\n // fallback, and it is what an unnamed engine provider gets too.\n label: contribution.ref,\n identity: contribution.identity,\n providerCapabilities: contribution.providerCapabilities ?? [],\n secrets: (contribution.secretsContractShape ?? [])\n .map((entry) => ({\n slug: entry.slug,\n envVarName: entry.envVarName,\n required: entry.required,\n description: entry.description,\n // A package slot's not-confidential mark rides the contribution since #2579, as an engine module's does.\n ...(entry.holdsBrowserPublicValue === true || entry.holdsDeploymentHost === true ? { notConfidential: true as const } : {}),\n }))\n // Re-sorted rather than trusted: the schema orders these, but this door accepts a\n // contribution object, not a parsed wire record, so the ordering is only guaranteed where it\n // is performed. The engine branch sorts for the same reason.\n .sort((left, right) => left.slug.localeCompare(right.slug)),\n protocolBindings: [],\n // A package-shipped telemetry provider's header (#2579): without it, its telemetry exported with no credential.\n ...(contribution.otlpAuth === undefined ? {} : { otlpAuth: contribution.otlpAuth }),\n };\n}\n\nlet cachedCatalogue: ReadonlyMap<string, ProviderSecretsCatalogueEntry> | undefined;\nlet cachedCatalogueGeneration = -1;\n\n/**\n * Every provider the CLI can currently see: the engine tier, plus whatever discovery has\n * registered. Insertion order is engine-first, then registration order, so callers that sort\n * (the setup catalogue) and callers that do not (classification) both stay deterministic.\n */\nexport function getComposedProviderSecretsCatalogue(): ReadonlyMap<string, ProviderSecretsCatalogueEntry> {\n if (cachedCatalogue && cachedCatalogueGeneration === catalogueGeneration) return cachedCatalogue;\n\n const catalogue = new Map<string, ProviderSecretsCatalogueEntry>();\n for (const module of EngineBackendProviderRegistry.modules.values()) {\n catalogue.set(module.metadata.ref, entryFromEngineModule(module));\n }\n for (const contribution of discoveredContributions.values()) {\n if (catalogue.has(contribution.ref)) continue;\n catalogue.set(contribution.ref, entryFromContribution(contribution));\n }\n\n cachedCatalogue = catalogue;\n cachedCatalogueGeneration = catalogueGeneration;\n return catalogue;\n}\n\n/** One provider by ref, or `undefined` when nothing in the composed catalogue claims it. */\nexport function getComposedProviderEntry(providerRef: string): ProviderSecretsCatalogueEntry | undefined {\n return getComposedProviderSecretsCatalogue().get(providerRef);\n}\n\n/**\n * Memoise a value derived from the composed catalogue, invalidated by registration.\n *\n * The point is not speed. It is that a derived view CANNOT be a module-load snapshot: the\n * previous `PROVIDER_SENSITIVE_ENV_KEYS` was computed the moment its module was imported, which\n * is always before discovery could have run, so a composed catalogue would have been silently\n * ignored by the very classification it exists to feed.\n */\nexport function memoiseOverCatalogue<T>(compute: () => T): () => T {\n let cached: T | undefined;\n let cachedGeneration = -1;\n return () => {\n if (cachedGeneration !== catalogueGeneration) {\n cached = compute();\n cachedGeneration = catalogueGeneration;\n }\n return cached as T;\n };\n}\n\n/**\n * A `ReadonlySet<string>` whose contents are recomputed from the composed catalogue on every\n * read, rather than frozen when the module was imported.\n *\n * Exists so `PROVIDER_SENSITIVE_ENV_KEYS` and `SENSITIVE_ENV_KEYS` can keep their exported\n * NAMES and their `.has()` shape while becoming composition-aware — their consumers\n * (`k8s-secrets-generator.service.ts`, `sync.command.ts`) live outside this slice's territory\n * and must not need an edit to stay correct.\n */\nexport class LiveEnvKeySet implements ReadonlySet<string> {\n constructor(private readonly resolve: () => ReadonlySet<string>) {}\n\n get size(): number { return this.resolve().size; }\n has(key: string): boolean { return this.resolve().has(key); }\n forEach(callback: (value: string, value2: string, set: ReadonlySet<string>) => void, thisArg?: unknown): void {\n for (const key of this.resolve()) callback.call(thisArg, key, key, this);\n }\n // Return types are read OFF `ReadonlySet` rather than spelled as `IterableIterator`: the\n // standard library renamed these to `SetIterator` (which also carries `[Symbol.dispose]`) in a\n // recent lib, so a spelled-out type breaks on one lib version or the other.\n keys(): ReturnType<ReadonlySet<string>['keys']> { return this.resolve().keys(); }\n values(): ReturnType<ReadonlySet<string>['values']> { return this.resolve().values(); }\n entries(): ReturnType<ReadonlySet<string>['entries']> { return this.resolve().entries(); }\n [Symbol.iterator](): ReturnType<ReadonlySet<string>[typeof Symbol.iterator]> { return this.resolve()[Symbol.iterator](); }\n}\n"]}
@@ -35,7 +35,8 @@ export interface SecretRequirement {
35
35
  /**
36
36
  * The runtimes that RECEIVE the key in their environment — the processes a change regenerates and
37
37
  * restarts — as their scope path. For an UNUSED key that is where it is carried, not where it is used:
38
- * `backend`, `companion`, `minions.<key>`, `workers.<key>`, `frontendServices.<key>`.
38
+ * `backend`, `companion`, `minions.<key>`, `workers.<key>`. Never a `frontendServices.<key>` for a provider key: no
39
+ * frontend service is built with a provider env (#3837), whatever it uses the provider for.
39
40
  */
40
41
  readonly runtimes: readonly string[];
41
42
  readonly standing: ApplicationSecretStanding;
@@ -1 +1 @@
1
- {"version":3,"file":"secret-requirements.service.d.ts","sourceRoot":"","sources":["../../../../src/services/credentials/secret-requirements.service.ts"],"names":[],"mappings":"AAiCA,OAAO,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAClG,OAAO,EAEL,gBAAgB,EAUjB,MAAM,uBAAuB,CAAC;AAI/B,OAAO,EAGL,KAAK,6BAA6B,EAClC,KAAK,mCAAmC,EACzC,MAAM,mEAAmE,CAAC;AAC3E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4DAA4D,CAAC;AAKzG,MAAM,WAAW,iBAAiB;IAChC,oHAAoH;IACpH,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,2FAA2F;IAC3F,QAAQ,CAAC,IAAI,EAAE,qBAAqB,CAAC;IACrC;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC;;;;;;;;;OASG;IACH,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B;;;;;OAKG;IACH,QAAQ,CAAC,YAAY,EAAE,SAAS,gBAAgB,EAAE,CAAC;IACnD;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,QAAQ,CAAC,QAAQ,EAAE,yBAAyB,CAAC;IAC7C;;;;OAIG;IACH,QAAQ,CAAC,iBAAiB,EAAE,OAAO,CAAC;CACrC;AAQD,yHAAyH;AACzH,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,OAAO,CAAC,EAAE;QAAE,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,mCAAmC,CAAC,CAAC,GAC7E,OAAO,CAAC,IAAI,CAAC,uBAAuB,EAAE,iBAAiB,GAAG,qBAAqB,GAAG,YAAY,CAAC,CAAC,CAQlG;AAED,4GAA4G;AAC5G,wBAAsB,sBAAsB,CAAC,KAAK,EAAE;IAClD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,wBAAwB,CAAC;IAC1C,QAAQ,CAAC,OAAO,CAAC,EAAE,wBAAwB,CAAC;IAC5C,QAAQ,CAAC,sBAAsB,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,iCAAiC,CAAC,CAAC,GAAG,IAAI,CAAC;IACrG,QAAQ,CAAC,MAAM,CAAC,EAAE,uBAAuB,CAAC;CAC3C,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAG/B"}
1
+ {"version":3,"file":"secret-requirements.service.d.ts","sourceRoot":"","sources":["../../../../src/services/credentials/secret-requirements.service.ts"],"names":[],"mappings":"AAiCA,OAAO,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAClG,OAAO,EAEL,gBAAgB,EAUjB,MAAM,uBAAuB,CAAC;AAI/B,OAAO,EAGL,KAAK,6BAA6B,EAClC,KAAK,mCAAmC,EACzC,MAAM,mEAAmE,CAAC;AAC3E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4DAA4D,CAAC;AAKzG,MAAM,WAAW,iBAAiB;IAChC,oHAAoH;IACpH,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,2FAA2F;IAC3F,QAAQ,CAAC,IAAI,EAAE,qBAAqB,CAAC;IACrC;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC;;;;;;;;;OASG;IACH,QAAQ,CAAC,QAAQ,EAAE,OAAO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ACzI,QAAQ,CAAC,oBAAoB,CAAC,EAAE,4BAA4B,GAAG,IAAI,CAAC;CACrE;AAED,wBAAsB,2BAA2B,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,GAAE;IAAE,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAmBrJ;AA8CD;;;;GAIG;AACH,wBAAsB,2BAA2B,CAC/C,QAAQ,EAAE,MAAM,EAChB,eAAe,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,mCAAmC,CAAC,CAAC,GAC7E,OAAO,CAAC,IAAI,CAAC,uBAAuB,EAAE,iBAAiB,GAAG,qBAAqB,GAAG,YAAY,CAAC,CAAC,CAQlG;AAED,4GAA4G;AAC5G,wBAAsB,sBAAsB,CAAC,KAAK,EAAE;IAClD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,wBAAwB,CAAC;IAC1C,QAAQ,CAAC,OAAO,CAAC,EAAE,wBAAwB,CAAC;IAC5C,QAAQ,CAAC,sBAAsB,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,iCAAiC,CAAC,CAAC,GAAG,IAAI,CAAC;IACrG,QAAQ,CAAC,MAAM,CAAC,EAAE,uBAAuB,CAAC;CAC3C,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAG/B"}
@@ -45,6 +45,8 @@ const COMPANION_RUNTIME = 'companion';
45
45
  const BACKEND_RUNTIME = 'backend';
46
46
  /** The keyed scope families, each naming one runtime per key. */
47
47
  const KEYED_SCOPE_FAMILIES = ['frontendServices', 'minions', 'workers'];
48
+ /** The scope family whose runtimes are frontend services: they use providers and receive none of their secrets. */
49
+ const FRONTEND_SERVICES_SCOPE_FAMILY = 'frontendServices';
48
50
  /** Every scoped runtime with the provider refs it declares, as `backend`, `companion` or `<family>.<key>`. */
49
51
  export function flattenProviderScopes(scopes) {
50
52
  const runtimes = [];
@@ -570,7 +572,7 @@ function deriveProviderRequirements(input, isSet) {
570
572
  : entry.description ?? null,
571
573
  required,
572
574
  capabilities,
573
- runtimes,
575
+ runtimes: runtimesReceivingProviderKey(runtimes),
574
576
  standing: set ? ApplicationSecretStanding.SET : needed ? ApplicationSecretStanding.NEEDED : ApplicationSecretStanding.AVAILABLE,
575
577
  creationEssential: capabilities.includes(CREATION_ESSENTIAL_CAPABILITY)
576
578
  && companionUnread !== undefined
@@ -733,6 +735,20 @@ function deriveUnusedSecrets(owners, present, presence, claimed) {
733
735
  }
734
736
  return rows;
735
737
  }
738
+ /**
739
+ * Of the runtimes whose scope names a provider, those that RECEIVE its keys (#3837): every one but a frontend service.
740
+ *
741
+ * The env builders give provider secrets to the backend, to each minion and worker (filtered to its scope), and to the
742
+ * companion; no frontend service is built with a provider env, so its `.env` carries none of them (a browser provider's
743
+ * public configuration reaches it as configuration, never as a secret). A frontend service still USES the provider (its
744
+ * capabilities count for coverage through `runtimesByRef`); it does not receive the key, so it is neither named as a
745
+ * receiver in `wildo secrets list` nor restarted when the key changes. Measured on Wonder Todos, 2026-11-15:
746
+ * `TEAMS_BOT_APP_PASSWORD` was listed "received by backend, frontendServices.app" while `frontend/.env` held no
747
+ * `TEAMS_BOT_*` key.
748
+ */
749
+ function runtimesReceivingProviderKey(scopedRuntimes) {
750
+ return scopedRuntimes.filter((runtime) => !runtime.startsWith(`${FRONTEND_SERVICES_SCOPE_FAMILY}.`));
751
+ }
736
752
  /**
737
753
  * The runtimes whose generated `.env` still carries an unused key — read off the env builder's own delivery
738
754
  * rules, since they are what put it there: