@apexops/cli 0.10.0-next.5 → 0.11.0-next.1

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 (366) hide show
  1. package/assets/capability-packs/registry.v1.json +1 -62
  2. package/assets/client-projection-metadata/copilot-cli-agent-tools.json +12 -0
  3. package/assets/client-projections/github-copilot-cli/.github/copilot/settings.json +13 -0
  4. package/assets/client-projections/github-copilot-cli/.github/instructions/apex-prompt-authoring.instructions.md +1 -1
  5. package/assets/client-projections/github-copilot-cli/.github/workflows/governance-policy-baseline.yml +101 -0
  6. package/assets/client-projections/github-copilot-cli/tools/schemas/governance-baseline.schema.json +118 -0
  7. package/assets/client-projections/github-copilot-cli/tools/scripts/collect-governance-baseline.ps1 +817 -0
  8. package/assets/config/capability-packs.v1.json +1 -32
  9. package/assets/config/governance-reference.v1.json +26379 -0
  10. package/assets/config/recipe-packs.v1.json +1 -26
  11. package/assets/config/runtime-bundle.v1.json +7 -7
  12. package/assets/config/toolchain.v1.json +35 -33
  13. package/assets/config/workflow.v1.json +103 -72
  14. package/assets/customizations/.github/agents/apex-codegen.agent.md +8 -22
  15. package/assets/customizations/.github/agents/apex-validator.agent.md +14 -20
  16. package/assets/customizations/.github/agents/apex.agent.md +108 -75
  17. package/assets/customizations/.github/copilot/settings.json +13 -0
  18. package/assets/customizations/.github/instructions/apex-prompt-authoring.instructions.md +1 -1
  19. package/assets/customizations/.github/skills/apex-architecture/SKILL.md +62 -18
  20. package/assets/customizations/.github/skills/apex-artifacts/SKILL.md +28 -6
  21. package/assets/customizations/.github/skills/apex-azure-adr/SKILL.md +3 -0
  22. package/assets/customizations/.github/skills/apex-azure-cloud-migrate/SKILL.md +3 -0
  23. package/assets/customizations/.github/skills/apex-azure-compliance/SKILL.md +3 -0
  24. package/assets/customizations/.github/skills/apex-azure-compute/SKILL.md +3 -0
  25. package/assets/customizations/.github/skills/apex-azure-cost-optimization/SKILL.md +3 -0
  26. package/assets/customizations/.github/skills/apex-azure-defaults/SKILL.md +3 -0
  27. package/assets/customizations/.github/skills/apex-azure-defaults/references/governance-effects.md +5 -3
  28. package/assets/customizations/.github/skills/apex-azure-deploy/SKILL.md +3 -0
  29. package/assets/customizations/.github/skills/apex-azure-diagnostics/SKILL.md +3 -0
  30. package/assets/customizations/.github/skills/apex-azure-governance/SKILL.md +19 -3
  31. package/assets/customizations/.github/skills/apex-azure-governance/references/evidence-interpretation.md +38 -3
  32. package/assets/customizations/.github/skills/apex-azure-kusto/SKILL.md +3 -0
  33. package/assets/customizations/.github/skills/apex-azure-prepare/SKILL.md +5 -3
  34. package/assets/customizations/.github/skills/apex-azure-quotas/SKILL.md +6 -2
  35. package/assets/customizations/.github/skills/apex-azure-quotas/references/capacity-decision-rules.md +4 -3
  36. package/assets/customizations/.github/skills/apex-azure-quotas/references/operational-checklist.md +3 -2
  37. package/assets/customizations/.github/skills/apex-azure-rbac/SKILL.md +3 -0
  38. package/assets/customizations/.github/skills/apex-azure-resources/SKILL.md +3 -0
  39. package/assets/customizations/.github/skills/apex-azure-storage/SKILL.md +3 -0
  40. package/assets/customizations/.github/skills/apex-azure-validate/SKILL.md +3 -0
  41. package/assets/customizations/.github/skills/apex-bicep-patterns/SKILL.md +3 -0
  42. package/assets/customizations/.github/skills/apex-codegen/SKILL.md +6 -2
  43. package/assets/customizations/.github/skills/apex-entra-app-registration/SKILL.md +3 -0
  44. package/assets/customizations/.github/skills/apex-mermaid/SKILL.md +3 -0
  45. package/assets/customizations/.github/skills/apex-microsoft-docs/SKILL.md +3 -0
  46. package/assets/customizations/.github/skills/apex-next/SKILL.md +99 -0
  47. package/assets/customizations/.github/skills/apex-operations/SKILL.md +46 -16
  48. package/assets/customizations/.github/skills/apex-planning/SKILL.md +48 -19
  49. package/assets/customizations/.github/skills/apex-requirements/SKILL.md +61 -26
  50. package/assets/customizations/.github/skills/apex-terraform-import/SKILL.md +3 -0
  51. package/assets/customizations/.github/skills/apex-terraform-patterns/SKILL.md +3 -0
  52. package/assets/customizations/.github/skills/apex-terraform-test/SKILL.md +3 -0
  53. package/assets/customizations/.github/skills/apex-unslop/LICENSE.txt +21 -0
  54. package/assets/customizations/.github/skills/apex-unslop/SKILL.md +94 -0
  55. package/assets/customizations/.github/skills/apex-workflow/SKILL.md +15 -5
  56. package/assets/customizations/.github/workflows/governance-policy-baseline.yml +101 -0
  57. package/assets/customizations/README.md +8 -9
  58. package/assets/customizations/manifest.json +167 -209
  59. package/assets/customizations/tools/schemas/governance-baseline.schema.json +118 -0
  60. package/assets/customizations/tools/scripts/collect-governance-baseline.ps1 +817 -0
  61. package/assets/manifest.json +423 -4241
  62. package/assets/schemas/governance-baseline.schema.json +118 -0
  63. package/dist/assets.d.ts +18 -2
  64. package/dist/assets.js +115 -35
  65. package/dist/bootstrap-wizard.d.ts +37 -0
  66. package/dist/bootstrap-wizard.js +259 -0
  67. package/dist/cli.d.ts +17 -2
  68. package/dist/cli.js +180 -63
  69. package/dist/dependency-revision.js +8 -0
  70. package/dist/errors.d.ts +6 -1
  71. package/dist/errors.js +55 -0
  72. package/dist/host-profile.d.ts +47 -0
  73. package/dist/host-profile.js +269 -0
  74. package/dist/mcp-output-schemas.d.ts +43 -0
  75. package/dist/mcp-output-schemas.js +279 -0
  76. package/dist/mcp-tool-effects.d.ts +101 -0
  77. package/dist/mcp-tool-effects.js +66 -0
  78. package/dist/mcp.d.ts +50 -3
  79. package/dist/mcp.js +800 -87
  80. package/dist/runtime-binding.d.ts +37 -0
  81. package/dist/runtime-binding.js +131 -0
  82. package/dist/service.d.ts +643 -38
  83. package/dist/service.js +4937 -662
  84. package/dist/state-transfer.js +21 -1
  85. package/dist/target-scope.d.ts +4 -0
  86. package/dist/target-scope.js +9 -0
  87. package/dist/version.d.ts +3 -1
  88. package/dist/version.js +19 -1
  89. package/dist/workflow-validators.d.ts +20 -3
  90. package/dist/workflow-validators.js +408 -67
  91. package/dist/workspace-root.d.ts +7 -0
  92. package/dist/workspace-root.js +67 -0
  93. package/package.json +11 -12
  94. package/assets/capability-packs/azure-governance-discovery/source/scripts/discover.py +0 -1189
  95. package/assets/capability-packs/azure-governance-discovery/source/scripts/render_governance.py +0 -676
  96. package/assets/client-projections/github-copilot-cli/.github/agents/apex-architect.agent.md +0 -91
  97. package/assets/client-projections/github-copilot-cli/.github/agents/apex-operator.agent.md +0 -75
  98. package/assets/client-projections/github-copilot-cli/.github/agents/apex-planner.agent.md +0 -88
  99. package/assets/client-projections/github-copilot-cli/.github/agents/apex-requirements.agent.md +0 -99
  100. package/assets/client-projections/github-copilot-cli/.github/agents/apex.agent.md +0 -88
  101. package/assets/client-projections/github-copilot-cli/.github/mcp.json +0 -65
  102. package/assets/client-projections/github-copilot-cli/.github/skills/apex-architecture/SKILL.md +0 -36
  103. package/assets/client-projections/github-copilot-cli/.github/skills/apex-artifacts/SKILL.md +0 -65
  104. package/assets/client-projections/github-copilot-cli/.github/skills/apex-artifacts/references/presentation-conventions.md +0 -52
  105. package/assets/client-projections/github-copilot-cli/.github/skills/apex-artifacts/references/reference-only-outlines.md +0 -78
  106. package/assets/client-projections/github-copilot-cli/.github/skills/apex-artifacts/templates/architecture-assessment.md +0 -35
  107. package/assets/client-projections/github-copilot-cli/.github/skills/apex-artifacts/templates/cost-estimate.md +0 -47
  108. package/assets/client-projections/github-copilot-cli/.github/skills/apex-artifacts/templates/deployment-summary.md +0 -35
  109. package/assets/client-projections/github-copilot-cli/.github/skills/apex-artifacts/templates/governance-constraints.md +0 -35
  110. package/assets/client-projections/github-copilot-cli/.github/skills/apex-artifacts/templates/implementation-plan.md +0 -43
  111. package/assets/client-projections/github-copilot-cli/.github/skills/apex-artifacts/templates/operations-runbook.md +0 -35
  112. package/assets/client-projections/github-copilot-cli/.github/skills/apex-artifacts/templates/requirements.md +0 -42
  113. package/assets/client-projections/github-copilot-cli/.github/skills/apex-artifacts/templates/resource-inventory.md +0 -29
  114. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-adr/SKILL.md +0 -52
  115. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-adr/references/decision-examples.md +0 -38
  116. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-adr/references/decision-guardrails.md +0 -36
  117. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-adr/references/decision-quality.md +0 -21
  118. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-adr/references/decision-record-fields.md +0 -57
  119. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-cloud-migrate/SKILL.md +0 -55
  120. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-cloud-migrate/references/lambda-to-functions-assessment.md +0 -29
  121. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-cloud-migrate/references/migration-readiness.md +0 -27
  122. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-cloud-migrate/references/staged-validation-handoff.md +0 -26
  123. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-cloud-migrate/references/workload-mapping.md +0 -27
  124. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-compliance/SKILL.md +0 -58
  125. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-compliance/references/compliance-finding-criteria.md +0 -63
  126. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-compliance/references/operational-checklist.md +0 -24
  127. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-compute/SKILL.md +0 -36
  128. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-compute/references/compute-selection.md +0 -26
  129. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-compute/references/pricing-evidence.md +0 -11
  130. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-compute/references/recommendation-and-scale-rules.md +0 -44
  131. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-cost-optimization/SKILL.md +0 -61
  132. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-cost-optimization/references/cost-assessment-criteria.md +0 -61
  133. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-cost-optimization/references/operational-checklist.md +0 -24
  134. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-defaults/SKILL.md +0 -59
  135. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-defaults/references/avm-binding-guidance.md +0 -29
  136. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-defaults/references/baseline-fallbacks.md +0 -53
  137. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-defaults/references/cost-monitoring.md +0 -47
  138. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-defaults/references/decision-boundaries.md +0 -19
  139. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-defaults/references/governance-effects.md +0 -28
  140. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-defaults/references/naming.md +0 -47
  141. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-defaults/references/network-planning.md +0 -47
  142. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-defaults/references/security-baseline.md +0 -40
  143. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-defaults/references/service-selection.md +0 -51
  144. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-defaults/references/tag-precedence.md +0 -31
  145. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-deploy/SKILL.md +0 -50
  146. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-deploy/references/operational-checklist.md +0 -26
  147. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-deploy/references/preview-recovery-verification.md +0 -48
  148. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-diagnostics/SKILL.md +0 -60
  149. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-diagnostics/references/diagnostic-interpretation.md +0 -42
  150. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-diagnostics/references/operational-checklist.md +0 -24
  151. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-governance/SKILL.md +0 -52
  152. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-governance/references/evidence-interpretation.md +0 -58
  153. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-governance/references/operational-checklist.md +0 -25
  154. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-kusto/SKILL.md +0 -58
  155. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-kusto/references/kql-evidence-interpretation.md +0 -41
  156. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-kusto/references/operational-checklist.md +0 -25
  157. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-prepare/SKILL.md +0 -52
  158. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-prepare/references/functions-recipe-pack.md +0 -27
  159. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-prepare/references/preparation-lineage.md +0 -36
  160. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-quotas/SKILL.md +0 -53
  161. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-quotas/references/capacity-decision-rules.md +0 -48
  162. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-quotas/references/operational-checklist.md +0 -23
  163. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-rbac/SKILL.md +0 -45
  164. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-rbac/references/assignment-intent.md +0 -39
  165. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-rbac/references/least-privilege-selection.md +0 -50
  166. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-resources/SKILL.md +0 -54
  167. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-resources/references/inventory-query-patterns.md +0 -49
  168. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-resources/references/operational-checklist.md +0 -24
  169. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-storage/SKILL.md +0 -35
  170. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-storage/references/security-and-governance.md +0 -12
  171. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-storage/references/service-auth-and-sdk-boundary.md +0 -33
  172. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-storage/references/storage-selection.md +0 -12
  173. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-validate/SKILL.md +0 -49
  174. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-validate/references/operational-checklist.md +0 -24
  175. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-validate/references/preflight-evidence.md +0 -43
  176. package/assets/client-projections/github-copilot-cli/.github/skills/apex-bicep-patterns/SKILL.md +0 -41
  177. package/assets/client-projections/github-copilot-cli/.github/skills/apex-bicep-patterns/references/avm-and-codegen-acceptance.md +0 -11
  178. package/assets/client-projections/github-copilot-cli/.github/skills/apex-bicep-patterns/references/codegen-acceptance-checklist.md +0 -46
  179. package/assets/client-projections/github-copilot-cli/.github/skills/apex-bicep-patterns/references/compiler-and-provider-gotchas.md +0 -74
  180. package/assets/client-projections/github-copilot-cli/.github/skills/apex-bicep-patterns/references/module-interfaces-and-parameters.md +0 -56
  181. package/assets/client-projections/github-copilot-cli/.github/skills/apex-bicep-patterns/references/network-and-observability.md +0 -52
  182. package/assets/client-projections/github-copilot-cli/.github/skills/apex-codegen/SKILL.md +0 -32
  183. package/assets/client-projections/github-copilot-cli/.github/skills/apex-entra-app-registration/SKILL.md +0 -53
  184. package/assets/client-projections/github-copilot-cli/.github/skills/apex-entra-app-registration/references/capability-receipts.md +0 -21
  185. package/assets/client-projections/github-copilot-cli/.github/skills/apex-entra-app-registration/references/design-and-diagnostics.md +0 -36
  186. package/assets/client-projections/github-copilot-cli/.github/skills/apex-entra-app-registration/references/oauth-registration-model.md +0 -26
  187. package/assets/client-projections/github-copilot-cli/.github/skills/apex-entra-app-registration/references/permissions-and-credentials.md +0 -27
  188. package/assets/client-projections/github-copilot-cli/.github/skills/apex-mermaid/SKILL.md +0 -44
  189. package/assets/client-projections/github-copilot-cli/.github/skills/apex-mermaid/references/styling.md +0 -33
  190. package/assets/client-projections/github-copilot-cli/.github/skills/apex-mermaid/references/syntax.md +0 -99
  191. package/assets/client-projections/github-copilot-cli/.github/skills/apex-microsoft-docs/SKILL.md +0 -53
  192. package/assets/client-projections/github-copilot-cli/.github/skills/apex-microsoft-docs/references/research-method.md +0 -91
  193. package/assets/client-projections/github-copilot-cli/.github/skills/apex-operations/SKILL.md +0 -34
  194. package/assets/client-projections/github-copilot-cli/.github/skills/apex-planning/SKILL.md +0 -36
  195. package/assets/client-projections/github-copilot-cli/.github/skills/apex-requirements/SKILL.md +0 -46
  196. package/assets/client-projections/github-copilot-cli/.github/skills/apex-terraform-import/SKILL.md +0 -47
  197. package/assets/client-projections/github-copilot-cli/.github/skills/apex-terraform-import/references/adoption-attestation.md +0 -10
  198. package/assets/client-projections/github-copilot-cli/.github/skills/apex-terraform-import/references/import-assessment.md +0 -14
  199. package/assets/client-projections/github-copilot-cli/.github/skills/apex-terraform-import/references/import-mapping.md +0 -27
  200. package/assets/client-projections/github-copilot-cli/.github/skills/apex-terraform-import/references/mapping-and-adoption-attestation.md +0 -12
  201. package/assets/client-projections/github-copilot-cli/.github/skills/apex-terraform-patterns/SKILL.md +0 -49
  202. package/assets/client-projections/github-copilot-cli/.github/skills/apex-terraform-patterns/references/module-composition-and-refactor.md +0 -20
  203. package/assets/client-projections/github-copilot-cli/.github/skills/apex-terraform-patterns/references/module-composition-and-state-boundaries.md +0 -11
  204. package/assets/client-projections/github-copilot-cli/.github/skills/apex-terraform-patterns/references/module-locks-and-codegen-acceptance.md +0 -14
  205. package/assets/client-projections/github-copilot-cli/.github/skills/apex-terraform-patterns/references/network-and-observability.md +0 -12
  206. package/assets/client-projections/github-copilot-cli/.github/skills/apex-terraform-patterns/references/plan-and-change-assessment.md +0 -24
  207. package/assets/client-projections/github-copilot-cli/.github/skills/apex-terraform-test/SKILL.md +0 -45
  208. package/assets/client-projections/github-copilot-cli/.github/skills/apex-terraform-test/references/evidence-acceptance.md +0 -10
  209. package/assets/client-projections/github-copilot-cli/.github/skills/apex-terraform-test/references/plan-mode-and-mock-design.md +0 -12
  210. package/assets/client-projections/github-copilot-cli/.github/skills/apex-terraform-test/references/plan-mode-test-design.md +0 -23
  211. package/assets/client-projections/github-copilot-cli/.github/skills/apex-terraform-test/references/test-design.md +0 -13
  212. package/assets/client-projections/github-copilot-cli/.github/skills/apex-workflow/SKILL.md +0 -37
  213. package/assets/client-projections/github-copilot-vscode/.github/agents/apex-architect.agent.md +0 -100
  214. package/assets/client-projections/github-copilot-vscode/.github/agents/apex-codegen.agent.md +0 -62
  215. package/assets/client-projections/github-copilot-vscode/.github/agents/apex-operator.agent.md +0 -79
  216. package/assets/client-projections/github-copilot-vscode/.github/agents/apex-planner.agent.md +0 -98
  217. package/assets/client-projections/github-copilot-vscode/.github/agents/apex-requirements.agent.md +0 -108
  218. package/assets/client-projections/github-copilot-vscode/.github/agents/apex-reviewer.agent.md +0 -63
  219. package/assets/client-projections/github-copilot-vscode/.github/agents/apex-validator.agent.md +0 -61
  220. package/assets/client-projections/github-copilot-vscode/.github/agents/apex.agent.md +0 -107
  221. package/assets/client-projections/github-copilot-vscode/.github/copilot-instructions.md +0 -13
  222. package/assets/client-projections/github-copilot-vscode/.github/instructions/apex-agent-authoring.instructions.md +0 -14
  223. package/assets/client-projections/github-copilot-vscode/.github/instructions/apex-artifact-contracts.instructions.md +0 -12
  224. package/assets/client-projections/github-copilot-vscode/.github/instructions/apex-automation.instructions.md +0 -12
  225. package/assets/client-projections/github-copilot-vscode/.github/instructions/apex-azure-yaml.instructions.md +0 -12
  226. package/assets/client-projections/github-copilot-vscode/.github/instructions/apex-bicep.instructions.md +0 -12
  227. package/assets/client-projections/github-copilot-vscode/.github/instructions/apex-code-quality.instructions.md +0 -12
  228. package/assets/client-projections/github-copilot-vscode/.github/instructions/apex-context.instructions.md +0 -12
  229. package/assets/client-projections/github-copilot-vscode/.github/instructions/apex-documentation.instructions.md +0 -12
  230. package/assets/client-projections/github-copilot-vscode/.github/instructions/apex-governance.instructions.md +0 -12
  231. package/assets/client-projections/github-copilot-vscode/.github/instructions/apex-instruction-authoring.instructions.md +0 -12
  232. package/assets/client-projections/github-copilot-vscode/.github/instructions/apex-javascript.instructions.md +0 -11
  233. package/assets/client-projections/github-copilot-vscode/.github/instructions/apex-json.instructions.md +0 -11
  234. package/assets/client-projections/github-copilot-vscode/.github/instructions/apex-markdown.instructions.md +0 -13
  235. package/assets/client-projections/github-copilot-vscode/.github/instructions/apex-powershell.instructions.md +0 -11
  236. package/assets/client-projections/github-copilot-vscode/.github/instructions/apex-prompt-authoring.instructions.md +0 -12
  237. package/assets/client-projections/github-copilot-vscode/.github/instructions/apex-python.instructions.md +0 -11
  238. package/assets/client-projections/github-copilot-vscode/.github/instructions/apex-safe-file-edits.instructions.md +0 -11
  239. package/assets/client-projections/github-copilot-vscode/.github/instructions/apex-safe-shell.instructions.md +0 -11
  240. package/assets/client-projections/github-copilot-vscode/.github/instructions/apex-shell.instructions.md +0 -11
  241. package/assets/client-projections/github-copilot-vscode/.github/instructions/apex-skill-authoring.instructions.md +0 -13
  242. package/assets/client-projections/github-copilot-vscode/.github/instructions/apex-terraform.instructions.md +0 -12
  243. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-architecture/SKILL.md +0 -36
  244. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-artifacts/SKILL.md +0 -65
  245. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-artifacts/references/presentation-conventions.md +0 -52
  246. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-artifacts/references/reference-only-outlines.md +0 -78
  247. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-artifacts/templates/architecture-assessment.md +0 -35
  248. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-artifacts/templates/cost-estimate.md +0 -47
  249. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-artifacts/templates/deployment-summary.md +0 -35
  250. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-artifacts/templates/governance-constraints.md +0 -35
  251. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-artifacts/templates/implementation-plan.md +0 -43
  252. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-artifacts/templates/operations-runbook.md +0 -35
  253. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-artifacts/templates/requirements.md +0 -42
  254. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-artifacts/templates/resource-inventory.md +0 -29
  255. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-adr/SKILL.md +0 -52
  256. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-adr/references/decision-examples.md +0 -38
  257. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-adr/references/decision-guardrails.md +0 -36
  258. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-adr/references/decision-quality.md +0 -21
  259. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-adr/references/decision-record-fields.md +0 -57
  260. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-cloud-migrate/SKILL.md +0 -55
  261. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-cloud-migrate/references/lambda-to-functions-assessment.md +0 -29
  262. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-cloud-migrate/references/migration-readiness.md +0 -27
  263. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-cloud-migrate/references/staged-validation-handoff.md +0 -26
  264. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-cloud-migrate/references/workload-mapping.md +0 -27
  265. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-compliance/SKILL.md +0 -58
  266. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-compliance/references/compliance-finding-criteria.md +0 -63
  267. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-compliance/references/operational-checklist.md +0 -24
  268. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-compute/SKILL.md +0 -36
  269. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-compute/references/compute-selection.md +0 -26
  270. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-compute/references/pricing-evidence.md +0 -11
  271. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-compute/references/recommendation-and-scale-rules.md +0 -44
  272. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-cost-optimization/SKILL.md +0 -61
  273. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-cost-optimization/references/cost-assessment-criteria.md +0 -61
  274. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-cost-optimization/references/operational-checklist.md +0 -24
  275. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-defaults/SKILL.md +0 -59
  276. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-defaults/references/avm-binding-guidance.md +0 -29
  277. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-defaults/references/baseline-fallbacks.md +0 -53
  278. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-defaults/references/cost-monitoring.md +0 -47
  279. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-defaults/references/decision-boundaries.md +0 -19
  280. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-defaults/references/governance-effects.md +0 -28
  281. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-defaults/references/naming.md +0 -47
  282. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-defaults/references/network-planning.md +0 -47
  283. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-defaults/references/security-baseline.md +0 -40
  284. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-defaults/references/service-selection.md +0 -51
  285. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-defaults/references/tag-precedence.md +0 -31
  286. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-deploy/SKILL.md +0 -50
  287. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-deploy/references/operational-checklist.md +0 -26
  288. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-deploy/references/preview-recovery-verification.md +0 -48
  289. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-diagnostics/SKILL.md +0 -60
  290. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-diagnostics/references/diagnostic-interpretation.md +0 -42
  291. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-diagnostics/references/operational-checklist.md +0 -24
  292. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-governance/SKILL.md +0 -52
  293. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-governance/references/evidence-interpretation.md +0 -58
  294. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-governance/references/operational-checklist.md +0 -25
  295. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-kusto/SKILL.md +0 -58
  296. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-kusto/references/kql-evidence-interpretation.md +0 -41
  297. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-kusto/references/operational-checklist.md +0 -25
  298. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-prepare/SKILL.md +0 -52
  299. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-prepare/references/functions-recipe-pack.md +0 -27
  300. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-prepare/references/preparation-lineage.md +0 -36
  301. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-quotas/SKILL.md +0 -53
  302. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-quotas/references/capacity-decision-rules.md +0 -48
  303. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-quotas/references/operational-checklist.md +0 -23
  304. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-rbac/SKILL.md +0 -45
  305. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-rbac/references/assignment-intent.md +0 -39
  306. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-rbac/references/least-privilege-selection.md +0 -50
  307. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-resources/SKILL.md +0 -54
  308. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-resources/references/inventory-query-patterns.md +0 -49
  309. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-resources/references/operational-checklist.md +0 -24
  310. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-storage/SKILL.md +0 -35
  311. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-storage/references/security-and-governance.md +0 -12
  312. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-storage/references/service-auth-and-sdk-boundary.md +0 -33
  313. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-storage/references/storage-selection.md +0 -12
  314. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-validate/SKILL.md +0 -49
  315. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-validate/references/operational-checklist.md +0 -24
  316. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-validate/references/preflight-evidence.md +0 -43
  317. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-bicep-patterns/SKILL.md +0 -41
  318. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-bicep-patterns/references/avm-and-codegen-acceptance.md +0 -11
  319. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-bicep-patterns/references/codegen-acceptance-checklist.md +0 -46
  320. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-bicep-patterns/references/compiler-and-provider-gotchas.md +0 -74
  321. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-bicep-patterns/references/module-interfaces-and-parameters.md +0 -56
  322. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-bicep-patterns/references/network-and-observability.md +0 -52
  323. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-codegen/SKILL.md +0 -32
  324. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-entra-app-registration/SKILL.md +0 -53
  325. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-entra-app-registration/references/capability-receipts.md +0 -21
  326. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-entra-app-registration/references/design-and-diagnostics.md +0 -36
  327. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-entra-app-registration/references/oauth-registration-model.md +0 -26
  328. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-entra-app-registration/references/permissions-and-credentials.md +0 -27
  329. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-mermaid/SKILL.md +0 -44
  330. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-mermaid/references/styling.md +0 -33
  331. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-mermaid/references/syntax.md +0 -99
  332. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-microsoft-docs/SKILL.md +0 -53
  333. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-microsoft-docs/references/research-method.md +0 -91
  334. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-operations/SKILL.md +0 -34
  335. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-planning/SKILL.md +0 -36
  336. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-requirements/SKILL.md +0 -46
  337. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-terraform-import/SKILL.md +0 -47
  338. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-terraform-import/references/adoption-attestation.md +0 -10
  339. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-terraform-import/references/import-assessment.md +0 -14
  340. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-terraform-import/references/import-mapping.md +0 -27
  341. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-terraform-import/references/mapping-and-adoption-attestation.md +0 -12
  342. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-terraform-patterns/SKILL.md +0 -49
  343. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-terraform-patterns/references/module-composition-and-refactor.md +0 -20
  344. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-terraform-patterns/references/module-composition-and-state-boundaries.md +0 -11
  345. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-terraform-patterns/references/module-locks-and-codegen-acceptance.md +0 -14
  346. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-terraform-patterns/references/network-and-observability.md +0 -12
  347. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-terraform-patterns/references/plan-and-change-assessment.md +0 -24
  348. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-terraform-test/SKILL.md +0 -45
  349. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-terraform-test/references/evidence-acceptance.md +0 -10
  350. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-terraform-test/references/plan-mode-and-mock-design.md +0 -12
  351. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-terraform-test/references/plan-mode-test-design.md +0 -23
  352. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-terraform-test/references/test-design.md +0 -13
  353. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-workflow/SKILL.md +0 -37
  354. package/assets/client-projections/github-copilot-vscode/.vscode/mcp.json +0 -29
  355. package/assets/customizations/.github/agents/apex-architect.agent.md +0 -93
  356. package/assets/customizations/.github/agents/apex-operator.agent.md +0 -72
  357. package/assets/customizations/.github/agents/apex-planner.agent.md +0 -91
  358. package/assets/customizations/.github/agents/apex-requirements.agent.md +0 -101
  359. package/assets/customizations/.github/agents/apex-reviewer.agent.md +0 -60
  360. package/assets/customizations/.github/mcp.json +0 -65
  361. package/assets/customizations/.github/skills/apex-azure-prepare/references/functions-recipe-pack.md +0 -27
  362. package/assets/customizations/.vscode/mcp.json +0 -29
  363. package/dist/azure-mcp-environment.d.ts +0 -2
  364. package/dist/azure-mcp-environment.js +0 -7
  365. package/dist/azure-mcp.d.ts +0 -2
  366. package/dist/azure-mcp.js +0 -21
package/dist/cli.js CHANGED
@@ -5,16 +5,20 @@ import { CONTRACT_VERSION, OnboardingConfigV1Schema, QualityMeasurementsV1Schema
5
5
  import { Value } from "@sinclair/typebox/value";
6
6
  import { EventJournal, ValidatorRegistry, WriterTransferStore, atomicWriteJson, sha256Json } from "@apexops/kernel";
7
7
  import { evaluateQualityScorecard, renderQualityScorecardEvaluation, } from "@apexops/renderers";
8
- import { basename, join, resolve } from "node:path";
8
+ import { join, resolve } from "node:path";
9
9
  import { ApexError, EXIT_CODES, normalizeError } from "./errors.js";
10
10
  import { dependencyRevision as calculateDependencyRevision } from "./dependency-revision.js";
11
11
  import { resolveBundledAssets } from "./assets.js";
12
+ import { assertTargetScope } from "./target-scope.js";
12
13
  import { serveMcp } from "./mcp.js";
13
14
  import { createFileProviderRuntime, hashTerraformConfiguration, hashTerraformLockFile } from "./provider-runtime.js";
14
15
  import { exportProviderTransfer, importProviderTransfer } from "./provider-transfer.js";
15
16
  import { ApexService } from "./service.js";
16
17
  import { exportStateTransfer, importStateTransfer } from "./state-transfer.js";
17
18
  import { APEX_VERSION } from "./version.js";
19
+ import { interactiveBootstrap } from "./bootstrap-wizard.js";
20
+ import { mcpWorkspaceRoot, resolveMcpWorkspace } from "./workspace-root.js";
21
+ export { mcpWorkspaceRoot, resolveMcpWorkspace } from "./workspace-root.js";
18
22
  function addFlag(flags, name, value) {
19
23
  const current = flags[name];
20
24
  if (current === undefined)
@@ -56,48 +60,51 @@ function confirmed(flags, command) {
56
60
  throw new ApexError("APEX_USAGE", `${command} requires --yes`, EXIT_CODES.usage);
57
61
  }
58
62
  function clientId(flags) {
59
- const value = flags.client ?? "github-copilot-vscode";
60
- if (value !== "github-copilot-cli" && value !== "github-copilot-vscode") {
61
- throw new ApexError("APEX_USAGE", "--client must be github-copilot-vscode or github-copilot-cli", EXIT_CODES.usage);
62
- }
63
+ const value = flags.client ?? "github-copilot-cli";
64
+ if (value !== "github-copilot-cli")
65
+ throw new ApexError("APEX_USAGE", "--client must be github-copilot-cli", EXIT_CODES.usage);
63
66
  return value;
64
67
  }
65
- function profileClientId(flags) {
66
- const value = clientId(flags);
67
- if (value !== "github-copilot-vscode") {
68
- throw new ApexError("APEX_USAGE", "Profile bootstrap is supported only for github-copilot-vscode", EXIT_CODES.usage);
69
- }
68
+ function riskOwner(flags) {
69
+ const value = required(flags, "risk-owner");
70
+ if (value !== "partner" && value !== "customer")
71
+ throw new ApexError("APEX_USAGE", "--risk-owner must be partner or customer", EXIT_CODES.usage);
70
72
  return value;
71
73
  }
72
74
  async function inputJson(flags) {
73
75
  return JSON.parse(await readFile(required(flags, "file"), "utf8"));
74
76
  }
75
- function defaultProjectId(root) {
76
- let value = basename(resolve(root))
77
- .toLowerCase()
78
- .replace(/[^a-z0-9]+/g, "-");
79
- while (value.startsWith("-"))
80
- value = value.slice(1);
81
- while (value.endsWith("-"))
82
- value = value.slice(0, -1);
83
- return value.length === 0 ? "apex-project" : value;
84
- }
85
- async function onboardingConfig(flags, root) {
77
+ async function onboardingConfig(flags, _root) {
86
78
  const config = typeof flags.file === "string"
87
79
  ? await inputJson(flags)
88
80
  : {
89
81
  schemaVersion: CONTRACT_VERSION,
90
- projectId: typeof flags.project === "string" ? flags.project : defaultProjectId(root),
82
+ ...(typeof flags.project === "string" ? { projectId: flags.project } : {}),
91
83
  ...(typeof flags.name === "string" ? { displayName: flags.name } : {}),
92
84
  ...(typeof flags.client === "string" ? { client: flags.client } : {}),
93
85
  ...(typeof flags.environment === "string" ? { environment: flags.environment } : {}),
94
86
  ...(typeof flags.target === "string" ? { targetScope: flags.target } : {}),
95
87
  ...(flags.iac === "terraform" ? { iacTool: "terraform" } : {}),
88
+ ...(typeof flags["risk-owner"] === "string" ? { riskOwner: flags["risk-owner"] } : {}),
96
89
  ...(flags["create-repo"] === true ? { createRepository: true } : {}),
97
90
  };
98
91
  if (!Value.Check(OnboardingConfigV1Schema, config)) {
99
92
  throw new ApexError("APEX_VALIDATION", "Onboarding configuration is malformed", EXIT_CODES.validation);
100
93
  }
94
+ if (config.projectId !== undefined && config.riskOwner === undefined) {
95
+ throw new ApexError("APEX_VALIDATION", "Project risk owner must be partner or customer", EXIT_CODES.validation);
96
+ }
97
+ if (config.projectId !== undefined && config.targetScope === undefined) {
98
+ throw new ApexError("APEX_USAGE", "--project requires --target", EXIT_CODES.usage);
99
+ }
100
+ if (config.targetScope !== undefined)
101
+ assertTargetScope(config.targetScope);
102
+ if (config.projectId === undefined && config.riskOwner !== undefined) {
103
+ throw new ApexError("APEX_USAGE", "--risk-owner requires --project", EXIT_CODES.usage);
104
+ }
105
+ if (typeof flags.client === "string" && config.client !== undefined && flags.client !== config.client) {
106
+ throw new ApexError("APEX_USAGE", "--client conflicts with the onboarding configuration", EXIT_CODES.usage);
107
+ }
101
108
  return config;
102
109
  }
103
110
  async function configuredProviders(root, flags) {
@@ -311,11 +318,9 @@ async function qualityStatus(root) {
311
318
  throw error;
312
319
  }
313
320
  }
314
- export async function execute(argv, root = process.cwd(), options = {}) {
315
- const { words, flags } = parse(argv);
316
- const command = words.join(" ");
321
+ export async function createApexService(root, flags = {}, command = "", options = {}) {
317
322
  const runner = new ProcessRunner();
318
- const service = new ApexService(root, {
323
+ return new ApexService(root, {
319
324
  ...options,
320
325
  providers: { ...options.providers, ...(await configuredProviders(root, flags)) },
321
326
  azureAuthStatus: options.azureAuthStatus ??
@@ -340,7 +345,51 @@ export async function execute(argv, root = process.cwd(), options = {}) {
340
345
  }
341
346
  }),
342
347
  });
348
+ }
349
+ /**
350
+ * One service per resolved workspace root. Every service sees the others as pending-review guard peers, so a guarded
351
+ * call aimed at another workspace still fails while any served workspace has a review waiting for its capture.
352
+ */
353
+ export function mcpServiceResolver(defaultService, create) {
354
+ const cache = new Map([[defaultService.root, defaultService]]);
355
+ const peers = () => cache.values();
356
+ defaultService.setReviewGuardPeers(peers);
357
+ return {
358
+ defaultService,
359
+ resolve: async (workspace) => {
360
+ const resolved = await resolveMcpWorkspace(workspace);
361
+ let resolvedService = cache.get(resolved.root);
362
+ if (resolvedService === undefined) {
363
+ resolvedService = await create(resolved.root, resolved.workspace);
364
+ resolvedService.setReviewGuardPeers(peers);
365
+ cache.set(resolved.root, resolvedService);
366
+ }
367
+ return { service: resolvedService, workspace: resolved.workspace };
368
+ },
369
+ };
370
+ }
371
+ export async function execute(argv, root = process.cwd(), options = {}, interaction = {}) {
372
+ const { words, flags } = parse(argv);
373
+ const command = words.join(" ");
374
+ if (command === "mcp serve")
375
+ root = await realpath(await mcpWorkspaceRoot(root));
376
+ const service = await createApexService(root, flags, command, options);
377
+ const run = () => dispatch(service, command, flags, root, options, interaction);
378
+ if (UNSERIALIZED_COMMANDS.has(command))
379
+ return run();
380
+ // State-changing commands share the workspace lock that repeat-guarded MCP calls hold. They give it up only while
381
+ // they wait for interactive input, and fail stale if the workspace changed meanwhile.
382
+ return service.withWorkspaceWriteLock(run, undefined, { suspendable: true });
383
+ }
384
+ /**
385
+ * Commands that never write workspace state, not even by finishing a pending recovery, so they do not take the
386
+ * workspace lock: the long-lived MCP server and the reads that mirror the `read-only` MCP tools.
387
+ */
388
+ const UNSERIALIZED_COMMANDS = new Set(["mcp serve", "version", "status", "project list"]);
389
+ async function dispatch(service, command, flags, root, options, interaction) {
343
390
  switch (command) {
391
+ case "mcp serve":
392
+ return serveMcp(mcpServiceResolver(service, (workspaceRoot, workspacePath) => createApexService(workspaceRoot, flags, command, { ...options, workspacePath })));
344
393
  case "version": {
345
394
  const assets = await resolveBundledAssets();
346
395
  return {
@@ -350,48 +399,61 @@ export async function execute(argv, root = process.cwd(), options = {}) {
350
399
  };
351
400
  }
352
401
  case "init":
402
+ if (flags.client === "github-copilot-cli" && (await service.retiredProjectionInstalled()))
403
+ return service.replaceRetiredProjection();
353
404
  return service.init({
354
405
  projectId: required(flags, "project"),
355
406
  ...(typeof flags.name === "string" ? { displayName: flags.name } : {}),
356
407
  ...(typeof flags.environment === "string" ? { environment: flags.environment } : {}),
357
- ...(typeof flags.target === "string" ? { targetScope: flags.target } : {}),
408
+ targetScope: assertTargetScope(required(flags, "target")),
358
409
  iacTool: flags.iac === "terraform" ? "terraform" : "bicep",
410
+ riskOwner: riskOwner(flags),
359
411
  clientId: clientId(flags),
360
412
  ...(typeof flags["customizations-source"] === "string"
361
413
  ? { customizationsSource: flags["customizations-source"] }
362
414
  : {}),
363
415
  });
416
+ case "bootstrap plan":
417
+ return service.planBootstrap(await onboardingConfig(flags, root));
418
+ case "bootstrap wizard":
419
+ if (flags.yes === true || flags.json === true)
420
+ throw new ApexError("APEX_USAGE", "The wizard requires per-plan interactive confirmation; omit --yes and --json", EXIT_CODES.usage);
421
+ return interactiveBootstrap(root, service, { interaction: interaction.bootstrap });
422
+ case "bootstrap governance-plan":
423
+ return service.planGovernanceSetup((await inputJson(flags)));
424
+ case "bootstrap governance-provision-plan":
425
+ return service.planGovernanceProvision((await inputJson(flags)));
426
+ case "bootstrap governance-provision":
427
+ confirmed(flags, "bootstrap governance-provision");
428
+ return service.provisionGovernance((await inputJson(flags)), required(flags, "expected-hash"), true);
429
+ case "bootstrap baseline-check":
430
+ return service.inspectGovernanceBaselineReadiness(required(flags, "path"));
431
+ case "bootstrap repository-plan":
432
+ return service.planRepositoryPublish((await inputJson(flags)));
433
+ case "bootstrap repository-publish":
434
+ confirmed(flags, "bootstrap repository-publish");
435
+ return service.publishRepository((await inputJson(flags)), required(flags, "expected-hash"), true);
436
+ case "bootstrap coe-plan":
437
+ return service.planArchetypeBatch((await inputJson(flags)));
438
+ case "bootstrap coe-import":
439
+ confirmed(flags, "bootstrap coe-import");
440
+ return service.importArchetypeBatch((await inputJson(flags)), required(flags, "expected-hash"), true);
364
441
  case "bootstrap": {
442
+ if (Object.keys(flags).length === 0)
443
+ return interactiveBootstrap(root, service, { interaction: interaction.bootstrap });
365
444
  confirmed(flags, "bootstrap");
366
445
  const config = await onboardingConfig(flags, root);
367
- if (typeof flags.client === "string" && config.client !== undefined && flags.client !== config.client) {
368
- throw new ApexError("APEX_USAGE", "--client conflicts with the onboarding configuration", EXIT_CODES.usage);
369
- }
370
446
  return service.bootstrap({
371
- projectId: config.projectId,
447
+ ...(config.projectId === undefined ? {} : { projectId: config.projectId }),
372
448
  ...(config.displayName === undefined ? {} : { displayName: config.displayName }),
373
449
  ...(config.environment === undefined ? {} : { environment: config.environment }),
374
450
  ...(config.targetScope === undefined ? {} : { targetScope: config.targetScope }),
375
451
  ...(config.iacTool === undefined ? {} : { iacTool: config.iacTool }),
452
+ ...(config.riskOwner === undefined ? {} : { riskOwner: config.riskOwner }),
376
453
  clientId: config.client ?? clientId(flags),
377
454
  ...(config.createRepository === undefined ? {} : { createRepository: config.createRepository }),
378
455
  });
379
456
  }
380
- case "profile status":
381
- profileClientId(flags);
382
- return service.profileStatus();
383
- case "profile install":
384
- confirmed(flags, "profile install");
385
- profileClientId(flags);
386
- return service.profileInstall();
387
- case "profile update":
388
- confirmed(flags, "profile update");
389
- profileClientId(flags);
390
- return service.profileUpdate();
391
- case "profile uninstall":
392
- confirmed(flags, "profile uninstall");
393
- profileClientId(flags);
394
- return service.profileUninstall();
395
457
  case "update":
396
458
  return service.update(typeof flags["customizations-source"] === "string" ? flags["customizations-source"] : undefined);
397
459
  case "setup":
@@ -423,8 +485,9 @@ export async function execute(argv, root = process.cwd(), options = {}) {
423
485
  projectId: required(flags, "project"),
424
486
  ...(typeof flags.name === "string" ? { displayName: flags.name } : {}),
425
487
  ...(typeof flags.environment === "string" ? { environment: flags.environment } : {}),
426
- ...(typeof flags.target === "string" ? { targetScope: flags.target } : {}),
488
+ targetScope: assertTargetScope(required(flags, "target")),
427
489
  iacTool: flags.iac === "terraform" ? "terraform" : "bicep",
490
+ riskOwner: riskOwner(flags),
428
491
  });
429
492
  case "project delete":
430
493
  confirmed(flags, "project delete");
@@ -476,23 +539,73 @@ export async function execute(argv, root = process.cwd(), options = {}) {
476
539
  confirmed(flags, "provider transfer-import");
477
540
  return importProviderTransfer(root, JSON.parse(await readFile(required(flags, "file"), "utf8")), required(flags, "recipient"));
478
541
  }
542
+ case "archetype list":
543
+ return service.listArchetypes(required(flags, "repository"), required(flags, "revision"), required(flags, "path"));
544
+ case "archetype inspect":
545
+ return service.inspectArchetype(required(flags, "repository"), required(flags, "revision"), required(flags, "path"));
546
+ case "archetype import":
547
+ confirmed(flags, "archetype import");
548
+ return service.importArchetype({
549
+ repositoryPath: required(flags, "repository"),
550
+ revision: required(flags, "revision"),
551
+ selectedPath: required(flags, "path"),
552
+ destination: required(flags, "destination"),
553
+ expectedHash: required(flags, "expected-hash"),
554
+ confirm: true,
555
+ });
479
556
  case "status":
480
- return service.status();
557
+ return service.workspaceStatus();
558
+ case "requirements preview-change":
559
+ return service.previewRequirementsChange((await inputJson(flags)), required(flags, "reason"));
560
+ case "requirements preview-amendment":
561
+ return service.previewRequirementsAmendment((await inputJson(flags)), required(flags, "reason"));
562
+ case "requirements amend":
563
+ confirmed(flags, "requirements amend");
564
+ return service.amendRequirements((await inputJson(flags)), {
565
+ reason: required(flags, "reason"),
566
+ expectedHash: required(flags, "expected-hash"),
567
+ confirm: true,
568
+ });
569
+ case "requirements preview-adoption":
570
+ return service.previewRequirementsChange((await inputJson(flags)), required(flags, "reason"), "adopt");
571
+ case "requirements adopt":
572
+ confirmed(flags, "requirements adopt");
573
+ return service.reviseRequirements((await inputJson(flags)), {
574
+ reason: required(flags, "reason"),
575
+ expectedHash: required(flags, "expected-hash"),
576
+ confirm: true,
577
+ mode: "adopt",
578
+ });
579
+ case "requirements revise":
580
+ confirmed(flags, "requirements revise");
581
+ return service.reviseRequirements((await inputJson(flags)), {
582
+ reason: required(flags, "reason"),
583
+ expectedHash: required(flags, "expected-hash"),
584
+ confirm: true,
585
+ });
586
+ case "governance import":
587
+ if (flags.reference === undefined)
588
+ return service.importGovernanceBaseline(required(flags, "path"));
589
+ if (flags.reference !== true || flags.path !== undefined)
590
+ throw new ApexError("APEX_USAGE", "Use exactly one of --path or --reference", EXIT_CODES.usage);
591
+ return service.importGovernanceReference();
592
+ case "governance revise": {
593
+ confirmed(flags, "governance revise");
594
+ return service.reviseGovernanceBaseline(required(flags, "path"), {
595
+ confirm: true,
596
+ reason: required(flags, "reason"),
597
+ });
598
+ }
599
+ case "governance select":
600
+ return service.selectGovernanceBaseline(required(flags, "path"), ...(flags.reopen === true ? [{ reopen: true }] : []));
481
601
  case "task next":
482
602
  return service.nextTask();
483
603
  case "task context":
484
604
  return service.taskContext(required(flags, "task"));
485
605
  case "task complete": {
486
606
  const paths = files(flags);
487
- if (paths.length > 1) {
488
- const outputs = await Promise.all(paths.map(async (path) => JSON.parse(await readFile(path, "utf8"))));
489
- return service.completeTaskOutputs(required(flags, "task"), outputs);
490
- }
491
- return service.completeTask(required(flags, "task"), {
492
- kind: required(flags, "kind"),
493
- value: JSON.parse(await readFile(paths[0], "utf8")),
494
- ...(typeof flags.summary === "string" ? { summary: flags.summary } : {}),
495
- });
607
+ const outputs = await Promise.all(paths.map(async (path) => JSON.parse(await readFile(path, "utf8"))));
608
+ return service.completeTaskOutputs(required(flags, "task"), outputs);
496
609
  }
497
610
  case "task complete-bundle": {
498
611
  const bundle = (await inputJson(flags));
@@ -545,8 +658,6 @@ export async function execute(argv, root = process.cwd(), options = {}) {
545
658
  return service.diagnose();
546
659
  case "render":
547
660
  return service.render(required(flags, "kind"));
548
- case "promote":
549
- return service.promote(required(flags, "environment"), required(flags, "target"));
550
661
  case "customizations rollback":
551
662
  return service.rollbackCustomizations();
552
663
  case "customizations uninstall":
@@ -615,9 +726,6 @@ export async function execute(argv, root = process.cwd(), options = {}) {
615
726
  case "quality prune":
616
727
  confirmed(flags, "quality prune");
617
728
  return service.improvementPrune();
618
- case "mcp serve":
619
- await serveMcp(service);
620
- return undefined;
621
729
  default:
622
730
  throw new ApexError("APEX_USAGE", `Unknown command: ${command || "<none>"}`, EXIT_CODES.usage);
623
731
  }
@@ -646,6 +754,8 @@ async function main() {
646
754
  export function formatHumanResult(args, result) {
647
755
  const command = args.find((argument) => !argument.startsWith("--"));
648
756
  if (command === "status" && result !== null && typeof result === "object") {
757
+ if ("status" in result && result.status === "needs_project")
758
+ return "Workspace configured. No projects yet. Open APEX to gather details and create the first project.";
649
759
  const status = result;
650
760
  const task = status.task ?? null;
651
761
  const stage = task?.startsWith("requirements")
@@ -673,14 +783,21 @@ export function formatHumanResult(args, result) {
673
783
  const passed = doctor.checks?.filter(({ ok }) => ok).length ?? 0;
674
784
  const total = doctor.checks?.length ?? 0;
675
785
  const remaining = doctor.remedies?.length ?? 0;
786
+ const warnings = doctor.checks?.filter(({ ok, severity }) => ok && severity === "warning") ?? [];
787
+ const warning = warnings[0]?.remedy ?? warnings[0]?.value;
676
788
  return [
677
789
  `Status: ${doctor.healthy ? "Ready" : "Setup incomplete"} (${passed}/${total} checks ready)`,
678
790
  `Next: ${doctor.nextAction ?? "No action required"}`,
679
791
  ...(remaining > 1 ? [`Later: ${remaining - 1} additional setup item${remaining === 2 ? "" : "s"}`] : []),
792
+ ...(warnings.length > 0
793
+ ? [`Warning: ${warning ?? "see doctor --json"}${warnings.length > 1 ? ` (+${warnings.length - 1} more)` : ""}`]
794
+ : []),
680
795
  ].join("\n");
681
796
  }
682
797
  return typeof result === "string" ? result : JSON.stringify(result, null, 2);
683
798
  }
684
- if (process.argv[1] !== undefined && (await realpath(process.argv[1])) === (await realpath(new URL(import.meta.url))))
799
+ if (typeof __APEX_PLUGIN_BUNDLE__ === "undefined" &&
800
+ process.argv[1] !== undefined &&
801
+ (await realpath(process.argv[1])) === (await realpath(new URL(import.meta.url))))
685
802
  await main();
686
803
  //# sourceMappingURL=cli.js.map
@@ -1,6 +1,14 @@
1
1
  import { sha256Json } from "@apexops/kernel";
2
2
  export function dependencyRevision(run, events) {
3
3
  const artifacts = events.reduce((current, event) => {
4
+ if (event.type === "workflow.invalidated") {
5
+ const payload = event.payload;
6
+ for (const kind of payload.artifactKinds ?? [])
7
+ delete current[kind];
8
+ if (payload.governanceRevision?.retainedReviewHash !== undefined)
9
+ current["review-findings"] = payload.governanceRevision.retainedReviewHash;
10
+ return current;
11
+ }
4
12
  if (event.type !== "task.completed")
5
13
  return current;
6
14
  const hashes = event.payload.artifactHashes ?? {};
package/dist/errors.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { GovernanceBaselineError } from "@apexops/capabilities";
1
2
  export declare const EXIT_CODES: {
2
3
  readonly success: 0;
3
4
  readonly usage: 2;
@@ -8,12 +9,16 @@ export declare const EXIT_CODES: {
8
9
  readonly authorization: 7;
9
10
  readonly internal: 10;
10
11
  };
11
- export type ApexErrorCode = "APEX_USAGE" | "APEX_NOT_FOUND" | "APEX_CONFLICT" | "APEX_VALIDATION" | "APEX_STALE" | "APEX_AUTHORIZATION" | "APEX_INTERNAL";
12
+ export type ApexErrorCode = "APEX_USAGE" | "APEX_NOT_FOUND" | "APEX_CONFLICT" | "APEX_WRITER_CONFLICT" | "APEX_WORKSPACE_UNSUPPORTED" | "APEX_RUNTIME_MISMATCH" | "APEX_VALIDATION" | "APEX_STALE" | "APEX_AUTHORIZATION" | "APEX_CURSOR_INVALID" | "APEX_RESULT_TOO_LARGE" | "APEX_REVIEW_PENDING" | "APEX_INTERNAL";
12
13
  export declare class ApexError extends Error {
13
14
  readonly code: ApexErrorCode;
14
15
  readonly exitCode: number;
15
16
  readonly details?: unknown;
16
17
  constructor(code: ApexErrorCode, message: string, exitCode: number, details?: unknown, options?: ErrorOptions);
17
18
  }
19
+ export type RuntimeMismatchReason = "RUNTIME_WORKSPACE_OLDER" | "RUNTIME_WORKSPACE_NEWER" | "RUNTIME_LOCK_INVALID";
20
+ export declare function remediationForApexError(error: ApexError): string;
18
21
  export declare function normalizeError(error: unknown): ApexError;
22
+ export declare function governanceBaselineApexError(error: GovernanceBaselineError, source?: "baseline" | "reference"): ApexError;
23
+ export declare function retiredProjectionError(): ApexError;
19
24
  //# sourceMappingURL=errors.d.ts.map
package/dist/errors.js CHANGED
@@ -1,3 +1,6 @@
1
+ import { GovernanceBaselineError } from "@apexops/capabilities";
2
+ import { RunWriterConflictError } from "@apexops/kernel";
3
+ import { APEX_VERSION } from "./version.js";
1
4
  export const EXIT_CODES = {
2
5
  success: 0,
3
6
  usage: 2,
@@ -20,9 +23,44 @@ export class ApexError extends Error {
20
23
  this.name = "ApexError";
21
24
  }
22
25
  }
26
+ const REMEDIATION_BY_CODE = {
27
+ APEX_USAGE: "Fix the tool arguments to match the input schema, then call the tool again.",
28
+ APEX_NOT_FOUND: "Call status first, refresh the identifiers, and retry only with an existing project, run, or task.",
29
+ APEX_CONFLICT: "Call status and retry only if the refreshed state still requires this action; never retry mutations blindly after cancellation or timeout.",
30
+ APEX_WRITER_CONFLICT: "Continue from the owning worktree, release the writer lease there, or wait for the lease to expire before retrying.",
31
+ APEX_WORKSPACE_UNSUPPORTED: "Use the absolute path of a supported APEX checkout or git worktree, or start a workspace-aware MCP server.",
32
+ APEX_RUNTIME_MISMATCH: "Make this APEX runtime and the workspace runtime lock the same version: run `apex update` for an older workspace, or install the matching APEX plugin or @apexops/cli version for a newer one.",
33
+ APEX_VALIDATION: "Correct the validation issues against the current tool contract, then call the tool again.",
34
+ APEX_STALE: "Call status to refresh state and use the latest expected head, epoch, task, or cursor before retrying.",
35
+ APEX_AUTHORIZATION: "Call status and obtain the required human approval or decision before retrying.",
36
+ APEX_CURSOR_INVALID: "Discard the cursor, call the same tool again without it, and continue only from the new result; cursors do not survive an MCP server restart.",
37
+ APEX_RESULT_TOO_LARGE: "Request a smaller bounded result, use a paging-capable read tool, or narrow the requested document or collection.",
38
+ APEX_REVIEW_PENDING: "Finish the pending rubber-duck review with reviewComplete, or have the user stop any running rubber-duck and then cancel the review from a terminal with apex task cancel; then retry.",
39
+ APEX_INTERNAL: "Report this with the server log; retry only after checking status because side effects may have completed.",
40
+ };
41
+ const RUNTIME_MISMATCH_REMEDIATION = {
42
+ RUNTIME_WORKSPACE_OLDER: `Run \`apex update\` in the workspace with @apexops/cli@${APEX_VERSION}, the runtime this server runs, then call status again.`,
43
+ RUNTIME_WORKSPACE_NEWER: "Install the APEX plugin or @apexops/cli version named by the workspace runtime lock and restart the MCP server; do not downgrade the workspace with an older runtime.",
44
+ RUNTIME_LOCK_INVALID: `Inspect .apex/apex.lock.json; if a newer APEX runtime did not write it, run \`apex doctor --fix --yes\` in the workspace with @apexops/cli@${APEX_VERSION} to rewrite it, then call status again.`,
45
+ };
46
+ // Remediation is a fixed hint per stable code (and, for a runtime mismatch, per fixed reason) so error details,
47
+ // causes, and paths never reach MCP clients.
48
+ export function remediationForApexError(error) {
49
+ if (error.code === "APEX_RUNTIME_MISMATCH") {
50
+ const reason = error.details?.reason;
51
+ if (typeof reason === "string" && Object.hasOwn(RUNTIME_MISMATCH_REMEDIATION, reason))
52
+ return RUNTIME_MISMATCH_REMEDIATION[reason];
53
+ }
54
+ return REMEDIATION_BY_CODE[error.code];
55
+ }
23
56
  export function normalizeError(error) {
24
57
  if (error instanceof ApexError)
25
58
  return error;
59
+ if (error instanceof GovernanceBaselineError)
60
+ return governanceBaselineApexError(error);
61
+ if (error instanceof RunWriterConflictError) {
62
+ return new ApexError("APEX_WRITER_CONFLICT", `${error.message}; retry from that worktree, release the writer lease there, or wait for it to expire`, EXIT_CODES.conflict, { ownerWorktree: error.ownerWorktree, expiresAt: error.expiresAt }, { cause: error });
63
+ }
26
64
  if (error instanceof Error && /expired|stale/i.test(error.message)) {
27
65
  return new ApexError("APEX_STALE", error.message, EXIT_CODES.stale, undefined, { cause: error });
28
66
  }
@@ -31,4 +69,21 @@ export function normalizeError(error) {
31
69
  }
32
70
  return new ApexError("APEX_INTERNAL", error instanceof Error ? error.message : String(error), EXIT_CODES.internal, undefined, { cause: error });
33
71
  }
72
+ const GOVERNANCE_BASELINE_HINTS = {
73
+ incomplete: "the baseline does not fully cover the target scope; recollect it with tools/scripts/collect-governance-baseline.ps1 -IncludeDescendants and confirm coverage_status is COMPLETE",
74
+ "target-mismatch": "the baseline scope does not match the project target scope; collect it for the target subscription or its management group",
75
+ stale: "the baseline is too old; collect a fresh baseline",
76
+ "invalid-input": "the file does not match the governance baseline schema; recollect it with tools/scripts/collect-governance-baseline.ps1",
77
+ "invalid-options": "the project target scope cannot be checked against a baseline; check the project target scope",
78
+ };
79
+ export function governanceBaselineApexError(error, source = "baseline") {
80
+ const stale = error.code === "stale";
81
+ const hint = source === "reference"
82
+ ? "the bundled governance reference is unusable; run apex doctor --fix --yes or update APEX"
83
+ : GOVERNANCE_BASELINE_HINTS[error.code];
84
+ return new ApexError(stale ? "APEX_STALE" : "APEX_VALIDATION", `${error.message}: ${hint}`, stale ? EXIT_CODES.stale : EXIT_CODES.validation, { reason: `GOVERNANCE_${source.toUpperCase()}_${error.code.toUpperCase().replaceAll("-", "_")}` }, { cause: error });
85
+ }
86
+ export function retiredProjectionError() {
87
+ return new ApexError("APEX_VALIDATION", "The VS Code projection is retired; run `apex init --client github-copilot-cli`", EXIT_CODES.validation, { reason: "CLIENT_PROJECTION_RETIRED" });
88
+ }
34
89
  //# sourceMappingURL=errors.js.map
@@ -0,0 +1,47 @@
1
+ /** The machine `apex doctor` inspects. Injected in tests; defaults to the running process. */
2
+ export interface HostEnvironment {
3
+ readonly platform: NodeJS.Platform;
4
+ /** Kernel release, as `os.release()` reports it; distinguishes WSL1 from WSL2. */
5
+ readonly release: string;
6
+ readonly env: NodeJS.ProcessEnv;
7
+ readonly homedir: string;
8
+ }
9
+ /**
10
+ * DECISION-033 hosts. The host decides the client: native Windows (and best-effort macOS) runs VS Code with the Copilot
11
+ * harness or the GitHub Copilot app; Linux and WSL2 run Copilot CLI. Every workspace selects the `github-copilot-cli`
12
+ * projection, so the projection cannot tell the clients apart; the host can.
13
+ */
14
+ export type HostKind = "windows" | "macos" | "wsl2" | "linux" | "wsl1" | "unsupported";
15
+ export interface HostCheck {
16
+ id: string;
17
+ ok: boolean;
18
+ value: string;
19
+ remedy?: string;
20
+ /** Present only on advisory checks that pass but report something the user should know. */
21
+ severity?: "warning";
22
+ }
23
+ export interface HostCheckInputs {
24
+ host: HostEnvironment;
25
+ minimums: {
26
+ vscode?: string | undefined;
27
+ copilotCli?: string | undefined;
28
+ };
29
+ plugin: {
30
+ name: string;
31
+ marketplace: string;
32
+ };
33
+ apexVersion: string;
34
+ executableExists: (executable: string) => Promise<boolean>;
35
+ /** First stable `major.minor.patch` the executable reports for `args`, or undefined when it cannot be read. */
36
+ toolVersion: (executable: string, args: readonly string[]) => Promise<string | undefined>;
37
+ }
38
+ export declare function currentHostEnvironment(): HostEnvironment;
39
+ export declare function detectHostKind(host: HostEnvironment): HostKind;
40
+ /** Hosts whose supported client is Copilot CLI; VS Code there is not an APEX client. */
41
+ export declare function isCopilotCliHost(kind: HostKind): boolean;
42
+ /** Extracts the first stable release version from tool output such as `GitHub Copilot CLI 1.0.93.`. */
43
+ export declare function firstReleaseVersion(output: string): string | undefined;
44
+ export declare function copilotHome(host: HostEnvironment): string;
45
+ /** Read-only host checks for the supported client on this host. Each failing or advisory check carries a remedy. */
46
+ export declare function hostDoctorChecks(inputs: HostCheckInputs): Promise<HostCheck[]>;
47
+ //# sourceMappingURL=host-profile.d.ts.map