@apexops/cli 0.10.0-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (401) hide show
  1. package/assets/capability-packs/azure-governance-discovery/source/scripts/discover.py +1189 -0
  2. package/assets/capability-packs/azure-governance-discovery/source/scripts/render_governance.py +676 -0
  3. package/assets/capability-packs/registry.v1.json +73 -0
  4. package/assets/client-projection-metadata/copilot-cli-agent-tools.json +92 -0
  5. package/assets/client-projections/github-copilot-cli/.github/agents/apex-architect.agent.md +78 -0
  6. package/assets/client-projections/github-copilot-cli/.github/agents/apex-operator.agent.md +71 -0
  7. package/assets/client-projections/github-copilot-cli/.github/agents/apex-planner.agent.md +79 -0
  8. package/assets/client-projections/github-copilot-cli/.github/agents/apex-requirements.agent.md +69 -0
  9. package/assets/client-projections/github-copilot-cli/.github/agents/apex.agent.md +52 -0
  10. package/assets/client-projections/github-copilot-cli/.github/copilot-instructions.md +13 -0
  11. package/assets/client-projections/github-copilot-cli/.github/mcp.json +54 -0
  12. package/assets/client-projections/github-copilot-cli/.github/skills/apex-architecture/SKILL.md +36 -0
  13. package/assets/client-projections/github-copilot-cli/.github/skills/apex-artifacts/SKILL.md +65 -0
  14. package/assets/client-projections/github-copilot-cli/.github/skills/apex-artifacts/references/presentation-conventions.md +52 -0
  15. package/assets/client-projections/github-copilot-cli/.github/skills/apex-artifacts/references/reference-only-outlines.md +78 -0
  16. package/assets/client-projections/github-copilot-cli/.github/skills/apex-artifacts/templates/architecture-assessment.md +35 -0
  17. package/assets/client-projections/github-copilot-cli/.github/skills/apex-artifacts/templates/cost-estimate.md +47 -0
  18. package/assets/client-projections/github-copilot-cli/.github/skills/apex-artifacts/templates/deployment-summary.md +35 -0
  19. package/assets/client-projections/github-copilot-cli/.github/skills/apex-artifacts/templates/governance-constraints.md +35 -0
  20. package/assets/client-projections/github-copilot-cli/.github/skills/apex-artifacts/templates/implementation-plan.md +43 -0
  21. package/assets/client-projections/github-copilot-cli/.github/skills/apex-artifacts/templates/operations-runbook.md +35 -0
  22. package/assets/client-projections/github-copilot-cli/.github/skills/apex-artifacts/templates/requirements.md +42 -0
  23. package/assets/client-projections/github-copilot-cli/.github/skills/apex-artifacts/templates/resource-inventory.md +29 -0
  24. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-adr/SKILL.md +52 -0
  25. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-adr/references/decision-examples.md +38 -0
  26. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-adr/references/decision-guardrails.md +36 -0
  27. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-adr/references/decision-quality.md +21 -0
  28. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-adr/references/decision-record-fields.md +57 -0
  29. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-cloud-migrate/SKILL.md +55 -0
  30. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-cloud-migrate/references/lambda-to-functions-assessment.md +29 -0
  31. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-cloud-migrate/references/migration-readiness.md +27 -0
  32. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-cloud-migrate/references/staged-validation-handoff.md +26 -0
  33. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-cloud-migrate/references/workload-mapping.md +27 -0
  34. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-compliance/SKILL.md +58 -0
  35. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-compliance/references/compliance-finding-criteria.md +63 -0
  36. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-compliance/references/operational-checklist.md +24 -0
  37. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-compute/SKILL.md +36 -0
  38. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-compute/references/compute-selection.md +26 -0
  39. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-compute/references/pricing-evidence.md +11 -0
  40. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-compute/references/recommendation-and-scale-rules.md +44 -0
  41. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-cost-optimization/SKILL.md +61 -0
  42. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-cost-optimization/references/cost-assessment-criteria.md +61 -0
  43. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-cost-optimization/references/operational-checklist.md +24 -0
  44. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-defaults/SKILL.md +59 -0
  45. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-defaults/references/avm-binding-guidance.md +29 -0
  46. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-defaults/references/baseline-fallbacks.md +53 -0
  47. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-defaults/references/cost-monitoring.md +47 -0
  48. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-defaults/references/decision-boundaries.md +19 -0
  49. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-defaults/references/governance-effects.md +28 -0
  50. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-defaults/references/naming.md +47 -0
  51. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-defaults/references/network-planning.md +47 -0
  52. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-defaults/references/security-baseline.md +40 -0
  53. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-defaults/references/service-selection.md +51 -0
  54. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-defaults/references/tag-precedence.md +31 -0
  55. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-deploy/SKILL.md +50 -0
  56. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-deploy/references/operational-checklist.md +26 -0
  57. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-deploy/references/preview-recovery-verification.md +48 -0
  58. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-diagnostics/SKILL.md +60 -0
  59. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-diagnostics/references/diagnostic-interpretation.md +42 -0
  60. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-diagnostics/references/operational-checklist.md +24 -0
  61. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-governance/SKILL.md +52 -0
  62. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-governance/references/evidence-interpretation.md +58 -0
  63. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-governance/references/operational-checklist.md +25 -0
  64. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-kusto/SKILL.md +58 -0
  65. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-kusto/references/kql-evidence-interpretation.md +41 -0
  66. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-kusto/references/operational-checklist.md +25 -0
  67. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-prepare/SKILL.md +52 -0
  68. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-prepare/references/functions-recipe-pack.md +27 -0
  69. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-prepare/references/preparation-lineage.md +36 -0
  70. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-quotas/SKILL.md +53 -0
  71. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-quotas/references/capacity-decision-rules.md +48 -0
  72. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-quotas/references/operational-checklist.md +23 -0
  73. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-rbac/SKILL.md +45 -0
  74. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-rbac/references/assignment-intent.md +39 -0
  75. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-rbac/references/least-privilege-selection.md +50 -0
  76. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-resources/SKILL.md +54 -0
  77. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-resources/references/inventory-query-patterns.md +49 -0
  78. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-resources/references/operational-checklist.md +24 -0
  79. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-storage/SKILL.md +35 -0
  80. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-storage/references/security-and-governance.md +12 -0
  81. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-storage/references/service-auth-and-sdk-boundary.md +33 -0
  82. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-storage/references/storage-selection.md +12 -0
  83. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-validate/SKILL.md +49 -0
  84. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-validate/references/operational-checklist.md +24 -0
  85. package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-validate/references/preflight-evidence.md +43 -0
  86. package/assets/client-projections/github-copilot-cli/.github/skills/apex-bicep-patterns/SKILL.md +41 -0
  87. package/assets/client-projections/github-copilot-cli/.github/skills/apex-bicep-patterns/references/avm-and-codegen-acceptance.md +11 -0
  88. package/assets/client-projections/github-copilot-cli/.github/skills/apex-bicep-patterns/references/codegen-acceptance-checklist.md +46 -0
  89. package/assets/client-projections/github-copilot-cli/.github/skills/apex-bicep-patterns/references/compiler-and-provider-gotchas.md +74 -0
  90. package/assets/client-projections/github-copilot-cli/.github/skills/apex-bicep-patterns/references/module-interfaces-and-parameters.md +56 -0
  91. package/assets/client-projections/github-copilot-cli/.github/skills/apex-bicep-patterns/references/network-and-observability.md +52 -0
  92. package/assets/client-projections/github-copilot-cli/.github/skills/apex-codegen/SKILL.md +32 -0
  93. package/assets/client-projections/github-copilot-cli/.github/skills/apex-entra-app-registration/SKILL.md +53 -0
  94. package/assets/client-projections/github-copilot-cli/.github/skills/apex-entra-app-registration/references/capability-receipts.md +21 -0
  95. package/assets/client-projections/github-copilot-cli/.github/skills/apex-entra-app-registration/references/design-and-diagnostics.md +36 -0
  96. package/assets/client-projections/github-copilot-cli/.github/skills/apex-entra-app-registration/references/oauth-registration-model.md +26 -0
  97. package/assets/client-projections/github-copilot-cli/.github/skills/apex-entra-app-registration/references/permissions-and-credentials.md +27 -0
  98. package/assets/client-projections/github-copilot-cli/.github/skills/apex-mermaid/SKILL.md +44 -0
  99. package/assets/client-projections/github-copilot-cli/.github/skills/apex-mermaid/references/styling.md +33 -0
  100. package/assets/client-projections/github-copilot-cli/.github/skills/apex-mermaid/references/syntax.md +99 -0
  101. package/assets/client-projections/github-copilot-cli/.github/skills/apex-microsoft-docs/SKILL.md +53 -0
  102. package/assets/client-projections/github-copilot-cli/.github/skills/apex-microsoft-docs/references/research-method.md +91 -0
  103. package/assets/client-projections/github-copilot-cli/.github/skills/apex-operations/SKILL.md +34 -0
  104. package/assets/client-projections/github-copilot-cli/.github/skills/apex-planning/SKILL.md +36 -0
  105. package/assets/client-projections/github-copilot-cli/.github/skills/apex-requirements/SKILL.md +43 -0
  106. package/assets/client-projections/github-copilot-cli/.github/skills/apex-terraform-import/SKILL.md +47 -0
  107. package/assets/client-projections/github-copilot-cli/.github/skills/apex-terraform-import/references/adoption-attestation.md +10 -0
  108. package/assets/client-projections/github-copilot-cli/.github/skills/apex-terraform-import/references/import-assessment.md +14 -0
  109. package/assets/client-projections/github-copilot-cli/.github/skills/apex-terraform-import/references/import-mapping.md +27 -0
  110. package/assets/client-projections/github-copilot-cli/.github/skills/apex-terraform-import/references/mapping-and-adoption-attestation.md +12 -0
  111. package/assets/client-projections/github-copilot-cli/.github/skills/apex-terraform-patterns/SKILL.md +49 -0
  112. package/assets/client-projections/github-copilot-cli/.github/skills/apex-terraform-patterns/references/module-composition-and-refactor.md +20 -0
  113. package/assets/client-projections/github-copilot-cli/.github/skills/apex-terraform-patterns/references/module-composition-and-state-boundaries.md +11 -0
  114. package/assets/client-projections/github-copilot-cli/.github/skills/apex-terraform-patterns/references/module-locks-and-codegen-acceptance.md +14 -0
  115. package/assets/client-projections/github-copilot-cli/.github/skills/apex-terraform-patterns/references/network-and-observability.md +12 -0
  116. package/assets/client-projections/github-copilot-cli/.github/skills/apex-terraform-patterns/references/plan-and-change-assessment.md +24 -0
  117. package/assets/client-projections/github-copilot-cli/.github/skills/apex-terraform-test/SKILL.md +45 -0
  118. package/assets/client-projections/github-copilot-cli/.github/skills/apex-terraform-test/references/evidence-acceptance.md +10 -0
  119. package/assets/client-projections/github-copilot-cli/.github/skills/apex-terraform-test/references/plan-mode-and-mock-design.md +12 -0
  120. package/assets/client-projections/github-copilot-cli/.github/skills/apex-terraform-test/references/plan-mode-test-design.md +23 -0
  121. package/assets/client-projections/github-copilot-cli/.github/skills/apex-terraform-test/references/test-design.md +13 -0
  122. package/assets/client-projections/github-copilot-cli/.github/skills/apex-workflow/SKILL.md +37 -0
  123. package/assets/client-projections/github-copilot-vscode/.github/agents/apex-architect.agent.md +87 -0
  124. package/assets/client-projections/github-copilot-vscode/.github/agents/apex-codegen.agent.md +54 -0
  125. package/assets/client-projections/github-copilot-vscode/.github/agents/apex-operator.agent.md +75 -0
  126. package/assets/client-projections/github-copilot-vscode/.github/agents/apex-planner.agent.md +89 -0
  127. package/assets/client-projections/github-copilot-vscode/.github/agents/apex-requirements.agent.md +78 -0
  128. package/assets/client-projections/github-copilot-vscode/.github/agents/apex-reviewer.agent.md +45 -0
  129. package/assets/client-projections/github-copilot-vscode/.github/agents/apex-validator.agent.md +50 -0
  130. package/assets/client-projections/github-copilot-vscode/.github/agents/apex.agent.md +71 -0
  131. package/assets/client-projections/github-copilot-vscode/.github/copilot-instructions.md +13 -0
  132. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-architecture/SKILL.md +36 -0
  133. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-artifacts/SKILL.md +65 -0
  134. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-artifacts/references/presentation-conventions.md +52 -0
  135. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-artifacts/references/reference-only-outlines.md +78 -0
  136. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-artifacts/templates/architecture-assessment.md +35 -0
  137. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-artifacts/templates/cost-estimate.md +47 -0
  138. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-artifacts/templates/deployment-summary.md +35 -0
  139. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-artifacts/templates/governance-constraints.md +35 -0
  140. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-artifacts/templates/implementation-plan.md +43 -0
  141. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-artifacts/templates/operations-runbook.md +35 -0
  142. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-artifacts/templates/requirements.md +42 -0
  143. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-artifacts/templates/resource-inventory.md +29 -0
  144. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-adr/SKILL.md +52 -0
  145. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-adr/references/decision-examples.md +38 -0
  146. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-adr/references/decision-guardrails.md +36 -0
  147. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-adr/references/decision-quality.md +21 -0
  148. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-adr/references/decision-record-fields.md +57 -0
  149. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-cloud-migrate/SKILL.md +55 -0
  150. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-cloud-migrate/references/lambda-to-functions-assessment.md +29 -0
  151. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-cloud-migrate/references/migration-readiness.md +27 -0
  152. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-cloud-migrate/references/staged-validation-handoff.md +26 -0
  153. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-cloud-migrate/references/workload-mapping.md +27 -0
  154. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-compliance/SKILL.md +58 -0
  155. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-compliance/references/compliance-finding-criteria.md +63 -0
  156. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-compliance/references/operational-checklist.md +24 -0
  157. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-compute/SKILL.md +36 -0
  158. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-compute/references/compute-selection.md +26 -0
  159. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-compute/references/pricing-evidence.md +11 -0
  160. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-compute/references/recommendation-and-scale-rules.md +44 -0
  161. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-cost-optimization/SKILL.md +61 -0
  162. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-cost-optimization/references/cost-assessment-criteria.md +61 -0
  163. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-cost-optimization/references/operational-checklist.md +24 -0
  164. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-defaults/SKILL.md +59 -0
  165. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-defaults/references/avm-binding-guidance.md +29 -0
  166. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-defaults/references/baseline-fallbacks.md +53 -0
  167. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-defaults/references/cost-monitoring.md +47 -0
  168. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-defaults/references/decision-boundaries.md +19 -0
  169. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-defaults/references/governance-effects.md +28 -0
  170. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-defaults/references/naming.md +47 -0
  171. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-defaults/references/network-planning.md +47 -0
  172. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-defaults/references/security-baseline.md +40 -0
  173. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-defaults/references/service-selection.md +51 -0
  174. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-defaults/references/tag-precedence.md +31 -0
  175. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-deploy/SKILL.md +50 -0
  176. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-deploy/references/operational-checklist.md +26 -0
  177. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-deploy/references/preview-recovery-verification.md +48 -0
  178. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-diagnostics/SKILL.md +60 -0
  179. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-diagnostics/references/diagnostic-interpretation.md +42 -0
  180. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-diagnostics/references/operational-checklist.md +24 -0
  181. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-governance/SKILL.md +52 -0
  182. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-governance/references/evidence-interpretation.md +58 -0
  183. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-governance/references/operational-checklist.md +25 -0
  184. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-kusto/SKILL.md +58 -0
  185. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-kusto/references/kql-evidence-interpretation.md +41 -0
  186. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-kusto/references/operational-checklist.md +25 -0
  187. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-prepare/SKILL.md +52 -0
  188. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-prepare/references/functions-recipe-pack.md +27 -0
  189. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-prepare/references/preparation-lineage.md +36 -0
  190. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-quotas/SKILL.md +53 -0
  191. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-quotas/references/capacity-decision-rules.md +48 -0
  192. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-quotas/references/operational-checklist.md +23 -0
  193. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-rbac/SKILL.md +45 -0
  194. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-rbac/references/assignment-intent.md +39 -0
  195. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-rbac/references/least-privilege-selection.md +50 -0
  196. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-resources/SKILL.md +54 -0
  197. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-resources/references/inventory-query-patterns.md +49 -0
  198. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-resources/references/operational-checklist.md +24 -0
  199. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-storage/SKILL.md +35 -0
  200. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-storage/references/security-and-governance.md +12 -0
  201. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-storage/references/service-auth-and-sdk-boundary.md +33 -0
  202. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-storage/references/storage-selection.md +12 -0
  203. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-validate/SKILL.md +49 -0
  204. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-validate/references/operational-checklist.md +24 -0
  205. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-validate/references/preflight-evidence.md +43 -0
  206. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-bicep-patterns/SKILL.md +41 -0
  207. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-bicep-patterns/references/avm-and-codegen-acceptance.md +11 -0
  208. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-bicep-patterns/references/codegen-acceptance-checklist.md +46 -0
  209. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-bicep-patterns/references/compiler-and-provider-gotchas.md +74 -0
  210. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-bicep-patterns/references/module-interfaces-and-parameters.md +56 -0
  211. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-bicep-patterns/references/network-and-observability.md +52 -0
  212. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-codegen/SKILL.md +32 -0
  213. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-entra-app-registration/SKILL.md +53 -0
  214. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-entra-app-registration/references/capability-receipts.md +21 -0
  215. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-entra-app-registration/references/design-and-diagnostics.md +36 -0
  216. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-entra-app-registration/references/oauth-registration-model.md +26 -0
  217. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-entra-app-registration/references/permissions-and-credentials.md +27 -0
  218. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-mermaid/SKILL.md +44 -0
  219. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-mermaid/references/styling.md +33 -0
  220. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-mermaid/references/syntax.md +99 -0
  221. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-microsoft-docs/SKILL.md +53 -0
  222. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-microsoft-docs/references/research-method.md +91 -0
  223. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-operations/SKILL.md +34 -0
  224. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-planning/SKILL.md +36 -0
  225. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-requirements/SKILL.md +43 -0
  226. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-terraform-import/SKILL.md +47 -0
  227. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-terraform-import/references/adoption-attestation.md +10 -0
  228. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-terraform-import/references/import-assessment.md +14 -0
  229. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-terraform-import/references/import-mapping.md +27 -0
  230. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-terraform-import/references/mapping-and-adoption-attestation.md +12 -0
  231. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-terraform-patterns/SKILL.md +49 -0
  232. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-terraform-patterns/references/module-composition-and-refactor.md +20 -0
  233. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-terraform-patterns/references/module-composition-and-state-boundaries.md +11 -0
  234. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-terraform-patterns/references/module-locks-and-codegen-acceptance.md +14 -0
  235. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-terraform-patterns/references/network-and-observability.md +12 -0
  236. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-terraform-patterns/references/plan-and-change-assessment.md +24 -0
  237. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-terraform-test/SKILL.md +45 -0
  238. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-terraform-test/references/evidence-acceptance.md +10 -0
  239. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-terraform-test/references/plan-mode-and-mock-design.md +12 -0
  240. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-terraform-test/references/plan-mode-test-design.md +23 -0
  241. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-terraform-test/references/test-design.md +13 -0
  242. package/assets/client-projections/github-copilot-vscode/.github/skills/apex-workflow/SKILL.md +37 -0
  243. package/assets/client-projections/github-copilot-vscode/.vscode/mcp.json +21 -0
  244. package/assets/config/capability-packs.v1.json +43 -0
  245. package/assets/config/defaults.v1.json +98 -0
  246. package/assets/config/improvement-policy.v1.json +37 -0
  247. package/assets/config/quality-scorecard.v1.json +105 -0
  248. package/assets/config/recipe-packs.v1.json +29 -0
  249. package/assets/config/runtime-bundle.v1.json +84 -0
  250. package/assets/config/toolchain.v1.json +134 -0
  251. package/assets/config/workflow.v1.json +876 -0
  252. package/assets/customizations/.github/agents/apex-architect.agent.md +80 -0
  253. package/assets/customizations/.github/agents/apex-codegen.agent.md +51 -0
  254. package/assets/customizations/.github/agents/apex-operator.agent.md +68 -0
  255. package/assets/customizations/.github/agents/apex-planner.agent.md +82 -0
  256. package/assets/customizations/.github/agents/apex-requirements.agent.md +71 -0
  257. package/assets/customizations/.github/agents/apex-reviewer.agent.md +42 -0
  258. package/assets/customizations/.github/agents/apex-validator.agent.md +47 -0
  259. package/assets/customizations/.github/agents/apex.agent.md +64 -0
  260. package/assets/customizations/.github/copilot-instructions.md +13 -0
  261. package/assets/customizations/.github/mcp.json +54 -0
  262. package/assets/customizations/.github/skills/apex-architecture/SKILL.md +36 -0
  263. package/assets/customizations/.github/skills/apex-artifacts/SKILL.md +65 -0
  264. package/assets/customizations/.github/skills/apex-artifacts/references/presentation-conventions.md +52 -0
  265. package/assets/customizations/.github/skills/apex-artifacts/references/reference-only-outlines.md +78 -0
  266. package/assets/customizations/.github/skills/apex-artifacts/templates/architecture-assessment.md +35 -0
  267. package/assets/customizations/.github/skills/apex-artifacts/templates/cost-estimate.md +47 -0
  268. package/assets/customizations/.github/skills/apex-artifacts/templates/deployment-summary.md +35 -0
  269. package/assets/customizations/.github/skills/apex-artifacts/templates/governance-constraints.md +35 -0
  270. package/assets/customizations/.github/skills/apex-artifacts/templates/implementation-plan.md +43 -0
  271. package/assets/customizations/.github/skills/apex-artifacts/templates/operations-runbook.md +35 -0
  272. package/assets/customizations/.github/skills/apex-artifacts/templates/requirements.md +42 -0
  273. package/assets/customizations/.github/skills/apex-artifacts/templates/resource-inventory.md +29 -0
  274. package/assets/customizations/.github/skills/apex-azure-adr/SKILL.md +52 -0
  275. package/assets/customizations/.github/skills/apex-azure-adr/references/decision-examples.md +38 -0
  276. package/assets/customizations/.github/skills/apex-azure-adr/references/decision-guardrails.md +36 -0
  277. package/assets/customizations/.github/skills/apex-azure-adr/references/decision-quality.md +21 -0
  278. package/assets/customizations/.github/skills/apex-azure-adr/references/decision-record-fields.md +57 -0
  279. package/assets/customizations/.github/skills/apex-azure-cloud-migrate/SKILL.md +55 -0
  280. package/assets/customizations/.github/skills/apex-azure-cloud-migrate/references/lambda-to-functions-assessment.md +29 -0
  281. package/assets/customizations/.github/skills/apex-azure-cloud-migrate/references/migration-readiness.md +27 -0
  282. package/assets/customizations/.github/skills/apex-azure-cloud-migrate/references/staged-validation-handoff.md +26 -0
  283. package/assets/customizations/.github/skills/apex-azure-cloud-migrate/references/workload-mapping.md +27 -0
  284. package/assets/customizations/.github/skills/apex-azure-compliance/SKILL.md +58 -0
  285. package/assets/customizations/.github/skills/apex-azure-compliance/references/compliance-finding-criteria.md +63 -0
  286. package/assets/customizations/.github/skills/apex-azure-compliance/references/operational-checklist.md +24 -0
  287. package/assets/customizations/.github/skills/apex-azure-compute/SKILL.md +36 -0
  288. package/assets/customizations/.github/skills/apex-azure-compute/references/compute-selection.md +26 -0
  289. package/assets/customizations/.github/skills/apex-azure-compute/references/pricing-evidence.md +11 -0
  290. package/assets/customizations/.github/skills/apex-azure-compute/references/recommendation-and-scale-rules.md +44 -0
  291. package/assets/customizations/.github/skills/apex-azure-cost-optimization/SKILL.md +61 -0
  292. package/assets/customizations/.github/skills/apex-azure-cost-optimization/references/cost-assessment-criteria.md +61 -0
  293. package/assets/customizations/.github/skills/apex-azure-cost-optimization/references/operational-checklist.md +24 -0
  294. package/assets/customizations/.github/skills/apex-azure-defaults/SKILL.md +59 -0
  295. package/assets/customizations/.github/skills/apex-azure-defaults/references/avm-binding-guidance.md +29 -0
  296. package/assets/customizations/.github/skills/apex-azure-defaults/references/baseline-fallbacks.md +53 -0
  297. package/assets/customizations/.github/skills/apex-azure-defaults/references/cost-monitoring.md +47 -0
  298. package/assets/customizations/.github/skills/apex-azure-defaults/references/decision-boundaries.md +19 -0
  299. package/assets/customizations/.github/skills/apex-azure-defaults/references/governance-effects.md +28 -0
  300. package/assets/customizations/.github/skills/apex-azure-defaults/references/naming.md +47 -0
  301. package/assets/customizations/.github/skills/apex-azure-defaults/references/network-planning.md +47 -0
  302. package/assets/customizations/.github/skills/apex-azure-defaults/references/security-baseline.md +40 -0
  303. package/assets/customizations/.github/skills/apex-azure-defaults/references/service-selection.md +51 -0
  304. package/assets/customizations/.github/skills/apex-azure-defaults/references/tag-precedence.md +31 -0
  305. package/assets/customizations/.github/skills/apex-azure-deploy/SKILL.md +50 -0
  306. package/assets/customizations/.github/skills/apex-azure-deploy/references/operational-checklist.md +26 -0
  307. package/assets/customizations/.github/skills/apex-azure-deploy/references/preview-recovery-verification.md +48 -0
  308. package/assets/customizations/.github/skills/apex-azure-diagnostics/SKILL.md +60 -0
  309. package/assets/customizations/.github/skills/apex-azure-diagnostics/references/diagnostic-interpretation.md +42 -0
  310. package/assets/customizations/.github/skills/apex-azure-diagnostics/references/operational-checklist.md +24 -0
  311. package/assets/customizations/.github/skills/apex-azure-governance/SKILL.md +52 -0
  312. package/assets/customizations/.github/skills/apex-azure-governance/references/evidence-interpretation.md +58 -0
  313. package/assets/customizations/.github/skills/apex-azure-governance/references/operational-checklist.md +25 -0
  314. package/assets/customizations/.github/skills/apex-azure-kusto/SKILL.md +58 -0
  315. package/assets/customizations/.github/skills/apex-azure-kusto/references/kql-evidence-interpretation.md +41 -0
  316. package/assets/customizations/.github/skills/apex-azure-kusto/references/operational-checklist.md +25 -0
  317. package/assets/customizations/.github/skills/apex-azure-prepare/SKILL.md +52 -0
  318. package/assets/customizations/.github/skills/apex-azure-prepare/references/functions-recipe-pack.md +27 -0
  319. package/assets/customizations/.github/skills/apex-azure-prepare/references/preparation-lineage.md +36 -0
  320. package/assets/customizations/.github/skills/apex-azure-quotas/SKILL.md +53 -0
  321. package/assets/customizations/.github/skills/apex-azure-quotas/references/capacity-decision-rules.md +48 -0
  322. package/assets/customizations/.github/skills/apex-azure-quotas/references/operational-checklist.md +23 -0
  323. package/assets/customizations/.github/skills/apex-azure-rbac/SKILL.md +45 -0
  324. package/assets/customizations/.github/skills/apex-azure-rbac/references/assignment-intent.md +39 -0
  325. package/assets/customizations/.github/skills/apex-azure-rbac/references/least-privilege-selection.md +50 -0
  326. package/assets/customizations/.github/skills/apex-azure-resources/SKILL.md +54 -0
  327. package/assets/customizations/.github/skills/apex-azure-resources/references/inventory-query-patterns.md +49 -0
  328. package/assets/customizations/.github/skills/apex-azure-resources/references/operational-checklist.md +24 -0
  329. package/assets/customizations/.github/skills/apex-azure-storage/SKILL.md +35 -0
  330. package/assets/customizations/.github/skills/apex-azure-storage/references/security-and-governance.md +12 -0
  331. package/assets/customizations/.github/skills/apex-azure-storage/references/service-auth-and-sdk-boundary.md +33 -0
  332. package/assets/customizations/.github/skills/apex-azure-storage/references/storage-selection.md +12 -0
  333. package/assets/customizations/.github/skills/apex-azure-validate/SKILL.md +49 -0
  334. package/assets/customizations/.github/skills/apex-azure-validate/references/operational-checklist.md +24 -0
  335. package/assets/customizations/.github/skills/apex-azure-validate/references/preflight-evidence.md +43 -0
  336. package/assets/customizations/.github/skills/apex-bicep-patterns/SKILL.md +41 -0
  337. package/assets/customizations/.github/skills/apex-bicep-patterns/references/avm-and-codegen-acceptance.md +11 -0
  338. package/assets/customizations/.github/skills/apex-bicep-patterns/references/codegen-acceptance-checklist.md +46 -0
  339. package/assets/customizations/.github/skills/apex-bicep-patterns/references/compiler-and-provider-gotchas.md +74 -0
  340. package/assets/customizations/.github/skills/apex-bicep-patterns/references/module-interfaces-and-parameters.md +56 -0
  341. package/assets/customizations/.github/skills/apex-bicep-patterns/references/network-and-observability.md +52 -0
  342. package/assets/customizations/.github/skills/apex-codegen/SKILL.md +32 -0
  343. package/assets/customizations/.github/skills/apex-entra-app-registration/SKILL.md +53 -0
  344. package/assets/customizations/.github/skills/apex-entra-app-registration/references/capability-receipts.md +21 -0
  345. package/assets/customizations/.github/skills/apex-entra-app-registration/references/design-and-diagnostics.md +36 -0
  346. package/assets/customizations/.github/skills/apex-entra-app-registration/references/oauth-registration-model.md +26 -0
  347. package/assets/customizations/.github/skills/apex-entra-app-registration/references/permissions-and-credentials.md +27 -0
  348. package/assets/customizations/.github/skills/apex-mermaid/SKILL.md +44 -0
  349. package/assets/customizations/.github/skills/apex-mermaid/references/styling.md +33 -0
  350. package/assets/customizations/.github/skills/apex-mermaid/references/syntax.md +99 -0
  351. package/assets/customizations/.github/skills/apex-microsoft-docs/SKILL.md +53 -0
  352. package/assets/customizations/.github/skills/apex-microsoft-docs/references/research-method.md +91 -0
  353. package/assets/customizations/.github/skills/apex-operations/SKILL.md +34 -0
  354. package/assets/customizations/.github/skills/apex-planning/SKILL.md +36 -0
  355. package/assets/customizations/.github/skills/apex-requirements/SKILL.md +43 -0
  356. package/assets/customizations/.github/skills/apex-terraform-import/SKILL.md +47 -0
  357. package/assets/customizations/.github/skills/apex-terraform-import/references/adoption-attestation.md +10 -0
  358. package/assets/customizations/.github/skills/apex-terraform-import/references/import-assessment.md +14 -0
  359. package/assets/customizations/.github/skills/apex-terraform-import/references/import-mapping.md +27 -0
  360. package/assets/customizations/.github/skills/apex-terraform-import/references/mapping-and-adoption-attestation.md +12 -0
  361. package/assets/customizations/.github/skills/apex-terraform-patterns/SKILL.md +49 -0
  362. package/assets/customizations/.github/skills/apex-terraform-patterns/references/module-composition-and-refactor.md +20 -0
  363. package/assets/customizations/.github/skills/apex-terraform-patterns/references/module-composition-and-state-boundaries.md +11 -0
  364. package/assets/customizations/.github/skills/apex-terraform-patterns/references/module-locks-and-codegen-acceptance.md +14 -0
  365. package/assets/customizations/.github/skills/apex-terraform-patterns/references/network-and-observability.md +12 -0
  366. package/assets/customizations/.github/skills/apex-terraform-patterns/references/plan-and-change-assessment.md +24 -0
  367. package/assets/customizations/.github/skills/apex-terraform-test/SKILL.md +45 -0
  368. package/assets/customizations/.github/skills/apex-terraform-test/references/evidence-acceptance.md +10 -0
  369. package/assets/customizations/.github/skills/apex-terraform-test/references/plan-mode-and-mock-design.md +12 -0
  370. package/assets/customizations/.github/skills/apex-terraform-test/references/plan-mode-test-design.md +23 -0
  371. package/assets/customizations/.github/skills/apex-terraform-test/references/test-design.md +13 -0
  372. package/assets/customizations/.github/skills/apex-workflow/SKILL.md +37 -0
  373. package/assets/customizations/.vscode/mcp.json +21 -0
  374. package/assets/customizations/README.md +22 -0
  375. package/assets/customizations/manifest.json +251 -0
  376. package/assets/manifest.json +5027 -0
  377. package/dist/assets.d.ts +69 -0
  378. package/dist/assets.js +336 -0
  379. package/dist/cli.d.ts +4 -0
  380. package/dist/cli.js +643 -0
  381. package/dist/dependency-revision.d.ts +5 -0
  382. package/dist/dependency-revision.js +21 -0
  383. package/dist/errors.d.ts +19 -0
  384. package/dist/errors.js +34 -0
  385. package/dist/index.d.ts +7 -0
  386. package/dist/index.js +7 -0
  387. package/dist/mcp.d.ts +5 -0
  388. package/dist/mcp.js +210 -0
  389. package/dist/provider-runtime.d.ts +27 -0
  390. package/dist/provider-runtime.js +229 -0
  391. package/dist/provider-transfer.d.ts +52 -0
  392. package/dist/provider-transfer.js +533 -0
  393. package/dist/service.d.ts +806 -0
  394. package/dist/service.js +3817 -0
  395. package/dist/state-transfer.d.ts +51 -0
  396. package/dist/state-transfer.js +559 -0
  397. package/dist/version.d.ts +2 -0
  398. package/dist/version.js +2 -0
  399. package/dist/workflow-validators.d.ts +80 -0
  400. package/dist/workflow-validators.js +843 -0
  401. package/package.json +57 -0
@@ -0,0 +1,69 @@
1
+ export interface BundledAssetMapping {
2
+ id: string;
3
+ mode: "copy-tree" | "copy-entries" | "compose-json" | "render-client-projections";
4
+ sourceRoot?: string;
5
+ generatedRoot?: string;
6
+ generatedPath?: string;
7
+ }
8
+ export interface BundledAssetSource {
9
+ kind: "repository-file" | "generated";
10
+ path?: string;
11
+ mapping?: string;
12
+ composition?: string;
13
+ roleId?: string;
14
+ sourcePath?: string;
15
+ sourceHash?: string;
16
+ clientId?: string;
17
+ target?: string;
18
+ adapterVersion?: string;
19
+ }
20
+ export interface BundledAssetFile {
21
+ path: string;
22
+ source: BundledAssetSource;
23
+ sha256: string;
24
+ bytes: number;
25
+ }
26
+ export interface BundledClientProjection {
27
+ id: "github-copilot-cli" | "github-copilot-vscode";
28
+ files: string[];
29
+ digest: string;
30
+ }
31
+ export interface BundledAssetManifest {
32
+ version: 1;
33
+ sources: {
34
+ customizations: string;
35
+ config: string;
36
+ };
37
+ composition: {
38
+ authority: "npm:@apexops/cli";
39
+ generator: "packages/cli/scripts/prepare-assets.mjs";
40
+ formatVersion: 1;
41
+ mappings: BundledAssetMapping[];
42
+ };
43
+ projections: BundledClientProjection[];
44
+ files: BundledAssetFile[];
45
+ lock: {
46
+ algorithm: "sha256";
47
+ canonicalization: "apex-bundled-assets-v1";
48
+ digest: string;
49
+ };
50
+ }
51
+ export interface BundledAssets {
52
+ root: string;
53
+ customizations: string;
54
+ clientProjections: Readonly<Record<BundledClientProjection["id"], string>>;
55
+ config: string;
56
+ capabilityPacks: string;
57
+ capabilityPackRegistry: string;
58
+ manifest: BundledAssetManifest;
59
+ }
60
+ export declare function readBundledFile(root: string, relativePath: string, beforeOpen?: () => Promise<void>, expectedIdentity?: {
61
+ dev: bigint;
62
+ ino: bigint;
63
+ }): Promise<Buffer>;
64
+ export declare function verifyBundleDeclarations(manifest: BundledAssetManifest, customizationManifest: Record<string, unknown>, runtimeBundle: Record<string, unknown>): void;
65
+ export declare function clientProjectionDigest(projection: Pick<BundledClientProjection, "id" | "files">, files: BundledAssetFile[]): string;
66
+ export declare function bundleLockDigest(input: Pick<BundledAssetManifest, "sources" | "composition" | "projections" | "files">): string;
67
+ export declare function verifyBundledAssetManifest(root: string, manifest: BundledAssetManifest): Promise<void>;
68
+ export declare function resolveBundledAssets(): Promise<BundledAssets>;
69
+ //# sourceMappingURL=assets.d.ts.map
package/dist/assets.js ADDED
@@ -0,0 +1,336 @@
1
+ import { canonicalJsonBytes, sha256Bytes } from "@apexops/kernel";
2
+ import { constants } from "node:fs";
3
+ import { lstat, open, readFile, readdir, realpath } from "node:fs/promises";
4
+ import { dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
5
+ import { fileURLToPath } from "node:url";
6
+ const LOCK_DOMAIN = "apex-bundled-assets-v1\0";
7
+ const PROJECTION_DOMAIN = "apex-client-projection-v1\0";
8
+ const PROJECTION_TARGETS = {
9
+ "github-copilot-cli": "github-copilot",
10
+ "github-copilot-vscode": "vscode",
11
+ };
12
+ const SHA256 = /^[a-f0-9]{64}$/u;
13
+ function projectionTarget(clientId) {
14
+ const target = PROJECTION_TARGETS[clientId];
15
+ if (target === undefined)
16
+ throw new Error(`Unsupported bundled client projection: ${clientId ?? "missing"}`);
17
+ return target;
18
+ }
19
+ function portablePath(path) {
20
+ return path.split(sep).join("/");
21
+ }
22
+ function safeRelativePath(path) {
23
+ return (path.length > 0 &&
24
+ !path.includes("\\") &&
25
+ !path.includes("\0") &&
26
+ !path.includes(":") &&
27
+ !isAbsolute(path) &&
28
+ path.split("/").every((segment) => segment.length > 0 && segment !== "." && segment !== ".."));
29
+ }
30
+ function assertContained(root, path) {
31
+ const child = relative(resolve(root), resolve(path));
32
+ if (child === "" || child === ".." || child.startsWith(`..${sep}`) || isAbsolute(child)) {
33
+ throw new Error(`Unsafe bundled asset path: ${path}`);
34
+ }
35
+ }
36
+ export async function readBundledFile(root, relativePath, beforeOpen = async () => { }, expectedIdentity) {
37
+ const path = resolve(root, relativePath);
38
+ assertContained(root, path);
39
+ const resolved = await realpath(path);
40
+ assertContained(root, resolved);
41
+ const initialMetadata = await lstat(path, { bigint: true });
42
+ const identity = expectedIdentity ?? { dev: initialMetadata.dev, ino: initialMetadata.ino };
43
+ if (initialMetadata.isSymbolicLink() || !initialMetadata.isFile()) {
44
+ throw new Error(`Unsupported bundled asset entry: ${relativePath}`);
45
+ }
46
+ await beforeOpen();
47
+ const handle = await open(path, constants.O_RDONLY | (constants.O_NOFOLLOW ?? 0));
48
+ try {
49
+ const descriptorMetadata = await handle.stat({ bigint: true });
50
+ if (!descriptorMetadata.isFile())
51
+ throw new Error(`Unsupported bundled asset entry: ${relativePath}`);
52
+ const pathMetadata = await lstat(path, { bigint: true });
53
+ if (pathMetadata.isSymbolicLink() ||
54
+ descriptorMetadata.dev !== identity.dev ||
55
+ descriptorMetadata.ino !== identity.ino ||
56
+ pathMetadata.dev !== descriptorMetadata.dev ||
57
+ pathMetadata.ino !== descriptorMetadata.ino) {
58
+ throw new Error(`Bundled asset path changed during verification: ${relativePath}`);
59
+ }
60
+ const descriptorPath = process.platform === "linux" ? `/proc/self/fd/${handle.fd}` : path;
61
+ const openedPath = await realpath(descriptorPath);
62
+ assertContained(root, openedPath);
63
+ if (openedPath !== resolved) {
64
+ throw new Error(`Bundled asset path changed during verification: ${relativePath}`);
65
+ }
66
+ return await handle.readFile();
67
+ }
68
+ finally {
69
+ await handle.close();
70
+ }
71
+ }
72
+ export function verifyBundleDeclarations(manifest, customizationManifest, runtimeBundle) {
73
+ const bundle = customizationManifest.bundle;
74
+ const components = runtimeBundle.components;
75
+ const component = components?.customizationBundle;
76
+ const mapping = manifest.composition.mappings.find(({ id }) => id === "customizations");
77
+ if (bundle === undefined ||
78
+ component === undefined ||
79
+ bundle.id !== "apex-managed-workspace" ||
80
+ bundle.authority !== manifest.composition.authority ||
81
+ bundle.composition !== mapping?.mode ||
82
+ bundle.sourceRoot !== mapping?.sourceRoot ||
83
+ bundle.generatedRoot !== mapping?.generatedRoot ||
84
+ customizationManifest.version !== manifest.sources.customizations ||
85
+ runtimeBundle.bundleVersion !== manifest.sources.customizations ||
86
+ runtimeBundle.schemaVersion !== manifest.sources.config ||
87
+ component.version !== manifest.sources.customizations ||
88
+ component.manifest !== "@apexops/cli/assets/customizations/manifest.json" ||
89
+ component.assetManifest !== "@apexops/cli/assets/manifest.json" ||
90
+ component.compositionId !== bundle.id) {
91
+ throw new Error("Bundle composition declarations are inconsistent");
92
+ }
93
+ }
94
+ export function clientProjectionDigest(projection, files) {
95
+ const metadata = new Map(files.map((file) => [file.path, file.sha256]));
96
+ const projectionFiles = projection.files.map((path) => {
97
+ const sha256 = metadata.get(path);
98
+ if (sha256 === undefined)
99
+ throw new Error(`Client projection references missing asset: ${path}`);
100
+ return { path, sha256 };
101
+ });
102
+ return sha256Bytes(Buffer.concat([
103
+ Buffer.from(PROJECTION_DOMAIN, "utf8"),
104
+ canonicalJsonBytes({ id: projection.id, files: projectionFiles }),
105
+ ]));
106
+ }
107
+ export function bundleLockDigest(input) {
108
+ const payload = {
109
+ sources: input.sources,
110
+ composition: input.composition,
111
+ projections: input.projections,
112
+ files: input.files,
113
+ };
114
+ return sha256Bytes(Buffer.concat([Buffer.from(LOCK_DOMAIN, "utf8"), canonicalJsonBytes(payload)]));
115
+ }
116
+ async function bundledPayloadFiles(root, directory = root, expectedIdentity) {
117
+ const before = await lstat(directory, { bigint: true });
118
+ const identity = expectedIdentity ?? { dev: before.dev, ino: before.ino };
119
+ if (!before.isDirectory() || before.isSymbolicLink() || before.dev !== identity.dev || before.ino !== identity.ino) {
120
+ throw new Error(`Bundled asset directory changed during verification: ${portablePath(relative(root, directory))}`);
121
+ }
122
+ const files = [];
123
+ const entries = await readdir(directory, { withFileTypes: true });
124
+ for (const entry of entries.sort((left, right) => (left.name < right.name ? -1 : left.name > right.name ? 1 : 0))) {
125
+ const path = join(directory, entry.name);
126
+ const metadata = await lstat(path, { bigint: true });
127
+ if (metadata.isSymbolicLink())
128
+ throw new Error(`Bundled asset contains a symlink: ${portablePath(relative(root, path))}`);
129
+ if (metadata.isDirectory()) {
130
+ files.push(...(await bundledPayloadFiles(root, path, { dev: metadata.dev, ino: metadata.ino })));
131
+ }
132
+ else if (metadata.isFile() && portablePath(relative(root, path)) !== "manifest.json") {
133
+ files.push({
134
+ path: portablePath(relative(root, path)),
135
+ identity: { dev: metadata.dev, ino: metadata.ino },
136
+ });
137
+ }
138
+ else if (!metadata.isFile())
139
+ throw new Error(`Unsupported bundled asset entry: ${path}`);
140
+ }
141
+ const after = await lstat(directory, { bigint: true });
142
+ if (!after.isDirectory() || after.isSymbolicLink() || after.dev !== identity.dev || after.ino !== identity.ino) {
143
+ throw new Error(`Bundled asset directory changed during verification: ${portablePath(relative(root, directory))}`);
144
+ }
145
+ return files;
146
+ }
147
+ export async function verifyBundledAssetManifest(root, manifest) {
148
+ if (manifest.version !== 1 ||
149
+ manifest.composition?.authority !== "npm:@apexops/cli" ||
150
+ manifest.composition.generator !== "packages/cli/scripts/prepare-assets.mjs" ||
151
+ manifest.composition.formatVersion !== 1 ||
152
+ manifest.lock?.algorithm !== "sha256" ||
153
+ manifest.lock.canonicalization !== "apex-bundled-assets-v1" ||
154
+ typeof manifest.sources?.customizations !== "string" ||
155
+ manifest.sources.customizations.length === 0 ||
156
+ typeof manifest.sources.config !== "string" ||
157
+ manifest.sources.config.length === 0 ||
158
+ !Array.isArray(manifest.files) ||
159
+ !Array.isArray(manifest.projections) ||
160
+ !Array.isArray(manifest.composition.mappings)) {
161
+ throw new Error("Unsupported bundled asset manifest");
162
+ }
163
+ const mappings = new Map(manifest.composition.mappings.map((mapping) => [mapping.id, mapping]));
164
+ if (mappings.size !== manifest.composition.mappings.length)
165
+ throw new Error("Duplicate bundled asset mapping ID");
166
+ const generatedDestinations = [];
167
+ for (const mapping of mappings.values()) {
168
+ if (!["copy-tree", "copy-entries", "compose-json", "render-client-projections"].includes(mapping.mode)) {
169
+ throw new Error(`Invalid bundled asset mapping: ${mapping.id}`);
170
+ }
171
+ if (mapping.mode === "compose-json") {
172
+ if (!safeRelativePath(mapping.generatedPath ?? "") ||
173
+ mapping.sourceRoot !== undefined ||
174
+ mapping.generatedRoot !== undefined)
175
+ throw new Error(`Invalid bundled asset mapping: ${mapping.id}`);
176
+ generatedDestinations.push(mapping.generatedPath);
177
+ }
178
+ else if (!safeRelativePath(mapping.sourceRoot ?? "") ||
179
+ !safeRelativePath(mapping.generatedRoot ?? "") ||
180
+ mapping.generatedPath !== undefined) {
181
+ throw new Error(`Invalid bundled asset mapping: ${mapping.id}`);
182
+ }
183
+ else
184
+ generatedDestinations.push(`${mapping.generatedRoot}/`);
185
+ }
186
+ for (const [index, destination] of generatedDestinations.entries()) {
187
+ if (generatedDestinations.some((candidate, candidateIndex) => candidateIndex !== index && (destination.startsWith(candidate) || candidate.startsWith(destination))))
188
+ throw new Error(`Overlapping bundled asset mapping destination: ${destination}`);
189
+ }
190
+ const paths = new Set();
191
+ for (const file of manifest.files) {
192
+ if (!safeRelativePath(file.path))
193
+ throw new Error(`Unsafe bundled asset path: ${file.path}`);
194
+ if (paths.has(file.path))
195
+ throw new Error(`Duplicate bundled asset path: ${file.path}`);
196
+ paths.add(file.path);
197
+ if (!SHA256.test(file.sha256) || !Number.isSafeInteger(file.bytes) || file.bytes < 0) {
198
+ throw new Error(`Invalid bundled asset metadata: ${file.path}`);
199
+ }
200
+ if (file.source.kind === "repository-file") {
201
+ const mapping = mappings.get(file.source.mapping ?? "");
202
+ if (!safeRelativePath(file.source.path ?? "") ||
203
+ mapping === undefined ||
204
+ mapping.mode === "compose-json" ||
205
+ !file.source.path.startsWith(`${mapping.sourceRoot}/`) ||
206
+ !file.path.startsWith(`${mapping.generatedRoot}/`) ||
207
+ relative(mapping.sourceRoot, file.source.path).split(sep).join("/") !==
208
+ relative(mapping.generatedRoot, file.path).split(sep).join("/")) {
209
+ throw new Error(`Invalid bundled asset source: ${file.path}`);
210
+ }
211
+ }
212
+ else if (file.source.kind === "generated") {
213
+ const mapping = mappings.get(file.source.composition ?? "");
214
+ if (mapping === undefined ||
215
+ (mapping.mode === "compose-json"
216
+ ? mapping.generatedPath !== file.path
217
+ : mapping.mode !== "render-client-projections" || !file.path.startsWith(`${mapping.generatedRoot}/`))) {
218
+ throw new Error(`Invalid bundled asset source: ${file.path}`);
219
+ }
220
+ if (mapping.mode === "render-client-projections") {
221
+ const expectedPrefix = `${mapping.generatedRoot}/${file.source.clientId}/`;
222
+ if (!["github-copilot-cli", "github-copilot-vscode"].includes(file.source.clientId ?? "") ||
223
+ file.source.adapterVersion !== "1.1.0" ||
224
+ !safeRelativePath(file.source.target ?? "") ||
225
+ !file.path.startsWith(expectedPrefix) ||
226
+ file.path !== `${expectedPrefix}${file.source.target}` ||
227
+ !safeRelativePath(file.source.sourcePath ?? "") ||
228
+ !SHA256.test(file.source.sourceHash ?? "")) {
229
+ throw new Error(`Invalid generated client projection provenance: ${file.path}`);
230
+ }
231
+ }
232
+ }
233
+ else
234
+ throw new Error(`Invalid bundled asset source: ${file.path}`);
235
+ }
236
+ const projectionIds = new Set();
237
+ for (const projection of manifest.projections) {
238
+ if (!["github-copilot-cli", "github-copilot-vscode"].includes(projection.id) ||
239
+ projectionIds.has(projection.id) ||
240
+ !Array.isArray(projection.files) ||
241
+ projection.files.length !== new Set(projection.files).size ||
242
+ projection.files.some((path) => !safeRelativePath(path) || !paths.has(path)) ||
243
+ !SHA256.test(projection.digest) ||
244
+ clientProjectionDigest(projection, manifest.files) !== projection.digest) {
245
+ throw new Error(`Invalid bundled client projection: ${projection.id}`);
246
+ }
247
+ projectionIds.add(projection.id);
248
+ }
249
+ if (projectionIds.size !== 2)
250
+ throw new Error("Bundled client projections are incomplete");
251
+ const actualFiles = (await bundledPayloadFiles(root)).sort((left, right) => left.path < right.path ? -1 : left.path > right.path ? 1 : 0);
252
+ if (JSON.stringify(actualFiles.map(({ path }) => path)) !== JSON.stringify(manifest.files.map(({ path }) => path))) {
253
+ throw new Error("Bundled asset inventory mismatch");
254
+ }
255
+ const identities = new Map(actualFiles.map(({ path, identity }) => [path, identity]));
256
+ for (const file of manifest.files) {
257
+ const bytes = await readBundledFile(root, file.path, async () => { }, identities.get(file.path));
258
+ if (bytes.byteLength !== file.bytes || sha256Bytes(bytes) !== file.sha256) {
259
+ throw new Error(`Bundled asset hash mismatch: ${file.path}`);
260
+ }
261
+ }
262
+ const customizationManifest = JSON.parse((await readBundledFile(root, "customizations/manifest.json")).toString("utf8"));
263
+ const runtimeBundle = JSON.parse((await readBundledFile(root, "config/runtime-bundle.v1.json")).toString("utf8"));
264
+ verifyBundleDeclarations(manifest, customizationManifest, runtimeBundle);
265
+ const sharedFiles = customizationManifest.sharedFiles;
266
+ const sharedDirectories = (customizationManifest.sharedDirectories ?? []);
267
+ const roles = customizationManifest.roles;
268
+ const declarations = customizationManifest.clientProjections;
269
+ if (!Array.isArray(sharedFiles) ||
270
+ sharedFiles.length !== new Set(sharedFiles).size ||
271
+ !Array.isArray(sharedDirectories) ||
272
+ sharedDirectories.length !== new Set(sharedDirectories).size ||
273
+ sharedDirectories.some((path) => typeof path !== "string" || !safeRelativePath(path)) ||
274
+ !Array.isArray(declarations) ||
275
+ !Array.isArray(roles) ||
276
+ declarations.length !== manifest.projections.length ||
277
+ declarations.length !== new Set(declarations.map(({ id }) => id)).size) {
278
+ throw new Error("Client projection declarations are missing");
279
+ }
280
+ const sourceMetadata = new Map(manifest.files.map((file) => [file.path, file]));
281
+ for (const file of manifest.files.filter(({ source }) => source.kind === "generated" && source.composition === "client-projections")) {
282
+ const target = projectionTarget(file.source.clientId);
283
+ const role = file.source.roleId === undefined ? undefined : roles.find(({ id }) => id === file.source.roleId);
284
+ const canonical = sourceMetadata.get(`customizations/${file.source.sourcePath}`);
285
+ if ((file.source.roleId !== undefined &&
286
+ (role === undefined || role.source !== file.source.sourcePath || !role.supportedTargets.includes(target))) ||
287
+ canonical?.source.kind !== "repository-file" ||
288
+ canonical.sha256 !== file.source.sourceHash) {
289
+ throw new Error(`Generated client projection source binding mismatch: ${file.path}`);
290
+ }
291
+ }
292
+ const sharedDirectoryFiles = manifest.files
293
+ .filter(({ path, source }) => source.kind === "repository-file" &&
294
+ sharedDirectories.some((directory) => path.startsWith(`customizations/${directory}/`)))
295
+ .map(({ path }) => path.slice("customizations/".length));
296
+ for (const declaration of declarations) {
297
+ const target = projectionTarget(declaration.id);
298
+ const projection = manifest.projections.find(({ id }) => id === declaration.id);
299
+ if (!Array.isArray(declaration.files) || declaration.files.length !== new Set(declaration.files).size) {
300
+ throw new Error(`Bundled client projection disagrees with its declaration: ${declaration.id}`);
301
+ }
302
+ const expectedTargets = [
303
+ ...sharedFiles,
304
+ ...sharedDirectoryFiles,
305
+ ...declaration.files,
306
+ ...roles.filter(({ supportedTargets }) => supportedTargets.includes(target)).map(({ source }) => source),
307
+ ];
308
+ const expected = [...new Set(expectedTargets)].map((path) => `${declaration.generatedRoot}/${path}`).sort();
309
+ if (!safeRelativePath(declaration.generatedRoot) ||
310
+ projection === undefined ||
311
+ JSON.stringify(projection.files) !== JSON.stringify(expected)) {
312
+ throw new Error(`Bundled client projection disagrees with its declaration: ${declaration.id}`);
313
+ }
314
+ }
315
+ if (!SHA256.test(manifest.lock.digest) || bundleLockDigest(manifest) !== manifest.lock.digest) {
316
+ throw new Error("Bundled asset lock mismatch");
317
+ }
318
+ }
319
+ export async function resolveBundledAssets() {
320
+ const root = fileURLToPath(new URL("../assets/", import.meta.url));
321
+ const manifest = JSON.parse(await readFile(join(root, "manifest.json"), "utf8"));
322
+ await verifyBundledAssetManifest(root, manifest);
323
+ return {
324
+ root: dirname(join(root, "manifest.json")),
325
+ customizations: join(root, "customizations"),
326
+ clientProjections: {
327
+ "github-copilot-cli": join(root, "client-projections", "github-copilot-cli"),
328
+ "github-copilot-vscode": join(root, "client-projections", "github-copilot-vscode"),
329
+ },
330
+ config: join(root, "config"),
331
+ capabilityPacks: join(root, "capability-packs"),
332
+ capabilityPackRegistry: join(root, "capability-packs", "registry.v1.json"),
333
+ manifest,
334
+ };
335
+ }
336
+ //# sourceMappingURL=assets.js.map
package/dist/cli.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ import { type ServiceOptions } from "./service.js";
3
+ export declare function execute(argv: string[], root?: string, options?: ServiceOptions): Promise<unknown>;
4
+ //# sourceMappingURL=cli.d.ts.map