@atlashub/smartstack-cli 4.74.0 → 4.76.0

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 (121) hide show
  1. package/dist/index.js +152 -31
  2. package/dist/index.js.map +1 -1
  3. package/dist/mcp-entry.mjs +14 -3
  4. package/dist/mcp-entry.mjs.map +1 -1
  5. package/package.json +1 -1
  6. package/templates/agents/ba-reader.md +17 -15
  7. package/templates/agents/ba-writer.md +49 -51
  8. package/templates/skills/apex/SKILL.md +2 -2
  9. package/templates/skills/apex/_shared.md +1 -1
  10. package/templates/skills/apex/references/checks/backend-checks.sh +21 -7
  11. package/templates/skills/apex/references/checks/frontend-checks.sh +26 -0
  12. package/templates/skills/apex/references/checks/infrastructure-checks.sh +47 -10
  13. package/templates/skills/apex/references/checks/seed-checks.sh +47 -7
  14. package/templates/skills/apex/references/core-seed-data.md +20 -18
  15. package/templates/skills/apex/references/frontend-route-wiring-app-tsx.md +3 -0
  16. package/templates/skills/apex/references/post-checks.md +23 -3
  17. package/templates/skills/apex/references/smartstack-api.md +4 -4
  18. package/templates/skills/apex/references/smartstack-frontend.md +54 -8
  19. package/templates/skills/apex/references/smartstack-layers.md +6 -6
  20. package/templates/skills/apex/steps/step-00-init.md +75 -1
  21. package/templates/skills/apex/steps/step-03-execute.md +16 -4
  22. package/templates/skills/apex/steps/step-03b-layer1-seed.md +65 -6
  23. package/templates/skills/apex/steps/step-03c-layer2-backend.md +50 -5
  24. package/templates/skills/apex/steps/step-03d-layer3-frontend.md +226 -4
  25. package/templates/skills/apex/steps/step-04-examine.md +163 -0
  26. package/templates/skills/apex-verify/SKILL.md +110 -0
  27. package/templates/skills/apex-verify/references/audit-rules.md +50 -0
  28. package/templates/skills/apex-verify/steps/step-00-init.md +119 -0
  29. package/templates/skills/apex-verify/steps/step-01-nav-audit.md +92 -0
  30. package/templates/skills/apex-verify/steps/step-02-crud-audit.md +127 -0
  31. package/templates/skills/apex-verify/steps/step-03-perm-audit.md +119 -0
  32. package/templates/skills/apex-verify/steps/step-04-route-audit.md +98 -0
  33. package/templates/skills/apex-verify/steps/step-05-report.md +110 -0
  34. package/templates/skills/application/references/frontend-route-wiring-app-tsx.md +3 -0
  35. package/templates/skills/application/templates-frontend.md +2 -2
  36. package/templates/skills/business-analyse/SKILL.md +17 -3
  37. package/templates/skills/business-analyse/_shared.md +64 -0
  38. package/templates/skills/business-analyse/patterns/suggestion-catalog.md +34 -26
  39. package/templates/skills/business-analyse/questionnaire/01-context.md +13 -9
  40. package/templates/skills/business-analyse/questionnaire/02-stakeholders-scope.md +20 -27
  41. package/templates/skills/business-analyse/questionnaire.md +86 -9
  42. package/templates/skills/business-analyse/references/03-json-schemas.md +221 -0
  43. package/templates/skills/business-analyse/references/03-post-check-validation.md +208 -0
  44. package/templates/skills/business-analyse/references/03-smartstack-entity-guards.md +32 -0
  45. package/templates/skills/business-analyse/references/04-cross-module-validation.md +95 -0
  46. package/templates/skills/business-analyse/references/04-file-allocation.md +162 -0
  47. package/templates/skills/business-analyse/references/04-naming-audit-checks.md +174 -0
  48. package/templates/skills/business-analyse/references/04-semantic-validation-matrix.md +118 -0
  49. package/templates/skills/business-analyse/references/canonical-json-formats.md +7 -3
  50. package/templates/skills/business-analyse/references/domain-research-playbook.md +234 -0
  51. package/templates/skills/business-analyse/references/entity-sourcing-presentation.md +166 -0
  52. package/templates/skills/business-analyse/references/init-resume-logic.md +70 -0
  53. package/templates/skills/business-analyse/references/module-completeness-challenge.md +174 -0
  54. package/templates/skills/business-analyse/references/multi-app-detection.md +149 -0
  55. package/templates/skills/business-analyse/references/portal-classification.md +52 -0
  56. package/templates/skills/business-analyse/references/robustness-checks.md +1 -1
  57. package/templates/skills/business-analyse/references/validation-checklist.md +35 -6
  58. package/templates/skills/business-analyse/schemas/sections/analysis-schema.json +50 -6
  59. package/templates/skills/business-analyse/steps/step-00-init.md +22 -190
  60. package/templates/skills/business-analyse/steps/step-01-cadrage.md +365 -269
  61. package/templates/skills/business-analyse/steps/step-02-structure.md +98 -20
  62. package/templates/skills/business-analyse/steps/step-03-specify.md +810 -229
  63. package/templates/skills/business-analyse/steps/step-04-consolidate.md +509 -278
  64. package/templates/skills/business-analyse-design/SKILL.md +10 -0
  65. package/templates/skills/business-analyse-design/references/screens-post-check.md +221 -0
  66. package/templates/skills/business-analyse-design/references/screens-type-mapping.md +138 -0
  67. package/templates/skills/business-analyse-design/references/smartcomponents-templates.md +225 -0
  68. package/templates/skills/{business-analyse → business-analyse-design}/references/spec-auto-inference.md +117 -117
  69. package/templates/skills/business-analyse-design/steps/step-01-screens.md +36 -162
  70. package/templates/skills/business-analyse-design/steps/step-02-wireframes.md +8 -7
  71. package/templates/skills/business-analyse-design/steps/step-03-navigation.md +89 -42
  72. package/templates/skills/business-analyse-develop/references/compact-loop.md +9 -0
  73. package/templates/skills/business-analyse-develop/references/handoff-quality-gate.md +132 -0
  74. package/templates/skills/business-analyse-develop/references/prd-v3-transformation.md +326 -0
  75. package/templates/skills/business-analyse-develop/references/report-reconciliation.md +140 -0
  76. package/templates/skills/business-analyse-develop/references/report-template.md +142 -0
  77. package/templates/skills/business-analyse-develop/steps/step-01-task.md +5 -177
  78. package/templates/skills/business-analyse-develop/steps/step-02-execute.md +17 -4
  79. package/templates/skills/business-analyse-develop/steps/step-03-commit.md +6 -2
  80. package/templates/skills/business-analyse-develop/steps/step-04-check.md +6 -0
  81. package/templates/skills/business-analyse-develop/steps/step-05-report.md +3 -269
  82. package/templates/skills/business-analyse-handoff/SKILL.md +10 -0
  83. package/templates/skills/business-analyse-handoff/references/agent-handoff-transform-prompt.md +211 -0
  84. package/templates/skills/business-analyse-handoff/references/context-isolation-pattern.md +47 -0
  85. package/templates/skills/business-analyse-handoff/references/handoff-file-inventory.md +49 -0
  86. package/templates/skills/business-analyse-handoff/references/handoff-global-validation.md +142 -0
  87. package/templates/skills/business-analyse-handoff/references/prd-validation-checks.md +125 -0
  88. package/templates/skills/business-analyse-handoff/references/project-index-update.md +98 -0
  89. package/templates/skills/business-analyse-handoff/steps/step-01-transform.md +9 -160
  90. package/templates/skills/business-analyse-handoff/steps/step-02-export.md +10 -99
  91. package/templates/skills/business-analyse-html/SKILL.md +10 -0
  92. package/templates/skills/business-analyse-html/html/ba-interactive.html +504 -97
  93. package/templates/skills/business-analyse-html/html/src/scripts/01-data-init.js +79 -2
  94. package/templates/skills/business-analyse-html/html/src/scripts/02-navigation.js +6 -46
  95. package/templates/skills/business-analyse-html/html/src/scripts/05-render-specs.js +80 -11
  96. package/templates/skills/business-analyse-html/html/src/scripts/06-render-consolidation.js +2 -2
  97. package/templates/skills/business-analyse-html/html/src/scripts/06-render-mockups.js +94 -36
  98. package/templates/skills/business-analyse-html/html/src/scripts/12-render-diagrams.js +162 -0
  99. package/templates/skills/business-analyse-html/html/src/styles/10-diagrams.css +73 -0
  100. package/templates/skills/business-analyse-html/html/src/template.html +2 -0
  101. package/templates/skills/business-analyse-html/references/02-embedded-artifacts-building.md +144 -0
  102. package/templates/skills/business-analyse-html/references/02-feature-data-building.md +143 -0
  103. package/templates/skills/business-analyse-html/references/02-mapping-tables.md +442 -0
  104. package/templates/skills/business-analyse-html/references/02-normalization-helpers.md +139 -0
  105. package/templates/skills/business-analyse-html/references/02-screen-format-detection.md +283 -0
  106. package/templates/skills/business-analyse-html/references/02-self-check-validation.md +199 -0
  107. package/templates/skills/business-analyse-html/references/data-build.md +24 -1
  108. package/templates/skills/business-analyse-html/references/data-mapping.md +119 -17
  109. package/templates/skills/business-analyse-html/steps/step-02-build-data.md +18 -555
  110. package/templates/skills/business-analyse-html/steps/step-04-verify.md +92 -3
  111. package/templates/skills/business-analyse-quick/SKILL.md +807 -0
  112. package/templates/skills/{sketch → business-analyse-quick}/references/domain-heuristics.md +59 -3
  113. package/templates/skills/business-analyse-quick/references/prd-schema.md +268 -0
  114. package/templates/skills/business-analyse-review/SKILL.md +10 -0
  115. package/templates/skills/business-analyse-review/references/review-data-mapping.md +6 -0
  116. package/templates/skills/business-analyse-status/SKILL.md +8 -0
  117. package/templates/skills/dev-start/SKILL.md +143 -307
  118. package/templates/skills/efcore/SKILL.md +13 -0
  119. package/templates/skills/sketch/SKILL.md +15 -153
  120. package/templates/skills/ui-components/SKILL.md +1 -1
  121. package/templates/skills/ui-components/patterns/data-table.md +1 -1
package/dist/index.js CHANGED
@@ -127614,7 +127614,7 @@ function resolvePodmanCmd() {
127614
127614
  (0, import_path13.join)(process.env.LOCALAPPDATA || "", "RedHat", "Podman", "podman.exe")
127615
127615
  ];
127616
127616
  for (const p of knownPaths) {
127617
- if (require("fs").existsSync(p)) return `"${p}"`;
127617
+ if (require("fs").existsSync(p)) return p;
127618
127618
  }
127619
127619
  }
127620
127620
  return "podman";
@@ -127649,6 +127649,22 @@ function getContainerEngineStatus() {
127649
127649
  }
127650
127650
  return null;
127651
127651
  }
127652
+ function checkWindowsVirt() {
127653
+ try {
127654
+ (0, import_child_process8.execSync)("wsl --status", { encoding: "utf-8", timeout: 5e3, stdio: "pipe" });
127655
+ } catch {
127656
+ return "wsl-missing";
127657
+ }
127658
+ try {
127659
+ const state = (0, import_child_process8.execSync)(
127660
+ 'powershell -NoProfile -Command "(Get-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform).State"',
127661
+ { encoding: "utf-8", timeout: 1e4, stdio: "pipe" }
127662
+ ).trim();
127663
+ if (state === "Disabled") return "hyperv-disabled";
127664
+ } catch {
127665
+ }
127666
+ return null;
127667
+ }
127652
127668
  function getNodeVersion() {
127653
127669
  return process.version;
127654
127670
  }
@@ -127812,19 +127828,15 @@ var doctorCommand = new Command("doctor").description("Run diagnostics and check
127812
127828
  });
127813
127829
  } else if (containerEngine && !containerEngine.running) {
127814
127830
  const isPodman = containerEngine.name === "Podman";
127815
- const wslMissing = isPodman && process.platform === "win32" && (() => {
127816
- try {
127817
- return (0, import_child_process8.execSync)("wsl --status", { encoding: "utf-8", timeout: 5e3, stdio: "pipe" }) && false;
127818
- } catch {
127819
- return true;
127820
- }
127821
- })();
127831
+ const virtIssue = isPodman && process.platform === "win32" ? checkWindowsVirt() : null;
127832
+ const virtMessage = virtIssue === "wsl-missing" ? "Podman installed but WSL2 is missing" : virtIssue === "hyperv-disabled" ? "Podman installed but hardware virtualization is not enabled" : `${containerEngine.name} installed but ${isPodman ? "machine" : "daemon"} not running`;
127833
+ const virtFix = virtIssue === "wsl-missing" ? "Run as Admin: wsl --install, restart PC, then: podman machine init && podman machine start" : virtIssue === "hyperv-disabled" ? "Enable VT-x/SVM in BIOS, then run as Admin: wsl --install --no-distribution, restart, then: podman machine init && podman machine start" : isPodman ? "Run: podman machine init && podman machine start" : "Start Docker Desktop, or run: podman machine init && podman machine start";
127822
127834
  diagnostics.push({
127823
127835
  name: "Container Engine",
127824
127836
  status: "warning",
127825
- message: wslMissing ? "Podman installed but WSL2 is missing" : `${containerEngine.name} installed but ${isPodman ? "machine" : "daemon"} not running`,
127826
- fix: wslMissing ? "Run as Admin: wsl --install, restart PC, then: podman machine init && podman machine start" : isPodman ? "Run: podman machine init && podman machine start" : "Start Docker Desktop, or run: podman machine init && podman machine start",
127827
- installCmd: wslMissing ? process.platform === "win32" ? "wsl --install" : void 0 : void 0
127837
+ message: virtMessage,
127838
+ fix: virtFix,
127839
+ installCmd: virtIssue === "wsl-missing" ? process.platform === "win32" ? "wsl --install" : void 0 : void 0
127828
127840
  });
127829
127841
  } else {
127830
127842
  diagnostics.push({
@@ -128248,8 +128260,10 @@ adminCommand.command("reset").description("Reset the localAdmin account password
128248
128260
  const resetViaSqlCmd = async (sqlAuth) => {
128249
128261
  const authLabel = sqlAuth ? "SQL Server Authentication" : "Windows Authentication";
128250
128262
  spinner.text = `Using ${authLabel} (sqlcmd)...`;
128251
- const checkQuery = `SELECT COUNT(*) FROM [core].[auth_Users] WHERE Email = '${adminEmail}'`;
128263
+ logger.debug(`[admin-reset] Using sqlcmd path (${authLabel})`);
128264
+ const checkQuery = `SET NOCOUNT ON; SELECT COUNT(*) FROM [core].[auth_Users] WHERE Email = '${adminEmail}'`;
128252
128265
  const countResult = executeSqlCmd(connInfo.server, connInfo.database, checkQuery, sqlAuth);
128266
+ logger.debug(`[admin-reset] COUNT result: "${countResult}"`);
128253
128267
  const exists = parseInt(countResult, 10) > 0;
128254
128268
  if (!exists) {
128255
128269
  spinner.fail(`Account ${source_default.yellow(adminEmail)} does not exist.`);
@@ -128260,9 +128274,48 @@ adminCommand.command("reset").description("Reset the localAdmin account password
128260
128274
  spinner.text = "Generating new password...";
128261
128275
  const newPassword = generatePassword();
128262
128276
  const passwordHash = await import_bcryptjs.default.hash(newPassword, 12);
128277
+ logger.debug(`[admin-reset] Password length: ${newPassword.length}, Hash prefix: ${passwordHash.substring(0, 7)}`);
128263
128278
  spinner.text = "Updating password...";
128264
- const updateQuery = `UPDATE [core].[auth_Users] SET PasswordHash = '${passwordHash}', MustChangePassword = 0, UpdatedAt = GETUTCDATE() WHERE Email = '${adminEmail}'`;
128265
- executeSqlCmd(connInfo.server, connInfo.database, updateQuery, sqlAuth);
128279
+ const updateQuery = `SET NOCOUNT ON; UPDATE [core].[auth_Users] SET PasswordHash = '${passwordHash}', MustChangePassword = 0, UpdatedAt = GETUTCDATE() WHERE Email = '${adminEmail}'`;
128280
+ const updateResult = executeSqlCmd(connInfo.server, connInfo.database, updateQuery, sqlAuth);
128281
+ logger.debug(`[admin-reset] UPDATE result: "${updateResult}"`);
128282
+ try {
128283
+ executeSqlCmd(
128284
+ connInfo.server,
128285
+ connInfo.database,
128286
+ `SET NOCOUNT ON; UPDATE [core].[auth_Users] SET IsLocked = 0, LockoutEnd = NULL WHERE Email = '${adminEmail}'`,
128287
+ sqlAuth
128288
+ );
128289
+ logger.debug("[admin-reset] Account unlocked (IsLocked = 0)");
128290
+ } catch (unlockErr) {
128291
+ logger.debug(`[admin-reset] Unlock skipped (columns may not exist): ${unlockErr instanceof Error ? unlockErr.message : unlockErr}`);
128292
+ }
128293
+ try {
128294
+ executeSqlCmd(
128295
+ connInfo.server,
128296
+ connInfo.database,
128297
+ `SET NOCOUNT ON; DELETE FROM [core].[auth_Sessions] WHERE UserId = (SELECT Id FROM [core].[auth_Users] WHERE Email = '${adminEmail}') AND IsSuccessful = 0`,
128298
+ sqlAuth
128299
+ );
128300
+ logger.debug("[admin-reset] Failed login sessions cleared");
128301
+ } catch (sessionErr) {
128302
+ logger.debug(`[admin-reset] Session cleanup skipped: ${sessionErr instanceof Error ? sessionErr.message : sessionErr}`);
128303
+ }
128304
+ const verifyQuery = `SET NOCOUNT ON; SELECT PasswordHash FROM [core].[auth_Users] WHERE Email = '${adminEmail}'`;
128305
+ const storedHash = executeSqlCmd(connInfo.server, connInfo.database, verifyQuery, sqlAuth).trim();
128306
+ if (!storedHash) {
128307
+ spinner.fail("Password update failed: no hash found in database after UPDATE");
128308
+ process.exit(1);
128309
+ }
128310
+ const hashMatch = await import_bcryptjs.default.compare(newPassword, storedHash);
128311
+ if (!hashMatch) {
128312
+ spinner.fail("Password update failed: stored hash does not match generated password");
128313
+ logger.error(`Expected hash prefix: ${passwordHash.substring(0, 10)}`);
128314
+ logger.error(`Stored hash prefix: ${storedHash.substring(0, 10)}`);
128315
+ logger.error(`Hash lengths: expected=${passwordHash.length}, stored=${storedHash.length}`);
128316
+ process.exit(1);
128317
+ }
128318
+ logger.debug(`[admin-reset] Verification OK \u2014 hash matches password`);
128266
128319
  spinner.succeed("Password reset successfully!");
128267
128320
  displayPasswordResult(adminEmail, newPassword);
128268
128321
  };
@@ -128291,6 +128344,7 @@ adminCommand.command("reset").description("Reset the localAdmin account password
128291
128344
  console.log();
128292
128345
  };
128293
128346
  const resetViaMssql = async (sqlModule) => {
128347
+ logger.debug(`[admin-reset] Using mssql (node driver) path`);
128294
128348
  spinner.text = "Connected. Checking account...";
128295
128349
  const checkResult = await sqlModule.query`
128296
128350
  SELECT COUNT(*) as count
@@ -128308,14 +128362,54 @@ adminCommand.command("reset").description("Reset the localAdmin account password
128308
128362
  spinner.text = "Generating new password...";
128309
128363
  const newPassword = generatePassword();
128310
128364
  const passwordHash = await import_bcryptjs.default.hash(newPassword, 12);
128365
+ logger.debug(`[admin-reset] Password length: ${newPassword.length}, Hash prefix: ${passwordHash.substring(0, 7)}`);
128311
128366
  spinner.text = "Updating password...";
128312
- await sqlModule.query`
128367
+ const updateResult = await sqlModule.query`
128313
128368
  UPDATE [core].[auth_Users]
128314
128369
  SET PasswordHash = ${passwordHash},
128315
128370
  MustChangePassword = ${false},
128316
128371
  UpdatedAt = ${/* @__PURE__ */ new Date()}
128317
128372
  WHERE Email = ${adminEmail}
128318
128373
  `;
128374
+ logger.debug(`[admin-reset] UPDATE rowsAffected: ${JSON.stringify(updateResult.rowsAffected)}`);
128375
+ if (!updateResult.rowsAffected || updateResult.rowsAffected[0] === 0) {
128376
+ await sqlModule.close();
128377
+ spinner.fail("Password update failed: UPDATE affected 0 rows");
128378
+ process.exit(1);
128379
+ }
128380
+ try {
128381
+ await sqlModule.query`
128382
+ UPDATE [core].[auth_Users]
128383
+ SET IsLocked = ${false}, LockoutEnd = ${null}
128384
+ WHERE Email = ${adminEmail}
128385
+ `;
128386
+ logger.debug("[admin-reset] Account unlocked (IsLocked = 0)");
128387
+ } catch (unlockErr) {
128388
+ logger.debug(`[admin-reset] Unlock skipped (columns may not exist): ${unlockErr instanceof Error ? unlockErr.message : unlockErr}`);
128389
+ }
128390
+ try {
128391
+ await sqlModule.query`
128392
+ DELETE FROM [core].[auth_Sessions]
128393
+ WHERE UserId = (SELECT Id FROM [core].[auth_Users] WHERE Email = ${adminEmail})
128394
+ AND IsSuccessful = ${false}
128395
+ `;
128396
+ logger.debug("[admin-reset] Failed login sessions cleared");
128397
+ } catch (sessionErr) {
128398
+ logger.debug(`[admin-reset] Session cleanup skipped: ${sessionErr instanceof Error ? sessionErr.message : sessionErr}`);
128399
+ }
128400
+ const verifyResult = await sqlModule.query`
128401
+ SELECT PasswordHash FROM [core].[auth_Users] WHERE Email = ${adminEmail}
128402
+ `;
128403
+ const storedHash = verifyResult.recordset[0]?.PasswordHash;
128404
+ const hashMatch = storedHash ? await import_bcryptjs.default.compare(newPassword, storedHash) : false;
128405
+ if (!hashMatch) {
128406
+ await sqlModule.close();
128407
+ spinner.fail("Password update failed: stored hash does not match generated password");
128408
+ logger.error(`Expected hash prefix: ${passwordHash.substring(0, 10)}`);
128409
+ logger.error(`Stored hash prefix: ${(storedHash || "(null)").substring(0, 10)}`);
128410
+ process.exit(1);
128411
+ }
128412
+ logger.debug(`[admin-reset] Verification OK \u2014 hash matches password`);
128319
128413
  await sqlModule.close();
128320
128414
  spinner.succeed("Password reset successfully!");
128321
128415
  displayPasswordResult(adminEmail, newPassword);
@@ -128339,8 +128433,10 @@ adminCommand.command("reset").description("Reset the localAdmin account password
128339
128433
  }
128340
128434
  };
128341
128435
  try {
128436
+ logger.debug(`[admin-reset] Windows Auth: ${connInfo.useWindowsAuth}, Server: ${connInfo.server}, Database: ${connInfo.database}`);
128342
128437
  if (connInfo.useWindowsAuth) {
128343
128438
  const nativeDriver = tryLoadNativeDriver();
128439
+ logger.debug(`[admin-reset] msnodesqlv8 available: ${!!nativeDriver}`);
128344
128440
  let nativeConnected = false;
128345
128441
  if (nativeDriver) {
128346
128442
  try {
@@ -130294,7 +130390,6 @@ function resolveEngineCmd(name) {
130294
130390
  try {
130295
130391
  const result = (0, import_child_process12.spawnSync)(name, ["--version"], {
130296
130392
  encoding: "utf-8",
130297
- shell: true,
130298
130393
  timeout: 5e3,
130299
130394
  stdio: "pipe"
130300
130395
  });
@@ -130309,13 +130404,12 @@ function resolveEngineCmd(name) {
130309
130404
  for (const p of knownPaths) {
130310
130405
  if (import_fs_extra16.default.existsSync(p)) {
130311
130406
  try {
130312
- const result = (0, import_child_process12.spawnSync)(`"${p}"`, ["--version"], {
130407
+ const result = (0, import_child_process12.spawnSync)(p, ["--version"], {
130313
130408
  encoding: "utf-8",
130314
- shell: true,
130315
130409
  timeout: 5e3,
130316
130410
  stdio: "pipe"
130317
130411
  });
130318
- if (result.status === 0) return `"${p}"`;
130412
+ if (result.status === 0) return p;
130319
130413
  } catch {
130320
130414
  }
130321
130415
  }
@@ -130328,7 +130422,6 @@ function checkEngine(name) {
130328
130422
  try {
130329
130423
  const version2 = (0, import_child_process12.spawnSync)(cmd, ["--version"], {
130330
130424
  encoding: "utf-8",
130331
- shell: true,
130332
130425
  timeout: 5e3,
130333
130426
  stdio: "pipe"
130334
130427
  });
@@ -130337,7 +130430,6 @@ function checkEngine(name) {
130337
130430
  }
130338
130431
  const info = (0, import_child_process12.spawnSync)(cmd, ["info"], {
130339
130432
  encoding: "utf-8",
130340
- shell: true,
130341
130433
  timeout: 1e4,
130342
130434
  stdio: "pipe"
130343
130435
  });
@@ -130346,6 +130438,33 @@ function checkEngine(name) {
130346
130438
  return { name, installed: false, running: false, cmd };
130347
130439
  }
130348
130440
  }
130441
+ function checkWindowsVirtualization() {
130442
+ try {
130443
+ const r = (0, import_child_process12.spawnSync)("wsl", ["--status"], { encoding: "utf-8", timeout: 5e3, stdio: "pipe" });
130444
+ if (r.status !== 0) return "wsl-missing";
130445
+ } catch {
130446
+ return "wsl-missing";
130447
+ }
130448
+ try {
130449
+ const r = (0, import_child_process12.spawnSync)("wsl", ["--list", "--quiet"], { encoding: "utf-8", timeout: 5e3, stdio: "pipe" });
130450
+ const output = ((r.stdout || "") + (r.stderr || "")).toLowerCase();
130451
+ if (/virtual machine platform|hypervisor/i.test(output) && r.status !== 0) {
130452
+ return "hyperv-disabled";
130453
+ }
130454
+ } catch {
130455
+ }
130456
+ try {
130457
+ const r = (0, import_child_process12.spawnSync)("powershell", [
130458
+ "-NoProfile",
130459
+ "-Command",
130460
+ "(Get-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform).State"
130461
+ ], { encoding: "utf-8", timeout: 1e4, stdio: "pipe" });
130462
+ const state = (r.stdout || "").trim();
130463
+ if (state === "Disabled") return "hyperv-disabled";
130464
+ } catch {
130465
+ }
130466
+ return null;
130467
+ }
130349
130468
  function detectEngine() {
130350
130469
  const docker = checkEngine("docker");
130351
130470
  if (docker.installed && docker.running) return docker;
@@ -130355,15 +130474,8 @@ function detectEngine() {
130355
130474
  return podman;
130356
130475
  }
130357
130476
  if (podman.installed && !podman.running) {
130358
- const wslMissing = process.platform === "win32" && (() => {
130359
- try {
130360
- const r = (0, import_child_process12.spawnSync)("wsl", ["--status"], { encoding: "utf-8", shell: true, timeout: 5e3, stdio: "pipe" });
130361
- return r.status !== 0;
130362
- } catch {
130363
- return true;
130364
- }
130365
- })();
130366
- if (wslMissing) {
130477
+ const virtIssue = process.platform === "win32" ? checkWindowsVirtualization() : null;
130478
+ if (virtIssue === "wsl-missing") {
130367
130479
  logger.error("WSL2 is required by Podman but is not installed.");
130368
130480
  console.log();
130369
130481
  console.log(` Install WSL2 first (run as Administrator):`);
@@ -130371,6 +130483,16 @@ function detectEngine() {
130371
130483
  console.log(` Restart your PC, then:`);
130372
130484
  console.log(` ${source_default.cyan("podman machine init")}`);
130373
130485
  console.log(` ${source_default.cyan("podman machine start")}`);
130486
+ } else if (virtIssue === "hyperv-disabled") {
130487
+ logger.error("Hardware virtualization is not enabled.");
130488
+ console.log();
130489
+ console.log(` To build Docker images, you need to enable virtualization:`);
130490
+ console.log(` 1. Enable VT-x (Intel) or SVM (AMD) in your BIOS/UEFI settings`);
130491
+ console.log(` 2. Then run as Administrator:`);
130492
+ console.log(` ${source_default.cyan("wsl --install --no-distribution")}`);
130493
+ console.log(` 3. Restart your PC, then:`);
130494
+ console.log(` ${source_default.cyan("podman machine init")}`);
130495
+ console.log(` ${source_default.cyan("podman machine start")}`);
130374
130496
  } else {
130375
130497
  logger.error("Podman is installed but the machine is not running.");
130376
130498
  console.log();
@@ -130449,7 +130571,6 @@ function runCompose(engine, composePath, args) {
130449
130571
  }
130450
130572
  const result = (0, import_child_process12.spawnSync)(engine.cmd, ["compose", "-f", composePath, ...args], {
130451
130573
  encoding: "utf-8",
130452
- shell: true,
130453
130574
  stdio: "pipe",
130454
130575
  cwd: process.cwd(),
130455
130576
  env: { ...process.env, ...extraEnv }