@empire-builder-kit/nx 1.0.0-rc.46 → 1.0.0-rc.47

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 (174) hide show
  1. package/generators.json +11 -1
  2. package/package.json +3 -3
  3. package/src/aws-authority/stage-authority.d.ts +30 -2
  4. package/src/aws-authority/stage-authority.js +220 -25
  5. package/src/developer-agent/generator-planning.js +99 -6
  6. package/src/developer-agent/model.d.ts +7 -3
  7. package/src/developer-agent/model.js +1 -0
  8. package/src/developer-agent/operation-registry.d.ts +1 -0
  9. package/src/developer-agent/operation-registry.js +43 -2
  10. package/src/developer-agent/planning.js +5 -2
  11. package/src/developer-agent/preview-changes.js +10 -0
  12. package/src/developer-agent/validation.js +7 -3
  13. package/src/developer-agent/workspace-inspection.js +51 -4
  14. package/src/executors/deployment-plan/deployment-plan.js +3 -0
  15. package/src/executors/dev-doctor/dev-doctor.d.ts +25 -3
  16. package/src/executors/dev-doctor/dev-doctor.js +136 -49
  17. package/src/executors/dev-setup/dev-setup.d.ts +18 -1
  18. package/src/executors/dev-setup/dev-setup.js +320 -196
  19. package/src/executors/foundation-preflight/foundation-preflight.js +9 -1
  20. package/src/executors/foundation-remove-preflight/foundation-remove-preflight.js +2 -2
  21. package/src/executors/infrastructure-plan/infrastructure-plan.js +10 -3
  22. package/src/executors/local-deploy/local-deploy.d.ts +15 -0
  23. package/src/executors/local-deploy/local-deploy.js +96 -14
  24. package/src/executors/sst-lifecycle/logging-preflight.js +12 -1
  25. package/src/executors/sst-lifecycle/run-sst-command.js +51 -5
  26. package/src/foundation/cost-estimate.js +1 -1
  27. package/src/foundation/identity-domain-parent-ready.d.ts +91 -0
  28. package/src/foundation/identity-domain-parent-ready.js +333 -0
  29. package/src/foundation/identity-domain.d.ts +94 -0
  30. package/src/foundation/identity-domain.js +115 -0
  31. package/src/foundation/index.d.ts +2 -0
  32. package/src/foundation/index.js +7 -0
  33. package/src/foundation/preflight.js +17 -1
  34. package/src/foundation/root-site-readiness.d.ts +27 -0
  35. package/src/foundation/root-site-readiness.js +78 -0
  36. package/src/foundation/root-site.d.ts +81 -0
  37. package/src/foundation/root-site.js +268 -0
  38. package/src/generators/framework-prerequisites.d.ts +2 -0
  39. package/src/generators/framework-prerequisites.js +34 -0
  40. package/src/generators/function/function-registration.d.ts +24 -0
  41. package/src/generators/function/function-registration.js +66 -0
  42. package/src/generators/function/function.d.ts +16 -1
  43. package/src/generators/function/function.js +101 -18
  44. package/src/generators/function/schema.d.ts +1 -0
  45. package/src/generators/function/schema.json +6 -0
  46. package/src/generators/function-access/function-access.d.ts +14 -0
  47. package/src/generators/function-access/function-access.js +141 -0
  48. package/src/generators/function-access/schema.d.ts +6 -0
  49. package/src/generators/function-access/schema.json +25 -0
  50. package/src/generators/post-generation-install.d.ts +1 -1
  51. package/src/generators/post-generation-install.js +1 -1
  52. package/src/generators/preset/dependency-overrides.d.ts +1 -1
  53. package/src/generators/preset/dependency-overrides.js +1 -1
  54. package/src/generators/preset/workspace-files-adopter-skills.js +14 -0
  55. package/src/generators/preset/workspace-files-developer-agent.js +17 -11
  56. package/src/generators/preset/workspace-files-stage-authority.js +58 -1
  57. package/src/generators/preset/workspace-files-thin-deploy.d.ts +11 -0
  58. package/src/generators/preset/workspace-files-thin-deploy.js +47 -4
  59. package/src/generators/preset/workspace-files-thin-docs.js +33 -5
  60. package/src/generators/preset/workspace-files.js +207 -13
  61. package/src/generators/repository-policy/repository-policy.js +2 -1
  62. package/src/generators/repository-policy/schema.d.ts +2 -0
  63. package/src/generators/repository-policy/schema.json +7 -2
  64. package/src/generators/site/built-in-site-documentation-files.d.ts +2 -0
  65. package/src/generators/site/built-in-site-documentation-files.js +92 -0
  66. package/src/generators/site/built-in-site-files.d.ts +8 -0
  67. package/src/generators/site/built-in-site-files.js +40 -0
  68. package/src/generators/site/built-in-site-infrastructure-files.d.ts +2 -0
  69. package/src/generators/site/built-in-site-infrastructure-files.js +275 -0
  70. package/src/generators/site/built-in-site-plan.d.ts +19 -0
  71. package/src/generators/site/built-in-site-plan.js +65 -0
  72. package/src/generators/site/built-in-site-project-files.d.ts +3 -0
  73. package/src/generators/site/built-in-site-project-files.js +258 -0
  74. package/src/generators/site/built-in-site-script-files.d.ts +2 -0
  75. package/src/generators/site/built-in-site-script-files.js +306 -0
  76. package/src/generators/site/built-in-site-shared.d.ts +9 -0
  77. package/src/generators/site/built-in-site-shared.js +21 -0
  78. package/src/generators/site/built-in-site-smoke-files.d.ts +2 -0
  79. package/src/generators/site/built-in-site-smoke-files.js +37 -0
  80. package/src/generators/site/built-in-site-sst-config-files.d.ts +2 -0
  81. package/src/generators/site/built-in-site-sst-config-files.js +39 -0
  82. package/src/generators/site/built-in-site-web-files.d.ts +2 -0
  83. package/src/generators/site/built-in-site-web-files.js +284 -0
  84. package/src/generators/site/schema.d.ts +4 -0
  85. package/src/generators/site/schema.json +20 -0
  86. package/src/generators/site/site.d.ts +13 -0
  87. package/src/generators/site/site.js +221 -0
  88. package/src/generators/slice/built-in-plan-alarm-identity.d.ts +9 -0
  89. package/src/generators/slice/built-in-plan-alarm-identity.js +8 -1
  90. package/src/generators/slice/built-in-plan-api-contract-files.js +18 -0
  91. package/src/generators/slice/built-in-plan-async-work-files.js +18 -0
  92. package/src/generators/slice/built-in-plan-data-files.js +116 -11
  93. package/src/generators/slice/built-in-plan-foundation-files.d.ts +12 -0
  94. package/src/generators/slice/built-in-plan-foundation-files.js +114 -5
  95. package/src/generators/slice/built-in-plan-frontend-files.js +2 -271
  96. package/src/generators/slice/built-in-plan-frontend-header-proof.d.ts +6 -0
  97. package/src/generators/slice/built-in-plan-frontend-header-proof.js +282 -0
  98. package/src/generators/slice/built-in-plan-infrastructure-files.js +151 -237
  99. package/src/generators/slice/built-in-plan-key-value-cleanup.js +4 -3
  100. package/src/generators/slice/built-in-plan-log-group-helpers.d.ts +29 -0
  101. package/src/generators/slice/built-in-plan-log-group-helpers.js +130 -0
  102. package/src/generators/slice/built-in-plan-metadata-files.js +21 -4
  103. package/src/generators/slice/built-in-plan-next-build-authority.d.ts +5 -0
  104. package/src/generators/slice/built-in-plan-next-build-authority.js +124 -0
  105. package/src/generators/slice/built-in-plan-operations-files.d.ts +6 -0
  106. package/src/generators/slice/built-in-plan-operations-files.js +107 -219
  107. package/src/generators/slice/built-in-plan-performance-files.js +6 -1
  108. package/src/generators/slice/built-in-plan-reliability-files.js +12 -8
  109. package/src/generators/slice/built-in-plan-shared.d.ts +1 -1
  110. package/src/generators/slice/built-in-plan-shared.js +1 -1
  111. package/src/generators/slice/built-in-plan-sst-config.d.ts +49 -0
  112. package/src/generators/slice/built-in-plan-sst-config.js +160 -0
  113. package/src/generators/slice/built-in-plan-testing-files.js +92 -49
  114. package/src/generators/slice/built-in-plan-verification-files.js +15 -4
  115. package/src/generators/slice/built-in-plan-web-files.js +65 -0
  116. package/src/generators/slice/deployed-smoke-diagnostics.d.ts +35 -0
  117. package/src/generators/slice/deployed-smoke-diagnostics.js +189 -0
  118. package/src/generators/slice/deployed-smoke-readiness.d.ts +7 -0
  119. package/src/generators/slice/deployed-smoke-readiness.js +118 -23
  120. package/src/generators/slice/persistence-contract.js +2 -2
  121. package/src/generators/slice/pnpm-launch-script.d.ts +13 -0
  122. package/src/generators/slice/pnpm-launch-script.js +28 -0
  123. package/src/generators/slice/slice.js +27 -0
  124. package/src/generators/upgrade/custom-domain-notice.d.ts +19 -0
  125. package/src/generators/upgrade/custom-domain-notice.js +38 -0
  126. package/src/generators/upgrade/external-blueprint-compositions.d.ts +84 -0
  127. package/src/generators/upgrade/external-blueprint-compositions.js +478 -0
  128. package/src/generators/upgrade/framework-package-upgrade.d.ts +58 -0
  129. package/src/generators/upgrade/framework-package-upgrade.js +78 -0
  130. package/src/generators/upgrade/function-authentication-notice.d.ts +29 -0
  131. package/src/generators/upgrade/function-authentication-notice.js +74 -0
  132. package/src/generators/upgrade/schema.json +2 -2
  133. package/src/generators/upgrade/upgrade-plan.d.ts +52 -0
  134. package/src/generators/upgrade/upgrade-plan.js +406 -0
  135. package/src/generators/upgrade/upgrade.d.ts +1 -35
  136. package/src/generators/upgrade/upgrade.js +259 -593
  137. package/src/generators/workload/workload.js +60 -4
  138. package/src/git-policy/github-bootstrap.d.ts +6 -5
  139. package/src/git-policy/github-bootstrap.js +6 -4
  140. package/src/local-dev/fleet-process.d.ts +9 -2
  141. package/src/local-dev/fleet-process.js +27 -7
  142. package/src/local-dev/gateway-daemon.d.ts +1 -1
  143. package/src/local-dev/gateway-daemon.js +6 -4
  144. package/src/local-dev/portless.d.ts +5 -0
  145. package/src/local-dev/portless.js +5 -0
  146. package/src/local-dev/process-group.d.ts +10 -0
  147. package/src/local-dev/process-group.js +33 -0
  148. package/src/local-dev/tls.js +31 -2
  149. package/src/local-dev/trust-store.d.ts +42 -0
  150. package/src/local-dev/trust-store.js +87 -0
  151. package/src/ownership/composition.d.ts +7 -0
  152. package/src/ownership/composition.js +64 -56
  153. package/src/ownership/index.d.ts +1 -0
  154. package/src/ownership/index.js +1 -0
  155. package/src/ownership/record.d.ts +19 -0
  156. package/src/ownership/record.js +26 -2
  157. package/src/ownership/site-record.d.ts +18 -0
  158. package/src/ownership/site-record.js +105 -0
  159. package/src/repository-policy/deployment-plan.d.ts +3 -0
  160. package/src/repository-policy/deployment-plan.js +33 -4
  161. package/src/repository-policy/index.d.ts +1 -0
  162. package/src/repository-policy/index.js +1 -0
  163. package/src/repository-policy/policy.d.ts +13 -1
  164. package/src/repository-policy/policy.js +55 -1
  165. package/src/repository-policy/public-dns.d.ts +65 -0
  166. package/src/repository-policy/public-dns.js +168 -0
  167. package/src/schemas/generated-ownership-v2.json +6 -0
  168. package/src/schemas/repository-policy-v1.json +67 -1
  169. package/src/supply-chain/blueprint-trust-git.js +24 -0
  170. package/src/supply-chain/blueprint-verification-authority.js +21 -3
  171. package/src/supply-chain/generated-blueprint-trust-command.js +15 -0
  172. package/src/work-markers/work-markers.js +4 -1
  173. package/src/workspace-deployment/ownership.d.ts +15 -0
  174. package/src/workspace-deployment/ownership.js +19 -3
@@ -16,6 +16,8 @@ const index_js_2 = require("../blueprints/index.js");
16
16
  const function_js_1 = require("../generators/function/function.js");
17
17
  const logging_registry_js_1 = require("../generators/logging-registry.js");
18
18
  const built_in_plan_js_1 = require("../generators/slice/built-in-plan.js");
19
+ const built_in_site_plan_js_1 = require("../generators/site/built-in-site-plan.js");
20
+ const root_site_js_1 = require("../foundation/root-site.js");
19
21
  const workload_js_1 = require("../generators/workload/workload.js");
20
22
  const performance_registration_js_1 = require("../generators/workload/performance-registration.js");
21
23
  const reliability_registration_js_1 = require("../generators/workload/reliability-registration.js");
@@ -150,14 +152,27 @@ function parseDeveloperAgentGeneratorInput(value) {
150
152
  if (!exactKeys(value, ['generator', 'name'])) {
151
153
  return invalidGeneratorInput('Slice generator input accepts only generator and name; Blueprint and raw input fields are not accepted.');
152
154
  }
153
- return { generator: 'slice', name: boundedSlug(value.name, 'Slice name') };
155
+ const name = boundedSlug(value.name, 'Slice name');
156
+ if ((0, root_site_js_1.isReservedRootSiteName)(name)) {
157
+ return invalidGeneratorInput(root_site_js_1.ROOT_SITE_RESERVED_SLICE_NAME_MESSAGE);
158
+ }
159
+ return { generator: 'slice', name };
160
+ }
161
+ if (value.generator === 'site') {
162
+ if (!exactKeys(value, ['generator'])) {
163
+ return invalidGeneratorInput('Root site generator input accepts only generator; the root site name is fixed.');
164
+ }
165
+ return { generator: 'site' };
154
166
  }
155
167
  if (value.generator === 'function' ||
156
168
  value.generator === 'service' ||
157
169
  value.generator === 'job') {
158
170
  const generator = value.generator;
159
171
  if (!exactKeys(value, ['feature', 'generator', 'name', 'slice'])) {
160
- return invalidGeneratorInput(`${generator} generator input accepts exactly feature, generator, name, and slice.`);
172
+ return invalidGeneratorInput(generator === 'function' &&
173
+ Object.prototype.hasOwnProperty.call(value, 'authentication')
174
+ ? 'function generator input accepts exactly feature, generator, name, and slice. The Developer Agent creates only signed-in Functions in 1.0; an anonymous Function is generated from the CLI with --authentication=anonymous.'
175
+ : `${generator} generator input accepts exactly feature, generator, name, and slice.`);
161
176
  }
162
177
  return {
163
178
  feature: boundedSlug(value.feature, 'Feature'),
@@ -166,6 +181,9 @@ function parseDeveloperAgentGeneratorInput(value) {
166
181
  slice: boundedSlug(value.slice, 'Slice name'),
167
182
  };
168
183
  }
184
+ if (value.generator === 'function-access') {
185
+ return invalidGeneratorInput('function-access is CLI only in 1.0: the Developer Agent never changes who may call a Function. Run pnpm nx g @empire-builder-kit/nx:function-access from the CLI.');
186
+ }
169
187
  if (value.generator === 'upgrade') {
170
188
  if (!exactKeys(value, ['generator', 'name'], ['preview'])) {
171
189
  return invalidGeneratorInput('Upgrade generator input accepts only generator, name, and an optional caller-retained, digest-bound preview reference.');
@@ -192,6 +210,9 @@ function generatorContextSelection(input) {
192
210
  selectedSlice: input.slice,
193
211
  };
194
212
  }
213
+ if (isRootSiteUpgrade(input)) {
214
+ return { selectedProjects: ['foundation', root_site_js_1.ROOT_SITE_NAME].sort() };
215
+ }
195
216
  if (input.generator === 'upgrade' &&
196
217
  input.name !== 'workspace' &&
197
218
  input.name !== 'foundation') {
@@ -205,6 +226,11 @@ function generatorContextSelection(input) {
205
226
  }
206
227
  return {};
207
228
  }
229
+ // The root site is not a Product Slice: its upgrade selects the fixed site
230
+ // project beside the Foundation, never a Slice context.
231
+ function isRootSiteUpgrade(input) {
232
+ return input.generator === 'upgrade' && input.name === root_site_js_1.ROOT_SITE_NAME;
233
+ }
208
234
  function surface(path, ownershipMode = 'managed') {
209
235
  return { ownershipMode, path };
210
236
  }
@@ -369,6 +395,57 @@ function slicePlan(context, input, mode, rebindCompleted = false) {
369
395
  ].sort(),
370
396
  };
371
397
  }
398
+ function sitePlan(context, mode, rebindCompleted = false) {
399
+ if (!rebindCompleted &&
400
+ (context.selection.projectInventory !== 'full' ||
401
+ context.selection.slice !== undefined ||
402
+ context.selection.feature !== undefined)) {
403
+ return invalidGeneratorInput('Root site generation requires an unnarrowed, full inspected Nx project inventory.');
404
+ }
405
+ if (!rebindCompleted && workspacePathExists(context, root_site_js_1.ROOT_SITE_ROOT)) {
406
+ return unavailableGeneratorDestination(`The workspace has one root site, and ${root_site_js_1.ROOT_SITE_ROOT} already exists.`);
407
+ }
408
+ if (!rebindCompleted &&
409
+ !workspacePathExists(context, 'packages/foundation/contracts/foundation.json')) {
410
+ return unavailableGeneratorDestination('The root site attaches to the Standard Foundation Router; generate the Foundation first.');
411
+ }
412
+ const plan = (0, built_in_site_plan_js_1.createBuiltInSitePlan)({
413
+ frameworkVersion: context.workspace.frameworkVersion,
414
+ runtimeVersion: context.workspace.frameworkVersion,
415
+ scope: `@${context.workspace.identity}`,
416
+ });
417
+ if (!rebindCompleted) {
418
+ requireAvailableProspectiveProjectIds(context, [root_site_js_1.ROOT_SITE_NAME], 'The root site');
419
+ }
420
+ const ownership = new Map(plan.ownership.paths.map(({ mode: pathMode, path }) => [path, pathMode]));
421
+ const generatedSurfaces = sortedSurfaces([
422
+ ...Object.keys(plan.files).map((path) => surface(node_path_1.posix.join(root_site_js_1.ROOT_SITE_ROOT, path), ownership.get(path) ?? 'managed')),
423
+ surface('pnpm-lock.yaml', 'adopter-owned'),
424
+ ]);
425
+ const prospectiveVerification = mode === 'apply' ? [`${root_site_js_1.ROOT_SITE_NAME}:verify`] : [];
426
+ return {
427
+ command: commandFor('site', mode, [
428
+ '--skipFormat=false',
429
+ '--skipInstall=false',
430
+ ]),
431
+ contracts: contracts(root_site_js_1.ROOT_SITE_NAME, [
432
+ 'configuration',
433
+ 'frontend',
434
+ 'infrastructure',
435
+ 'reliability',
436
+ 'supply-chain',
437
+ ]),
438
+ generatedSurfaces,
439
+ projects: [root_site_js_1.ROOT_SITE_NAME],
440
+ prospectiveVerification,
441
+ verification: [
442
+ ...new Set([
443
+ ...prospectiveVerification,
444
+ developerAgentWorkspaceVerificationTarget(context),
445
+ ]),
446
+ ].sort(),
447
+ };
448
+ }
372
449
  function functionPlan(context, input, mode, rebindCompleted = false) {
373
450
  requireSliceContext(context, input.slice, input.feature, rebindCompleted);
374
451
  if (!rebindCompleted) {
@@ -506,19 +583,26 @@ function requireUpgradeProject(context, name) {
506
583
  ? context.projects.find(({ tags }) => tags.includes('scope:workspace'))
507
584
  : name === 'foundation'
508
585
  ? context.projects.find(({ tags }) => tags.includes('scope:foundation'))
509
- : context.projects.find(({ name: projectName, tags }) => projectName === name && tags.includes('type:slice'));
586
+ : name === root_site_js_1.ROOT_SITE_NAME
587
+ ? context.projects.find(({ name: projectName, root, tags }) => projectName === root_site_js_1.ROOT_SITE_NAME &&
588
+ root === root_site_js_1.ROOT_SITE_ROOT &&
589
+ tags.includes('type:site'))
590
+ : context.projects.find(({ name: projectName, tags }) => projectName === name && tags.includes('type:slice'));
510
591
  if (!project) {
511
- return invalidGeneratorInput(`Upgrade target ${name} is not an existing owned workspace, Foundation, or Product Slice in inspected context.`);
592
+ return invalidGeneratorInput(`Upgrade target ${name} is not an existing owned workspace, Foundation, root site, or Product Slice in inspected context.`);
512
593
  }
513
594
  if (name !== 'workspace' &&
514
595
  name !== 'foundation' &&
596
+ name !== root_site_js_1.ROOT_SITE_NAME &&
515
597
  context.selection.slice !== name) {
516
598
  return invalidGeneratorInput('Product Slice upgrade target must exactly match the inspected Slice.');
517
599
  }
518
600
  return project;
519
601
  }
520
602
  function developerAgentUpgradeGeneratorOptions(context, target) {
521
- if (target === 'workspace' || target === 'foundation')
603
+ if (target === 'workspace' ||
604
+ target === 'foundation' ||
605
+ target === root_site_js_1.ROOT_SITE_NAME)
522
606
  return {};
523
607
  const state = context.workspace.ownershipVersions.find((entry) => entry.kind === 'slice' && entry.target === target);
524
608
  if (!state?.blueprintName || !state.installedBlueprintVersion) {
@@ -623,6 +707,9 @@ function bindDeveloperAgentGeneratorPlan(context, operation, inputValue, preview
623
707
  if (input.generator === 'slice') {
624
708
  return slicePlan(context, input, generatorOperation.mode);
625
709
  }
710
+ if (input.generator === 'site') {
711
+ return sitePlan(context, generatorOperation.mode);
712
+ }
626
713
  if (input.generator === 'function') {
627
714
  return functionPlan(context, input, generatorOperation.mode);
628
715
  }
@@ -641,8 +728,11 @@ function rebindDeveloperAgentGeneratorPlan(context, operation, inputValue) {
641
728
  const input = parseDeveloperAgentGeneratorInput(inputValue);
642
729
  const generatorOperation = requireMatchingOperation(operation, input);
643
730
  const reboundContext = input.generator === 'slice' ||
731
+ input.generator === 'site' ||
644
732
  (input.generator === 'upgrade' &&
645
- (input.name === 'workspace' || input.name === 'foundation'))
733
+ (input.name === 'workspace' ||
734
+ input.name === 'foundation' ||
735
+ input.name === root_site_js_1.ROOT_SITE_NAME))
646
736
  ? {
647
737
  ...context,
648
738
  selection: {
@@ -655,6 +745,9 @@ function rebindDeveloperAgentGeneratorPlan(context, operation, inputValue) {
655
745
  if (input.generator === 'slice') {
656
746
  return slicePlan(reboundContext, input, generatorOperation.mode, true);
657
747
  }
748
+ if (input.generator === 'site') {
749
+ return sitePlan(reboundContext, generatorOperation.mode, true);
750
+ }
658
751
  if (input.generator === 'function') {
659
752
  return functionPlan(reboundContext, input, generatorOperation.mode, true);
660
753
  }
@@ -38,7 +38,7 @@ export declare const DEVELOPER_AGENT_CLEANUP_RECOVERY_OUTCOMES: readonly ["not-r
38
38
  export type DeveloperAgentCleanupRecoveryOutcome = (typeof DEVELOPER_AGENT_CLEANUP_RECOVERY_OUTCOMES)[number];
39
39
  export declare const DEVELOPER_AGENT_OWNERSHIP_MODES: readonly ["managed", "seeded", "adopter-owned"];
40
40
  export type DeveloperAgentOwnershipMode = (typeof DEVELOPER_AGENT_OWNERSHIP_MODES)[number];
41
- export declare const DEVELOPER_AGENT_STABLE_GENERATORS: readonly ["slice", "function", "service", "job", "upgrade"];
41
+ export declare const DEVELOPER_AGENT_STABLE_GENERATORS: readonly ["slice", "site", "function", "service", "job", "upgrade"];
42
42
  export type DeveloperAgentStableGenerator = (typeof DEVELOPER_AGENT_STABLE_GENERATORS)[number];
43
43
  export declare const DEVELOPER_AGENT_GENERATOR_MODES: readonly ["preview", "apply"];
44
44
  export type DeveloperAgentGeneratorMode = (typeof DEVELOPER_AGENT_GENERATOR_MODES)[number];
@@ -61,7 +61,7 @@ export interface DeveloperAgentOwnershipVersionState {
61
61
  blueprintName?: string;
62
62
  installedBlueprintVersion?: string;
63
63
  installedFrameworkVersion?: string;
64
- kind: 'foundation' | 'slice' | 'workspace';
64
+ kind: 'foundation' | 'site' | 'slice' | 'workspace';
65
65
  recordedBlueprintVersion?: string;
66
66
  recordedFrameworkVersion?: string;
67
67
  target: string;
@@ -78,6 +78,10 @@ export interface DeveloperAgentSliceGeneratorInput {
78
78
  generator: 'slice';
79
79
  name: string;
80
80
  }
81
+ /** The workspace root site at packages/site; the name is fixed. */
82
+ export interface DeveloperAgentSiteGeneratorInput {
83
+ generator: 'site';
84
+ }
81
85
  export interface DeveloperAgentFunctionGeneratorInput {
82
86
  feature: string;
83
87
  generator: 'function';
@@ -101,7 +105,7 @@ export interface DeveloperAgentUpgradeGeneratorInput {
101
105
  name: string;
102
106
  preview?: DeveloperAgentGeneratorPreviewReference;
103
107
  }
104
- export type DeveloperAgentGeneratorInput = DeveloperAgentFunctionGeneratorInput | DeveloperAgentJobGeneratorInput | DeveloperAgentServiceGeneratorInput | DeveloperAgentSliceGeneratorInput | DeveloperAgentUpgradeGeneratorInput;
108
+ export type DeveloperAgentGeneratorInput = DeveloperAgentFunctionGeneratorInput | DeveloperAgentJobGeneratorInput | DeveloperAgentServiceGeneratorInput | DeveloperAgentSiteGeneratorInput | DeveloperAgentSliceGeneratorInput | DeveloperAgentUpgradeGeneratorInput;
105
109
  export interface DeveloperAgentGeneratorOperation {
106
110
  generator: DeveloperAgentStableGenerator;
107
111
  mode: DeveloperAgentGeneratorMode;
@@ -100,6 +100,7 @@ exports.DEVELOPER_AGENT_OWNERSHIP_MODES = [
100
100
  ];
101
101
  exports.DEVELOPER_AGENT_STABLE_GENERATORS = [
102
102
  'slice',
103
+ 'site',
103
104
  'function',
104
105
  'service',
105
106
  'job',
@@ -43,6 +43,7 @@ export declare const DOCKER_BUILD_OWNER_RATIONALE = "Local workload image builds
43
43
  export declare const WORKLOAD_DEV_OWNER_RATIONALE = "A hot workload process started outside the ebk dev Fleet has no owned port, lifecycle or cleanup. Verify Service and Job source with its test, typecheck and build targets and exercise it through ebk deploy development <slice>.";
44
44
  export declare const FORMAT_WRITE_OWNER_RATIONALE = "Formatting rewrites source files only: run pnpm nx format:write directly as part of a source edit, then rerun the required verification.";
45
45
  export declare const GRAPH_INTERACTIVE_RATIONALE = "nx graph starts an interactive browser server and is not a bounded operation; use ebk agent context for the read-only project inventory.";
46
+ export declare const ROOT_SITE_DEPLOY_OWNER_RATIONALE = "The root site deploys through ebk deploy development site (or ebk deploy development), which orders it after the Foundation and before the Product Slices and runs its deployed smoke; protected stages deploy it only through the GitHub Deploy workflow.";
46
47
  export declare const ROUTER_WAF_REHEARSAL_OWNER_RATIONALE = "The Router WAF rehearsal requires an exact --probeUrl that planning cannot derive: run it directly through its Nx target with that option after a development deployment.";
47
48
  /**
48
49
  * Authority classes are not a severity list. In particular, development
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ROUTER_WAF_REHEARSAL_OWNER_RATIONALE = exports.GRAPH_INTERACTIVE_RATIONALE = exports.FORMAT_WRITE_OWNER_RATIONALE = exports.WORKLOAD_DEV_OWNER_RATIONALE = exports.DOCKER_BUILD_OWNER_RATIONALE = exports.DEPLOY_LOCAL_OWNER_RATIONALE = exports.DeveloperAgentOperationRegistryError = void 0;
3
+ exports.ROUTER_WAF_REHEARSAL_OWNER_RATIONALE = exports.ROOT_SITE_DEPLOY_OWNER_RATIONALE = exports.GRAPH_INTERACTIVE_RATIONALE = exports.FORMAT_WRITE_OWNER_RATIONALE = exports.WORKLOAD_DEV_OWNER_RATIONALE = exports.DOCKER_BUILD_OWNER_RATIONALE = exports.DEPLOY_LOCAL_OWNER_RATIONALE = exports.DeveloperAgentOperationRegistryError = void 0;
4
4
  exports.joinDeveloperAgentAuthorityClasses = joinDeveloperAgentAuthorityClasses;
5
5
  exports.createDeveloperAgentOperationRegistry = createDeveloperAgentOperationRegistry;
6
6
  exports.requireDeveloperAgentOperation = requireDeveloperAgentOperation;
@@ -9,6 +9,8 @@ const node_util_1 = require("node:util");
9
9
  const contracts_js_1 = require("../local-dev/contracts.js");
10
10
  const blueprint_trust_js_1 = require("../supply-chain/blueprint-trust.js");
11
11
  const model_js_1 = require("./model.js");
12
+ const built_in_site_files_js_1 = require("../generators/site/built-in-site-files.js");
13
+ const discovery_js_1 = require("../foundation/discovery.js");
12
14
  const ordering_js_1 = require("./ordering.js");
13
15
  class DeveloperAgentOperationRegistryError extends Error {
14
16
  classification = 'unsupported-operation';
@@ -46,6 +48,7 @@ exports.DOCKER_BUILD_OWNER_RATIONALE = 'Local workload image builds use the host
46
48
  exports.WORKLOAD_DEV_OWNER_RATIONALE = 'A hot workload process started outside the ebk dev Fleet has no owned port, lifecycle or cleanup. Verify Service and Job source with its test, typecheck and build targets and exercise it through ebk deploy development <slice>.';
47
49
  exports.FORMAT_WRITE_OWNER_RATIONALE = 'Formatting rewrites source files only: run pnpm nx format:write directly as part of a source edit, then rerun the required verification.';
48
50
  exports.GRAPH_INTERACTIVE_RATIONALE = 'nx graph starts an interactive browser server and is not a bounded operation; use ebk agent context for the read-only project inventory.';
51
+ exports.ROOT_SITE_DEPLOY_OWNER_RATIONALE = 'The root site deploys through ebk deploy development site (or ebk deploy development), which orders it after the Foundation and before the Product Slices and runs its deployed smoke; protected stages deploy it only through the GitHub Deploy workflow.';
49
52
  exports.ROUTER_WAF_REHEARSAL_OWNER_RATIONALE = 'The Router WAF rehearsal requires an exact --probeUrl that planning cannot derive: run it directly through its Nx target with that option after a development deployment.';
50
53
  function policyLifecycleActionForTarget(targetName) {
51
54
  if (exact('deploy', 'deploy-infrastructure', 'deploy-local', 'deployment-plan', 'foundation-ready')(targetName)) {
@@ -221,6 +224,37 @@ const TARGET_SIGNATURES = [
221
224
  dependsOn: ['secret-guardrails', 'typecheck'],
222
225
  env: { NODE_ENV: 'production' },
223
226
  }),
227
+ // The root site (packages/site): a Next.js app with no secrets, a
228
+ // route check before every build, and next dev on loopback outside the
229
+ // Fleet. Its lifecycle reuses the consumer-mode executor signatures below;
230
+ // its deploy belongs to ebk deploy development.
231
+ runCommandSignature('build', 'next build --webpack web', {
232
+ dependsOn: ['route-check', 'typecheck'],
233
+ env: { NODE_ENV: 'production' },
234
+ }),
235
+ runCommandSignature('dev', `next dev web --hostname 127.0.0.1 --port ${built_in_site_files_js_1.ROOT_SITE_DEV_PORT}`, { continuous: true }),
236
+ runCommandSignature('route-check', 'node scripts/route-check.mjs'),
237
+ executorSignature('verify', 'nx:noop', exactOptions(() => ({})), [
238
+ 'build',
239
+ 'lint',
240
+ 'route-check',
241
+ 'smoke-deployed-check',
242
+ 'test',
243
+ 'typecheck',
244
+ ]),
245
+ executorSignature('deploy', '@empire-builder-kit/nx:deploy', exactOptions((input) => ({
246
+ cwd: input.project.root,
247
+ stage: 'development',
248
+ stageMode: 'consumer',
249
+ })), ['verify', { params: 'forward', target: 'foundation-ready' }], { nonPlannableRationale: exports.ROOT_SITE_DEPLOY_OWNER_RATIONALE }),
250
+ // No capabilities key: a Slice's foundation-ready always names its
251
+ // capabilities, so this exact shape never claims a Slice target.
252
+ executorSignature('foundation-ready', '@empire-builder-kit/nx:foundation-preflight', exactOptions(() => ({
253
+ contract: discovery_js_1.STANDARD_FOUNDATION_REQUIREMENT.contract,
254
+ deployIfMissing: true,
255
+ foundationProject: 'foundation',
256
+ stage: 'development',
257
+ })), [{ params: 'ignore', projects: ['foundation'], target: 'verify' }], { nonPlannableRationale: exports.ROOT_SITE_DEPLOY_OWNER_RATIONALE }),
224
258
  runCommandSignature('configuration-expected', 'node --experimental-strip-types scripts/configuration-expected.mjs', { forwardAllArgs: false }),
225
259
  runCommandSignature('configuration-check', 'node --experimental-strip-types scripts/configuration-check.mjs', { forwardAllArgs: false }),
226
260
  runCommandSignature('contract-dependencies-check', 'node scripts/contract-dependencies.mjs check', { forwardAllArgs: false }),
@@ -1162,7 +1196,14 @@ function sourceEditOperations(projects, authenticatedTargets, workspaceVerificat
1162
1196
  ? projectVerification
1163
1197
  : undefined
1164
1198
  : workspaceVerification;
1165
- const featureTargets = ['lint', 'secret-guardrails', 'test', 'typecheck']
1199
+ // route-check is the root site's guard against shadowing a Slice path.
1200
+ const featureTargets = [
1201
+ 'lint',
1202
+ 'route-check',
1203
+ 'secret-guardrails',
1204
+ 'test',
1205
+ 'typecheck',
1206
+ ]
1166
1207
  .filter((target) => context.targets.includes(target))
1167
1208
  .map((target) => `${context.name}:${target}`);
1168
1209
  // Never substitute an unauthenticated check with a weaker fallback.
@@ -124,12 +124,15 @@ function blockingWarnings(context, readOnly, upgradeTarget, allowDirtyDevelopmen
124
124
  return true;
125
125
  if (hasExpectedVersionDrift('workspace'))
126
126
  return false;
127
+ // The root site, like each Product Slice, upgrades after the Foundation.
127
128
  if (upgradeTarget === 'foundation') {
128
- return drift.kind === 'foundation' || drift.kind === 'slice';
129
+ return (drift.kind === 'foundation' ||
130
+ drift.kind === 'site' ||
131
+ drift.kind === 'slice');
129
132
  }
130
133
  if (hasExpectedVersionDrift('foundation'))
131
134
  return false;
132
- return drift.kind === 'slice';
135
+ return drift.kind === 'site' || drift.kind === 'slice';
133
136
  };
134
137
  return context.warnings.filter((warning) => blocking.has(warning.classification) &&
135
138
  !mayConsumeExpectedVersionDrift(warning));
@@ -6,6 +6,7 @@ exports.developerAgentPreviewOwnershipModes = developerAgentPreviewOwnershipMode
6
6
  const node_buffer_1 = require("node:buffer");
7
7
  const node_crypto_1 = require("node:crypto");
8
8
  const node_path_1 = require("node:path");
9
+ const root_site_js_1 = require("../foundation/root-site.js");
9
10
  const index_js_1 = require("../ownership/index.js");
10
11
  const ordering_js_1 = require("./ordering.js");
11
12
  const workspace_path_js_1 = require("./workspace-path.js");
@@ -74,6 +75,15 @@ function developerAgentPreviewOwnershipModes(tree, target) {
74
75
  }
75
76
  add('packages/foundation', result.value);
76
77
  }
78
+ if (target === root_site_js_1.ROOT_SITE_NAME) {
79
+ const source = tree.read(`${root_site_js_1.ROOT_SITE_ROOT}/.ebk/ownership.json`, 'utf8');
80
+ const result = (0, index_js_1.validateSiteOwnershipRecord)(JSON.parse(source ?? 'null'));
81
+ if (!result.valid) {
82
+ throw new Error('Root site ownership is invalid in the Upgrade mutation candidate.');
83
+ }
84
+ add(root_site_js_1.ROOT_SITE_ROOT, result.value);
85
+ return modes;
86
+ }
77
87
  if (target !== 'workspace' && target !== 'foundation') {
78
88
  const prefix = `packages/${target}`;
79
89
  const source = tree.read(`${prefix}/.ebk/ownership.json`, 'utf8');
@@ -403,7 +403,7 @@ function validateOwnershipVersionState(value, path, issues) {
403
403
  ], issues);
404
404
  if (!record)
405
405
  return false;
406
- requireEnum(record.kind, `${path}.kind`, new Set(['foundation', 'slice', 'workspace']), issues);
406
+ requireEnum(record.kind, `${path}.kind`, new Set(['foundation', 'site', 'slice', 'workspace']), issues);
407
407
  requireSafeString(record.target, `${path}.target`, issues, {
408
408
  pattern: IDENTIFIER_PATTERN,
409
409
  });
@@ -419,7 +419,7 @@ function validateOwnershipVersionState(value, path, issues) {
419
419
  }
420
420
  }
421
421
  const kind = record.kind;
422
- if ((kind === 'workspace' || kind === 'foundation') &&
422
+ if ((kind === 'workspace' || kind === 'foundation' || kind === 'site') &&
423
423
  record.target !== kind) {
424
424
  addIssue(issues, `${path}.target`, `must equal ${kind}`);
425
425
  }
@@ -875,7 +875,7 @@ function validateWarning(value, path, issues) {
875
875
  if (has(record, 'upgradeVersionDrift')) {
876
876
  const drift = requireRecord(record.upgradeVersionDrift, `${path}.upgradeVersionDrift`, ['kind', 'target'], [], issues);
877
877
  if (drift) {
878
- requireEnum(drift.kind, `${path}.upgradeVersionDrift.kind`, new Set(['foundation', 'slice', 'workspace']), issues);
878
+ requireEnum(drift.kind, `${path}.upgradeVersionDrift.kind`, new Set(['foundation', 'site', 'slice', 'workspace']), issues);
879
879
  requireSafeString(drift.target, `${path}.upgradeVersionDrift.target`, issues, { pattern: IDENTIFIER_PATTERN });
880
880
  }
881
881
  if (record.classification !== 'ownership-conflict') {
@@ -914,6 +914,10 @@ function validateGeneratorInput(value, path, issues) {
914
914
  slug(record.name, `${path}.name`);
915
915
  return record !== undefined;
916
916
  }
917
+ // The root site is one fixed project, so its generator takes no name.
918
+ if (value.generator === 'site') {
919
+ return requireRecord(value, path, ['generator'], [], issues) !== undefined;
920
+ }
917
921
  if (value.generator === 'function' ||
918
922
  value.generator === 'service' ||
919
923
  value.generator === 'job') {
@@ -6,6 +6,7 @@ const node_util_1 = require("node:util");
6
6
  const semver_1 = require("semver");
7
7
  const node_fs_1 = require("node:fs");
8
8
  const node_path_1 = require("node:path");
9
+ const root_site_js_1 = require("../foundation/root-site.js");
9
10
  const contracts_js_1 = require("../local-dev/contracts.js");
10
11
  const index_js_1 = require("../ownership/index.js");
11
12
  const index_js_2 = require("../repository-policy/index.js");
@@ -448,9 +449,27 @@ function readOwnershipRecords(root, nodes) {
448
449
  });
449
450
  for (const node of nodes) {
450
451
  const tags = new Set(node.data.tags ?? []);
451
- if (!tags.has('scope:foundation') && !tags.has('type:slice'))
452
+ if (!tags.has('scope:foundation') &&
453
+ !tags.has('type:slice') &&
454
+ !tags.has('type:site'))
452
455
  continue;
453
456
  const relativeOwnership = `${node.data.root.split(node_path_1.sep).join('/')}/.ebk/ownership.json`;
457
+ // site is reserved for the workspace root site: only the fixed
458
+ // packages/site project carries type:site, and no Product Slice may use
459
+ // that name or directory.
460
+ const atSiteRoot = node.data.root.split(node_path_1.sep).join('/') === root_site_js_1.ROOT_SITE_ROOT;
461
+ if (tags.has('type:site')) {
462
+ if (node.name !== root_site_js_1.ROOT_SITE_NAME ||
463
+ !atSiteRoot ||
464
+ tags.has('scope:foundation') ||
465
+ tags.has('type:slice')) {
466
+ throw new Error(`Nx project ${node.name} carries type:site, which only the workspace root site ${root_site_js_1.ROOT_SITE_NAME} at ${root_site_js_1.ROOT_SITE_ROOT} may carry.`);
467
+ }
468
+ }
469
+ else if (tags.has('type:slice') &&
470
+ (node.name === root_site_js_1.ROOT_SITE_NAME || atSiteRoot)) {
471
+ throw new Error(`Product Slice ${node.name} uses ${root_site_js_1.ROOT_SITE_NAME}, which is reserved for the workspace root site. ${root_site_js_1.ROOT_SITE_RENAME_GUIDANCE}`);
472
+ }
454
473
  const ownershipFile = readBoundedWorkspaceFile(root, relativeOwnership, `${node.name} ownership record`, MAX_CONTROL_JSON_BYTES);
455
474
  const projectRoot = (0, node_fs_1.realpathSync)(containedPath(root, node.data.root));
456
475
  if (!isContained(root, projectRoot) ||
@@ -478,6 +497,20 @@ function readOwnershipRecords(root, nodes) {
478
497
  });
479
498
  continue;
480
499
  }
500
+ if (tags.has('type:site')) {
501
+ const validation = (0, index_js_1.validateSiteOwnershipRecord)(ownershipValue);
502
+ if (!validation.valid) {
503
+ throw new Error(`Root site ownership record is invalid: ${formatIssues(validation.issues)}`);
504
+ }
505
+ records.push({
506
+ frameworkVersion: validation.value.frameworkVersion,
507
+ kind: 'site',
508
+ path: relativeOwnership,
509
+ paths: validation.value.paths,
510
+ root: projectRoot,
511
+ });
512
+ continue;
513
+ }
481
514
  const validation = (0, index_js_1.validateGeneratedOwnershipRecord)(ownershipValue);
482
515
  if (!validation.valid) {
483
516
  throw new Error(`Product Slice ${node.name} ownership record is invalid: ${formatIssues(validation.issues)}`);
@@ -849,11 +882,14 @@ function candidateReference(root, requestedPath) {
849
882
  function policyContext(root, stage, policy, nodes) {
850
883
  const selected = nodes
851
884
  .filter((node) => node.data.tags?.includes('scope:foundation') ||
852
- node.data.tags?.includes('type:slice'))
885
+ node.data.tags?.includes('type:slice') ||
886
+ node.data.tags?.includes('type:site'))
853
887
  .map((node) => ({
854
888
  kind: node.data.tags?.includes('scope:foundation')
855
889
  ? 'foundation'
856
- : 'slice',
890
+ : node.data.tags?.includes('type:site')
891
+ ? 'site'
892
+ : 'slice',
857
893
  name: node.name,
858
894
  }))
859
895
  .sort((left, right) => (0, ordering_js_1.compareDeveloperAgentStrings)(left.name, right.name));
@@ -910,6 +946,14 @@ function policyContext(root, stage, policy, nodes) {
910
946
  name: `slices.${slice}.productionStatus`,
911
947
  value: value.productionStatus,
912
948
  })),
949
+ ...(policy.site
950
+ ? [
951
+ {
952
+ name: 'site.productionStatus',
953
+ value: policy.site.productionStatus,
954
+ },
955
+ ]
956
+ : []),
913
957
  ...decisions.map(({ action, allowed }) => ({
914
958
  name: `effective.${stage}.${action}`,
915
959
  value: allowed ? 'allowed' : 'blocked',
@@ -926,6 +970,7 @@ function policyContext(root, stage, policy, nodes) {
926
970
  productionApproval: policy.productionApproval,
927
971
  productionFoundation: policy.productionFoundation,
928
972
  schemaVersion: policy.schemaVersion,
973
+ ...(policy.site ? { site: policy.site } : {}),
929
974
  slices: Object.fromEntries(Object.entries(policy.slices).sort(([left], [right]) => (0, ordering_js_1.compareDeveloperAgentStrings)(left, right))),
930
975
  workspaceDeploymentId: policy.workspaceDeploymentId,
931
976
  workspaceDeploymentProvenance: policy.workspaceDeploymentProvenance,
@@ -1068,7 +1113,9 @@ function inspectDeveloperAgentWorkspace(options) {
1068
1113
  }
1069
1114
  const projects = nodes.map((node) => projectContext(options.graph, node));
1070
1115
  const selectedProjectNames = new Set(nodes.map(({ name }) => name));
1071
- const ownershipNodes = Object.values(options.graph.nodes).filter((node) => node.data.tags?.some((tag) => tag === 'scope:foundation' || tag === 'type:slice'));
1116
+ const ownershipNodes = Object.values(options.graph.nodes).filter((node) => node.data.tags?.some((tag) => tag === 'scope:foundation' ||
1117
+ tag === 'type:slice' ||
1118
+ tag === 'type:site'));
1072
1119
  const ownership = readOwnershipRecords(root, ownershipNodes);
1073
1120
  const externalOwnershipRoots = (0, blueprint_verification_authority_js_1.externalBlueprintOwnershipRoots)(root);
1074
1121
  const versions = versionContext(root, identity.name, ownership.records);
@@ -21,6 +21,9 @@ function writeGithubOutputs(plan) {
21
21
  `has_slices=${plan.sliceProjects.length > 0 ? 'true' : 'false'}`,
22
22
  `ordered_projects=${plan.orderedProjects.join(',')}`,
23
23
  `production_approval_mode=${plan.productionApprovalMode}`,
24
+ // The root site deploys and smokes inside deploy-local; it is never a
25
+ // Slice project, release candidate or container project.
26
+ `site_project=${plan.siteProject ?? ''}`,
24
27
  `slice_projects=${plan.sliceProjects.join(',')}`,
25
28
  // One matrix row per selected Slice so the protected OCI build fans out
26
29
  // per Slice and architecture instead of looping on one runner.
@@ -3,6 +3,7 @@ import { probeEphemeralTlsEndpoint, probeTlsEndpoint } from '../../local-dev/eff
3
3
  import { sendGatewayCommand } from '../../local-dev/gateway.js';
4
4
  import { resolveFleetHostname } from '../../local-dev/identity.js';
5
5
  import { type PersonalStageResolver } from '../../local-dev/personal-stage.js';
6
+ import { type TrustCommandRunner } from '../../local-dev/trust-store.js';
6
7
  export interface DevDoctorOptions {
7
8
  appData?: string;
8
9
  hostname?: string;
@@ -10,13 +11,19 @@ export interface DevDoctorOptions {
10
11
  export interface DevDoctorResult {
11
12
  certificateExpires?: string;
12
13
  connectivity: 'missing' | 'ready';
13
- gateway: 'missing' | 'ready';
14
+ /** `not-configured` unless portless intent is recorded. */
15
+ gateway: 'missing' | 'not-configured' | 'ready';
14
16
  hostname: string;
15
17
  issues: readonly string[];
16
18
  portless: 'not-configured' | 'ready' | 'unreachable';
17
19
  resolver: readonly string[];
18
20
  tls: 'invalid' | 'missing' | 'ready';
19
- trust: 'missing' | 'ready';
21
+ /**
22
+ * `ready` only when the platform verifier accepted the exact chain;
23
+ * `missing` when it ran and rejected it (or the root is absent); `unknown`
24
+ * when no effect-based check could run or its result is unrecognized.
25
+ */
26
+ trust: 'missing' | 'ready' | 'unknown';
20
27
  }
21
28
  interface DevDoctorDependencies {
22
29
  inspectTrust?: typeof inspectCertificateTrust;
@@ -26,7 +33,22 @@ interface DevDoctorDependencies {
26
33
  send?: typeof sendGatewayCommand;
27
34
  personalStageResolver?: PersonalStageResolver;
28
35
  }
29
- export declare function inspectCertificateTrust(rootCertificatePath: string, intermediateCertificatePath: string, leafCertificatePath: string, hostname: string): DevDoctorResult['trust'];
36
+ export interface CertificateTrustInspection {
37
+ environment?: NodeJS.ProcessEnv;
38
+ homeDirectory?: string;
39
+ pathExists?: (path: string) => boolean;
40
+ platform?: NodeJS.Platform;
41
+ run?: TrustCommandRunner;
42
+ }
43
+ export declare function windowsChainTrustCommand(environment?: NodeJS.ProcessEnv): {
44
+ args: string[];
45
+ command: string;
46
+ };
47
+ /**
48
+ * Effect-based system trust check for the generated chain. Certificate
49
+ * presence alone never reports `ready`.
50
+ */
51
+ export declare function inspectCertificateTrust(rootCertificatePath: string, intermediateCertificatePath: string, leafCertificatePath: string, hostname: string, inspection?: CertificateTrustInspection): DevDoctorResult['trust'];
30
52
  export declare function inspectLocalDevelopment(options: DevDoctorOptions, context: Pick<ExecutorContext, 'projectName' | 'root'>, dependencies?: DevDoctorDependencies): Promise<DevDoctorResult>;
31
53
  declare const executor: PromiseExecutor<DevDoctorOptions>;
32
54
  export default executor;