@wildo-ai/wildo-cli 1.1.14 → 1.1.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (211) hide show
  1. package/dist/src/commands/context/journey.command.d.ts.map +1 -1
  2. package/dist/src/commands/context/journey.command.js +12 -0
  3. package/dist/src/commands/context/journey.command.js.map +1 -1
  4. package/dist/src/commands/creation/drive.command.d.ts.map +1 -1
  5. package/dist/src/commands/creation/drive.command.js +2 -1
  6. package/dist/src/commands/creation/drive.command.js.map +1 -1
  7. package/dist/src/commands/generate/email-command.utils.d.ts +2 -0
  8. package/dist/src/commands/generate/email-command.utils.d.ts.map +1 -1
  9. package/dist/src/commands/generate/email-command.utils.js +5 -0
  10. package/dist/src/commands/generate/email-command.utils.js.map +1 -1
  11. package/dist/src/commands/init.command.d.ts.map +1 -1
  12. package/dist/src/commands/init.command.js +7 -2
  13. package/dist/src/commands/init.command.js.map +1 -1
  14. package/dist/src/commands/local/deregister.command.d.ts.map +1 -1
  15. package/dist/src/commands/local/deregister.command.js +4 -0
  16. package/dist/src/commands/local/deregister.command.js.map +1 -1
  17. package/dist/src/commands/local/dev.command.d.ts +50 -0
  18. package/dist/src/commands/local/dev.command.d.ts.map +1 -1
  19. package/dist/src/commands/local/dev.command.js +144 -1
  20. package/dist/src/commands/local/dev.command.js.map +1 -1
  21. package/dist/src/commands/local/jobs-command.utils.d.ts +24 -0
  22. package/dist/src/commands/local/jobs-command.utils.d.ts.map +1 -0
  23. package/dist/src/commands/local/jobs-command.utils.js +44 -0
  24. package/dist/src/commands/local/jobs-command.utils.js.map +1 -0
  25. package/dist/src/commands/local/jobs-run.command.d.ts +7 -0
  26. package/dist/src/commands/local/jobs-run.command.d.ts.map +1 -0
  27. package/dist/src/commands/local/jobs-run.command.js +92 -0
  28. package/dist/src/commands/local/jobs-run.command.js.map +1 -0
  29. package/dist/src/commands/local/jobs.command.d.ts +7 -0
  30. package/dist/src/commands/local/jobs.command.d.ts.map +1 -0
  31. package/dist/src/commands/local/jobs.command.js +59 -0
  32. package/dist/src/commands/local/jobs.command.js.map +1 -0
  33. package/dist/src/commands/local/tunnel.command.d.ts +84 -0
  34. package/dist/src/commands/local/tunnel.command.d.ts.map +1 -0
  35. package/dist/src/commands/local/tunnel.command.js +274 -0
  36. package/dist/src/commands/local/tunnel.command.js.map +1 -0
  37. package/dist/src/commands/providers/grant-export.command.d.ts +16 -0
  38. package/dist/src/commands/providers/grant-export.command.d.ts.map +1 -0
  39. package/dist/src/commands/providers/grant-export.command.js +78 -0
  40. package/dist/src/commands/providers/grant-export.command.js.map +1 -0
  41. package/dist/src/commands/providers/grant-import.command.d.ts +15 -0
  42. package/dist/src/commands/providers/grant-import.command.d.ts.map +1 -0
  43. package/dist/src/commands/providers/grant-import.command.js +78 -0
  44. package/dist/src/commands/providers/grant-import.command.js.map +1 -0
  45. package/dist/src/kernel/command-runner.d.ts.map +1 -1
  46. package/dist/src/kernel/command-runner.js +4 -6
  47. package/dist/src/kernel/command-runner.js.map +1 -1
  48. package/dist/src/kernel/hooks.d.ts.map +1 -1
  49. package/dist/src/kernel/hooks.js +2 -1
  50. package/dist/src/kernel/hooks.js.map +1 -1
  51. package/dist/src/kernel/json-document-output.d.ts +7 -0
  52. package/dist/src/kernel/json-document-output.d.ts.map +1 -1
  53. package/dist/src/kernel/json-document-output.js +8 -0
  54. package/dist/src/kernel/json-document-output.js.map +1 -1
  55. package/dist/src/kernel/types.d.ts +8 -0
  56. package/dist/src/kernel/types.d.ts.map +1 -1
  57. package/dist/src/kernel/types.js.map +1 -1
  58. package/dist/src/services/application/app-bootstrap.service.d.ts +65 -7
  59. package/dist/src/services/application/app-bootstrap.service.d.ts.map +1 -1
  60. package/dist/src/services/application/app-bootstrap.service.js +94 -15
  61. package/dist/src/services/application/app-bootstrap.service.js.map +1 -1
  62. package/dist/src/services/application/app-local-runtime-addresses.service.d.ts +1 -1
  63. package/dist/src/services/application/app-local-runtime-addresses.service.d.ts.map +1 -1
  64. package/dist/src/services/application/app-local-runtime-addresses.service.js.map +1 -1
  65. package/dist/src/services/application/app-runtime-targets.service.d.ts.map +1 -1
  66. package/dist/src/services/application/app-runtime-targets.service.js +16 -2
  67. package/dist/src/services/application/app-runtime-targets.service.js.map +1 -1
  68. package/dist/src/services/application/application-dependency-alignment.service.d.ts +20 -0
  69. package/dist/src/services/application/application-dependency-alignment.service.d.ts.map +1 -1
  70. package/dist/src/services/application/application-dependency-alignment.service.js +32 -2
  71. package/dist/src/services/application/application-dependency-alignment.service.js.map +1 -1
  72. package/dist/src/services/application/application-runtime-bootstrap.service.d.ts +13 -0
  73. package/dist/src/services/application/application-runtime-bootstrap.service.d.ts.map +1 -1
  74. package/dist/src/services/application/application-runtime-bootstrap.service.js +32 -0
  75. package/dist/src/services/application/application-runtime-bootstrap.service.js.map +1 -1
  76. package/dist/src/services/application/environment-provider-configurations.service.d.ts +7 -0
  77. package/dist/src/services/application/environment-provider-configurations.service.d.ts.map +1 -1
  78. package/dist/src/services/application/environment-provider-configurations.service.js +1 -1
  79. package/dist/src/services/application/environment-provider-configurations.service.js.map +1 -1
  80. package/dist/src/services/application/local-tunnel.service.d.ts +153 -0
  81. package/dist/src/services/application/local-tunnel.service.d.ts.map +1 -0
  82. package/dist/src/services/application/local-tunnel.service.js +295 -0
  83. package/dist/src/services/application/local-tunnel.service.js.map +1 -0
  84. package/dist/src/services/application/provider-runtime-sync.service.d.ts.map +1 -1
  85. package/dist/src/services/application/provider-runtime-sync.service.js +3 -0
  86. package/dist/src/services/application/provider-runtime-sync.service.js.map +1 -1
  87. package/dist/src/services/application/saas-skeleton.service.d.ts +7 -0
  88. package/dist/src/services/application/saas-skeleton.service.d.ts.map +1 -1
  89. package/dist/src/services/application/saas-skeleton.service.js +2 -0
  90. package/dist/src/services/application/saas-skeleton.service.js.map +1 -1
  91. package/dist/src/services/catalog/service-address-resolver.service.d.ts +7 -1
  92. package/dist/src/services/catalog/service-address-resolver.service.d.ts.map +1 -1
  93. package/dist/src/services/catalog/service-address-resolver.service.js +6 -3
  94. package/dist/src/services/catalog/service-address-resolver.service.js.map +1 -1
  95. package/dist/src/services/companion/companion-client.service.d.ts +17 -0
  96. package/dist/src/services/companion/companion-client.service.d.ts.map +1 -1
  97. package/dist/src/services/companion/companion-client.service.js +21 -0
  98. package/dist/src/services/companion/companion-client.service.js.map +1 -1
  99. package/dist/src/services/companion/creation-drive.service.d.ts +18 -0
  100. package/dist/src/services/companion/creation-drive.service.d.ts.map +1 -1
  101. package/dist/src/services/companion/creation-drive.service.js +70 -1
  102. package/dist/src/services/companion/creation-drive.service.js.map +1 -1
  103. package/dist/src/services/credentials/application-secrets.service.d.ts +6 -0
  104. package/dist/src/services/credentials/application-secrets.service.d.ts.map +1 -1
  105. package/dist/src/services/credentials/application-secrets.service.js +1 -1
  106. package/dist/src/services/credentials/application-secrets.service.js.map +1 -1
  107. package/dist/src/services/credentials/provider-env-vars.utils.d.ts.map +1 -1
  108. package/dist/src/services/credentials/provider-env-vars.utils.js +3 -1
  109. package/dist/src/services/credentials/provider-env-vars.utils.js.map +1 -1
  110. package/dist/src/services/credentials/secrets-writer.service.d.ts +11 -2
  111. package/dist/src/services/credentials/secrets-writer.service.d.ts.map +1 -1
  112. package/dist/src/services/credentials/secrets-writer.service.js +12 -3
  113. package/dist/src/services/credentials/secrets-writer.service.js.map +1 -1
  114. package/dist/src/services/deployment/ci-deploy-generator.service.d.ts.map +1 -1
  115. package/dist/src/services/deployment/ci-deploy-generator.service.js +3 -3
  116. package/dist/src/services/deployment/ci-deploy-generator.service.js.map +1 -1
  117. package/dist/src/services/deployment/docker/docker-compose-generator.service.d.ts +12 -3
  118. package/dist/src/services/deployment/docker/docker-compose-generator.service.d.ts.map +1 -1
  119. package/dist/src/services/deployment/docker/docker-compose-generator.service.js +40 -22
  120. package/dist/src/services/deployment/docker/docker-compose-generator.service.js.map +1 -1
  121. package/dist/src/services/deployment/framework-pod-network-membership.d.ts +6 -0
  122. package/dist/src/services/deployment/framework-pod-network-membership.d.ts.map +1 -1
  123. package/dist/src/services/deployment/framework-pod-network-membership.js +17 -3
  124. package/dist/src/services/deployment/framework-pod-network-membership.js.map +1 -1
  125. package/dist/src/services/deployment/k8s/k8s-manifest-generator.service.d.ts +4 -1
  126. package/dist/src/services/deployment/k8s/k8s-manifest-generator.service.d.ts.map +1 -1
  127. package/dist/src/services/deployment/k8s/k8s-manifest-generator.service.js +17 -7
  128. package/dist/src/services/deployment/k8s/k8s-manifest-generator.service.js.map +1 -1
  129. package/dist/src/services/deployment/k8s/k8s-manifest.schemas.d.ts +7 -0
  130. package/dist/src/services/deployment/k8s/k8s-manifest.schemas.d.ts.map +1 -1
  131. package/dist/src/services/deployment/k8s/k8s-manifest.schemas.js.map +1 -1
  132. package/dist/src/services/deployment/k8s/k8s-secrets-generator.service.d.ts.map +1 -1
  133. package/dist/src/services/deployment/k8s/k8s-secrets-generator.service.js +15 -9
  134. package/dist/src/services/deployment/k8s/k8s-secrets-generator.service.js.map +1 -1
  135. package/dist/src/services/deployment/k8s/kind-pod-host-gateway.d.ts +43 -0
  136. package/dist/src/services/deployment/k8s/kind-pod-host-gateway.d.ts.map +1 -0
  137. package/dist/src/services/deployment/k8s/kind-pod-host-gateway.js +12 -0
  138. package/dist/src/services/deployment/k8s/kind-pod-host-gateway.js.map +1 -0
  139. package/dist/src/services/deployment/k8s/off-cluster-backing-services.d.ts +3 -1
  140. package/dist/src/services/deployment/k8s/off-cluster-backing-services.d.ts.map +1 -1
  141. package/dist/src/services/deployment/k8s/off-cluster-backing-services.js.map +1 -1
  142. package/dist/src/services/deployment/local-dev-late-workspace-members.service.d.ts +163 -0
  143. package/dist/src/services/deployment/local-dev-late-workspace-members.service.d.ts.map +1 -0
  144. package/dist/src/services/deployment/local-dev-late-workspace-members.service.js +356 -0
  145. package/dist/src/services/deployment/local-dev-late-workspace-members.service.js.map +1 -0
  146. package/dist/src/services/environment/authored-infra-config.utils.d.ts +13 -3
  147. package/dist/src/services/environment/authored-infra-config.utils.d.ts.map +1 -1
  148. package/dist/src/services/environment/authored-infra-config.utils.js +24 -4
  149. package/dist/src/services/environment/authored-infra-config.utils.js.map +1 -1
  150. package/dist/src/services/environment/container-host-gateway-listen-host.d.ts +6 -0
  151. package/dist/src/services/environment/container-host-gateway-listen-host.d.ts.map +1 -1
  152. package/dist/src/services/environment/container-host-gateway-listen-host.js +6 -0
  153. package/dist/src/services/environment/container-host-gateway-listen-host.js.map +1 -1
  154. package/dist/src/services/environment/env-configuration-generator.service.d.ts +12 -0
  155. package/dist/src/services/environment/env-configuration-generator.service.d.ts.map +1 -1
  156. package/dist/src/services/environment/env-configuration-generator.service.js +37 -5
  157. package/dist/src/services/environment/env-configuration-generator.service.js.map +1 -1
  158. package/dist/src/services/environment/env-vars-builder.service.d.ts +2 -1
  159. package/dist/src/services/environment/env-vars-builder.service.d.ts.map +1 -1
  160. package/dist/src/services/environment/env-vars-builder.service.js +47 -32
  161. package/dist/src/services/environment/env-vars-builder.service.js.map +1 -1
  162. package/dist/src/services/environment/environment-lifecycle.service.d.ts +7 -4
  163. package/dist/src/services/environment/environment-lifecycle.service.d.ts.map +1 -1
  164. package/dist/src/services/environment/environment-lifecycle.service.js +14 -18
  165. package/dist/src/services/environment/environment-lifecycle.service.js.map +1 -1
  166. package/dist/src/services/environment/environment-setup.service.d.ts.map +1 -1
  167. package/dist/src/services/environment/environment-setup.service.js +17 -6
  168. package/dist/src/services/environment/environment-setup.service.js.map +1 -1
  169. package/dist/src/services/environment/environment.service.d.ts +4 -3
  170. package/dist/src/services/environment/environment.service.d.ts.map +1 -1
  171. package/dist/src/services/environment/environment.service.js +0 -1
  172. package/dist/src/services/environment/environment.service.js.map +1 -1
  173. package/dist/src/services/framework/framework-docker-publish.service.d.ts +55 -15
  174. package/dist/src/services/framework/framework-docker-publish.service.d.ts.map +1 -1
  175. package/dist/src/services/framework/framework-docker-publish.service.js +115 -25
  176. package/dist/src/services/framework/framework-docker-publish.service.js.map +1 -1
  177. package/dist/src/services/framework/package-install.service.d.ts +7 -0
  178. package/dist/src/services/framework/package-install.service.d.ts.map +1 -1
  179. package/dist/src/services/framework/package-install.service.js +8 -1
  180. package/dist/src/services/framework/package-install.service.js.map +1 -1
  181. package/dist/src/services/registry/application-provider-connection.service.d.ts +16 -1
  182. package/dist/src/services/registry/application-provider-connection.service.d.ts.map +1 -1
  183. package/dist/src/services/registry/application-provider-connection.service.js +23 -0
  184. package/dist/src/services/registry/application-provider-connection.service.js.map +1 -1
  185. package/dist/src/services/registry/provider-grant-transfer.service.d.ts +48 -0
  186. package/dist/src/services/registry/provider-grant-transfer.service.d.ts.map +1 -0
  187. package/dist/src/services/registry/provider-grant-transfer.service.js +144 -0
  188. package/dist/src/services/registry/provider-grant-transfer.service.js.map +1 -0
  189. package/dist/src/services/registry/provider-module-scaffold.service.d.ts.map +1 -1
  190. package/dist/src/services/registry/provider-module-scaffold.service.js +10 -3
  191. package/dist/src/services/registry/provider-module-scaffold.service.js.map +1 -1
  192. package/dist/src/services/security/csp-sync.service.d.ts.map +1 -1
  193. package/dist/src/services/security/csp-sync.service.js +21 -2
  194. package/dist/src/services/security/csp-sync.service.js.map +1 -1
  195. package/dist/tsconfig.build.tsbuildinfo +1 -1
  196. package/package.json +19 -19
  197. package/templates/infra/docker-compose/docker-compose.wildo-platform.yml.hbs +16 -7
  198. package/templates/infra/k8s/platform/platform-crontabs-batches-manager/deployment.yaml.hbs +13 -0
  199. package/templates/saas/i18n/email/system/remote-agent-task-updated/labels.en.ts +11 -0
  200. package/templates/saas/i18n/email/system/remote-agent-task-updated/template.tsx +56 -0
  201. package/templates/saas/i18n/engine/components/APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS.en.ts +61 -0
  202. package/templates/saas/i18n/engine/components/APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS.fr.ts +61 -0
  203. package/templates/saas/scenarios/add-technical-doc/files/technical-doc/docusaurus.config.ts.hbs +5 -4
  204. package/templates/saas/scenarios/add-technical-doc/files/technical-doc/package.json.hbs +1 -1
  205. package/templates/saas/scenarios/add-technical-doc/files/technical-doc/scripts/substitute-api-origin.mjs +97 -32
  206. package/templates/saas/scenarios/add-technical-doc/files/technical-doc/src/plugins/api-reference-pages.ts +7 -6
  207. package/templates/saas/skeleton/.wildo-saas/wildo-dev-companion/scripts/dev-supervised.sh +18 -4
  208. package/templates/saas/skeleton/frontend/nginx-config/default.conf.hbs +1 -1
  209. package/templates/saas/skeleton/frontend/src/generated/csp.generated.json.hbs +4 -4
  210. package/templates/saas/skeleton/infrastructure/local/wildo.infra.local.config.ts.hbs +2 -0
  211. package/wildo-framework.info.json +1 -1
@@ -51,7 +51,6 @@ export class EnvironmentUtils {
51
51
  static selfHostsBackingService(env, kind) { return EnvironmentLifecycle.selfHostsBackingService(env, kind); }
52
52
  /** @see EnvironmentLifecycle.servesBackingServiceOffCluster — a USED kind served from outside the deployment (#3511). */
53
53
  static servesBackingServiceOffCluster(env, kind) { return EnvironmentLifecycle.servesBackingServiceOffCluster(env, kind); }
54
- static getRequiredInfraServices(envName) { return EnvironmentLifecycle.getRequiredInfraServices(envName); }
55
54
  static getRequiredPlatformServices() { return EnvironmentLifecycle.getRequiredPlatformServices(); }
56
55
  static getRuntime(envName) { return EnvironmentLifecycle.getRuntime(envName); }
57
56
  static detectOS() { return EnvironmentLifecycle.detectOS(); }
@@ -1 +1 @@
1
- {"version":3,"file":"environment.service.js","sourceRoot":"","sources":["../../../../src/services/environment/environment.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAmBH,OAAO,EAAE,mBAAmB,EAAE,MAAM,8DAA8D,CAAC;AACnG,OAAO,EAAE,gBAAgB,EAAE,MAAM,2DAA2D,CAAC;AAC7F,OAAO,EAAE,oBAAoB,EAAE,MAAM,+DAA+D,CAAC;AAErG,MAAM,OAAO,gBAAgB;IAE3B,6EAA6E;IAE7E,MAAM,CAAC,IAAI,KAAgC,OAAO,mBAAmB,CAAC,IAAI,EAAE,CAAC,CAAC,C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C,OAAgB,IAAY,OAAO,gBAAgB,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IACtH,MAAM,CAAC,wBAAwB,CAAC,aAAqB,IAAmB,OAAO,gBAAgB,CAAC,wBAAwB,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;CAC3I","sourcesContent":["/**\n * EnvironmentUtils — backward-compatible facade.\n *\n * Delegates to the three focused sub-services:\n * - EnvironmentRegistry (state persistence, CRUD, config/secrets loading)\n * - EnvironmentPaths (path resolution)\n * - EnvironmentLifecycle (initialization, setup status, database, infra)\n *\n * Existing callers continue importing { EnvironmentUtils } from this file.\n * New code should import directly from the sub-service it needs.\n */\n\nimport type {\n PlatformEnvironmentConfiguration,\n PlatformEnvironmentsState,\n PlatformEnvOperatingSystem,\n} from '~wildo-cli/services/environment/environment.schemas';\nimport type { BackingServiceKind, BackingServicesEnvConfig, PlatformWildoServices, WildoDeploymentRuntime, WildoLocationType } from '@wildo-ai/platform-config-lib';\nimport { SetupStatus } from '~wildo-cli/services/environment/environment.schemas';\nimport type {\n PlatformDatabaseChoice,\n PlatformDataServices,\n} from '~wildo-cli/services/data-services/data-services.schemas';\nimport type {\n ApplicationRuntimeIdentityJson,\n PlatformEnvConfigJson,\n PlatformEnvSecretsJson,\n} from '~wildo-cli/services/credentials/credentials.schemas';\n\nimport { EnvironmentRegistry } from '~wildo-cli/services/environment/environment-registry.service';\nimport { EnvironmentPaths } from '~wildo-cli/services/environment/environment-paths.service';\nimport { EnvironmentLifecycle } from '~wildo-cli/services/environment/environment-lifecycle.service';\n\nexport class EnvironmentUtils {\n\n // --- Registry delegates ---------------------------------------------------\n\n static load(): PlatformEnvironmentsState { return EnvironmentRegistry.load(); }\n static reset(): void { EnvironmentRegistry.reset(); }\n static getAll(): Record<string, PlatformEnvironmentConfiguration> { return EnvironmentRegistry.getAll(); }\n static get(name: string): PlatformEnvironmentConfiguration | undefined { return EnvironmentRegistry.get(name); }\n static getCurrent(): PlatformEnvironmentConfiguration | undefined { return EnvironmentRegistry.getCurrent(); }\n static getCurrentName(): string { return EnvironmentRegistry.getCurrentName(); }\n static switchTo(name: string): void { EnvironmentRegistry.switchTo(name); }\n static listNames(): string[] { return EnvironmentRegistry.listNames(); }\n static update(name: string, updates: Partial<Omit<PlatformEnvironmentConfiguration, 'name' | 'locationType' | 'createdAt'>>): void { EnvironmentRegistry.update(name, updates); }\n static remove(name: string): void { EnvironmentRegistry.remove(name); }\n static loadConfigJson(envName?: string): PlatformEnvConfigJson | null { return EnvironmentRegistry.loadConfigJson(envName, EnvironmentPaths.resolveConfigDir(envName)); }\n static loadSecretsJson(envName?: string): PlatformEnvSecretsJson | null { return EnvironmentRegistry.loadSecretsJson(envName, EnvironmentPaths.resolveSecretsDir(envName)); }\n static loadApplicationRuntimeIdentity(envName?: string): ApplicationRuntimeIdentityJson | null { return EnvironmentRegistry.loadApplicationRuntimeIdentity(envName, EnvironmentPaths.resolveConfigDir(envName)); }\n static saveApplicationRuntimeIdentity(envName: string, appSlug: string, applicationId: string): void { EnvironmentRegistry.saveApplicationRuntimeIdentity(envName, appSlug, applicationId, EnvironmentPaths.resolveConfigDir(envName)); }\n static clearApplicationRuntimeIdentities(envName: string): void { EnvironmentRegistry.clearApplicationRuntimeIdentities(envName, EnvironmentPaths.resolveConfigDir(envName)); }\n static invalidateCache(): void { EnvironmentRegistry.invalidateCache(); }\n\n // --- Lifecycle delegates --------------------------------------------------\n\n static initializeLocal(overrides?: Partial<PlatformEnvironmentConfiguration>): PlatformEnvironmentConfiguration { return EnvironmentLifecycle.initializeLocal(overrides); }\n static initializeEnvironment(name: string, locationType: WildoLocationType, overrides?: Partial<PlatformEnvironmentConfiguration>): PlatformEnvironmentConfiguration { return EnvironmentLifecycle.initializeEnvironment(name, locationType, overrides); }\n static updateEnvironmentState(env: PlatformEnvironmentConfiguration): void { EnvironmentLifecycle.updateEnvironmentState(env); }\n static getSetupStatus(envName?: string): SetupStatus { return EnvironmentLifecycle.getSetupStatus(envName); }\n static setSetupStatus(status: SetupStatus, envName?: string): void { EnvironmentLifecycle.setSetupStatus(status, envName); }\n static isSetupCompleted(envName?: string): boolean { return EnvironmentLifecycle.isSetupCompleted(envName); }\n static isPlatformInitialized(envName?: string): boolean { return EnvironmentLifecycle.isPlatformInitialized(envName); }\n static markPlatformInitialized(envName?: string): void { return EnvironmentLifecycle.markPlatformInitialized(envName); }\n static clearPlatformInitialized(envName?: string): void { return EnvironmentLifecycle.clearPlatformInitialized(envName); }\n static getDatabaseChoice(envName?: string): PlatformDatabaseChoice { return EnvironmentLifecycle.getDatabaseChoice(envName); }\n static getDatabaseEngine(envName?: string): import('@wildo-ai/platform-config-lib').DatabaseEngine { return EnvironmentLifecycle.getDatabaseEngine(envName); }\n static setDatabaseChoice(database: PlatformDatabaseChoice, envName?: string): void { EnvironmentLifecycle.setDatabaseChoice(database, envName); }\n /** @see EnvironmentLifecycle.needsLocalPostgreSQL — the union rule; NOT `getDatabaseEngine() === POSTGRESQL`. */\n static needsLocalPostgreSQL(env: { name: string; backingServices?: BackingServicesEnvConfig }): boolean { return EnvironmentLifecycle.needsLocalPostgreSQL(env); }\n /** @see EnvironmentLifecycle.needsLocalMongoDB — the union rule (mirror of needsLocalPostgreSQL). */\n static needsLocalMongoDB(env: { name: string; backingServices?: BackingServicesEnvConfig }): boolean { return EnvironmentLifecycle.needsLocalMongoDB(env); }\n /** @see EnvironmentLifecycle.selfHostsBackingService — the TOTAL per-kind self-deploy rule both lanes gate on. */\n static selfHostsBackingService(env: { name: string; backingServices?: BackingServicesEnvConfig }, kind: BackingServiceKind): boolean { return EnvironmentLifecycle.selfHostsBackingService(env, kind); }\n /** @see EnvironmentLifecycle.servesBackingServiceOffCluster — a USED kind served from outside the deployment (#3511). */\n static servesBackingServiceOffCluster(env: { name: string; backingServices?: BackingServicesEnvConfig }, kind: BackingServiceKind): boolean { return EnvironmentLifecycle.servesBackingServiceOffCluster(env, kind); }\n static getRequiredInfraServices(envName?: string): PlatformDataServices[] { return EnvironmentLifecycle.getRequiredInfraServices(envName); }\n static getRequiredPlatformServices(): PlatformWildoServices[] { return EnvironmentLifecycle.getRequiredPlatformServices(); }\n static getRuntime(envName?: string): WildoDeploymentRuntime { return EnvironmentLifecycle.getRuntime(envName); }\n static detectOS(): PlatformEnvOperatingSystem { return EnvironmentLifecycle.detectOS(); }\n\n // --- Paths delegates ------------------------------------------------------\n\n static getSecretsPath(envName?: string): string { return EnvironmentPaths.getSecretsPath(envName); }\n static getConfigPath(envName?: string): string { return EnvironmentPaths.getConfigPath(envName); }\n static getInfraPath(envName?: string): string { return EnvironmentPaths.getInfraPath(envName); }\n static setPaths(paths: { secretsPath?: string; configPath?: string; infraPath?: string }, envName?: string): void { EnvironmentPaths.setPaths(paths, envName); }\n static resolveSecretsDir(envName?: string): string { return EnvironmentPaths.resolveSecretsDir(envName); }\n static resolveConfigDir(envName?: string): string { return EnvironmentPaths.resolveConfigDir(envName); }\n static resolveInfraDir(envName?: string): string { return EnvironmentPaths.resolveInfraDir(envName); }\n static resolveDockerComposeDir(envName?: string): string { return EnvironmentPaths.resolveDockerComposeDir(envName); }\n static detectSiblingSecretsRepo(frameworkPath: string): string | null { return EnvironmentPaths.detectSiblingSecretsRepo(frameworkPath); }\n}\n"]}
1
+ {"version":3,"file":"environment.service.js","sourceRoot":"","sources":["../../../../src/services/environment/environment.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAmBH,OAAO,EAAE,mBAAmB,EAAE,MAAM,8DAA8D,CAAC;AACnG,OAAO,EAAE,gBAAgB,EAAE,MAAM,2DAA2D,CAAC;AAC7F,OAAO,EAAE,oBAAoB,EAAE,MAAM,+DAA+D,CAAC;AAErG,MAAM,OAAO,gBAAgB;IAE3B,6EAA6E;IAE7E,MAAM,CAAC,IAAI,KAAgC,OAAO,mBAAmB,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IAC/E,MAAM,CAAC,KAAK,KAAW,mBAAmB,CAAC,KAAK,EAAE,CAAC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,CAAC,CAAC;CAC3I","sourcesContent":["/**\n * EnvironmentUtils — backward-compatible facade.\n *\n * Delegates to the three focused sub-services:\n * - EnvironmentRegistry (state persistence, CRUD, config/secrets loading)\n * - EnvironmentPaths (path resolution)\n * - EnvironmentLifecycle (initialization, setup status, database, infra)\n *\n * Existing callers continue importing { EnvironmentUtils } from this file.\n * New code should import directly from the sub-service it needs.\n */\n\nimport type {\n PlatformEnvironmentConfiguration,\n PlatformEnvironmentsState,\n PlatformEnvOperatingSystem,\n} from '~wildo-cli/services/environment/environment.schemas';\nimport type { BackingServiceKind, BackingServicesEnvConfig, EnvironmentServiceProfile, PlatformWildoServices, WildoDeploymentRuntime, WildoLocationType } from '@wildo-ai/platform-config-lib';\nimport { SetupStatus } from '~wildo-cli/services/environment/environment.schemas';\nimport type {\n PlatformDatabaseChoice,\n PlatformDataServices,\n} from '~wildo-cli/services/data-services/data-services.schemas';\nimport type {\n ApplicationRuntimeIdentityJson,\n PlatformEnvConfigJson,\n PlatformEnvSecretsJson,\n} from '~wildo-cli/services/credentials/credentials.schemas';\n\nimport { EnvironmentRegistry } from '~wildo-cli/services/environment/environment-registry.service';\nimport { EnvironmentPaths } from '~wildo-cli/services/environment/environment-paths.service';\nimport { EnvironmentLifecycle } from '~wildo-cli/services/environment/environment-lifecycle.service';\n\nexport class EnvironmentUtils {\n\n // --- Registry delegates ---------------------------------------------------\n\n static load(): PlatformEnvironmentsState { return EnvironmentRegistry.load(); }\n static reset(): void { EnvironmentRegistry.reset(); }\n static getAll(): Record<string, PlatformEnvironmentConfiguration> { return EnvironmentRegistry.getAll(); }\n static get(name: string): PlatformEnvironmentConfiguration | undefined { return EnvironmentRegistry.get(name); }\n static getCurrent(): PlatformEnvironmentConfiguration | undefined { return EnvironmentRegistry.getCurrent(); }\n static getCurrentName(): string { return EnvironmentRegistry.getCurrentName(); }\n static switchTo(name: string): void { EnvironmentRegistry.switchTo(name); }\n static listNames(): string[] { return EnvironmentRegistry.listNames(); }\n static update(name: string, updates: Partial<Omit<PlatformEnvironmentConfiguration, 'name' | 'locationType' | 'createdAt'>>): void { EnvironmentRegistry.update(name, updates); }\n static remove(name: string): void { EnvironmentRegistry.remove(name); }\n static loadConfigJson(envName?: string): PlatformEnvConfigJson | null { return EnvironmentRegistry.loadConfigJson(envName, EnvironmentPaths.resolveConfigDir(envName)); }\n static loadSecretsJson(envName?: string): PlatformEnvSecretsJson | null { return EnvironmentRegistry.loadSecretsJson(envName, EnvironmentPaths.resolveSecretsDir(envName)); }\n static loadApplicationRuntimeIdentity(envName?: string): ApplicationRuntimeIdentityJson | null { return EnvironmentRegistry.loadApplicationRuntimeIdentity(envName, EnvironmentPaths.resolveConfigDir(envName)); }\n static saveApplicationRuntimeIdentity(envName: string, appSlug: string, applicationId: string): void { EnvironmentRegistry.saveApplicationRuntimeIdentity(envName, appSlug, applicationId, EnvironmentPaths.resolveConfigDir(envName)); }\n static clearApplicationRuntimeIdentities(envName: string): void { EnvironmentRegistry.clearApplicationRuntimeIdentities(envName, EnvironmentPaths.resolveConfigDir(envName)); }\n static invalidateCache(): void { EnvironmentRegistry.invalidateCache(); }\n\n // --- Lifecycle delegates --------------------------------------------------\n\n static initializeLocal(overrides?: Partial<PlatformEnvironmentConfiguration>): PlatformEnvironmentConfiguration { return EnvironmentLifecycle.initializeLocal(overrides); }\n static initializeEnvironment(name: string, locationType: WildoLocationType, overrides?: Partial<PlatformEnvironmentConfiguration>): PlatformEnvironmentConfiguration { return EnvironmentLifecycle.initializeEnvironment(name, locationType, overrides); }\n static updateEnvironmentState(env: PlatformEnvironmentConfiguration): void { EnvironmentLifecycle.updateEnvironmentState(env); }\n static getSetupStatus(envName?: string): SetupStatus { return EnvironmentLifecycle.getSetupStatus(envName); }\n static setSetupStatus(status: SetupStatus, envName?: string): void { EnvironmentLifecycle.setSetupStatus(status, envName); }\n static isSetupCompleted(envName?: string): boolean { return EnvironmentLifecycle.isSetupCompleted(envName); }\n static isPlatformInitialized(envName?: string): boolean { return EnvironmentLifecycle.isPlatformInitialized(envName); }\n static markPlatformInitialized(envName?: string): void { return EnvironmentLifecycle.markPlatformInitialized(envName); }\n static clearPlatformInitialized(envName?: string): void { return EnvironmentLifecycle.clearPlatformInitialized(envName); }\n static getDatabaseChoice(envName?: string): PlatformDatabaseChoice { return EnvironmentLifecycle.getDatabaseChoice(envName); }\n static getDatabaseEngine(envName?: string): import('@wildo-ai/platform-config-lib').DatabaseEngine { return EnvironmentLifecycle.getDatabaseEngine(envName); }\n static setDatabaseChoice(database: PlatformDatabaseChoice, envName?: string): void { EnvironmentLifecycle.setDatabaseChoice(database, envName); }\n /** @see EnvironmentLifecycle.needsLocalPostgreSQL — the union rule; NOT `getDatabaseEngine() === POSTGRESQL`. */\n static needsLocalPostgreSQL(env: { name: string; backingServices?: BackingServicesEnvConfig }): boolean { return EnvironmentLifecycle.needsLocalPostgreSQL(env); }\n /** @see EnvironmentLifecycle.needsLocalMongoDB — the union rule (mirror of needsLocalPostgreSQL). */\n static needsLocalMongoDB(env: { name: string; backingServices?: BackingServicesEnvConfig }): boolean { return EnvironmentLifecycle.needsLocalMongoDB(env); }\n /** @see EnvironmentLifecycle.selfHostsBackingService — the TOTAL per-kind self-deploy rule both lanes gate on. */\n static selfHostsBackingService(env: { name: string; backingServices?: BackingServicesEnvConfig; serviceProfile?: EnvironmentServiceProfile }, kind: BackingServiceKind): boolean { return EnvironmentLifecycle.selfHostsBackingService(env, kind); }\n /** @see EnvironmentLifecycle.servesBackingServiceOffCluster — a USED kind served from outside the deployment (#3511). */\n static servesBackingServiceOffCluster(env: { name: string; backingServices?: BackingServicesEnvConfig; serviceProfile?: EnvironmentServiceProfile }, kind: BackingServiceKind): boolean { return EnvironmentLifecycle.servesBackingServiceOffCluster(env, kind); }\n static getRequiredPlatformServices(): PlatformWildoServices[] { return EnvironmentLifecycle.getRequiredPlatformServices(); }\n static getRuntime(envName?: string): WildoDeploymentRuntime { return EnvironmentLifecycle.getRuntime(envName); }\n static detectOS(): PlatformEnvOperatingSystem { return EnvironmentLifecycle.detectOS(); }\n\n // --- Paths delegates ------------------------------------------------------\n\n static getSecretsPath(envName?: string): string { return EnvironmentPaths.getSecretsPath(envName); }\n static getConfigPath(envName?: string): string { return EnvironmentPaths.getConfigPath(envName); }\n static getInfraPath(envName?: string): string { return EnvironmentPaths.getInfraPath(envName); }\n static setPaths(paths: { secretsPath?: string; configPath?: string; infraPath?: string }, envName?: string): void { EnvironmentPaths.setPaths(paths, envName); }\n static resolveSecretsDir(envName?: string): string { return EnvironmentPaths.resolveSecretsDir(envName); }\n static resolveConfigDir(envName?: string): string { return EnvironmentPaths.resolveConfigDir(envName); }\n static resolveInfraDir(envName?: string): string { return EnvironmentPaths.resolveInfraDir(envName); }\n static resolveDockerComposeDir(envName?: string): string { return EnvironmentPaths.resolveDockerComposeDir(envName); }\n static detectSiblingSecretsRepo(frameworkPath: string): string | null { return EnvironmentPaths.detectSiblingSecretsRepo(frameworkPath); }\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { spawnSync } from 'child_process';
1
+ import { spawn, spawnSync } from 'child_process';
2
2
  /** OCI annotation keys (image-spec `annotations.md`, dead-plan-citation: the OCI spec's own file), used here as build labels. */
3
3
  export declare const FRAMEWORK_IMAGE_REVISION_LABEL = "org.opencontainers.image.revision";
4
4
  export declare const FRAMEWORK_IMAGE_CREATED_LABEL = "org.opencontainers.image.created";
@@ -147,22 +147,52 @@ export interface FrameworkDockerPublishResult {
147
147
  */
148
148
  export declare const FRAMEWORK_DOCKER_IMAGE_PLATFORMS: readonly ["linux/amd64", "linux/arm64"];
149
149
  /**
150
- * How long one image build may run, and how many times it is tried (#3063).
150
+ * How long one image build may run, and how many times it is tried (#3063, #3963).
151
151
  *
152
152
  * The arm64 half is built under QEMU, and QEMU can crash the emulated Node process (`qemu: uncaught target
153
153
  * signal 4 (Illegal instruction)`) with nothing in the build noticing: the 1.1.13 release (framework-release
154
154
  * run 43566115901, 2026-11-14) crashed 103 s into the arm64 `pnpm install`, printed nothing for two hours and
155
- * was cancelled by GitHub's three-hour job limit, with the version tagged and nothing published. The same
156
- * step took 3 min 54 s in the 1.1.12 release, from the same base image digest and the same QEMU, so the crash
157
- * is intermittent, and a second attempt is the remedy.
155
+ * was cancelled by GitHub's three-hour job limit, with the version tagged and nothing published. The crash is
156
+ * intermittent (same base image digest, same QEMU), and FREQUENT: the 1.1.14 release (run 43853716196,
157
+ * 2026-11-16) crashed on both of its two attempts, so 3 of the 4 arm64 attempts then recorded crashed.
158
158
  *
159
- * A whole build (both platforms, attestations, push) took 8 min 14 s for 1.1.12, so the bound is generous.
160
- * Two attempts fit inside the release job's limit with the rest of the lane. A retry cannot release half an
161
- * image: `buildx build --push` writes the tag only after every platform has built, and the tag is the
162
- * release's own, which nothing names until the npm step that follows.
159
+ * So an attempt ends the moment QEMU reports the crash (`QEMU_CRASH_PATTERN`) and is tried again, which costs
160
+ * about two minutes rather than the whole bound. The bound stays for a build that hangs WITHOUT that line, and
161
+ * at most `FRAMEWORK_DOCKER_IMAGE_BUILD_TIMEOUTS` attempts may run it out: the worst case is the two silent
162
+ * 50-minute attempts the lane already allowed, which fit inside the release job's limit with the rest of the
163
+ * lane. A whole build (both platforms, attestations, push) took 8 min 14 s for 1.1.12.
164
+ *
165
+ * A retry cannot release half an image: `buildx build --push` writes the tag only after every platform has
166
+ * built, and the tag is the release's own, which nothing names until the npm step that follows.
163
167
  */
164
168
  export declare const FRAMEWORK_DOCKER_IMAGE_BUILD_TIMEOUT_MS: number;
165
- export declare const FRAMEWORK_DOCKER_IMAGE_BUILD_ATTEMPTS = 2;
169
+ export declare const FRAMEWORK_DOCKER_IMAGE_BUILD_ATTEMPTS = 4;
170
+ export declare const FRAMEWORK_DOCKER_IMAGE_BUILD_TIMEOUTS = 2;
171
+ /**
172
+ * What QEMU prints when an emulated process dies of a signal nothing handled. A process that probes a CPU
173
+ * feature by catching SIGILL (OpenSSL does) never produces it, because the signal is caught; this line means
174
+ * an emulated process is DEAD, and in every recorded instance the build then hung without another word. It
175
+ * appears in none of the successful release logs read (#3963), so ending the attempt on it cannot end a build
176
+ * that would have finished.
177
+ */
178
+ export declare const QEMU_CRASH_PATTERN: RegExp;
179
+ /**
180
+ * How one image build attempt ended (#3963). Only `SUCCEEDED` ends the build; `TIMED_OUT` counts against
181
+ * `FRAMEWORK_DOCKER_IMAGE_BUILD_TIMEOUTS`; `SPAWN_FAILED` (docker itself could not start) is not retried, since
182
+ * a second start would fail the same way; the rest are tried again.
183
+ */
184
+ export declare enum DockerBuildAttemptOutcome {
185
+ /** buildx exited 0: every platform built and the index was pushed. */
186
+ SUCCEEDED = "succeeded",
187
+ /** The attempt ran out of `FRAMEWORK_DOCKER_IMAGE_BUILD_TIMEOUT_MS` and was ended. */
188
+ TIMED_OUT = "timed-out",
189
+ /** QEMU printed `QEMU_CRASH_PATTERN`, and the attempt was ended without waiting for the bound. */
190
+ EMULATOR_CRASHED = "emulator-crashed",
191
+ /** The `docker` process could not be started at all. */
192
+ SPAWN_FAILED = "spawn-failed",
193
+ /** buildx exited non-zero, or was ended by a signal this lane did not send. */
194
+ FAILED = "failed"
195
+ }
166
196
  export declare class FrameworkDockerPublishService {
167
197
  static publishImages(options?: FrameworkDockerPublishOptions): Promise<FrameworkDockerPublishResult>;
168
198
  /** The image index digest buildx recorded in its metadata file, or undefined when it recorded none. */
@@ -230,12 +260,22 @@ export declare class FrameworkDockerPublishService {
230
260
  */
231
261
  private static runDockerLogin;
232
262
  /**
233
- * Run one image build, bounded by `FRAMEWORK_DOCKER_IMAGE_BUILD_TIMEOUT_MS` and tried
234
- * `FRAMEWORK_DOCKER_IMAGE_BUILD_ATTEMPTS` times. A build that runs out of time is killed (SIGTERM ends the buildx
235
- * client, and BuildKit cancels the build when its session closes). Every failure says which attempt it was and
236
- * why, so a release log shows a hang as a hang rather than as silence.
263
+ * Run one image build, bounded by `FRAMEWORK_DOCKER_IMAGE_BUILD_TIMEOUT_MS` and tried up to
264
+ * `FRAMEWORK_DOCKER_IMAGE_BUILD_ATTEMPTS` times (#3063, #3963).
265
+ *
266
+ * The output is streamed through, unchanged, and watched: the moment QEMU reports a crashed emulated process
267
+ * (`QEMU_CRASH_PATTERN`) the attempt is ended and tried again, instead of waiting out the bound in silence. A
268
+ * build that runs out of time is ended the same way; at most `FRAMEWORK_DOCKER_IMAGE_BUILD_TIMEOUTS` attempts
269
+ * may, so the worst case stays two full bounds. Ending an attempt sends SIGTERM to the buildx client, and
270
+ * BuildKit cancels the build when its session closes. Every failure says which attempt it was and why.
271
+ */
272
+ static runDockerBuild(label: string, args: string[], spawnProcess?: typeof spawn, log?: (message: string) => void, timeoutMs?: number): Promise<void>;
273
+ /**
274
+ * One build attempt: docker's output goes to this process's own stdout/stderr as it arrives (a release log
275
+ * reads exactly as before), and each line is checked against `QEMU_CRASH_PATTERN`. Lines are reassembled
276
+ * across chunks so a crash line split by the pipe is still seen.
237
277
  */
238
- static runDockerBuild(label: string, args: string[], spawn?: typeof spawnSync, log?: (message: string) => void): void;
278
+ private static runOneDockerBuild;
239
279
  private static runDockerCommand;
240
280
  }
241
281
  //# sourceMappingURL=framework-docker-publish.service.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"framework-docker-publish.service.d.ts","sourceRoot":"","sources":["../../../../src/services/framework/framework-docker-publish.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAkB1C,iIAAiI;AACjI,eAAO,MAAM,8BAA8B,sCAAsC,CAAC;AAClF,eAAO,MAAM,6BAA6B,qCAAqC,CAAC;AAChF;;;GAGG;AACH,eAAO,MAAM,6BAA6B,qCAAqC,CAAC;AAChF,kGAAkG;AAClG,eAAO,MAAM,4BAA4B,oCAAoC,CAAC;AAE9E;;;;;;GAMG;AACH,eAAO,MAAM,gCAAgC,mDAAoD,CAAC;AAElG;;;;GAIG;AACH,oBAAY,qBAAqB;IAC/B;;;;;;;;;OASG;IACH,cAAc,mBAAmB;CAClC;AAED,wHAAwH;AACxH,eAAO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,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI;IAWtF,OAAO,CAAC,MAAM,CAAC,mBAAmB;IAkBlC,OAAO,CAAC,MAAM,CAAC,uBAAuB;IAItC,OAAO,CAAC,MAAM,CAAC,iBAAiB;IAOhC;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,cAAc;IAe7B;;;;;OAKG;IACH,MAAM,CAAC,cAAc,CACnB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EAAE,EACd,KAAK,GAAE,OAAO,SAAqB,EACnC,GAAG,GAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAA0C,GACnE,IAAI;IAiBP,OAAO,CAAC,MAAM,CAAC,gBAAgB;CAShC"}
1
+ {"version":3,"file":"framework-docker-publish.service.d.ts","sourceRoot":"","sources":["../../../../src/services/framework/framework-docker-publish.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAkBjD,iIAAiI;AACjI,eAAO,MAAM,8BAA8B,sCAAsC,CAAC;AAClF,eAAO,MAAM,6BAA6B,qCAAqC,CAAC;AAChF;;;GAGG;AACH,eAAO,MAAM,6BAA6B,qCAAqC,CAAC;AAChF,kGAAkG;AAClG,eAAO,MAAM,4BAA4B,oCAAoC,CAAC;AAE9E;;;;;;GAMG;AACH,eAAO,MAAM,gCAAgC,mDAAoD,CAAC;AAElG;;;;GAIG;AACH,oBAAY,qBAAqB;IAC/B;;;;;;;;;OASG;IACH,cAAc,mBAAmB;CAClC;AAED,wHAAwH;AACxH,eAAO,MAAM,2BAA2B,kCAAkC,CAAC;AAE3E,6HAA6H;AAC7H,eAAO,MAAM,0BAA0B,gDAAgD,CAAC;AAExF;;;GAGG;AACH,wBAAgB,+BAA+B,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,GAAG,SAAS,CAGxG;AAED,4CAA4C;AAC5C,oBAAY,8BAA8B;I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AAC,MAAM,CAAC,mBAAmB;IAmBlC;;;OAGG;IACH,MAAM,CAAC,oBAAoB,CAAC,aAAa,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI;IAWtF,OAAO,CAAC,MAAM,CAAC,mBAAmB;IAkBlC,OAAO,CAAC,MAAM,CAAC,uBAAuB;IAItC,OAAO,CAAC,MAAM,CAAC,iBAAiB;IAOhC;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,cAAc;IAe7B;;;;;;;;;OASG;WACU,cAAc,CACzB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EAAE,EACd,YAAY,GAAE,OAAO,KAAa,EAClC,GAAG,GAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAA0C,EACpE,SAAS,GAAE,MAAgD,GAC1D,OAAO,CAAC,IAAI,CAAC;IA0BhB;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,iBAAiB;IAgDhC,OAAO,CAAC,MAAM,CAAC,gBAAgB;CAShC"}
@@ -1,4 +1,4 @@
1
- import { spawnSync } from 'child_process';
1
+ import { spawn, spawnSync } from 'child_process';
2
2
  import { existsSync, mkdtempSync, readFileSync, rmSync } from 'fs';
3
3
  import { tmpdir } from 'os';
4
4
  import { join, relative } from 'path';
@@ -161,22 +161,53 @@ const FRAMEWORK_DOCKER_IMAGE_BUILD_DEFINITIONS = {
161
161
  */
162
162
  export const FRAMEWORK_DOCKER_IMAGE_PLATFORMS = ['linux/amd64', 'linux/arm64'];
163
163
  /**
164
- * How long one image build may run, and how many times it is tried (#3063).
164
+ * How long one image build may run, and how many times it is tried (#3063, #3963).
165
165
  *
166
166
  * The arm64 half is built under QEMU, and QEMU can crash the emulated Node process (`qemu: uncaught target
167
167
  * signal 4 (Illegal instruction)`) with nothing in the build noticing: the 1.1.13 release (framework-release
168
168
  * run 43566115901, 2026-11-14) crashed 103 s into the arm64 `pnpm install`, printed nothing for two hours and
169
- * was cancelled by GitHub's three-hour job limit, with the version tagged and nothing published. The same
170
- * step took 3 min 54 s in the 1.1.12 release, from the same base image digest and the same QEMU, so the crash
171
- * is intermittent, and a second attempt is the remedy.
169
+ * was cancelled by GitHub's three-hour job limit, with the version tagged and nothing published. The crash is
170
+ * intermittent (same base image digest, same QEMU), and FREQUENT: the 1.1.14 release (run 43853716196,
171
+ * 2026-11-16) crashed on both of its two attempts, so 3 of the 4 arm64 attempts then recorded crashed.
172
172
  *
173
- * A whole build (both platforms, attestations, push) took 8 min 14 s for 1.1.12, so the bound is generous.
174
- * Two attempts fit inside the release job's limit with the rest of the lane. A retry cannot release half an
175
- * image: `buildx build --push` writes the tag only after every platform has built, and the tag is the
176
- * release's own, which nothing names until the npm step that follows.
173
+ * So an attempt ends the moment QEMU reports the crash (`QEMU_CRASH_PATTERN`) and is tried again, which costs
174
+ * about two minutes rather than the whole bound. The bound stays for a build that hangs WITHOUT that line, and
175
+ * at most `FRAMEWORK_DOCKER_IMAGE_BUILD_TIMEOUTS` attempts may run it out: the worst case is the two silent
176
+ * 50-minute attempts the lane already allowed, which fit inside the release job's limit with the rest of the
177
+ * lane. A whole build (both platforms, attestations, push) took 8 min 14 s for 1.1.12.
178
+ *
179
+ * A retry cannot release half an image: `buildx build --push` writes the tag only after every platform has
180
+ * built, and the tag is the release's own, which nothing names until the npm step that follows.
177
181
  */
178
182
  export const FRAMEWORK_DOCKER_IMAGE_BUILD_TIMEOUT_MS = 50 * 60_000;
179
- export const FRAMEWORK_DOCKER_IMAGE_BUILD_ATTEMPTS = 2;
183
+ export const FRAMEWORK_DOCKER_IMAGE_BUILD_ATTEMPTS = 4;
184
+ export const FRAMEWORK_DOCKER_IMAGE_BUILD_TIMEOUTS = 2;
185
+ /**
186
+ * What QEMU prints when an emulated process dies of a signal nothing handled. A process that probes a CPU
187
+ * feature by catching SIGILL (OpenSSL does) never produces it, because the signal is caught; this line means
188
+ * an emulated process is DEAD, and in every recorded instance the build then hung without another word. It
189
+ * appears in none of the successful release logs read (#3963), so ending the attempt on it cannot end a build
190
+ * that would have finished.
191
+ */
192
+ export const QEMU_CRASH_PATTERN = /qemu: uncaught target signal \d+/;
193
+ /**
194
+ * How one image build attempt ended (#3963). Only `SUCCEEDED` ends the build; `TIMED_OUT` counts against
195
+ * `FRAMEWORK_DOCKER_IMAGE_BUILD_TIMEOUTS`; `SPAWN_FAILED` (docker itself could not start) is not retried, since
196
+ * a second start would fail the same way; the rest are tried again.
197
+ */
198
+ export var DockerBuildAttemptOutcome;
199
+ (function (DockerBuildAttemptOutcome) {
200
+ /** buildx exited 0: every platform built and the index was pushed. */
201
+ DockerBuildAttemptOutcome["SUCCEEDED"] = "succeeded";
202
+ /** The attempt ran out of `FRAMEWORK_DOCKER_IMAGE_BUILD_TIMEOUT_MS` and was ended. */
203
+ DockerBuildAttemptOutcome["TIMED_OUT"] = "timed-out";
204
+ /** QEMU printed `QEMU_CRASH_PATTERN`, and the attempt was ended without waiting for the bound. */
205
+ DockerBuildAttemptOutcome["EMULATOR_CRASHED"] = "emulator-crashed";
206
+ /** The `docker` process could not be started at all. */
207
+ DockerBuildAttemptOutcome["SPAWN_FAILED"] = "spawn-failed";
208
+ /** buildx exited non-zero, or was ended by a signal this lane did not send. */
209
+ DockerBuildAttemptOutcome["FAILED"] = "failed";
210
+ })(DockerBuildAttemptOutcome || (DockerBuildAttemptOutcome = {}));
180
211
  export class FrameworkDockerPublishService {
181
212
  static async publishImages(options = {}) {
182
213
  const resolvedFrameworkRoot = options.frameworkRoot ?? FrameworkReleaseService.getFrameworkRoot();
@@ -250,7 +281,7 @@ export class FrameworkDockerPublishService {
250
281
  const metadataDir = mkdtempSync(join(tmpdir(), 'wildo-image-metadata-'));
251
282
  const metadataFile = join(metadataDir, 'metadata.json');
252
283
  try {
253
- FrameworkDockerPublishService.runDockerBuild('buildx build --push', [
284
+ await FrameworkDockerPublishService.runDockerBuild('buildx build --push', [
254
285
  'buildx',
255
286
  'build',
256
287
  '--platform',
@@ -481,29 +512,88 @@ export class FrameworkDockerPublishService {
481
512
  }
482
513
  }
483
514
  /**
484
- * Run one image build, bounded by `FRAMEWORK_DOCKER_IMAGE_BUILD_TIMEOUT_MS` and tried
485
- * `FRAMEWORK_DOCKER_IMAGE_BUILD_ATTEMPTS` times. A build that runs out of time is killed (SIGTERM ends the buildx
486
- * client, and BuildKit cancels the build when its session closes). Every failure says which attempt it was and
487
- * why, so a release log shows a hang as a hang rather than as silence.
515
+ * Run one image build, bounded by `FRAMEWORK_DOCKER_IMAGE_BUILD_TIMEOUT_MS` and tried up to
516
+ * `FRAMEWORK_DOCKER_IMAGE_BUILD_ATTEMPTS` times (#3063, #3963).
517
+ *
518
+ * The output is streamed through, unchanged, and watched: the moment QEMU reports a crashed emulated process
519
+ * (`QEMU_CRASH_PATTERN`) the attempt is ended and tried again, instead of waiting out the bound in silence. A
520
+ * build that runs out of time is ended the same way; at most `FRAMEWORK_DOCKER_IMAGE_BUILD_TIMEOUTS` attempts
521
+ * may, so the worst case stays two full bounds. Ending an attempt sends SIGTERM to the buildx client, and
522
+ * BuildKit cancels the build when its session closes. Every failure says which attempt it was and why.
488
523
  */
489
- static runDockerBuild(label, args, spawn = spawnSync, log = (message) => console.error(message)) {
524
+ static async runDockerBuild(label, args, spawnProcess = spawn, log = (message) => console.error(message), timeoutMs = FRAMEWORK_DOCKER_IMAGE_BUILD_TIMEOUT_MS) {
490
525
  const minutes = Math.round(FRAMEWORK_DOCKER_IMAGE_BUILD_TIMEOUT_MS / 60_000);
526
+ let timeouts = 0;
491
527
  for (let attempt = 1; attempt <= FRAMEWORK_DOCKER_IMAGE_BUILD_ATTEMPTS; attempt += 1) {
492
- const result = spawn('docker', args, { encoding: 'utf8', stdio: 'inherit', timeout: FRAMEWORK_DOCKER_IMAGE_BUILD_TIMEOUT_MS });
493
- if (result.status === 0)
528
+ const outcome = await FrameworkDockerPublishService.runOneDockerBuild(args, spawnProcess, timeoutMs);
529
+ if (outcome.kind === DockerBuildAttemptOutcome.SUCCEEDED)
494
530
  return;
495
- const timedOut = result.error?.code === 'ETIMEDOUT';
496
- const reason = timedOut
531
+ if (outcome.kind === DockerBuildAttemptOutcome.TIMED_OUT)
532
+ timeouts += 1;
533
+ const reason = outcome.kind === DockerBuildAttemptOutcome.TIMED_OUT
497
534
  ? `it ran out of its ${minutes} minutes (an emulated platform can hang without a word)`
498
- : result.signal
499
- ? `it was ended by ${result.signal}`
500
- : `it exited ${result.status ?? 'without a status'}`;
501
- const last = attempt === FRAMEWORK_DOCKER_IMAGE_BUILD_ATTEMPTS;
535
+ : outcome.kind === DockerBuildAttemptOutcome.EMULATOR_CRASHED
536
+ ? `QEMU crashed an emulated process ("${outcome.line}"), after which the build never finishes`
537
+ : outcome.kind === DockerBuildAttemptOutcome.SPAWN_FAILED
538
+ ? `docker could not be started (${outcome.message})`
539
+ : outcome.signal
540
+ ? `it was ended by ${outcome.signal}`
541
+ : `it exited ${outcome.status ?? 'without a status'}`;
542
+ const last = attempt === FRAMEWORK_DOCKER_IMAGE_BUILD_ATTEMPTS ||
543
+ timeouts >= FRAMEWORK_DOCKER_IMAGE_BUILD_TIMEOUTS ||
544
+ outcome.kind === DockerBuildAttemptOutcome.SPAWN_FAILED;
502
545
  log(`Docker ${label}, attempt ${attempt} of ${FRAMEWORK_DOCKER_IMAGE_BUILD_ATTEMPTS}: ${reason}.${last ? '' : ' Trying again.'}`);
503
546
  if (last)
504
- throw new Error(`Docker ${label} failed after ${FRAMEWORK_DOCKER_IMAGE_BUILD_ATTEMPTS} attempts: ${reason}.`);
547
+ throw new Error(`Docker ${label} failed after ${attempt} attempt${attempt === 1 ? '' : 's'}: ${reason}.`);
505
548
  }
506
549
  }
550
+ /**
551
+ * One build attempt: docker's output goes to this process's own stdout/stderr as it arrives (a release log
552
+ * reads exactly as before), and each line is checked against `QEMU_CRASH_PATTERN`. Lines are reassembled
553
+ * across chunks so a crash line split by the pipe is still seen.
554
+ */
555
+ static runOneDockerBuild(args, spawnProcess, timeoutMs) {
556
+ return new Promise((resolve) => {
557
+ const child = spawnProcess('docker', args, { stdio: ['ignore', 'pipe', 'pipe'] });
558
+ let ended;
559
+ const end = (reason) => {
560
+ if (ended)
561
+ return;
562
+ ended = reason;
563
+ child.kill('SIGTERM');
564
+ };
565
+ const timer = setTimeout(() => end({ kind: DockerBuildAttemptOutcome.TIMED_OUT }), timeoutMs);
566
+ const watch = (stream, sink) => {
567
+ let pending = '';
568
+ stream?.on('data', (chunk) => {
569
+ const text = chunk.toString();
570
+ sink.write(text);
571
+ const lines = (pending + text).split('\n');
572
+ pending = lines.pop() ?? '';
573
+ for (const line of lines) {
574
+ const crash = QEMU_CRASH_PATTERN.exec(line);
575
+ if (crash)
576
+ end({ kind: DockerBuildAttemptOutcome.EMULATOR_CRASHED, line: line.slice(crash.index).trim() });
577
+ }
578
+ });
579
+ };
580
+ watch(child.stdout, process.stdout);
581
+ watch(child.stderr, process.stderr);
582
+ child.on('error', (error) => {
583
+ clearTimeout(timer);
584
+ resolve({ kind: DockerBuildAttemptOutcome.SPAWN_FAILED, message: error.message });
585
+ });
586
+ child.on('close', (status, signal) => {
587
+ clearTimeout(timer);
588
+ if (ended)
589
+ resolve(ended);
590
+ else if (status === 0)
591
+ resolve({ kind: DockerBuildAttemptOutcome.SUCCEEDED });
592
+ else
593
+ resolve({ kind: DockerBuildAttemptOutcome.FAILED, status, signal });
594
+ });
595
+ });
596
+ }
507
597
  static runDockerCommand(label, args) {
508
598
  const result = spawnSync('docker', args, {
509
599
  encoding: 'utf8',